]> git.pld-linux.org Git - packages/apr-util.git/blob - apr-util-db46.patch
- handle db4.6
[packages/apr-util.git] / apr-util-db46.patch
1 --- apr-util-1.2.8/build/dbm.m4.orig    2007-08-28 22:39:30.420428000 +0200
2 +++ apr-util-1.2.8/build/dbm.m4 2007-08-28 22:44:58.691135633 +0200
3 @@ -483,6 +483,25 @@
4      apu_db_version=4
5    fi
6  ])
7 +dnl
8 +dnl APU_CHECK_DB46: is DB4.6 present?
9 +dnl
10 +dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
11 +dnl
12 +AC_DEFUN([APU_CHECK_DB46], [
13 +  places=$1
14 +  if test -z "$places"; then
15 +    places="std /usr/local/BerkeleyDB.4.6 /boot/home/config"
16 +  fi
17 +  APU_CHECK_BERKELEY_DB("4", "5", "-1",
18 +    "$places",
19 +    "db46/db.h db4/db.h db.h",
20 +    "db-4.6 db4-4.6 db46 db4 db"
21 +  )
22 +  if test "$apu_have_db" = "1"; then
23 +    apu_db_version=4
24 +  fi
25 +])
26  
27  AC_DEFUN([APU_CHECK_DB], [
28    requested=$1
29 @@ -555,6 +574,12 @@
30        AC_MSG_ERROR(Berkeley db4 not found)
31      fi
32      ;;
33 +  db46)
34 +    APU_CHECK_DB46("$check_places")
35 +    if test "$apu_db_version" != "4"; then
36 +      AC_MSG_ERROR(Berkeley db4 not found)
37 +    fi
38 +    ;;
39    default)
40      APU_CHECK_DB_ALL("$check_places")
41      ;;
42 @@ -567,6 +592,8 @@
43  AC_DEFUN([APU_CHECK_DB_ALL], [
44    all_places=$1
45   
46 + APU_CHECK_DB46("$all_places")
47 + if test "$apu_db_version" != "4"; then
48    APU_CHECK_DB45("$all_places")
49    if test "$apu_db_version" != "4"; then
50      APU_CHECK_DB44("$all_places")
51 @@ -595,6 +622,7 @@
52        fi
53      fi
54    fi
55 + fi
56    AC_MSG_CHECKING(for Berkeley DB)
57    if test "$apu_have_db" = "1"; then
58      AC_MSG_RESULT(found db$apu_db_version)
59 @@ -623,11 +651,11 @@
60  
61    AC_ARG_WITH(dbm, [
62      --with-dbm=DBM          choose the DBM type to use.
63 -      DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45}
64 +      DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46}
65    ], [
66      if test "$withval" = "yes"; then
67        AC_MSG_ERROR([--with-dbm needs to specify a DBM type to use.
68 -        One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45])
69 +        One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46])
70      fi
71      requested="$withval"
72    ], [
73 @@ -817,6 +845,10 @@
74        apu_use_db=1
75        apu_default_dbm=db4
76        ;;
77 +    db46)
78 +      apu_use_db=1
79 +      apu_default_dbm=db4
80 +      ;;
81      default)
82        dnl ### use more sophisticated DBMs for the default?
83        apu_default_dbm="sdbm (default)"
84 @@ -824,7 +856,7 @@
85        ;;
86      *)
87        AC_MSG_ERROR([--with-dbm=$look_for is an unknown DBM type.
88 -        Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44 db45])
89 +        Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44 db45 db46])
90        ;;
91    esac
92  
This page took 0.028085 seconds and 3 git commands to generate.