[project @ 1996-07-25 20:43:49 by partain]
[ghc-hetmet.git] / config.guess
index c3c4e79..c416b78 100644 (file)
@@ -51,15 +51,13 @@ trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    alpha:OSF1:[VX]*:*)
-       # After 1.2, OSF1 uses "V1.3" for uname -r.
-       # After 4.x, OSF1 uses "X4.x" for uname -r.
-       echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VX]//'`
-       exit 0 ;;
     alpha:OSF1:*:*)
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       echo alpha-dec-osf${UNAME_RELEASE}
-        exit 0 ;;
+       echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
+       exit 0 ;;
     21064:Windows_NT:50:3)
        echo alpha-dec-winnt3.5
        exit 0 ;;
@@ -118,11 +116,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     VAX*:ULTRIX*:*:*)
        echo vax-dec-ultrix${UNAME_RELEASE}
        exit 0 ;;
-    mips:*:4*:UMIPS)
-       echo mips-mips-riscos4sysv
-       exit 0 ;;
-    mips:*:5*:RISCos)
-       echo mips-mips-riscos${UNAME_RELEASE}
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       sed 's/^        //' << EOF >dummy.c
+       int main (argc, argv) int argc; char **argv; {
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       ${CC-cc} dummy.c -o dummy && ./dummy "${UNAME_RELEASE}" \
+         && rm dummy.c dummy && exit 0
+       rm -f dummy.c dummy
+       echo mips-mips-riscos{UNAME_RELEASE}
        exit 0 ;;
     Night_Hawk:Power_UNIX:*:*)
        echo powerpc-harris-powerunix
@@ -138,8 +152,8 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        exit 0 ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`uname -p`
-        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88100 ] ; then
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
        if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
             -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
                echo m88k-dg-dgux${UNAME_RELEASE}
@@ -213,7 +227,7 @@ EOF
        echo romp-ibm-bsd4.4
        exit 0 ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to 
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
        exit 0 ;;                           # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
        echo rs6000-bull-bosx
@@ -330,6 +344,9 @@ EOF
     p*:CYGWIN*:*)
        echo powerpcle-unknown-cygwin32
        exit 0 ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
     *:GNU:*:*)
        echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit 0 ;;
@@ -347,8 +364,12 @@ EOF
          echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
        elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
          echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
+       elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
+         echo "powerpc-unknown-linux" ; exit 0
        elif test "${UNAME_MACHINE}" = "alpha" ; then
          echo alpha-unknown-linux ; exit 0
+       elif test "${UNAME_MACHINE}" = "sparc" ; then
+         echo sparc-unknown-linux ; exit 0
        else
          # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us
          # useful --help.  Gcc wants to distinguish between linuxoldld and linuxaout.
@@ -416,9 +437,15 @@ EOF
        exit 0 ;;
     M680[234]0:*:R3V[567]*:*)
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0)
+    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+       UNAME_REL=4.3
+       if test -f /etc/.relid; then
+         UNAME_REL=4.3.`awk '{ print $3 }' /etc/.relid`
+       fi
         uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4.3 && exit 0 ;;
+          && echo i486-ncr-sysv$UNAME_REL && exit 0
+        uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+          && echo i586-ncr-sysv$UNAME_REL && exit 0 ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         uname -p 2>/dev/null | grep 86 >/dev/null \
           && echo i486-ncr-sysv4 && exit 0 ;;