apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Martin <phi...@codematters.co.uk>
Subject [PATCH] allow apr-util to detect Debian's db4.0
Date Mon, 16 Dec 2002 23:19:26 GMT
Hello

Debian provides a db4 with configured with --with-uniquenames so the
symbols are suffixed _4000.  apr-util attempts to detect db4 using
AC_CHECK_LIB which generates programs like

char db_create();

int main() {
db_create()
; return 0; }

Since this doesn't include the db.h header file it fails to link and
so the db4 detection fails.

I don't know whether apr-util is supposed to detect all possible db
installations, but the following patch detects Debian's db4.


Look for the symbol db_create_4000 (as used by Debian) when checking
for db4.

Index: build/apu-conf.m4
===================================================================
RCS file: /home/cvspublic/apr-util/build/apu-conf.m4,v
retrieving revision 1.47
diff -u -r1.47 apu-conf.m4
--- build/apu-conf.m4	15 Dec 2002 19:36:41 -0000	1.47
+++ build/apu-conf.m4	16 Dec 2002 22:29:44 -0000
@@ -144,12 +144,17 @@
   ])])])
 if test "$apu_db_version" != "4"; then
 AC_CHECK_HEADER(db.h, [
+  AC_CHECK_LIB(db, db_create_4000, [
+  apu_db_header=db.h
+  apu_db_lib=db
+  apu_db_version=4
+  ], [
   AC_CHECK_LIB(db, db_create, [
     AC_CHECK_LIB(db, lock_get, [], [
         apu_db_header=db.h
         apu_db_lib=db
         apu_db_version=4
-    ])])])
+    ])])])])
 fi
 ])
 

-- 
Philip Martin

Mime
View raw message