From 4bef3cf693d67578bfa73be9c59f2f3b68ddfab0 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Thu, 22 Mar 2012 12:03:51 +0100 Subject: [PATCH] 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" (transplanted from 3e90a35c66908727c96744df74bd572e860fbb90) --- configure.ac | 8 +++++++- frontends/qconf/Makefile.am | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) 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 $@ -- 2.39.5