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]) | ||||
if test "x$TARGET_OS" != xandroid; then | |||||
_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]) | ||||
fi | |||||
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]) | ||||
elif test "x$TARGET_OS" = xdarwin; then | elif test "x$TARGET_OS" = xdarwin; then | ||||
AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)]) | AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)]) | ||||
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa]) | _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa]) | ||||
AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa]) | AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa]) | ||||
elif test "x$TARGET_OS" = xandroid; then | |||||
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lqtforandroid -ljnigraphics -landroid -lqtfreetype -lQt5EglSupport $QT_LIBS" | |||||
AC_DEFINE(QT_QPA_PLATFORM_ANDROID, 1, [Define this symbol if the qt platform is android]) | |||||
fi | fi | ||||
fi | fi | ||||
CPPFLAGS=$TEMP_CPPFLAGS | CPPFLAGS=$TEMP_CPPFLAGS | ||||
CXXFLAGS=$TEMP_CXXFLAGS | CXXFLAGS=$TEMP_CXXFLAGS | ||||
]) | ]) | ||||
if test "x$use_pkgconfig$qt_bin_path" = xyes; then | if test "x$use_pkgconfig$qt_bin_path" = xyes; then | ||||
qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`" | qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`" | ||||
▲ Show 20 Lines • Show All 197 Lines • ▼ Show 20 Lines | |||||
dnl Inputs: qt_plugin_path. optional. | dnl Inputs: qt_plugin_path. optional. | ||||
dnl Outputs: QT_LIBS is appended | dnl Outputs: QT_LIBS is appended | ||||
AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[ | AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[ | ||||
if test "x$qt_plugin_path" != x; then | if test "x$qt_plugin_path" != x; then | ||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms" | QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms" | ||||
if test -d "$qt_plugin_path/accessible"; then | if test -d "$qt_plugin_path/accessible"; then | ||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible" | QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible" | ||||
fi | fi | ||||
if test -d "$qt_plugin_path/platforms/android"; then | |||||
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms/android -lqtfreetype -lEGL" | |||||
fi | |||||
if test "x$use_pkgconfig" = xyes; then | if test "x$use_pkgconfig" = xyes; then | ||||
: dnl | : dnl | ||||
m4_ifdef([PKG_CHECK_MODULES],[ | m4_ifdef([PKG_CHECK_MODULES],[ | ||||
if test x$bitcoin_cv_qt58 = xno; then | if test x$bitcoin_cv_qt58 = xno; then | ||||
PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"]) | PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"]) | ||||
else | else | ||||
PKG_CHECK_MODULES([QTFONTDATABASE], [Qt5FontDatabaseSupport], [QT_LIBS="-lQt5FontDatabaseSupport $QT_LIBS"]) | PKG_CHECK_MODULES([QTFONTDATABASE], [Qt5FontDatabaseSupport], [QT_LIBS="-lQt5FontDatabaseSupport $QT_LIBS"]) | ||||
PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport], [QT_LIBS="-lQt5EventDispatcherSupport $QT_LIBS"]) | PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport], [QT_LIBS="-lQt5EventDispatcherSupport $QT_LIBS"]) | ||||
▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines |