+fi
+if test "$have_libdb" = "yes" -a "$have_db_h" = "yes"; then
+ AC_DEFINE(HAVE_LIBDB4, 1, [libdb found])
+ backends="$backends db4"
+fi
+
+AC_MSG_CHECKING(available backends)
+AC_MSG_RESULT($backends)
+
+AC_ARG_ENABLE(backend,AC_HELP_STRING([--enable-backend=<backend>],[Choose the backend database to use. Defaults to dynamic.]), [], [enable_backend="dynamic"])
+
+AC_ARG_ENABLE(keyd,AC_HELP_STRING([--enable-keyd],[Use keyd as the DB backend.]), [], [])
+
+AC_MSG_CHECKING([which key database backend to use])
+AC_MSG_RESULT([$enable_backend])
+AC_CHECK_FILE([$srcdir/keydb_$enable_backend.c], ,AC_MSG_ERROR([non existent key database backend $enable_backend]))
+
+if test "x$enable_backend" = "xdb4"
+then