Mesa (master): Add version check for GCC

Ian Romanick idr at kemper.freedesktop.org
Thu Mar 4 00:26:53 UTC 2010


Module: Mesa
Branch: master
Commit: 9aa3aa71386394725ce88df463d6183f62777ee5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9aa3aa71386394725ce88df463d6183f62777ee5

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Wed Mar  3 15:59:37 2010 -0800

Add version check for GCC

Mesa now requires GCC 3.3.0 or later.  See the following thread from
the mesa3d-dev mailing list for more details:

http://marc.info/?t=126748568900005&r=1&w=2

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>

---

 configure.ac |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index e807d4a..8ca2749 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,28 @@ solaris*)
     ;;
 esac
 
+dnl If we're using GCC, make sure that it is at least version 3.3.0.  Older
+dnl versions are explictly not supported.
+if test "x$GCC" = xyes; then
+    AC_MSG_CHECKING([whether gcc version is sufficient])
+    major=0
+    minor=0
+
+    GCC_VERSION=`$CC -dumpversion`
+    if test $? -eq 0; then
+        major=`echo $GCC_VERSION | cut -d. -f1`
+        minor=`echo $GCC_VERSION | cut -d. -f1`
+    fi
+
+    if test $major -lt 3 -o $major -eq 3 -a $minor -lt 3 ; then
+        AC_MSG_RESULT([no])
+        AC_MSG_ERROR([If using GCC, version 3.3.0 or later is required.])
+    else
+        AC_MSG_RESULT([yes])
+    fi
+fi
+
+
 MKDEP_OPTIONS=-fdepend
 dnl Ask gcc where it's keeping its secret headers
 if test "x$GCC" = xyes; then




More information about the mesa-commit mailing list