Convert gcc version detection (for solaris-usparc-gcc) into a form
authorBodo Möller <bodo@openssl.org>
Wed, 19 May 1999 16:50:16 +0000 (16:50 +0000)
committerBodo Möller <bodo@openssl.org>
Wed, 19 May 1999 16:50:16 +0000 (16:50 +0000)
better suited for finding what went wrong in case that some compiler
versions create an output we can't parse.

config

diff --git a/config b/config
index 56aad1d..3ddf4bb 100755 (executable)
--- a/config
+++ b/config
@@ -333,7 +333,10 @@ esac
 # gcc < 2.8 does not support -mcpu=ultrasparc
 if [ "$OUT" = solaris-usparc-gcc ]
 then
- if [ `echo $GCCVER | sed 's/.*version //;s/\.//;s/\..*//'` -lt 28 ]
+ GCCVERMAJOR="`echo $GCCVER | sed 's/.*version \([^.]*\).*/\1/`"
+ GCCVERMINOR="`echo $GCCVER | sed 's/.*version[^.]*\.\([^.]*\).*/\1/`"
+ echo "gcc version $GCCVERMAJOR.$GCCVERMINOR.x"
+ if [ $GCCVERMAJOR$GCCVERMINOR -lt 28 ]
  then
   OUT=solaris-usparc-oldgcc
  fi