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