Fix detection of qt4 on systems where qt5 is the default (like Archlinux)

This commit is contained in:
Olivier Teulière 2013-04-06 15:09:36 +02:00
parent aa78c0a4bd
commit e2d8ab5cdc

View file

@ -164,16 +164,17 @@ else
fi
AM_CONDITIONAL([BUILD_NCURSES], [test "${want_ncurses}" = "1"])
dnl check for Qt
dnl Check for Qt
AC_ARG_ENABLE([qt],AS_HELP_STRING([--enable-qt],
[Qt interface support (default disabled)]))
qt_ok=0
AS_IF([test "${enable_qt}" != "no"],
[PKG_CHECK_MODULES(QT, [QtCore QtGui QtNetwork >= 4.2.0],
[qt_ok=1
AC_PATH_PROG(MOC, moc, moc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
AC_PATH_PROG(UIC, uic, uic,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
AC_PATH_PROG(RCC, rcc, rcc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
dnl Check for the qt4 suffix first (useful on Archlinux, which uses qt5 by default)
AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
AC_PATH_PROGS(UIC, [uic-qt4 uic], uic,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
AC_PATH_PROGS(RCC, [rcc-qt4 rcc], rcc,`$PKG_CONFIG --variable=exec_prefix QtCore`/bin)
QT4LOCALEDIR="$($PKG_CONFIG --variable=prefix QtCore)/share/qt4/translations/"
AC_SUBST(QT4LOCALEDIR)
],