db configuration fix for Debian; yet another location for ndbm.
authorGlenn Burkhardt <glenn@aoi.ultranet.com>
Mon, 6 Oct 2003 20:11:39 +0000 (20:11 +0000)
committerGlenn Burkhardt <glenn@aoi.ultranet.com>
Mon, 6 Oct 2003 20:11:39 +0000 (20:11 +0000)
configure.in
uip/slocal.c

index c3fb81a..a5e891c 100644 (file)
@@ -555,13 +555,14 @@ AC_CHECK_FUNC(dbm_open, ,
   AC_CHECK_LIB(ndbm, dbm_open, ,
     AC_CHECK_LIB(dbm, dbm_open, ,
       AC_CHECK_LIB(db1, dbm_open, ,
-        AC_CHECK_LIB(gdbm, dbm_open)))))
+        AC_CHECK_LIB(gdbm, dbm_open, ,
+          AC_CHECK_LIB(db, __db_ndbm_open))))))
 
 dnl ----------------
 dnl CHECK FOR NDBM.H
 dnl ----------------
 
-AC_CHECK_HEADERS(db1/ndbm.h gdbm/ndbm.h, break, )
+AC_CHECK_HEADERS(db1/ndbm.h gdbm/ndbm.h db.h, break, )
 
 dnl ----------------
 dnl CHECK FOR HESIOD
index 6bf3e15..bbf1850 100644 (file)
@@ -55,9 +55,14 @@ extern int  initgroups(char*, int);
 #ifdef HAVE_GDBM_NDBM_H
 #include <gdbm/ndbm.h>
 #else
+#if defined(HAVE_DB_H) && defined(HAVE_LIBDB)
+#define DB_DBM_HSEARCH 1
+#include <db.h>
+#else
 #include <ndbm.h>
 #endif
 #endif
+#endif
 
 #include <utmp.h>