]> git.sur5r.net Git - openldap/blob - INSTALL
A few minor updates in preparation for OpenLDAP 1.1.1.
[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 ** You should also check for platform specific hints.
8 ** These are located in doc/install/hints.
9 **
10
11 If you want to build binaries for more than one platform from a single
12 source tree, skip ahead to the "Building LDAP For More Than One Platform"
13 section near the end of this file.
14
15 If you simply want to build LDAP for a single machine platform, follow
16 these steps:
17
18  1. untar the distribution and cd to the top:
19
20         % tar xfz openldap-VERSION.tgz
21         % cd ldap
22
23     If you are reading this file, you probably have already done this!
24
25  2. Type:
26         % ./configure --help
27
28         to list available configuration options.   A description of
29         these options is provided in the 'CONFIGURE OPTIONS' section
30         below.
31
32         The configure script uses environmental variables for
33         determining compiler/linker options.  See the HINTS
34         section for commonly used settings. 
35
36         These environment variables are used: 
37                 CC                      C Compiler      (cc, ecgs)
38                 CFLAGS          C Flags         (-ansi)
39                 CPPFLAGS        CPP Flags       (-I/path/include -Ddef)
40                 LDFLAGS         LDFLAGS         (-L/path/lib -llib)
41
42         See the 'USING ENVIRONMENT VARIABLES' section for information
43         on how to use the variables. 
44
45  3. edit the file include/ldapconfig.h.edit to configure
46     the software for your site (the files are well-commented):
47
48         % vi include/ldapconfig.h.edit
49
50  4. 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  5. Build dependencies
59
60         % make depend
61
62  6. 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  7. 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  8. 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         ldap.conf            - LDAP defaults
101         ldapfilter.conf      - search filter configuration
102         ldapsearchprefs.conf - search object definitions
103         ldaptemplates.conf   - display template definitions
104
105     There are section 5 man pages for all of these files.
106
107
108 Building LDAP For More Than One Platform
109
110 It is now possible to build LDAP for more than one platform from the same
111 source tree.  This is accomplished by using make(1) VPATH support.  If
112 your make(1) program is old and doesn't have VPATH support, install GNU
113 Make.
114
115 Follow these steps for each different platform:
116
117  1.     Create a directory for the platform object files.
118
119         % mkdir obj-platform
120
121  2. Change your working directory to the platform object directory.
122
123         % cd obj-platform
124
125  3. Configure the build system
126
127         % [env settings] ../configure --src-dir=.. [options]
128
129                 ( replace ".." with the appropriate path )
130
131  4. Continue as above (starting at step 6).
132
133         Note: make depend in VPATH environment is not yet supported.
134
135
136 CONFIGURE OPTIONS
137
138 Regrettably, this section has not been written (yet).  See
139 "./configure --help" for current list of options.  For general
140 information about how to use "configure", please read:
141         doc/install/configure
142
143
144 USING ENVIRONMENT VARIABLES
145
146 The configure script will also use your environmental
147 variables for determining compiler/linker options.   This can
148 be used to manual specify features and compilation options.
149
150 NOTE: If you change environment setting, be sure to remove
151         any config.cache before running ./configure.
152
153 Supported Environmental Variables
154         CC                      C compiler              (cc, egcc)
155         CFLAGS          C flags                 (-ansi)
156         CPPFLAGS        cpp flags               (-I/path/include -Ddef)
157         LDFLAGS         ld flags                (-s)
158         LIBS            libraries               (-L/usr/local/lib -llib)
159         PATH            command path    /usr/local/bin:/usr/bin:/bin
160
161 * Including alternative compilers
162         Use the CC environment variable to tell configure to
163         use a specific compiler.  For example, to use ecgs
164         instead of the compiler configure choose, use:
165
166         [env] CC=egcc ./configure 
167
168         You can also use CC use specific flags with the
169         specified compiler.  For example, to require strict
170         ANSI C using the GNU C Compiler, use:
171
172         [env] CC="gcc -ansi -pedantic" ./configure
173
174         (you can use CFLAGS to specify compiler flags)
175
176 * Preprocessor Flags
177         You may specify additional preprocessor flags by setting
178         CPPFLAGS.  For example, if you would like to use headers
179         installed in /usr/local/include, use:
180
181         [env] CPPFLAGS="-I/usr/local/include" ./configure
182
183         You can also use CPPFLAGS to specify preprocessor macros.
184
185         [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
186
187 * Linker Flags
188         You may specify additional linker flags by setting LDFLAGS.
189         For example, if you would like to use libraries installed
190         in /usr/local/lib, use:
191
192         [env] LDFLAGS="-L/usr/local/lib" ./configure
193
194         You can also use CPPFLAGS to specify linker flags:
195
196         [env] LDFLAGS="-Bstatic" ./configure
197
198 * Path
199         You may alter your path to affect configure ability to
200         find (or not find) commands.  For example, to have configure
201         additionally look in /usr/css/bin for commands, use:
202
203         [env] PATH="/usr/css/bin:$PATH" ./configure
204         
205
206 HINTS
207
208 * Platform specific hints are available in doc/install/hints.
209
210 * Use software under installed in /usr/local/{include,lib}
211         [env] \
212                 CPPFLAGS="-I/usr/local/include" \
213                 LDFLAGS="-L/usr/local/lib" \
214                 ./configure
215
216
217 End of OpenLDAP INSTALL file.