]> git.sur5r.net Git - openldap/blob - INSTALL
Update contrib software.
[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 enable/with options settings.
68         
69  7. install the binaries and man pages.  You may need to be superuser to
70     do this (depending on where you are installing things):
71
72         % su
73         # make install
74
75     That's it!  See the man pages for the individual clients for information
76     on configuring and using them.  Eventually you will probably want to
77     edit the configuration files used by the various clients (installed in
78     the LDAP etc directory).  The files are:
79
80         ldapfilter.conf      - search filter configuration
81         ldapfriendly         - mapping of X.500 names to human-friendly names
82         ldapsearchprefs.conf - search object definitions
83         ldaptemplates.conf   - display template definitions
84
85     There are section 5 man pages for all of these files.
86
87
88 Building LDAP For More Than One Platform
89
90 It is now possible to build LDAP for more than one platform from the same
91 source tree.  This is accomplished by using make(1) VPATH support.  If
92 your make(1) program is old and doesn't have VPATH support, install GNU
93 Make.
94
95 Follow these steps for each different platform:
96
97  1.     Create a directory for the platform object files.
98
99         % mkdir obj-platform
100
101  2. Change your working directory to the platform object directory.
102
103         % cd obj-platform
104
105  3. Configure the build system
106
107         % [env settings] ../configure --src-dir=.. [options]
108
109                 ( replace ".." with the appropriate path )
110
111  4. Continue as above (starting at step 6).
112
113         Note: make depend in VPATH environment is not yet supported.
114
115
116 CONFIGURE OPTIONS
117
118 Regrettably, this section has not been written (yet).  See
119 "./configure --help" for current list of options.
120
121
122 USING ENVIRONMENT VARIABLES
123
124 The configure script will also use your environmental
125 variables for determining compiler/linker options.   This can
126 be used to manual specify features and compilation options.
127
128 Supported Environmental Variables
129         CC                      C Compiler              (cc, ecgs)
130         CFLAGS          C Flags                 (-ansi)
131         CPPFLAGS        CPP Flags               (-I/path/include -Ddef)
132         LDFLAGS         LDFLAGS                 (-L/path/lib -llib)
133         PATH            command path    /usr/local/bin:/usr/bin:/bin
134
135 * Including alternative compilers
136         Use the CC environment variable to tell configure to
137         use a specific compiler.  For example, to use ecgs
138         instead of the compiler configure choose, use:
139
140         [env] CC=ecgs ./configure 
141
142         You can also use CC use specific flags with the
143         specified compiler.  For example, to require strict
144         ANSI C using the GNU C Compiler, use:
145
146         [env] CC="gcc -ansi -predantic" ./configure
147
148         (you can use CFLAGS to specify compiler flags)
149
150 * Preprocessor Flags
151         You may specify additional preprocessor flags by setting
152         CPPFLAGS.  For example, if you would like to use headers
153         installed in /usr/local/include, use:
154
155         [env] CPPFLAGS="-I/usr/local/include" ./configure
156
157         You can also use CPPFLAGS to specify preprocessor macros.
158
159         [env] CPPFLAGS="-D__SPECIAL_FLAG__" ./configure
160
161 * Linker Flags
162         You may specify additional linker flags by setting LDFLAGS.
163         For example, if you would like to use libraries installed
164         in /usr/local/lib, use:
165
166         [env] LDFLAGS="-L/usr/local/lib" ./configure
167
168         You can also use CPPFLAGS to specify linker flags:
169
170         [env] LDFLAGS="-Bstatic" ./configure
171
172 * Path
173         You may alter your path to affect configure ability to
174         find (or not find) commands.  For example, to have configure
175         additionally look in /usr/css/bin for commands, use:
176
177         [env] PATH="/usr/css/bin:$PATH" ./configure
178         
179
180 HINTS
181
182 * use software under installed in /usr/local/{include,lib}
183         [env] \
184                 CPPFLAGS="-I/usr/local/include" \
185                 LDFLAGS="-L/usr/local/lib" \
186                 ./configure
187
188
189 End of OpenLDAP INSTALL file.