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