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

   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 utilities are single-threaded, but some IPA modules
can be multi-threaded.  To build IPA utilities thread-safe, you need
to specify following option:

  --with-pthread          enable support for multi-threaded modules (read INSTALL)

And set environment variables CC, CFLAGS, LDFLAGS, CPPFLAGS and CPP
for the configure script to build IPA utilities with pthread support.
Note that the configure script automatically does nothing to build IPA
utilities with pthread support.  Since only ipa(8) and ipastat(8) work
with modules, it will be better to build them separately with or without
pthread support and then build ipactl(8), which does not work with
modules, so it should not be thread-safe.

   Receiving sender's credentials via Unix domain socket is a non standard
feature of the system, so by default sending and receiving credentials via
Unix domain socket is disabled, to enable this feature on FreeBSD use the
following option:

  --enable-ctl-creds      enable checking ipactl's commands credentials

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

  --disable-autorules     remove dynamic rules support
  --disable-rules         remove static rules support
  --disable-limits        remove limits support (including sublimits)
  --disable-sublimits     remove sublimits support
  --disable-thresholds    remove thresholds support

   To enable ipa_memfunc functions debugging use the following option
(note that this option will decrease speed of functions from ipa_memfunc
and also on some systems will increase resident size of ipa(8) and
ipastat(8) programs):

  --enable-memfunc-debug  enable debugging of ipa_memfunc functions

   By default IPA utilities use dlopen(3) interface to plug in its
modules, if dlopen(3) does not work, then the configure script tries
to check lt_dlopen() from libtool.  If you prefer to use libtool's
ltdl interface by default, then use the following option (you have
to install ltdl library before):

  --with-libltdl          use libtool's ltdl interface

On some systems ltdl library is placed in the directory in which
compiler does not search libraries by default, so on such systems
it is necessary to set at least CPPFLAGS="-Ipath_to_ltdl_h" and
LDFLAGS="-Lpath_to_ltdl_dir" environment variables for the configure
script.  Since only ipa(8) and ipastat(8) plug in modules, it will
be better to build them separately and then build ipactl(8), which
does not work with modules, so it does not use dlopen(3) or like
interfaces.

   For ipa(8) and ipastat(8) it is necessary to find structures
in loaded module, which represent API for a module.  If the file name
of a module is foobar-x.y.z.so, then ipa(8) tries to find structure
with the name foobar_ac_mod and ipastat(8) tries to find structure
with the name foobar_db_mod.  On some systems these names are really
_foobar_ac_mod and _foobar_db_mod.  If you use GCC for compilation,
then needed prefix should be found automatically.  If you use another
compiler and ipa(8) cannot begin to work with some IPA module, then
you need to find out needed prefix for symbols in shared libraries
for your system and specify it in CPPFLAGS="-DSYM_PREFIX=\\\"prefix\\\""
environment variable for the configure script.

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

% ./configure --help

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

To build IPA utilities run under any user account:

% [env ...] ./configure [options]
% make

If you want to build IPA utilities separately, then run:

% [env ...] ./configure [options_for_ipa]
% cd src
% make pathnames.h
% make ipa
% cd ..

% [env ...] ./configure [options_for_ipactl]
% cd src
% make pathnames.h
% make ipactl
% cd ..

% [env ...] ./configure [options_for_ipastat]
% cd src
% make pathnames.h
% make ipastat

Run under the 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 FreeBSD 6.2 I use following commands to build IPA with TenDRA
compiler:

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

On Solaris 10 on x86 platform I use following command to build IPA
with GNU gmake and GCC:

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