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
This commit is contained in:
parent
cefb311257
commit
2867342bbb
1 changed files with 8 additions and 4 deletions
12
configure.in
12
configure.in
|
@ -4312,12 +4312,16 @@ int main(int argc, char **argv) {
|
||||||
else return 1;
|
else return 1;
|
||||||
}
|
}
|
||||||
], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.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
|
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
|
done
|
||||||
AC_CHECK_FUNC(db_create, [], [ AC_MSG_ERROR([db not installed or functional]) ])
|
if test -z "$DB_LIB" ; then
|
||||||
LIBS="$save_LIBS"
|
AC_MSG_ERROR([db not installed or functional])
|
||||||
|
fi
|
||||||
SCPDEFS="$SCPDEFS -DSYSTEM_DB"
|
SCPDEFS="$SCPDEFS -DSYSTEM_DB"
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([internal])
|
AC_MSG_RESULT([internal])
|
||||||
|
|
Loading…
Reference in a new issue