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 ** You should also check for platform specific hints.
8 ** These are located in doc/install/hints.
11 If you want to build binaries for more than one platform from a single
12 source tree, skip ahead to the "Building LDAP For More Than One Platform"
13 section near the end of this file.
15 If you simply want to build LDAP for a single machine platform, follow
18 1. untar the distribution and cd to the top:
20 % tar xfz openldap-VERSION.tgz
23 If you are reading this file, you probably have already done this!
28 to list available configuration options. A description of
29 these options is provided in the 'CONFIGURE OPTIONS' section
32 The configure script uses environmental variables for
33 determining compiler/linker options. See the HINTS
34 section for commonly used settings.
36 These environment variables are used:
37 CC C Compiler (cc, ecgs)
38 CFLAGS C Flags (-ansi)
39 CPPFLAGS CPP Flags (-I/path/include -Ddef)
40 LDFLAGS LDFLAGS (-L/path/lib -llib)
42 See the 'USING ENVIRONMENT VARIABLES' section for information
43 on how to use the variables.
45 3. edit the file include/ldapconfig.h.edit to configure
46 the software for your site (the files are well-commented):
48 % vi include/ldapconfig.h.edit
50 4. Configure the build system
52 % [env settings] ./configure [options]
54 If all goes well, the configure script with auto-detect the
55 appropriate settings. Use configure enable/with options and/or
56 environment variables to obtain desired results.
66 If all goes well, the system will build as configured. If not,
67 return to step 4 after reviewing the configuration settings.
69 You may want to consult the doc/install/hints file for your
72 7. Test the standalone system
74 This step requires the standalone LDAP server (slapd) with
80 If all goes well, the system has been built as configured. If not,
81 return to step 4 after reviewing your configuration settings.
83 You may want to consult the doc/install/hints file for your
86 8. install the binaries and man pages. You may need to be superuser to
87 do this (depending on where you are installing things):
94 See the man pages for the individual applications for
95 information on configuring and using them. You may also want
96 to edit the configuration files used by the various clients.
97 These configuration files are located in the OpenLDAP
98 configuration directory (normally /usr/local/etc/openldap).
100 ldap.conf - LDAP defaults
101 ldapfilter.conf - search filter configuration
102 ldapsearchprefs.conf - search object definitions
103 ldaptemplates.conf - display template definitions
105 There are section 5 man pages for all of these files.
108 Building LDAP For More Than One Platform
110 It is now possible to build LDAP for more than one platform from the same
111 source tree. This is accomplished by using make(1) VPATH support. If
112 your make(1) program is old and doesn't have VPATH support, install GNU
115 Follow these steps for each different platform:
117 1. Create a directory for the platform object files.
121 2. Change your working directory to the platform object directory.
125 3. Configure the build system
127 % [env settings] ../configure --src-dir=.. [options]
129 ( replace ".." with the appropriate path )
131 4. Continue as above (starting at step 6).
133 Note: make depend in VPATH environment is not yet supported.
138 Regrettably, this section has not been written (yet). See
139 "./configure --help" for current list of options.
142 USING ENVIRONMENT VARIABLES
144 The configure script will also use your environmental
145 variables for determining compiler/linker options. This can
146 be used to manual specify features and compilation options.
148 NOTE: If you change environment setting, be sure to remove
149 any config.cache before running ./configure.
151 Supported Environmental Variables
152 CC C compiler (cc, egcc)
153 CFLAGS C flags (-ansi)
154 CPPFLAGS cpp flags (-I/path/include -Ddef)
155 LDFLAGS ld flags (-s)
156 LIBS libraries (-L/usr/local/lib -llib)
157 PATH command path /usr/local/bin:/usr/bin:/bin
159 * Including alternative compilers
160 Use the CC environment variable to tell configure to
161 use a specific compiler. For example, to use ecgs
162 instead of the compiler configure choose, use:
164 [env] CC=egcc ./configure
166 You can also use CC use specific flags with the
167 specified compiler. For example, to require strict
168 ANSI C using the GNU C Compiler, use:
170 [env] CC="gcc -ansi -pedantic" ./configure
172 (you can use CFLAGS to specify compiler flags)
175 You may specify additional preprocessor flags by setting
176 CPPFLAGS. For example, if you would like to use headers
177 installed in /usr/local/include, use:
179 [env] CPPFLAGS="-I/usr/local/include" ./configure
181 You can also use CPPFLAGS to specify preprocessor macros.
183 [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
186 You may specify additional linker flags by setting LDFLAGS.
187 For example, if you would like to use libraries installed
188 in /usr/local/lib, use:
190 [env] LDFLAGS="-L/usr/local/lib" ./configure
192 You can also use CPPFLAGS to specify linker flags:
194 [env] LDFLAGS="-Bstatic" ./configure
197 You may alter your path to affect configure ability to
198 find (or not find) commands. For example, to have configure
199 additionally look in /usr/css/bin for commands, use:
201 [env] PATH="/usr/css/bin:$PATH" ./configure
206 * Platform specific hints are available in doc/install/hints.
208 * Use software under installed in /usr/local/{include,lib}
210 CPPFLAGS="-I/usr/local/include" \
211 LDFLAGS="-L/usr/local/lib" \
215 End of OpenLDAP INSTALL file.