aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2014-09-29 15:26:31 -0400
committerCory Fields <cory-nospam-@coryfields.com>2014-10-01 19:26:29 -0400
commit9fedafba4b903d7f3af044eb86dc313856e40b08 (patch)
tree0418434db355a9318ce66234a13ddb14f510f6c1 /configure.ac
parent35eaa6b4573e06ac8cc757d6fe7e2ef3ebb8473f (diff)
build: Fix OSX build when using Homebrew and qt5
Qt5 is bottled, so configure won't find it without some help. Use brew to find out its prefix. Also, qt5 added the host_bins variable to pkg-config, use it.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 19 insertions, 6 deletions
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