You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jani Averbach <ja...@jaa.iki.fi> on 2004/09/22 03:59:19 UTC

[PATCH] Add BDB 4.3 support to the apr-util/build/dbm.m4

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

Re: [PATCH] Add BDB 4.3 support to the apr-util/build/dbm.m4

Posted by Jani Averbach <ja...@jaa.iki.fi>.
On 2004-09-23 13:26+0100, Joe Orton wrote:
> On Tue, Sep 21, 2004 at 07:59:19PM -0600, Jani Averbach wrote:
> > This patch adds support for 'sometime in the future to be released'
> > Berkeley DB 4.3.
> 
> a.k.a. make apr-util/configure another three times slower :)
> 

No comments. =)

> Thanks Jani, committed to HEAD, I guess it applies the same to 0.9.x and
> should be done there too...

There is one little difference:

0.9.x:
  APU_CHECK_BERKELEY_DB("4", "1", "-1",
    "$places",
    "db41/db.h db4/db.h db.h",
    "db-4.1 db4 db"
  )
...
  APU_CHECK_BERKELEY_DB("4", "2", "-1",
    "$places",
    "db42/db.h db4/db.h db.h",
    "db-4.2 db4 db"
  )


When 1.0.x uses:
  APU_CHECK_BERKELEY_DB("4", "1", "-1",
    "$places",
    "db41/db.h db4/db.h db.h",
    "db-4.1 db41 db4 db"
  )         ^^^^
...
  APU_CHECK_BERKELEY_DB("4", "2", "-1",
    "$places",
    "db42/db.h db4/db.h db.h",
    "db-4.2 db42 db4 db"
  )         ^^^^

I don't know why there is this difference. So, if it was there by
intention, then the patch should be changed to use:

  APU_CHECK_BERKELEY_DB("4", "3", "-1",
    "$places",
    "db43/db.h db4/db.h db.h",
    "db-4.3 db4 db"
  )

if not, perhaps we should haul the whole file from 1.0.x to the 0.9.x? 

*shrug*

BR, Jani

-- 
Jani Averbach

Re: [PATCH] Add BDB 4.3 support to the apr-util/build/dbm.m4

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Sep 21, 2004 at 07:59:19PM -0600, Jani Averbach wrote:
> This patch adds support for 'sometime in the future to be released'
> Berkeley DB 4.3.

a.k.a. make apr-util/configure another three times slower :)

Thanks Jani, committed to HEAD, I guess it applies the same to 0.9.x and
should be done there too...

joe