1 AC_DEFUN([AC_PACKAGE_WANT_NDBM],
2 [ AC_CHECK_HEADERS(ndbm.h, [ have_db=true ], [ have_db=false ])
6 if test $have_db = true; then
7 AC_CHECK_LIB(ndbm,dbm_open,found=true,found=false)
8 AC_CHECK_LIB(ndbm,dbm_fetch,,found=false)
9 AC_CHECK_LIB(ndbm,dbm_store,,found=false)
10 AC_CHECK_LIB(ndbm,dbm_close,,found=false)
12 if test $found = true; then
21 AC_DEFUN([AC_PACKAGE_WANT_GDBM],
22 [ AC_CHECK_HEADERS([gdbm/ndbm.h, gdbm-ndbm.h], [ have_db=true ], [ have_db=false ])
26 if test $have_db = true; then
27 AC_CHECK_LIB(gdbm,dbm_open,found=true,found=false)
28 AC_CHECK_LIB(gdbm,dbm_fetch,,found=false)
29 AC_CHECK_LIB(gdbm,dbm_store,,found=false)
30 AC_CHECK_LIB(gdbm,dbm_close,,found=false)
32 if test $found = true; then
33 libgdbm="${libgdbm} -lgdbm"
37 AC_CHECK_LIB(gdbm_compat,dbm_open,found=true,found=false)
38 AC_CHECK_LIB(gdbm_compat,dbm_fetch,,found=false)
39 AC_CHECK_LIB(gdbm_compat,dbm_store,,found=false)
40 AC_CHECK_LIB(gdbm_compat,dbm_close,,found="no")
42 if test $found = true ; then
43 libgdbm="${libgdbm} -lgdbm_compat"