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