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.
113 Building LDAP For More Than One Platform
115 It is now possible to build LDAP for more than one platform from the same
116 source tree. This is accomplished by using make(1) VPATH support. If
117 your make(1) program is old and doesn't have VPATH support, install GNU
120 Follow these steps for each different platform:
122 1. Create a directory for the platform object files.
126 2. Change your working directory to the platform object directory.
130 3. Configure the build system
132 % [env settings] ../configure --src-dir=.. [options]
134 ( replace ".." with the appropriate path )
136 4. Continue as above (starting at step 6).
138 Note: make depend in VPATH environment is not yet supported.
143 Regrettably, this section has not been written (yet). See
144 "./configure --help" for current list of options. For general
145 information about how to use "configure", please read:
146 doc/install/configure
149 USING ENVIRONMENT VARIABLES
151 The configure script will also use your environmental
152 variables for determining compiler/linker options. This can
153 be used to manual specify features and compilation options.
155 NOTE: If you change environment setting, be sure to remove
156 any config.cache before running ./configure.
158 Supported Environmental Variables
159 CC C compiler (cc, egcc)
160 CFLAGS C flags (-ansi)
161 CPPFLAGS cpp flags (-I/path/include -Ddef)
162 LDFLAGS ld flags (-L/usr/local/lib)
163 LIBS libraries (-llib)
164 PATH command path /usr/local/bin:/usr/bin:/bin
166 * Including alternative compilers
167 Use the CC environment variable to tell configure to
168 use a specific compiler. For example, to use ecgs
169 instead of the compiler configure choose, use:
171 [env] CC=egcc ./configure
173 You can also use CC use specific flags with the
174 specified compiler. For example, to require strict
175 ANSI C using the GNU C Compiler, use:
177 [env] CC="gcc -ansi -pedantic" ./configure
179 (you can use CFLAGS to specify compiler flags)
182 You may specify additional preprocessor flags by setting
183 CPPFLAGS. For example, if you would like to use headers
184 installed in /usr/local/include, use:
186 [env] CPPFLAGS="-I/usr/local/include" ./configure
188 You can also use CPPFLAGS to specify preprocessor macros.
190 [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
193 You may specify additional linker flags by setting LDFLAGS.
194 For example, if you would like to use libraries installed
195 in /usr/local/lib, use:
197 [env] LDFLAGS="-L/usr/local/lib" ./configure
199 You can also use CPPFLAGS to specify linker flags:
201 [env] LDFLAGS="-Bstatic" ./configure
204 You may alter your path to affect configure ability to
205 find (or not find) commands. For example, to have configure
206 additionally look in /usr/css/bin for commands, use:
208 [env] PATH="/usr/css/bin:$PATH" ./configure
213 * Platform specific hints are available in doc/install/hints.
215 * Use software under installed in /usr/local/{include,lib}
217 CPPFLAGS="-I/usr/local/include" \
218 LDFLAGS="-L/usr/local/lib" \
222 End of OpenLDAP INSTALL file.