From 8e5f024514ce5e75c831f3955bc2d6278f6a11de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 3 Apr 2014 15:00:31 +0000 Subject: [PATCH] detect moc and uic; refs #28 --- configure.in | 10 ++++++++++ src/makefile.am | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index ab82a74..c305abb 100644 --- a/configure.in +++ b/configure.in @@ -96,20 +96,30 @@ PKG_PROG_PKG_CONFIG # libraries PKG_CHECK_MODULES([QT_GUI], [QtCore QtGui], [AC_DEFINE([HAVE_QTGUI]) + UIC=$(pkg-config --variable=uic_location QtCore) + MOC=$(pkg-config --variable=moc_location QtCore) have_qtgui=1], [PKG_CHECK_MODULES([QT_GUI], [Qt5Core Qt5Gui Qt5Widgets])], [AC_DEFINE([HAVE_QTGUI]) + UIC=$(pkg-config --variable=uic_location Qt5Core) + MOC=$(pkg-config --variable=moc_location Qt5Core) have_qtgui=1], [have_qtgui=0]) AM_CONDITIONAL(HAVE_QTGUI, test "$have_qtgui" = "1") PKG_CHECK_MODULES([QT_NETWORK], [QtNetwork], [AC_DEFINE([HAVE_QTNETWORK]) + UIC=$(pkg-config --variable=uic_location QtCore) + MOC=$(pkg-config --variable=moc_location QtCore) have_qtnetwork=1], [PKG_CHECK_MODULES([QT_NETWORK], [Qt5Network])], [AC_DEFINE([HAVE_QTNETWORK]) + UIC=$(pkg-config --variable=uic_location Qt5Core) + MOC=$(pkg-config --variable=moc_location Qt5Core) have_qtnetwork=1], [have_qtnetwork=0]) AM_CONDITIONAL(HAVE_QTNETWORK, test "$have_qtnetwork" = "1") +AC_SUBST(UIC) +AC_SUBST(MOC) AC_ARG_ENABLE(pedantic, [AS_HELP_STRING([--enable-pedantic], diff --git a/src/makefile.am b/src/makefile.am index 820a243..c343a5d 100644 --- a/src/makefile.am +++ b/src/makefile.am @@ -65,10 +65,10 @@ noinst_PROGRAMS = versiontest versiontest_SOURCES = versiontest.cxx %_ui.hxx: %.ui - uic -o $@ $< + @UIC@ -o $@ $< moc_%.cxx: %.hxx - moc -o $@ $< + @MOC@ -o $@ $< clean-local: -rm -r ${QMAKE_TARGET}.app