summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-01-06 20:47:15 +0100
committerPetr Mladek <pmladek@suse.cz>2011-01-06 20:47:15 +0100
commit7a5b94f877de62eb9cd46954ba3a67e465625003 (patch)
tree2f87d2334e89899972d79155eafb9240de1176fc
parente3583d232c311aed5e04a3ebb99d37335c7cd86f (diff)
Fix check for BerkleyDB when db_create is macro
It seems more safe to check for dbopen; it has just one other variant in db-3, see http://lists.debian.org/debian-devel/2001/04/msg01770.html
-rw-r--r--configure.in12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 266f7e3eb..409c756bc 100644
--- a/configure.in
+++ b/configure.in
@@ -4312,12 +4312,16 @@ int main(int argc, char **argv) {
else return 1;
}
], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])])
- save_LIBS="$LIBS"
+ DB_LIB=
for dbver in '' -5.1 5.1 -5.0 5.0 -5 5 -4.8 4.8 -4.7 4.7 -4 4; do
- AC_CHECK_LIB(db$dbver, db_create, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; LIBS="-ldb$dbver $LIBS"; break ])
+ AC_CHECK_LIB(db$dbver, dbopen, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ] ,
+ AC_CHECK_LIB(db$dbver, __db185_open, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ]
+ )
+ )
done
- AC_CHECK_FUNC(db_create, [], [ AC_MSG_ERROR([db not installed or functional]) ])
- LIBS="$save_LIBS"
+ if test -z "$DB_LIB" ; then
+ AC_MSG_ERROR([db not installed or functional])
+ fi
SCPDEFS="$SCPDEFS -DSYSTEM_DB"
else
AC_MSG_RESULT([internal])