@@ -111,9 +111,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
111
111
dnl For Qt5, we can check a header to find out whether Qt is build
112
112
dnl statically. When Qt is built statically, some plugins must be linked into
113
113
dnl the final binary as well.
114
- dnl With Qt5, languages moved into core and the WindowsIntegration plugin was
115
- dnl added.
116
- dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the
114
+ dnl _BITCOIN_QT_CHECK_STATIC_PLUGIN does a quick link-check and appends the
117
115
dnl results to QT_LIBS.
118
116
BITCOIN_QT_CHECK([
119
117
TEMP_CPPFLAGS=$CPPFLAGS
@@ -125,17 +123,17 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
125
123
_BITCOIN_QT_FIND_STATIC_PLUGINS
126
124
AC_DEFINE ( QT_STATICPLUGIN , 1 , [ Define this symbol if qt plugins are static] )
127
125
if test "x$TARGET_OS" != xandroid; then
128
- _BITCOIN_QT_CHECK_STATIC_PLUGINS( [ Q_IMPORT_PLUGIN( QMinimalIntegrationPlugin) ] , [ -lqminimal] )
126
+ _BITCOIN_QT_CHECK_STATIC_PLUGIN( [ QMinimalIntegrationPlugin] , [ -lqminimal] )
129
127
AC_DEFINE ( QT_QPA_PLATFORM_MINIMAL , 1 , [ Define this symbol if the minimal qt platform exists] )
130
128
fi
131
129
if test "x$TARGET_OS" = xwindows; then
132
- _BITCOIN_QT_CHECK_STATIC_PLUGINS( [ Q_IMPORT_PLUGIN( QWindowsIntegrationPlugin) ] , [ -lqwindows] )
130
+ _BITCOIN_QT_CHECK_STATIC_PLUGIN( [ QWindowsIntegrationPlugin] , [ -lqwindows] )
133
131
AC_DEFINE ( QT_QPA_PLATFORM_WINDOWS , 1 , [ Define this symbol if the qt platform is windows] )
134
132
elif test "x$TARGET_OS" = xlinux; then
135
- _BITCOIN_QT_CHECK_STATIC_PLUGINS( [ Q_IMPORT_PLUGIN( QXcbIntegrationPlugin) ] , [ -lqxcb -lxcb-static] )
133
+ _BITCOIN_QT_CHECK_STATIC_PLUGIN( [ QXcbIntegrationPlugin] , [ -lqxcb -lxcb-static] )
136
134
AC_DEFINE ( QT_QPA_PLATFORM_XCB , 1 , [ Define this symbol if the qt platform is xcb] )
137
135
elif test "x$TARGET_OS" = xdarwin; then
138
- _BITCOIN_QT_CHECK_STATIC_PLUGINS( [ Q_IMPORT_PLUGIN( QCocoaIntegrationPlugin) ] , [ -lqcocoa] )
136
+ _BITCOIN_QT_CHECK_STATIC_PLUGIN( [ QCocoaIntegrationPlugin] , [ -lqcocoa] )
139
137
AC_DEFINE ( QT_QPA_PLATFORM_COCOA , 1 , [ Define this symbol if the qt platform is cocoa] )
140
138
elif test "x$TARGET_OS" = xandroid; then
141
139
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lqtforandroid -ljnigraphics -landroid -lqtfreetype -lQt5EglSupport $QT_LIBS"
@@ -284,22 +282,22 @@ AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
284
282
] )
285
283
] )
286
284
287
- dnl Internal. Check if the link-requirements for static plugins are met.
285
+ dnl Internal. Check if the link-requirements for a static plugin are met.
286
+ dnl
287
+ dnl _BITCOIN_QT_CHECK_STATIC_PLUGIN(PLUGIN, LIBRARIES)
288
+ dnl --------------------------------------------------
289
+ dnl
288
290
dnl Requires: INCLUDES and LIBS must be populated as necessary.
289
- dnl Inputs: $1: A series of Q_IMPORT_PLUGIN() .
291
+ dnl Inputs: $1: A static plugin name .
290
292
dnl Inputs: $2: The libraries that resolve $1.
291
293
dnl Output: QT_LIBS is prepended or configure exits.
292
- AC_DEFUN ( [ _BITCOIN_QT_CHECK_STATIC_PLUGINS ] , [
293
- AC_MSG_CHECKING ( for static Qt plugins: $2 )
294
+ AC_DEFUN ( [ _BITCOIN_QT_CHECK_STATIC_PLUGIN ] , [
295
+ AC_MSG_CHECKING ( [ for $1 ( $2 ) ] )
294
296
CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS"
295
297
LIBS="$2 ${qt_lib_suffix} $QT_LIBS $LIBS"
296
- AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [
297
- #define QT_STATICPLUGIN
298
- #include <QtPlugin>
299
- $1 ] ] ,
300
- [ [ return 0;] ] ) ] ,
301
- [ AC_MSG_RESULT ( yes ) ; QT_LIBS="$2 ${qt_lib_suffix} $QT_LIBS"] ,
302
- [ AC_MSG_RESULT ( no ) ; BITCOIN_QT_FAIL(Could not resolve: $2 )] )
298
+ AC_LINK_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <QtPlugin> Q_IMPORT_PLUGIN($1 )] ] ) ] ,
299
+ [ AC_MSG_RESULT ( [ yes] ) ; QT_LIBS="$2 ${qt_lib_suffix} $QT_LIBS"] ,
300
+ [ AC_MSG_RESULT ( [ no] ) ; BITCOIN_QT_FAIL([ $1 not found.] )] )
303
301
LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS"
304
302
] )
305
303
0 commit comments