]> git.sur5r.net Git - openldap/blob - INSTALL
Add RCSid
[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           slapd.conf           - Standalone LDAP daemon configuration
111           schema/*.schema      - Schema Definitions
112
113     There are section 5 man pages for these configuration 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
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 environmental variables for
153 determining compiler/linker options.   This can be used to manually
154 specify features and compilation options.
155
156 WARNING: Executables built in your environment may not run
157         in your users' environments.  The portability of
158         executables between environments is your responsibility.
159
160 Supported Environmental Variables
161         CC                      C compiler              (cc, egcc)
162         CFLAGS          C flags                 (-ansi)
163         CPPFLAGS        cpp flags               (-I/path/include -Ddef)
164         LDFLAGS         ld flags                (-L/usr/local/lib)
165         LIBS            libraries               (-llib)
166         PATH            command path    /usr/local/bin:/usr/bin:/bin
167
168 * Including alternative compilers
169         Use the CC environment variable to tell configure to
170         use a specific compiler.  For example, to use GNU
171         C Compiler instead of the compiler configure choose,
172         use:
173
174         [env] CC=gcc ./configure 
175
176         You can also use CC use specific flags with the
177         specified compiler.  For example, to require strict
178         ANSI C using the GNU C Compiler, use:
179
180         [env] CC="gcc -ansi -pedantic" ./configure
181
182         (you can use CFLAGS to specify compiler flags)
183
184 * Preprocessor Flags
185         You may specify additional preprocessor flags by setting
186         CPPFLAGS.  For example, if you would like to use headers
187         installed in /usr/local/include, use:
188
189         [env] CPPFLAGS="-I/usr/local/include" ./configure
190
191         You can also use CPPFLAGS to specify preprocessor macros.
192
193         [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
194
195 * Linker Flags
196         You may specify additional linker flags by setting LDFLAGS.
197         For example, if you would like to use libraries installed
198         in /usr/local/lib, use:
199
200         [env] LDFLAGS="-L/usr/local/lib" ./configure
201
202         You can also use CPPFLAGS to specify linker flags:
203
204         [env] LDFLAGS="-Bstatic" ./configure
205
206 * Path
207         You may alter your path to affect configure ability to
208         find (or not find) commands.  For example, to have configure
209         additionally look in /usr/css/bin for commands, use:
210
211         [env] PATH="/usr/css/bin:$PATH" ./configure
212         
213
214 HINTS
215
216 * Platform specific hints are available in doc/install/hints.
217
218 * Use software under installed in /usr/local/{include,lib}
219         [env] \
220                 CPPFLAGS="-I/usr/local/include" \
221                 LDFLAGS="-L/usr/local/lib" \
222                 ./configure
223
224
225 ---
226 $OpenLDAP$