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 Installation FAQ is available at:
8 ** http://www.openldap.org/faq/index.cgi?file=8
10 ** You should also check for platform specific hints.
11 ** These are located in doc/install/hints or:
12 ** http://www.openldap.org/faq/index.cgi?file=9
15 If you want to build binaries for more than one platform from a single
16 source tree, skip ahead to the "Building LDAP For More Than One Platform"
17 section near the end of this file.
19 If you simply want to build LDAP for a single machine platform, follow
22 1. untar the distribution and cd to the top:
24 % tar xfz openldap-VERSION.tgz
27 replacing VERSION to match the version you downloaded. If you are
28 reading this file, you probably have already done this!
33 to list available configuration options. A description of
34 these options is provided in the 'CONFIGURE OPTIONS' section
37 The configure script uses environmental variables for
38 determining compiler/linker options. See the HINTS
39 section for commonly used settings.
41 These environment variables are used:
42 CC C Compiler (cc, ecgs)
43 CFLAGS C Flags (-ansi)
44 CPPFLAGS CPP Flags (-I/path/include -Ddef)
45 LDFLAGS LDFLAGS (-L/path/lib)
48 See the 'USING ENVIRONMENT VARIABLES' section for information
49 on how to use the variables.
51 3. Configure the build system
53 % [env settings] ./configure [options]
55 If all goes well, the configure script with auto-detect the
56 appropriate settings. Use configure enable/with options and/or
57 environment variables to obtain desired results.
67 If all goes well, the system will build as configured. If not,
68 return to step 4 after reviewing the configuration settings.
70 You may want to consult the doc/install/hints file for your
73 6. Test the standalone system
75 This step requires the standalone LDAP server (slapd) with
81 If all goes well, the system has been built as configured. If not,
82 return to step 4 after reviewing your configuration settings.
84 You may want to consult the doc/install/hints file for your
87 7. install the binaries and man pages. You may need to be superuser to
88 do this (depending on where you are installing things):
95 See the man pages for the individual applications for
96 information on configuring and using them. You may also want
97 to edit the configuration files used by the various clients.
98 These configuration files are located in the OpenLDAP
99 configuration directory (normally /usr/local/etc/openldap).
101 Client configuration files:
102 ldap.conf - client defaults
103 ldapfilter.conf - search filter configuration
104 ldapsearchprefs.conf - search object definitions
105 ldaptemplates.conf - display template definitions
107 Server configuration files:
108 ldapd.conf - LDAP - X.500 daemon
109 slapd.conf - Standalone LDAP daemon
111 There are section 5 man pages for all of these files.
114 Building LDAP For More Than One Platform
116 It is now possible to build LDAP for more than one platform from the same
117 source tree. This is accomplished by using make(1) VPATH support. If
118 your make(1) program is old and doesn't have VPATH support, install GNU
121 Follow these steps for each different platform:
123 1. Create a directory for the platform object files.
127 2. Change your working directory to the platform object directory.
131 3. Configure the build system
133 % [env settings] ../configure --src-dir=.. [options]
135 ( replace ".." with the appropriate path )
137 4. Continue as above (starting at step 6).
139 Note: make depend in VPATH environment is not yet supported.
144 Regrettably, this section has not been written (yet). See
145 "./configure --help" for current list of options. For general
146 information about how to use "configure", please read:
147 doc/install/configure
150 USING ENVIRONMENT VARIABLES
152 The configure script will also use your environmental
153 variables for determining compiler/linker options. This can
154 be used to manual specify features and compilation options.
156 NOTE: If you change environment setting, be sure to remove
157 any config.cache before running ./configure.
159 Supported Environmental Variables
160 CC C compiler (cc, egcc)
161 CFLAGS C flags (-ansi)
162 CPPFLAGS cpp flags (-I/path/include -Ddef)
163 LDFLAGS ld flags (-L/usr/local/lib)
164 LIBS libraries (-llib)
165 PATH command path /usr/local/bin:/usr/bin:/bin
167 * Including alternative compilers
168 Use the CC environment variable to tell configure to
169 use a specific compiler. For example, to use GNU
170 C Compiler instead of the compiler configure choose,
173 [env] CC=gcc ./configure
175 You can also use CC use specific flags with the
176 specified compiler. For example, to require strict
177 ANSI C using the GNU C Compiler, use:
179 [env] CC="gcc -ansi -pedantic" ./configure
181 (you can use CFLAGS to specify compiler flags)
184 You may specify additional preprocessor flags by setting
185 CPPFLAGS. For example, if you would like to use headers
186 installed in /usr/local/include, use:
188 [env] CPPFLAGS="-I/usr/local/include" ./configure
190 You can also use CPPFLAGS to specify preprocessor macros.
192 [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
195 You may specify additional linker flags by setting LDFLAGS.
196 For example, if you would like to use libraries installed
197 in /usr/local/lib, use:
199 [env] LDFLAGS="-L/usr/local/lib" ./configure
201 You can also use CPPFLAGS to specify linker flags:
203 [env] LDFLAGS="-Bstatic" ./configure
206 You may alter your path to affect configure ability to
207 find (or not find) commands. For example, to have configure
208 additionally look in /usr/css/bin for commands, use:
210 [env] PATH="/usr/css/bin:$PATH" ./configure
215 * Platform specific hints are available in doc/install/hints.
217 * Use software under installed in /usr/local/{include,lib}
219 CPPFLAGS="-I/usr/local/include" \
220 LDFLAGS="-L/usr/local/lib" \
224 End of OpenLDAP INSTALL file.