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 ** A Quick Start Guide, which may be used in conjunction with this
8 ** document, is available at:
9 ** http://www.openldap.org/faq/index.cgi?file=172
11 ** The OpenLDAP Installation FAQ is available at:
12 ** http://www.openldap.org/faq/index.cgi?file=8
14 ** You should also check for platform specific hints located on
16 ** http://www.openldap.org/faq/index.cgi?file=9
19 If you want to build binaries for more than one platform from a single
20 source tree, skip ahead to the "Building LDAP For More Than One Platform"
21 section near the end of this file.
23 If you simply want to build LDAP for a single machine platform, follow
26 1. untar the distribution and cd to the top:
28 % tar xfz openldap-VERSION.tgz
31 replacing VERSION to match the version you downloaded. If you are
32 reading this file, you probably have already done this!
37 to list available configuration options. A description of
38 these options is provided in the 'CONFIGURE OPTIONS' section
41 The configure script uses environmental variables for
42 determining compiler/linker options. See the HINTS
43 section for commonly used settings.
45 These environment variables are used:
46 CC C Compiler (cc, ecgs)
47 CFLAGS C Flags (-ansi)
48 CPPFLAGS CPP Flags (-I/path/include -Ddef)
49 LDFLAGS LDFLAGS (-L/path/lib)
52 See the 'USING ENVIRONMENT VARIABLES' section for information
53 on how to use the variables.
55 3. Configure the build system
57 % [env settings] ./configure [options]
59 If all goes well, the configure script with auto-detect the
60 appropriate settings. Use configure enable/with options and/or
61 environment variables to obtain desired results.
71 If all goes well, the system will build as configured. If not,
72 return to step 4 after reviewing the configuration settings.
74 You may want to consult the doc/install/hints file for your
77 6. Test the standalone system
79 This step requires the standalone LDAP server (slapd) with
85 If all goes well, the system has been built as configured. If not,
86 return to step 4 after reviewing your configuration settings.
88 You may want to consult the doc/install/hints file for your
91 7. install the binaries and man pages. You may need to be superuser to
92 do this (depending on where you are installing things):
99 See the man pages for the individual applications for
100 information on configuring and using them. You may also want
101 to edit the configuration files used by the various clients.
102 These configuration files are located in the OpenLDAP
103 configuration directory (normally /usr/local/etc/openldap).
105 Client configuration files:
106 ldap.conf - client defaults
107 ldapfilter.conf - search filter configuration
108 ldapsearchprefs.conf - search object definitions
109 ldaptemplates.conf - display template definitions
111 Server configuration files:
112 ldapd.conf - LDAP - X.500 daemon
113 slapd.conf - Standalone LDAP daemon
115 There are section 5 man pages for all of these files.
118 Building LDAP For More Than One Platform
120 It is now possible to build LDAP for more than one platform from the same
121 source tree. This is accomplished by using make(1) VPATH support. If
122 your make(1) program is old and doesn't have VPATH support, install GNU
125 Follow these steps for each different platform:
127 1. Create a directory for the platform object files.
131 2. Change your working directory to the platform object directory.
135 3. Configure the build system
137 % [env settings] ../configure --src-dir=.. [options]
139 ( replace ".." with the appropriate path )
141 4. Continue as above (starting at step 6).
143 Note: make depend in VPATH environment is not yet supported.
148 Regrettably, this section has not been written (yet). See
149 "./configure --help" for current list of options. For general
150 information about how to use "configure", please read:
151 doc/install/configure
154 USING ENVIRONMENT VARIABLES
156 The configure script will also use your environmental
157 variables for determining compiler/linker options. This can
158 be used to manual specify features and compilation options.
160 NOTE: If you change environment setting, be sure to remove
161 any config.cache before running ./configure.
163 Supported Environmental Variables
164 CC C compiler (cc, egcc)
165 CFLAGS C flags (-ansi)
166 CPPFLAGS cpp flags (-I/path/include -Ddef)
167 LDFLAGS ld flags (-L/usr/local/lib)
168 LIBS libraries (-llib)
169 PATH command path /usr/local/bin:/usr/bin:/bin
171 * Including alternative compilers
172 Use the CC environment variable to tell configure to
173 use a specific compiler. For example, to use GNU
174 C Compiler instead of the compiler configure choose,
177 [env] CC=gcc ./configure
179 You can also use CC use specific flags with the
180 specified compiler. For example, to require strict
181 ANSI C using the GNU C Compiler, use:
183 [env] CC="gcc -ansi -pedantic" ./configure
185 (you can use CFLAGS to specify compiler flags)
188 You may specify additional preprocessor flags by setting
189 CPPFLAGS. For example, if you would like to use headers
190 installed in /usr/local/include, use:
192 [env] CPPFLAGS="-I/usr/local/include" ./configure
194 You can also use CPPFLAGS to specify preprocessor macros.
196 [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
199 You may specify additional linker flags by setting LDFLAGS.
200 For example, if you would like to use libraries installed
201 in /usr/local/lib, use:
203 [env] LDFLAGS="-L/usr/local/lib" ./configure
205 You can also use CPPFLAGS to specify linker flags:
207 [env] LDFLAGS="-Bstatic" ./configure
210 You may alter your path to affect configure ability to
211 find (or not find) commands. For example, to have configure
212 additionally look in /usr/css/bin for commands, use:
214 [env] PATH="/usr/css/bin:$PATH" ./configure
219 * Platform specific hints are available in doc/install/hints.
221 * Use software under installed in /usr/local/{include,lib}
223 CPPFLAGS="-I/usr/local/include" \
224 LDFLAGS="-L/usr/local/lib" \
228 End of OpenLDAP INSTALL file.