PATCH

Matthias Andree matthias.andree at gmx.de
Tue Nov 25 12:57:36 CET 2003


On Tue, 25 Nov 2003, Matthias Andree wrote:

> I'd like to see Torsten's config.log (before the patch).

Torsten sent me his log and I've found the bug (it was in configure.ac),
this incremental patch (on top of the previous) should fix it. It is
from CVS, so it may or may not apply to 0.15.9. Cause was that there was
an extra LIBS="$saveLIBS" that, when TDB was configured, would overwrite
LIBS with an empty value. It got unnoticed because saveLIBS is
initialized in DB mode. The @@ -328,9 +323,12 @@ hunk is the important
one, the rest is clean-up and consolidation.

Index: configure.ac
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/configure.ac,v
retrieving revision 1.195
diff -u -r1.195 configure.ac
--- configure.ac	25 Nov 2003 00:06:41 -0000	1.195
+++ configure.ac	25 Nov 2003 11:53:25 -0000
@@ -215,19 +215,14 @@
 AC_CHECK_FUNCS(alarm bzero ftruncate memset mkdir socket strdup strerror flock lockf fcntl strchr strrchr memcpy munmap pow sqrt strcasecmp strcspn strspn strstr snprintf vsnprintf)
 AC_REPLACE_FUNCS(strlcpy strlcat)
 
+AC_LIB_RPATH
+
 WITH_DB_ENGINE=db
 AC_ARG_WITH(database,
 	    AC_HELP_STRING([--with-database=ENGINE],
 	    [Choose database engine {db|tdb|qdbm} [[ENGINE=db]]]),
 	    [ WITH_DB_ENGINE=$withval ]
 )
-case "x$WITH_DB_ENGINE" in
-    xdb|xtdb|xqdbm) : ;;
-    *) AC_MSG_ERROR([Invalid --with-database argument. Supported engines are db, tdb, qdbm.])
-    ;;
-esac
-
-AC_LIB_RPATH
 
 case "x$WITH_DB_ENGINE" in
     xtdb)
@@ -236,7 +231,7 @@
 	AC_DEFINE_UNQUOTED(DB_EXT, ".tdb", [database file extension])
 	AC_LIB_LINKFLAGS([tdb])
 	LIBDB="$LIBTDB"
-	save_LIBS="$LIBS"
+	saveLIBS="$LIBS"
 	LIBS="$LIBS $LIBDB"
 	AC_LINK_IFELSE([AC_LANG_PROGRAM([
 #include <sys/types.h>
@@ -244,7 +239,7 @@
 	], [
 	    TDB_CONTEXT *t = tdb_open("", 0, 0, 0, 0);
 	])],,AC_MSG_ERROR(Cannot link to tdb library.))
-	LIBS="$save_LIBS"
+	LIBS="$saveLIBS"
     ;;
     xqdbm)
 	AC_DEFINE(ENABLE_QDBM_DATASTORE,1, [Enable qdbm datastore])
@@ -252,7 +247,7 @@
 	AC_DEFINE_UNQUOTED(DB_EXT, ".qdbm")
 	AC_LIB_LINKFLAGS([qdbm])
 	LIBDB="$LIBQDBM"
-	save_LIBS="$LIBS"
+	saveLIBS="$LIBS"
 	LIBS="$LIBS $LIBDB"
 	AC_LINK_IFELSE([AC_LANG_PROGRAM([
 #include <stdlib.h>
@@ -260,7 +255,7 @@
 	], [
 	    DEPOT *d = dpopen("", 0, 0);
 	])],,AC_MSG_ERROR(Cannot link to qdbm library.))
-	LIBS="$save_LIBS"
+	LIBS="$saveLIBS"
     ;;
     xdb)
 	dnl check if we need LIBDB at all (it is harmful on BSD since
@@ -328,9 +323,12 @@
 You can download BerkeleyDB 4.1.x from http://www.sleepycat.com/]]),
 	[[#include <db.h>]]
 	)
+	LIBS="$saveLIBS"
+    ;;
+    *)
+	AC_MSG_ERROR([Invalid --with-database argument. Supported engines are db, tdb, qdbm.])
     ;;
 esac
-LIBS="$saveLIBS"
 
 AM_CONDITIONAL(ENABLE_TDB_DATASTORE, test "x$WITH_DB_ENGINE" = "xtdb")
 AM_CONDITIONAL(ENABLE_QDBM_DATASTORE, test "x$WITH_DB_ENGINE" = "xqdbm")
@@ -463,7 +461,7 @@
 AM_PATH_GSL(1.0, AC_DEFINE(HAVE_GSL_10,,[Define if you have GNU Scientific Library 1.0 or newer])
 need_my_gsl=0)
 if test "$need_my_gsl" = 1 ; then
-  GSL_LIBS="libbf_gsl.a -lm"
+  GSL_LIBS="libbf_gsl.a"
 fi
 
 PATH="$PATH_SAVED"





More information about the Bogofilter mailing list