]> git.pld-linux.org Git - packages/apr-util.git/blame - apr-util-db.patch
- Th uses db5.3 right now
[packages/apr-util.git] / apr-util-db.patch
CommitLineData
b1802398
JB
1--- apr-util-1.3.9/dbm/apr_dbm_berkeleydb.c.orig 2008-11-21 09:22:35.000000000 +0100
2+++ apr-util-1.3.9/dbm/apr_dbm_berkeleydb.c 2010-05-21 09:34:59.958939260 +0200
3@@ -37,7 +37,9 @@
4 * DB_185, DB2, DB3, and DB4.
5 */
6
7-#if defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 4)
8+#if defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR > 4)
9+#define DB_VER 4
10+#elif defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 4)
11 /* We will treat anything greater than 4.1 as DB4.
12 * We can treat 4.0 as DB3.
13 */
14--- apr-util-1.3.9/build/dbm.m4.orig 2008-11-21 07:32:58.000000000 +0100
15+++ apr-util-1.3.9/build/dbm.m4 2010-05-21 09:40:46.866935908 +0200
16@@ -112,7 +112,7 @@
17 changequote([,])
18 unset $cache_id
19 AC_CHECK_HEADER([$bdb_header], [
20- if test "$1" = "3" -o "$1" = "4"; then
21+ if test "$1" = "3" -o "$1" = "4" -o "$1" = "5"; then
22 # We generate a separate cache variable for each prefix and libname
23 # we search under. That way, we avoid caching information that
24 # changes if the user runs `configure' with a different set of
25@@ -522,6 +522,44 @@
26 apu_db_version=4
27 fi
28 ])
29+dnl
30+dnl APU_CHECK_DB48: is DB4.8 present?
31+dnl
32+dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
33+dnl
34+AC_DEFUN([APU_CHECK_DB48], [
35+ places=$1
36+ if test -z "$places"; then
37+ places="std /usr/local/BerkeleyDB.4.8 /boot/home/config"
38+ fi
39+ APU_CHECK_BERKELEY_DB("4", "8", "-1",
40+ "$places",
41+ "db48/db.h db4/db.h db.h",
42+ "db-4.8 db4-4.8 db48 db4 db"
43+ )
44+ if test "$apu_have_db" = "1"; then
45+ apu_db_version=4
46+ fi
47+])
48+dnl
49+dnl APU_CHECK_DB50: is DB5.0 present?
50+dnl
51+dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
52+dnl
53+AC_DEFUN([APU_CHECK_DB50], [
54+ places=$1
55+ if test -z "$places"; then
56+ places="std /usr/local/BerkeleyDB.5.0 /boot/home/config"
57+ fi
58+ APU_CHECK_BERKELEY_DB("5", "0", "-1",
59+ "$places",
60+ "db50/db.h db5/db.h db.h",
61+ "db-5.0 db5-5.0 db50 db5 db"
62+ )
63+ if test "$apu_have_db" = "1"; then
64+ apu_db_version=5
65+ fi
66+])
67
68 AC_DEFUN([APU_CHECK_DB], [
69 requested=$1
70@@ -606,6 +644,18 @@
71 AC_MSG_ERROR(Berkeley db4 not found)
72 fi
73 ;;
74+ db48)
75+ APU_CHECK_DB48("$check_places")
76+ if test "$apu_db_version" != "4"; then
77+ AC_MSG_ERROR(Berkeley db4 not found)
78+ fi
79+ ;;
80+ db50)
81+ APU_CHECK_DB50("$check_places")
82+ if test "$apu_db_version" != "5"; then
83+ AC_MSG_ERROR(Berkeley db5 not found)
84+ fi
85+ ;;
86 default)
87 APU_CHECK_DB_ALL("$check_places")
88 ;;
89@@ -618,6 +668,10 @@
90 AC_DEFUN([APU_CHECK_DB_ALL], [
91 all_places=$1
92
93+ APU_CHECK_DB50("$all_places")
94+ if test "$apu_db_version" != "5"; then
95+ APU_CHECK_DB48("$all_places")
96+ if test "$apu_db_version" != "4"; then
97 APU_CHECK_DB47("$all_places")
98 if test "$apu_db_version" != "4"; then
99 APU_CHECK_DB46("$all_places")
100@@ -652,6 +706,8 @@
101 fi
102 fi
103 fi
104+ fi
105+ fi
106 AC_MSG_CHECKING(for Berkeley DB)
107 if test "$apu_have_db" = "1"; then
108 AC_MSG_RESULT(found db$apu_db_version)
109@@ -679,11 +735,11 @@
110 apu_db_version=0
111
112 AC_ARG_WITH(dbm, [APR_HELP_STRING([--with-dbm=DBM], [choose the DBM type to use.
113- DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47}])],
114+ DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48,db50}])],
115 [
116 if test "$withval" = "yes"; then
117 AC_MSG_ERROR([--with-dbm needs to specify a DBM type to use.
118- One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47])
119+ One of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47,db48,db50])
120 fi
121 requested="$withval"
122 ], [
123@@ -882,6 +938,14 @@
124 apu_use_db=1
125 apu_default_dbm=db4
126 ;;
127+ db48)
128+ apu_use_db=1
129+ apu_default_dbm=db4
130+ ;;
131+ db50)
132+ apu_use_db=1
133+ apu_default_dbm=db5
134+ ;;
135 default)
136 dnl ### use more sophisticated DBMs for the default?
137 apu_default_dbm="sdbm (default)"
138@@ -889,7 +953,7 @@
139 ;;
140 *)
141 AC_MSG_ERROR([--with-dbm=$look_for is an unknown DBM type.
142- Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47])
143+ Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48, db50])
144 ;;
145 esac
146
This page took 0.092025 seconds and 4 git commands to generate.