Add BDB compatibility check. Require Berkeley DB 3.3 or greater.

This commit is contained in:
Kurt Zeilenga 2002-01-23 19:08:07 +00:00
parent cb8299d124
commit 1e7ca2e850
4 changed files with 662 additions and 640 deletions

View File

@ -417,12 +417,31 @@ if test $ac_cv_header_db_h = yes; then
fi
fi
])
dnl
dnl --------------------------------------------------------------------
dnl Check for version compatility with back-bdb
AC_DEFUN([OL_BDB_COMPAT],
[AC_CACHE_CHECK([Berkeley DB version for BDB backend], [ol_cv_bdb_compat],[
AC_EGREP_CPP(__db_version_compat,[
#include <db.h>
/* this check could be improved */
#ifndef DB_VERSION_MAJOR
# define DB_VERSION_MAJOR 1
#endif
/* require 3.3 or later */
#if DB_VERSION_MAJOR > 3
__db_version_compat
#elif DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR >= 3
__db_version_compat
#endif
], [ol_cv_bdb_compat=yes], [ol_cv_bdb_compat=no])])
])
dnl --------------------------------------------------------------------
dnl Find old Berkeley DB 1.85/1.86
AC_DEFUN([OL_BERKELEY_COMPAT_DB],
[ol_cv_berkeley_db=no
AC_CHECK_HEADERS(db_185.h db.h)
[AC_CHECK_HEADERS(db_185.h db.h)
if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
AC_CACHE_CHECK([if Berkeley DB header compatibility], [ol_cv_header_db1],[
AC_EGREP_CPP(__db_version_1,[

1256
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -799,8 +799,8 @@ dnl Checks for libraries
AC_CHECK_FUNC(dlopen, :, [AC_CHECK_LIB(dl, dlopen)])
dnl HP-UX requires -lV3
AC_CHECK_LIB(V3, sigset)
dnl HP-UX requires -lV3 (or not)
dnl AC_CHECK_LIB(V3, sigset)
dnl The following is INTENTIONALLY scripted out because shell does not
dnl support variable names with the '@' character, which is what
@ -1882,9 +1882,17 @@ if test $ol_with_ldbm_api = auto \
fi
if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
AC_MSG_ERROR(BerkeleyDB not available)
elif test $ol_enable_bdb != no -a $ol_link_ldbm != berkeley ; then
ol_enable_bdb=yes
AC_MSG_ERROR(BDB: BerkeleyDB not available)
elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
OL_BDB_COMPAT
if test $ol_cv_bdb_compat = yes ; then
ol_enable_bdb=yes
elif test $ol_enable_bdb = yes ; then
AC_MSG_ERROR(BDB: BerkeleyDB version incompatible)
else
ol_enable_bdb=no
fi
fi
if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then

View File

@ -580,9 +580,6 @@
/* Define if you have the <winsock2.h> header file. */
#undef HAVE_WINSOCK2_H
/* Define if you have the V3 library (-lV3). */
#undef HAVE_LIBV3
/* Define if you have the bind library (-lbind). */
#undef HAVE_LIBBIND