3 messages in net.sourceforge.lists.courier-users[courier-users] Patch to configure Be...
FromSent OnAttachments
Alessandro VeselyJul 27, 2006 8:17 am 
Sam VarshavchikJul 29, 2006 1:10 pm 
Alessandro VeselyJul 30, 2006 4:36 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Patch to configure Berkeley DB4 in authlibActions...
From:Alessandro Vesely (ves@tana.it)
Date:Jul 27, 2006 8:17:19 am
List:net.sourceforge.lists.courier-users

Sam, AC_CHECK_FUNC looks for functions and explicitly avoids macros, which fails with BDB 4.xx versions that decorate function names and #define db_env_create db_env_create_40xx.

The patch attached apparently works fine, after installing both http://ac-archive.sourceforge.net/Installed_Packages/ax_path_bdb.html http://ac-archive.sourceforge.net/Miscellaneous/ax_compare_version.html

In the root configure I set the -L and -I flags after the example given there, but on the (debian) system I worked on they didn't require any value. Perhaps that needs further tweaking...

--- courier-authlib-0.58/configure.in.original 2005-12-09 00:15:55.000000000
+0100 +++ courier-authlib-0.58/configure.in 2006-07-27 16:24:13.760368832 +0200 @@ -260,23 +260,16 @@ AC_CHECK_FUNC(gdbm_open, [ HAVE_GDBM=y ]) fi

-LIBS="$saveLIBS" - if test "$db" != "gdbm" then - AC_CHECK_LIB(db, dbopen, [ LIBDB=-ldb ; LIBS="-ldb $LIBS" ], - [ AC_CHECK_LIB(db, db_open, [ LIBDB=-ldb ; LIBS="-ldb $LIBS"], - [ AC_CHECK_LIB(db, db_env_create, - [ LIBDB=-ldb; LIBS="-ldb $LIBS"]) ] - )]) - - AC_CHECK_FUNC(dbopen, HAVE_BDB=1) - AC_CHECK_FUNC(db_open, HAVE_BDB=1) - AC_CHECK_FUNC(db_env_create, HAVE_BDB=1) + AX_PATH_BDB([1],[ + LIBDB="$BDB_LIBS" + LDFLAGS="$BDB_LDFLAGS $LDFLAGS" + CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS" + HAVE_BDB=1 + ]) fi

-LIBS="$saveLIBS" - if test "$HAVE_GDBM$HAVE_BDB" = "" then AC_MSG_ERROR(Cannot find either the gdbm or the db library.) --- courier-authlib-0.58/bdbobj/configure.in.original 2004-12-10
03:34:46.000000000 +0100 +++ courier-authlib-0.58/bdbobj/configure.in 2006-07-27 15:59:54.376285135 +0200 @@ -20,18 +20,11 @@

dnl Checks for libraries.

-saveLIBS="$LIBS" -AC_CHECK_LIB(db, dbopen, [ LIBDB=-ldb ; LIBS="-ldb $LIBS" ], - AC_CHECK_LIB(db, db_open, [ LIBDB=-ldb ; LIBS="-ldb $LIBS"], - AC_CHECK_LIB(db, db_env_create, [ LIBDB=-ldb; LIBS="-ldb $LIBS"]) - )) - FOUND_DB=0 -AC_CHECK_FUNC(dbopen, FOUND_DB=1) -AC_CHECK_FUNC(db_open, FOUND_DB=1) -AC_CHECK_FUNC(db_env_create, FOUND_DB=1) - -LIBS="$saveLIBS" +AX_PATH_BDB([1],[ + LIBDB="$BDB_LIBS" + FOUND_DB=1 +])

AC_SUBST(LIBDB)