From 782047507668487fd702bb501a0ea8afb219052d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Tue, 16 Sep 2014 08:24:57 +0000 Subject: [PATCH] better Qt detection; refs #33 --- configure.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 64f36ac..31687a9 100644 --- a/configure.in +++ b/configure.in @@ -115,27 +115,35 @@ dnl AC_CHECK_HEADER([wintypes.h], [], [AC_MSG_ERROR([Header wintypes.h is requir PKG_CHECK_MODULES([QT_GUI], [Qt5Core Qt5Gui Qt5Widgets], [AC_DEFINE([HAVE_QTGUI]) UIC=${UIC:-$(pkg-config --variable=uic_location Qt5Core)} + UIC=${UIC:-$(pkg-config --variable=host_bins Qt5Core)/uic} MOC=${MOC:-$(pkg-config --variable=moc_location Qt5Core)} + MOC=${MOC:-$(pkg-config --variable=host_bins Qt5Core)/moc} have_qtgui=1], [PKG_CHECK_MODULES([QT_GUI], [QtCore QtGui], [AC_DEFINE([HAVE_QTGUI]) UIC=${UIC:-$(pkg-config --variable=uic_location QtCore)} + UIC=${UIC:-$(pkg-config --variable=host_bins QtCore)/uic} MOC=${MOC:-$(pkg-config --variable=moc_location QtCore)} + MOC=${MOC:-$(pkg-config --variable=host_bins QtCore)/moc} have_qtgui=1], [have_qtgui=0])]) AM_CONDITIONAL(HAVE_QTGUI, test "$have_qtgui" = "1") PKG_CHECK_MODULES([QT_NETWORK], [Qt5Network], [UIC=${UIC:-$(pkg-config --variable=uic_location Qt5Core)} + UIC=${UIC:-$(pkg-config --variable=host_bins Qt5Core)/uic} MOC=${MOC:-$(pkg-config --variable=moc_location Qt5Core)} + MOC=${MOC:-$(pkg-config --variable=host_bins Qt5Core)/moc} have_qtnetwork=1], [PKG_CHECK_MODULES([QT_NETWORK], [QtNetwork], [AC_DEFINE([HAVE_QTNETWORK]) UIC=${UIC:-$(pkg-config --variable=uic_location QtCore)} + UIC=${UIC:-$(pkg-config --variable=host_bins QtCore)/uic} MOC=${MOC:-$(pkg-config --variable=moc_location QtCore)} + MOC=${MOC:-$(pkg-config --variable=host_bins QtCore)/moc} have_qtnetwork=1], [have_qtnetwork=0])]) AM_CONDITIONAL(HAVE_QTNETWORK, test "$have_qtnetwork" = "1") -if test "$have_qt" = "1" \ +if test $have_qtgui -eq 1 -o $have_qtnetwork -eq 1 \ && ! which "$UIC" "$MOC"; then if test -n "$MOC" && which "${UIC:=${MOC/moc/uic}}"; then AC_MSG_NOTICE([Detected: "$UIC" "$MOC"])