])dnl
dnl
dnl
-dnl Database determination
-dnl
-dnl
-dnl Check for missing DBM prototypes
-dnl
-AC_DEFUN(AC_CHECK_DBM_PROTO,[
- AC_MSG_CHECKING([for missing $2 prototype])
- AC_CACHE_VAL(krb5_cv_missing_$2_prototype,
- AC_EGREP_HEADER([$2], [$1.h],
- eval krb5_cv_missing_$2_prototype=no,
- AC_TRY_LINK(
-[#include <$1.h>
-int $2();],
-[$2();],
- eval krb5_cv_missing_$2_prototype=yes,
- eval krb5_cv_missing_$2_prototype=no)))
- if eval "test \"`echo '$krb5_cv_missing_'$2_prototype`\" = yes"; then
- AC_MSG_RESULT(yes)
- $4
- else
- AC_MSG_RESULT(no)
- $3
- fi
-])dnl
-dnl
-dnl
-dnl --with-aname-db=[dbm type]
-dnl --with-aname-dbopts=[compile flags]
-dnl
-dnl --with-kdb-db=[dbm type]
-dnl --with-kdb-dbopts=[compile flags]
-dnl
-dnl
-define(WITH_ANAME_DB,[
-AC_ARG_WITH([aname-db],
-[ --with-aname-db=DBM name conversion database type],
-dbval="$withval",
-dbval=
-)dnl
-AC_ARG_WITH([aname-dbopts],
-[ --with-aname-dbopts=CCOPTS compilation flags],
-dbflags="$withval",
-)dnl
-CHECK_DB
-CPPFLAGS="$CPPFLAGS $dbflags"
-AC_MSG_RESULT(Using $dbval for name conversion database.)
-])dnl
-dnl
-dnl
-dnl
-define(WITH_KDB_DB,[
-AC_ARG_WITH([kdb-db],
-[ --with-kdb-db=DBM kerberos database type],
-dbval="$withval",
-dbval=
-)dnl
-AC_ARG_WITH([kdb-dbopts],
-[ --with-kdb-dbopts=CCOPTS compilation flags],
-dbflags="$withval",
-)dnl
-CHECK_DB
-CPPFLAGS="$CPPFLAGS $dbflags"
-AC_MSG_RESULT(Using $dbval for kerberos database.)
-])dnl
-dnl
-dnl
-define(CHECK_DB,[
-if test "$dbval" = "" -o "$dbval" = ndbm; then
- OLIBS="$LIBS"
- AC_HEADER_CHECK(ndbm.h,[dbval=ndbm
- AC_CHECK_FUNC(dbm_nextkey,,
- AC_CHECK_LIB(ndbm,dbm_nextkey,[dblibs=-lndbm],
- AC_CHECK_LIB(dbm,dbm_nextkey,[dblibs=-ldbm],
- AC_CHECK_LIB(gdbm,dbm_nextkey,[dblibs=-lgdbm]))))
- AC_DEFINE(NDBM)
- LIBS="$LIBS $dblibs"
- AC_CHECK_DBM_PROTO($dbval,dbm_error,,
- AC_DEFINE(MISSING_ERROR_PROTO))
- AC_CHECK_DBM_PROTO($dbval,dbm_clearerr,,
- AC_DEFINE(MISSING_CLEARERR_PROTO))])
- LIBS="$OLIBS"
-fi
-if test "$dbval" = "" -o "$dbval" = db; then
- dbval=db
- dblibs=-ldb
- AC_DEFINE(BERK_DB_DBM)
-fi
-])dnl
-dnl
-dnl
dnl Check for prototype support - used by application not including k5-int.h
dnl
define(KRB5_CHECK_PROTOS,[