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 Quick Start Guide is available at:
8 ** http://www.openldap.org/faq/index.cgi?file=172
10 ** The OpenLDAP Installation FAQ is available at:
11 ** http://www.openldap.org/faq/index.cgi?file=8
13 ** You should also check for platform specific hints located on
15 ** http://www.openldap.org/faq/index.cgi?file=9
18 If you want to build binaries for more than one platform from a single
19 source tree, skip ahead to the "Building LDAP For More Than One Platform"
20 section near the end of this file.
22 If you simply want to build LDAP for a single machine platform, follow
25 1. untar the distribution and cd to the top:
27 % tar xfz openldap-VERSION.tgz
30 replacing VERSION to match the version you downloaded. If you are
31 reading this file, you probably have already done this!
36 to list available configuration options. A description of
37 these options is provided in the 'CONFIGURE OPTIONS' section
40 The configure script uses environmental variables for
41 determining compiler/linker options. See the HINTS
42 section for commonly used settings.
44 These environment variables are used:
45 CC C Compiler (cc, ecgs)
46 CFLAGS C Flags (-O -g)
47 CPPFLAGS CPP Flags (-I/path/include -Ddef)
48 LDFLAGS LDFLAGS (-L/path/lib)
51 See the 'USING ENVIRONMENT VARIABLES' section for information
52 on how to use the variables.
54 3. Configure the build system
56 % [env settings] ./configure [options]
58 If all goes well, the configure script with auto-detect the
59 appropriate settings. Use configure enable/with options and/or
60 environment variables to obtain desired results.
70 If all goes well, the system will build as configured. If not,
71 return to step 4 after reviewing the configuration settings.
73 You may want to consult the doc/install/hints file for your
76 6. Test the standalone system
78 This step requires the standalone LDAP server (slapd) with
84 If all goes well, the system has been built as configured. If not,
85 return to step 4 after reviewing your configuration settings.
87 You may want to consult the doc/install/hints file for your
90 7. install the binaries and man pages. You may need to be superuser to
91 do this (depending on where you are installing things):
93 % su root -c 'make install'
97 See the man pages for the individual applications for
98 information on configuring and using them. You may also want
99 to edit the configuration files used by the various clients.
100 These configuration files are located in the OpenLDAP
101 configuration directory (normally /usr/local/etc/openldap).
103 Client configuration files:
104 ldap.conf - client defaults
105 ldapfilter.conf - search filter configuration
106 ldapsearchprefs.conf - search object definitions
107 ldaptemplates.conf - display template definitions
109 Server configuration files:
110 slapd.conf - Standalone LDAP daemon configuration
111 schema/*.schema - Schema Definitions
113 There are section 5 man pages for these configuration files.
116 Building LDAP For More Than One Platform
118 It is now possible to build LDAP for more than one platform from the same
119 source tree. This is accomplished by using make(1) VPATH support. If
120 your make(1) program is old and doesn't have VPATH support, install GNU
123 Follow these steps for each different platform:
125 1. Create a directory for the platform object files.
129 2. Change your working directory to the platform object directory.
133 3. Configure the build system
135 % [env settings] ../configure --src-dir=.. [options]
137 ( replace ".." with the appropriate path )
139 4. Continue as above (starting at step 6).
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 environmental variables for
153 determining compiler/linker options. This can be used to manually
154 specify features and compilation options.
156 WARNING: Executables built in your environment may not run
157 in your users' environments. The portability of
158 executables between environments is your responsibility.
160 Supported Environmental Variables
161 CC C compiler (cc, egcc)
162 CFLAGS C flags (-O -g)
163 CPPFLAGS cpp flags (-I/path/include -Ddef)
164 LDFLAGS ld flags (-L/usr/local/lib)
165 LIBS libraries (-llib)
166 PATH command path /usr/local/bin:/usr/bin:/bin
168 * Including alternative compilers
169 Use the CC environment variable to tell configure to
170 use a specific compiler. For example, to use GNU
171 C Compiler instead of the compiler configure choose,
174 [env] CC=gcc ./configure
176 You can also use CC use specific flags with the
177 specified compiler. For example, to require strict
178 ANSI C using the GNU C Compiler, use:
180 [env] CC="gcc -ansi -pedantic" ./configure
182 (you can use CFLAGS to specify compiler flags)
185 You may specify additional preprocessor flags by setting
186 CPPFLAGS. For example, if you would like to use headers
187 installed in /usr/local/include, use:
189 [env] CPPFLAGS="-I/usr/local/include" ./configure
191 You can also use CPPFLAGS to specify preprocessor macros.
193 [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
196 You may specify additional linker flags by setting LDFLAGS.
197 For example, if you would like to use libraries installed
198 in /usr/local/lib, use:
200 [env] LDFLAGS="-L/usr/local/lib" ./configure
202 You can also use CPPFLAGS to specify linker flags:
204 [env] LDFLAGS="-Bstatic" ./configure
207 You may alter your path to affect configure ability to
208 find (or not find) commands. For example, to have configure
209 additionally look in /usr/css/bin for commands, use:
211 [env] PATH="/usr/css/bin:$PATH" ./configure
216 * Platform specific hints are available in doc/install/hints.
218 * Use software under installed in /usr/local/{include,lib}
220 CPPFLAGS="-I/usr/local/include" \
221 LDFLAGS="-L/usr/local/lib" \