summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 12 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index ed58a36da..57cd22555 100644
--- a/configure.in
+++ b/configure.in
@@ -309,28 +309,35 @@ dnl will fail.
AC_CHECK_LIB(port, writev)
DBLIBOBJS=""
+libdb3=""
+libdb2=""
+libdb1=""
PTHREAD=""
dnl Check for Berkeley db3 API.
AC_CHECK_FUNC(db_create, [DBLIBOBJS="$DBLIBOBJS db3.c"],
AC_CHECK_LIB(db, db_create, [LIBS="$LIBS $PTHREAD"; DBLIBOBJS="$DBLIBOBJS db3.c"],
- AC_CHECK_LIB(db-3.0, db_create, [LIBS="$LIBS $PTHREAD"; DBLIBOBJS="$DBLIBOBJS db3.c"],,$PTHREAD))
+ AC_CHECK_LIB(db-3.1, db_create, [LIBS="$LIBS $PTHREAD"; DBLIBOBJS="$DBLIBOBJS db3.c" ; libdb3="-L /usr/lib -ldb-3.1"],
+ AC_CHECK_LIB(db-3.0, db_create, [LIBS="$LIBS $PTHREAD"; DBLIBOBJS="$DBLIBOBJS db3.c"; libdb3="-L /usr/lib -ldb-3.0"],,$PTHREAD)))
)
dnl Check for Berkeley db2 API.
dnl AC_CHECK_FUNC(db_open, [DBLIBOBJS="$DBLIBOBJS db2.c"],
-dnl AC_CHECK_LIB(db, db_open, [LIBS="$LIBS -ldb"; DBLIBOBJS="$DBLIBOBJS db2.c"])
+dnl AC_CHECK_LIB(db, db_open, [LIBS="$LIBS"; DBLIBOBJS="$DBLIBOBJS db2.c" ; libdb2="-L /usr/lib -ldb"])
dnl )
dnl Check for Berkeley db1 API retrofit to db2/db3 database.
dnl AC_CHECK_FUNC(dbopen, [DBLIBOBJS="$DBLIBOBJS db1.c"],
dnl AC_CHECK_LIB(db, dbopen, [DBLIBOBJS="$DBLIBOBJS db1.c"])
dnl )
dnl Check for Berkeley db1 API in glibc.
-AC_CHECK_LIB(db1, dbopen, [DBLIBOBJS="$DBLIBOBJS db1.c"])
+AC_CHECK_LIB(db1, dbopen, [DBLIBOBJS="$DBLIBOBJS db1.c" ; libdb1="-L /usr/lib -ldb1"])
if test X"$DBLIBOBJS" = X; then
- AC_MSG_ERROR([sorry rpm requires libdb.a or libdb1.a (from the Berkeley db package)])
+ AC_MSG_ERROR([sorry rpm requires libdb-3.x.a or libdb1.a (from the Berkeley db package)])
fi
-dnl AC_DEFINE_UNQUOTED(DBLIBOBJS, "$DBLIBOBJS")
+
AC_SUBST(DBLIBOBJS)
+AC_SUBST(libdb3)
+AC_SUBST(libdb2)
+AC_SUBST(libdb1)
for dbi in $DBLIBOBJS; do
case $dbi in