forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
maildrop-2.5.1-db.patch
63 lines (59 loc) · 2.45 KB
/
maildrop-2.5.1-db.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--- maildrop/bdbobj/configure.in
+++ maildrop/bdbobj/configure.in
@@ -23,15 +23,19 @@
dnl Checks for libraries.
saveLIBS="$LIBS"
-AC_CHECK_LIB(db, dbopen, [ LIBDB=-ldb ; LIBS="-ldb $LIBS" ],
- AC_CHECK_LIB(db, db_open, [ LIBDB=-ldb ; LIBS="-ldb $LIBS"],
- AC_CHECK_LIB(db, db_env_create, [ LIBDB=-ldb; LIBS="-ldb $LIBS"])
- ))
+for dbname in db-5.2 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db
+ do
+ AC_CHECK_LIB($dbname, db_create_4002, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ],
+ AC_CHECK_LIB($dbname, db_create_4001, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ],
+ AC_CHECK_LIB($dbname, db_create_4000, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ],
+ AC_CHECK_LIB($dbname, db_create, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ]))))
+ done
FOUND_DB=0
-AC_CHECK_FUNC(dbopen, FOUND_DB=1)
-AC_CHECK_FUNC(db_open, FOUND_DB=1)
-AC_CHECK_FUNC(db_env_create, FOUND_DB=1)
+AC_CHECK_FUNC(db_create, FOUND_DB=1)
+AC_CHECK_FUNC(db_create_4002, FOUND_DB=1)
+AC_CHECK_FUNC(db_create_4001, FOUND_DB=1)
+AC_CHECK_FUNC(db_create_4000, FOUND_DB=1)
LIBS="$saveLIBS"
--- maildrop/configure.in
+++ maildrop/configure.in
@@ -115,18 +115,21 @@
USE_GDBM=1
;;
db)
- AC_CHECK_LIB(db, dbopen, [ LIBDB=-ldb ; LIBS="-ldb $LIBS" ],
- AC_CHECK_LIB(db, db_open, [ LIBDB=-ldb ; LIBS="-ldb $LIBS"],
- AC_CHECK_LIB(db, db_env_create,
- [ LIBDB=-ldb; LIBS="-ldb $LIBS"])
- ))
-
- AC_CHECK_FUNC(dbopen, HAVE_BDB=1)
- AC_CHECK_FUNC(db_open, HAVE_BDB=1)
- AC_CHECK_FUNC(db_env_create, HAVE_BDB=1)
+ for dbname in db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db
+ do
+ AC_CHECK_LIB($dbname, db_create_4002, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ],
+ AC_CHECK_LIB($dbname, db_create_4001, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ],
+ AC_CHECK_LIB($dbname, db_create_4000, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ],
+ AC_CHECK_LIB($dbname, db_create, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ]))))
+ done
+ AC_CHECK_FUNC(db_create, HAVE_BDB=1)
+ AC_CHECK_FUNC(db_create_4002, HAVE_BDB=1)
+ AC_CHECK_FUNC(db_create_4001, HAVE_BDB=1)
+ AC_CHECK_FUNC(db_create_4000, HAVE_BDB=1)
+
if test "$HAVE_BDB" != "1"
then
- AC_MSG_ERROR(GDBM library not found)
+ AC_MSG_ERROR(DB library not found)
fi
dblibrary=bdbobj/libbdbobj.la
USE_DB=1