mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
Merge #21565: build: make bitcoin_qt.m4 more generic
fecb3723b63d1441f1f786352e9ef330c1ac57a5 build: additional PKG_CHECK_MODULES calls in bitcoin_qt.m4 (fanquake) a53eff3ce527f067a34ce2159b190585659ddcb9 build: misc doc changes in bitcoin_qt.m4 (fanquake) 340fa6c0ffa190051cf11ef70c4fdfabc21e1ccc build: set QT_*_CFLAGS & QT_*_LIBS in PKG_CHECK_MODULES() calls (fanquake) 4b8ad97c5bfac551b4a0cf41ec0dfebf8b6c0298 build: use QT_*_LIBS rather than passing lib names (fanquake) 13313b290400d79b3a4c137a53159154874c6949 scripted-diff: replace Qt5 with ${qt_lib_prefix} in _BITCOIN_QT_CHECK_STATIC_LIBS (fanquake) 477df3623c8991a2e438cddf3c6a46c961bf13a2 build: reorder libs in _BITCOIN_QT_CHECK_STATIC_LIBS (move-only) (fanquake) Pull request description: These are some small changes to simplify this code before we may end up supporting Qt6. Replaces usages of `Qt5` with `qt_lib_prefix`, minor docs cleanups and takes care of [a suggestion](https://github.com/bitcoin/bitcoin/pull/21376#discussion_r590693514) left over from #21376. Guix builds: ```bash 8749dca4a86c39607ff86b0107b76daea60d415a15b5022824f4a4469c6edc37 output/bitcoin-fecb3723b63d-aarch64-linux-gnu-debug.tar.gz 7b162ad6d953ceed9402f5fef03a8199a76c6dd300a71b03c1814c33ce0126f6 output/bitcoin-fecb3723b63d-aarch64-linux-gnu.tar.gz 869c42616320fc5bb25e942d7e20c0a8a4b8510939f8f8f6021a784e4afda83e output/bitcoin-fecb3723b63d-arm-linux-gnueabihf-debug.tar.gz 278b1481045e93b3ac7c31ae14ea3b6a3030391c2abc90e04ab80072f4c33dd3 output/bitcoin-fecb3723b63d-arm-linux-gnueabihf.tar.gz e5501939838f930bf5d5a6da4f6d3665c008d736aa916ef0e7e0e06db91e1a36 output/bitcoin-fecb3723b63d-osx-unsigned.dmg 834a94ea3fbc5e090618842b339b301bebd622d1f392918f0f500ec6637733ac output/bitcoin-fecb3723b63d-osx-unsigned.tar.gz 6cf70af01a48bea9270e6883ed15ce458c46c6840f826414df7a244fffa3338d output/bitcoin-fecb3723b63d-osx64.tar.gz d80e9e2789fdee931f80c049c70912e9ff146d5fe2ae7bcd26244d7fe5dd4910 output/bitcoin-fecb3723b63d-powerpc64-linux-gnu-debug.tar.gz d924e161f1c32b3980c72b4949c99269e3d5fad8656749edae9fbbaafb1b7ff9 output/bitcoin-fecb3723b63d-powerpc64-linux-gnu.tar.gz d2f339fc78608ac6cdc505b21abc5f397e52283914113f45dc0adad0c023df54 output/bitcoin-fecb3723b63d-powerpc64le-linux-gnu-debug.tar.gz d537c014adbdd712b7b20f3171bc4342622ba56f4fa655bba85afbf35aee2840 output/bitcoin-fecb3723b63d-powerpc64le-linux-gnu.tar.gz 0f42646fa5be154e8717df0e39ba843a61928225b00e0d48b1b2179966fea315 output/bitcoin-fecb3723b63d-riscv64-linux-gnu-debug.tar.gz f7b9cc85f74c006ac484e20915c84a12069447102d685124c5246b6eff8545c8 output/bitcoin-fecb3723b63d-riscv64-linux-gnu.tar.gz b60b51544a26dfa2e6a05a6daa99c63aeb62d7a1893191824867e1da9bbb73c4 output/bitcoin-fecb3723b63d-win-unsigned.tar.gz abc4cdb44146edf16fc47aa11d72648fa53c00d8f70937cab74cdaaaa9947c58 output/bitcoin-fecb3723b63d-win64-debug.zip 3c6d437b09acc479060d922c64c1f6688df6385a6a3950d31c7a6e0977d757eb output/bitcoin-fecb3723b63d-win64-setup-unsigned.exe d4f015fcfca15f23a797786fe67ca12ac73d3f594dd9e1b885e33d765f21beff output/bitcoin-fecb3723b63d-win64.zip 5fcb478027cb790ab7a3480fab91f764b10da4fd25d82b08f5ecfe42b4b7d316 output/bitcoin-fecb3723b63d-x86_64-linux-gnu-debug.tar.gz eef74c6b301bd799c6522b60c26d700a496ecf2bd357f09c83cbd88132086783 output/bitcoin-fecb3723b63d-x86_64-linux-gnu.tar.gz af897573bd4f1e9acfef43af19a79e0e1c6a662cb3dc0bc8f5f6d2656c441953 output/src/bitcoin-fecb3723b63d.tar.gz ``` Gitian builds: ```bash # macOS: b3926b7956b31b87ec96885369401141cc5a3f37e91a0ad9a03c6f7c1bd2bee7 bitcoin-fecb3723b63d-osx-unsigned.dmg 61792260b3afd0b921d84ddb0bb3639c2b4e063c7b7fb715d515b3601c7ad38b bitcoin-fecb3723b63d-osx-unsigned.tar.gz 953081b66a1feababe041cae0b31664856260f7364f87c5c50f7f7c1fd6b710a bitcoin-fecb3723b63d-osx64.tar.gz af897573bd4f1e9acfef43af19a79e0e1c6a662cb3dc0bc8f5f6d2656c441953 src/bitcoin-fecb3723b63d.tar.gz aecaa381205e9ed6585cdffa22c7b46d3ece989c1774855d4a3b4cae5d75567a bitcoin-core-osx-22-res.yml # Windows: 21c23951c96bcbf79fa75a6b915c40c24445964cced6242f4e9181464f66ba40 bitcoin-fecb3723b63d-win-unsigned.tar.gz 327cc290f5f709892e54cdc7bbf1745892eed497cd636c8f80d2310419e585c2 bitcoin-fecb3723b63d-win64-debug.zip e86a36c26897be064339cda866cb9563d08c867eceae59a677329390d729cbfe bitcoin-fecb3723b63d-win64-setup-unsigned.exe 844754a178b3b7ba62fc39bcc3f5e76b3903c9cd86adc26ec224ecf84d697239 bitcoin-fecb3723b63d-win64.zip af897573bd4f1e9acfef43af19a79e0e1c6a662cb3dc0bc8f5f6d2656c441953 src/bitcoin-fecb3723b63d.tar.gz # Linux: b6224d86755e6c609fd1cfff79f6514bdd0cf1af8689eca692352c515e6cb7dd bitcoin-fecb3723b63d-aarch64-linux-gnu-debug.tar.gz 371a2533f3510c7a7e7bd2a9b504accffdcdd65bcc9d6c393570e0378f470f93 bitcoin-fecb3723b63d-aarch64-linux-gnu.tar.gz 6c171cf1168f7bc6a1f78d5662c6cd1de7dd6157559fe4f7f95d34df7e398354 bitcoin-fecb3723b63d-arm-linux-gnueabihf-debug.tar.gz ac455dcb33c92191eb0124c78fa356cea78c88e3976bfe8b4b9f9052458b7b24 bitcoin-fecb3723b63d-arm-linux-gnueabihf.tar.gz 166ec0874d09b1e3d1b682ed120873b2715dee5ed13dd721443ee29784074107 bitcoin-fecb3723b63d-powerpc64-linux-gnu-debug.tar.gz 2b32d1a761625c28ed59fdbe8463dcb89b4f583a3119c57fd6815c9882241c78 bitcoin-fecb3723b63d-powerpc64-linux-gnu.tar.gz b9b37f0097f39fb16c2612166ffe21a09b436feea42394935831e2cb102c532a bitcoin-fecb3723b63d-powerpc64le-linux-gnu-debug.tar.gz e98fb672a5205a8d18f6ca4a39dec0c26353031c455c4e1b3917b917ce687d8d bitcoin-fecb3723b63d-powerpc64le-linux-gnu.tar.gz f92b07bd155fc469a18aa34571534f2c0bf12706f381ca973bb7a51692e25754 bitcoin-fecb3723b63d-riscv64-linux-gnu-debug.tar.gz 94321b7db0446457c372bea24d71d84d0f0181f7607bf9f96a8b773e69ee1370 bitcoin-fecb3723b63d-riscv64-linux-gnu.tar.gz 350bc9be945e3410bf73d9631fe4bb750f9a2ee3d538d2ce3efd42b15eba926a bitcoin-fecb3723b63d-x86_64-linux-gnu-debug.tar.gz 74aa3745942a9d76d3db23fa0251a27bbe1ea95683a901df37333caf9c6d13ab bitcoin-fecb3723b63d-x86_64-linux-gnu.tar.gz af897573bd4f1e9acfef43af19a79e0e1c6a662cb3dc0bc8f5f6d2656c441953 src/bitcoin-fecb3723b63d.tar.gz 959c25666565646279659fccb93278875bb926b67faf685185f461bf55b4058e bitcoin-core-linux-22-res.yml ``` ACKs for top commit: hebasto: ACK fecb3723b63d1441f1f786352e9ef330c1ac57a5 Tree-SHA512: 00edf084852bfab404fb32d0a726088a50283a58a240d4e03cbd746cbffbe085d309434b2c22a4ed18c28be4df6958eb51d92d4ccd7548dd0ee49f99d458ff03
This commit is contained in:
parent
2197786843
commit
ec03cc43f3
@ -108,11 +108,10 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
||||
BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS])
|
||||
|
||||
dnl This is ugly and complicated. Yuck. Works as follows:
|
||||
dnl For Qt5, we can check a header to find out whether Qt is build
|
||||
dnl statically. When Qt is built statically, some plugins must be linked into
|
||||
dnl the final binary as well.
|
||||
dnl _BITCOIN_QT_CHECK_STATIC_PLUGIN does a quick link-check and appends the
|
||||
dnl results to QT_LIBS.
|
||||
dnl We check a header to find out whether Qt is built statically.
|
||||
dnl When Qt is built statically, some plugins must be linked into
|
||||
dnl the final binary as well. _BITCOIN_QT_CHECK_STATIC_PLUGIN does
|
||||
dnl a quick link-check and appends the results to QT_LIBS.
|
||||
BITCOIN_QT_CHECK([
|
||||
TEMP_CPPFLAGS=$CPPFLAGS
|
||||
TEMP_CXXFLAGS=$CXXFLAGS
|
||||
@ -162,7 +161,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
||||
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle])
|
||||
AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
|
||||
elif test "x$TARGET_OS" = xandroid; then
|
||||
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lqtforandroid -ljnigraphics -landroid -lqtfreetype -lQt5EglSupport $QT_LIBS"
|
||||
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lqtforandroid -ljnigraphics -landroid -lqtfreetype $QT_LIBS"
|
||||
AC_DEFINE(QT_QPA_PLATFORM_ANDROID, 1, [Define this symbol if the qt platform is android])
|
||||
fi
|
||||
fi
|
||||
@ -171,7 +170,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
||||
])
|
||||
|
||||
if test "x$qt_bin_path" = x; then
|
||||
qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
|
||||
qt_bin_path="`$PKG_CONFIG --variable=host_bins ${qt_lib_prefix}Core 2>/dev/null`"
|
||||
fi
|
||||
|
||||
if test "x$use_hardening" != xno; then
|
||||
@ -301,12 +300,13 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
||||
AC_SUBST(MOC_DEFS)
|
||||
])
|
||||
|
||||
dnl All macros below are internal and should _not_ be used from the main
|
||||
dnl configure.ac.
|
||||
dnl ----
|
||||
dnl All macros below are internal and should _not_ be used from configure.ac.
|
||||
|
||||
dnl Internal. Check if the linked version of Qt was built as static libs.
|
||||
dnl Requires: Qt5.
|
||||
dnl Internal. Check if the linked version of Qt was built statically.
|
||||
dnl
|
||||
dnl _BITCOIN_QT_IS_STATIC
|
||||
dnl ---------------------
|
||||
dnl
|
||||
dnl Requires: INCLUDES and LIBS must be populated as necessary.
|
||||
dnl Output: bitcoin_cv_static_qt=yes|no
|
||||
AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
|
||||
@ -354,47 +354,54 @@ dnl
|
||||
dnl _BITCOIN_QT_CHECK_STATIC_LIBS
|
||||
dnl -----------------------------
|
||||
dnl
|
||||
dnl Inputs: no inputs.
|
||||
dnl Outputs: QT_LIBS is prepended.
|
||||
AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [
|
||||
PKG_CHECK_MODULES([QTFONTDATABASE], [Qt5FontDatabaseSupport${qt_lib_suffix}], [QT_LIBS="-lQt5FontDatabaseSupport${qt_lib_suffix} $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QTEVENTDISPATCHER], [Qt5EventDispatcherSupport${qt_lib_suffix}], [QT_LIBS="-lQt5EventDispatcherSupport${qt_lib_suffix} $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QTTHEME], [Qt5ThemeSupport${qt_lib_suffix}], [QT_LIBS="-lQt5ThemeSupport${qt_lib_suffix} $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QTDEVICEDISCOVERY], [Qt5DeviceDiscoverySupport${qt_lib_suffix}], [QT_LIBS="-lQt5DeviceDiscoverySupport${qt_lib_suffix} $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QTACCESSIBILITY], [Qt5AccessibilitySupport${qt_lib_suffix}], [QT_LIBS="-lQt5AccessibilitySupport${qt_lib_suffix} $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QTFB], [Qt5FbSupport${qt_lib_suffix}], [QT_LIBS="-lQt5FbSupport${qt_lib_suffix} $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_ACCESSIBILITY], [${qt_lib_prefix}AccessibilitySupport${qt_lib_suffix}], [QT_LIBS="$QT_ACCESSIBILITY_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_DEVICEDISCOVERY], [${qt_lib_prefix}DeviceDiscoverySupport${qt_lib_suffix}], [QT_LIBS="$QT_DEVICEDISCOVERY_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_EDID], [${qt_lib_prefix}EdidSupport${qt_lib_suffix}], [QT_LIBS="$QT_EDID_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_EVENTDISPATCHER], [${qt_lib_prefix}EventDispatcherSupport${qt_lib_suffix}], [QT_LIBS="$QT_EVENTDISPATCHER_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_FB], [${qt_lib_prefix}FbSupport${qt_lib_suffix}], [QT_LIBS="$QT_FB_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_FONTDATABASE], [${qt_lib_prefix}FontDatabaseSupport${qt_lib_suffix}], [QT_LIBS="$QT_FONTDATABASE_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_THEME], [${qt_lib_prefix}ThemeSupport${qt_lib_suffix}], [QT_LIBS="$QT_THEME_LIBS $QT_LIBS"])
|
||||
if test "x$TARGET_OS" = xlinux; then
|
||||
PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_INPUT], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_XCBQPA], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"])
|
||||
elif test "x$TARGET_OS" = xdarwin; then
|
||||
PKG_CHECK_MODULES([QTCLIPBOARD], [Qt5ClipboardSupport${qt_lib_suffix}], [QT_LIBS="-lQt5ClipboardSupport${qt_lib_suffix} $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QTGRAPHICS], [Qt5GraphicsSupport${qt_lib_suffix}], [QT_LIBS="-lQt5GraphicsSupport${qt_lib_suffix} $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_CLIPBOARD], [${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}], [QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_GRAPHICS], [${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}], [QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
|
||||
elif test "x$TARGET_OS" = xwindows; then
|
||||
PKG_CHECK_MODULES([QTWINDOWSUIAUTOMATION], [Qt5WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="-lQt5WindowsUIAutomationSupport${qt_lib_suffix} $QT_LIBS"])
|
||||
PKG_CHECK_MODULES([QT_WINDOWSUIAUTOMATION], [${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"])
|
||||
elif test "x$TARGET_OS" = xandroid; then
|
||||
PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Internal. Find Qt libraries using pkg-config.
|
||||
dnl
|
||||
dnl _BITCOIN_QT_FIND_LIBS
|
||||
dnl ---------------------
|
||||
dnl
|
||||
dnl Outputs: All necessary QT_* variables are set.
|
||||
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
|
||||
AC_DEFUN([_BITCOIN_QT_FIND_LIBS],[
|
||||
BITCOIN_QT_CHECK([
|
||||
PKG_CHECK_MODULES([QT_CORE], [${qt_lib_prefix}Core${qt_lib_suffix} $qt_version], [],
|
||||
PKG_CHECK_MODULES([QT_CORE], [${qt_lib_prefix}Core${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_CORE_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_CORE_LIBS $QT_LIBS"],
|
||||
[BITCOIN_QT_FAIL([${qt_lib_prefix}Core${qt_lib_suffix} $qt_version not found])])
|
||||
])
|
||||
BITCOIN_QT_CHECK([
|
||||
PKG_CHECK_MODULES([QT_GUI], [${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version], [],
|
||||
PKG_CHECK_MODULES([QT_GUI], [${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_GUI_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_GUI_LIBS $QT_LIBS"],
|
||||
[BITCOIN_QT_FAIL([${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version not found])])
|
||||
])
|
||||
BITCOIN_QT_CHECK([
|
||||
PKG_CHECK_MODULES([QT_WIDGETS], [${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version], [],
|
||||
PKG_CHECK_MODULES([QT_WIDGETS], [${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_WIDGETS_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_WIDGETS_LIBS $QT_LIBS"],
|
||||
[BITCOIN_QT_FAIL([${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version not found])])
|
||||
])
|
||||
BITCOIN_QT_CHECK([
|
||||
PKG_CHECK_MODULES([QT_NETWORK], [${qt_lib_prefix}Network${qt_lib_suffix} $qt_version], [],
|
||||
PKG_CHECK_MODULES([QT_NETWORK], [${qt_lib_prefix}Network${qt_lib_suffix} $qt_version], [QT_INCLUDES="$QT_NETWORK_CFLAGS $QT_INCLUDES" QT_LIBS="$QT_NETWORK_LIBS $QT_LIBS"],
|
||||
[BITCOIN_QT_FAIL([${qt_lib_prefix}Network${qt_lib_suffix} $qt_version not found])])
|
||||
])
|
||||
QT_INCLUDES="$QT_CORE_CFLAGS $QT_GUI_CFLAGS $QT_WIDGETS_CFLAGS $QT_NETWORK_CFLAGS"
|
||||
QT_LIBS="$QT_CORE_LIBS $QT_GUI_LIBS $QT_WIDGETS_LIBS $QT_NETWORK_LIBS"
|
||||
|
||||
BITCOIN_QT_CHECK([
|
||||
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])
|
||||
|
Loading…
Reference in New Issue
Block a user