From: Yann E. MORIN" Date: Thu, 22 Mar 2012 22:17:00 +0000 (+0100) Subject: configure: if no moc found, disable qconf or fail X-Git-Tag: v3.3.0-1~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=37ac5d2eed0ad4670a4ac990e26a5442a48f0192;p=kconfig-frontends 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) --- 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