@@ -5,8 +5,8 @@ dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
55dnl Helper for cases where a qt dependency is not met.
66dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit.
77AC_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
1010 AC_MSG_WARN ( [ $1 ; bitcoin-qt frontend will not be built] )
1111 fi
1212 bitcoin_enable_qt=no
@@ -17,7 +17,7 @@ AC_DEFUN([BITCOIN_QT_FAIL],[
1717] )
1818
1919AC_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
2121 true
2222 $1
2323 else
@@ -35,12 +35,12 @@ dnl Inputs: $4: If "yes", don't fail if $2 is not found.
3535dnl Output: $1 is set to the path of $2 if found. $2 are searched in order.
3636AC_DEFUN ( [ BITCOIN_QT_PATH_PROGS] ,[
3737 BITCOIN_QT_CHECK([
38- if test "x $3 " != x ; then
38+ if test "$3 " != "" ; then
3939 AC_PATH_PROGS ( [ $1 ] , [ $2 ] , [ ] , [ $3 ] )
4040 else
4141 AC_PATH_PROGS ( [ $1 ] , [ $2 ] )
4242 fi
43- if test "x $$1 " = x && test "x $4 " != xyes ; then
43+ if test "$$1 " = "" && test "$4 " != "yes" ; then
4444 BITCOIN_QT_FAIL([ $1 not found] )
4545 fi
4646 ] )
@@ -57,14 +57,14 @@ AC_DEFUN([BITCOIN_QT_INIT],[
5757 [ build bitcoin-qt GUI (default=auto)] ) ] ,
5858 [
5959 bitcoin_qt_want_version=$withval
60- if test "x $bitcoin_qt_want_version" = xyes ; then
60+ if test "$bitcoin_qt_want_version" = "yes" ; then
6161 bitcoin_qt_force=yes
6262 bitcoin_qt_want_version=auto
6363 fi
6464 ] ,
6565 [ bitcoin_qt_want_version=auto] )
6666
67- AS_IF ( [ test "x $with_gui" = xqt5_debug ] ,
67+ AS_IF ( [ test "$with_gui" = "qt5_debug" ] ,
6868 [ AS_CASE ( [ $host] ,
6969 [ *darwin*] , [ qt_lib_suffix=_debug] ,
7070 [ qt_lib_suffix= ] ) ; bitcoin_qt_want_version=qt5] ,
@@ -87,7 +87,7 @@ AC_DEFUN([BITCOIN_QT_INIT],[
8787 dnl Android doesn't support D-Bus and certainly doesn't use it for notifications
8888 case $host in
8989 *android*)
90- if test "x $use_dbus" != xyes ; then
90+ if test "$use_dbus" != "yes" ; then
9191 use_dbus=no
9292 fi
9393 ;;
@@ -119,10 +119,10 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
119119 CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
120120 CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
121121 _BITCOIN_QT_IS_STATIC
122- if test "x $bitcoin_cv_static_qt" = xyes ; then
122+ if test "$bitcoin_cv_static_qt" = "yes" ; then
123123 _BITCOIN_QT_CHECK_STATIC_LIBS
124124
125- if test "x $qt_plugin_path" != x ; then
125+ if test "$qt_plugin_path" != "" ; then
126126 if test -d "$qt_plugin_path/platforms"; then
127127 QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
128128 fi
@@ -138,29 +138,29 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
138138 fi
139139
140140 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
142142 _BITCOIN_QT_CHECK_STATIC_PLUGIN([ QMinimalIntegrationPlugin] , [ -lqminimal] )
143143 AC_DEFINE ( [ QT_QPA_PLATFORM_MINIMAL] , [ 1] , [ Define this symbol if the minimal qt platform exists] )
144144 fi
145- if test "x $TARGET_OS" = xwindows ; then
145+ if test "$TARGET_OS" = "windows" ; then
146146 dnl Linking against wtsapi32 is required. See #17749 and
147147 dnl https://bugreports.qt.io/browse/QTBUG-27097.
148148 AX_CHECK_LINK_FLAG ( [ -lwtsapi32] , [ QT_LIBS="$QT_LIBS -lwtsapi32"] , [ AC_MSG_ERROR ( [ could not link against -lwtsapi32] ) ] )
149149 _BITCOIN_QT_CHECK_STATIC_PLUGIN([ QWindowsIntegrationPlugin] , [ -lqwindows] )
150150 _BITCOIN_QT_CHECK_STATIC_PLUGIN([ QWindowsVistaStylePlugin] , [ -lqwindowsvistastyle] )
151151 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
153153 _BITCOIN_QT_CHECK_STATIC_PLUGIN([ QXcbIntegrationPlugin] , [ -lqxcb] )
154154 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
156156 AX_CHECK_LINK_FLAG ( [ -framework Carbon] , [ QT_LIBS="$QT_LIBS -framework Carbon"] , [ AC_MSG_ERROR ( could not link against Carbon framework ) ] )
157157 AX_CHECK_LINK_FLAG ( [ -framework IOSurface] , [ QT_LIBS="$QT_LIBS -framework IOSurface"] , [ AC_MSG_ERROR ( could not link against IOSurface framework ) ] )
158158 AX_CHECK_LINK_FLAG ( [ -framework Metal] , [ QT_LIBS="$QT_LIBS -framework Metal"] , [ AC_MSG_ERROR ( could not link against Metal framework ) ] )
159159 AX_CHECK_LINK_FLAG ( [ -framework QuartzCore] , [ QT_LIBS="$QT_LIBS -framework QuartzCore"] , [ AC_MSG_ERROR ( could not link against QuartzCore framework ) ] )
160160 _BITCOIN_QT_CHECK_STATIC_PLUGIN([ QCocoaIntegrationPlugin] , [ -lqcocoa] )
161161 _BITCOIN_QT_CHECK_STATIC_PLUGIN([ QMacStylePlugin] , [ -lqmacstyle] )
162162 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
164164 QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid_$ANDROID_ARCH -ljnigraphics -landroid -lqtfreetype_$ANDROID_ARCH $QT_LIBS"
165165 AC_DEFINE ( [ QT_QPA_PLATFORM_ANDROID] , [ 1] , [ Define this symbol if the qt platform is android] )
166166 fi
@@ -169,11 +169,11 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
169169 CXXFLAGS=$TEMP_CXXFLAGS
170170 ] )
171171
172- if test "x $qt_bin_path" = x ; then
172+ if test "$qt_bin_path" = "" ; then
173173 qt_bin_path="`$PKG_CONFIG --variable=host_bins ${qt_lib_prefix}Core 2>/dev/null`"
174174 fi
175175
176- if test "x $use_hardening" != xno ; then
176+ if test "$use_hardening" != "no" ; then
177177 BITCOIN_QT_CHECK([
178178 AC_MSG_CHECKING ( [ whether -fPIE can be used with this Qt config] )
179179 TEMP_CPPFLAGS=$CPPFLAGS
@@ -248,26 +248,26 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
248248 BITCOIN_QT_CHECK([
249249 bitcoin_enable_qt=yes
250250 bitcoin_enable_qt_test=yes
251- if test "x $have_qt_test" = xno ; then
251+ if test "$have_qt_test" = "no" ; then
252252 bitcoin_enable_qt_test=no
253253 fi
254254 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
256256 bitcoin_enable_qt_dbus=yes
257257 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
259259 AC_MSG_ERROR ( [ libQtDBus not found. Install libQtDBus or remove --with-qtdbus.] )
260260 fi
261- if test "x $LUPDATE" = x ; then
261+ if test "$LUPDATE" = "" ; then
262262 AC_MSG_WARN ( [ lupdate tool is required to update Qt translations.] )
263263 fi
264- if test "x $LCONVERT" = x ; then
264+ if test "$LCONVERT" = "" ; then
265265 AC_MSG_WARN ( [ lconvert tool is required to update Qt translations.] )
266266 fi
267267 ] ,[
268268 bitcoin_enable_qt=no
269269 ] )
270- if test x $bitcoin_enable_qt = xyes ; then
270+ if test $bitcoin_enable_qt = "yes" ; then
271271 AC_MSG_RESULT ( [ $bitcoin_enable_qt ($qt_lib_prefix)] )
272272 else
273273 AC_MSG_RESULT ( [ $bitcoin_enable_qt] )
@@ -348,18 +348,18 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [
348348 PKG_CHECK_MODULES([ QT_FB] , [ ${qt_lib_prefix}FbSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_FB_LIBS $QT_LIBS"] )
349349 PKG_CHECK_MODULES([ QT_FONTDATABASE] , [ ${qt_lib_prefix}FontDatabaseSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_FONTDATABASE_LIBS $QT_LIBS"] )
350350 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
352352 PKG_CHECK_MODULES([ QT_INPUT] , [ ${qt_lib_prefix}InputSupport] , [ QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"] )
353353 PKG_CHECK_MODULES([ QT_SERVICE] , [ ${qt_lib_prefix}ServiceSupport] , [ QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"] )
354354 PKG_CHECK_MODULES([ QT_XCBQPA] , [ ${qt_lib_prefix}XcbQpa] , [ QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"] )
355355 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
357357 PKG_CHECK_MODULES([ QT_CLIPBOARD] , [ ${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"] )
358358 PKG_CHECK_MODULES([ QT_GRAPHICS] , [ ${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"] )
359359 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
361361 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
363363 PKG_CHECK_MODULES([ QT_EGL] , [ ${qt_lib_prefix}EglSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_EGL_LIBS $QT_LIBS"] )
364364 PKG_CHECK_MODULES([ QT_SERVICE] , [ ${qt_lib_prefix}ServiceSupport${qt_lib_suffix}] , [ QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"] )
365365 fi
@@ -392,7 +392,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS],[
392392
393393 BITCOIN_QT_CHECK([
394394 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
396396 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] )
397397 fi
398398 ] )
0 commit comments