aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-07-08 15:08:21 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-07-08 15:08:43 +0200
commit67caef673089aca2ffb95cd15b2cb056c96e5c30 (patch)
treecf26ec5079c4289ffb95d873317f9e68a0967668
parent2e51590961a0f1c63d9932489098f827e3c83f05 (diff)
parentb556beda264308e040f8d88aca4f2f386a0183d9 (diff)
downloadbitcoin-67caef673089aca2ffb95cd15b2cb056c96e5c30.tar.xz
Merge #8314: Fix pkg-config issues for 0.13
b556bed build: fix Windows builds without pkg-config (Cory Fields) 0c928cb build: Fix Qt5PlatformSupport check without pkg-config (Cory Fields)
-rw-r--r--build-aux/m4/bitcoin_qt.m420
-rw-r--r--configure.ac27
2 files changed, 34 insertions, 13 deletions
diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index 74d9102674..d26136cbe9 100644
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -331,8 +331,9 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
fi
fi
- m4_ifdef([PKG_CHECK_MODULES],[
if test x$use_pkgconfig = xyes; then
+ : dnl
+ m4_ifdef([PKG_CHECK_MODULES],[
PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
if test x$TARGET_OS = xlinux; then
PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
@@ -342,12 +343,23 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
elif test x$TARGET_OS = xdarwin; then
PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
fi
+ ])
else
- if ${PKG_CONFIG} --exists "Qt5Core >= 5.6" 2>/dev/null; then
- QT_LIBS="-lQt5PlatformSupport $QT_LIBS"
+ if test x$TARGET_OS = xwindows; then
+ AC_CACHE_CHECK(for Qt >= 5.6, bitcoin_cv_need_platformsupport,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[#include <QtCore>]],[[
+ #if QT_VERSION < 0x050600
+ choke;
+ #endif
+ ]])],
+ [bitcoin_cv_need_platformsupport=yes],
+ [bitcoin_cv_need_platformsupport=no])
+ ])
+ if test x$bitcoin_cv_need_platformsupport = xyes; then
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PlatformSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXPlatformSupport not found)))
+ fi
fi
fi
- ])
else
if test x$qt_plugin_path != x; then
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
diff --git a/configure.ac b/configure.ac
index 496e4ad9e7..011af6bd1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,9 +79,6 @@ AC_PATH_TOOL(OBJCOPY, objcopy)
AC_ARG_VAR(PYTHONPATH, Augments the default search path for python module files)
-dnl pkg-config check.
-PKG_PROG_PKG_CONFIG
-
# Enable wallet
AC_ARG_ENABLE([wallet],
[AS_HELP_STRING([--disable-wallet],
@@ -375,6 +372,16 @@ case $host in
;;
esac
+if test x$use_pkgconfig = xyes; then
+ m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh.)])
+ m4_ifdef([PKG_PROG_PKG_CONFIG], [
+ PKG_PROG_PKG_CONFIG
+ if test x"$PKG_CONFIG" = "x"; then
+ AC_MSG_ERROR(pkg-config not found.)
+ fi
+ ])
+fi
+
if test x$use_comparison_tool != xno; then
AC_SUBST(JAVA_COMPARISON_TOOL, $use_comparison_tool)
fi
@@ -752,12 +759,7 @@ fi
fi
if test x$use_pkgconfig = xyes; then
-
- if test x"$PKG_CONFIG" = "x"; then
- AC_MSG_ERROR(pkg-config not found.)
- fi
-
- : #NOP
+ : dnl
m4_ifdef(
[PKG_CHECK_MODULES],
[
@@ -1058,6 +1060,13 @@ AC_SUBST(TESTDEFS)
AC_SUBST(LEVELDB_TARGET_FLAGS)
AC_SUBST(MINIUPNPC_CPPFLAGS)
AC_SUBST(MINIUPNPC_LIBS)
+AC_SUBST(CRYPTO_LIBS)
+AC_SUBST(SSL_LIBS)
+AC_SUBST(EVENT_LIBS)
+AC_SUBST(EVENT_PTHREADS_LIBS)
+AC_SUBST(ZMQ_LIBS)
+AC_SUBST(PROTOBUF_LIBS)
+AC_SUBST(QR_LIBS)
AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
AC_CONFIG_FILES([qa/pull-tester/tests_config.py],[chmod +x qa/pull-tester/tests_config.py])