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.
16 .{{URL:http://www.openldap.org/faq/index.cgi?file=9}}
19 P2: Making and Installing the OpenLDAP Distribution
21 ^ untar the distribution and cd to the top:
23 E: % tar xfz openldap-VERSION.tgz
24 E: % cd openldap-VERSION
26 .If you are reading this file, you probably have already done this!
31 E: % ./configure --help
33 .to list available configuration options. A description of
34 these options is provided in the 'CONFIGURE OPTIONS' section
37 .The configure script uses environmental variables for
38 determining compiler/linker options. See the HINTS
39 section for commonly used settings.
41 .These environment variables are used:
44 > CFLAGS C flags -ansi
45 > CPPFLAGS cpp flags -I/path/include -Ddef
46 > LDFLAGS ld flags -L/usr/local/lib
47 > LIBS libraries -llib
48 > PATH command path /usr/local/bin:/usr/bin:/bin
50 .See the 'USING ENVIRONMENT VARIABLES' section for information
51 on how to use the variables.
53 + Configure the build system
55 E: % [env settings] ./configure [options]
57 .If all goes well, the configure script with auto-detect the
58 appropriate settings. Use configure enable/with options and/or
59 environment variables to obtain desired results.
69 .If all goes well, the system will build as configured. If not,
70 return to step 3 after reviewing the configuration settings.
72 .You may want to consult the Platform Hints section of the FAQ .
74 + Test the standalone system
76 .This step requires the standalone LDAP server (slapd) with
81 .If all goes well, the system has been built as configured. If not,
82 return to step 4 after reviewing your configuration settings.
84 .You may want to consult the Platform Hints section of the FAQ.
86 + install the binaries and man pages. You may need to be superuser to
87 do this (depending on where you are installing things):
89 E: % su root -c 'make install'
93 .See the man pages for the individual applications for
94 information on configuring and using them. You may also want
95 to edit the configuration files used by the various components.
96 These configuration files are located in the OpenLDAP
97 configuration directory (normally /usr/local/etc/openldap).
99 > ldap.conf client defaults
100 > ldapfilter.conf search filter configuration
101 > ldapsearchprefs.conf search object definitions
102 > ldaptemplates.conf display template definitions
103 > slapd.conf Standalone LDAP daemon
104 > schema/*.schema Schema Definitions
106 .There are section 5 man pages for these configuration files.
109 P2: Building OpenLDAP For More Than One Platform
111 .You can build OpenLDAP for more than one platform from the
113 This is accomplished by using {{make}}(1) VPATH support.
114 If your {{make}}(1) program is old and doesn't have VPATH
115 support, install {{BSD Make}} or {{GNU Make}}.
117 .Follow these steps for each different platform:
119 ^ Create a directory for the platform object files.
121 E: % mkdir obj-platform
123 + Change your working directory to the platform object directory.
127 + Configure the build system
129 E: % [env settings] ../configure --src-dir=.. [options]
131 ( replace ".." with the appropriate path )
133 + Continue as above (starting at step 6).
135 Note: make depend in VPATH environment is not yet supported.
138 P2: CONFIGURE OPTIONS
140 Regrettably, this section has not been written (yet). See
141 "./configure --help" for current list of options. For general
142 information about how to use "configure", please read:
143 doc/install/configure
146 P2: USING ENVIRONMENT VARIABLES
148 The configure script will also use your environmental
149 variables for determining compiler/linker options. This can
150 be used to manual specify features and compilation options.
152 .WARNING: Executables built in your environment may not run
153 in your users' environments. The portability of executables
154 between environments is {{your responsibility}}.
156 Supported Environmental Variables:
159 > CFLAGS C flags -ansi
160 > CPPFLAGS cpp flags -I/path/include -Ddef
161 > LDFLAGS ld flags -L/usr/local/lib
162 > LIBS libraries -llib
163 > PATH command path /usr/local/bin:/usr/bin:/bin
165 * Including alternative compilers
167 .Use the CC environment variable to tell configure to
168 use a specific compiler. For example, to use {{GNU C
169 Compiler}} instead of the default compiler, use:
171 E: % [env] CC=gcc ./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 E: % [env] CC="gcc -ansi -pedantic" ./configure
179 .(you can use CFLAGS to specify compiler flags)
183 .You may specify additional preprocessor flags by setting
184 CPPFLAGS. For example, if you would like to use headers
185 installed in {{F:/usr/local/include}}, use:
187 E: % [env] CPPFLAGS="-I/usr/local/include" ./configure
189 .You can also use CPPFLAGS to specify preprocessor macros.
191 E: % [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
195 .You may specify additional linker flags by setting LDFLAGS.
196 For example, if you would like to use libraries installed
197 in {{F:/usr/local/lib}}, use:
199 E: % [env] LDFLAGS="-L/usr/local/lib" ./configure
201 .You can also use CPPFLAGS to specify linker flags:
203 E: % [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 {{F:/usr/css/bin}} for commands, use:
211 E: % [env] PATH="/usr/css/bin:$PATH" ./configure
217 E: CPPFLAGS="-I/usr/local/include" \
218 E: LDFLAGS="-L/usr/local/lib" \
224 * Use software under installed under {{F:/usr/local}}.
227 E: CPPFLAGS="-I/usr/local/include" \
228 E: LDFLAGS="-L/usr/local/lib" \
232 End of OpenLDAP INSTALL file.