
Options for configure script
============================

   The configure script has environment variables CFLAGS, CPPFLAGS,
LDFLAGS and LIBS.  But it is recommended to specify these variables
for ipa_db_sdb(8), ipa_st_sdb(8) and ipa_sdb_dump(8) separately in
SDB_{DB,DUMP,ST}_{CFLAGS,CPPFLAGS,LDFLAGS,LIBS} environment variables.

   By default the configure script turns on many warning checks for
GCC compiler, but if incorrect -W flag is used, then GCC can refuse
to compile source files, to disable -W flags for GCC use the following
option:

  --disable-gcc-warns      do not use -W flags for GCC compiler

   To turn on additional warning checks for GCC compiler use the
following option:

  --enable-gcc-more-warns  add extra -W flags for GCC compiler

   By default IPA_SDB modules are single-threaded.  To build thread-safe
IPA_SDB modules you need to specify the following options:

  --with-db-pthread       build thread-safe ipa_db_sdb module
  --with-st-pthread       build thread-safe ipa_st_sdb module

and set environment variables SDB_{DB,ST}_{CFLAGS,CPPFLAGS,LDFLAGS,LIBS}
for the configure script.  Note that the configure script automatically
does nothing to build thread-safe modules.

   It is possible to remove not needed parts from IPA_SDB, so reducing
its size and increasing its speed, note, that you cannot disable both
dynamic and static rules at the same time:

  --disable-autorules     remove dynamic rules support
  --disable-rules         remove static rules support
  --disable-limits        remove limits support
  --disable-thresholds    remove thresholds support

   To get the complete list of available configure script options run:

% ./configure --help

Building and installing
=======================

Run under any user account:

% ./configure [options]
% make all

Run under user account, who is allowed to write to the directories
specified in the configure script's --prefix and relevant options:

% make install

Building on different systems
=============================

On FreeBSD, NetBSD, OpenBSD and different Linux distributions everything
is expected to be built without any additional options with BSD make or
GNU gmake and GCC.

On different Linux systems there were no problems with building IPA_SDB
using Intel C Compiler (icc 9.1, need to remove -W flags, it is unclear
why the configure script sets GCC variable for this compiler):

% ./configure CC=icc --disable-gcc-warns
% make

On FreeBSD/i386 6.2 I use the following commands to build IPA_SDB
with TenDRA compiler:

% ./configure CC=tcc CFLAGS="-Yc99 -Ysystem -D__LONG_LONG_SUPPORTED"
% make

On Solaris 10 on x86 platform I use the following commands to build
IPA_SDB with GNU gmake and GCC:

% ./configure GREP=ggrep MAKE=gmake CC=gcc CFLAGS="-std=c99" \
              CPPFLAGS="-D__EXTENSIONS__ -D_XOPEN_SOURCE=600"
% gmake

On HP-UX 11i 11.11 on PA-RISC platform I use the following commands
to build IPA_SDB with GCC (set CC to gcc) or with aCC compiler:

% ./configure CC=aCC CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
% make

On Cygwin I use the following commands to build IPA_SDB:

% ./configure SDB_DB_LDFLAGS=-no-undefined SDB_ST_LDFLAGS=-no-undefined
% make

On FreeBSD 8.1 I use the following commands to build this module with
clang/LLVM:

% ./configure CC=clang
% make
