===============================================
This file provides brief instructions on how to build and install
-OpenLDAP on UNIX (and UNIX-like) system. More detailed information
+OpenLDAP on UNIX (and UNIX-like) systems. More detailed information
and instructions can be found in The OpenLDAP Administrator's Guide
(available from http://www.openldap.org/doc/).
to list available configuration options.
- Note also that the configure script uses environmental variables
- for determining compiler/linker options including:
+ The configure script also looks for compiler/linker options on
+ the command line and in the environment. These include:
Variable Description Example
CC C compiler gcc
CFLAGS C flags -O -g
- CPPFLAGS cpp flags -I/path/include -DFOO=42
+ CPPFLAGS cpp flags -I/path/include -D__FOO__=42
LDFLAGS ld flags -L/usr/local/lib
LIBS libraries -llib
PATH command path /usr/local/bin:/usr/bin:/bin
3. Configure the build system:
- % [env settings] ./configure [options]
+ % ./configure [options] [var=value ...]
If all goes well, the configure script will automatically detect
the appropriate settings. If the configure script fails, you
should read the config.log file that it generated to see what it
- was trying to do and exactly what failed. You may need to specify
- additional options and/or environment variables besides those
- listed above to obtain desired results, depending on your operating
+ was trying to do and exactly what failed. You may need to
+ specify additional options and/or variables besides those listed
+ above to obtain desired results, depending on your operating
system. The Platform Hints section of the FAQ provides help for
operating system related problems.
6. Test the standalone system:
- This step requires the standalone LDAP server, slapd(8), with
- BDB or HDB support.
+ This step requires the standalone LDAP server, slapd(8), with HDB
+ and/or BDB support.
% make test
settings. You may want to consult the Installation section of
the FAQ if you have not done so already.
-7. Install the software. You may need to be come the super-user
+7. Install the software. You may need to become the super-user
(e.g. root) to do this (depending on where you are installing
things):
!endif
> ./configure --help
-The {{EX:configure}} script will also look at various environment variables
-for certain settings. These environment variables include:
+The {{EX:configure}} script also looks for certain variables
+on the command line and in the environment. These include:
-!block table; align=Center; coltags="EX,N"; title="Table 4.1: Environment Variables"
+!block table; align=Center; coltags="EX,N"; title="Table 4.1: Variables"
Variable Description
CC Specify alternative C Compiler
CFLAGS Specify additional compiler flags
!endblock
Now run the configure script with any desired configuration options or
-environment variables.
+variables.
-> [[env] settings] ./configure [options]
+> ./configure [options] [variable=value ...]
As an example, let's assume that we want to install OpenLDAP with
BDB backend and TCP Wrappers support. By default, BDB
installed in system directories. For example, if TCP Wrappers
headers and libraries are installed in {{F:/usr/local/include}}
and {{F:/usr/local/lib}} respectively, the {{EX:configure}}
-script should be called as follows:
+script should typically be called as follows:
-> env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" \
-> ./configure --enable-wrappers
-
-Note: Some shells, such as those derived from the Bourne {{sh}}(1),
-do not require use of the {{env}}(1) command. In some cases, environmental
-variables have to be specified using alternative syntaxes.
+> ./configure --enable-wrappers \
+> CPPFLAGS="-I/usr/local/include" \
+> LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"
The {{EX:configure}} script will normally auto-detect appropriate
settings. If you have problems at this stage, consult any platform
.to list available configuration options.
-.The {{EX:configure}} script uses environment variables for
-determining compiler/linker options including:
+.The {{EX:configure}} script also looks for compiler/linker options
+on the command line and in the environment. These include:
> Variable Description Example
> CC C compiler gcc
> LIBS libraries -llib
> PATH command path /usr/local/bin:/usr/bin:/bin
-+ Configure the build system
+!if $var{'OPT_TARGET'} eq 'txt'
+.See doc/install/configure for generic configure documentation.
+!endif
-E: % [env settings] ./configure [options]
++ Configure the build system:
+
+E: % ./configure [options] [var=value ...]
.If all goes well, the {{EX:configure}} script will automatically detect
the appropriate settings. If the {{EX:configure}} script fails, you should
read the {{FILE:config.log}} file that it generated to see what it was trying
to do and exactly what failed. You may need to specify additional
-options and/or environment variables besides those listed above to
+options and/or variables besides those listed above to
obtain desired results, depending on your operating system. The
{{Platform Hints}} section of the {{FAQ}} provides help for operating system
related problems.
-+ Build dependencies
++ Build dependencies:
E: % make depend
-+ Build the system
++ Build the system:
E: % make
may want to consult the {{Platform Hints}} subsection of the {{FAQ}}
if you have not done so already.
-+ Test the standalone system
++ Test the standalone system:
.This step requires the standalone LDAP server, {{slapd}}(8),
with {{HDB}} and/or {{BDB}} support.
E: % make test
.If all goes well, the system has been built as configured. If not,
-return to step 4 after reviewing your configuration settings. You
+return to step 2 after reviewing your configuration settings. You
may want to consult the {{Installation}} section of the {{FAQ}}
if you have not done so already.
-+ Install the binaries and man pages. You may need to become the
++ Install the software. You may need to become the
{{super-user}} (e.g. {{EX:root}}) to do this (depending on where you
are installing things):
E: % su root -c 'make install'
-+ That's it!
++ That's it. Enjoy!
See the {{OpenLDAP Administrator's Guide}} and the manual pages
for the individual applications for configuration and use information.