Parse version numbers prefixed with text (egcs does that, even with
authorRichard Levitte <levitte@openssl.org>
Fri, 9 Aug 2002 07:32:24 +0000 (07:32 +0000)
committerRichard Levitte <levitte@openssl.org>
Fri, 9 Aug 2002 07:32:24 +0000 (07:32 +0000)
-dumpversion).
PR: 203, part 1

config

diff --git a/config b/config
index 972cdb70a3da05ecec6581c0b93dbecc05993d89..3e9af7680a772d9351ec66d139cf0c073c5d6645 100755 (executable)
--- a/config
+++ b/config
@@ -393,6 +393,9 @@ exit 0
 GCCVER=`(gcc -dumpversion) 2>/dev/null`
 if [ "$GCCVER" != "" ]; then
   CC=gcc
+  # then strip off whatever prefix egcs 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.