2 AC_CONFIG_SRCDIR([aclocal.m4])
4 dnl autoconf 2.49 defaults to a /dev/null cache file, which is what we
5 dnl do not want for performance reasons.
6 if test "x$cache_file" = "x/dev/null"; then
7 cache_file=./config.cache
13 dnl Determine version from patchlevel.h
14 eval `sed 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/' < $srcdir/patchlevel.h`
15 KRB5_VERSION="$KRB5_MAJOR_RELEASE.$KRB5_MINOR_RELEASE.$KRB5_PATCHLEVEL"
16 AC_SUBST(KRB5_VERSION)
20 dnl The following lines are so that configure --help gives some global
21 dnl configuration options.
25 AC_ARG_ENABLE([athena],
26 [ --enable-athena build with MIT Project Athena configuration],,)
28 if test -z "$KRB4_LIB"; then
42 dnl Begin autoconf tests for the Makefiles generated out of the top-level
45 AC_CHECK_FUNCS(memmove)
47 KRB5_BUILD_LIBRARY_WITH_DEPS
56 AC_CHECK_LIB(util,main,[AC_DEFINE(HAVE_LIBUTIL)
61 AC_CHECK_HEADERS(syslog.h stdarg.h sys/select.h sys/sockio.h ifaddrs.h unistd.h)
62 AC_CHECK_FUNCS(openlog syslog closelog strftime vsprintf)
63 KRB5_NEED_PROTO([#include <string.h>
67 /* Solaris 8 declares swab in stdlib.h. */
76 dnl --with-vague-errors disables useful error messages.
78 AC_ARG_WITH([vague-errors],
79 AC_HELP_STRING([--with-vague-errors],[Do not @<:@do@:>@ send helpful errors to client]), , withval=no)dnl
80 if test "$withval" = yes; then
81 AC_MSG_RESULT(Supplying vague error messages to KDC clients)
82 AC_DEFINE(KRBCONF_VAGUE_ERRORS)
85 dnl --with-kdc-kdb-update makes the KDC update the database with last request
86 dnl information and failure information.
88 AC_ARG_WITH([kdc-kdb-update],
89 AC_HELP_STRING([--with-kdc-kdb-update],[Update the database @<:@don't update@:>@]), , withval=no)dnl
90 if test "$withval" = yes; then
91 AC_MSG_RESULT(Updating KDC database with each request)
92 AC_DEFINE(KRBCONF_KDC_MODIFIES_KDB)
95 dnl Needed for hw-preauth replay detection on KDC.
97 dnl USE_RCACHE enables the replay cache
98 dnl NOCACHE disables the lookaside cache
100 dnl The lookaside cache is checked first; if *exactly* the same message
101 dnl comes in twice, e.g., because the (legitimate) client resent it,
102 dnl the previous response will be resent. Otherwise, the replay cache
103 dnl is used to check for attempts to fake out the KDC. Some hardware
104 dnl preauth methods are weak enough that we *really* want to have this
105 dnl checking turned on.
107 AC_ARG_ENABLE([kdc-replay-cache],
108 AC_HELP_STRING([--enable-kdc-replay-cache],[check for replayed/retransmitted KDC requests (recommended when hardware preauthentication is in use) @<:@disabled@:>@]), , enableval=yes)dnl
109 if test "$enableval" = yes ; then
110 AC_DEFINE(USE_RCACHE)
114 AC_ARG_ENABLE([fakeka],
115 AC_HELP_STRING([--enable-fakeka],[build the Fake KA server (emulates an AFS kaserver) @<:@default: don't build@:>@]), , enableval=no)dnl
116 if test "$enableval" = yes; then
128 dnl Check for thread safety issues.
129 dnl (Is there a better place for this?)
130 tsfuncs="getpwnam_r getpwuid_r gethostbyname_r getservbyname_r gmtime_r localtime_r"
131 AC_CHECK_FUNCS($tsfuncs)
132 if test "$enable_thread_support" = yes; then
134 for ts in $tsfuncs; do
135 if eval "test \"\${ac_cv_func_$ts}\" != yes"; then
136 tsmissing="$tsmissing $ts"
139 if test "$tsmissing" != ""; then
140 AC_MSG_WARN([Some functions that are needed for library thread])
141 AC_MSG_WARN([safety appear to be missing.])
142 for ts in $tsmissing; do
143 AC_MSG_WARN([ missing thread-safe function: $ts])
145 AC_MSG_WARN([Without these functions, the installed libraries])
146 AC_MSG_WARN([may not be thread-safe.])
147 fi # tsmissing not empty
148 fi # enable_thread_support
150 HOST_TYPE=$krb5_cv_host
154 if test "$COM_ERR_VERSION" = k5 ; then
155 AC_CONFIG_SUBDIRS(util/et)
157 if test "$SS_VERSION" = k5 ; then
158 AC_CONFIG_SUBDIRS(util/ss)
160 AC_CONFIG_SUBDIRS(util/profile util/pty)
161 if test "$DB_VERSION" = k5 ; then
162 AC_CONFIG_SUBDIRS(util/db2)
164 AC_CONFIG_SUBDIRS(include lib/crypto lib/krb5 lib/des425 lib/apputils)
165 if test -n "$KRB4_LIB"; then
166 AC_CONFIG_SUBDIRS(lib/krb4)
168 AC_CONFIG_SUBDIRS(lib/kdb lib/gssapi lib/rpc lib/kadm5)
169 dnl if test -n "$KRB4_LIB"; then
170 dnl AC_CONFIG_SUBDIRS(krb524)
173 AC_CONFIG_SUBDIRS(kadmin clients appl tests)
174 AC_CONFIG_FILES(krb5-config, [chmod +x krb5-config])
175 V5_AC_OUTPUT_MAKEFILE(. util util/support util/send-pr lib kdc slave krb524 config-files gen-manpages)