aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build-aux/m4/bitcoin_qt.m47
-rw-r--r--configure.ac25
2 files changed, 26 insertions, 6 deletions
diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index edfde4cd79..71b1484894 100644
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -152,6 +152,13 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
fi
CPPFLAGS=$TEMP_CPPFLAGS
])
+
+ if test x$use_pkgconfig$qt_bin_path = xyes; then
+ if test x$bitcoin_qt_got_major_vers = x5; then
+ qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
+ fi
+ fi
+
BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
diff --git a/configure.ac b/configure.ac
index 7025249aba..abf9f39e65 100644
--- a/configure.ac
+++ b/configure.ac
@@ -240,12 +240,25 @@ case $host in
AC_CHECK_PROG([BREW],brew, brew)
if test x$BREW = xbrew; then
- dnl add default homebrew paths
- openssl_prefix=`$BREW --prefix openssl`
- bdb_prefix=`$BREW --prefix berkeley-db4`
- export PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
- CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
- LIBS="$LIBS -L$bdb_prefix/lib"
+ dnl These Homebrew packages may be bottled, meaning that they won't be found
+ dnl in expected paths because they may conflict with system files. Ask
+ dnl Homebrew where each one is located, then adjust paths accordingly.
+ dnl It's safe to add these paths even if the functionality is disabled by
+ dnl the user (--without-wallet or --without-gui for example).
+
+ openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
+ bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null`
+ qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
+ if test x$openssl_prefix != x; then
+ export PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+ fi
+ if test x$bdb_prefix != x; then
+ CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
+ LIBS="$LIBS -L$bdb_prefix/lib"
+ fi
+ if test x$qt5_prefix != x; then
+ export PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+ fi
fi
else
case $build_os in