From bed61632d7a89025e5854810e768d5c4e4e4996d Mon Sep 17 00:00:00 2001 From: jbj Date: Sun, 11 Jun 2000 19:15:27 +0000 Subject: Fix db return code handling, majorly horked. Autoconf detection of db-3.1. Move --all to query/verify popt table. CVS patchset: 3829 CVS date: 2000/06/11 19:15:27 --- configure.in | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'configure.in') 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 -- cgit v1.2.3