AC_INIT(aclocal.m4)
dnl
dnl autoconf 2.49 defaults to a /dev/null cache file, which is what we
dnl do not want for performance reasons. 
if test "x$cache_file" = "x/dev/null"; then
  cache_file=./config.cache
  AC_CACHE_LOAD
fi
dnl
CONFIG_RULES
dnl
dnl
dnl We cannot use the autoconf form as it is too generic and sets other
dnl variables. This is only for the purpose of changing the link options.
AC_MSG_CHECKING(whether we are using GNU C)
AC_CACHE_VAL(krb5_cv_prog_gcc,
[
AC_EGREP_CPP(yes,[#ifdef __GNUC__
yes;
#endif],krb5_cv_prog_gcc=yes,krb5_cv_prog_gcc=no)
])dnl
AC_MSG_RESULT($krb5_cv_prog_gcc)
dnl
dnl The following lines are so that configure --help gives some global 
dnl configuration options.
dnl
AC_ARG_ENABLE([kdc-replay-cache],
[  --enable-kdc-replay-cache	check for replayed/retransmitted KDC requests
				(recommended for replay attack detection
				 when hardware preauthentication is in use)
  --disable-kdc-replay-cache	omit replay detection])dnl
KRB5_LIB_AUX
AC_KRB5_TCL
AC_ARG_ENABLE([athena],
[  --enable-athena         build with MIT Project Athena configuration],,)
dnl
if test -z "$KRB4_LIB"; then
kadminv4=""
krb524=""
libkrb4=""
KRB4=""
else
kadminv4=kadmin.v4
krb524=krb524
libkrb4=lib/krb4
KRB4=krb4
fi
AC_SUBST(KRB4)
AC_SUBST(krb524)
dnl
dnl Begin autoconf tests for the Makefiles generated out of the top-level
dnl configure.in...
dnl
AC_PROG_INSTALL
AC_PROG_ARCHIVE
AC_PROG_ARCHIVE_ADD
AC_PROG_RANLIB
AC_CHECK_FUNCS(memmove)
KRB5_BUILD_LIBOBJS
KRB5_BUILD_LIBRARY
dnl
dnl For util/makeshlib.  (Is SHLIB_TAIL_COMP still necessary?!?)
dnl
if test $krb5_cv_prog_gcc = yes ; then
     HAVE_GCC=yes
     else HAVE_GCC=
fi
AC_SUBST(HAVE_GCC)
HOST_TYPE=$krb5_cv_host
AC_SUBST(HOST_TYPE)
SHLIB_TAIL_COMP=$krb5_cv_shlibs_tail_comp
AC_SUBST(SHLIB_TAIL_COMP)
dnl
dnl
AC_CONFIG_SUBDIRS(util/et util/ss util/profile util/pty util/db2 include lib/crypto lib/krb5 lib/des425 $libkrb4 lib/krb5util lib/kdb lib/gssapi lib/rpc lib/kadm5 $krb524 kdc kadmin slave clients appl tests)
K5_GEN_MAKEFILE(.)
K5_GEN_MAKEFILE(util)
K5_GEN_MAKEFILE(util/send-pr)
K5_GEN_MAKEFILE(util/dyn, lib libobj)
K5_GEN_MAKEFILE(lib)
K5_GEN_MAKEFILE(config-files)
K5_GEN_MAKEFILE(gen-manpages)
K5_AC_OUTPUT
