1 Making and Installing the OpenLDAP Distribution
4 ** It is recommended that you read or at least skim through ALL of the
5 ** instructions in this file before attempting to build the software.
7 ** The OpenLDAP Quick Start Guide is available at:
8 ** http://www.openldap.org/faq/index.cgi?file=172
10 ** The OpenLDAP Installation FAQ is available at:
11 ** http://www.openldap.org/faq/index.cgi?file=8
13 ** You should also check for platform specific hints located on
15 ** http://www.openldap.org/faq/index.cgi?file=9
18 If you want to build binaries for more than one platform from a single
19 source tree, skip ahead to the "Building LDAP For More Than One Platform"
20 section near the end of this file.
22 If you simply want to build LDAP for a single machine platform, follow
25 1. untar the distribution and cd to the top:
27 % tar xfz openldap-VERSION.tgz
30 replacing VERSION to match the version you downloaded. If you are
31 reading this file, you probably have already done this!
36 to list available configuration options. A description of
37 these options is provided in the 'CONFIGURE OPTIONS' section
40 The configure script uses environmental variables for
41 determining compiler/linker options. See the HINTS
42 section for commonly used settings.
44 These environment variables are used:
45 CC C Compiler (cc, ecgs)
46 CFLAGS C Flags (-ansi)
47 CPPFLAGS CPP Flags (-I/path/include -Ddef)
48 LDFLAGS LDFLAGS (-L/path/lib)
51 See the 'USING ENVIRONMENT VARIABLES' section for information
52 on how to use the variables.
54 3. Configure the build system
56 % [env settings] ./configure [options]
58 If all goes well, the configure script with auto-detect the
59 appropriate settings. Use configure enable/with options and/or
60 environment variables to obtain desired results.
70 If all goes well, the system will build as configured. If not,
71 return to step 4 after reviewing the configuration settings.
73 You may want to consult the doc/install/hints file for your
76 6. Test the standalone system
78 This step requires the standalone LDAP server (slapd) with
84 If all goes well, the system has been built as configured. If not,
85 return to step 4 after reviewing your configuration settings.
87 You may want to consult the doc/install/hints file for your
90 7. install the binaries and man pages. You may need to be superuser to
91 do this (depending on where you are installing things):
93 % su root -c make install
97 See the man pages for the individual applications for
98 information on configuring and using them. You may also want
99 to edit the configuration files used by the various clients.
100 These configuration files are located in the OpenLDAP
101 configuration directory (normally /usr/local/etc/openldap).
103 Client configuration files:
104 ldap.conf - client defaults
105 ldapfilter.conf - search filter configuration
106 ldapsearchprefs.conf - search object definitions
107 ldaptemplates.conf - display template definitions
109 Server configuration files:
110 ldapd.conf - LDAP - X.500 daemon
111 slapd.conf - Standalone LDAP daemon
113 There are section 5 man pages for all of these files.
116 Building LDAP For More Than One Platform
118 It is now possible to build LDAP for more than one platform from the same
119 source tree. This is accomplished by using make(1) VPATH support. If
120 your make(1) program is old and doesn't have VPATH support, install GNU
123 Follow these steps for each different platform:
125 1. Create a directory for the platform object files.
129 2. Change your working directory to the platform object directory.
133 3. Configure the build system
135 % [env settings] ../configure --src-dir=.. [options]
137 ( replace ".." with the appropriate path )
139 4. Continue as above (starting at step 6).
141 Note: make depend in VPATH environment is not yet supported.
146 Regrettably, this section has not been written (yet). See
147 "./configure --help" for current list of options. For general
148 information about how to use "configure", please read:
149 doc/install/configure
152 USING ENVIRONMENT VARIABLES
154 The configure script will also use your environmental
155 variables for determining compiler/linker options. This can
156 be used to manual specify features and compilation options.
158 WARNING: Executable built in your environment may not run
159 in your user's environments. The portability of
160 executables between environments is your responsibility.
162 Supported Environmental Variables
163 CC C compiler (cc, egcc)
164 CFLAGS C flags (-ansi)
165 CPPFLAGS cpp flags (-I/path/include -Ddef)
166 LDFLAGS ld flags (-L/usr/local/lib)
167 LIBS libraries (-llib)
168 PATH command path /usr/local/bin:/usr/bin:/bin
170 * Including alternative compilers
171 Use the CC environment variable to tell configure to
172 use a specific compiler. For example, to use GNU
173 C Compiler instead of the compiler configure choose,
176 [env] CC=gcc ./configure
178 You can also use CC use specific flags with the
179 specified compiler. For example, to require strict
180 ANSI C using the GNU C Compiler, use:
182 [env] CC="gcc -ansi -pedantic" ./configure
184 (you can use CFLAGS to specify compiler flags)
187 You may specify additional preprocessor flags by setting
188 CPPFLAGS. For example, if you would like to use headers
189 installed in /usr/local/include, use:
191 [env] CPPFLAGS="-I/usr/local/include" ./configure
193 You can also use CPPFLAGS to specify preprocessor macros.
195 [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
198 You may specify additional linker flags by setting LDFLAGS.
199 For example, if you would like to use libraries installed
200 in /usr/local/lib, use:
202 [env] LDFLAGS="-L/usr/local/lib" ./configure
204 You can also use CPPFLAGS to specify linker flags:
206 [env] LDFLAGS="-Bstatic" ./configure
209 You may alter your path to affect configure ability to
210 find (or not find) commands. For example, to have configure
211 additionally look in /usr/css/bin for commands, use:
213 [env] PATH="/usr/css/bin:$PATH" ./configure
218 * Platform specific hints are available in doc/install/hints.
220 * Use software under installed in /usr/local/{include,lib}
222 CPPFLAGS="-I/usr/local/include" \
223 LDFLAGS="-L/usr/local/lib" \
227 End of OpenLDAP INSTALL file.