configure: first check for QtGui >= 4.6, only then for >= 4.0

If we first check for >= 4.0 the second check for >= 4.6 will just
short-cut since we are using the same prefix for the variables for
both checks, and they've already been set previously. So the examples
requiring >= 4.6 were built even in the >= 4.0 case.
This commit is contained in:
Tim-Philipp Müller 2010-03-05 15:58:44 +00:00
parent f9e2317867
commit e943ef3757

View file

@ -282,9 +282,14 @@ PKG_CHECK_MODULES(GTK_X11, gtk+-x11-2.0 >= 2.14.0,
AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes")
dnl QT is optional and only used in examples
PKG_CHECK_MODULES(QT, QtGui >= 4.0, HAVE_QT=yes, HAVE_QT=no)
PKG_CHECK_MODULES(QT, QtGui >= 4.6, [
HAVE_QT_GV=yes
HAVE_QT=yes
], [
HAVE_QT_GV=no
PKG_CHECK_MODULES(QT, QtGui >= 4.0, HAVE_QT=yes, HAVE_QT=no)
])
AM_CONDITIONAL(HAVE_QT, test "x$HAVE_QT" = "xyes")
PKG_CHECK_MODULES(QT, QtGui >= 4.6, HAVE_QT_GV=yes, HAVE_QT_GV=no)
AM_CONDITIONAL(HAVE_QT_GV, test "x$HAVE_QT_GV" = "xyes")
dnl *** set variables based on configure arguments ***