2 # Copyright 1999-2000, The OpenLDAP Foundation, All Rights Reserved.
3 # COPYING RESTRICTIONS APPLY, see COPYRIGHT.
5 P1: Making and Installing the OpenLDAP Distribution
7 It is recommended that you read or at least skim through ALL of the
8 instructions in this file before attempting to build the software.
10 The OpenLDAP Installation FAQ is available at:
12 .{{URL:http://www.openldap.org/faq/index.cgi?file=8}}
14 You should also check for platform specific hints.
15 These are located in doc/install/hints or:
17 .{{URL:http://www.openldap.org/faq/index.cgi?file=9}}
20 P2: Making and Installing the OpenLDAP Distribution
22 ^ untar the distribution and cd to the top:
24 E: % tar xfz openldap-VERSION.tgz
25 E: % cd openldap-VERSION
27 .If you are reading this file, you probably have already done this!
32 E: % ./configure --help
34 .to list available configuration options. A description of
35 these options is provided in the 'CONFIGURE OPTIONS' section
38 .The configure script uses environmental variables for
39 determining compiler/linker options. See the HINTS
40 section for commonly used settings.
42 .These environment variables are used:
45 > CFLAGS C flags -ansi
46 > CPPFLAGS cpp flags -I/path/include -Ddef
47 > LDFLAGS ld flags -L/usr/local/lib
48 > LIBS libraries -llib
49 > PATH command path /usr/local/bin:/usr/bin:/bin
51 .See the 'USING ENVIRONMENT VARIABLES' section for information
52 on how to use the variables.
54 + Configure the build system
56 E: % [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.
62 + Review the file include/ldapconfig.h.edit.
64 .You generally do not need to modify this file.
66 E: % view include/ldapconfig.h.edit
76 .If all goes well, the system will build as configured. If not,
77 return to step 4 after reviewing the configuration settings.
79 .You may want to consult the doc/install/hints file for your
82 + Test the standalone system
84 .This step requires the standalone LDAP server (slapd) with
91 .If all goes well, the system has been built as configured. If not,
92 return to step 4 after reviewing your configuration settings.
94 .You may want to consult the doc/install/hints file for your
97 + install the binaries and man pages. You may need to be superuser to
98 do this (depending on where you are installing things):
100 E: % su root -c make install
104 .See the man pages for the individual applications for
105 information on configuring and using them. You may also want
106 to edit the configuration files used by the various components.
107 These configuration files are located in the OpenLDAP
108 configuration directory (normally /usr/local/etc/openldap).
110 > ldap.conf client defaults
111 > ldapfilter.conf search filter configuration
112 > ldapsearchprefs.conf search object definitions
113 > ldaptemplates.conf display template definitions
114 > slapd.conf Standalone LDAP daemon
116 .There are section 5 man pages for all of these files.
119 P2: Building OpenLDAP For More Than One Platform
121 .You can build OpenLDAP for more than one platform from the
123 This is accomplished by using make(1) VPATH support.
124 If your make(1) program is old and doesn't have VPATH support,
127 .Follow these steps for each different platform:
129 ^ Create a directory for the platform object files.
131 E: % mkdir obj-platform
133 + Change your working directory to the platform object directory.
137 + Configure the build system
139 E: % [env settings] ../configure --src-dir=.. [options]
141 ( replace ".." with the appropriate path )
143 + Continue as above (starting at step 6).
145 Note: make depend in VPATH environment is not yet supported.
148 P2: CONFIGURE OPTIONS
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 P2: 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:
168 > CFLAGS C flags -ansi
169 > CPPFLAGS cpp flags -I/path/include -Ddef
170 > LDFLAGS ld flags -L/usr/local/lib
171 > LIBS libraries -llib
172 > PATH command path /usr/local/bin:/usr/bin:/bin
174 * Including alternative compilers
176 .Use the CC environment variable to tell configure to
177 use a specific compiler. For example, to use ecgs
178 instead of the compiler configure choose, use:
180 E: % [env] CC=egcc ./configure
182 .You can also use CC use specific flags with the
183 specified compiler. For example, to require strict
184 ANSI C using the GNU C Compiler, use:
186 E: % [env] CC="gcc -ansi -pedantic" ./configure
188 .(you can use CFLAGS to specify compiler flags)
192 .You may specify additional preprocessor flags by setting
193 CPPFLAGS. For example, if you would like to use headers
194 installed in /usr/local/include, use:
196 E: % [env] CPPFLAGS="-I/usr/local/include" ./configure
198 .You can also use CPPFLAGS to specify preprocessor macros.
200 E: % [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
204 .You may specify additional linker flags by setting LDFLAGS.
205 For example, if you would like to use libraries installed
206 in /usr/local/lib, use:
208 E: % [env] LDFLAGS="-L/usr/local/lib" ./configure
210 .You can also use CPPFLAGS to specify linker flags:
212 E: % [env] LDFLAGS="-Bstatic" ./configure
216 .You may alter your path to affect configure ability to
217 find (or not find) commands. For example, to have configure
218 additionally look in /usr/css/bin for commands, use:
220 E: % [env] PATH="/usr/css/bin:$PATH" ./configure
226 E: CPPFLAGS="-I/usr/local/include" \
227 E: LDFLAGS="-L/usr/local/lib" \
231 End of OpenLDAP INSTALL file.