1 dnl Copyright (c) 2013-2016 The Bitcoin Core developers
2 dnl Distributed under the MIT software license, see the accompanying
3 dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 dnl Helper for cases where a qt dependency is not met.
6 dnl Output: If qt version is auto, set bitcoin_enable_qt to false. Else, exit.
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
10 AC_MSG_WARN([$1; bitcoin-qt frontend will not be built])
13 bitcoin_enable_qt_test=no
19 AC_DEFUN([BITCOIN_QT_CHECK],[
20 if test "x$bitcoin_enable_qt" != "xno" && test x$bitcoin_qt_want_version != xno; then
29 dnl BITCOIN_QT_PATH_PROGS([FOO], [foo foo2], [/path/to/search/first], [continue if missing])
30 dnl Helper for finding the path of programs needed for Qt.
31 dnl Inputs: $1: Variable to be set
32 dnl Inputs: $2: List of programs to search for
33 dnl Inputs: $3: Look for $2 here before $PATH
34 dnl Inputs: $4: If "yes", don't fail if $2 is not found.
35 dnl Output: $1 is set to the path of $2 if found. $2 are searched in order.
36 AC_DEFUN([BITCOIN_QT_PATH_PROGS],[
38 if test "x$3" != "x"; then
39 AC_PATH_PROGS($1,$2,,$3)
43 if test "x$$1" = "x" && test "x$4" != "xyes"; then
44 BITCOIN_QT_FAIL([$1 not found])
49 dnl Initialize qt input.
50 dnl This must be called before any other BITCOIN_QT* macros to ensure that
51 dnl input variables are set correctly.
52 dnl CAUTION: Do not use this inside of a conditional.
53 AC_DEFUN([BITCOIN_QT_INIT],[
56 [AS_HELP_STRING([--with-gui@<:@=no|qt4|qt5|auto@:>@],
57 [build bitcoin-qt GUI (default=auto, qt5 tried first)])],
59 bitcoin_qt_want_version=$withval
60 if test x$bitcoin_qt_want_version = xyes; then
62 bitcoin_qt_want_version=auto
65 [bitcoin_qt_want_version=auto])
67 AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], [])
68 AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], [])
69 AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], [])
70 AC_ARG_WITH([qt-translationdir],[AS_HELP_STRING([--with-qt-translationdir=PLUGIN_DIR],[specify qt translation path (overridden by pkgconfig)])], [qt_translation_path=$withval], [])
71 AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], [])
74 [AS_HELP_STRING([--with-qtdbus],
75 [enable DBus support (default is yes if qt is enabled and QtDBus is found)])],
79 AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path)
82 dnl Find the appropriate version of Qt libraries and includes.
83 dnl Inputs: $1: Whether or not pkg-config should be used. yes|no. Default: yes.
84 dnl Inputs: $2: If $1 is "yes" and --with-gui=auto, which qt version should be
86 dnl Outputs: See _BITCOIN_QT_FIND_LIBS_*
87 dnl Outputs: Sets variables for all qt-related tools.
88 dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test
89 AC_DEFUN([BITCOIN_QT_CONFIGURE],[
92 if test x$use_pkgconfig = x; then
96 if test x$use_pkgconfig = xyes; then
97 BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG([$2])])
99 BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
102 dnl This is ugly and complicated. Yuck. Works as follows:
103 dnl We can't discern whether Qt4 builds are static or not. For Qt5, we can
104 dnl check a header to find out. When Qt is built statically, some plugins must
105 dnl be linked into the final binary as well. These plugins have changed between
106 dnl Qt4 and Qt5. With Qt5, languages moved into core and the WindowsIntegration
107 dnl plugin was added. Since we can't tell if Qt4 is static or not, it is
108 dnl assumed for windows builds.
109 dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the
110 dnl results to QT_LIBS.
112 TEMP_CPPFLAGS=$CPPFLAGS
113 TEMP_CXXFLAGS=$CXXFLAGS
114 CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
115 CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
116 if test x$bitcoin_qt_got_major_vers = x5; then
117 _BITCOIN_QT_IS_STATIC
118 if test x$bitcoin_cv_static_qt = xyes; then
119 _BITCOIN_QT_FIND_STATIC_PLUGINS
120 AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
121 AC_CACHE_CHECK(for Qt < 5.4, bitcoin_cv_need_acc_widget,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
122 [[#include <QtCore>]],[[
123 #if QT_VERSION >= 0x050400
127 [bitcoin_cv_need_acc_widget=yes],
128 [bitcoin_cv_need_acc_widget=no])
130 if test "x$bitcoin_cv_need_acc_widget" = "xyes"; then
131 _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
133 _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QMinimalIntegrationPlugin)],[-lqminimal])
134 AC_DEFINE(QT_QPA_PLATFORM_MINIMAL, 1, [Define this symbol if the minimal qt platform exists])
135 if test x$TARGET_OS = xwindows; then
136 _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
137 AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
138 elif test x$TARGET_OS = xlinux; then
139 _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
140 AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
141 elif test x$TARGET_OS = xdarwin; then
142 AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)])
143 _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa])
144 AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
148 if test x$TARGET_OS = xwindows; then
149 AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
150 _BITCOIN_QT_CHECK_STATIC_PLUGINS([
151 Q_IMPORT_PLUGIN(qcncodecs)
152 Q_IMPORT_PLUGIN(qjpcodecs)
153 Q_IMPORT_PLUGIN(qtwcodecs)
154 Q_IMPORT_PLUGIN(qkrcodecs)
155 Q_IMPORT_PLUGIN(AccessibleFactory)],
156 [-lqcncodecs -lqjpcodecs -lqtwcodecs -lqkrcodecs -lqtaccessiblewidgets])
159 CPPFLAGS=$TEMP_CPPFLAGS
160 CXXFLAGS=$TEMP_CXXFLAGS
163 if test x$use_pkgconfig$qt_bin_path = xyes; then
164 if test x$bitcoin_qt_got_major_vers = x5; then
165 qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
169 if test x$use_hardening != xno; then
171 AC_MSG_CHECKING(whether -fPIE can be used with this Qt config)
172 TEMP_CPPFLAGS=$CPPFLAGS
173 TEMP_CXXFLAGS=$CXXFLAGS
174 CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
175 CXXFLAGS="$PIE_FLAGS $CXXFLAGS"
176 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <QtCore/qconfig.h>]],
178 #if defined(QT_REDUCE_RELOCATIONS)
182 [ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIE_FLAGS ],
183 [ AC_MSG_RESULT(no); QT_PIE_FLAGS=$PIC_FLAGS]
185 CPPFLAGS=$TEMP_CPPFLAGS
186 CXXFLAGS=$TEMP_CXXFLAGS
190 AC_MSG_CHECKING(whether -fPIC is needed with this Qt config)
191 TEMP_CPPFLAGS=$CPPFLAGS
192 CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
193 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <QtCore/qconfig.h>]],
195 #if defined(QT_REDUCE_RELOCATIONS)
199 [ AC_MSG_RESULT(no)],
200 [ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIC_FLAGS]
202 CPPFLAGS=$TEMP_CPPFLAGS
206 BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path)
207 BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path)
208 BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
209 BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt${bitcoin_qt_got_major_vers} lrelease${bitcoin_qt_got_major_vers} lrelease], $qt_bin_path)
210 BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt${bitcoin_qt_got_major_vers} lupdate${bitcoin_qt_got_major_vers} lupdate],$qt_bin_path, yes)
212 MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)'
216 MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC"
217 base_frameworks="-framework Foundation -framework ApplicationServices -framework AppKit"
218 AX_CHECK_LINK_FLAG([[$base_frameworks]],[QT_LIBS="$QT_LIBS $base_frameworks"],[AC_MSG_ERROR(could not find base frameworks)])
223 AX_CHECK_LINK_FLAG([[-mwindows]],[QT_LDFLAGS="$QT_LDFLAGS -mwindows"],[AC_MSG_WARN(-mwindows linker support not detected)])
228 dnl enable qt support
229 AC_MSG_CHECKING(whether to build ]AC_PACKAGE_NAME[ GUI)
231 bitcoin_enable_qt=yes
232 bitcoin_enable_qt_test=yes
233 if test x$have_qt_test = xno; then
234 bitcoin_enable_qt_test=no
236 bitcoin_enable_qt_dbus=no
237 if test x$use_dbus != xno && test x$have_qt_dbus = xyes; then
238 bitcoin_enable_qt_dbus=yes
240 if test x$use_dbus = xyes && test x$have_qt_dbus = xno; then
241 AC_MSG_ERROR("libQtDBus not found. Install libQtDBus or remove --with-qtdbus.")
243 if test x$LUPDATE = x; then
244 AC_MSG_WARN("lupdate is required to update qt translations")
249 AC_MSG_RESULT([$bitcoin_enable_qt (Qt${bitcoin_qt_got_major_vers})])
251 AC_SUBST(QT_PIE_FLAGS)
252 AC_SUBST(QT_INCLUDES)
255 AC_SUBST(QT_DBUS_INCLUDES)
256 AC_SUBST(QT_DBUS_LIBS)
257 AC_SUBST(QT_TEST_INCLUDES)
258 AC_SUBST(QT_TEST_LIBS)
259 AC_SUBST(QT_SELECT, qt${bitcoin_qt_got_major_vers})
263 dnl All macros below are internal and should _not_ be used from the main
267 dnl Internal. Check if the included version of Qt is Qt5.
268 dnl Requires: INCLUDES must be populated as necessary.
269 dnl Output: bitcoin_cv_qt5=yes|no
270 AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
271 AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[
272 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
273 [[#include <QtCore>]],
275 #if QT_VERSION < 0x050000
281 [bitcoin_cv_qt5=yes],
285 dnl Internal. Check if the linked version of Qt was built as static libs.
286 dnl Requires: Qt5. This check cannot determine if Qt4 is static.
287 dnl Requires: INCLUDES and LIBS must be populated as necessary.
288 dnl Output: bitcoin_cv_static_qt=yes|no
289 dnl Output: Defines QT_STATICPLUGIN if plugins are static.
290 AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
291 AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
292 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
293 [[#include <QtCore>]],
295 #if defined(QT_STATIC)
301 [bitcoin_cv_static_qt=yes],
302 [bitcoin_cv_static_qt=no])
304 if test xbitcoin_cv_static_qt = xyes; then
305 AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol for static Qt plugins])
309 dnl Internal. Check if the link-requirements for static plugins are met.
310 dnl Requires: INCLUDES and LIBS must be populated as necessary.
311 dnl Inputs: $1: A series of Q_IMPORT_PLUGIN().
312 dnl Inputs: $2: The libraries that resolve $1.
313 dnl Output: QT_LIBS is prepended or configure exits.
314 AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[
315 AC_MSG_CHECKING(for static Qt plugins: $2)
316 CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS"
317 LIBS="$2 $QT_LIBS $LIBS"
318 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
319 #define QT_STATICPLUGIN
323 [AC_MSG_RESULT(yes); QT_LIBS="$2 $QT_LIBS"],
324 [AC_MSG_RESULT(no); BITCOIN_QT_FAIL(Could not resolve: $2)])
325 LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS"
328 dnl Internal. Find paths necessary for linking qt static plugins
329 dnl Inputs: bitcoin_qt_got_major_vers. 4 or 5.
330 dnl Inputs: qt_plugin_path. optional.
331 dnl Outputs: QT_LIBS is appended
332 AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
333 if test x$bitcoin_qt_got_major_vers = x5; then
334 if test x$qt_plugin_path != x; then
335 QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
336 if test -d "$qt_plugin_path/accessible"; then
337 QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
340 if test x$use_pkgconfig = xyes; then
342 m4_ifdef([PKG_CHECK_MODULES],[
343 PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
344 if test x$TARGET_OS = xlinux; then
345 PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
346 if ${PKG_CONFIG} --exists "Qt5Core >= 5.5" 2>/dev/null; then
347 PKG_CHECK_MODULES([QTXCBQPA], [Qt5XcbQpa], [QT_LIBS="$QTXCBQPA_LIBS $QT_LIBS"])
349 elif test x$TARGET_OS = xdarwin; then
350 PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
354 if test x$TARGET_OS = xwindows; then
355 AC_CACHE_CHECK(for Qt >= 5.6, bitcoin_cv_need_platformsupport,[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
356 [[#include <QtCore>]],[[
357 #if QT_VERSION < 0x050600
361 [bitcoin_cv_need_platformsupport=yes],
362 [bitcoin_cv_need_platformsupport=no])
364 if test x$bitcoin_cv_need_platformsupport = xyes; then
365 BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}PlatformSupport],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXPlatformSupport not found)))
370 if test x$qt_plugin_path != x; then
371 QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
372 QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs"
377 dnl Internal. Find Qt libraries using pkg-config.
378 dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to check
380 dnl Inputs: $1: If bitcoin_qt_want_version is "auto", check for this version
382 dnl Outputs: All necessary QT_* variables are set.
383 dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
384 dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
385 AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
386 m4_ifdef([PKG_CHECK_MODULES],[
387 auto_priority_version=$1
388 if test x$auto_priority_version = x; then
389 auto_priority_version=qt5
391 if test x$bitcoin_qt_want_version = xqt5 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
393 bitcoin_qt_got_major_vers=5
396 bitcoin_qt_got_major_vers=4
398 qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
399 qt4_modules="QtCore QtGui QtNetwork"
401 if test x$bitcoin_qt_want_version = xqt5 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
402 PKG_CHECK_MODULES([QT5], [$qt5_modules], [QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" have_qt=yes],[have_qt=no])
403 elif test x$bitcoin_qt_want_version = xqt4 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt4 ); then
404 PKG_CHECK_MODULES([QT4], [$qt4_modules], [QT_INCLUDES="$QT4_CFLAGS"; QT_LIBS="$QT4_LIBS" ; have_qt=yes], [have_qt=no])
407 dnl qt version is set to 'auto' and the preferred version wasn't found. Now try the other.
408 if test x$have_qt = xno && test x$bitcoin_qt_want_version = xauto; then
409 if test x$auto_priority_version = xqt5; then
410 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])
412 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])
415 if test x$have_qt != xyes; then
417 BITCOIN_QT_FAIL([Qt dependencies not found])
421 PKG_CHECK_MODULES([QT_TEST], [${QT_LIB_PREFIX}Test], [QT_TEST_INCLUDES="$QT_TEST_CFLAGS"; have_qt_test=yes], [have_qt_test=no])
422 if test x$use_dbus != xno; then
423 PKG_CHECK_MODULES([QT_DBUS], [${QT_LIB_PREFIX}DBus], [QT_DBUS_INCLUDES="$QT_DBUS_CFLAGS"; have_qt_dbus=yes], [have_qt_dbus=no])
430 dnl Internal. Find Qt libraries without using pkg-config. Version is deduced
431 dnl from the discovered headers.
432 dnl Inputs: bitcoin_qt_want_version (from --with-gui=). The version to use.
433 dnl If "auto", the version will be discovered by _BITCOIN_QT_CHECK_QT5.
434 dnl Outputs: All necessary QT_* variables are set.
435 dnl Outputs: bitcoin_qt_got_major_vers is set to "4" or "5".
436 dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
437 AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
438 TEMP_CPPFLAGS="$CPPFLAGS"
439 TEMP_CXXFLAGS="$CXXFLAGS"
440 CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
443 if test x$qt_include_path != x; then
444 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"
445 CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
449 BITCOIN_QT_CHECK([AC_CHECK_HEADER([QtPlugin],,BITCOIN_QT_FAIL(QtCore headers missing))])
450 BITCOIN_QT_CHECK([AC_CHECK_HEADER([QApplication],, BITCOIN_QT_FAIL(QtGui headers missing))])
451 BITCOIN_QT_CHECK([AC_CHECK_HEADER([QLocalSocket],, BITCOIN_QT_FAIL(QtNetwork headers missing))])
454 if test x$bitcoin_qt_want_version = xauto; then
455 _BITCOIN_QT_CHECK_QT5
457 if test x$bitcoin_cv_qt5 = xyes || test x$bitcoin_qt_want_version = xqt5; then
459 bitcoin_qt_got_major_vers=5
462 bitcoin_qt_got_major_vers=4
468 if test x$qt_lib_path != x; then
469 LIBS="$LIBS -L$qt_lib_path"
472 if test x$TARGET_OS = xwindows; then
473 AC_CHECK_LIB([imm32], [main],, BITCOIN_QT_FAIL(libimm32 not found))
477 BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in])))
478 BITCOIN_QT_CHECK(AC_SEARCH_LIBS([png_error] ,[qtpng png],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
479 BITCOIN_QT_CHECK(AC_SEARCH_LIBS([jpeg_create_decompress] ,[qtjpeg jpeg],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in])))
480 BITCOIN_QT_CHECK(AC_SEARCH_LIBS([pcre16_exec], [qtpcre pcre16],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
481 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])))
482 BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
483 BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui] ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXGui not found)))
484 BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork not found)))
485 if test x$bitcoin_qt_got_major_vers = x5; then
486 BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXWidgets not found)))
493 if test x$qt_lib_path != x; then
494 LIBS="-L$qt_lib_path"
496 AC_CHECK_LIB([${QT_LIB_PREFIX}Test], [main],, have_qt_test=no)
497 AC_CHECK_HEADER([QTest],, have_qt_test=no)
499 if test x$use_dbus != xno; then
501 if test x$qt_lib_path != x; then
502 LIBS="-L$qt_lib_path"
504 AC_CHECK_LIB([${QT_LIB_PREFIX}DBus], [main],, have_qt_dbus=no)
505 AC_CHECK_HEADER([QtDBus],, have_qt_dbus=no)
509 CPPFLAGS="$TEMP_CPPFLAGS"
510 CXXFLAGS="$TEMP_CXXFLAGS"