Switch to new version numbering scheme.
[openssl.git] / config
diff --git a/config b/config
index eec90a34567b649bd47711d978789453b7b894c3..3ddf4bb46e4b5c0c633a884df386700009264cd6 100755 (executable)
--- a/config
+++ b/config
@@ -283,6 +283,14 @@ if [ $? = "0" ]; then
   CC=gcc
 else
   CC=cc
+  if [ "$SYSTEM" = "SunOS" ]
+  then
+   case `cc -V 2>&1` in
+    *4*) CC=sc4;;
+    *5*) CC=sc5;;
+    *) CC=cc;;
+   esac
+  fi
 fi
 
 # read the output of the embedded GuessOS 
@@ -298,9 +306,11 @@ case "$GUESSOS" in
   ppc-*-linux2) OUT="linux-ppc" ;;
   *-*-linux2) OUT="linux-elf" ;;
   *-*-linux1) OUT="linux-aout" ;;
+  sun4u-sun-solaris2) OUT="solaris-usparc-$CC" ;;
   sun4*-sun-solaris2) OUT="solaris-sparc-$CC" ;;
   *86*-sun-solaris2) OUT="solaris-x86-$CC" ;;
   *-*-sunos4) OUT="sunos-$CC" ;;
+  alpha*-*-freebsd3) OUT="FreeBSD-alpha" ;;
   *-freebsd3) OUT="FreeBSD-elf" ;;
   *-freebsd) OUT="FreeBSD" ;;
   *86*-*-netbsd) OUT="NetBSD-x86" ;;
@@ -320,6 +330,18 @@ case "$GUESSOS" in
   *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
 esac
 
+# gcc < 2.8 does not support -mcpu=ultrasparc
+if [ "$OUT" = solaris-usparc-gcc ]
+then
+ 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
+fi
+
 case "$GUESSOS" in
   i386-*) options="$options 386" ;;
 esac
@@ -374,6 +396,6 @@ if [ $? = "0" ]; then
     $PERL ./Configure $OUT $options
   fi
 else
-  echo "This system is not supported. See file INSTALL for details."
+  echo "This system ($OUT) is not supported. See file INSTALL for details."
 fi
 )