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