Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 169526
Collapse All | Expand All

(-)patches/src680.orig/system-db-check.diff (-2 / +2 lines)
Lines 12-18 Link Here
12
-             [ AC_MSG_ERROR(no. install the db4 libraries) ], []+             )
12
-             [ AC_MSG_ERROR(no. install the db4 libraries) ], []+             )
13
-        ], []
13
-        ], []
14
-    )
14
-    )
15
+    for dbver in -4.4 4.4 -4.3 4.3 -4.2 4.2 -4.1 4.1 -4 4 ''; do
15
+    for dbver in -4.5 4.5 -4.4 4.4 -4.3 4.3 -4.2 4.2 -4.1 4.1 -4 4 ''; do
16
+       AC_CHECK_HEADER(db$dbver/db.h, [ DB_INCLUDES="/usr/include/db$dbver"; break ])
16
+       AC_CHECK_HEADER(db$dbver/db.h, [ DB_INCLUDES="/usr/include/db$dbver"; break ])
17
+    done
17
+    done
18
+    if test "$DB_INCLUDES" = ""; then
18
+    if test "$DB_INCLUDES" = ""; then
Lines 31-37 Link Here
31
-    AC_HAVE_LIBRARY(db, [],
31
-    AC_HAVE_LIBRARY(db, [],
32
-      [AC_MSG_ERROR([db not installed or functional])], [])
32
-      [AC_MSG_ERROR([db not installed or functional])], [])
33
+    save_LIBS="$LIBS"
33
+    save_LIBS="$LIBS"
34
+    for dbver in -4.4 4.4 -4.3 4.3 -4.2 4.2 -4.1 4.1 -4 4 ''; do
34
+    for dbver in -4.5 4.5 -4.4 4.4 -4.3 4.3 -4.2 4.2 -4.1 4.1 -4 4 ''; do
35
+       AC_CHECK_LIB(db$dbver, db_create, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; LIBS="-ldb$dbver $LIBS"; break ])
35
+       AC_CHECK_LIB(db$dbver, db_create, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; LIBS="-ldb$dbver $LIBS"; break ])
36
+    done
36
+    done
37
+    AC_CHECK_FUNC(db_create, [], [ AC_MSG_ERROR([db not installed or functional]) ])
37
+    AC_CHECK_FUNC(db_create, [], [ AC_MSG_ERROR([db not installed or functional]) ])

Return to bug 169526