From e0e2d305e59231485377eae91e16de2441b205ba Mon Sep 17 00:00:00 2001 From: Martin Ebourne Date: Wed, 28 Dec 2005 11:38:04 +0000 Subject: Now supports Berkeley DB versions >= 4.1 in addition to 1.x. The versions inbetween are not supported because they require code changes and I don't have them available to test against. --- configure.ac | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 42cce8c1..1aafb39d 100644 --- a/configure.ac +++ b/configure.ac @@ -32,14 +32,26 @@ fi if test "$target_os" != "mingw32" -a "$target_os" != "winnt"; then AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes], - [AC_MSG_ERROR([[Cannot find a short sleep function (nanosleep)]])]) + [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])]) fi -AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[Cannot find zlib]])]) -AX_CHECK_BDB_V1 +AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[cannot find zlib]])]) VL_LIB_READLINE have_libreadline=no test "x$vl_cv_lib_readline" != "xno" && have_libreadline=yes +## Check for Berkely DB. Restrict to certain versions +AX_PATH_BDB(, [ + LIBS="$BDB_LIBS $LIBS" + LDFLAGS="$BDB_LDFLAGS $LDFLAGS" + CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS" + + AX_COMPARE_VERSION([$BDB_VERSION],[ge],[4.1],, + [AX_COMPARE_VERSION([$BDB_VERSION],[lt],[2],, + [AC_MSG_ERROR([[only Berkely DB versions 1.x or at least 4.1 are currently supported]])] + )] + ) + AX_SPLIT_VERSION([BDB_VERSION], [$BDB_VERSION]) +]) ## Check for Open SSL, use old versions only if explicitly requested AX_CHECK_SSL(, [AC_MSG_ERROR([[OpenSSL is not installed but is required]])]) @@ -178,7 +190,7 @@ without these features, but will work better where they are present. Refer to the documentation for more information on each feature. Large files: $have_large_file_support -Berkeley DB: $ac_have_bdb +Berkeley DB: $ax_path_bdb_ok Readline: $have_libreadline Extended attributes: $ac_cv_header_sys_xattr_h EOC @@ -204,8 +216,3 @@ as this would violate the GNU readline licence, which is GPL. You may use libedit or libeditline instead.]]) ;; esac - -if test "x$ac_have_bdb" != "xyes"; then - echo - AC_MSG_WARN([[db is not installed -- will run in reduced efficiency mode without it]]) -fi -- cgit v1.2.3