Kaydet (Commit) 56fc453f authored tarafından Robert Nagy's avatar Robert Nagy

use /usr/include/db.h as a last resort for berlekey db

the berkeley db header is installed as /usr/local/db.h
on debian/ubuntu
üst f5b4d0aa
...@@ -4551,7 +4551,8 @@ if test -n "$with_system_db" -o -n "$with_system_libs" && \ ...@@ -4551,7 +4551,8 @@ if test -n "$with_system_db" -o -n "$with_system_libs" && \
done done
if test "$DB_INCLUDES" = ""; then if test "$DB_INCLUDES" = ""; then
AC_MSG_ERROR(no. install the db4-dev package) AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include; db_header="db.h" ],
[ AC_MSG_ERROR(no. install the db4-dev package) ])
fi fi
AC_MSG_CHECKING([whether db is at least 4.1]) AC_MSG_CHECKING([whether db is at least 4.1])
AC_TRY_RUN([ AC_TRY_RUN([
...@@ -4563,7 +4564,7 @@ int main(int argc, char **argv) { ...@@ -4563,7 +4564,7 @@ int main(int argc, char **argv) {
} }
], [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" save_LIBS="$LIBS"
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, db_create, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; LIBS="-ldb$dbver $LIBS"; break ])
done done
AC_CHECK_FUNC(db_create, [], [ AC_MSG_ERROR([db not installed or functional]) ]) AC_CHECK_FUNC(db_create, [], [ AC_MSG_ERROR([db not installed or functional]) ])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment