diff options
author | Glenn Willen <gwillen@nerdnet.org> | 2020-06-23 03:47:24 -0700 |
---|---|---|
committer | Glenn Willen <gwillen@nerdnet.org> | 2020-06-23 22:04:02 -0700 |
commit | 8578c6fccd11404412d2c60f9bede311b79ca0d0 (patch) | |
tree | 54eac259274475c3a1291c6b0bbe8c12199fb486 /configure.ac | |
parent | 80fd474e402bb003c3a427f1997eb649e69138ba (diff) |
build: Fix search for brew-installed BDB 4 on OS X
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.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
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" |