### 2.5 Building the documentation and PolyORB's examples

PolyORB's documentation and examples are built separately.

After building PolyORB, simply run make in the examples (resp. docs) directory to build the examples (resp. the documentation). The build process will only build examples that correspond to the personalities you configured.

Note: you may also install PolyORB's documentation in standard location typing make install.

#### 2.5.1 Build Options

Available options for the 'configure' script include:

- --with-appli-perso="...": application personalities to build

  Available personalities: AWS, CORBA, DSA, MOMA

  e.g. --with-appli-perso="corba moma" to build both the CORBA and MOMA personalities

- --with-proto-perso="...": personalities to build

  Available personalities: GIOP, SOAP

  e.g. --with-proto-perso="giop soap" to build both the GIOP and SOAP personalities

- --with-corba-services="...": CORBA COS services to build

  Available services: event, ir, naming, notification, time

  e.g. --with-corba-services="event naming" to build only COS Event and COS Naming.

  By default, only the CORBA and GIOP personalities are built, no CORBA Services are built.

- --with-openssl: build SSL support and SSL dependent features, including the IIOP/SSLIOP personality
- --help: list all options available
- --enable-shared: build shared libraries.
- --enable-debug: enable debugging information generation and supplementary runtime checks. Note that this option has a significant space and time cost, and is not recommended for production use.

#### 2.5.2 Compiler, Tools and Run-Time libraries Options

The following environment variables can be used to override configure's guess at what compilers to use:

- `CC`: the C compiler
- `ADA`: the Ada 95 compiler (e.g. gcc, gnatgcc or adagcc)
- `CXXCPP`, `CXXCPPFLAGS`: the preprocessor used by idlac (only when setting up the CORBA application personality). CORBA specifications require this preprocessor to be compatible with the preprocessing rules defined in the C++ programming language specifications.

For example, if you have two versions of GNAT installed and available in your `PATH`, and configure picks the wrong one, you can indicate what compiler should be used with the following syntax:

           % ADA=/path/to/good/compiler/gcc ./configure [options]

PolyORB will be compiled with GNAT build host's configuration, including run-time library. You may override this setting using `ADA_INCLUDE_PATH` and `ADA_OBJECTS_PATH` environment variables. See GNAT User's Guide for more details.

You can add specific build options to GNAT using the `EXTRA_GNATMAKE_FLAGS` variable:

           % EXTRA_GNATMAKE_FLAGS=--RTS=rts-sjlj ./configure [options]

You can also pass compiler-only flags using the `ADAFLAGS` variable.

NOTE: Developers building PolyORB from the version control repository who need to rebuild the configure and Makefile.in files should use the script support/reconfig for this purpose. This should be done after each update from the repository. In addition to the requirements above, they will need autoconf 2.57 or newer, automake 1.6.3 or newer, and libtool 1.5.8 or newer.