From 80d406ce39d23ec6c859b9aa427dee8d0d3c9d50 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 15 Sep 2011 12:29:08 +0200 Subject: Re-add QT_GCC_*_VERSION qmake variables Commit 7493ee1c44a16dc3b155a5bf3ed7ca966a71072a accidentally removed them. Change-Id: Ia5132b374ded047ae19479bc98d8564f527e5be2 Reviewed-on: http://codereview.qt-project.org/4970 Reviewed-by: Qt Sanity Bot Reviewed-by: Oswald Buddenhagen --- configure | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'configure') diff --git a/configure b/configure index d35c689b70..4477d2c711 100755 --- a/configure +++ b/configure @@ -7696,6 +7696,30 @@ if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then fi fi +case "$COMPILER" in +g++*) + # GNU C++ + COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null` + + case "$COMPILER_VERSION" in + *.*.*) + QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'` + QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'` + QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'` + ;; + *.*) + QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'` + QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'` + QT_GCC_PATCH_VERSION=0 + ;; + esac + + ;; +*) + # + ;; +esac + #------------------------------------------------------------------------------- # part of configuration information goes into qconfig.h #------------------------------------------------------------------------------- -- cgit v1.2.3