summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2008-06-08 23:46:04 +0200
committerAlbert Astals Cid <aacid@kde.org>2008-06-08 23:48:53 +0200
commit6f40ee4af6b59f9d2c326adc8d2574e45f4d4d29 (patch)
treecbcfc98f280501ad3202141ff614f2bc14825537 /configure.ac
parent86aa8fc0708f7da4a907a8bdb1845e53d29892b7 (diff)
Make sure we use Qt4 moc to generate moc files of the qt4 frontend
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0c97f308..dccba6e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,6 +296,26 @@ fi
AC_SUBST(POPPLER_QT4_CXXFLAGS)
AC_SUBST(POPPLER_QT4_LIBS)
+if test x$enable_poppler_qt4 = xyes; then
+ AC_MSG_CHECKING([for Qt4 moc])
+ MOCQT4=`which moc`
+ mocversion=`$MOCQT4 -v 2>&1`
+ mocversiongrep=`echo $mocversion | grep "Qt 4"`
+ if test x"$mocversiongrep" != x"$mocversion"; then
+ # moc was not the qt4 one, try with moc-qt4
+ MOCQT4=`which moc-qt4`
+ mocversion=`$MOCQT4 -v 2>&1`
+ mocversiongrep=`echo $mocversion | grep "Qt 4"`
+ if test x"$mocversiongrep" != x"$mocversion"; then
+ # no valid moc found
+ enable_poppler_qt4=no;
+ MOCQT4="not found"
+ fi
+ fi
+ AC_SUBST(MOCQT4)
+ AC_MSG_RESULT([$MOCQT4])
+fi
+
AM_CONDITIONAL(BUILD_POPPLER_QT4, test "x$enable_poppler_qt4" = "xyes")
AC_ARG_ENABLE(gtk-test,