summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 936b22d..2f517b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,7 +71,14 @@ AC_CHECK_HEADER([zlib.h],, [AC_MSG_ERROR([*** Sorry, you have to install the zli
# Check for Berkeley DB (needs to be improved)
AC_CHECK_HEADER([db.h],, [AC_MSG_ERROR([*** Sorry, you have to install the Berkeley Database Library (libdb) 4.3 or newer ***])])
-AC_CHECK_LIB([db], [__db_db_create_4003],, [AC_MSG_ERROR([*** Sorry, you have to install the Berkeley Database Library (libdb) 4.3 or newer ***])])
+
+flag=0
+AC_CHECK_LIB([db], [__db_db_create_4003],[flag=1])
+AC_CHECK_LIB([db], [__db_db_create_4004],[flag=1])
+
+if test "x$flag" = "x0" ; then
+ AC_MSG_ERROR([*** Sorry, you have to install the Berkeley Database Library (libdb) 4.3/4.4 ***])
+fi
LIBS="$LIBS -ldb"
# Checking libdb version number
@@ -79,7 +86,7 @@ AC_MSG_CHECKING([for Berkeley libdb 4.3])
AC_LANG_PUSH(C)
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <db.h>
-#if (DB_VERSION_MAJOR != 4) || (DB_VERSION_MINOR != 3)
+#if (DB_VERSION_MAJOR != 4) || (DB_VERSION_MINOR != 3 && DB_VERSION_MINOR != 4)
#error "foo"
#endif
]])],