apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jani Averbach <...@jaa.iki.fi>
Subject [PATCH] Add BDB 4.3 support to the apr-util/build/dbm.m4
Date Wed, 22 Sep 2004 01:59:19 GMT

Hello, 

This patch adds support for 'sometime in the future to be released'
Berkeley DB 4.3.

BR, Jani

Log:

Add support for db43 target (for BDB 4.3).

* build/dbm.m4
   (APU_CHECK_DB43): New function to check BDB 4.3
   (APU_CHECK_DB): Added db43 target
   (APU_CHECK_DB_ALL): Added top most check for db43
   (APU_CHECK_DBM): Document that we could do db43 and add db43 target


Index: build/dbm.m4
===================================================================
RCS file: /home/cvspublic/apr-util/build/dbm.m4,v
retrieving revision 1.11
diff -u -r1.11 dbm.m4
--- build/dbm.m4	15 Jun 2004 10:50:33 -0000	1.11
+++ build/dbm.m4	22 Sep 2004 01:42:46 -0000
@@ -410,6 +410,25 @@
     apu_db_version=4
   fi
 ])
+dnl
+dnl APU_CHECK_DB43: is DB4.3 present?
+dnl
+dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
+dnl
+AC_DEFUN(APU_CHECK_DB43, [
+  places=$1
+  if test -z "$places"; then
+    places="std /usr/local/BerkeleyDB.4.3 /boot/home/config"
+  fi
+  APU_CHECK_BERKELEY_DB("4", "3", "-1",
+    "$places",
+    "db43/db.h db4/db.h db.h",
+    "db-4.3 db43 db4 db"
+  )
+  if test "$apu_have_db" = "1"; then
+    apu_db_version=4
+  fi
+])
 
 
 AC_DEFUN(APU_CHECK_DB, [
@@ -465,6 +484,12 @@
       AC_MSG_ERROR(Berkeley db4 not found)
     fi
     ;;
+  db43)
+    APU_CHECK_DB43("$check_places")
+    if test "$apu_db_version" != "4"; then
+      AC_MSG_ERROR(Berkeley db4 not found)
+    fi
+    ;;
   default)
     APU_CHECK_DB_ALL("$check_places")
     ;;
@@ -472,24 +497,27 @@
 ])
 
 dnl
-dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 4.2 to 1.
+dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 4.3 to 1.
 dnl
 AC_DEFUN(APU_CHECK_DB_ALL, [
   all_places=$1
  
-  APU_CHECK_DB42("$all_places")
+  APU_CHECK_DB43("$all_places")
   if test "$apu_db_version" != "4"; then
-    APU_CHECK_DB41("$all_places")
+    APU_CHECK_DB42("$all_places")
     if test "$apu_db_version" != "4"; then
-      APU_CHECK_DB4("$all_places")
+      APU_CHECK_DB41("$all_places")
       if test "$apu_db_version" != "4"; then
-        APU_CHECK_DB3("$all_places")
-        if test "$apu_db_version" != "3"; then
-          APU_CHECK_DB2("$all_places")
-          if test "$apu_db_version" != "2"; then
-            APU_CHECK_DB1("$all_places")
-            if test "$apu_db_version" != "1"; then
-              APU_CHECK_DB185("$all_places")
+        APU_CHECK_DB4("$all_places")
+        if test "$apu_db_version" != "4"; then
+          APU_CHECK_DB3("$all_places")
+          if test "$apu_db_version" != "3"; then
+            APU_CHECK_DB2("$all_places")
+            if test "$apu_db_version" != "2"; then
+              APU_CHECK_DB1("$all_places")
+              if test "$apu_db_version" != "1"; then
+                APU_CHECK_DB185("$all_places")
+              fi
             fi
           fi
         fi
@@ -524,11 +552,11 @@
 
   AC_ARG_WITH(dbm, [
     --with-dbm=DBM          choose the DBM type to use.
-      DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42}
+      DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43}
   ], [
     if test "$withval" = "yes"; then
       AC_MSG_ERROR([--with-dbm needs to specify a DBM type to use.
-        One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42])
+        One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43])
     fi
     requested="$withval"
   ], [
@@ -703,6 +731,10 @@
       apu_default_dbm=db4
       ;;
     db42)
+      apu_use_db=1
+      apu_default_dbm=db4
+      ;;
+    db43)
       apu_use_db=1
       apu_default_dbm=db4
       ;;
 

-- 
Jani Averbach

Mime
View raw message