@@ -276,35 +276,56 @@ AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
276
276
#endif
277
277
] ] ,
278
278
[ [
279
- #if QT_VERSION < 0x050000
279
+ #if QT_VERSION < 0x050000 || QT_VERSION_MAJOR < 5
280
280
choke
281
281
#endif
282
282
] ] ) ] ,
283
283
[ bitcoin_cv_qt5=yes] ,
284
284
[ bitcoin_cv_qt5=no] )
285
285
] ) ] )
286
286
287
- dnl Internal. Check if the linked version of Qt was built as static libs.
288
- dnl Requires: Qt5.
289
- dnl Requires: INCLUDES and LIBS must be populated as necessary.
290
- dnl Output: bitcoin_cv_static_qt=yes|no
291
- dnl Output: Defines QT_STATICPLUGIN if plugins are static.
292
- AC_DEFUN ( [ _BITCOIN_QT_IS_STATIC] ,[
293
- AC_CACHE_CHECK ( for static Qt , bitcoin_cv_static_qt ,[
287
+ dnl Internal. Check if the included version of Qt is greater than Qt58.
288
+ dnl Requires: INCLUDES must be populated as necessary.
289
+ dnl Output: bitcoin_cv_qt5=yes|no
290
+ AC_DEFUN ( [ _BITCOIN_QT_CHECK_QT58] ,[
291
+ AC_CACHE_CHECK ( for > Qt 5.7 , bitcoin_cv_qt58 ,[
294
292
AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
295
293
#include <QtCore/qconfig.h>
296
294
#ifndef QT_VERSION
297
295
# include <QtCore/qglobal.h>
298
296
#endif
299
297
] ] ,
300
298
[ [
301
- #if !defined(QT_STATIC)
299
+ #if QT_VERSION_MINOR < 8
302
300
choke
303
301
#endif
304
302
] ] ) ] ,
305
- [ bitcoin_cv_static_qt=yes] ,
306
- [ bitcoin_cv_static_qt=no] )
307
- ] )
303
+ [ bitcoin_cv_qt58=yes] ,
304
+ [ bitcoin_cv_qt58=no] )
305
+ ] ) ] )
306
+
307
+
308
+ dnl Internal. Check if the linked version of Qt was built as static libs.
309
+ dnl Requires: Qt5. This check cannot determine if Qt4 is static.
310
+ dnl Requires: INCLUDES and LIBS must be populated as necessary.
311
+ dnl Output: bitcoin_cv_static_qt=yes|no
312
+ dnl Output: Defines QT_STATICPLUGIN if plugins are static.
313
+ AC_DEFUN ( [ _BITCOIN_QT_IS_STATIC] ,[
314
+ AC_CACHE_CHECK ( for static Qt , bitcoin_cv_static_qt ,[
315
+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
316
+ #include <QtCore/qconfig.h>
317
+ #ifndef QT_VERSION OR QT_VERSION_STR
318
+ # include <QtCore/qglobal.h>
319
+ #endif
320
+ ] ] ,
321
+ [ [
322
+ #if !defined(QT_STATIC)
323
+ choke
324
+ #endif
325
+ ] ] ) ] ,
326
+ [ bitcoin_cv_static_qt=yes] ,
327
+ [ bitcoin_cv_static_qt=no] )
328
+ ] )
308
329
if test "x$bitcoin_cv_static_qt" = xyes; then
309
330
AC_DEFINE ( QT_STATICPLUGIN , 1 , [ Define this symbol for static Qt plugins] )
310
331
fi
@@ -338,39 +359,60 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
338
359
if test -d "$qt_plugin_path/accessible"; then
339
360
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
340
361
fi
341
- fi
342
- if test "x$use_pkgconfig" = xyes; then
343
- : dnl
344
- m4_ifdef ( [ PKG_CHECK_MODULES] ,[
345
- PKG_CHECK_MODULES([ QTPLATFORM] , [ Qt5PlatformSupport] , [ QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"] )
346
- if test "x$TARGET_OS" = xlinux; then
347
- PKG_CHECK_MODULES([ X11XCB] , [ x11-xcb] , [ QT_LIBS="$X11XCB_LIBS $QT_LIBS"] )
348
- if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then
349
- PKG_CHECK_MODULES([ QTXCBQPA] , [ Qt5XcbQpa] , [ QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"] )
362
+ if test "x$use_pkgconfig" = xyes; then
363
+ : dnl
364
+ m4_ifdef ( [ PKG_CHECK_MODULES] ,[
365
+ if test x$bitcoin_cv_qt58 = xno; then
366
+ PKG_CHECK_MODULES([ QTPLATFORM] , [ Qt5PlatformSupport] , [ QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"] )
367
+ else
368
+ PKG_CHECK_MODULES([ QTFONTDATABASE] , [ Qt5FontDatabaseSupport] , [ QT_LIBS="-lQt5FontDatabaseSupport $QT_LIBS"] )
369
+ PKG_CHECK_MODULES([ QTEVENTDISPATCHER] , [ Qt5EventDispatcherSupport] , [ QT_LIBS="-lQt5EventDispatcherSupport $QT_LIBS"] )
370
+ PKG_CHECK_MODULES([ QTTHEME] , [ Qt5ThemeSupport] , [ QT_LIBS="-lQt5ThemeSupport $QT_LIBS"] )
371
+ PKG_CHECK_MODULES([ QTDEVICEDISCOVERY] , [ Qt5DeviceDiscoverySupport] , [ QT_LIBS="-lQt5DeviceDiscoverySupport $QT_LIBS"] )
372
+ PKG_CHECK_MODULES([ QTACCESSIBILITY] , [ Qt5AccessibilitySupport] , [ QT_LIBS="-lQt5AccessibilitySupport $QT_LIBS"] )
373
+ PKG_CHECK_MODULES([ QTFB] , [ Qt5FbSupport] , [ QT_LIBS="-lQt5FbSupport $QT_LIBS"] )
374
+ fi
375
+ if test "x$TARGET_OS" = xlinux; then
376
+ PKG_CHECK_MODULES([ X11XCB] , [ x11-xcb] , [ QT_LIBS="$X11XCB_LIBS $QT_LIBS"] )
377
+ if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then
378
+ PKG_CHECK_MODULES([ QTXCBQPA] , [ Qt5XcbQpa] , [ QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"] )
379
+ fi
380
+ elif test "x$TARGET_OS" = xdarwin; then
381
+ PKG_CHECK_MODULES([ QTCLIPBOARD] , [ Qt5ClipboardSupport] , [ QT_LIBS="-lQt5ClipboardSupport $QT_LIBS"] )
382
+ PKG_CHECK_MODULES([ QTGRAPHICS] , [ Qt5GraphicsSupport] , [ QT_LIBS="-lQt5GraphicsSupport $QT_LIBS"] )
383
+ PKG_CHECK_MODULES([ QTCGL] , [ Qt5CglSupport] , [ QT_LIBS="-lQt5CglSupport $QT_LIBS"] )
350
384
fi
351
- elif test "x$TARGET_OS" = xdarwin; then
352
- PKG_CHECK_MODULES([ QTPRINT] , [ Qt5PrintSupport] , [ QT_LIBS="$QTPRINT_LIBS $QT_LIBS"] )
353
- fi
354
- ] )
355
- else
356
- if test "x$TARGET_OS" = xwindows; then
357
- AC_CACHE_CHECK ( for Qt >= 5.6 , bitcoin_cv_need_platformsupport ,[
358
- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
359
- #include <QtCore/qconfig.h>
360
- #ifndef QT_VERSION
361
- # include <QtCore/qglobal.h>
362
- #endif
363
- ] ] ,
364
- [ [
365
- #if QT_VERSION < 0x050600
366
- choke
367
- #endif
368
- ] ] ) ] ,
369
- [ bitcoin_cv_need_platformsupport=yes] ,
370
- [ bitcoin_cv_need_platformsupport=no] )
371
- ] )
372
- if test "x$bitcoin_cv_need_platformsupport" = xyes; then
373
- BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}PlatformSupport] ,[ main] ,,BITCOIN_QT_FAIL ( lib${QT_LIB_PREFIX}PlatformSupport not found )) )
385
+ ] )
386
+ else
387
+ if test "x$TARGET_OS" = xwindows; then
388
+ AC_CACHE_CHECK ( for Qt >= 5.6 , bitcoin_cv_need_platformsupport ,[
389
+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
390
+ #include <QtCore/qconfig.h>
391
+ #ifndef QT_VERSION
392
+ # include <QtCore/qglobal.h>
393
+ #endif
394
+ ] ] ,
395
+ [ [
396
+ #if QT_VERSION < 0x050600 || QT_VERSION_MINOR < 6
397
+ choke
398
+ #endif
399
+ ] ] ) ] ,
400
+ [ bitcoin_cv_need_platformsupport=yes] ,
401
+ [ bitcoin_cv_need_platformsupport=no] )
402
+ ] )
403
+ if test "x$bitcoin_cv_need_platformsupport" = xyes; then
404
+ if test x$bitcoin_cv_qt58 = xno; then
405
+ BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}PlatformSupport] ,[ main] ,,BITCOIN_QT_FAIL ( lib$QT_LIB_PREFIXPlatformSupport not found )) )
406
+ else
407
+ BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}FontDatabaseSupport] ,[ main] ,,BITCOIN_QT_FAIL ( lib$QT_LIB_PREFIXFontDatabaseSupport not found )) )
408
+ BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}EventDispatcherSupport] ,[ main] ,,BITCOIN_QT_FAIL ( lib$QT_LIB_PREFIXEventDispatcherSupport not found )) )
409
+ BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}ThemeSupport] ,[ main] ,,BITCOIN_QT_FAIL ( lib$QT_LIB_PREFIXThemeSupport not found )) )
410
+ BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}FbSupport] ,[ main] ,,BITCOIN_QT_FAIL ( lib$QT_LIB_PREFIXFbSupport not found )) )
411
+ BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}DeviceDiscoverySupport] ,[ main] ,,BITCOIN_QT_FAIL ( lib$QT_LIB_PREFIXDeviceDiscoverySupport not found )) )
412
+ BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}AccessibilitySupport] ,[ main] ,,BITCOIN_QT_FAIL ( lib$QT_LIB_PREFIXAccessibilitySupport not found )) )
413
+ QT_LIBS="$QT_LIBS -lversion -ldwmapi -luxtheme"
414
+ fi
415
+ fi
374
416
fi
375
417
fi
376
418
fi
@@ -430,6 +472,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
430
472
BITCOIN_QT_CHECK([
431
473
if test "x$bitcoin_qt_want_version" = xauto; then
432
474
_BITCOIN_QT_CHECK_QT5
475
+ _BITCOIN_QT_CHECK_QT58
433
476
fi
434
477
QT_LIB_PREFIX=Qt5
435
478
] )
@@ -446,10 +489,15 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
446
489
] )
447
490
448
491
BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ z] ,[ main] ,,AC_MSG_WARN ( [ zlib not found. Assuming qt has it built-in] ) ) )
449
- BITCOIN_QT_CHECK(AC_SEARCH_LIBS ( [ png_error] ,[ qtpng png] ,,AC_MSG_WARN ( [ libpng not found. Assuming qt has it built-in] ) ) )
450
492
BITCOIN_QT_CHECK(AC_SEARCH_LIBS ( [ jpeg_create_decompress] ,[ qtjpeg jpeg] ,,AC_MSG_WARN ( [ libjpeg not found. Assuming qt has it built-in] ) ) )
451
- BITCOIN_QT_CHECK(AC_SEARCH_LIBS ( [ pcre16_exec] , [ qtpcre pcre16] ,,AC_MSG_WARN ( [ libpcre16 not found. Assuming qt has it built-in] ) ) )
452
- BITCOIN_QT_CHECK(AC_SEARCH_LIBS ( [ hb_ot_tags_from_script] ,[ qtharfbuzzng harfbuzz] ,,AC_MSG_WARN ( [ libharfbuzz not found. Assuming qt has it built-in or support is disabled] ) ) )
493
+ if test x$bitcoin_cv_qt58 = xno; then
494
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS ( [ png_error] ,[ qtpng png] ,,AC_MSG_WARN ( [ libpng not found. Assuming qt has it built-in] ) ) )
495
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS ( [ pcre16_exec] , [ qtpcre pcre16] ,,AC_MSG_WARN ( [ libpcre16 not found. Assuming qt has it built-in] ) ) )
496
+ else
497
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS ( [ png_error] ,[ qtlibpng png] ,,AC_MSG_WARN ( [ libpng not found. Assuming qt has it built-in] ) ) )
498
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS ( [ pcre2_match_16] , [ qtpcre2 libqtpcre2] ,,AC_MSG_WARN ( [ libqtpcre2 not found. Assuming qt has it built-in] ) ) )
499
+ fi
500
+ BITCOIN_QT_CHECK(AC_SEARCH_LIBS ( [ hb_ot_tags_from_script] ,[ qtharfbuzzng qtharfbuzz harfbuzz] ,,AC_MSG_WARN ( [ libharfbuzz not found. Assuming qt has it built-in or support is disabled] ) ) )
453
501
BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}Core] ,[ main] ,,BITCOIN_QT_FAIL ( lib${QT_LIB_PREFIX}Core not found )) )
454
502
BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}Gui] ,[ main] ,,BITCOIN_QT_FAIL ( lib${QT_LIB_PREFIX}Gui not found )) )
455
503
BITCOIN_QT_CHECK(AC_CHECK_LIB ( [ ${QT_LIB_PREFIX}Network] ,[ main] ,,BITCOIN_QT_FAIL ( lib${QT_LIB_PREFIX}Network not found )) )
0 commit comments