|
From: Bart V. A. <bar...@gm...> - 2008-04-16 19:12:11
|
The Valgrind configure script attempts to figure out the version of
the gcc compiler. Unfortunately this script does not recognize all
formats in which gcc can print its version number. The patch below
should fix this -- it extracts the first number from the first line of
the output of gcc --version. Some examples of formats in which gcc can
print its version number:
2.96
gcc (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8)
gcc (GCC) 4.2.1 (SUSE Linux)
Please review the patch below.
Bart.
Index: configure.in
===================================================================
--- configure.in (revision 7884)
+++ configure.in (working copy)
@@ -86,22 +86,13 @@
# We don't want gcc < 3.0
AC_MSG_CHECKING([for a supported version of gcc])
-gcc_version=`${CC} --version | head -n 1`
+[gcc_version=`${CC} --version | head -n 1 | sed
's/^[^0-9.]*\([0-9.]*\).*$/\1/'`]
case "${gcc_version}" in
- gcc-2.7.*)
+ 2.*)
AC_MSG_RESULT([no (${gcc_version})])
AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc])
;;
- gcc-2.8.*)
- AC_MSG_RESULT([no (${gcc_version})])
- AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc])
- ;;
- gcc-2.9*)
- AC_MSG_RESULT([no (${gcc_version})])
- AC_MSG_ERROR([please use a recent (>= gcc-3.0) version of gcc])
- ;;
-
*)
AC_MSG_RESULT([ok (${gcc_version})])
;;
|