aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2020-06-29 12:44:12 +0800
committerfanquake <fanquake@gmail.com>2020-06-29 13:08:33 +0800
commitdd191b583294b09cf59f1318de6afc889bbe22da (patch)
tree611e92e492d9fe253e3406ce223b8cdb9880d310
parentd3a5dbfd1f18b89dd990ee83ece7c1dd9ba94b1a (diff)
parent8578c6fccd11404412d2c60f9bede311b79ca0d0 (diff)
downloadbitcoin-dd191b583294b09cf59f1318de6afc889bbe22da.tar.xz
Merge #19356: build: Fix search for brew-installed BDB 4 on OS X
8578c6fccd11404412d2c60f9bede311b79ca0d0 build: Fix search for brew-installed BDB 4 on OS X (Glenn Willen) Pull request description: ~~NOTE: This PR contains one important fix that I need (to make Bitcoin Core build cleanly on my system without shenanigans), plus some related general cleanup that is not really necessary, and could be annoying. (I am prepared to defend my argument that BDB_CFLAGS is wrong here, and BDB_CPPFLAGS is right, but this could bite anybody who has gotten in the habit of -- or scripted -- setting the former.)~~ Ok, I have been convinced that I was too clever with the refactor and I have removed it. Now it's just the tiny change to fix the build on my local machine. --- On OS X, when searching Homebrew keg-only packages for BDB 4.8, if we find it, use BDB_CPPFLAGS and BDB_LIBS instead of CFLAGS and LIBS for the result. This is (1) more correct, and (2) necessary in order to give this location priority over other directories in the include search path, which may include system include directories with other versions of BDB. ACKs for top commit: theuni: ACK 8578c6fccd11404412d2c60f9bede311b79ca0d0. Tree-SHA512: a28f48fc81a25736f7e77c663f21cd9a6ae1cd115682031c5aa695c94cb5afa11920330a60cd6a54832822a2aec1eb23123ac2e2dcd4f0b3835aef9c9339ac97
-rw-r--r--configure.ac7
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 12bece6903..8f5a183dde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -635,9 +635,10 @@ case $host in
bdb_prefix=$($BREW --prefix berkeley-db4 2>/dev/null)
qt5_prefix=$($BREW --prefix qt5 2>/dev/null)
- if test x$bdb_prefix != x; then
- CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
- LIBS="$LIBS -L$bdb_prefix/lib"
+ if test x$bdb_prefix != x && test "x$BDB_CFLAGS" = "x" && test "x$BDB_LIBS" = "x"; then
+ dnl This must precede the call to BITCOIN_FIND_BDB48 below.
+ BDB_CFLAGS="-I$bdb_prefix/include"
+ BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8"
fi
if test x$qt5_prefix != x; then
PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"