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.
This commit is contained in:
parent
274352927f
commit
5b9f78d69c
25
configure.ac
25
configure.ac
@ -232,12 +232,25 @@ case $host in
|
|||||||
|
|
||||||
AC_CHECK_PROG([BREW],brew, brew)
|
AC_CHECK_PROG([BREW],brew, brew)
|
||||||
if test x$BREW = xbrew; then
|
if test x$BREW = xbrew; then
|
||||||
dnl add default homebrew paths
|
dnl These Homebrew packages may be bottled, meaning that they won't be found
|
||||||
openssl_prefix=`$BREW --prefix openssl`
|
dnl in expected paths because they may conflict with system files. Ask
|
||||||
bdb_prefix=`$BREW --prefix berkeley-db4`
|
dnl Homebrew where each one is located, then adjust paths accordingly.
|
||||||
export PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
|
dnl It's safe to add these paths even if the functionality is disabled by
|
||||||
CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
|
dnl the user (--without-wallet or --without-gui for example).
|
||||||
LIBS="$LIBS -L$bdb_prefix/lib"
|
|
||||||
|
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
|
fi
|
||||||
else
|
else
|
||||||
case $build_os in
|
case $build_os in
|
||||||
|
@ -94,6 +94,12 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
|||||||
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
|
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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([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([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)
|
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user