summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2017-09-12 15:41:03 +1200
committerRobert Ancell <robert.ancell@canonical.com>2017-09-12 15:41:03 +1200
commitd36b6f511ff9aca6172149ba224f6de82ab3deee (patch)
tree31892282ac89fc2e12c878bcd027c2a6eea9ef6a
parent4e6618659e09c0082e0376b3afb5c8f8052685ab (diff)
downloadlightdm-git-d36b6f511ff9aca6172149ba224f6de82ab3deee.tar.gz
Fail configure if MOC can't be found
-rw-r--r--configure.ac42
1 files changed, 30 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 514f4e83..ba5f0042 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,17 +90,26 @@ if test x"$enable_liblightdm_qt4" != "xno" ; then
QtDBus
QtGui
],
- [compile_liblightdm_qt4=yes
- AC_CHECK_TOOLS(MOC4, [moc-qt4 moc])
- if test x"$(readlink $(which $MOC4))" = xqtchooser; then
- MOC4="$MOC4 --qt=qt4"
- fi
- ],
+ [compile_liblightdm_qt4=yes],
[if test "x$enable_liblightdm_qt4" != xauto; then
AC_MSG_FAILURE(
[--enable-liblightdm-qt was given, but test for Qt4 failed])
fi
])
+
+ AC_CHECK_TOOLS(MOC4, [moc-qt4 moc])
+ if test x$MOC4 = x; then
+ compile_liblightdm_qt4=no
+ if test "x$enable_liblightdm_qt4" != xauto; then
+ AC_MSG_FAILURE(
+ [--enable-liblightdm-qt4 was given, but MOC not found])
+ fi
+ fi
+ if test x"$MOC4" = xmoc; then
+ if test x"$(readlink $(which $MOC4))" = xqtchooser; then
+ MOC4="$MOC4 --qt=qt4"
+ fi
+ fi
fi
AM_CONDITIONAL(COMPILE_LIBLIGHTDM_QT4, test x"$compile_liblightdm_qt4" != "xno")
@@ -115,17 +124,26 @@ if test x"$enable_liblightdm_qt5" != "xno"; then
Qt5DBus
Qt5Gui
],
- [compile_liblightdm_qt5=yes
- AC_CHECK_TOOLS(MOC5, [moc-qt5 moc])
- if test x"$(readlink $(which $MOC5))" = xqtchooser; then
- MOC5="$MOC5 --qt=qt5"
- fi
- ],
+ [compile_liblightdm_qt5=yes],
[if test "x$enable_liblightdm_qt5" != xauto; then
AC_MSG_FAILURE(
[--enable-liblightdm-qt5 was given, but test for Qt5 failed])
fi
])
+
+ AC_CHECK_TOOLS(MOC5, [moc-qt5 moc])
+ if test x$MOC5 = x; then
+ compile_liblightdm_qt5=no
+ if test "x$enable_liblightdm_qt5" != xauto; then
+ AC_MSG_FAILURE(
+ [--enable-liblightdm-qt5 was given, but MOC not found])
+ fi
+ fi
+ if test x"$MOC5" = xmoc; then
+ if test x"$(readlink $(which $MOC5))" = xqtchooser; then
+ MOC5="$MOC5 --qt=qt5"
+ fi
+ fi
fi
AM_CONDITIONAL(COMPILE_LIBLIGHTDM_QT5, test x"$compile_liblightdm_qt5" != "xno")