]> git.sur5r.net Git - openldap/blob - INSTALL
Cleanup:
[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 ** A Quick Start Guide, which may be used in conjunction with this
8 ** document, is available at:
9 **    http://www.openldap.org/faq/index.cgi?file=172
10 **
11 ** The OpenLDAP Installation FAQ is available at:
12 **    http://www.openldap.org/faq/index.cgi?file=8
13 **
14 ** You should also check for platform specific hints located on
15 ** on our web site.
16 **    http://www.openldap.org/faq/index.cgi?file=9
17 **
18
19 If you want to build binaries for more than one platform from a single
20 source tree, skip ahead to the "Building LDAP For More Than One Platform"
21 section near the end of this file.
22
23 If you simply want to build LDAP for a single machine platform, follow
24 these steps:
25
26  1. untar the distribution and cd to the top:
27
28         % tar xfz openldap-VERSION.tgz
29         % cd openldap-VERSION
30
31         replacing VERSION to match the version you downloaded.  If you are
32         reading this file, you probably have already done this!
33
34  2. Type:
35         % ./configure --help
36
37         to list available configuration options.   A description of
38         these options is provided in the 'CONFIGURE OPTIONS' section
39         below.
40
41         The configure script uses environmental variables for
42         determining compiler/linker options.  See the HINTS
43         section for commonly used settings. 
44
45         These environment variables are used: 
46                 CC                      C Compiler      (cc, ecgs)
47                 CFLAGS          C Flags         (-ansi)
48                 CPPFLAGS        CPP Flags       (-I/path/include -Ddef)
49                 LDFLAGS         LDFLAGS         (-L/path/lib)
50                 LIBS            LIBS            (-llib)
51
52         See the 'USING ENVIRONMENT VARIABLES' section for information
53         on how to use the variables. 
54
55  3. Configure the build system
56
57         % [env settings] ./configure [options]
58
59         If all goes well, the configure script with auto-detect the
60         appropriate settings.  Use configure enable/with options and/or
61         environment variables to obtain desired results.
62
63  4. Build dependencies
64
65         % make depend
66
67  5. Build the system
68
69         % make
70
71     If all goes well, the system will build as configured.  If not,
72         return to step 4 after reviewing the configuration settings.
73
74         You may want to consult the doc/install/hints file for your
75         platform.
76
77  6. Test the standalone system
78
79         This step requires the standalone LDAP server (slapd) with
80         LDBM support.
81
82         % cd tests
83         % make test
84
85         If all goes well, the system has been built as configured.  If not,
86         return to step 4 after reviewing your configuration settings.
87
88         You may want to consult the doc/install/hints file for your
89         platform.
90
91  7. install the binaries and man pages.  You may need to be superuser to
92     do this (depending on where you are installing things):
93
94         % su
95         # make install
96
97     That's it!
98
99         See the man pages for the individual applications for
100         information on configuring and using them.  You may also want
101         to edit the configuration files used by the various clients.
102         These configuration files are located in the OpenLDAP
103         configuration directory (normally /usr/local/etc/openldap).
104
105         Client configuration files:
106           ldap.conf            - client defaults
107           ldapfilter.conf      - search filter configuration
108           ldapsearchprefs.conf - search object definitions
109           ldaptemplates.conf   - display template definitions
110
111         Server configuration files:
112           ldapd.conf           - LDAP - X.500 daemon
113           slapd.conf           - Standalone LDAP daemon
114
115     There are section 5 man pages for all of these files.
116
117
118 Building LDAP For More Than One Platform
119
120 It is now possible to build LDAP for more than one platform from the same
121 source tree.  This is accomplished by using make(1) VPATH support.  If
122 your make(1) program is old and doesn't have VPATH support, install GNU
123 Make.
124
125 Follow these steps for each different platform:
126
127  1.     Create a directory for the platform object files.
128
129         % mkdir obj-platform
130
131  2. Change your working directory to the platform object directory.
132
133         % cd obj-platform
134
135  3. Configure the build system
136
137         % [env settings] ../configure --src-dir=.. [options]
138
139                 ( replace ".." with the appropriate path )
140
141  4. Continue as above (starting at step 6).
142
143         Note: make depend in VPATH environment is not yet supported.
144
145
146 CONFIGURE OPTIONS
147
148 Regrettably, this section has not been written (yet).  See
149 "./configure --help" for current list of options.  For general
150 information about how to use "configure", please read:
151         doc/install/configure
152
153
154 USING ENVIRONMENT VARIABLES
155
156 The configure script will also use your environmental
157 variables for determining compiler/linker options.   This can
158 be used to manual specify features and compilation options.
159
160 NOTE: If you change environment setting, be sure to remove
161         any config.cache before running ./configure.
162
163 Supported Environmental Variables
164         CC                      C compiler              (cc, egcc)
165         CFLAGS          C flags                 (-ansi)
166         CPPFLAGS        cpp flags               (-I/path/include -Ddef)
167         LDFLAGS         ld flags                (-L/usr/local/lib)
168         LIBS            libraries               (-llib)
169         PATH            command path    /usr/local/bin:/usr/bin:/bin
170
171 * Including alternative compilers
172         Use the CC environment variable to tell configure to
173         use a specific compiler.  For example, to use GNU
174         C Compiler instead of the compiler configure choose,
175         use:
176
177         [env] CC=gcc ./configure 
178
179         You can also use CC use specific flags with the
180         specified compiler.  For example, to require strict
181         ANSI C using the GNU C Compiler, use:
182
183         [env] CC="gcc -ansi -pedantic" ./configure
184
185         (you can use CFLAGS to specify compiler flags)
186
187 * Preprocessor Flags
188         You may specify additional preprocessor flags by setting
189         CPPFLAGS.  For example, if you would like to use headers
190         installed in /usr/local/include, use:
191
192         [env] CPPFLAGS="-I/usr/local/include" ./configure
193
194         You can also use CPPFLAGS to specify preprocessor macros.
195
196         [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
197
198 * Linker Flags
199         You may specify additional linker flags by setting LDFLAGS.
200         For example, if you would like to use libraries installed
201         in /usr/local/lib, use:
202
203         [env] LDFLAGS="-L/usr/local/lib" ./configure
204
205         You can also use CPPFLAGS to specify linker flags:
206
207         [env] LDFLAGS="-Bstatic" ./configure
208
209 * Path
210         You may alter your path to affect configure ability to
211         find (or not find) commands.  For example, to have configure
212         additionally look in /usr/css/bin for commands, use:
213
214         [env] PATH="/usr/css/bin:$PATH" ./configure
215         
216
217 HINTS
218
219 * Platform specific hints are available in doc/install/hints.
220
221 * Use software under installed in /usr/local/{include,lib}
222         [env] \
223                 CPPFLAGS="-I/usr/local/include" \
224                 LDFLAGS="-L/usr/local/lib" \
225                 ./configure
226
227
228 End of OpenLDAP INSTALL file.