Improve the detection of static libdb files
Resolves: rhbz#1947971 Sync with Fedora commit (cherry picked from commit 6284b7d8b7aadba6a468df348ffca7c67b13aad5)
This commit is contained in:
parent
20d1601ddb
commit
b37417ce44
@ -13,32 +13,17 @@ diff -up cyrus-sasl-2.1.27/configure.ac.frombdb cyrus-sasl-2.1.27/configure.ac
|
||||
plugindir=$withval,
|
||||
diff -up cyrus-sasl-2.1.27/m4/berkdb.m4.frombdb cyrus-sasl-2.1.27/m4/berkdb.m4
|
||||
--- cyrus-sasl-2.1.27/m4/berkdb.m4.frombdb 2016-01-29 18:35:35.000000000 +0100
|
||||
+++ cyrus-sasl-2.1.27/m4/berkdb.m4 2021-04-28 15:36:37.320675385 +0200
|
||||
@@ -286,3 +286,25 @@ AC_DEFUN([CYRUS_BERKELEY_DB_CHK],
|
||||
+++ cyrus-sasl-2.1.27/m4/berkdb.m4 2021-05-04 15:58:12.266748283 +0200
|
||||
@@ -286,3 +286,10 @@ AC_DEFUN([CYRUS_BERKELEY_DB_CHK],
|
||||
|
||||
CPPFLAGS=$cmu_save_CPPFLAGS
|
||||
])
|
||||
+
|
||||
+AC_DEFUN([CYRUS_BERKELEY_DB_STATIC_LIB],
|
||||
+[
|
||||
+ BDB_SAVE_LDFLAGS=$LDFLAGS
|
||||
+
|
||||
+ saved_LIBS=$LIBS
|
||||
+ for dbname in /usr/lib/libdb-5.3.a \
|
||||
+ /usr/lib64/libdb-5.3.a
|
||||
+ do
|
||||
+ LIBS="$saved_LIBS $dbname -lpthread"
|
||||
+ AC_TRY_LINK([#include <stdio.h>
|
||||
+#include <db.h>],
|
||||
+ [db_create(NULL, NULL, 0);],
|
||||
+ BDB_STATIC_LIBADD="$dbname -lpthread"; dblib="berkeley";
|
||||
+ dblib="no")
|
||||
+ if test "$dblib" = "berkeley"; then break; fi
|
||||
+ done
|
||||
+ LIBS=$saved_LIBS
|
||||
+
|
||||
+ LDFLAGS=$BDB_SAVE_LDFLAGS
|
||||
+ BDB_STATIC_LIBADD="$dbname -lpthread"
|
||||
+BDB_STATIC_LIBADD="/dev/null -lpthread"
|
||||
+AC_CHECK_FILE([/usr/lib64/libdb-5.3.a],[BDB_STATIC_LIBADD="/usr/lib64/libdb-5.3.a -lpthread "],[])
|
||||
+AC_CHECK_FILE([/usr/lib/libdb-5.3.a],[BDB_STATIC_LIBADD="/usr/lib/libdb-5.3.a -lpthread"],[])
|
||||
+])
|
||||
diff -up cyrus-sasl-2.1.27/m4/sasldb.m4.frombdb cyrus-sasl-2.1.27/m4/sasldb.m4
|
||||
--- cyrus-sasl-2.1.27/m4/sasldb.m4.frombdb 2017-07-13 20:45:19.000000000 +0200
|
||||
|
Loading…
Reference in New Issue
Block a user