]> git.sur5r.net Git - openldap/blob - INSTALL
Update INSTALL based upon new snapshot naming.
[openldap] / INSTALL
1 Making and Installing the OpenLDAP Distribution
2
3 **
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.
6 **
7 ** The OpenLDAP Installation FAQ is available at:
8 **    http://www.openldap.org/faq/index.cgi?file=8
9 **
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
13 **
14
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.
18
19 If you simply want to build LDAP for a single machine platform, follow
20 these steps:
21
22  1. untar the distribution and cd to the top:
23
24         % tar xfz openldap-VERSION.tgz
25         % cd openldap-VERSION
26
27     If you are reading this file, you probably have already done this!
28
29  2. Type:
30         % ./configure --help
31
32         to list available configuration options.   A description of
33         these options is provided in the 'CONFIGURE OPTIONS' section
34         below.
35
36         The configure script uses environmental variables for
37         determining compiler/linker options.  See the HINTS
38         section for commonly used settings. 
39
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)
45                 LIBS            LIBS            (-llib)
46
47         See the 'USING ENVIRONMENT VARIABLES' section for information
48         on how to use the variables. 
49
50  3. Configure the build system
51
52         % [env settings] ./configure [options]
53
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.
57
58  4. Build dependencies
59
60         % make depend
61
62  5. Build the system
63
64         % make
65
66     If all goes well, the system will build as configured.  If not,
67         return to step 4 after reviewing the configuration settings.
68
69         You may want to consult the doc/install/hints file for your
70         platform.
71
72  6. Test the standalone system
73
74         This step requires the standalone LDAP server (slapd) with
75         LDBM support.
76
77         % cd tests
78         % make
79
80         If all goes well, the system has been built as configured.  If not,
81         return to step 4 after reviewing your configuration settings.
82
83         You may want to consult the doc/install/hints file for your
84         platform.
85
86  7. install the binaries and man pages.  You may need to be superuser to
87     do this (depending on where you are installing things):
88
89         % su
90         # make install
91
92     That's it!
93
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).
99
100         Client configuration files:
101           ldap.conf            - client defaults
102           ldapfilter.conf      - search filter configuration
103           ldapsearchprefs.conf - search object definitions
104           ldaptemplates.conf   - display template definitions
105
106         Server configuration files:
107           ldapd.conf           - LDAP - X.500 daemon
108           slapd.conf           - Standalone LDAP daemon
109
110     There are section 5 man pages for all of these files.
111
112
113 Building LDAP For More Than One Platform
114
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
118 Make.
119
120 Follow these steps for each different platform:
121
122  1.     Create a directory for the platform object files.
123
124         % mkdir obj-platform
125
126  2. Change your working directory to the platform object directory.
127
128         % cd obj-platform
129
130  3. Configure the build system
131
132         % [env settings] ../configure --src-dir=.. [options]
133
134                 ( replace ".." with the appropriate path )
135
136  4. Continue as above (starting at step 6).
137
138         Note: make depend in VPATH environment is not yet supported.
139
140
141 CONFIGURE OPTIONS
142
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
147
148
149 USING ENVIRONMENT VARIABLES
150
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.
154
155 NOTE: If you change environment setting, be sure to remove
156         any config.cache before running ./configure.
157
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
165
166 * Including alternative compilers
167         Use the CC environment variable to tell configure to
168         use a specific compiler.  For example, to use GNU
169         C Compiler instead of the compiler configure choose,
170         use:
171
172         [env] CC=gcc ./configure 
173
174         You can also use CC use specific flags with the
175         specified compiler.  For example, to require strict
176         ANSI C using the GNU C Compiler, use:
177
178         [env] CC="gcc -ansi -pedantic" ./configure
179
180         (you can use CFLAGS to specify compiler flags)
181
182 * Preprocessor Flags
183         You may specify additional preprocessor flags by setting
184         CPPFLAGS.  For example, if you would like to use headers
185         installed in /usr/local/include, use:
186
187         [env] CPPFLAGS="-I/usr/local/include" ./configure
188
189         You can also use CPPFLAGS to specify preprocessor macros.
190
191         [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
192
193 * Linker Flags
194         You may specify additional linker flags by setting LDFLAGS.
195         For example, if you would like to use libraries installed
196         in /usr/local/lib, use:
197
198         [env] LDFLAGS="-L/usr/local/lib" ./configure
199
200         You can also use CPPFLAGS to specify linker flags:
201
202         [env] LDFLAGS="-Bstatic" ./configure
203
204 * Path
205         You may alter your path to affect configure ability to
206         find (or not find) commands.  For example, to have configure
207         additionally look in /usr/css/bin for commands, use:
208
209         [env] PATH="/usr/css/bin:$PATH" ./configure
210         
211
212 HINTS
213
214 * Platform specific hints are available in doc/install/hints.
215
216 * Use software under installed in /usr/local/{include,lib}
217         [env] \
218                 CPPFLAGS="-I/usr/local/include" \
219                 LDFLAGS="-L/usr/local/lib" \
220                 ./configure
221
222
223 End of OpenLDAP INSTALL file.