dnl CF_HASHED_DB version: 4 updated: 2010/05/29 16:31:02
dnl ------------
dnl Look for an instance of the Berkeley hashed database.
dnl
dnl $1 = optional parameter, to specify install-prefix for the database.
AC_DEFUN([CF_HASHED_DB],
[
ifelse([$1],,,[
case $1 in #(vi
yes|*able*) #(vi
    ;;
*)
    if test -d "$1" ; then
        CF_ADD_INCDIR($1/include)
        CF_ADD_LIBDIR($1/lib)
    fi
esac
])
AC_CHECK_HEADER(db.h,[
CF_HASHED_DB_VERSION
if test "$cf_cv_hashed_db_version" = unknown ; then
	AC_MSG_ERROR(Cannot determine version of db)
else
	CF_HASHED_DB_LIBS
	if test "$cf_cv_hashed_db_libs" = unknown ; then
		AC_MSG_ERROR(Cannot determine library for db)
	elif test "$cf_cv_hashed_db_libs" != default ; then
		CF_ADD_LIB($cf_cv_hashed_db_libs)
	fi
fi
],[
	AC_MSG_ERROR(Cannot find db.h)
])
])dnl
