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 If you are reading this file, you probably have already done this!
32 to list available configuration options. A description of
33 these options is provided in the 'CONFIGURE OPTIONS' section
36 The configure script uses environmental variables for
37 determining compiler/linker options. See the HINTS
38 section for commonly used settings.
40 These environment variables are used:
41 CC C Compiler (cc, ecgs)
42 CFLAGS C Flags (-ansi)
43 CPPFLAGS CPP Flags (-I/path/include -Ddef)
44 LDFLAGS LDFLAGS (-L/path/lib)
47 See the 'USING ENVIRONMENT VARIABLES' section for information
48 on how to use the variables.
50 3. edit the file include/ldapconfig.h.edit to configure
51 the software for your site (the files are well-commented):
53 % vi include/ldapconfig.h.edit
55 4. 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 7. 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 8. 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 ldap.conf - LDAP defaults
106 ldapfilter.conf - search filter configuration
107 ldapsearchprefs.conf - search object definitions
108 ldaptemplates.conf - display template definitions
110 There are section 5 man pages for all of these files.
112 9. edit client configuration files as needed.
113 See ldap.conf(5) for details.
115 10. edit server configuration files as needed.
116 See slapd.conf(5) if running slapd.
117 See ldapd.conf(5) if running ldapd.
120 Building LDAP For More Than One Platform
122 It is now possible to build LDAP for more than one platform from the same
123 source tree. This is accomplished by using make(1) VPATH support. If
124 your make(1) program is old and doesn't have VPATH support, install GNU
127 Follow these steps for each different platform:
129 1. Create a directory for the platform object files.
133 2. Change your working directory to the platform object directory.
137 3. Configure the build system
139 % [env settings] ../configure --src-dir=.. [options]
141 ( replace ".." with the appropriate path )
143 4. Continue as above (starting at step 6).
145 Note: make depend in VPATH environment is not yet supported.
150 Regrettably, this section has not been written (yet). See
151 "./configure --help" for current list of options. For general
152 information about how to use "configure", please read:
153 doc/install/configure
156 USING ENVIRONMENT VARIABLES
158 The configure script will also use your environmental
159 variables for determining compiler/linker options. This can
160 be used to manual specify features and compilation options.
162 NOTE: If you change environment setting, be sure to remove
163 any config.cache before running ./configure.
165 Supported Environmental Variables
166 CC C compiler (cc, egcc)
167 CFLAGS C flags (-ansi)
168 CPPFLAGS cpp flags (-I/path/include -Ddef)
169 LDFLAGS ld flags (-L/usr/local/lib)
170 LIBS libraries (-llib)
171 PATH command path /usr/local/bin:/usr/bin:/bin
173 * Including alternative compilers
174 Use the CC environment variable to tell configure to
175 use a specific compiler. For example, to use ecgs
176 instead of the compiler configure choose, use:
178 [env] CC=egcc ./configure
180 You can also use CC use specific flags with the
181 specified compiler. For example, to require strict
182 ANSI C using the GNU C Compiler, use:
184 [env] CC="gcc -ansi -pedantic" ./configure
186 (you can use CFLAGS to specify compiler flags)
189 You may specify additional preprocessor flags by setting
190 CPPFLAGS. For example, if you would like to use headers
191 installed in /usr/local/include, use:
193 [env] CPPFLAGS="-I/usr/local/include" ./configure
195 You can also use CPPFLAGS to specify preprocessor macros.
197 [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
200 You may specify additional linker flags by setting LDFLAGS.
201 For example, if you would like to use libraries installed
202 in /usr/local/lib, use:
204 [env] LDFLAGS="-L/usr/local/lib" ./configure
206 You can also use CPPFLAGS to specify linker flags:
208 [env] LDFLAGS="-Bstatic" ./configure
211 You may alter your path to affect configure ability to
212 find (or not find) commands. For example, to have configure
213 additionally look in /usr/css/bin for commands, use:
215 [env] PATH="/usr/css/bin:$PATH" ./configure
220 * Platform specific hints are available in doc/install/hints.
222 * Use software under installed in /usr/local/{include,lib}
224 CPPFLAGS="-I/usr/local/include" \
225 LDFLAGS="-L/usr/local/lib" \
229 End of OpenLDAP INSTALL file.