]> git.sur5r.net Git - kconfig-frontends/commitdiff
configure: detect moc properly
authorYann E. MORIN" <yann.morin@orange.com>
Thu, 22 Mar 2012 11:03:51 +0000 (12:03 +0100)
committerPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Thu, 22 Mar 2012 11:03:51 +0000 (12:03 +0100)
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 <pkj@axis.com>
[yann.morin.1998@free.fr: fix MOC under-quotation, fix code layout]
Signed-off-by: "Yann E. MORIN" <yann.morin@orange.com>
configure.ac
frontends/qconf/Makefile.am

index ab2f572e36d1d35d3b663c3732a9f28d2f40193e..e605e8643a21afb58b696144bb5072cfbffdf523 100644 (file)
@@ -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
index 9946857d3fee26868214953f009c4575bb43d080..58152712d60dbedb8f8ce11f20949d4e7dcbd553 100644 (file)
@@ -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 $@