]> git.lyx.org Git - features.git/commitdiff
Fix Qt tools search when a Qt directory has been specified
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 9 Jul 2013 15:20:25 +0000 (17:20 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 14 Jul 2013 21:07:45 +0000 (23:07 +0200)
When --with-qt-dir has been specified, programs like "moc" in the Qt
directory are unlikely to have a qualified name like moc-qt4.
Therefore, such qualified names are only considered when the base
version has not been found.

config/qt4.m4
status.20x

index be2a21ebf92fec80c5472454d90e624e6b3fcef6..c31d2c152b17706cc30cb57f96fafc66cdb132fd 100644 (file)
@@ -59,6 +59,22 @@ AC_DEFUN([QT4_CHECK_COMPILE],
        fi
 ])
 
+
+AC_DEFUN([QT4_FIND_TOOL],
+[
+       $1=
+       if test -n "$qt4_cv_bin" ; then
+               AC_PATH_PROGS($1, [$2], [], $qt4_cv_bin)
+       fi
+       if test -z "$$1"; then
+               AC_PATH_PROGS($1, [$2-qt4 $2],[],$PATH)
+       fi
+       if test -z "$$1"; then
+               AC_MSG_ERROR([cannot find $2 binary.])
+       fi
+])
+
+
 dnl get Qt version we're using
 AC_DEFUN([QT4_GET_VERSION],
 [
@@ -139,9 +155,10 @@ AC_DEFUN([QT4_DO_IT_ALL],
        if test "$pkg_failed" != "no" ; then
                QT4_DO_MANUAL_CONFIG
        fi
-       AC_PATH_PROGS(MOC4, [moc-qt4 moc],[],$qt4_cv_bin:$PATH)
-       AC_PATH_PROGS(UIC4, [uic-qt4 uic],[],$qt4_cv_bin:$PATH)
-       AC_PATH_PROGS(RCC4, [rcc-qt4 rcc],[],$qt4_cv_bin:$PATH)
+
+       QT4_FIND_TOOL([MOC4], [moc])
+       QT4_FIND_TOOL([UIC4], [uic])
+       QT4_FIND_TOOL([RCC4], [rcc])
 ])
 
 AC_DEFUN([QT4_DO_PKG_CONFIG],
index ca26caf20f1847b6d062bf1de4c6bfeec9fcb6f9..74472eb26d3260296811c25883e06af525a83f4c 100644 (file)
@@ -118,3 +118,5 @@ What's new
 - Add support for automake 1.13.
 
 - Fix compilation with clang LLVM compiler.
+
+- Fix Qt tools search when a Qt directory has been specified.