Xojo Conferences

DynaPDF Manual - Page 46

Previous Page 45   Index   Next Page 47

Compiling DynaPDF on Linux / UNIX
Page 46 of 770
supported Linux and UNIX operating systems as well as on Mac OS X. It creates the make files
from the input files makefile.in which are located in all library directories; these files can
normally be left unchanged. The top level makefile.in, which is stored in the subdirectory
/source too, can be modified if further installation scripts should be executed after the library
was successfully compiled. Note that the makefile.in files can be modified without rebuilding
the configure script.
However, if you want to change certain compiler settings, or the compiler itself, modify the file
configure.in and execute autoconf without parameters. Autoconf will then rebuild the configure
script with the new settings.
Linker flags
The used linker flags are designed to create a library with minimal dependencies so that
DynaPDF can be delivered without other OS specific libraries. Depending on the target OS the
linker flags can be changed so that OS specific libraries can be bind dynamically. This results in
a smaller library but with more dependencies. To change the linker flags, modify the variable
LD_LIBS in the file configure.in and rebuild the configure script with autoconf.
Compiler flags
When compiling DynaPDF on HP-UX the flag -fPIC (Position Independent Code) must be set at
the minimum to enable the usage as shared library.
Optimization Level
DynaPDF is compiled with optimization level 3. This level is a good compromise between
stable and fast code. The highest optimization level 4 causes a very long compilation time and it
is possible that the resulting code is less stabile. Test the library properly before using this
optimization level by default.
However, a release build should use the optimization level 3 or 4 because certain dependencies
to internal GCC specific libraries are only removed if the optimization level is higher than 2.
Recommended compiler version
Most DynaPDF versions for Linux and Unix are compiled with GCC 4.2 or higher. Due to
certain bugs in older versions of GCC make sure that DynaPDF can be compiled at the
minimum with GCC 3.0. Especially version 2.96 contains many bugs. If you use a precompiled
library of DynaPDF, please note that DynaPDF is not binary compatible to GCC 2.96 or earlier.
The GCC compiler should be configured with POSIX compatible thread handling if possible,
although the library does not depend on it.

Previous topic: Compiling DynaPDF on Linux / UNIX, System requirements:, Build process, Changing the configuration scripts

Next topic: Compiling DynaPDF on Mac OS X