Older versions of SINIX C development system inherited a bug from
[openssl.git] / config
diff --git a/config b/config
index eec90a34567b649bd47711d978789453b7b894c3..53cad40a5f13199678f2b4a9a0cbff2082da82c1 100755 (executable)
--- a/config
+++ b/config
@@ -201,8 +201,8 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
        echo "${MACHINE}-unknown-ultrix"; exit 0
        ;;
 
-    SINIX*)
-       echo "${MACHINE}-sni-sysv4"; exit 0
+    SINIX*|ReliantUNIX*)
+       echo "${MACHINE}-siemens-sysv4"; exit 0
        ;;
 
     machten:*)
@@ -283,6 +283,14 @@ if [ $? = "0" ]; then
   CC=gcc
 else
   CC=cc
+  if [ "$SYSTEM" = "SunOS" ]
+  then
+   case `cc -V 2>&1` in
+    *4*) CC=cc;;
+    *5*) CC=cc;;
+    *) CC=sc3;;
+   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" ;;
@@ -312,7 +322,8 @@ case "$GUESSOS" in
   *-*-openbsd) OUT="OpenBSD" ;;
   *-*-osf) OUT="alpha-cc" ;;
   *-*-unixware*) OUT="unixware-2.0" ;;
-  *-sni-sysv4) OUT="SINIX" ;;
+  RM*-siemens-sysv4) OUT="ReliantUNIX" ;;
+  *-siemens-sysv4) OUT="SINIX" ;;
   # these are all covered by the catchall below
   # *-hpux*) OUT="hpux-$CC" ;;
   # *-aix) OUT="aix-$CC" ;;
@@ -320,6 +331,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 +397,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
 )