X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=config%2Fqt4.m4;h=1cf557d637239bd9ce3fb0df98904c9e283fde6b;hb=acb34ac53f009eb42efeb1f7768047a7b5a43513;hp=f39c0ed67ef612f9570649e964d85ccb63e7706f;hpb=cb0c881b0298ef6c54e0cc57dc6f2ef46716c7aa;p=lyx.git diff --git a/config/qt4.m4 b/config/qt4.m4 index f39c0ed67e..1cf557d637 100644 --- a/config/qt4.m4 +++ b/config/qt4.m4 @@ -75,7 +75,13 @@ AC_DEFUN([QT_FIND_TOOL], if test -n "$qt_cv_bin" ; then AC_PATH_PROGS($1, [$2], [], $qt_cv_bin) elif qtchooser -l 2>/dev/null | grep -q ^$qt_ext\$ >/dev/null ; then - AC_CHECK_PROG($1, $2, [$2 -qt=$qt_ext],, [$PATH]) + AC_PATH_PROG(qtc_path, qtchooser, [], [$PATH]) + AC_PATH_PROG($2_path, $2, [], [$PATH]) + qtc_path=`dirname "$qtc_path"` + $2_path=`dirname "$$2_path"` + if test "$qtc_path" = "$$2_path" ; then + AC_CHECK_PROG($1, $2, [$2 -qt=$qt_ext],, [$PATH]) + fi fi if test -z "$$1"; then AC_CHECK_PROGS($1, [$2-$qt_ext $2],[],$PATH) @@ -173,11 +179,14 @@ AC_DEFUN([QT_DO_IT_ALL], ]) save_CPPFLAGS=$CPPFLAGS - AC_MSG_CHECKING([whether Qt uses the X Window system]) CPPFLAGS="$save_CPPFLAGS $QT_CORE_INCLUDES" + AC_CHECK_HEADER(QtGui/qtgui-config.h, + [lyx_qt5_config=QtGui/qtgui-config.h], + [lyx_qt5_config=qconfig.h],[-]) + AC_MSG_CHECKING([whether Qt uses the X Window system]) if test x$USE_QT5 = xyes ; then AC_EGREP_CPP(xcb, - [#include + [#include <$lyx_qt5_config> QT_QPA_DEFAULT_PLATFORM_NAME], [AC_MSG_RESULT(yes) AC_DEFINE(QPA_XCB, 1, [Define if Qt uses the X Window System])],