From 37ac5d2eed0ad4670a4ac990e26a5442a48f0192 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Thu, 22 Mar 2012 23:17:00 +0100 Subject: [PATCH] configure: if no moc found, disable qconf or fail If moc is missing, and user explictly enabled qconf, fail, If moc is missing, but qconf is auto, then disable qconf. Signed-off-by: "Yann E. MORIN" (transplanted from 898c34ee05007d43b6e2573da2a17ee23fe8e67c) --- configure.ac | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 6ae41e5..c649c98 100644 --- a/configure.ac +++ b/configure.ac @@ -272,27 +272,36 @@ AS_IF( #---------------------------------------- # Check headers and libs for qconf -AC_ARG_VAR([MOC], [Qt meta object compiler (moc) command]) AS_IF( [test "$need_qt" = "yes" -o "$need_qt" = "auto"], [PKG_CHECK_MODULES( [qt4], [QtCore QtGui Qt3Support], - [has_qt=yes], + [has_qt=yes; need_moc="$need_qt"], [AS_IF( [test "$need_qt" = "yes"], [AC_MSG_ERROR([could not find QT4 headers and/or libraries (frontend: qconf)])], - [has_qt=no])])]) + [has_qt=no; need_moc=no])])]) +AC_ARG_VAR([MOC], [Qt meta object compiler (moc) command]) AS_IF( - [test "$has_qt" = "no" ], - [enable_qconf=no], + [test "$need_moc" = "yes" -o "$need_moc" = "auto"], [QT4_BINDIR=`$PKG_CONFIG Qt --variable bindir` AC_PATH_PROGS( [MOC], - [moc-qt4 moc], - [moc], - [$QT4_BINDIR:$PATH])]) + [moc-qt4 moc],, + [$QT4_BINDIR:$PATH]) + AS_IF( + [test -n "$MOC"], + [has_moc=yes], + [AS_IF( + [test "$need_moc" = "yes"], + [AC_MSG_ERROR([could not find moc (frontend: qconf)])], + [has_moc=no])])]) + +AS_IF( + [test "$has_qt" = "no" -o "$has_moc" = "no"], + [enable_qconf=no]) #---------------------------------------- # Per-frontends extra libraries -- 2.39.5