X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=config%2Fqt4.m4;h=14390f8443e7dce0d14bfc9fb604bcdf5faf2f91;hb=d044986724e98921510c95adecb61d2688b1f598;hp=2bcd4f3bfc51bca53c990f572b5a9a702c842601;hpb=6a598b3d12f36ac836416b79a9daffbc5bf23933;p=features.git diff --git a/config/qt4.m4 b/config/qt4.m4 index 2bcd4f3bfc..14390f8443 100644 --- a/config/qt4.m4 +++ b/config/qt4.m4 @@ -71,11 +71,17 @@ AC_DEFUN([QT_FIND_TOOL], if test "x$USE_QT5" != "xno" ; then qt_ext=qt5 fi + + lyx_qt_path=$PATH if test -n "$qt_cv_bin" ; then - AC_PATH_PROGS($1, [$2], [], $qt_cv_bin) + lyx_qt_path=$qt_cv_bin:$PATH + fi + + if qtchooser -l 2>/dev/null | grep -q ^$qt_ext\$ >/dev/null ; then + AC_CHECK_PROG($1, $2, [$2 -qt=$qt_ext],, [$lyx_qt_path]) fi if test -z "$$1"; then - AC_PATH_PROGS($1, [$2-$qt_ext $2],[],$PATH) + AC_CHECK_PROGS($1, [$2-$qt_ext $2],[],$lyx_qt_path) fi if test -z "$$1"; then AC_MSG_ERROR([cannot find $2 binary.])