From: Richard Levitte Date: Wed, 5 Jun 2002 05:00:51 +0000 (+0000) Subject: Update the recognision of GCC version numbers to handle the prefix text X-Git-Tag: OpenSSL_0_9_6e~26^2~103 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=966a7539975d609c82e9ff6e91b0ca5d8ef8afbd;p=oweals%2Fopenssl.git Update the recognision of GCC version numbers to handle the prefix text that GCC 3.1 adds to the --version output --- diff --git a/config b/config index 3d443da6fb..00e4c76919 100755 --- a/config +++ b/config @@ -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