3 dnl find a suitable database library
5 dnl AC_FIND_DB(libraries)
6 AC_DEFUN([KRB_FIND_DB], [
21 AC_MSG_CHECKING(for dbm_open in $m)
22 AC_CACHE_VAL(ac_cv_krb_dbm_open_$m, [
29 #if defined(HAVE_NDBM_H)
31 #elif defined(HAVE_GDBM_NDBM_H)
32 #include <gdbm/ndbm.h>
33 #elif defined(HAVE_DBM_H)
35 #elif defined(HAVE_RPCSVC_DBM_H)
36 #include <rpcsvc/dbm.h>
37 #elif defined(HAVE_DB_H)
38 #define DB_DBM_HSEARCH 1
45 d = dbm_open("conftest", O_RDWR | O_CREAT, 0666);
51 if test -f conftest.db; then
55 fi], ac_res=no, ac_res=no)
59 eval ac_cv_krb_dbm_open_$m=$ac_res])
60 eval ac_res=\$ac_cv_krb_dbm_open_$m
61 AC_MSG_RESULT($ac_res)
63 if test "$lib_dbm" = no -a $ac_res = dbm; then
65 elif test "$lib_db" = no -a $ac_res = db; then
71 AC_MSG_CHECKING(for NDBM library)
73 if test "$lib_db" != no; then
76 AC_DEFINE(HAVE_NEW_DB, 1, [Define if NDBM really is DB (creates files ending in .db).])
77 if test "$LIB_DBM"; then
78 ac_res="yes, $LIB_DBM"
82 elif test "$lib_dbm" != no; then
85 if test "$LIB_DBM"; then
86 ac_res="yes, $LIB_DBM"
94 test "$ac_ndbm" = yes && AC_DEFINE(NDBM, 1, [Define if you have NDBM (and not DBM)])dnl
98 AC_MSG_RESULT($ac_res)