Make qminimal plugin optional for Qt6

This commit is contained in:
root
2026-05-01 14:43:31 +00:00
parent 1d70ec7cde
commit 5e4789e28c
2 changed files with 25 additions and 2 deletions
+20 -1
View File
@@ -134,8 +134,9 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
if test "x$bitcoin_cv_need_acc_widget" = xyes; then if test "x$bitcoin_cv_need_acc_widget" = xyes; then
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets]) _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
fi fi
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal]) _BITCOIN_QT_CHECK_STATIC_PLUGINS_OPTIONAL([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$QT_LIB_PREFIX" = xQt6; then if test "x$QT_LIB_PREFIX" = xQt6; then
_BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QTlsBackendOpenSSL)],[-lqopensslbackend -lssl -lcrypto]) _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QTlsBackendOpenSSL)],[-lqopensslbackend -lssl -lcrypto])
AC_DEFINE(QT_TLS_OPENSSL, 1, [Define this symbol if the Qt OpenSSL TLS backend exists]) AC_DEFINE(QT_TLS_OPENSSL, 1, [Define this symbol if the Qt OpenSSL TLS backend exists])
@@ -384,6 +385,24 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[
LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS" LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS"
]) ])
dnl Internal. Check optional static plugin link requirements.
dnl Inputs: $1: A series of Q_IMPORT_PLUGIN().
dnl Inputs: $2: The libraries that resolve $1.
dnl Inputs: $3: Action if found.
AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS_OPTIONAL],[
AC_MSG_CHECKING(for optional static Qt plugins: $2)
CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS"
LIBS="$2 $QT_LIBS $LIBS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define QT_STATICPLUGIN
#include <QtPlugin>
$1]],
[[return 0;]])],
[AC_MSG_RESULT(yes); QT_LIBS="$2 $QT_LIBS"; $3],
[AC_MSG_RESULT(no)])
LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS"
])
dnl Internal. Find paths necessary for linking qt static plugins dnl Internal. Find paths necessary for linking qt static plugins
dnl Inputs: qt_plugin_path. optional. dnl Inputs: qt_plugin_path. optional.
dnl Outputs: QT_LIBS is appended dnl Outputs: QT_LIBS is appended
+4
View File
@@ -101,6 +101,10 @@ if [[ ! -f configure ]]; then
./autogen.sh ./autogen.sh
fi fi
if [[ build-aux/m4/bitcoin_qt.m4 -nt configure ]]; then
./autogen.sh
fi
echo "Configuring Ubuntu Qt6 wallet build..." echo "Configuring Ubuntu Qt6 wallet build..."
CONFIG_SITE="$BASE_CONFIG" ./configure \ CONFIG_SITE="$BASE_CONFIG" ./configure \
--disable-maintainer-mode \ --disable-maintainer-mode \