Changeset View
Changeset View
Standalone View
Standalone View
build-aux/m4/bitcoin_qt.m4
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | AC_DEFUN([BITCOIN_QT_CONFIGURE],[ | ||||
TEMP_CPPFLAGS=$CPPFLAGS | TEMP_CPPFLAGS=$CPPFLAGS | ||||
TEMP_CXXFLAGS=$CXXFLAGS | TEMP_CXXFLAGS=$CXXFLAGS | ||||
CPPFLAGS="$QT_INCLUDES $CPPFLAGS" | CPPFLAGS="$QT_INCLUDES $CPPFLAGS" | ||||
CXXFLAGS="$PIC_FLAGS $CXXFLAGS" | CXXFLAGS="$PIC_FLAGS $CXXFLAGS" | ||||
_BITCOIN_QT_IS_STATIC | _BITCOIN_QT_IS_STATIC | ||||
if test "x$bitcoin_cv_static_qt" = xyes; then | if test "x$bitcoin_cv_static_qt" = xyes; then | ||||
_BITCOIN_QT_FIND_STATIC_PLUGINS | _BITCOIN_QT_FIND_STATIC_PLUGINS | ||||
AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static]) | AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static]) | ||||
AC_CACHE_CHECK(for Qt < 5.4, bitcoin_cv_need_acc_widget,[ | |||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | |||||
#include <QtCore/qconfig.h> | |||||
#ifndef QT_VERSION | |||||
# include <QtCore/qglobal.h> | |||||
#endif | |||||
]], | |||||
[[ | |||||
#if QT_VERSION >= 0x050400 | |||||
choke | |||||
#endif | |||||
]])], | |||||
[bitcoin_cv_need_acc_widget=yes], | |||||
[bitcoin_cv_need_acc_widget=no]) | |||||
]) | |||||
if test "x$bitcoin_cv_need_acc_widget" = xyes; then | |||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets]) | |||||
fi | |||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal]) | _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal]) | ||||
AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists]) | AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists]) | ||||
if test "x$TARGET_OS" = xwindows; then | if test "x$TARGET_OS" = xwindows; then | ||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows]) | _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows]) | ||||
AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows]) | AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows]) | ||||
elif test "x$TARGET_OS" = xlinux; then | elif test "x$TARGET_OS" = xlinux; then | ||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static]) | _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static]) | ||||
AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb]) | AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb]) | ||||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | AC_DEFUN([BITCOIN_QT_CONFIGURE],[ | ||||
AC_SUBST(QT_SELECT, qt5) | AC_SUBST(QT_SELECT, qt5) | ||||
AC_SUBST(MOC_DEFS) | AC_SUBST(MOC_DEFS) | ||||
]) | ]) | ||||
dnl All macros below are internal and should _not_ be used from the main | dnl All macros below are internal and should _not_ be used from the main | ||||
dnl configure.ac. | dnl configure.ac. | ||||
dnl ---- | dnl ---- | ||||
dnl Internal. Check if the included version of Qt is Qt5. | dnl Internal. Check included version of Qt against minimum specified in doc/dependencies.md | ||||
dnl Requires: INCLUDES must be populated as necessary. | dnl Requires: INCLUDES must be populated as necessary. | ||||
dnl Output: bitcoin_cv_qt5=yes|no | dnl Output: bitcoin_cv_qt5=yes|no | ||||
AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[ | AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[ | ||||
AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[ | AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[ | ||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | ||||
#include <QtCore/qconfig.h> | #include <QtCore/qconfig.h> | ||||
#ifndef QT_VERSION | #ifndef QT_VERSION | ||||
# include <QtCore/qglobal.h> | # include <QtCore/qglobal.h> | ||||
#endif | #endif | ||||
]], | ]], | ||||
[[ | [[ | ||||
#if QT_VERSION < 0x050000 || QT_VERSION_MAJOR < 5 | #if QT_VERSION < 0x050501 | ||||
choke | choke | ||||
#endif | #endif | ||||
]])], | ]])], | ||||
[bitcoin_cv_qt5=yes], | [bitcoin_cv_qt5=yes], | ||||
[bitcoin_cv_qt5=no]) | [bitcoin_cv_qt5=no]) | ||||
])]) | ])]) | ||||
dnl Internal. Check if the included version of Qt is greater than Qt58. | dnl Internal. Check if the included version of Qt is greater than Qt58. | ||||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | m4_ifdef([PKG_CHECK_MODULES],[ | ||||
PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport], [QT_LIBS="-lQt5EventDispatcherSupport $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([QTTHEME], [Qt5ThemeSupport], [QT_LIBS="-lQt5ThemeSupport $QT_LIBS"]) | ||||
PKG_CHECK_MODULES([QTDEVICEDISCOVERY], [Qt5DeviceDiscoverySupport], [QT_LIBS="-lQt5DeviceDiscoverySupport $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([QTACCESSIBILITY], [Qt5AccessibilitySupport], [QT_LIBS="-lQt5AccessibilitySupport $QT_LIBS"]) | ||||
PKG_CHECK_MODULES([QTFB], [Qt5FbSupport], [QT_LIBS="-lQt5FbSupport $QT_LIBS"]) | PKG_CHECK_MODULES([QTFB], [Qt5FbSupport], [QT_LIBS="-lQt5FbSupport $QT_LIBS"]) | ||||
fi | fi | ||||
if test "x$TARGET_OS" = xlinux; then | if test "x$TARGET_OS" = xlinux; then | ||||
PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"]) | 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"]) | PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"]) | ||||
fi | |||||
elif test "x$TARGET_OS" = xdarwin; then | elif test "x$TARGET_OS" = xdarwin; then | ||||
PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport], [QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"]) | PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport], [QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"]) | ||||
PKG_CHECK_MODULES([QTGRAPHICS], [Qt5GraphicsSupport], [QT_LIBS="-lQt5GraphicsSupport $QT_LIBS"]) | PKG_CHECK_MODULES([QTGRAPHICS], [Qt5GraphicsSupport], [QT_LIBS="-lQt5GraphicsSupport $QT_LIBS"]) | ||||
PKG_CHECK_MODULES([QTCGL], [Qt5CglSupport], [QT_LIBS="-lQt5CglSupport $QT_LIBS"]) | PKG_CHECK_MODULES([QTCGL], [Qt5CglSupport], [QT_LIBS="-lQt5CglSupport $QT_LIBS"]) | ||||
fi | fi | ||||
]) | ]) | ||||
else | else | ||||
if test "x$TARGET_OS" = xwindows; then | if test "x$TARGET_OS" = xwindows; then | ||||
▲ Show 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | if test "x$use_dbus" != xno; then | ||||
AC_CHECK_HEADER([QtDBus],, have_qt_dbus=no) | AC_CHECK_HEADER([QtDBus],, have_qt_dbus=no) | ||||
QT_DBUS_LIBS="$LIBS" | QT_DBUS_LIBS="$LIBS" | ||||
fi | fi | ||||
]) | ]) | ||||
CPPFLAGS="$TEMP_CPPFLAGS" | CPPFLAGS="$TEMP_CPPFLAGS" | ||||
CXXFLAGS="$TEMP_CXXFLAGS" | CXXFLAGS="$TEMP_CXXFLAGS" | ||||
LIBS="$TEMP_LIBS" | LIBS="$TEMP_LIBS" | ||||
]) | ]) | ||||