[PATCH] Configure fails to find -ldb

Francois Tigeot ftigeot at wolfpond.org
Thu Nov 22 12:53:54 PST 2012


Hi,

There's a small configure issue present in both -master and 4.0.0.0.alpha1:

...
checking for dbopen in -ldb... no
checking for __db185_open in -ldb... no
checking for dbopen in -ldb-$dbver... no
checking for __db185_open in -ldb-$dbver... no
checking for dbopen in -ldb$dbver... no
checking for __db185_open in -ldb$dbver... no
checking for dbopen in -ldb... (cached) no
checking for __db185_open in -ldb... (cached) no
configure: error: db library not found. Use the correct -L flag,
or install the Berkeley db development package.
Error running configure at ./autogen.sh line 192.

and is fixed by the attached patch.

Single quotes were used around a variable name in configure.ac, leading
it to check for files containing the verbatim variable name instead of
its content.

-- 
Francois Tigeot
-------------- next part --------------
>From 917a37edffc0d382b273e00b0e98683a97c5c72f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Tigeot?= <ftigeot at wolfpond.org>
Date: Thu, 22 Nov 2012 21:41:13 +0100
Subject: [PATCH] configure: fix check for libdb

Single quotes were used around a variable name in configure.ac, leading
configure to check for libraries named variations of libdb-$dbver.so
instead of the correct libdb-5.so.
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 20299e9..7d5a38a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7483,7 +7483,7 @@ if test "$with_system_db" = "yes"; then
     DB_LIB=
     dnl At least on OpenBSD and RHEL-6 dbver is not appended to the library
     dnl even though the headers are in a versioned dir
-    for suffix in '' '-$dbver' '$dbver' ''; do
+    for suffix in '' "-$dbver" "$dbver"; do
         AC_CHECK_LIB(db$suffix, dbopen,
             [ DB_LIB="db$suffix"; DB_CPPLIB="db_cxx$suffix"; break ])
         AC_CHECK_LIB(db$suffix, __db185_open,
-- 
1.7.12



More information about the LibreOffice mailing list