From: Yann E. MORIN" Date: Thu, 22 Mar 2012 11:03:51 +0000 (+0100) Subject: configure: detect moc properly X-Git-Tag: v3.4.0-0~40 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7eff34a95bf51c057db47966cc860daaf3f56646;p=kconfig-frontends configure: detect moc properly The moc executable used for Qt may be installed under different names in different places. Try to identify one that matches the version of Qt that is being used. Signed-off-by: Peter Kjellerstedt [yann.morin.1998@free.fr: fix MOC under-quotation, fix code layout] Signed-off-by: "Yann E. MORIN" --- diff --git a/configure.ac b/configure.ac index ab2f572..e605e86 100644 --- a/configure.ac +++ b/configure.ac @@ -285,7 +285,13 @@ AS_IF( AS_IF( [test "$has_qt" = "no" ], - [enable_qconf=no]) + [enable_qconf=no], + [QT4_BINDIR=`$PKG_CONFIG Qt --variable bindir` + AC_PATH_PROGS( + [MOC], + [moc-qt4 moc], + [moc], + [$QT4_BINDIR:$PATH])]) #---------------------------------------- # Per-frontends extra libraries diff --git a/frontends/qconf/Makefile.am b/frontends/qconf/Makefile.am index 9946857..5815271 100644 --- a/frontends/qconf/Makefile.am +++ b/frontends/qconf/Makefile.am @@ -12,4 +12,4 @@ qconf_LDADD = $(top_builddir)/libs/parser/libkconfigparser.la \ $(qt4_LIBS) $(qconf_EXTRA_LIBS) .h.moc: - moc -i $< -o $@ + $(MOC) -i $< -o $@