Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-06-05 09:00:41 +0400
committerRichard Levitte <levitte@openssl.org>2002-06-05 09:00:41 +0400
commitfc16b228fd2f7829b1ac51af943b06da2455065c (patch)
tree01c3d7411c6cd4e0a1baa51582fa4adb3b9210af /config
parenta5b2ccaaadc9a2adb5eefa1b6120f3e15143e92f (diff)
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-xconfig8
1 files changed, 5 insertions, 3 deletions
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