1dnl Copyright (c) 2013-2016 The Bitcoin Core developers 2dnl Distributed under the MIT software license, see the accompanying 3dnl file COPYING or http://www.opensource.org/licenses/mit-license.php. 4 5dnl Helper for cases where a qt dependency is not met. 6dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit. 7AC_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 10 AC_MSG_WARN([$1; bitcoin-qt frontend will not be built]) 11 fi 12 bitcoin_enable_qt=no 13 bitcoin_enable_qt_test=no 14 else 15 AC_MSG_ERROR([$1]) 16 fi 17]) 18 19AC_DEFUN([BITCOIN_QT_CHECK],[ 20 if test "x$bitcoin_enable_qt" != xno && test "x$bitcoin_qt_want_version" != xno; then 21 true 22 $1 23 else 24 true 25 $2 26 fi 27]) 28 29dnl BITCOIN_QT_PATH_PROGS([FOO], [foo foo2], [/path/to/search/first], [continue if missing]) 30dnl Helper for finding the path of programs needed for Qt. 31dnl Inputs: $1: Variable to be set 32dnl Inputs: $2: List of programs to search for 33dnl Inputs: $3: Look for $2 here before $PATH 34dnl Inputs: $4: If "yes", don't fail if $2 is not found. 35dnl Output: $1 is set to the path of $2 if found. $2 are searched in order. 36AC_DEFUN([BITCOIN_QT_PATH_PROGS],[ 37 BITCOIN_QT_CHECK([ 38 if test "x$3" != x; then 39 AC_PATH_PROGS($1,$2,,$3) 40 else 41 AC_PATH_PROGS($1,$2) 42 fi 43 if test "x$$1" = x && test "x$4" != xyes; then 44 BITCOIN_QT_FAIL([$1 not found]) 45 fi 46 ]) 47]) 48 49dnl Initialize qt input. 50dnl This must be called before any other BITCOIN_QT* macros to ensure that 51dnl input variables are set correctly. 52dnl CAUTION: Do not use this inside of a conditional. 53AC_DEFUN([BITCOIN_QT_INIT],[ 54 dnl enable qt support 55 AC_ARG_WITH([gui], 56 [AS_HELP_STRING([--with-gui@<:@=no|qt5|auto@:>@], 57 [build bitcoin-qt GUI (default=auto)])], 58 [ 59 bitcoin_qt_want_version=$withval 60 if test "x$bitcoin_qt_want_version" = xyes; then 61 bitcoin_qt_force=yes 62 bitcoin_qt_want_version=auto 63 fi 64 ], 65 [bitcoin_qt_want_version=auto]) 66 67 AS_IF([test "x$with_gui" = xqt5_debug], 68 [AS_CASE([$host], 69 [*darwin*], [qt_lib_suffix=_debug], 70 [*mingw*], [qt_lib_suffix=d], 71 [qt_lib_suffix= ]); bitcoin_qt_want_version=qt5], 72 [qt_lib_suffix= ]) 73 74 AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], []) 75 AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], []) 76 AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], []) 77 AC_ARG_WITH([qt-translationdir],[AS_HELP_STRING([--with-qt-translationdir=PLUGIN_DIR],[specify qt translation path (overridden by pkgconfig)])], [qt_translation_path=$withval], []) 78 AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], []) 79 80 AC_ARG_WITH([qtdbus], 81 [AS_HELP_STRING([--with-qtdbus], 82 [enable DBus support (default is yes if qt is enabled and QtDBus is found, except on Android)])], 83 [use_dbus=$withval], 84 [use_dbus=auto]) 85 86 dnl Android doesn't support D-Bus and certainly doesn't use it for notifications 87 case $host in 88 *android*) 89 if test "x$use_dbus" != xyes; then 90 use_dbus=no 91 fi 92 ;; 93 esac 94 95 AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path) 96]) 97 98dnl Find Qt libraries and includes. 99dnl 100dnl BITCOIN_QT_CONFIGURE([MINIMUM-VERSION]) 101dnl 102dnl Outputs: See _BITCOIN_QT_FIND_LIBS 103dnl Outputs: Sets variables for all qt-related tools. 104dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test 105AC_DEFUN([BITCOIN_QT_CONFIGURE],[ 106 qt_version=">= $1" 107 qt_lib_prefix="Qt5" 108 BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS]) 109 110 dnl This is ugly and complicated. Yuck. Works as follows: 111 dnl We check a header to find out whether Qt is built statically. 112 dnl When Qt is built statically, some plugins must be linked into 113 dnl the final binary as well. _BITCOIN_QT_CHECK_STATIC_PLUGIN does 114 dnl a quick link-check and appends the results to QT_LIBS. 115 BITCOIN_QT_CHECK([ 116 TEMP_CPPFLAGS=$CPPFLAGS 117 TEMP_CXXFLAGS=$CXXFLAGS 118 CPPFLAGS="$QT_INCLUDES $CPPFLAGS" 119 CXXFLAGS="$PIC_FLAGS $CXXFLAGS" 120 _BITCOIN_QT_IS_STATIC 121 if test "x$bitcoin_cv_static_qt" = xyes; then 122 _BITCOIN_QT_CHECK_STATIC_LIBS 123 124 if test "x$qt_plugin_path" != x; then 125 if test -d "$qt_plugin_path/platforms"; then 126 QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms" 127 fi 128 if test -d "$qt_plugin_path/styles"; then 129 QT_LIBS="$QT_LIBS -L$qt_plugin_path/styles" 130 fi 131 if test -d "$qt_plugin_path/accessible"; then 132 QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible" 133 fi 134 if test -d "$qt_plugin_path/platforms/android"; then 135 QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms/android -lqtfreetype -lEGL" 136 fi 137 fi 138 139 AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static]) 140 if test "x$TARGET_OS" != xandroid; then 141 _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal]) 142 AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists]) 143 fi 144 if test "x$TARGET_OS" = xwindows; then 145 dnl Linking against wtsapi32 is required. See #17749 and 146 dnl https://bugreports.qt.io/browse/QTBUG-27097. 147 AX_CHECK_LINK_FLAG([-lwtsapi32], [QT_LIBS="$QT_LIBS -lwtsapi32"], [AC_MSG_ERROR([could not link against -lwtsapi32])]) 148 _BITCOIN_QT_CHECK_STATIC_PLUGIN([QWindowsIntegrationPlugin], [-lqwindows]) 149 _BITCOIN_QT_CHECK_STATIC_PLUGIN([QWindowsVistaStylePlugin], [-lqwindowsvistastyle]) 150 AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows]) 151 elif test "x$TARGET_OS" = xlinux; then 152 dnl workaround for https://bugreports.qt.io/browse/QTBUG-74874 153 AX_CHECK_LINK_FLAG([-lxcb-shm], [QT_LIBS="$QT_LIBS -lxcb-shm"], [AC_MSG_ERROR([could not link against -lxcb-shm])]) 154 _BITCOIN_QT_CHECK_STATIC_PLUGIN([QXcbIntegrationPlugin], [-lqxcb]) 155 AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb]) 156 elif test "x$TARGET_OS" = xdarwin; then 157 AX_CHECK_LINK_FLAG([[-framework Carbon]],[QT_LIBS="$QT_LIBS -framework Carbon"],[AC_MSG_ERROR(could not link against Carbon framework)]) 158 AX_CHECK_LINK_FLAG([[-framework IOSurface]],[QT_LIBS="$QT_LIBS -framework IOSurface"],[AC_MSG_ERROR(could not link against IOSurface framework)]) 159 AX_CHECK_LINK_FLAG([[-framework Metal]],[QT_LIBS="$QT_LIBS -framework Metal"],[AC_MSG_ERROR(could not link against Metal framework)]) 160 AX_CHECK_LINK_FLAG([[-framework QuartzCore]],[QT_LIBS="$QT_LIBS -framework QuartzCore"],[AC_MSG_ERROR(could not link against QuartzCore framework)]) 161 _BITCOIN_QT_CHECK_STATIC_PLUGIN([QCocoaIntegrationPlugin], [-lqcocoa]) 162 _BITCOIN_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle]) 163 AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa]) 164 elif test "x$TARGET_OS" = xandroid; then 165 QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lqtforandroid -ljnigraphics -landroid -lqtfreetype $QT_LIBS" 166 AC_DEFINE(QT_QPA_PLATFORM_ANDROID, 1, [Define this symbol if the qt platform is android]) 167 fi 168 fi 169 CPPFLAGS=$TEMP_CPPFLAGS 170 CXXFLAGS=$TEMP_CXXFLAGS 171 ]) 172 173 if test "x$qt_bin_path" = x; then 174 qt_bin_path="`$PKG_CONFIG --variable=host_bins ${qt_lib_prefix}Core 2>/dev/null`" 175 fi 176 177 if test "x$use_hardening" != xno; then 178 BITCOIN_QT_CHECK([ 179 AC_MSG_CHECKING(whether -fPIE can be used with this Qt config) 180 TEMP_CPPFLAGS=$CPPFLAGS 181 TEMP_CXXFLAGS=$CXXFLAGS 182 CPPFLAGS="$QT_INCLUDES $CPPFLAGS" 183 CXXFLAGS="$PIE_FLAGS $CXXFLAGS" 184 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 185 #include <QtCore/qconfig.h> 186 #ifndef QT_VERSION 187 # include <QtCore/qglobal.h> 188 #endif 189 ]], 190 [[ 191 #if defined(QT_REDUCE_RELOCATIONS) 192 choke 193 #endif 194 ]])], 195 [ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIE_FLAGS ], 196 [ AC_MSG_RESULT(no); QT_PIE_FLAGS=$PIC_FLAGS] 197 ) 198 CPPFLAGS=$TEMP_CPPFLAGS 199 CXXFLAGS=$TEMP_CXXFLAGS 200 ]) 201 else 202 BITCOIN_QT_CHECK([ 203 AC_MSG_CHECKING(whether -fPIC is needed with this Qt config) 204 TEMP_CPPFLAGS=$CPPFLAGS 205 CPPFLAGS="$QT_INCLUDES $CPPFLAGS" 206 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 207 #include <QtCore/qconfig.h> 208 #ifndef QT_VERSION 209 # include <QtCore/qglobal.h> 210 #endif 211 ]], 212 [[ 213 #if defined(QT_REDUCE_RELOCATIONS) 214 choke 215 #endif 216 ]])], 217 [ AC_MSG_RESULT(no)], 218 [ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIC_FLAGS] 219 ) 220 CPPFLAGS=$TEMP_CPPFLAGS 221 ]) 222 fi 223 224 BITCOIN_QT_PATH_PROGS([MOC], [moc-qt5 moc5 moc], $qt_bin_path) 225 BITCOIN_QT_PATH_PROGS([UIC], [uic-qt5 uic5 uic], $qt_bin_path) 226 BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt5 rcc5 rcc], $qt_bin_path) 227 BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt5 lrelease5 lrelease], $qt_bin_path) 228 BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt5 lupdate5 lupdate],$qt_bin_path, yes) 229 BITCOIN_QT_PATH_PROGS([LCONVERT], [lconvert-qt5 lconvert5 lconvert], $qt_bin_path, yes) 230 231 MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)' 232 case $host in 233 *darwin*) 234 BITCOIN_QT_CHECK([ 235 MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC" 236 base_frameworks="-framework Foundation -framework AppKit" 237 AX_CHECK_LINK_FLAG([[$base_frameworks]],[QT_LIBS="$QT_LIBS $base_frameworks"],[AC_MSG_ERROR(could not find base frameworks)]) 238 ]) 239 ;; 240 *mingw*) 241 BITCOIN_QT_CHECK([ 242 AX_CHECK_LINK_FLAG([[-mwindows]],[QT_LDFLAGS="$QT_LDFLAGS -mwindows"],[AC_MSG_WARN(-mwindows linker support not detected)]) 243 ]) 244 esac 245 246 247 dnl enable qt support 248 AC_MSG_CHECKING([whether to build ]AC_PACKAGE_NAME[ GUI]) 249 BITCOIN_QT_CHECK([ 250 bitcoin_enable_qt=yes 251 bitcoin_enable_qt_test=yes 252 if test "x$have_qt_test" = xno; then 253 bitcoin_enable_qt_test=no 254 fi 255 bitcoin_enable_qt_dbus=no 256 if test "x$use_dbus" != xno && test "x$have_qt_dbus" = xyes; then 257 bitcoin_enable_qt_dbus=yes 258 fi 259 if test "x$use_dbus" = xyes && test "x$have_qt_dbus" = xno; then 260 AC_MSG_ERROR([libQtDBus not found. Install libQtDBus or remove --with-qtdbus.]) 261 fi 262 if test "x$LUPDATE" = x; then 263 AC_MSG_WARN([lupdate tool is required to update Qt translations.]) 264 fi 265 if test "x$LCONVERT" = x; then 266 AC_MSG_WARN([lconvert tool is required to update Qt translations.]) 267 fi 268 ],[ 269 bitcoin_enable_qt=no 270 ]) 271 if test x$bitcoin_enable_qt = xyes; then 272 AC_MSG_RESULT([$bitcoin_enable_qt ($qt_lib_prefix)]) 273 else 274 AC_MSG_RESULT([$bitcoin_enable_qt]) 275 fi 276 277 AC_SUBST(QT_PIE_FLAGS) 278 AC_SUBST(QT_INCLUDES) 279 AC_SUBST(QT_LIBS) 280 AC_SUBST(QT_LDFLAGS) 281 AC_SUBST(QT_DBUS_INCLUDES) 282 AC_SUBST(QT_DBUS_LIBS) 283 AC_SUBST(QT_TEST_INCLUDES) 284 AC_SUBST(QT_TEST_LIBS) 285 AC_SUBST(QT_SELECT, qt5) 286 AC_SUBST(MOC_DEFS) 287]) 288 289dnl All macros below are internal and should _not_ be used from configure.ac. 290 291dnl Internal. Check if the linked version of Qt was built statically. 292dnl 293dnl _BITCOIN_QT_IS_STATIC 294dnl --------------------- 295dnl 296dnl Requires: INCLUDES and LIBS must be populated as necessary. 297dnl Output: bitcoin_cv_static_qt=yes|no 298AC_DEFUN([_BITCOIN_QT_IS_STATIC],[ 299 AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[ 300 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 301 #include <QtCore/qconfig.h> 302 #ifndef QT_VERSION 303 # include <QtCore/qglobal.h> 304 #endif 305 ]], 306 [[ 307 #if !defined(QT_STATIC) 308 choke 309 #endif 310 ]])], 311 [bitcoin_cv_static_qt=yes], 312 [bitcoin_cv_static_qt=no]) 313 ]) 314]) 315 316dnl Internal. Check if the link-requirements for a static plugin are met. 317dnl 318dnl _BITCOIN_QT_CHECK_STATIC_PLUGIN(PLUGIN, LIBRARIES) 319dnl -------------------------------------------------- 320dnl 321dnl Requires: INCLUDES and LIBS must be populated as necessary. 322dnl Inputs: $1: A static plugin name. 323dnl Inputs: $2: The libraries that resolve $1. 324dnl Output: QT_LIBS is prepended or configure exits. 325AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGIN], [ 326 AC_MSG_CHECKING([for $1 ($2)]) 327 CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS" 328 LIBS="$2${qt_lib_suffix} $QT_LIBS $LIBS" 329 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ 330 #include <QtPlugin> 331 Q_IMPORT_PLUGIN($1) 332 ]])], 333 [AC_MSG_RESULT([yes]); QT_LIBS="$2${qt_lib_suffix} $QT_LIBS"], 334 [AC_MSG_RESULT([no]); BITCOIN_QT_FAIL([$1 not found.])]) 335 LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS" 336]) 337 338dnl Internal. Check Qt static libs with PKG_CHECK_MODULES. 339dnl 340dnl _BITCOIN_QT_CHECK_STATIC_LIBS 341dnl ----------------------------- 342dnl 343dnl Outputs: QT_LIBS is prepended. 344AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [ 345 PKG_CHECK_MODULES([QT_ACCESSIBILITY], [${qt_lib_prefix}AccessibilitySupport${qt_lib_suffix}], [QT_LIBS="$QT_ACCESSIBILITY_LIBS $QT_LIBS"]) 346 PKG_CHECK_MODULES([QT_DEVICEDISCOVERY], [${qt_lib_prefix}DeviceDiscoverySupport${qt_lib_suffix}], [QT_LIBS="$QT_DEVICEDISCOVERY_LIBS $QT_LIBS"]) 347 PKG_CHECK_MODULES([QT_EDID], [${qt_lib_prefix}EdidSupport${qt_lib_suffix}], [QT_LIBS="$QT_EDID_LIBS $QT_LIBS"]) 348 PKG_CHECK_MODULES([QT_EVENTDISPATCHER], [${qt_lib_prefix}EventDispatcherSupport${qt_lib_suffix}], [QT_LIBS="$QT_EVENTDISPATCHER_LIBS $QT_LIBS"]) 349 PKG_CHECK_MODULES([QT_FB], [${qt_lib_prefix}FbSupport${qt_lib_suffix}], [QT_LIBS="$QT_FB_LIBS $QT_LIBS"]) 350 PKG_CHECK_MODULES([QT_FONTDATABASE], [${qt_lib_prefix}FontDatabaseSupport${qt_lib_suffix}], [QT_LIBS="$QT_FONTDATABASE_LIBS $QT_LIBS"]) 351 PKG_CHECK_MODULES([QT_THEME], [${qt_lib_prefix}ThemeSupport${qt_lib_suffix}], [QT_LIBS="$QT_THEME_LIBS $QT_LIBS"]) 352 if test "x$TARGET_OS" = xlinux; then 353 PKG_CHECK_MODULES([QT_INPUT], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_INPUT_LIBS $QT_LIBS"]) 354 PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"]) 355 PKG_CHECK_MODULES([QT_XCBQPA], [${qt_lib_prefix}XcbQpa], [QT_LIBS="$QT_XCBQPA_LIBS $QT_LIBS"]) 356 elif test "x$TARGET_OS" = xdarwin; then 357 PKG_CHECK_MODULES([QT_CLIPBOARD], [${qt_lib_prefix}ClipboardSupport${qt_lib_suffix}], [QT_LIBS="$QT_CLIPBOARD_LIBS $QT_LIBS"]) 358 PKG_CHECK_MODULES([QT_GRAPHICS], [${qt_lib_prefix}GraphicsSupport${qt_lib_suffix}], [QT_LIBS="$QT_GRAPHICS_LIBS $QT_LIBS"]) 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 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 363 PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"]) 364 fi 365]) 366 367dnl Internal. Find Qt libraries using pkg-config. 368dnl 369dnl _BITCOIN_QT_FIND_LIBS 370dnl --------------------- 371dnl 372dnl Outputs: All necessary QT_* variables are set. 373dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no. 374AC_DEFUN([_BITCOIN_QT_FIND_LIBS],[ 375 BITCOIN_QT_CHECK([ 376 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"], 377 [BITCOIN_QT_FAIL([${qt_lib_prefix}Core${qt_lib_suffix} $qt_version not found])]) 378 ]) 379 BITCOIN_QT_CHECK([ 380 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"], 381 [BITCOIN_QT_FAIL([${qt_lib_prefix}Gui${qt_lib_suffix} $qt_version not found])]) 382 ]) 383 BITCOIN_QT_CHECK([ 384 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"], 385 [BITCOIN_QT_FAIL([${qt_lib_prefix}Widgets${qt_lib_suffix} $qt_version not found])]) 386 ]) 387 BITCOIN_QT_CHECK([ 388 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"], 389 [BITCOIN_QT_FAIL([${qt_lib_prefix}Network${qt_lib_suffix} $qt_version not found])]) 390 ]) 391 392 BITCOIN_QT_CHECK([ 393 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]) 394 if test "x$use_dbus" != xno; then 395 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]) 396 fi 397 ]) 398]) 399