summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-08-09 09:49:05 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-08-09 09:49:05 +0200
commit4f19b6f5128e96ff05a0601834296da8f75874e2 (patch)
treec3fbd39424fe10c965a86850ed20a0c2c471a530 /configure.ac
parentc42ac01b221292a4480037e145b0d5b11c4d412e (diff)
"gcc --version" output is rather unreliable
...so extend 409e6a2e0b89eab82e79b0cd122062f47c6c7afb "gcc -dumpversion has only MAJOR.MINOR, not MAJOR.MINOR.PATCHLEVEL" to also cope with e.g. Fedora 18 gcc's "gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)" output line. Change-Id: Ieb5e032685da49cd7e6f0a49a0fdc137fc24fbbd
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 546fab91aa2e..7f9b408b21ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2929,7 +2929,7 @@ dnl Test the gcc version
dnl ===================================================================
if test "$GCC" = "yes"; then
AC_MSG_CHECKING([the GCC version])
- _gcc_version=`$CC --version|head -n1|sed 's/^.* //g'`
+ _gcc_version=`$CC --version|head -n1|sed -e 's/^.* //g' -e 's/-[[0-9]]*)$//'`
_gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`