diff options
author | Richard Levitte <levitte@openssl.org> | 2002-06-05 05:00:51 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-06-05 05:00:51 +0000 |
commit | 966a7539975d609c82e9ff6e91b0ca5d8ef8afbd (patch) | |
tree | 07b5e1b09c764e6074bc5cd3cbd2ee34210d6f9e /config | |
parent | 0f829bd111385758693777939763fbab1624c696 (diff) | |
download | openssl-966a7539975d609c82e9ff6e91b0ca5d8ef8afbd.tar.gz |
Update the recognision of GCC version numbers to handle the prefix text
that GCC 3.1 adds to the --version output
Diffstat (limited to 'config')
-rwxr-xr-x | config | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -390,11 +390,13 @@ exit 0 # figure out if gcc is available and if so we use it otherwise # we fallback to whatever cc does on the system -GCCVER=`(gcc --version) 2>/dev/null` +GCCVER=`(gcc --version) 2>/dev/null | head -1` if [ "$GCCVER" != "" ]; then CC=gcc - # then strip off whatever prefix Cygnus prepends the number with... - GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'` + # then strip off whatever prefix Cygnus as well as GCC 3.1 prepends + # the number with... Hopefully, this will work for any future prefixes + # as well. + GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z ()]*\-//'` # peak single digit before and after first dot, e.g. 2.95.1 gives 29 GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` else |