better Qt detection; refs #33

master
Marc Wäckerlin 10 years ago
parent 6559f229b2
commit 7820475076
  1. 10
      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"])

Loading…
Cancel
Save