QPropertyAnimation is needed for Qt builds and isn't present until Qt 4.6.0.
Add a (crude) check for the Qt version, making 4.6.0 the minimum. The existing checks in configure.ac should be moved into into this new module. svn path=/trunk/; revision=47537
This commit is contained in:
parent
669e68dfde
commit
8a6b4d596d
|
@ -0,0 +1,56 @@
|
||||||
|
# Based on gtk-2.0.m4.
|
||||||
|
# $Id$
|
||||||
|
|
||||||
|
dnl AM_PATH_QT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
dnl Test for Qt+
|
||||||
|
dnl Should also define QT_CFLAGS and QT_LIBS but not done yet...
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([AM_PATH_QT],
|
||||||
|
[
|
||||||
|
|
||||||
|
pkg_config_args=Qt
|
||||||
|
|
||||||
|
no_qt=""
|
||||||
|
|
||||||
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||||
|
|
||||||
|
if test x$PKG_CONFIG != xno ; then
|
||||||
|
if pkg-config --atleast-pkgconfig-version 0.7 ; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo *** pkg-config too old; version 0.7 or better required.
|
||||||
|
no_qt=yes
|
||||||
|
PKG_CONFIG=no
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
no_qt=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
min_qt_version=ifelse([$1], ,4.0.0,$1)
|
||||||
|
AC_MSG_CHECKING(for Qt - version >= $min_qt_version)
|
||||||
|
|
||||||
|
if test x"$no_qt" = x ; then
|
||||||
|
QT_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
|
||||||
|
QT_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
|
||||||
|
qt_config_major_version=`$PKG_CONFIG --modversion $pkg_config_args | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
qt_config_minor_version=`$PKG_CONFIG --modversion $pkg_config_args | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
qt_config_micro_version=`$PKG_CONFIG --modversion $pkg_config_args | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
|
||||||
|
if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_args; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
no_qt=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x"$no_qt" = x ; then
|
||||||
|
AC_MSG_RESULT(yes (version $qt_config_major_version.$qt_config_minor_version.$qt_config_micro_version))
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
ifelse([$3], , :, [$3])
|
||||||
|
fi
|
||||||
|
|
||||||
|
])
|
10
configure.ac
10
configure.ac
|
@ -907,10 +907,10 @@ GTK2_MIN_VERSION=2.12.0
|
||||||
AC_SUBST(GTK2_MIN_VERSION)
|
AC_SUBST(GTK2_MIN_VERSION)
|
||||||
GTK3_MIN_VERSION=3.0.0
|
GTK3_MIN_VERSION=3.0.0
|
||||||
AC_SUBST(GTK3_MIN_VERSION)
|
AC_SUBST(GTK3_MIN_VERSION)
|
||||||
|
QT_MIN_VERSION=4.6.0
|
||||||
|
AC_SUBST(QT_MIN_VERSION)
|
||||||
# GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or
|
# GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or
|
||||||
# GTK3_MIN_VERSION or later, and, for now, don't require any particular
|
# GTK3_MIN_VERSION or later or Qt $QT_MIN_VERSION or later.
|
||||||
# version of Qt (except perhaps by implication, as older versions might not
|
|
||||||
# support pkgconfig).
|
|
||||||
#
|
#
|
||||||
# We only do those if we're going to be building Wireshark;
|
# We only do those if we're going to be building Wireshark;
|
||||||
# otherwise, we don't have any GUI to build, so we don't use
|
# otherwise, we don't have any GUI to build, so we don't use
|
||||||
|
@ -974,6 +974,10 @@ if test "x$enable_wireshark" = "xyes"; then
|
||||||
],
|
],
|
||||||
AC_MSG_NOTICE([QtPrintSupport not found. Assuming Qt4]))
|
AC_MSG_NOTICE([QtPrintSupport not found. Assuming Qt4]))
|
||||||
|
|
||||||
|
# Check for the minimum Qt version
|
||||||
|
# XXX the above checks should be moved into AM_PATH_QT.
|
||||||
|
AM_PATH_QT($QT_MIN_VERSION, , [AC_MSG_ERROR([Qt is not available])])
|
||||||
|
|
||||||
#
|
#
|
||||||
# We don't know whether we have GTK+, but we
|
# We don't know whether we have GTK+, but we
|
||||||
# won't be using it, so it's as if we don't
|
# won't be using it, so it's as if we don't
|
||||||
|
|
Loading…
Reference in New Issue