@@ -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 "x$bitcoin_qt_want_version" = xauto && test " x$bitcoin_qt_force" != xyes; then
9
+ if test " x$bitcoin_enable_qt" != xno; 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 "x$bitcoin_enable_qt" != xno && test " x$bitcoin_qt_want_version" != xno; 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 "x$3 " != x ; 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 "x$$1 " = x && test "x$4 " != xyes; then
44
44
BITCOIN_QT_FAIL([ $1 not found] )
45
45
fi
46
46
] )
@@ -57,7 +57,7 @@ AC_DEFUN([BITCOIN_QT_INIT],[
57
57
[ build bitcoin-qt GUI (default=auto, qt5 tried first)] ) ] ,
58
58
[
59
59
bitcoin_qt_want_version=$withval
60
- if test x$bitcoin_qt_want_version = xyes; then
60
+ if test " x$bitcoin_qt_want_version" = xyes; then
61
61
bitcoin_qt_force=yes
62
62
bitcoin_qt_want_version=auto
63
63
fi
@@ -89,11 +89,11 @@ dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test
89
89
AC_DEFUN ( [ BITCOIN_QT_CONFIGURE] ,[
90
90
use_pkgconfig=$1
91
91
92
- if test x$use_pkgconfig = x; then
92
+ if test " x$use_pkgconfig" = x; then
93
93
use_pkgconfig=yes
94
94
fi
95
95
96
- if test x$use_pkgconfig = xyes; then
96
+ if test " x$use_pkgconfig" = xyes; then
97
97
BITCOIN_QT_CHECK([ _BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG([ $2 ] )] )
98
98
else
99
99
BITCOIN_QT_CHECK([ _BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG] )
@@ -113,9 +113,9 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
113
113
TEMP_CXXFLAGS=$CXXFLAGS
114
114
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
115
115
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
116
- if test x$bitcoin_qt_got_major_vers = x5; then
116
+ if test " x$bitcoin_qt_got_major_vers" = x5; then
117
117
_BITCOIN_QT_IS_STATIC
118
- if test x$bitcoin_cv_static_qt = xyes; then
118
+ if test " x$bitcoin_cv_static_qt" = xyes; then
119
119
_BITCOIN_QT_FIND_STATIC_PLUGINS
120
120
AC_DEFINE ( QT_STATICPLUGIN , 1 , [ Define this symbol if qt plugins are static] )
121
121
AC_CACHE_CHECK ( for Qt < 5.4 , bitcoin_cv_need_acc_widget ,[
@@ -133,25 +133,25 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
133
133
[ bitcoin_cv_need_acc_widget=yes] ,
134
134
[ bitcoin_cv_need_acc_widget=no] )
135
135
] )
136
- if test "x$bitcoin_cv_need_acc_widget" = " xyes" ; then
136
+ if test "x$bitcoin_cv_need_acc_widget" = xyes; then
137
137
_BITCOIN_QT_CHECK_STATIC_PLUGINS([ Q_IMPORT_PLUGIN(AccessibleFactory)] , [ -lqtaccessiblewidgets] )
138
138
fi
139
139
_BITCOIN_QT_CHECK_STATIC_PLUGINS([ Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)] ,[ -lqminimal] )
140
140
AC_DEFINE ( QT_QPA_PLATFORM_MINIMAL , 1 , [ Define this symbol if the minimal qt platform exists] )
141
- if test x$TARGET_OS = xwindows; then
141
+ if test " x$TARGET_OS" = xwindows; then
142
142
_BITCOIN_QT_CHECK_STATIC_PLUGINS([ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)] ,[ -lqwindows] )
143
143
AC_DEFINE ( QT_QPA_PLATFORM_WINDOWS , 1 , [ Define this symbol if the qt platform is windows] )
144
- elif test x$TARGET_OS = xlinux; then
144
+ elif test " x$TARGET_OS" = xlinux; then
145
145
_BITCOIN_QT_CHECK_STATIC_PLUGINS([ Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)] ,[ -lqxcb -lxcb-static] )
146
146
AC_DEFINE ( QT_QPA_PLATFORM_XCB , 1 , [ Define this symbol if the qt platform is xcb] )
147
- elif test x$TARGET_OS = xdarwin; then
147
+ elif test " x$TARGET_OS" = xdarwin; then
148
148
AX_CHECK_LINK_FLAG ( [ [ -framework IOKit] ] ,[ QT_LIBS="$QT_LIBS -framework IOKit"] ,[ AC_MSG_ERROR ( could not iokit framework ) ] )
149
149
_BITCOIN_QT_CHECK_STATIC_PLUGINS([ Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)] ,[ -lqcocoa] )
150
150
AC_DEFINE ( QT_QPA_PLATFORM_COCOA , 1 , [ Define this symbol if the qt platform is cocoa] )
151
151
fi
152
152
fi
153
153
else
154
- if test x$TARGET_OS = xwindows; then
154
+ if test " x$TARGET_OS" = xwindows; then
155
155
AC_DEFINE ( QT_STATICPLUGIN , 1 , [ Define this symbol if qt plugins are static] )
156
156
_BITCOIN_QT_CHECK_STATIC_PLUGINS([
157
157
Q_IMPORT_PLUGIN(qcncodecs)
@@ -166,13 +166,13 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
166
166
CXXFLAGS=$TEMP_CXXFLAGS
167
167
] )
168
168
169
- if test x$use_pkgconfig$qt_bin_path = xyes; then
170
- if test x$bitcoin_qt_got_major_vers = x5; then
169
+ if test " x$use_pkgconfig$qt_bin_path" = xyes; then
170
+ if test " x$bitcoin_qt_got_major_vers" = x5; then
171
171
qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
172
172
fi
173
173
fi
174
174
175
- if test x$use_hardening != xno; then
175
+ if test " x$use_hardening" != xno; then
176
176
BITCOIN_QT_CHECK([
177
177
AC_MSG_CHECKING ( whether - fPIE can be used with this Qt config )
178
178
TEMP_CPPFLAGS=$CPPFLAGS
@@ -246,17 +246,17 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
246
246
BITCOIN_QT_CHECK([
247
247
bitcoin_enable_qt=yes
248
248
bitcoin_enable_qt_test=yes
249
- if test x$have_qt_test = xno; then
249
+ if test " x$have_qt_test" = xno; then
250
250
bitcoin_enable_qt_test=no
251
251
fi
252
252
bitcoin_enable_qt_dbus=no
253
- if test x$use_dbus != xno && test x$have_qt_dbus = xyes; then
253
+ if test " x$use_dbus" != xno && test " x$have_qt_dbus" = xyes; then
254
254
bitcoin_enable_qt_dbus=yes
255
255
fi
256
- if test x$use_dbus = xyes && test x$have_qt_dbus = xno; then
256
+ if test " x$use_dbus" = xyes && test " x$have_qt_dbus" = xno; then
257
257
AC_MSG_ERROR ( [ libQtDBus not found. Install libQtDBus or remove --with-qtdbus.] )
258
258
fi
259
- if test x$LUPDATE = x; then
259
+ if test " x$LUPDATE" = x; then
260
260
AC_MSG_WARN ( [ lupdate is required to update qt translations] )
261
261
fi
262
262
] ,[
@@ -321,7 +321,7 @@ AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
321
321
[ bitcoin_cv_static_qt=yes] ,
322
322
[ bitcoin_cv_static_qt=no] )
323
323
] )
324
- if test x$bitcoin_cv_static_qt = xyes; then
324
+ if test " x$bitcoin_cv_static_qt" = xyes; then
325
325
AC_DEFINE ( QT_STATICPLUGIN , 1 , [ Define this symbol for static Qt plugins] )
326
326
fi
327
327
] )
@@ -350,28 +350,28 @@ dnl Inputs: bitcoin_qt_got_major_vers. 4 or 5.
350
350
dnl Inputs: qt_plugin_path. optional.
351
351
dnl Outputs: QT_LIBS is appended
352
352
AC_DEFUN ( [ _BITCOIN_QT_FIND_STATIC_PLUGINS] ,[
353
- if test x$bitcoin_qt_got_major_vers = x5; then
354
- if test x$qt_plugin_path != x; then
353
+ if test " x$bitcoin_qt_got_major_vers" = x5; then
354
+ if test " x$qt_plugin_path" != x; then
355
355
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
356
356
if test -d "$qt_plugin_path/accessible"; then
357
357
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
358
358
fi
359
359
fi
360
- if test x$use_pkgconfig = xyes; then
360
+ if test " x$use_pkgconfig" = xyes; then
361
361
: dnl
362
362
m4_ifdef ( [ PKG_CHECK_MODULES] ,[
363
363
PKG_CHECK_MODULES([ QTPLATFORM] , [ Qt5PlatformSupport] , [ QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"] )
364
- if test x$TARGET_OS = xlinux; then
364
+ if test " x$TARGET_OS" = xlinux; then
365
365
PKG_CHECK_MODULES([ X11XCB] , [ x11-xcb] , [ QT_LIBS="$X11XCB_LIBS $QT_LIBS"] )
366
366
if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then
367
367
PKG_CHECK_MODULES([ QTXCBQPA] , [ Qt5XcbQpa] , [ QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"] )
368
368
fi
369
- elif test x$TARGET_OS = xdarwin; then
369
+ elif test " x$TARGET_OS" = xdarwin; then
370
370
PKG_CHECK_MODULES([ QTPRINT] , [ Qt5PrintSupport] , [ QT_LIBS="$QTPRINT_LIBS $QT_LIBS"] )
371
371
fi
372
372
] )
373
373
else
374
- if test x$TARGET_OS = xwindows; then
374
+ if test " x$TARGET_OS" = xwindows; then
375
375
AC_CACHE_CHECK ( for Qt >= 5.6 , bitcoin_cv_need_platformsupport ,[
376
376
AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
377
377
#include <QtCore/qconfig.h>
@@ -387,13 +387,13 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
387
387
[ bitcoin_cv_need_platformsupport=yes] ,
388
388
[ bitcoin_cv_need_platformsupport=no] )
389
389
] )
390
- if test x$bitcoin_cv_need_platformsupport = xyes; then
390
+ if test " x$bitcoin_cv_need_platformsupport" = xyes; then
391
391
BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}PlatformSupport] ,[ main] ,,BITCOIN_QT_FAIL ( lib${QT_LIB_PREFIX}PlatformSupport not found )) )
392
392
fi
393
393
fi
394
394
fi
395
395
else
396
- if test x$qt_plugin_path != x; then
396
+ if test " x$qt_plugin_path" != x; then
397
397
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
398
398
QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs"
399
399
fi
@@ -411,10 +411,10 @@ dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
411
411
AC_DEFUN ( [ _BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG] ,[
412
412
m4_ifdef ( [ PKG_CHECK_MODULES] ,[
413
413
auto_priority_version=$1
414
- if test x$auto_priority_version = x; then
414
+ if test " x$auto_priority_version" = x; then
415
415
auto_priority_version=qt5
416
416
fi
417
- if test x$bitcoin_qt_want_version = xqt5 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
417
+ if test " x$bitcoin_qt_want_version" = xqt5 || ( test " x$bitcoin_qt_want_version" = xauto && test " x$auto_priority_version" = xqt5 ); then
418
418
QT_LIB_PREFIX=Qt5
419
419
bitcoin_qt_got_major_vers=5
420
420
else
@@ -424,28 +424,28 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
424
424
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
425
425
qt4_modules="QtCore QtGui QtNetwork"
426
426
BITCOIN_QT_CHECK([
427
- if test x$bitcoin_qt_want_version = xqt5 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
427
+ if test " x$bitcoin_qt_want_version" = xqt5 || ( test " x$bitcoin_qt_want_version" = xauto && test " x$auto_priority_version" = xqt5 ); then
428
428
PKG_CHECK_MODULES([ QT5] , [ $qt5_modules] , [ QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" have_qt=yes] ,[ have_qt=no] )
429
- elif test x$bitcoin_qt_want_version = xqt4 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt4 ); then
429
+ elif test " x$bitcoin_qt_want_version" = xqt4 || ( test " x$bitcoin_qt_want_version" = xauto && test " x$auto_priority_version" = xqt4 ); then
430
430
PKG_CHECK_MODULES([ QT4] , [ $qt4_modules] , [ QT_INCLUDES="$QT4_CFLAGS"; QT_LIBS="$QT4_LIBS" ; have_qt=yes] , [ have_qt=no] )
431
431
fi
432
432
433
433
dnl qt version is set to 'auto' and the preferred version wasn't found. Now try the other.
434
- if test x$have_qt = xno && test x$bitcoin_qt_want_version = xauto; then
435
- if test x$auto_priority_version = xqt5; then
434
+ if test " x$have_qt" = xno && test " x$bitcoin_qt_want_version" = xauto; then
435
+ if test " x$auto_priority_version" = xqt5; then
436
436
PKG_CHECK_MODULES([ QT4] , [ $qt4_modules] , [ QT_INCLUDES="$QT4_CFLAGS"; QT_LIBS="$QT4_LIBS" ; have_qt=yes; QT_LIB_PREFIX=Qt; bitcoin_qt_got_major_vers=4] , [ have_qt=no] )
437
437
else
438
438
PKG_CHECK_MODULES([ QT5] , [ $qt5_modules] , [ QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" ; have_qt=yes; QT_LIB_PREFIX=Qt5; bitcoin_qt_got_major_vers=5] , [ have_qt=no] )
439
439
fi
440
440
fi
441
- if test x$have_qt != xyes; then
441
+ if test " x$have_qt" != xyes; then
442
442
have_qt=no
443
443
BITCOIN_QT_FAIL([ Qt dependencies not found] )
444
444
fi
445
445
] )
446
446
BITCOIN_QT_CHECK([
447
447
PKG_CHECK_MODULES([ QT_TEST] , [ ${QT_LIB_PREFIX}Test] , [ QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes] , [ have_qt_test=no] )
448
- if test x$use_dbus != xno; then
448
+ if test " x$use_dbus" != xno; then
449
449
PKG_CHECK_MODULES([ QT_DBUS] , [ ${QT_LIB_PREFIX}DBus] , [ QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes] , [ have_qt_dbus=no] )
450
450
fi
451
451
] )
@@ -466,7 +466,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
466
466
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
467
467
TEMP_LIBS="$LIBS"
468
468
BITCOIN_QT_CHECK([
469
- if test x$qt_include_path != x; then
469
+ if test " x$qt_include_path" != x; then
470
470
QT_INCLUDES="-I$qt_include_path -I$qt_include_path/QtCore -I$qt_include_path/QtGui -I$qt_include_path/QtWidgets -I$qt_include_path/QtNetwork -I$qt_include_path/QtTest -I$qt_include_path/QtDBus"
471
471
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
472
472
fi
@@ -477,10 +477,10 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
477
477
BITCOIN_QT_CHECK([ AC_CHECK_HEADER ( [ QLocalSocket] ,, BITCOIN_QT_FAIL ( QtNetwork headers missing )) ] )
478
478
479
479
BITCOIN_QT_CHECK([
480
- if test x$bitcoin_qt_want_version = xauto; then
480
+ if test " x$bitcoin_qt_want_version" = xauto; then
481
481
_BITCOIN_QT_CHECK_QT5
482
482
fi
483
- if test x$bitcoin_cv_qt5 = xyes || test x$bitcoin_qt_want_version = xqt5; then
483
+ if test " x$bitcoin_cv_qt5" = xyes || test " x$bitcoin_qt_want_version" = xqt5; then
484
484
QT_LIB_PREFIX=Qt5
485
485
bitcoin_qt_got_major_vers=5
486
486
else
@@ -491,11 +491,11 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
491
491
492
492
BITCOIN_QT_CHECK([
493
493
LIBS=
494
- if test x$qt_lib_path != x; then
494
+ if test " x$qt_lib_path" != x; then
495
495
LIBS="$LIBS -L$qt_lib_path"
496
496
fi
497
497
498
- if test x$TARGET_OS = xwindows; then
498
+ if test " x$TARGET_OS" = xwindows; then
499
499
AC_CHECK_LIB ( [ imm32] , [ main] ,, BITCOIN_QT_FAIL ( libimm32 not found ))
500
500
fi
501
501
] )
@@ -508,23 +508,23 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
508
508
BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}Core] ,[ main] ,,BITCOIN_QT_FAIL ( lib${QT_LIB_PREFIX}Core not found )) )
509
509
BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}Gui] ,[ main] ,,BITCOIN_QT_FAIL ( lib${QT_LIB_PREFIX}Gui not found )) )
510
510
BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}Network] ,[ main] ,,BITCOIN_QT_FAIL ( lib${QT_LIB_PREFIX}Network not found )) )
511
- if test x$bitcoin_qt_got_major_vers = x5; then
511
+ if test " x$bitcoin_qt_got_major_vers" = x5; then
512
512
BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}Widgets] ,[ main] ,,BITCOIN_QT_FAIL ( lib${QT_LIB_PREFIX}Widgets not found )) )
513
513
fi
514
514
QT_LIBS="$LIBS"
515
515
LIBS="$TEMP_LIBS"
516
516
517
517
BITCOIN_QT_CHECK([
518
518
LIBS=
519
- if test x$qt_lib_path != x; then
519
+ if test " x$qt_lib_path" != x; then
520
520
LIBS="-L$qt_lib_path"
521
521
fi
522
522
AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}Test] , [ main] ,, have_qt_test=no )
523
523
AC_CHECK_HEADER ( [ QTest] ,, have_qt_test=no )
524
524
QT_TEST_LIBS="$LIBS"
525
- if test x$use_dbus != xno; then
525
+ if test " x$use_dbus" != xno; then
526
526
LIBS=
527
- if test x$qt_lib_path != x; then
527
+ if test " x$qt_lib_path" != x; then
528
528
LIBS="-L$qt_lib_path"
529
529
fi
530
530
AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}DBus] , [ main] ,, have_qt_dbus=no )
0 commit comments