@@ -5,8 +5,8 @@ dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
dnl Helper for cases where a qt dependency is not met.
6
6
dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit.
7
7
AC_DEFUN ( [ BITCOIN_QT_FAIL] ,[
8
- if test "x $bitcoin_qt_want_version" = xauto && test "x $bitcoin_qt_force" != xyes ; then
9
- if test "x $bitcoin_enable_qt" != xno ; then
8
+ if test "$bitcoin_qt_want_version" = "auto" && test "$bitcoin_qt_force" != "yes" ; then
9
+ if test "$bitcoin_enable_qt" != "no" ; then
10
10
AC_MSG_WARN ( [ $1 ; bitcoin-qt frontend will not be built] )
11
11
fi
12
12
bitcoin_enable_qt=no
@@ -17,7 +17,7 @@ AC_DEFUN([BITCOIN_QT_FAIL],[
17
17
] )
18
18
19
19
AC_DEFUN ( [ BITCOIN_QT_CHECK] ,[
20
- if test "x $bitcoin_enable_qt" != xno && test "x $bitcoin_qt_want_version" != xno ; then
20
+ if test "$bitcoin_enable_qt" != "no" && test "$bitcoin_qt_want_version" != "no" ; then
21
21
true
22
22
$1
23
23
else
@@ -35,12 +35,12 @@ dnl Inputs: $4: If "yes", don't fail if $2 is not found.
35
35
dnl Output: $1 is set to the path of $2 if found. $2 are searched in order.
36
36
AC_DEFUN ( [ BITCOIN_QT_PATH_PROGS] ,[
37
37
BITCOIN_QT_CHECK([
38
- if test "x $3 " != x ; then
38
+ if test "$3 " != "" ; then
39
39
AC_PATH_PROGS ( [ $1 ] , [ $2 ] , [ ] , [ $3 ] )
40
40
else
41
41
AC_PATH_PROGS ( [ $1 ] , [ $2 ] )
42
42
fi
43
- if test "x $$1 " = x && test "x $4 " != xyes ; then
43
+ if test "$$1 " = "" && test "$4 " != "yes" ; then
44
44
BITCOIN_QT_FAIL([ $1 not found] )
45
45
fi
46
46
] )
@@ -57,14 +57,14 @@ AC_DEFUN([BITCOIN_QT_INIT],[
57
57
[ build bitcoin-qt GUI (default=auto)] ) ] ,
58
58
[
59
59
bitcoin_qt_want_version=$withval
60
- if test "x $bitcoin_qt_want_version" = xyes ; then
60
+ if test "$bitcoin_qt_want_version" = "yes" ; then
61
61
bitcoin_qt_force=yes
62
62
bitcoin_qt_want_version=auto
63
63
fi
64
64
] ,
65
65
[ bitcoin_qt_want_version=auto] )
66
66
67
- AS_IF ( [ test "x $with_gui" = xqt5_debug ] ,
67
+ AS_IF ( [ test "$with_gui" = "qt5_debug" ] ,
68
68
[ AS_CASE ( [ $host] ,
69
69
[ *darwin*] , [ qt_lib_suffix=_debug] ,
70
70
[ qt_lib_suffix= ] ) ; bitcoin_qt_want_version=qt5] ,
@@ -87,7 +87,7 @@ AC_DEFUN([BITCOIN_QT_INIT],[
87
87
dnl Android doesn't support D-Bus and certainly doesn't use it for notifications
88
88
case $host in
89
89
*android*)
90
- if test "x $use_dbus" != xyes ; then
90
+ if test "$use_dbus" != "yes" ; then
91
91
use_dbus=no
92
92
fi
93
93
;;
@@ -119,10 +119,10 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
119
119
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
120
120
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
121
121
_BITCOIN_QT_IS_STATIC
122
- if test "x $bitcoin_cv_static_qt" = xyes ; then
122
+ if test "$bitcoin_cv_static_qt" = "yes" ; then
123
123
_BITCOIN_QT_CHECK_STATIC_LIBS
124
124
125
- if test "x $qt_plugin_path" != x ; then
125
+ if test "$qt_plugin_path" != "" ; then
126
126
if test -d "$qt_plugin_path/platforms"; then
127
127
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
128
128
fi
@@ -138,29 +138,29 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
138
138
fi
139
139
140
140
AC_DEFINE ( [ QT_STATICPLUGIN] , [ 1] , [ Define this symbol if qt plugins are static] )
141
- if test "x $TARGET_OS" != xandroid ; then
141
+ if test "$TARGET_OS" != "android" ; then
142
142
_BITCOIN_QT_CHECK_STATIC_PLUGIN([ QMinimalIntegrationPlugin] , [ -lqminimal] )
143
143
AC_DEFINE ( [ QT_QPA_PLATFORM_MINIMAL] , [ 1] , [ Define this symbol if the minimal qt platform exists] )
144
144
fi
145
- if test "x $TARGET_OS" = xwindows ; then
145
+ if test "$TARGET_OS" = "windows" ; then
146
146
dnl Linking against wtsapi32 is required. See #17749 and
147
147
dnl https://bugreports.qt.io/browse/QTBUG-27097.
148
148
AX_CHECK_LINK_FLAG ( [ -lwtsapi32] , [ QT_LIBS="$QT_LIBS -lwtsapi32"] , [ AC_MSG_ERROR ( [ could not link against -lwtsapi32] ) ] )
149
149
_BITCOIN_QT_CHECK_STATIC_PLUGIN([ QWindowsIntegrationPlugin] , [ -lqwindows] )
150
150
_BITCOIN_QT_CHECK_STATIC_PLUGIN([ QWindowsVistaStylePlugin] , [ -lqwindowsvistastyle] )
151
151
AC_DEFINE ( [ QT_QPA_PLATFORM_WINDOWS] , [ 1] , [ Define this symbol if the qt platform is windows] )
152
- elif test "x $TARGET_OS" = xlinux ; then
152
+ elif test "$TARGET_OS" = "linux" ; then
153
153
_BITCOIN_QT_CHECK_STATIC_PLUGIN([ QXcbIntegrationPlugin] , [ -lqxcb] )
154
154
AC_DEFINE ( [ QT_QPA_PLATFORM_XCB] , [ 1] , [ Define this symbol if the qt platform is xcb] )
155
- elif test "x $TARGET_OS" = xdarwin ; then
155
+ elif test "$TARGET_OS" = "darwin" ; then
156
156
AX_CHECK_LINK_FLAG ( [ -framework Carbon] , [ QT_LIBS="$QT_LIBS -framework Carbon"] , [ AC_MSG_ERROR ( could not link against Carbon framework ) ] )
157
157
AX_CHECK_LINK_FLAG ( [ -framework IOSurface] , [ QT_LIBS="$QT_LIBS -framework IOSurface"] , [ AC_MSG_ERROR ( could not link against IOSurface framework ) ] )
158
158
AX_CHECK_LINK_FLAG ( [ -framework Metal] , [ QT_LIBS="$QT_LIBS -framework Metal"] , [ AC_MSG_ERROR ( could not link against Metal framework ) ] )
159
159
AX_CHECK_LINK_FLAG ( [ -framework QuartzCore] , [ QT_LIBS="$QT_LIBS -framework QuartzCore"] , [ AC_MSG_ERROR ( could not link against QuartzCore framework ) ] )
160
160
_BITCOIN_QT_CHECK_STATIC_PLUGIN([ QCocoaIntegrationPlugin] , [ -lqcocoa] )
161
161
_BITCOIN_QT_CHECK_STATIC_PLUGIN([ QMacStylePlugin] , [ -lqmacstyle] )
162
162
AC_DEFINE ( [ QT_QPA_PLATFORM_COCOA] , [ 1] , [ Define this symbol if the qt platform is cocoa] )
163
- elif test "x $TARGET_OS" = xandroid ; then
163
+ elif test "$TARGET_OS" = "android" ; then
164
164
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid_$ANDROID_ARCH -ljnigraphics -landroid -lqtfreetype_$ANDROID_ARCH $QT_LIBS"
165
165
AC_DEFINE ( [ QT_QPA_PLATFORM_ANDROID] , [ 1] , [ Define this symbol if the qt platform is android] )
166
166
fi
@@ -169,11 +169,11 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
169
169
CXXFLAGS=$TEMP_CXXFLAGS
170
170
] )
171
171
172
- if test "x $qt_bin_path" = x ; then
172
+ if test "$qt_bin_path" = "" ; then
173
173
qt_bin_path="`$PKG_CONFIG --variable=host_bins ${qt_lib_prefix}Core 2>/dev/null`"
174
174
fi
175
175
176
- if test "x $use_hardening" != xno ; then
176
+ if test "$use_hardening" != "no" ; then
177
177
BITCOIN_QT_CHECK([
178
178
AC_MSG_CHECKING ( [ whether -fPIE can be used with this Qt config] )
179
179
TEMP_CPPFLAGS=$CPPFLAGS
@@ -248,26 +248,26 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
248
248
BITCOIN_QT_CHECK([
249
249
bitcoin_enable_qt=yes
250
250
bitcoin_enable_qt_test=yes
251
- if test "x $have_qt_test" = xno ; then
251
+ if test "$have_qt_test" = "no" ; then
252
252
bitcoin_enable_qt_test=no
253
253
fi
254
254
bitcoin_enable_qt_dbus=no
255
- if test "x $use_dbus" != xno && test "x $have_qt_dbus" = xyes ; then
255
+ if test "$use_dbus" != "no" && test "$have_qt_dbus" = "yes" ; then
256
256
bitcoin_enable_qt_dbus=yes
257
257
fi
258
- if test "x $use_dbus" = xyes && test "x $have_qt_dbus" = xno ; then
258
+ if test "$use_dbus" = "yes" && test "$have_qt_dbus" = "no" ; then
259
259
AC_MSG_ERROR ( [ libQtDBus not found. Install libQtDBus or remove --with-qtdbus.] )
260
260
fi
261
- if test "x $LUPDATE" = x ; then
261
+ if test "$LUPDATE" = "" ; then
262
262
AC_MSG_WARN ( [ lupdate tool is required to update Qt translations.] )
263
263
fi
264
- if test "x $LCONVERT" = x ; then
264
+ if test "$LCONVERT" = "" ; then
265
265
AC_MSG_WARN ( [ lconvert tool is required to update Qt translations.] )
266
266
fi
267
267
] ,[
268
268
bitcoin_enable_qt=no
269
269
] )
270
- if test x $bitcoin_enable_qt = xyes ; then
270
+ if test $bitcoin_enable_qt = "yes" ; then
271
271
AC_MSG_RESULT ( [ $bitcoin_enable_qt ($qt_lib_prefix)] )
272
272
else
273
273
AC_MSG_RESULT ( [ $bitcoin_enable_qt] )
@@ -348,18 +348,18 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [
348
348
PKG_CHECK_MODULES([ QT_FB] , [ ${qt_lib_prefix}FbSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_FB_LIBS $QT_LIBS"] )
349
349
PKG_CHECK_MODULES([ QT_FONTDATABASE] , [ ${qt_lib_prefix}FontDatabaseSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_FONTDATABASE_LIBS $QT_LIBS"] )
350
350
PKG_CHECK_MODULES([ QT_THEME] , [ ${qt_lib_prefix}ThemeSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_THEME_LIBS $QT_LIBS"] )
351
- if test "x $TARGET_OS" = xlinux ; then
351
+ if test "$TARGET_OS" = "linux" ; then
352
352
PKG_CHECK_MODULES([ QT_INPUT] , [ ${qt_lib_prefix}InputSupport] , [ QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"] )
353
353
PKG_CHECK_MODULES([ QT_SERVICE] , [ ${qt_lib_prefix}ServiceSupport] , [ QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"] )
354
354
PKG_CHECK_MODULES([ QT_XCBQPA] , [ ${qt_lib_prefix}XcbQpa] , [ QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"] )
355
355
PKG_CHECK_MODULES([ QT_XKBCOMMON] , [ ${qt_lib_prefix}XkbCommonSupport] , [ QT_LIBS="$QT_XKBCOMMON_LIBS $QT_LIBS"] )
356
- elif test "x $TARGET_OS" = xdarwin ; then
356
+ elif test "$TARGET_OS" = "darwin" ; then
357
357
PKG_CHECK_MODULES([ QT_CLIPBOARD] , [ ${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"] )
358
358
PKG_CHECK_MODULES([ QT_GRAPHICS] , [ ${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"] )
359
359
PKG_CHECK_MODULES([ QT_SERVICE] , [ ${qt_lib_prefix}ServiceSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"] )
360
- elif test "x $TARGET_OS" = xwindows ; then
360
+ elif test "$TARGET_OS" = "windows" ; then
361
361
PKG_CHECK_MODULES([ QT_WINDOWSUIAUTOMATION] , [ ${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"] )
362
- elif test "x $TARGET_OS" = xandroid ; then
362
+ elif test "$TARGET_OS" = "android" ; then
363
363
PKG_CHECK_MODULES([ QT_EGL] , [ ${qt_lib_prefix}EglSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_EGL_LIBS $QT_LIBS"] )
364
364
PKG_CHECK_MODULES([ QT_SERVICE] , [ ${qt_lib_prefix}ServiceSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"] )
365
365
fi
@@ -392,7 +392,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS],[
392
392
393
393
BITCOIN_QT_CHECK([
394
394
PKG_CHECK_MODULES([ QT_TEST] , [ ${qt_lib_prefix}Test${qt_lib_suffix} $qt_version] , [ QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes] , [ have_qt_test=no] )
395
- if test "x $use_dbus" != xno ; then
395
+ if test "$use_dbus" != "no" ; then
396
396
PKG_CHECK_MODULES([ QT_DBUS] , [ ${qt_lib_prefix}DBus $qt_version] , [ QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes] , [ have_qt_dbus=no] )
397
397
fi
398
398
] )
0 commit comments