Comment change.
[bpt/emacs.git] / config.guess
index 81b905a..30230b3 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+#   Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -52,6 +52,9 @@ trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     alpha:OSF1:*:*)
+       if test $UNAME_RELEASE = "V4.0"; then
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+       fi
        # 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.
@@ -62,9 +65,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 main:
        .frame \$30,0,\$26,0
        .prologue 0
-       .long 0x47e03d84
-       cmoveq \$4,0,\$3
-       addl \$3,\$31,\$0
+       .long 0x47e03d80 # implver $0
+       lda \$2,259
+       .long 0x47e20c21 # amask $2,$1
+       srl \$1,8,\$2
+       sll \$2,2,\$2
+       sll \$0,3,\$0
+       addl \$1,\$0,\$0
+       addl \$2,\$0,\$0
        ret \$31,(\$26),1
        .end main
 EOF
@@ -72,16 +80,25 @@ EOF
        if test "$?" = 0 ; then
                ./dummy
                case "$?" in
-                       1)
+                       7)
+                               UNAME_MACHINE="alpha"
+                               ;;
+                       15)
                                UNAME_MACHINE="alphaev5"
                                ;;
-                       2)
+                       14)
                                UNAME_MACHINE="alphaev56"
                                ;;
+                       10)
+                               UNAME_MACHINE="alphapca56"
+                               ;;
+                       16)
+                               UNAME_MACHINE="alphaev6"
+                               ;;
                esac
        fi
        rm -f dummy.s dummy
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
        exit 0 ;;
     21064:Windows_NT:50:3)
        echo alpha-dec-winnt3.5
@@ -160,7 +177,7 @@ EOF
     sun*:*:4.2BSD:*)
        UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-       case "`/bin/arch" in
+       case "`/bin/arch`" in
            sun3)
                echo m68k-sun-sunos${UNAME_RELEASE}
                ;;
@@ -461,10 +478,10 @@ EOF
        echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
        exit 0 ;;
     i*:CYGWIN*:*)
-       echo i386-pc-cygwin32
+       echo ${UNAME_MACHINE}-pc-cygwin32
        exit 0 ;;
     i*:MINGW*:*)
-       echo i386-pc-mingw32
+       echo ${UNAME_MACHINE}-pc-mingw32
        exit 0 ;;
     p*:CYGWIN*:*)
        echo powerpcle-unknown-cygwin32
@@ -476,6 +493,12 @@ EOF
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
        exit 0 ;;
     *:Linux:*:*)
+       # uname on the ARM produces all sorts of strangeness, and we need to
+       # filter it out.
+       case "$UNAME_MACHINE" in
+         arm* | sa110*)              UNAME_MACHINE="arm" ;;
+       esac
+
        # The BFD linker knows what the default object file format is, so
        # first see if it will tell us.
        ld_help_string=`ld --help 2>&1`
@@ -489,6 +512,7 @@ EOF
          i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
          i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
          sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+         armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
          m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
          elf32ppc)   echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
        esac
@@ -500,26 +524,47 @@ EOF
        main:
                .frame \$30,0,\$26,0
                .prologue 0
-               .long 0x47e03d84
-               cmoveq \$4,0,\$3
-               addl \$3,\$31,\$0
+               .long 0x47e03d80 # implver $0
+               lda \$2,259
+               .long 0x47e20c21 # amask $2,$1
+               srl \$1,8,\$2
+               sll \$2,2,\$2
+               sll \$0,3,\$0
+               addl \$1,\$0,\$0
+               addl \$2,\$0,\$0
                ret \$31,(\$26),1
                .end main
 EOF
+               LIBC=""
                ${CC-cc} dummy.s -o dummy 2>/dev/null
                if test "$?" = 0 ; then
                        ./dummy
                        case "$?" in
-                               1)
-                                       UNAME_MACHINE="alphaev5"
-                               ;;      
-                       2)      
-                                       UNAME_MACHINE="alphaev56"
-                               ;;      
-               esac    
-         fi    
-         rm -f dummy.s dummy
-         echo ${UNAME_MACHINE}-unknown-linux-gnu ; exit 0
+                       7)
+                               UNAME_MACHINE="alpha"
+                               ;;
+                       15)
+                               UNAME_MACHINE="alphaev5"
+                               ;;
+                       14)
+                               UNAME_MACHINE="alphaev56"
+                               ;;
+                       10)
+                               UNAME_MACHINE="alphapca56"
+                               ;;
+                       16)
+                               UNAME_MACHINE="alphaev6"
+                               ;;
+                       esac    
+
+                       objdump --private-headers dummy | \
+                         grep ld.so.1 > /dev/null
+                       if test "$?" = 0 ; then
+                               LIBC="libc1"
+                       fi
+               fi      
+               rm -f dummy.s dummy
+               echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
        elif test "${UNAME_MACHINE}" = "mips" ; then
          cat >dummy.c <<EOF
 main(argc, argv)