aboutsummaryrefslogtreecommitdiff
path: root/build-aux/m4/bitcoin_qt.m4
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-07-09 17:52:58 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-07-09 17:55:44 +0200
commita6d14b1cf71163e438cc6b9b9b1a65037ab49264 (patch)
tree8f22426b3cab088fd4c30adc21df5d0a98cc12df /build-aux/m4/bitcoin_qt.m4
parenta247594e75f5b36c1eb3c204082f07f0c9c5937a (diff)
parent800dea88a6ad2d8b615c1cc486da5942f6e391c2 (diff)
downloadbitcoin-a6d14b1cf71163e438cc6b9b9b1a65037ab49264.tar.xz
Merge #12971: depends: Upgrade Qt to 5.9.6
800dea88a6ad2d8b615c1cc486da5942f6e391c2 Upgrade Qt depends to 5.9.6 (Sebastian Kung) 70afa65b175080b617e168be5396fbc180ae8bc5 Fix depends Qt5.9.4 mac build (Ken Lee) 28482efefb15dc2c273a52b96d1aceb995db4968 Ugrade Qt depends to Qt5.9.4 (Sebastian Kung) Pull request description: With the introduction of Ubuntu 18.04 (Bionic Beaver) modern versions of gcc and mingw that allow cross compilation of versions of Qt greater than 5.8 are now readily available. This pull requests upgrades the Qt depends recipe from Qt 5.7.1 to Qt 5.9.6. Qt 5.9.x is the current LTS version and should be supported by Qt until 2020. Tree-SHA512: 439295d594ff8954a5ba5e348a0452713721c805485be2edcb9f8603ee59e96db5a61e1c684bdff36bbfd643a79cd35c289817257af88f489d2890e7843460bf
Diffstat (limited to 'build-aux/m4/bitcoin_qt.m4')
-rw-r--r--build-aux/m4/bitcoin_qt.m4142
1 files changed, 95 insertions, 47 deletions
diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index fe0cc6c36d..05df8621d2 100644
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -276,7 +276,7 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
#endif
]],
[[
- #if QT_VERSION < 0x050000
+ #if QT_VERSION < 0x050000 || QT_VERSION_MAJOR < 5
choke
#endif
]])],
@@ -284,13 +284,11 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
[bitcoin_cv_qt5=no])
])])
-dnl Internal. Check if the linked version of Qt was built as static libs.
-dnl Requires: Qt5.
-dnl Requires: INCLUDES and LIBS must be populated as necessary.
-dnl Output: bitcoin_cv_static_qt=yes|no
-dnl Output: Defines QT_STATICPLUGIN if plugins are static.
-AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
- AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
+dnl Internal. Check if the included version of Qt is greater than Qt58.
+dnl Requires: INCLUDES must be populated as necessary.
+dnl Output: bitcoin_cv_qt5=yes|no
+AC_DEFUN([_BITCOIN_QT_CHECK_QT58],[
+ AC_CACHE_CHECK(for > Qt 5.7, bitcoin_cv_qt58,[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <QtCore/qconfig.h>
#ifndef QT_VERSION
@@ -298,13 +296,36 @@ AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
#endif
]],
[[
- #if !defined(QT_STATIC)
+ #if QT_VERSION_MINOR < 8
choke
#endif
]])],
- [bitcoin_cv_static_qt=yes],
- [bitcoin_cv_static_qt=no])
- ])
+ [bitcoin_cv_qt58=yes],
+ [bitcoin_cv_qt58=no])
+])])
+
+
+dnl Internal. Check if the linked version of Qt was built as static libs.
+dnl Requires: Qt5.
+dnl Requires: INCLUDES and LIBS must be populated as necessary.
+dnl Output: bitcoin_cv_static_qt=yes|no
+dnl Output: Defines QT_STATICPLUGIN if plugins are static.
+AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
+ AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <QtCore/qconfig.h>
+ #ifndef QT_VERSION OR QT_VERSION_STR
+ # include <QtCore/qglobal.h>
+ #endif
+ ]],
+ [[
+ #if !defined(QT_STATIC)
+ choke
+ #endif
+ ]])],
+ [bitcoin_cv_static_qt=yes],
+ [bitcoin_cv_static_qt=no])
+ ])
if test "x$bitcoin_cv_static_qt" = xyes; then
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol for static Qt plugins])
fi
@@ -338,39 +359,60 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
if test -d "$qt_plugin_path/accessible"; then
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
fi
- fi
- 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"])
- if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then
- PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
+ if test "x$use_pkgconfig" = xyes; then
+ : dnl
+ m4_ifdef([PKG_CHECK_MODULES],[
+ if test x$bitcoin_cv_qt58 = xno; then
+ PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
+ else
+ PKG_CHECK_MODULES([QTFONTDATABASE], [Qt5FontDatabaseSupport], [QT_LIBS="-lQt5FontDatabaseSupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport], [QT_LIBS="-lQt5EventDispatcherSupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTTHEME], [Qt5ThemeSupport], [QT_LIBS="-lQt5ThemeSupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTDEVICEDISCOVERY], [Qt5DeviceDiscoverySupport], [QT_LIBS="-lQt5DeviceDiscoverySupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTACCESSIBILITY], [Qt5AccessibilitySupport], [QT_LIBS="-lQt5AccessibilitySupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTFB], [Qt5FbSupport], [QT_LIBS="-lQt5FbSupport $QT_LIBS"])
+ fi
+ if test "x$TARGET_OS" = xlinux; then
+ PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
+ if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then
+ PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
+ fi
+ elif test "x$TARGET_OS" = xdarwin; then
+ PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport], [QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTGRAPHICS], [Qt5GraphicsSupport], [QT_LIBS="-lQt5GraphicsSupport $QT_LIBS"])
+ PKG_CHECK_MODULES([QTCGL], [Qt5CglSupport], [QT_LIBS="-lQt5CglSupport $QT_LIBS"])
fi
- elif test "x$TARGET_OS" = xdarwin; then
- PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
- fi
- ])
- else
- 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/qconfig.h>
- #ifndef QT_VERSION
- # include <QtCore/qglobal.h>
- #endif
- ]],
- [[
- #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_PREFIX}PlatformSupport not found)))
+ ])
+ else
+ 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/qconfig.h>
+ #ifndef QT_VERSION
+ # include <QtCore/qglobal.h>
+ #endif
+ ]],
+ [[
+ #if QT_VERSION < 0x050600 || QT_VERSION_MINOR < 6
+ choke
+ #endif
+ ]])],
+ [bitcoin_cv_need_platformsupport=yes],
+ [bitcoin_cv_need_platformsupport=no])
+ ])
+ if test "x$bitcoin_cv_need_platformsupport" = xyes; then
+ if test x$bitcoin_cv_qt58 = xno; then
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PlatformSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXPlatformSupport not found)))
+ else
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}FontDatabaseSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXFontDatabaseSupport not found)))
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}EventDispatcherSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXEventDispatcherSupport not found)))
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}ThemeSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXThemeSupport not found)))
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}FbSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXFbSupport not found)))
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}DeviceDiscoverySupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXDeviceDiscoverySupport not found)))
+ BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}AccessibilitySupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXAccessibilitySupport not found)))
+ QT_LIBS="$QT_LIBS -lversion -ldwmapi -luxtheme"
+ fi
+ fi
fi
fi
fi
@@ -430,6 +472,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
BITCOIN_QT_CHECK([
if test "x$bitcoin_qt_want_version" = xauto; then
_BITCOIN_QT_CHECK_QT5
+ _BITCOIN_QT_CHECK_QT58
fi
QT_LIB_PREFIX=Qt5
])
@@ -446,10 +489,15 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
])
BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in])))
- BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
BITCOIN_QT_CHECK(AC_SEARCH_LIBS([jpeg_create_decompress] ,[qtjpeg jpeg],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in])))
- BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
- BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled])))
+ if test x$bitcoin_cv_qt58 = xno; then
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
+ else
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtlibpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre2_match_16], [qtpcre2 libqtpcre2],,AC_MSG_WARN([libqtpcre2 not found. Assuming qt has it built-in])))
+ fi
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS([hb_ot_tags_from_script] ,[qtharfbuzzng qtharfbuzz harfbuzz],,AC_MSG_WARN([libharfbuzz not found. Assuming qt has it built-in or support is disabled])))
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Core not found)))
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Gui not found)))
BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib${QT_LIB_PREFIX}Network not found)))