[PATCH] combined check for system BerkleyDB (fdo#33230)

Petr Mladek pmladek at suse.cz
Fri Jan 21 10:04:00 PST 2011


There are BerkleyDB installations that provides neither dbopen
nor __db185_open. Let's use more complex fallback to all
known symbols.

---
 configure.in |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/configure.in b/configure.in
index db20f9d..80469cb 100644
--- a/configure.in
+++ b/configure.in
@@ -4312,8 +4312,16 @@ int main(int argc, char **argv) {
     ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])])
     DB_LIB=
     for dbver in '' -5.1 5.1 -5.0 5.0 -5 5 -4.8 4.8 -4.7 4.7 -4 4; do
-        AC_CHECK_LIB(db$dbver, dbopen, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ] ,
-            AC_CHECK_LIB(db$dbver, __db185_open, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ]
+        AC_CHECK_LIB(db$dbver, db_create, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ] ,
+            AC_CHECK_LIB(db$dbver, dbopen, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ] ,
+                AC_CHECK_LIB(db$dbver, db_create_4008, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ] ,
+                    AC_CHECK_LIB(db$dbver, db_create_4007, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ] ,
+                        AC_CHECK_LIB(db$dbver, db_create_4004, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ] ,
+                            AC_CHECK_LIB(db$dbver, __db185_open, [ DB_LIB="db$dbver"; DB_CPPLIB="db_cxx$dbver"; break; ]
+                            )
+                        )
+                    )
+                )
             )
         )
     done
-- 
1.7.3.4


--=-8Tt/RfIgPl5twynf5syI--



More information about the LibreOffice mailing list