]> git.sur5r.net Git - openldap/blob - INSTALL
Import of UTBM 0.2
[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 located on
14 ** on our web site.
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 openldap-VERSION
29
30         replacing VERSION to match the version you downloaded.  If you are
31         reading this file, you probably have already done this!
32
33  2. Type:
34         % ./configure --help
35
36         to list available configuration options.   A description of
37         these options is provided in the 'CONFIGURE OPTIONS' section
38         below.
39
40         The configure script uses environmental variables for
41         determining compiler/linker options.  See the HINTS
42         section for commonly used settings. 
43
44         These environment variables are used: 
45                 CC                      C Compiler      (cc, ecgs)
46                 CFLAGS          C Flags         (-ansi)
47                 CPPFLAGS        CPP Flags       (-I/path/include -Ddef)
48                 LDFLAGS         LDFLAGS         (-L/path/lib)
49                 LIBS            LIBS            (-llib)
50
51         See the 'USING ENVIRONMENT VARIABLES' section for information
52         on how to use the variables. 
53
54  3. Configure the build system
55
56         % [env settings] ./configure [options]
57
58         If all goes well, the configure script with auto-detect the
59         appropriate settings.  Use configure enable/with options and/or
60         environment variables to obtain desired results.
61
62  4. Build dependencies
63
64         % make depend
65
66  5. Build the system
67
68         % make
69
70     If all goes well, the system will build as configured.  If not,
71         return to step 4 after reviewing the configuration settings.
72
73         You may want to consult the doc/install/hints file for your
74         platform.
75
76  6. Test the standalone system
77
78         This step requires the standalone LDAP server (slapd) with
79         LDBM support.
80
81         % cd tests
82         % make test
83
84         If all goes well, the system has been built as configured.  If not,
85         return to step 4 after reviewing your configuration settings.
86
87         You may want to consult the doc/install/hints file for your
88         platform.
89
90  7. install the binaries and man pages.  You may need to be superuser to
91     do this (depending on where you are installing things):
92
93         % su root -c 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                 (-ansi)
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 GNU
173         C Compiler instead of the compiler configure choose,
174         use:
175
176         [env] CC=gcc ./configure 
177
178         You can also use CC use specific flags with the
179         specified compiler.  For example, to require strict
180         ANSI C using the GNU C Compiler, use:
181
182         [env] CC="gcc -ansi -pedantic" ./configure
183
184         (you can use CFLAGS to specify compiler flags)
185
186 * Preprocessor Flags
187         You may specify additional preprocessor flags by setting
188         CPPFLAGS.  For example, if you would like to use headers
189         installed in /usr/local/include, use:
190
191         [env] CPPFLAGS="-I/usr/local/include" ./configure
192
193         You can also use CPPFLAGS to specify preprocessor macros.
194
195         [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
196
197 * Linker Flags
198         You may specify additional linker flags by setting LDFLAGS.
199         For example, if you would like to use libraries installed
200         in /usr/local/lib, use:
201
202         [env] LDFLAGS="-L/usr/local/lib" ./configure
203
204         You can also use CPPFLAGS to specify linker flags:
205
206         [env] LDFLAGS="-Bstatic" ./configure
207
208 * Path
209         You may alter your path to affect configure ability to
210         find (or not find) commands.  For example, to have configure
211         additionally look in /usr/css/bin for commands, use:
212
213         [env] PATH="/usr/css/bin:$PATH" ./configure
214         
215
216 HINTS
217
218 * Platform specific hints are available in doc/install/hints.
219
220 * Use software under installed in /usr/local/{include,lib}
221         [env] \
222                 CPPFLAGS="-I/usr/local/include" \
223                 LDFLAGS="-L/usr/local/lib" \
224                 ./configure
225
226
227 End of OpenLDAP INSTALL file.