Skip to content

Commit 277c225

Browse files
committed
Merge #20478: Don't set BDB flags when configuring without
982e548 Don't set BDB flags when configuring without (Jonas Schnelli) Pull request description: Configuring `--without-bdb` on MacOS leads to a compile error (when BerkeleyDB is not installed). `brew --prefix berkeley-db4` always reports the target directory (even if not installed). This PR prevents BDB_CFLAGS (et al) from being populated when configuring `--without-bdb` ``` ld: warning: directory not found for option '-L/Users/user/Documents/homebrew/Cellar/berkeley-db@4/4.8.30/lib' ld: warning: directory not found for option '-L/Users/user/Documents/homebrew/Cellar/berkeley-db@4/4.8.30/lib' ld: library not found for -ldb_cxx-4.8 ld: library not found for -ldb_cxx-4.8 ``` ACKs for top commit: promag: Tested ACK 982e548. hebasto: ACK 982e548, tested on macOS 11 Big Sur. Tree-SHA512: f8ca0adca0e18e2de4c0f99d5332cba70d957a9d31a357483b43dcf61c2ed4749d223eabadd45fdbf3ef0781c6b37217770e9aa935b5207eaf7f87c5bdfe9e95
2 parents dcb7518 + 982e548 commit 277c225

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ case $host in
643643

644644
bdb_prefix=$($BREW --prefix berkeley-db4 2>/dev/null)
645645
qt5_prefix=$($BREW --prefix qt5 2>/dev/null)
646-
if test x$bdb_prefix != x && test "x$BDB_CFLAGS" = "x" && test "x$BDB_LIBS" = "x"; then
646+
if test x$bdb_prefix != x && test "x$BDB_CFLAGS" = "x" && test "x$BDB_LIBS" = "x" && test "$use_bdb" != "no"; then
647647
dnl This must precede the call to BITCOIN_FIND_BDB48 below.
648648
BDB_CFLAGS="-I$bdb_prefix/include"
649649
BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8"

0 commit comments

Comments
 (0)