DynaPDF Manual - Page 49
Previous Page 48 Index Next Page 50
Compiling DynaPDF on Linux / UNIX
Page 49 of 839
Changing the configuration scripts
DynaPDF uses the freely available tool autoconf to create the main configuration script
configure. Autoconf requires the file configure.in as input file which is located in the
subdirectory /source. The final configure script can be executed without changes on all
supported Linux and UNIX operating systems as well as on macOS. 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.
If you want to change certain compiler settings, or the compiler itself, modify the file
configure.in and execute autoconf without parameters. Autoconf will 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. The library can
also be build LSB 3.0 compatible on Linux.
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
All Linux and Unix versions can be compiled with GCC 4.2. Older versions are not tested and
maybe don't work. The GCC compiler should be configured with enabled 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
Next topic: Compiling DynaPDF on macOS, Compiling with XCode, Compiling on the Command Line