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_HEADER(gdbm-ndbm.h, [ gdbm_ndbm=true; have_db=true ], [ gdbm_ndbm=false; have_db=false ])
24 if test $gdbm_ndbm = true; then
25 AC_DEFINE(HAVE_GDBM_NDBM_H, [1], [Define to 1 if you have the <gdbm-ndbm.h> header file.])
27 AS_UNSET([ac_cv_header_gdbm_ndbm_h])
28 AC_CHECK_HEADER(gdbm/ndbm.h, [ gdbm_ndbm_=true; have_db=true ], [ gdbm_ndbm_=false; have_db=false ])
29 if test $gdbm_ndbm_ = true; then
30 AC_DEFINE(HAVE_GDBM_NDBM_H_, [1], [Define to 1 if you have the <gdbm/ndbm.h> header file.])
37 if test $have_db = true; then
38 AC_CHECK_LIB(gdbm,dbm_open,found=true,found=false)
39 AC_CHECK_LIB(gdbm,dbm_fetch,,found=false)
40 AC_CHECK_LIB(gdbm,dbm_store,,found=false)
41 AC_CHECK_LIB(gdbm,dbm_close,,found=false)
43 if test $found = true; then
44 libgdbm="${libgdbm} -lgdbm"
48 AC_CHECK_LIB(gdbm_compat,dbm_open,found=true,found=false,-lgdbm)
49 AC_CHECK_LIB(gdbm_compat,dbm_fetch,,found=false,-lgdbm)
50 AC_CHECK_LIB(gdbm_compat,dbm_store,,found=false,-lgdbm)
51 AC_CHECK_LIB(gdbm_compat,dbm_close,,found="no",-lgdbm)
53 if test $found = true ; then
54 libgdbm="${libgdbm} -lgdbm_compat -lgdbm"