mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-10-22 07:21:21 +00:00
configure: adjust tests for Qt5
This commit is contained in:
parent
e046921e2e
commit
181bde8bcb
@ -1,11 +1,11 @@
|
||||
dnl
|
||||
dnl Check for Qt 4 or newer
|
||||
dnl Check for Qt 5
|
||||
dnl
|
||||
|
||||
AC_ARG_ENABLE([qt],
|
||||
AC_HELP_STRING([--enable-qt],[compile the Qt version of the GUIs (no)]))
|
||||
|
||||
qt_min_ver=4.7.0
|
||||
qt_min_ver=5.0.0
|
||||
|
||||
if test x"$enable_qt" = "xyes" -a \
|
||||
'(' x"$enable_gui" = x"yes" -o x"$enable_gui" = "x" ')'; then
|
||||
@ -17,7 +17,7 @@ if test x"$enable_qt" = "xyes" -a \
|
||||
AC_MSG_CHECKING(for moc)
|
||||
AC_MSG_RESULT(using supplied $MOC)
|
||||
else
|
||||
AC_PATH_PROG(MOC, moc-qt4,, $PATH)
|
||||
AC_PATH_PROG(MOC, moc-qt5,, $PATH)
|
||||
if test -z "$MOC"; then
|
||||
AC_PATH_PROG(MOC, moc,, $PATH)
|
||||
fi
|
||||
@ -29,7 +29,7 @@ if test x"$enable_qt" = "xyes" -a \
|
||||
|
||||
dnl Check its version.
|
||||
AC_MSG_CHECKING(for the Qt version $MOC uses)
|
||||
moc_ver=`"$MOC" -v 2>&1 | sed -e 's:.*Qt ::' -e 's:[[^0-9\.]]::g'`
|
||||
moc_ver=`"$MOC" -v 2>&1 | sed -e 's:.*Qt ::' -e 's:.* ::' -e 's:[[^0-9\.]]::g'`
|
||||
if test -z "moc_ver"; then
|
||||
AC_MSG_RESULT(unknown; please contact the author)
|
||||
exit 1
|
||||
@ -49,7 +49,7 @@ if test x"$enable_qt" = "xyes" -a \
|
||||
AC_MSG_CHECKING(for uic)
|
||||
AC_MSG_RESULT(using supplied $UIC)
|
||||
else
|
||||
AC_PATH_PROG(UIC, uic-qt4,, $PATH)
|
||||
AC_PATH_PROG(UIC, uic-qt5,, $PATH)
|
||||
if test -z "$UIC"; then
|
||||
AC_PATH_PROG(UIC, uic,, $PATH)
|
||||
fi
|
||||
@ -61,7 +61,7 @@ if test x"$enable_qt" = "xyes" -a \
|
||||
|
||||
dnl Check its version.
|
||||
AC_MSG_CHECKING(for the Qt version $UIC uses)
|
||||
uic_ver=`"$UIC" -v 2>&1 | sed -e 's:.*Qt ::' -e 's:[[^0-9\.]]::g'`
|
||||
uic_ver=`"$UIC" -v 2>&1 | sed -e 's:.*Qt ::' -e 's:.* ::' -e 's:[[^0-9\.]]::g'`
|
||||
if test -z "uic_ver"; then
|
||||
AC_MSG_RESULT(unknown; please contact the author)
|
||||
exit 1
|
||||
@ -81,7 +81,7 @@ if test x"$enable_qt" = "xyes" -a \
|
||||
AC_MSG_CHECKING(for rcc)
|
||||
AC_MSG_RESULT(using supplied $RCC)
|
||||
else
|
||||
AC_PATH_PROG(RCC, rcc-qt4,, $PATH)
|
||||
AC_PATH_PROG(RCC, rcc-qt5,, $PATH)
|
||||
if test -z "$RCC"; then
|
||||
AC_PATH_PROG(RCC, rcc,, $PATH)
|
||||
fi
|
||||
@ -93,7 +93,7 @@ if test x"$enable_qt" = "xyes" -a \
|
||||
|
||||
dnl Check its version.
|
||||
AC_MSG_CHECKING(for the Qt version $RCC uses)
|
||||
rcc_ver=`"$RCC" -v 2>&1 | sed -e 's:.*Qt ::' -e 's:[[^0-9\.]]::g'`
|
||||
rcc_ver=`"$RCC" -v 2>&1 | sed -e 's:.*Qt ::' -e 's:.* ::' -e 's:[[^0-9\.]]::g'`
|
||||
if test -z "rcc_ver"; then
|
||||
AC_MSG_RESULT(unknown; please contact the author)
|
||||
exit 1
|
||||
@ -118,13 +118,13 @@ if test x"$enable_qt" = "xyes" -a \
|
||||
fi
|
||||
|
||||
if test $ok = 1; then
|
||||
PKG_CHECK_EXISTS([QtCore,QtGui],,[ok=0])
|
||||
PKG_CHECK_EXISTS([QtCore,QtGui,QtWidgets],,[ok=0])
|
||||
fi
|
||||
|
||||
if test $ok = 1; then
|
||||
dnl Try compiling and linking an application.
|
||||
QT_CFLAGS="`$PKG_CONFIG QtCore --cflags` `pkg-config QtGui --cflags`"
|
||||
QT_LIBS="`$PKG_CONFIG QtGui --libs`"
|
||||
QT_CFLAGS="`$PKG_CONFIG --cflags Qt5Core Qt5Gui Qt5Widgets`"
|
||||
QT_LIBS="`$PKG_CONFIG --libs Qt5Core Qt5Gui Qt5Widgets`"
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CACHE_VAL(am_cv_qt_compilation, [
|
||||
@ -132,7 +132,7 @@ if test x"$enable_qt" = "xyes" -a \
|
||||
while true; do
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CXXFLAGS="$CXXFLAGS $QT_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $QT_CFLAGS -fPIC"
|
||||
LIBS="$LDFLAGS $QT_LIBS"
|
||||
unset ac_cv_qt_compilation
|
||||
|
||||
@ -165,8 +165,8 @@ return 0;
|
||||
set - $QT_CFLAGS
|
||||
while test ! -z "$1" ; do
|
||||
case "$1" in
|
||||
-I*)
|
||||
QT_CFLAGS="$QT_CFLAGS $1/QtCore $1/QtGui"
|
||||
-I*qt*)
|
||||
QT_CFLAGS="$QT_CFLAGS $1/QtCore $1/QtGui $1/QtWidgets"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
@ -174,7 +174,7 @@ return 0;
|
||||
run_qt_test=2
|
||||
|
||||
elif test x"$run_qt_test" = "x2"; then
|
||||
QT_CFLAGS="$QT_CFLAGS -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/local/include/QtCore -I/usr/local/include/QtGui"
|
||||
QT_CFLAGS="$QT_CFLAGS -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtWidgets -I/usr/local/include/QtCore -I/usr/local/include/QtGui -I/usr/local/include/QtWidgets"
|
||||
run_qt_test=3
|
||||
|
||||
else
|
@ -37,7 +37,7 @@ m4_include(ac/matroska.m4)
|
||||
dnl m4_include(ac/ebml_matroska_internal.m4)
|
||||
m4_include(ac/zlib.m4)
|
||||
m4_include(ac/wxwidgets.m4)
|
||||
m4_include(ac/qt4.m4)
|
||||
m4_include(ac/qt5.m4)
|
||||
m4_include(ac/gnurx.m4)
|
||||
m4_include(ac/magic.m4)
|
||||
m4_include(ac/curl.m4)
|
||||
|
Loading…
Reference in New Issue
Block a user