
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(8), ipastat(8) and ipactl(8) separately in {IPA,IPACTL,IPASTAT}_
{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 utilities are single-threaded, but some IPA modules
can be multi-threaded.  To build ipa(8) and/or ipastat(8) thread-safe,
you need to specify following options:

  --with-ipa-pthread      enable support for multi-threaded modules in ipa
  --with-ipastat-pthread  enable support for multi-threaded modules in ipastat

And set appropriate environment variables CFLAGS, LDFLAGS and LIBS for
ipa(8) and/or ipastat(8) separately (see above).  Note that the configure
script automatically does nothing to build IPA utilities with pthread
support.

   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 or NetBSD
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 speed of its utilities, 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 their
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.

   For ipa(8) and ipastat(8) it is necessary to find structures in
a 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 (foobar_db_mod) and ipastat(8) tries to
find structure with the name foobar_st_mod.  On some systems these
names are really _foobar_ac_mod (_foobar_db_mod) and _foobar_st_mod.
If you use GCC for compilation, then needed prefix should be found
automatically.  If you use another compiler and ipa(8) or ipastat(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:

% ./configure [options]
% make

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

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

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

% ./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 different Linux systems there were no problems with building IPA
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 following commands to build IPA with
TenDRA compiler:

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

On Solaris 10 on x86 platform I use following commands to build IPA
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 following commands
to build IPA with GCC (set CC to gcc) or with aCC compiler:

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

IPA also can be built and used on Cygwin (no options for the configure
script are required).

On FreeBSD 7.2 I built IPA without any additional options with clang/LLVM.
