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:
authorLutz Jänicke <jaenicke@openssl.org>2002-06-16 14:29:55 +0400
committerLutz Jänicke <jaenicke@openssl.org>2002-06-16 14:29:55 +0400
commite5706ccbdee2180611842b1e53d44813db4388a1 (patch)
treee4527b246594e4197edf35f3ed4f16ee01553a75 /config
parent9a82ef5255b35a24a8cc83ccb627456a083df6c8 (diff)
Use -dumpversion to obtain gcc's version.
Submitted by: ross.alexander@uk.neceur.com, allenh@eecs.berkeley.edu Reviewed by: PR: 96
Diffstat (limited to 'config')
-rwxr-xr-xconfig9
1 files changed, 4 insertions, 5 deletions
diff --git a/config b/config
index 8c80670a08..972cdb70a3 100755
--- a/config
+++ b/config
@@ -390,13 +390,12 @@ 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 | head -1`
+GCCVER=`(gcc -dumpversion) 2>/dev/null`
if [ "$GCCVER" != "" ]; then
CC=gcc
- # 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 ()---]*//'`
+ # Since gcc 3.1 gcc --version behaviour has changed. gcc -dumpversion
+ # does give us what we want though, so we use that. We just just the
+ # major and minor version numbers.
# 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