Convert DEBUG_REFERRALS to TRACE_* framework
[krb5.git] / doc / rst_source / krb_build / options2configure.rst
1 .. _options2configure:\r
2 \r
3 Options to *configure*\r
4 ======================\r
5 \r
6 There are a number of options to configure which you can use to\r
7 control how the Kerberos distribution is built.\r
8 \r
9 Most commonly used options\r
10 --------------------------\r
11 \r
12 **--help**\r
13     Provides help to configure.  This will list the set of commonly\r
14     used options for building Kerberos.\r
15 \r
16 **--prefix=**\ *PREFIX*\r
17     By default, Kerberos will install the package's files rooted at\r
18     ``/usr/local``.  If you desire to place the binaries into the\r
19     directory *PREFIX*, use this option.\r
20 \r
21 **--exec-prefix=**\ *EXECPREFIX*\r
22     This option allows one to separate the architecture independent\r
23     programs from the host-dependent files (configuration files,\r
24     manual pages).  Use this option to install architecture-dependent\r
25     programs in *EXECPREFIX*.  The default location is the value of\r
26     specified by **--prefix** option.\r
27 \r
28 **--localstatedir=**\ *LOCALSTATEDIR*\r
29     This option sets the directory for locally modifiable\r
30     single-machine data.  In Kerberos, this mostly is useful for\r
31     setting a location for the KDC data files, as they will be\r
32     installed in ``LOCALSTATEDIR/krb5kdc``, which is by default\r
33     ``PREFIX/var/krb5kdc``.\r
34 \r
35 **--with-netlib**\ [=\ *libs*]\r
36     Allows for suppression of or replacement of network libraries.  By\r
37     default, Kerberos V5 configuration will look for ``-lnsl`` and\r
38     ``-lsocket``.  If your operating system has a broken resolver\r
39     library or fails to pass the tests in ``src/tests/resolv``, you\r
40     will need to use this option.\r
41 \r
42 **--with-tcl=**\ *TCLPATH*\r
43     Some of the unit-tests in the build tree rely upon using a program\r
44     in Tcl.  The directory specified by *TCLPATH* specifies where the\r
45     Tcl header file (TCLPATH/include/tcl.h) as well as where the Tcl\r
46     library (TCLPATH/lib) should be found.\r
47 \r
48 **--enable-dns-for-realm**\r
49     Enable the use of DNS to look up a host's Kerberos realm, or a\r
50     realm's KDCs, if the information is not provided in\r
51     :ref:`krb5.conf(5)`.  See :ref:`kdc_hostnames` for information\r
52     about using DNS to locate the KDCs, and :ref:`mapping_hostnames`\r
53     for information about using DNS to determine the default realm.\r
54     By default, DNS lookups are enabled for the former but not for the\r
55     latter.\r
56 \r
57 **--with-system-et**\r
58     Use an installed version of the error-table (et) support software,\r
59     the compile_et program, the com_err.h header file and the com_err\r
60     library.  If these are not in the default locations, you may wish\r
61     to specify ``CPPFLAGS=-I/some/dir`` and\r
62     ``LDFLAGS=-L/some/other/dir`` options at configuration time as\r
63     well.\r
64 \r
65     If this option is not given, a version supplied with the Kerberos\r
66     sources will be built and installed along with the rest of the\r
67     Kerberos tree, for Kerberos applications to link against.\r
68 \r
69 **--with-system-ss**\r
70     Use an installed version of the subsystem command-line interface\r
71     software, the mk_cmds program, the ``ss/ss.h`` header file and the\r
72     ss library.  If these are not in the default locations, you may\r
73     wish to specify ``CPPFLAGS=-I/some/dir`` and\r
74     ``LDFLAGS=-L/some/other/dir`` options at configuration time as\r
75     well.  See also the **SS_LIB** option.\r
76 \r
77     If this option is not given, the ss library supplied with the\r
78     Kerberos sources will be compiled and linked into those programs\r
79     that need it; it will not be installed separately.\r
80 \r
81 **--with-system-db**\r
82     Use an installed version of the Berkeley DB package, which must\r
83     provide an API compatible with version 1.85.  This option is\r
84     unsupported and untested.  In particular, we do not know if the\r
85     database-rename code used in the dumpfile load operation will\r
86     behave properly.\r
87 \r
88     If this option is not given, a version supplied with the Kerberos\r
89     sources will be built and installed.  (We are not updating this\r
90     version at this time because of licensing issues with newer\r
91     versions that we haven't investigated sufficiently yet.)\r
92 \r
93 \r
94 Environment variables\r
95 ---------------------\r
96 \r
97 **CC=**\ *COMPILER*\r
98     Use *COMPILER* as the C compiler.\r
99 \r
100 **CFLAGS=**\ *FLAGS*\r
101     Use *FLAGS* as the default set of C compiler flags.\r
102 \r
103 **CPPFLAGS=**\ *CPPOPTS*\r
104     Use *CPPOPTS* as the default set of C preprocessor flags.  The\r
105     most common use of this option is to select certain #define's for\r
106     use with the operating system's include files.\r
107 \r
108 **CPP=**\ *CPP*\r
109     C preprocessor to use. (e.g. ``CPP='gcc -E'``)\r
110 \r
111 **DB_HEADER=**\ *headername*\r
112     If db.h is not the correct header file to include to compile\r
113     against the Berkeley DB 1.85 API, specify the correct header file\r
114     name with this option. For example, ``DB_HEADER=db3/db_185.h``.\r
115 \r
116 **DB_LIB=**\ *libs*...\r
117     If ``-ldb`` is not the correct library specification for the\r
118     Berkeley DB library version to be used, override it with this\r
119     option. For example, ``DB_LIB=-ldb-3.3``.\r
120 \r
121 **LD=**\ *LINKER*\r
122     Use *LINKER* as the default loader if it should be different from\r
123     C compiler as specified above.\r
124 \r
125 **LDFLAGS=**\ *LDOPTS*\r
126     This option informs the linker where to get additional libraries\r
127     (e.g. ``-L<lib dir>``).\r
128 \r
129 **LIBS=**\ *LDNAME*\r
130     This option allows one to specify libraries to be passed to the\r
131     linker (e.g. ``-l<library>``)\r
132 \r
133 **SS_LIB=**\ *libs*...\r
134     If ``-lss`` is not the correct way to link in your installed ss\r
135     library, for example if additional support libraries are needed,\r
136     specify the correct link options here.  Some variants of this\r
137     library are around which allow for Emacs-like line editing, but\r
138     different versions require different support libraries to be\r
139     explicitly specified.\r
140 \r
141     This option is ignored if **--with-system-ss** is not specified.\r
142 \r
143 **CXX**\r
144      C++ compiler command\r
145 \r
146 **CXXFLAGS**\r
147      C++ compiler flags\r
148 \r
149 **YACC**\r
150      The 'Yet Another C Compiler' implementation to use. Defaults to\r
151      the first program found out of: '`bison -y`', '`byacc`',\r
152      '`yacc`'.\r
153 \r
154 **YFLAGS**\r
155      The list of arguments that will be passed by default to $YACC.\r
156      This script will default YFLAGS to the empty string to avoid a\r
157      default value of ``-d`` given by some make applications.\r
158 \r
159 \r
160 Fine tuning of the installation directories\r
161 -------------------------------------------\r
162 \r
163 **--bindir=**\ *DIR*\r
164     User executables.  Defaults to ``EXECPREFIX/bin``, where\r
165     *EXECPREFIX* is the path specified by **--exec-prefix**\r
166     configuration option.\r
167 \r
168 **--sbindir=**\ *DIR*\r
169     System admin executables.  Defaults to ``EXECPREFIX/sbin``, where\r
170     *EXECPREFIX* is the path specified by **--exec-prefix**\r
171     configuration option.\r
172 \r
173 **--libexecdir=**\ *DIR*\r
174     Program executables.  Defaults to ``EXECPREFIX/libexec``, where\r
175     *EXECPREFIX* is the path specified by **--exec-prefix**\r
176     configuration option.\r
177 \r
178 **--sysconfdir=**\ *DIR*\r
179     Read-only single-machine data.  Defaults to ``PREFIX/etc``, where\r
180     *PREFIX* is the path specified by **--prefix** configuration\r
181     option.\r
182 \r
183 **--sharedstatedir=**\ *DIR*\r
184     Modifiable architecture-independent data.  Defaults to\r
185     ``PREFIX/com``, where *PREFIX* is the path specified by\r
186     **--prefix** configuration option.\r
187 \r
188 **--libdir=**\ *DIR*\r
189     Object code libraries.  Defaults to ``EXECPREFIX/lib``, where\r
190     *EXECPREFIX* is the path specified by **--exec-prefix**\r
191     configuration option.\r
192 \r
193 **--includedir=**\ *DIR*\r
194     C header files.  Defaults to ``PREFIX/include``, where *PREFIX* is\r
195     the path specified by **--prefix** configuration option.\r
196 \r
197 **--oldincludedir=**\ *DIR*\r
198     C header files for non-gcc.  Default to ``/usr/include``.\r
199 \r
200 **--datarootdir=**\ *DATAROOTDIR*\r
201     Read-only architecture-independent data root.  Defaults to\r
202     ``PREFIX/share``, where *PREFIX* is the path specified by\r
203     **--prefix** configuration option.\r
204 \r
205 **--datadir=**\ *DIR*\r
206     Read-only architecture-independent data.  Defaults to path\r
207     specified by **--datarootdir** configuration option.\r
208 \r
209 **--infodir=**\ *DIR*\r
210     Info documentation.  Defaults to ``DATAROOTDIR/info``, where\r
211     *DATAROOTDIR* is the path specified by **--datarootdir**\r
212     configuration option.\r
213 \r
214 **--localedir=**\ *DIR*\r
215     Locale-dependent data.  Defaults to ``DATAROOTDIR/locale``, where\r
216     *DATAROOTDIR* is the path specified by **--datarootdir**\r
217     configuration option.\r
218 \r
219 **--mandir=**\ *DIR*\r
220     Man documentation.  Defaults to ``DATAROOTDIR/man``, where\r
221     *DATAROOTDIR* is the path specified by **--datarootdir**\r
222     configuration option.\r
223 \r
224 **--docdir=**\ *DOCDIR*\r
225     Documentation root.  Defaults to ``DATAROOTDIR/doc/krb5``, where\r
226     *DATAROOTDIR* is the path specified by **--datarootdir**\r
227     configuration option.\r
228 \r
229 **--htmldir=**\ *DIR*\r
230     HTML documentation.  Defaults to path specified by **--docdir**\r
231     configuration option.\r
232 \r
233 **--dvidir=**\ *DIR*\r
234     DVI documentation.  Defaults to path specified by **--docdir**\r
235     configuration option.\r
236 \r
237 **--pdfdir=**\ *DIR*\r
238     PDF documentation.  Defaults to path specified by **--docdir**\r
239     configuration option.\r
240 \r
241 **--psdir=**\ *DIR*\r
242     PostScript documentation.  Defaults to path specified by\r
243     **--docdir** configuration option.\r
244 \r
245 \r
246 Program names\r
247 -------------\r
248 \r
249 **--program-prefix=**\ *PREFIX*\r
250     Prepend *PREFIX* to the names of the programs when installing\r
251     them. For example, specifying ``--program-prefix=mit-`` at the\r
252     configure time will cause the program named ``abc`` to be\r
253     installed as ``mit-abc``.\r
254 \r
255 **--program-suffix=**\ *SUFFIX*\r
256     Append *SUFFIX* to the names of the programs when installing them.\r
257     For example, specifying ``--program-suffix=-mit`` at the configure\r
258     time will cause the program named ``abc`` to be installed as\r
259     ``abc-mit``.\r
260 \r
261 **--program-transform-name=**\ *PROGRAM*\r
262     Run ``sed -e PROGRAM`` on installed program names. (*PROGRAM* is a\r
263     sed script).\r
264 \r
265 \r
266 System types\r
267 ------------\r
268 \r
269 **--build=**\ *BUILD*\r
270     Configure for building on *BUILD*\r
271     (e.g. ``--build=x86_64-linux-gnu``).\r
272 \r
273 **--host=**\ *HOST*\r
274     Cross-compile to build programs to run on *HOST*\r
275     (e.g. ``--host=x86_64-linux-gnu``).  By default, Kerberos V5\r
276     configuration will look for "build" option.\r
277 \r
278 \r
279 Optional features\r
280 -----------------\r
281 \r
282 **--disable-**\ *FEATURE*\r
283     Do not include *FEATURE* (same as --enable-FEATURE=no).\r
284 \r
285 **--disable-option-checking**\r
286     Ignore unrecognized --enable/--with options.\r
287 \r
288 **--enable-**\ *FEATURE*\ [=\ *ARG*]\r
289     Include *FEATURE* [ARG=yes].\r
290 \r
291 **--enable-dns-for-realm**\r
292     Enable DNS lookups of Kerberos realm names.\r
293 \r
294 **--enable-maintainer-mode**\r
295     Enable rebuilding of source files, Makefiles, etc.\r
296 \r
297 **--disable-delayed-initialization**\r
298     Initialize library code when loaded.  Defaults to delay until\r
299     first use.\r
300 \r
301 **--disable-thread-support**\r
302     Don't enable thread support.  Defaults to enabled.\r
303 \r
304 **--disable-rpath**\r
305     Suppress run path flags in link lines.\r
306 \r
307 **--enable-athena**\r
308     Build with MIT Project Athena configuration.\r
309 \r
310 **--enable-fortuna-test**\r
311     Build to test Fortuna PRNG.\r
312 \r
313 **--disable-kdc-lookaside-cache**\r
314     Disable the cache which detects client retransmits.\r
315 \r
316 **--disable-pkinit**\r
317     Disable PKINIT plugin support.\r
318 \r
319 \r
320 Optional packages\r
321 -----------------\r
322 \r
323 **--with-**\ *PACKAGE*\ [=ARG\]\r
324     Use *PACKAGE* (e.g. ``--with-imap``).  The default value of *ARG*\r
325     is ``yes``.\r
326 \r
327 **--without-**\ *PACKAGE*\r
328     Do not use *PACKAGE* (same as ``--with-PACKAGE=no``)\r
329     (e.g. ``--without-libedit``).\r
330 \r
331 **--with-size-optimizations**\r
332     Enable a few optimizations to reduce code size possibly at some\r
333     run-time cost.\r
334 \r
335 **--with-hesiod=**\ *path*\r
336     Compile with Hesiod support.  The *path* points to the Hesiod\r
337     directory.  By default Hesiod is unsupported.\r
338 \r
339 **--with-ldap**\r
340     Compile OpenLDAP database backend module.\r
341 \r
342 **--with-vague-errors**\r
343     Do not send helpful errors to client.  For example, if the KDC\r
344     should return only vague error codes to clients.\r
345 \r
346 **--with-crypto-impl=**\ *IMPL*\r
347     Use specified crypto implementation (e.g. **--with-crypto=**\\r
348     *openssl*).  Default is a native MIT Kerberos implementation\r
349     ``builtin``.  The other currently implemented crypto backends are\r
350     ``openssl`` and ``nss``.  (See :ref:`mitK5features`)\r
351 \r
352 **--with-prng-alg=**\ *ALG*\r
353     Use specified PRNG algorithm.  For example, to use the OS native\r
354     prng specify ``--with-prng-alg=os``.\r
355 \r
356     Default is the ``fortuna`` PRNG algorithm.  For the ``nss`` crypto\r
357     backend use one must explicitly specify ``--with-prng-alg=nss``.\r
358     (See :ref:`mitK5features`)\r
359 \r
360 **--with-kdc-kdb-update**\r
361     Update the KDC database with the information about\r
362 \r
363     * the last successful authentication;\r
364     * the last failed authentication attempt;\r
365     * the number of the failed authentication attempts.\r
366 \r
367     By default the kdb is not updated with this information.\r
368 \r
369 **--with-system-verto**\r
370     Use an installed version of libverto.  If the libverto header and\r
371     library are not in default locations, you may wish to specify\r
372     ``CPPFLAGS=-I/some/dir`` and ``LDFLAGS=-L/some/other/dir`` options\r
373     at configuration time as well.\r
374 \r
375     If this option is not given, the build system will try to detect\r
376     an installed version of libverto and use it if it is found.\r
377     Otherwise, a version supplied with the Kerberos sources will be\r
378     built and installed.  The built-in version does not contain the\r
379     full set of back-end modules and is not a suitable general\r
380     replacement for the upstream version, but will work for the\r
381     purposes of Kerberos.\r
382 \r
383     Specifying **--without-system-verto** will cause the built-in\r
384     version of libverto to be used unconditionally.\r
385 \r
386 \r
387 Examples\r
388 --------\r
389 \r
390 For example, in order to configure Kerberos on a Solaris machine using\r
391 the suncc compiler with the optimizer turned on, run the configure\r
392 script with the following options::\r
393 \r
394     % ./configure CC=suncc CFLAGS=-O\r
395 \r
396 For a slightly more complicated example, consider a system where\r
397 several packages to be used by Kerberos are installed in\r
398 ``/usr/foobar``, including Berkeley DB 3.3, and an ss library that\r
399 needs to link against the curses library.  The configuration of\r
400 Kerberos might be done thus::\r
401 \r
402     ./configure CPPFLAGS=-I/usr/foobar/include LDFLAGS=-L/usr/foobar/lib --with-system-et --with-system-ss --with-system-db  SS_LIB='-lss -lcurses'  DB_HEADER=db3/db_185.h DB_LIB=-ldb-3.3\r