source: freewrt/package/jpeg/patches/jpeg-6b-config_guess.patch@ 9df7618

freewrt_1_0 freewrt_2_0
Last change on this file since 9df7618 was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 75.3 KB
  • config.guess

    diff -urN jpeg.old/config.guess jpeg.dev/config.guess
    old new  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
    4 #
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     4#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
     5
     6timestamp='2004-11-12'
     7
    58# This file is free software; you can redistribute it and/or modify it
    69# under the terms of the GNU General Public License as published by
    710# the Free Software Foundation; either version 2 of the License, or
     
    2124# configuration script generated by Autoconf, you may include it under
    2225# the same distribution terms that you use for the rest of that program.
    2326
    24 # Written by Per Bothner <bothner@cygnus.com>.
    25 # The master version of this file is at the FSF in /home/gd/gnu/lib.
     27# Originally written by Per Bothner <per@bothner.com>.
     28# Please send patches to <config-patches@gnu.org>.  Submit a context
     29# diff and a properly formatted ChangeLog entry.
    2630#
    2731# This script attempts to guess a canonical system name similar to
    2832# config.sub.  If it succeeds, it prints the system name on stdout, and
    2933# exits with 0.  Otherwise, it exits with 1.
    3034#
    3135# The plan is that this can be called by configure scripts if you
    32 # don't specify an explicit system type (host/target name).
    33 #
    34 # Only a few systems have been added to this list; please add others
    35 # (but try to keep the structure clean).
    36 #
     36# don't specify an explicit build system type.
     37
     38me=`echo "$0" | sed -e 's,.*/,,'`
     39
     40usage="\
     41Usage: $0 [OPTION]
     42
     43Output the configuration name of the system \`$me' is run on.
     44
     45Operation modes:
     46  -h, --help         print this help, then exit
     47  -t, --time-stamp   print date of last modification, then exit
     48  -v, --version      print version number, then exit
     49
     50Report bugs and patches to <config-patches@gnu.org>."
     51
     52version="\
     53GNU config.guess ($timestamp)
     54
     55Originally written by Per Bothner.
     56Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
     57Free Software Foundation, Inc.
     58
     59This is free software; see the source for copying conditions.  There is NO
     60warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     61
     62help="
     63Try \`$me --help' for more information."
     64
     65# Parse command line
     66while test $# -gt 0 ; do
     67  case $1 in
     68    --time-stamp | --time* | -t )
     69       echo "$timestamp" ; exit 0 ;;
     70    --version | -v )
     71       echo "$version" ; exit 0 ;;
     72    --help | --h* | -h )
     73       echo "$usage"; exit 0 ;;
     74    -- )     # Stop option processing
     75       shift; break ;;
     76    - ) # Use stdin as input.
     77       break ;;
     78    -* )
     79       echo "$me: invalid option $1$help" >&2
     80       exit 1 ;;
     81    * )
     82       break ;;
     83  esac
     84done
     85
     86if test $# != 0; then
     87  echo "$me: too many arguments$help" >&2
     88  exit 1
     89fi
     90
     91trap 'exit 1' 1 2 15
     92
     93# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
     94# compiler to aid in system detection is discouraged as it requires
     95# temporary files to be created and, as you can see below, it is a
     96# headache to deal with in a portable fashion.
     97
     98# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
     99# use `HOST_CC' if defined, but it is deprecated.
     100
     101# Portable tmp directory creation inspired by the Autoconf team.
     102
     103set_cc_for_build='
     104trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
     105trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
     106: ${TMPDIR=/tmp} ;
     107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
     108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
     109 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
     110 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
     111dummy=$tmp/dummy ;
     112tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
     113case $CC_FOR_BUILD,$HOST_CC,$CC in
     114 ,,)    echo "int x;" > $dummy.c ;
     115        for c in cc gcc c89 c99 ; do
     116          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
     117             CC_FOR_BUILD="$c"; break ;
     118          fi ;
     119        done ;
     120        if test x"$CC_FOR_BUILD" = x ; then
     121          CC_FOR_BUILD=no_compiler_found ;
     122        fi
     123        ;;
     124 ,,*)   CC_FOR_BUILD=$CC ;;
     125 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
     126esac ;'
    37127
    38128# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
    39 # (ghazi@noc.rutgers.edu 8/24/94.)
     129# (ghazi@noc.rutgers.edu 1994-08-24)
    40130if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
    41131        PATH=$PATH:/.attbin ; export PATH
    42132fi
    43133
    44134UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
    45135UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
    46 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
     136UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    47137UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    48138
    49 trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
    50 
    51139# Note: order is significant - the case branches are not exclusive.
    52140
    53141case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     142    *:NetBSD:*:*)
     143        # NetBSD (nbsd) targets should (where applicable) match one or
     144        # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
     145        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
     146        # switched to ELF, *-*-netbsd* would select the old
     147        # object file format.  This provides both forward
     148        # compatibility and a consistent mechanism for selecting the
     149        # object file format.
     150        #
     151        # Note: NetBSD doesn't particularly care about the vendor
     152        # portion of the name.  We always set it to "unknown".
     153        sysctl="sysctl -n hw.machine_arch"
     154        UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
     155            /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
     156        case "${UNAME_MACHINE_ARCH}" in
     157            armeb) machine=armeb-unknown ;;
     158            arm*) machine=arm-unknown ;;
     159            sh3el) machine=shl-unknown ;;
     160            sh3eb) machine=sh-unknown ;;
     161            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
     162        esac
     163        # The Operating System including object format, if it has switched
     164        # to ELF recently, or will in the future.
     165        case "${UNAME_MACHINE_ARCH}" in
     166            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
     167                eval $set_cc_for_build
     168                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
     169                        | grep __ELF__ >/dev/null
     170                then
     171                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
     172                    # Return netbsd for either.  FIX?
     173                    os=netbsd
     174                else
     175                    os=netbsdelf
     176                fi
     177                ;;
     178            *)
     179                os=netbsd
     180                ;;
     181        esac
     182        # The OS release
     183        # Debian GNU/NetBSD machines have a different userland, and
     184        # thus, need a distinct triplet. However, they do not need
     185        # kernel version information, so it can be replaced with a
     186        # suitable tag, in the style of linux-gnu.
     187        case "${UNAME_VERSION}" in
     188            Debian*)
     189                release='-gnu'
     190                ;;
     191            *)
     192                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     193                ;;
     194        esac
     195        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
     196        # contains redundant information, the shorter form:
     197        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
     198        echo "${machine}-${os}${release}"
     199        exit 0 ;;
     200    amd64:OpenBSD:*:*)
     201        echo x86_64-unknown-openbsd${UNAME_RELEASE}
     202        exit 0 ;;
     203    amiga:OpenBSD:*:*)
     204        echo m68k-unknown-openbsd${UNAME_RELEASE}
     205        exit 0 ;;
     206    cats:OpenBSD:*:*)
     207        echo arm-unknown-openbsd${UNAME_RELEASE}
     208        exit 0 ;;
     209    hp300:OpenBSD:*:*)
     210        echo m68k-unknown-openbsd${UNAME_RELEASE}
     211        exit 0 ;;
     212    luna88k:OpenBSD:*:*)
     213        echo m88k-unknown-openbsd${UNAME_RELEASE}
     214        exit 0 ;;
     215    mac68k:OpenBSD:*:*)
     216        echo m68k-unknown-openbsd${UNAME_RELEASE}
     217        exit 0 ;;
     218    macppc:OpenBSD:*:*)
     219        echo powerpc-unknown-openbsd${UNAME_RELEASE}
     220        exit 0 ;;
     221    mvme68k:OpenBSD:*:*)
     222        echo m68k-unknown-openbsd${UNAME_RELEASE}
     223        exit 0 ;;
     224    mvme88k:OpenBSD:*:*)
     225        echo m88k-unknown-openbsd${UNAME_RELEASE}
     226        exit 0 ;;
     227    mvmeppc:OpenBSD:*:*)
     228        echo powerpc-unknown-openbsd${UNAME_RELEASE}
     229        exit 0 ;;
     230    sgi:OpenBSD:*:*)
     231        echo mips64-unknown-openbsd${UNAME_RELEASE}
     232        exit 0 ;;
     233    sun3:OpenBSD:*:*)
     234        echo m68k-unknown-openbsd${UNAME_RELEASE}
     235        exit 0 ;;
     236    *:OpenBSD:*:*)
     237        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
     238        exit 0 ;;
     239    *:ekkoBSD:*:*)
     240        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
     241        exit 0 ;;
     242    macppc:MirBSD:*:*)
     243        echo powerppc-unknown-mirbsd${UNAME_RELEASE}
     244        exit 0 ;;
     245    *:MirBSD:*:*)
     246        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
     247        exit 0 ;;
    54248    alpha:OSF1:*:*)
    55         if test $UNAME_RELEASE = "V4.0"; then
     249        case $UNAME_RELEASE in
     250        *4.0)
    56251                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    57         fi
     252                ;;
     253        *5.*)
     254                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
     255                ;;
     256        esac
     257        # According to Compaq, /usr/sbin/psrinfo has been available on
     258        # OSF/1 and Tru64 systems produced since 1995.  I hope that
     259        # covers most systems running today.  This code pipes the CPU
     260        # types through head -n 1, so we only detect the type of CPU 0.
     261        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
     262        case "$ALPHA_CPU_TYPE" in
     263            "EV4 (21064)")
     264                UNAME_MACHINE="alpha" ;;
     265            "EV4.5 (21064)")
     266                UNAME_MACHINE="alpha" ;;
     267            "LCA4 (21066/21068)")
     268                UNAME_MACHINE="alpha" ;;
     269            "EV5 (21164)")
     270                UNAME_MACHINE="alphaev5" ;;
     271            "EV5.6 (21164A)")
     272                UNAME_MACHINE="alphaev56" ;;
     273            "EV5.6 (21164PC)")
     274                UNAME_MACHINE="alphapca56" ;;
     275            "EV5.7 (21164PC)")
     276                UNAME_MACHINE="alphapca57" ;;
     277            "EV6 (21264)")
     278                UNAME_MACHINE="alphaev6" ;;
     279            "EV6.7 (21264A)")
     280                UNAME_MACHINE="alphaev67" ;;
     281            "EV6.8CB (21264C)")
     282                UNAME_MACHINE="alphaev68" ;;
     283            "EV6.8AL (21264B)")
     284                UNAME_MACHINE="alphaev68" ;;
     285            "EV6.8CX (21264D)")
     286                UNAME_MACHINE="alphaev68" ;;
     287            "EV6.9A (21264/EV69A)")
     288                UNAME_MACHINE="alphaev69" ;;
     289            "EV7 (21364)")
     290                UNAME_MACHINE="alphaev7" ;;
     291            "EV7.9 (21364A)")
     292                UNAME_MACHINE="alphaev79" ;;
     293        esac
     294        # A Pn.n version is a patched version.
    58295        # A Vn.n version is a released version.
    59296        # A Tn.n version is a released field test version.
    60297        # A Xn.n version is an unreleased experimental baselevel.
    61298        # 1.2 uses "1.2" for uname -r.
    62         cat <<EOF >dummy.s
    63         .globl main
    64         .ent main
    65 main:
    66         .frame \$30,0,\$26,0
    67         .prologue 0
    68         .long 0x47e03d80 # implver $0
    69         lda \$2,259
    70         .long 0x47e20c21 # amask $2,$1
    71         srl \$1,8,\$2
    72         sll \$2,2,\$2
    73         sll \$0,3,\$0
    74         addl \$1,\$0,\$0
    75         addl \$2,\$0,\$0
    76         ret \$31,(\$26),1
    77         .end main
    78 EOF
    79         ${CC-cc} dummy.s -o dummy 2>/dev/null
    80         if test "$?" = 0 ; then
    81                 ./dummy
    82                 case "$?" in
    83                         7)
    84                                 UNAME_MACHINE="alpha"
    85                                 ;;
    86                         15)
    87                                 UNAME_MACHINE="alphaev5"
    88                                 ;;
    89                         14)
    90                                 UNAME_MACHINE="alphaev56"
    91                                 ;;
    92                         10)
    93                                 UNAME_MACHINE="alphapca56"
    94                                 ;;
    95                         16)
    96                                 UNAME_MACHINE="alphaev6"
    97                                 ;;
    98                 esac
    99         fi
    100         rm -f dummy.s dummy
    101         echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
     299        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     300        exit 0 ;;
     301    Alpha\ *:Windows_NT*:*)
     302        # How do we know it's Interix rather than the generic POSIX subsystem?
     303        # Should we change UNAME_MACHINE based on the output of uname instead
     304        # of the specific Alpha model?
     305        echo alpha-pc-interix
    102306        exit 0 ;;
    103307    21064:Windows_NT:50:3)
    104308        echo alpha-dec-winnt3.5
    105309        exit 0 ;;
    106310    Amiga*:UNIX_System_V:4.0:*)
    107         echo m68k-cbm-sysv4
     311        echo m68k-unknown-sysv4
    108312        exit 0;;
    109     amiga:NetBSD:*:*)
    110       echo m68k-cbm-netbsd${UNAME_RELEASE}
    111       exit 0 ;;
    112     amiga:OpenBSD:*:*)
    113         echo m68k-unknown-openbsd${UNAME_RELEASE}
    114         exit 0 ;;
    115     arc64:OpenBSD:*:*)
    116         echo mips64el-unknown-openbsd${UNAME_RELEASE}
     313    *:[Aa]miga[Oo][Ss]:*:*)
     314        echo ${UNAME_MACHINE}-unknown-amigaos
    117315        exit 0 ;;
    118     arc:OpenBSD:*:*)
    119         echo mipsel-unknown-openbsd${UNAME_RELEASE}
     316    *:[Mm]orph[Oo][Ss]:*:*)
     317        echo ${UNAME_MACHINE}-unknown-morphos
    120318        exit 0 ;;
    121     hkmips:OpenBSD:*:*)
    122         echo mips-unknown-openbsd${UNAME_RELEASE}
     319    *:OS/390:*:*)
     320        echo i370-ibm-openedition
    123321        exit 0 ;;
    124     pmax:OpenBSD:*:*)
    125         echo mipsel-unknown-openbsd${UNAME_RELEASE}
    126         exit 0 ;;
    127     sgi:OpenBSD:*:*)
    128         echo mips-unknown-openbsd${UNAME_RELEASE}
     322    *:z/VM:*:*)
     323        echo s390-ibm-zvmoe
    129324        exit 0 ;;
    130     wgrisc:OpenBSD:*:*)
    131         echo mipsel-unknown-openbsd${UNAME_RELEASE}
     325    *:OS400:*:*)
     326        echo powerpc-ibm-os400
    132327        exit 0 ;;
    133328    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    134329        echo arm-acorn-riscix${UNAME_RELEASE}
    135330        exit 0;;
    136     arm32:NetBSD:*:*)
    137         echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
    138         exit 0 ;;
    139     SR2?01:HI-UX/MPP:*:*)
     331    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    140332        echo hppa1.1-hitachi-hiuxmpp
    141333        exit 0;;
    142     Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
     334    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
    143335        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
    144336        if test "`(/bin/universe) 2>/dev/null`" = att ; then
    145337                echo pyramid-pyramid-sysv3
     
    147339                echo pyramid-pyramid-bsd
    148340        fi
    149341        exit 0 ;;
    150     NILE:*:*:dcosx)
     342    NILE*:*:*:dcosx)
    151343        echo pyramid-pyramid-svr4
    152344        exit 0 ;;
     345    DRS?6000:unix:4.0:6*)
     346        echo sparc-icl-nx6
     347        exit 0 ;;
     348    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
     349        case `/usr/bin/uname -p` in
     350            sparc) echo sparc-icl-nx7 && exit 0 ;;
     351        esac ;;
     352    sun4H:SunOS:5.*:*)
     353        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     354        exit 0 ;;
    153355    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    154356        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    155357        exit 0 ;;
     
    175377        echo m68k-sun-sunos${UNAME_RELEASE}
    176378        exit 0 ;;
    177379    sun*:*:4.2BSD:*)
    178         UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
     380        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
    179381        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
    180382        case "`/bin/arch`" in
    181383            sun3)
     
    189391    aushp:SunOS:*:*)
    190392        echo sparc-auspex-sunos${UNAME_RELEASE}
    191393        exit 0 ;;
    192     atari*:NetBSD:*:*)
    193         echo m68k-atari-netbsd${UNAME_RELEASE}
     394    # The situation for MiNT is a little confusing.  The machine name
     395    # can be virtually everything (everything which is not
     396    # "atarist" or "atariste" at least should have a processor
     397    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
     398    # to the lowercase version "mint" (or "freemint").  Finally
     399    # the system name "TOS" denotes a system which is actually not
     400    # MiNT.  But MiNT is downward compatible to TOS, so this should
     401    # be no problem.
     402    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
     403        echo m68k-atari-mint${UNAME_RELEASE}
    194404        exit 0 ;;
    195     atari*:OpenBSD:*:*)
    196         echo m68k-unknown-openbsd${UNAME_RELEASE}
    197         exit 0 ;;
    198     sun3*:NetBSD:*:*)
    199         echo m68k-sun-netbsd${UNAME_RELEASE}
    200         exit 0 ;;
    201     sun3*:OpenBSD:*:*)
    202         echo m68k-unknown-openbsd${UNAME_RELEASE}
    203         exit 0 ;;
    204     mac68k:NetBSD:*:*)
    205         echo m68k-apple-netbsd${UNAME_RELEASE}
    206         exit 0 ;;
    207     mac68k:OpenBSD:*:*)
    208         echo m68k-unknown-openbsd${UNAME_RELEASE}
    209         exit 0 ;;
    210     mvme68k:OpenBSD:*:*)
    211         echo m68k-unknown-openbsd${UNAME_RELEASE}
     405    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
     406        echo m68k-atari-mint${UNAME_RELEASE}
     407        exit 0 ;;
     408    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
     409        echo m68k-atari-mint${UNAME_RELEASE}
    212410        exit 0 ;;
    213     mvme88k:OpenBSD:*:*)
    214         echo m88k-unknown-openbsd${UNAME_RELEASE}
     411    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
     412        echo m68k-milan-mint${UNAME_RELEASE}
     413        exit 0 ;;
     414    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
     415        echo m68k-hades-mint${UNAME_RELEASE}
     416        exit 0 ;;
     417    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
     418        echo m68k-unknown-mint${UNAME_RELEASE}
     419        exit 0 ;;
     420    m68k:machten:*:*)
     421        echo m68k-apple-machten${UNAME_RELEASE}
    215422        exit 0 ;;
    216423    powerpc:machten:*:*)
    217424        echo powerpc-apple-machten${UNAME_RELEASE}
     
    225432    VAX*:ULTRIX*:*:*)
    226433        echo vax-dec-ultrix${UNAME_RELEASE}
    227434        exit 0 ;;
    228     2020:CLIX:*:*)
     435    2020:CLIX:*:* | 2430:CLIX:*:*)
    229436        echo clipper-intergraph-clix${UNAME_RELEASE}
    230437        exit 0 ;;
    231438    mips:*:*:UMIPS | mips:*:*:RISCos)
    232         sed 's/^        //' << EOF >dummy.c
    233         int main (argc, argv) int argc; char **argv; {
     439        eval $set_cc_for_build
     440        sed 's/^        //' << EOF >$dummy.c
     441#ifdef __cplusplus
     442#include <stdio.h>  /* for printf() prototype */
     443        int main (int argc, char *argv[]) {
     444#else
     445        int main (argc, argv) int argc; char *argv[]; {
     446#endif
    234447        #if defined (host_mips) && defined (MIPSEB)
    235448        #if defined (SYSTYPE_SYSV)
    236449          printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
     
    245458          exit (-1);
    246459        }
    247460EOF
    248         ${CC-cc} dummy.c -o dummy \
    249           && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
    250           && rm dummy.c dummy && exit 0
    251         rm -f dummy.c dummy
     461        $CC_FOR_BUILD -o $dummy $dummy.c \
     462          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
     463          && exit 0
    252464        echo mips-mips-riscos${UNAME_RELEASE}
    253465        exit 0 ;;
     466    Motorola:PowerMAX_OS:*:*)
     467        echo powerpc-motorola-powermax
     468        exit 0 ;;
     469    Motorola:*:4.3:PL8-*)
     470        echo powerpc-harris-powermax
     471        exit 0 ;;
     472    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
     473        echo powerpc-harris-powermax
     474        exit 0 ;;
    254475    Night_Hawk:Power_UNIX:*:*)
    255476        echo powerpc-harris-powerunix
    256477        exit 0 ;;
     
    266487    AViiON:dgux:*:*)
    267488        # DG/UX returns AViiON for all architectures
    268489        UNAME_PROCESSOR=`/usr/bin/uname -p`
    269         if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
    270         if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
    271              -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
     490        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
     491        then
     492            if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
     493               [ ${TARGET_BINARY_INTERFACE}x = x ]
     494            then
    272495                echo m88k-dg-dgux${UNAME_RELEASE}
    273         else
     496            else
    274497                echo m88k-dg-dguxbcs${UNAME_RELEASE}
     498            fi
     499        else
     500            echo i586-dg-dgux${UNAME_RELEASE}
    275501        fi
    276         else echo i586-dg-dgux${UNAME_RELEASE}
    277         fi
    278502        exit 0 ;;
    279503    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
    280504        echo m88k-dolphin-sysv3
     
    295519    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    296520        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
    297521        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
    298     i?86:AIX:*:*)
     522    i*86:AIX:*:*)
    299523        echo i386-ibm-aix
    300524        exit 0 ;;
     525    ia64:AIX:*:*)
     526        if [ -x /usr/bin/oslevel ] ; then
     527                IBM_REV=`/usr/bin/oslevel`
     528        else
     529                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
     530        fi
     531        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
     532        exit 0 ;;
    301533    *:AIX:2:3)
    302534        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
    303                 sed 's/^                //' << EOF >dummy.c
     535                eval $set_cc_for_build
     536                sed 's/^                //' << EOF >$dummy.c
    304537                #include <sys/systemcfg.h>
    305538
    306539                main()
     
    311544                        exit(0);
    312545                        }
    313546EOF
    314                 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
    315                 rm -f dummy.c dummy
     547                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    316548                echo rs6000-ibm-aix3.2.5
    317549        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
    318550                echo rs6000-ibm-aix3.2.4
     
    320552                echo rs6000-ibm-aix3.2
    321553        fi
    322554        exit 0 ;;
    323     *:AIX:*:4)
    324         if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
     555    *:AIX:*:[45])
     556        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
     557        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
    325558                IBM_ARCH=rs6000
    326559        else
    327560                IBM_ARCH=powerpc
     
    329562        if [ -x /usr/bin/oslevel ] ; then
    330563                IBM_REV=`/usr/bin/oslevel`
    331564        else
    332                 IBM_REV=4.${UNAME_RELEASE}
     565                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    333566        fi
    334567        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
    335568        exit 0 ;;
     
    339572    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
    340573        echo romp-ibm-bsd4.4
    341574        exit 0 ;;
    342     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
     575    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    343576        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    344577        exit 0 ;;                           # report: romp-ibm BSD 4.3
    345578    *:BOSX:*:*)
     
    354587    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
    355588        echo m68k-hp-bsd4.4
    356589        exit 0 ;;
    357     9000/[3478]??:HP-UX:*:*)
     590    9000/[34678]??:HP-UX:*:*)
     591        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    358592        case "${UNAME_MACHINE}" in
    359593            9000/31? )            HP_ARCH=m68000 ;;
    360594            9000/[34]?? )         HP_ARCH=m68k ;;
    361             9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
    362             9000/8?? )            HP_ARCH=hppa1.0 ;;
     595            9000/[678][0-9][0-9])
     596                if [ -x /usr/bin/getconf ]; then
     597                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
     598                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
     599                    case "${sc_cpu_version}" in
     600                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
     601                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
     602                      532)                      # CPU_PA_RISC2_0
     603                        case "${sc_kernel_bits}" in
     604                          32) HP_ARCH="hppa2.0n" ;;
     605                          64) HP_ARCH="hppa2.0w" ;;
     606                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
     607                        esac ;;
     608                    esac
     609                fi
     610                if [ "${HP_ARCH}" = "" ]; then
     611                    eval $set_cc_for_build
     612                    sed 's/^              //' << EOF >$dummy.c
     613
     614              #define _HPUX_SOURCE
     615              #include <stdlib.h>
     616              #include <unistd.h>
     617
     618              int main ()
     619              {
     620              #if defined(_SC_KERNEL_BITS)
     621                  long bits = sysconf(_SC_KERNEL_BITS);
     622              #endif
     623                  long cpu  = sysconf (_SC_CPU_VERSION);
     624
     625                  switch (cpu)
     626                {
     627                case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
     628                case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
     629                case CPU_PA_RISC2_0:
     630              #if defined(_SC_KERNEL_BITS)
     631                    switch (bits)
     632                        {
     633                        case 64: puts ("hppa2.0w"); break;
     634                        case 32: puts ("hppa2.0n"); break;
     635                        default: puts ("hppa2.0"); break;
     636                        } break;
     637              #else  /* !defined(_SC_KERNEL_BITS) */
     638                    puts ("hppa2.0"); break;
     639              #endif
     640                default: puts ("hppa1.0"); break;
     641                }
     642                  exit (0);
     643              }
     644EOF
     645                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
     646                    test -z "$HP_ARCH" && HP_ARCH=hppa
     647                fi ;;
    363648        esac
    364         HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
     649        if [ ${HP_ARCH} = "hppa2.0w" ]
     650        then
     651            # avoid double evaluation of $set_cc_for_build
     652            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
     653            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
     654            then
     655                HP_ARCH="hppa2.0w"
     656            else
     657                HP_ARCH="hppa64"
     658            fi
     659        fi
    365660        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    366661        exit 0 ;;
     662    ia64:HP-UX:*:*)
     663        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
     664        echo ia64-hp-hpux${HPUX_REV}
     665        exit 0 ;;
    367666    3050*:HI-UX:*:*)
    368         sed 's/^        //' << EOF >dummy.c
     667        eval $set_cc_for_build
     668        sed 's/^        //' << EOF >$dummy.c
    369669        #include <unistd.h>
    370670        int
    371671        main ()
     
    390690          exit (0);
    391691        }
    392692EOF
    393         ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
    394         rm -f dummy.c dummy
     693        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    395694        echo unknown-hitachi-hiuxwe2
    396695        exit 0 ;;
    397696    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
     
    400699    9000/8??:4.3bsd:*:*)
    401700        echo hppa1.0-hp-bsd
    402701        exit 0 ;;
     702    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
     703        echo hppa1.0-hp-mpeix
     704        exit 0 ;;
    403705    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
    404706        echo hppa1.1-hp-osf
    405707        exit 0 ;;
    406708    hp8??:OSF1:*:*)
    407709        echo hppa1.0-hp-osf
    408710        exit 0 ;;
    409     i?86:OSF1:*:*)
     711    i*86:OSF1:*:*)
    410712        if [ -x /usr/sbin/sysversion ] ; then
    411713            echo ${UNAME_MACHINE}-unknown-osf1mk
    412714        else
     
    434736    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    435737        echo c4-convex-bsd
    436738        exit 0 ;;
    437     CRAY*X-MP:*:*:*)
    438         echo xmp-cray-unicos
    439         exit 0 ;;
    440739    CRAY*Y-MP:*:*:*)
    441         echo ymp-cray-unicos${UNAME_RELEASE}
     740        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    442741        exit 0 ;;
    443742    CRAY*[A-Z]90:*:*:*)
    444743        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
    445744        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
    446               -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
     745              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
     746              -e 's/\.[^.]*$/.X/'
    447747        exit 0 ;;
    448748    CRAY*TS:*:*:*)
    449         echo t90-cray-unicos${UNAME_RELEASE}
     749        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    450750        exit 0 ;;
    451     CRAY-2:*:*:*)
    452         echo cray2-cray-unicos
    453         exit 0 ;;
    454     F300:UNIX_System_V:*:*)
    455         FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
     751    CRAY*T3E:*:*:*)
     752        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     753        exit 0 ;;
     754    CRAY*SV1:*:*:*)
     755        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     756        exit 0 ;;
     757    *:UNICOS/mp:*:*)
     758        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     759        exit 0 ;;
     760    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
     761        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     762        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    456763        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    457         echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     764        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    458765        exit 0 ;;
    459     F301:UNIX_System_V:*:*)
    460        echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
    461        exit 0 ;;
    462     hp3[0-9][05]:NetBSD:*:*)
    463         echo m68k-hp-netbsd${UNAME_RELEASE}
     766    5000:UNIX_System_V:4.*:*)
     767        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
     768        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
     769        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    464770        exit 0 ;;
    465     hp300:OpenBSD:*:*)
    466         echo m68k-unknown-openbsd${UNAME_RELEASE}
    467         exit 0 ;;
    468     i?86:BSD/386:*:* | *:BSD/OS:*:*)
     771    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    469772        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    470773        exit 0 ;;
    471     *:FreeBSD:*:*)
    472         echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
     774    sparc*:BSD/OS:*:*)
     775        echo sparc-unknown-bsdi${UNAME_RELEASE}
    473776        exit 0 ;;
    474     *:NetBSD:*:*)
    475         echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     777    *:BSD/OS:*:*)
     778        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    476779        exit 0 ;;
    477     *:OpenBSD:*:*)
    478         echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     780    *:FreeBSD:*:*)
     781        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
    479782        exit 0 ;;
    480783    i*:CYGWIN*:*)
    481         echo i386-pc-cygwin32
     784        echo ${UNAME_MACHINE}-pc-cygwin
    482785        exit 0 ;;
    483786    i*:MINGW*:*)
    484         echo i386-pc-mingw32
     787        echo ${UNAME_MACHINE}-pc-mingw32
     788        exit 0 ;;
     789    i*:PW*:*)
     790        echo ${UNAME_MACHINE}-pc-pw32
     791        exit 0 ;;
     792    x86:Interix*:[34]*)
     793        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
     794        exit 0 ;;
     795    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
     796        echo i${UNAME_MACHINE}-pc-mks
     797        exit 0 ;;
     798    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
     799        # How do we know it's Interix rather than the generic POSIX subsystem?
     800        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
     801        # UNAME_MACHINE based on the output of uname instead of i386?
     802        echo i586-pc-interix
     803        exit 0 ;;
     804    i*:UWIN*:*)
     805        echo ${UNAME_MACHINE}-pc-uwin
    485806        exit 0 ;;
    486807    p*:CYGWIN*:*)
    487         echo powerpcle-unknown-cygwin32
     808        echo powerpcle-unknown-cygwin
    488809        exit 0 ;;
    489810    prep*:SunOS:5.*:*)
    490811        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    491812        exit 0 ;;
    492813    *:GNU:*:*)
     814        # the GNU system
    493815        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    494816        exit 0 ;;
    495     *:Linux:*:*)
     817    *:GNU/*:*:*)
     818        # other systems with GNU libc and userland
     819        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
     820        exit 0 ;;
     821    i*86:Minix:*:*)
     822        echo ${UNAME_MACHINE}-pc-minix
     823        exit 0 ;;
     824    arm*:Linux:*:*)
     825        echo ${UNAME_MACHINE}-unknown-linux-gnu
     826        exit 0 ;;
     827    cris:Linux:*:*)
     828        echo cris-axis-linux-gnu
     829        exit 0 ;;
     830    crisv32:Linux:*:*)
     831        echo crisv32-axis-linux-gnu
     832        exit 0 ;;
     833    frv:Linux:*:*)
     834        echo frv-unknown-linux-gnu
     835        exit 0 ;;
     836    ia64:Linux:*:*)
     837        echo ${UNAME_MACHINE}-unknown-linux-gnu
     838        exit 0 ;;
     839    m32r*:Linux:*:*)
     840        echo ${UNAME_MACHINE}-unknown-linux-gnu
     841        exit 0 ;;
     842    m68*:Linux:*:*)
     843        echo ${UNAME_MACHINE}-unknown-linux-gnu
     844        exit 0 ;;
     845    mips:Linux:*:*)
     846        eval $set_cc_for_build
     847        sed 's/^        //' << EOF >$dummy.c
     848        #undef CPU
     849        #undef mips
     850        #undef mipsel
     851        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     852        CPU=mipsel
     853        #else
     854        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     855        CPU=mips
     856        #else
     857        CPU=
     858        #endif
     859        #endif
     860EOF
     861        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     862        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
     863        ;;
     864    mips64:Linux:*:*)
     865        eval $set_cc_for_build
     866        sed 's/^        //' << EOF >$dummy.c
     867        #undef CPU
     868        #undef mips64
     869        #undef mips64el
     870        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     871        CPU=mips64el
     872        #else
     873        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     874        CPU=mips64
     875        #else
     876        CPU=
     877        #endif
     878        #endif
     879EOF
     880        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     881        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
     882        ;;
     883    ppc:Linux:*:*)
     884        echo powerpc-unknown-linux-gnu
     885        exit 0 ;;
     886    ppc64:Linux:*:*)
     887        echo powerpc64-unknown-linux-gnu
     888        exit 0 ;;
     889    alpha:Linux:*:*)
     890        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     891          EV5)   UNAME_MACHINE=alphaev5 ;;
     892          EV56)  UNAME_MACHINE=alphaev56 ;;
     893          PCA56) UNAME_MACHINE=alphapca56 ;;
     894          PCA57) UNAME_MACHINE=alphapca56 ;;
     895          EV6)   UNAME_MACHINE=alphaev6 ;;
     896          EV67)  UNAME_MACHINE=alphaev67 ;;
     897          EV68*) UNAME_MACHINE=alphaev68 ;;
     898        esac
     899        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
     900        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
     901        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
     902        exit 0 ;;
     903    parisc:Linux:*:* | hppa:Linux:*:*)
     904        # Look for CPU level
     905        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
     906          PA7*) echo hppa1.1-unknown-linux-gnu ;;
     907          PA8*) echo hppa2.0-unknown-linux-gnu ;;
     908          *)    echo hppa-unknown-linux-gnu ;;
     909        esac
     910        exit 0 ;;
     911    parisc64:Linux:*:* | hppa64:Linux:*:*)
     912        echo hppa64-unknown-linux-gnu
     913        exit 0 ;;
     914    s390:Linux:*:* | s390x:Linux:*:*)
     915        echo ${UNAME_MACHINE}-ibm-linux
     916        exit 0 ;;
     917    sh64*:Linux:*:*)
     918        echo ${UNAME_MACHINE}-unknown-linux-gnu
     919        exit 0 ;;
     920    sh*:Linux:*:*)
     921        echo ${UNAME_MACHINE}-unknown-linux-gnu
     922        exit 0 ;;
     923    sparc:Linux:*:* | sparc64:Linux:*:*)
     924        echo ${UNAME_MACHINE}-unknown-linux-gnu
     925        exit 0 ;;
     926    x86_64:Linux:*:*)
     927        echo x86_64-unknown-linux-gnu
     928        exit 0 ;;
     929    i*86:Linux:*:*)
    496930        # The BFD linker knows what the default object file format is, so
    497         # first see if it will tell us.
    498         ld_help_string=`ld --help 2>&1`
    499         ld_supported_emulations=`echo $ld_help_string \
    500                          | sed -ne '/supported emulations:/!d
     931        # first see if it will tell us. cd to the root directory to prevent
     932        # problems with other programs or directories called `ld' in the path.
     933        # Set LC_ALL=C to ensure ld outputs messages in English.
     934        ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
     935                         | sed -ne '/supported targets:/!d
    501936                                    s/[         ][      ]*/ /g
    502                                     s/.*supported emulations: *//
     937                                    s/.*supported targets: *//
    503938                                    s/ .*//
    504939                                    p'`
    505         case "$ld_supported_emulations" in
    506           i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
    507           i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
    508           sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
    509           m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
    510           elf32ppc)   echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
    511         esac
    512 
    513         if test "${UNAME_MACHINE}" = "alpha" ; then
    514                 sed 's/^        //'  <<EOF >dummy.s
    515                 .globl main
    516                 .ent main
    517         main:
    518                 .frame \$30,0,\$26,0
    519                 .prologue 0
    520                 .long 0x47e03d80 # implver $0
    521                 lda \$2,259
    522                 .long 0x47e20c21 # amask $2,$1
    523                 srl \$1,8,\$2
    524                 sll \$2,2,\$2
    525                 sll \$0,3,\$0
    526                 addl \$1,\$0,\$0
    527                 addl \$2,\$0,\$0
    528                 ret \$31,(\$26),1
    529                 .end main
    530 EOF
    531                 LIBC=""
    532                 ${CC-cc} dummy.s -o dummy 2>/dev/null
    533                 if test "$?" = 0 ; then
    534                         ./dummy
    535                         case "$?" in
    536                         7)
    537                                 UNAME_MACHINE="alpha"
    538                                 ;;
    539                         15)
    540                                 UNAME_MACHINE="alphaev5"
    541                                 ;;
    542                         14)
    543                                 UNAME_MACHINE="alphaev56"
    544                                 ;;
    545                         10)
    546                                 UNAME_MACHINE="alphapca56"
    547                                 ;;
    548                         16)
    549                                 UNAME_MACHINE="alphaev6"
    550                                 ;;
    551                         esac   
    552 
    553                         objdump --private-headers dummy | \
    554                           grep ld.so.1 > /dev/null
    555                         if test "$?" = 0 ; then
    556                                 LIBC="libc1"
    557                         fi
    558                 fi     
    559                 rm -f dummy.s dummy
    560                 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
    561         elif test "${UNAME_MACHINE}" = "mips" ; then
    562           cat >dummy.c <<EOF
    563 main(argc, argv)
    564      int argc;
    565      char *argv[];
    566 {
    567 #ifdef __MIPSEB__
    568   printf ("%s-unknown-linux-gnu\n", argv[1]);
    569 #endif
    570 #ifdef __MIPSEL__
    571   printf ("%sel-unknown-linux-gnu\n", argv[1]);
    572 #endif
    573   return 0;
    574 }
    575 EOF
    576           ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
    577           rm -f dummy.c dummy
    578         else
    579           # Either a pre-BFD a.out linker (linux-gnuoldld)
    580           # or one that does not give us useful --help.
    581           # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
    582           # If ld does not provide *any* "supported emulations:"
    583           # that means it is gnuoldld.
    584           echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
    585           test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
    586 
    587           case "${UNAME_MACHINE}" in
    588           i?86)
    589             VENDOR=pc;
    590             ;;
    591           *)
    592             VENDOR=unknown;
    593             ;;
    594           esac
    595           # Determine whether the default compiler is a.out or elf
    596           cat >dummy.c <<EOF
    597 #include <features.h>
    598 main(argc, argv)
    599      int argc;
    600      char *argv[];
    601 {
    602 #ifdef __ELF__
    603 # ifdef __GLIBC__
    604 #  if __GLIBC__ >= 2
    605     printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
    606 #  else
    607     printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
    608 #  endif
    609 # else
    610    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
    611 # endif
    612 #else
    613   printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
    614 #endif
    615   return 0;
    616 }
     940        case "$ld_supported_targets" in
     941          elf32-i386)
     942                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
     943                ;;
     944          a.out-i386-linux)
     945                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
     946                exit 0 ;;
     947          coff-i386)
     948                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
     949                exit 0 ;;
     950          "")
     951                # Either a pre-BFD a.out linker (linux-gnuoldld) or
     952                # one that does not give us useful --help.
     953                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
     954                exit 0 ;;
     955        esac
     956        # Determine whether the default compiler is a.out or elf
     957        eval $set_cc_for_build
     958        sed 's/^        //' << EOF >$dummy.c
     959        #include <features.h>
     960        #ifdef __ELF__
     961        # ifdef __GLIBC__
     962        #  if __GLIBC__ >= 2
     963        LIBC=gnu
     964        #  else
     965        LIBC=gnulibc1
     966        #  endif
     967        # else
     968        LIBC=gnulibc1
     969        # endif
     970        #else
     971        #ifdef __INTEL_COMPILER
     972        LIBC=gnu
     973        #else
     974        LIBC=gnuaout
     975        #endif
     976        #endif
     977        #ifdef __dietlibc__
     978        LIBC=dietlibc
     979        #endif
    617980EOF
    618           ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
    619           rm -f dummy.c dummy
    620         fi ;;
    621 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
    622 # are messed up and put the nodename in both sysname and nodename.
    623     i?86:DYNIX/ptx:4*:*)
     981        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
     982        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
     983        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
     984        ;;
     985    i*86:DYNIX/ptx:4*:*)
     986        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
     987        # earlier versions are messed up and put the nodename in both
     988        # sysname and nodename.
    624989        echo i386-sequent-sysv4
    625990        exit 0 ;;
    626     i?86:UNIX_SV:4.2MP:2.*)
     991    i*86:UNIX_SV:4.2MP:2.*)
    627992        # Unixware is an offshoot of SVR4, but it has its own version
    628993        # number series starting with 2...
    629994        # I am not positive that other SVR4 systems won't match this,
     
    631996        # Use sysv4.2uw... so that sysv4* matches it.
    632997        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
    633998        exit 0 ;;
    634     i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
     999    i*86:OS/2:*:*)
     1000        # If we were able to find `uname', then EMX Unix compatibility
     1001        # is probably installed.
     1002        echo ${UNAME_MACHINE}-pc-os2-emx
     1003        exit 0 ;;
     1004    i*86:XTS-300:*:STOP)
     1005        echo ${UNAME_MACHINE}-unknown-stop
     1006        exit 0 ;;
     1007    i*86:atheos:*:*)
     1008        echo ${UNAME_MACHINE}-unknown-atheos
     1009        exit 0 ;;
     1010        i*86:syllable:*:*)
     1011        echo ${UNAME_MACHINE}-pc-syllable
     1012        exit 0 ;;
     1013    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
     1014        echo i386-unknown-lynxos${UNAME_RELEASE}
     1015        exit 0 ;;
     1016    i*86:*DOS:*:*)
     1017        echo ${UNAME_MACHINE}-pc-msdosdjgpp
     1018        exit 0 ;;
     1019    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
     1020        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
    6351021        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
    636                 echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
     1022                echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
    6371023        else
    638                 echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
     1024                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
    6391025        fi
    6401026        exit 0 ;;
    641     i?86:*:3.2:*)
     1027    i*86:*:5:[78]*)
     1028        case `/bin/uname -X | grep "^Machine"` in
     1029            *486*)           UNAME_MACHINE=i486 ;;
     1030            *Pentium)        UNAME_MACHINE=i586 ;;
     1031            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
     1032        esac
     1033        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
     1034        exit 0 ;;
     1035    i*86:*:3.2:*)
    6421036        if test -f /usr/options/cb.name; then
    6431037                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
    6441038                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
    6451039        elif /bin/uname -X 2>/dev/null >/dev/null ; then
    646                 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
    647                 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
    648                 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
     1040                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
     1041                (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
     1042                (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
    6491043                        && UNAME_MACHINE=i586
     1044                (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
     1045                        && UNAME_MACHINE=i686
     1046                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
     1047                        && UNAME_MACHINE=i686
    6501048                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
    6511049        else
    6521050                echo ${UNAME_MACHINE}-pc-sysv32
    6531051        fi
    6541052        exit 0 ;;
    6551053    pc:*:*:*)
     1054        # Left here for compatibility:
    6561055        # uname -m prints for DJGPP always 'pc', but it prints nothing about
    6571056        # the processor, so we play safe by assuming i386.
    6581057        echo i386-pc-msdosdjgpp
     
    6741073        # "miniframe"
    6751074        echo m68010-convergent-sysv
    6761075        exit 0 ;;
    677     M68*:*:R3V[567]*:*)
     1076    mc68k:UNIX:SYSTEM5:3.51m)
     1077        echo m68k-convergent-sysv
     1078        exit 0 ;;
     1079    M680?0:D-NIX:5.3:*)
     1080        echo m68k-diab-dnix
     1081        exit 0 ;;
     1082    M68*:*:R3V[5678]*:*)
    6781083        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    679     3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
     1084    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
    6801085        OS_REL=''
    6811086        test -r /etc/.relid \
    6821087        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
     
    6871092    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    6881093        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    6891094          && echo i486-ncr-sysv4 && exit 0 ;;
    690     m68*:LynxOS:2.*:*)
     1095    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    6911096        echo m68k-unknown-lynxos${UNAME_RELEASE}
    6921097        exit 0 ;;
    6931098    mc68030:UNIX_System_V:4.*:*)
    6941099        echo m68k-atari-sysv4
    6951100        exit 0 ;;
    696     i?86:LynxOS:2.*:*)
    697         echo i386-unknown-lynxos${UNAME_RELEASE}
    698         exit 0 ;;
    6991101    TSUNAMI:LynxOS:2.*:*)
    7001102        echo sparc-unknown-lynxos${UNAME_RELEASE}
    7011103        exit 0 ;;
    702     rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
     1104    rs6000:LynxOS:2.*:*)
    7031105        echo rs6000-unknown-lynxos${UNAME_RELEASE}
    7041106        exit 0 ;;
     1107    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
     1108        echo powerpc-unknown-lynxos${UNAME_RELEASE}
     1109        exit 0 ;;
    7051110    SM[BE]S:UNIX_SV:*:*)
    7061111        echo mips-dde-sysv${UNAME_RELEASE}
    7071112        exit 0 ;;
     1113    RM*:ReliantUNIX-*:*:*)
     1114        echo mips-sni-sysv4
     1115        exit 0 ;;
    7081116    RM*:SINIX-*:*:*)
    7091117        echo mips-sni-sysv4
    7101118        exit 0 ;;
     
    7161124                echo ns32k-sni-sysv
    7171125        fi
    7181126        exit 0 ;;
    719     PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    720                            # says <Richard.M.Bartel@ccMail.Census.GOV>
     1127    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
     1128                      # says <Richard.M.Bartel@ccMail.Census.GOV>
    7211129        echo i586-unisys-sysv4
    7221130        exit 0 ;;
    7231131    *:UNIX_System_V:4*:FTX*)
     
    7291137        # From seanf@swdc.stratus.com.
    7301138        echo i860-stratus-sysv4
    7311139        exit 0 ;;
     1140    *:VOS:*:*)
     1141        # From Paul.Green@stratus.com.
     1142        echo hppa1.1-stratus-vos
     1143        exit 0 ;;
    7321144    mc68*:A/UX:*:*)
    7331145        echo m68k-apple-aux${UNAME_RELEASE}
    7341146        exit 0 ;;
    735     news*:NEWS-OS:*:6*)
     1147    news*:NEWS-OS:6*:*)
    7361148        echo mips-sony-newsos6
    7371149        exit 0 ;;
    738     R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
     1150    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
    7391151        if [ -d /usr/nec ]; then
    7401152                echo mips-nec-sysv${UNAME_RELEASE}
    7411153        else
    7421154                echo mips-unknown-sysv${UNAME_RELEASE}
    7431155        fi
    7441156        exit 0 ;;
     1157    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
     1158        echo powerpc-be-beos
     1159        exit 0 ;;
     1160    BeMac:BeOS:*:*)     # BeOS running on Mac or Mac clone, PPC only.
     1161        echo powerpc-apple-beos
     1162        exit 0 ;;
     1163    BePC:BeOS:*:*)      # BeOS running on Intel PC compatible.
     1164        echo i586-pc-beos
     1165        exit 0 ;;
     1166    SX-4:SUPER-UX:*:*)
     1167        echo sx4-nec-superux${UNAME_RELEASE}
     1168        exit 0 ;;
     1169    SX-5:SUPER-UX:*:*)
     1170        echo sx5-nec-superux${UNAME_RELEASE}
     1171        exit 0 ;;
     1172    SX-6:SUPER-UX:*:*)
     1173        echo sx6-nec-superux${UNAME_RELEASE}
     1174        exit 0 ;;
     1175    Power*:Rhapsody:*:*)
     1176        echo powerpc-apple-rhapsody${UNAME_RELEASE}
     1177        exit 0 ;;
     1178    *:Rhapsody:*:*)
     1179        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
     1180        exit 0 ;;
     1181    *:Darwin:*:*)
     1182        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
     1183        case $UNAME_PROCESSOR in
     1184            *86) UNAME_PROCESSOR=i686 ;;
     1185            unknown) UNAME_PROCESSOR=powerpc ;;
     1186        esac
     1187        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
     1188        exit 0 ;;
     1189    *:procnto*:*:* | *:QNX:[0123456789]*:*)
     1190        UNAME_PROCESSOR=`uname -p`
     1191        if test "$UNAME_PROCESSOR" = "x86"; then
     1192                UNAME_PROCESSOR=i386
     1193                UNAME_MACHINE=pc
     1194        fi
     1195        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
     1196        exit 0 ;;
     1197    *:QNX:*:4*)
     1198        echo i386-pc-qnx
     1199        exit 0 ;;
     1200    NSR-?:NONSTOP_KERNEL:*:*)
     1201        echo nsr-tandem-nsk${UNAME_RELEASE}
     1202        exit 0 ;;
     1203    *:NonStop-UX:*:*)
     1204        echo mips-compaq-nonstopux
     1205        exit 0 ;;
     1206    BS2000:POSIX*:*:*)
     1207        echo bs2000-siemens-sysv
     1208        exit 0 ;;
     1209    DS/*:UNIX_System_V:*:*)
     1210        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
     1211        exit 0 ;;
     1212    *:Plan9:*:*)
     1213        # "uname -m" is not consistent, so use $cputype instead. 386
     1214        # is converted to i386 for consistency with other x86
     1215        # operating systems.
     1216        if test "$cputype" = "386"; then
     1217            UNAME_MACHINE=i386
     1218        else
     1219            UNAME_MACHINE="$cputype"
     1220        fi
     1221        echo ${UNAME_MACHINE}-unknown-plan9
     1222        exit 0 ;;
     1223    *:TOPS-10:*:*)
     1224        echo pdp10-unknown-tops10
     1225        exit 0 ;;
     1226    *:TENEX:*:*)
     1227        echo pdp10-unknown-tenex
     1228        exit 0 ;;
     1229    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
     1230        echo pdp10-dec-tops20
     1231        exit 0 ;;
     1232    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
     1233        echo pdp10-xkl-tops20
     1234        exit 0 ;;
     1235    *:TOPS-20:*:*)
     1236        echo pdp10-unknown-tops20
     1237        exit 0 ;;
     1238    *:ITS:*:*)
     1239        echo pdp10-unknown-its
     1240        exit 0 ;;
     1241    SEI:*:*:SEIUX)
     1242        echo mips-sei-seiux${UNAME_RELEASE}
     1243        exit 0 ;;
     1244    *:DragonFly:*:*)
     1245        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
     1246        exit 0 ;;
     1247    *:*VMS:*:*)
     1248        UNAME_MACHINE=`(uname -p) 2>/dev/null`
     1249        case "${UNAME_MACHINE}" in
     1250            A*) echo alpha-dec-vms && exit 0 ;;
     1251            I*) echo ia64-dec-vms && exit 0 ;;
     1252            V*) echo vax-dec-vms && exit 0 ;;
     1253        esac ;;
     1254    *:XENIX:*:SysV)
     1255        echo i386-pc-xenix
     1256        exit 0 ;;
    7451257esac
    7461258
    7471259#echo '(No uname command or uname output not recognized.)' 1>&2
    7481260#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
    7491261
    750 cat >dummy.c <<EOF
     1262eval $set_cc_for_build
     1263cat >$dummy.c <<EOF
    7511264#ifdef _SEQUENT_
    7521265# include <sys/types.h>
    7531266# include <sys/utsname.h>
     
    7851298#endif
    7861299  int version;
    7871300  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
    788   printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
     1301  if (version < 4)
     1302    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
     1303  else
     1304    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
    7891305  exit (0);
    7901306#endif
    7911307
     
    8301346#endif
    8311347
    8321348#if defined (vax)
    833 #if !defined (ultrix)
    834   printf ("vax-dec-bsd\n"); exit (0);
    835 #else
    836   printf ("vax-dec-ultrix\n"); exit (0);
    837 #endif
     1349# if !defined (ultrix)
     1350#  include <sys/param.h>
     1351#  if defined (BSD)
     1352#   if BSD == 43
     1353      printf ("vax-dec-bsd4.3\n"); exit (0);
     1354#   else
     1355#    if BSD == 199006
     1356      printf ("vax-dec-bsd4.3reno\n"); exit (0);
     1357#    else
     1358      printf ("vax-dec-bsd\n"); exit (0);
     1359#    endif
     1360#   endif
     1361#  else
     1362    printf ("vax-dec-bsd\n"); exit (0);
     1363#  endif
     1364# else
     1365    printf ("vax-dec-ultrix\n"); exit (0);
     1366# endif
    8381367#endif
    8391368
    8401369#if defined (alliant) && defined (i860)
     
    8451374}
    8461375EOF
    8471376
    848 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
    849 rm -f dummy.c dummy
     1377$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
    8501378
    8511379# Apollos put the system type in the environment.
    8521380
     
    8781406    esac
    8791407fi
    8801408
    881 #echo '(Unable to guess system type)' 1>&2
     1409cat >&2 <<EOF
     1410$0: unable to guess system type
     1411
     1412This script, last modified $timestamp, has failed to recognize
     1413the operating system you are using. It is advised that you
     1414download the most up to date version of the config scripts from
     1415
     1416    ftp://ftp.gnu.org/pub/gnu/config/
     1417
     1418If the version you run ($0) is already up to date, please
     1419send the following data and any information you think might be
     1420pertinent to <config-patches@gnu.org> in order to provide the needed
     1421information to handle your system.
     1422
     1423config.guess timestamp = $timestamp
     1424
     1425uname -m = `(uname -m) 2>/dev/null || echo unknown`
     1426uname -r = `(uname -r) 2>/dev/null || echo unknown`
     1427uname -s = `(uname -s) 2>/dev/null || echo unknown`
     1428uname -v = `(uname -v) 2>/dev/null || echo unknown`
     1429
     1430/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
     1431/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
     1432
     1433hostinfo               = `(hostinfo) 2>/dev/null`
     1434/bin/universe          = `(/bin/universe) 2>/dev/null`
     1435/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
     1436/bin/arch              = `(/bin/arch) 2>/dev/null`
     1437/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
     1438/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
     1439
     1440UNAME_MACHINE = ${UNAME_MACHINE}
     1441UNAME_RELEASE = ${UNAME_RELEASE}
     1442UNAME_SYSTEM  = ${UNAME_SYSTEM}
     1443UNAME_VERSION = ${UNAME_VERSION}
     1444EOF
    8821445
    8831446exit 1
     1447
     1448# Local variables:
     1449# eval: (add-hook 'write-file-hooks 'time-stamp)
     1450# time-stamp-start: "timestamp='"
     1451# time-stamp-format: "%:y-%02m-%02d"
     1452# time-stamp-end: "'"
     1453# End:
  • config.sub

    diff -urN jpeg.old/config.sub jpeg.dev/config.sub
    old new  
    11#! /bin/sh
    2 # Configuration validation subroutine script, version 1.1.
    3 #   Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
     2# Configuration validation subroutine script.
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     4#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
     5
     6timestamp='2004-11-30'
     7
    48# This file is (in principle) common to ALL GNU software.
    59# The presence of a machine in this file suggests that SOME GNU software
    610# can handle that machine.  It does not imply ALL GNU software can.
     
    2529# configuration script generated by Autoconf, you may include it under
    2630# the same distribution terms that you use for the rest of that program.
    2731
     32# Please send patches to <config-patches@gnu.org>.  Submit a context
     33# diff and a properly formatted ChangeLog entry.
     34#
    2835# Configuration subroutine to validate and canonicalize a configuration type.
    2936# Supply the specified configuration type as an argument.
    3037# If it is invalid, we print an error message on stderr and exit with code 1.
     
    4552#       CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
    4653# It is wrong to echo any other type of specification.
    4754
    48 if [ x$1 = x ]
    49 then
    50         echo Configuration name missing. 1>&2
    51         echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
    52         echo "or     $0 ALIAS" 1>&2
    53         echo where ALIAS is a recognized configuration type. 1>&2
    54         exit 1
    55 fi
     55me=`echo "$0" | sed -e 's,.*/,,'`
    5656
    57 # First pass through any local machine types.
    58 case $1 in
    59         *local*)
    60                 echo $1
    61                 exit 0
    62                 ;;
    63         *)
    64         ;;
     57usage="\
     58Usage: $0 [OPTION] CPU-MFR-OPSYS
     59       $0 [OPTION] ALIAS
     60
     61Canonicalize a configuration name.
     62
     63Operation modes:
     64  -h, --help         print this help, then exit
     65  -t, --time-stamp   print date of last modification, then exit
     66  -v, --version      print version number, then exit
     67
     68Report bugs and patches to <config-patches@gnu.org>."
     69
     70version="\
     71GNU config.sub ($timestamp)
     72
     73Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
     74Free Software Foundation, Inc.
     75
     76This is free software; see the source for copying conditions.  There is NO
     77warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     78
     79help="
     80Try \`$me --help' for more information."
     81
     82# Parse command line
     83while test $# -gt 0 ; do
     84  case $1 in
     85    --time-stamp | --time* | -t )
     86       echo "$timestamp" ; exit 0 ;;
     87    --version | -v )
     88       echo "$version" ; exit 0 ;;
     89    --help | --h* | -h )
     90       echo "$usage"; exit 0 ;;
     91    -- )     # Stop option processing
     92       shift; break ;;
     93    - ) # Use stdin as input.
     94       break ;;
     95    -* )
     96       echo "$me: invalid option $1$help"
     97       exit 1 ;;
     98
     99    *local*)
     100       # First pass through any local machine types.
     101       echo $1
     102       exit 0;;
     103
     104    * )
     105       break ;;
     106  esac
     107done
     108
     109case $# in
     110 0) echo "$me: missing argument$help" >&2
     111    exit 1;;
     112 1) ;;
     113 *) echo "$me: too many arguments$help" >&2
     114    exit 1;;
    65115esac
    66116
    67117# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
    68118# Here we must recognize all the valid KERNEL-OS combinations.
    69119maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    70120case $maybe_os in
    71   linux-gnu*)
     121  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
     122  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
    72123    os=-$maybe_os
    73124    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    74125    ;;
     
    94145        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
    95146        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    96147        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    97         -apple)
     148        -apple | -axis | -knuth | -cray)
    98149                os=
    99150                basic_machine=$1
    100151                ;;
     152        -sim | -cisco | -oki | -wec | -winbond)
     153                os=
     154                basic_machine=$1
     155                ;;
     156        -scout)
     157                ;;
     158        -wrs)
     159                os=-vxworks
     160                basic_machine=$1
     161                ;;
     162        -chorusos*)
     163                os=-chorusos
     164                basic_machine=$1
     165                ;;
     166        -chorusrdb)
     167                os=-chorusrdb
     168                basic_machine=$1
     169                ;;
    101170        -hiux*)
    102171                os=-hiuxwe2
    103172                ;;
    104173        -sco5)
    105                 os=sco3.2v5
     174                os=-sco3.2v5
    106175                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    107176                ;;
    108177        -sco4)
     
    121190                os=-sco3.2v2
    122191                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    123192                ;;
     193        -udk*)
     194                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     195                ;;
    124196        -isc)
    125197                os=-isc2.2
    126198                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     
    143215        -psos*)
    144216                os=-psos
    145217                ;;
     218        -mint | -mint[0-9]*)
     219                basic_machine=m68k-atari
     220                os=-mint
     221                ;;
    146222esac
    147223
    148224# Decode aliases for certain CPU-COMPANY combinations.
    149225case $basic_machine in
    150226        # Recognize the basic CPU types without company name.
    151227        # Some are omitted here because they have special meanings below.
    152         tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
    153                 | arme[lb] | pyramid | mn10200 | mn10300 \
    154                 | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
    155                 | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
    156                 | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
    157                 | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
    158                 | mipstx39 | mipstx39el \
    159                 | sparc | sparclet | sparclite | sparc64 | v850)
     228        1750a | 580 \
     229        | a29k \
     230        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
     231        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
     232        | am33_2.0 \
     233        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
     234        | c4x | clipper \
     235        | d10v | d30v | dlx | dsp16xx \
     236        | fr30 | frv \
     237        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
     238        | i370 | i860 | i960 | ia64 \
     239        | ip2k | iq2000 \
     240        | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
     241        | mips | mipsbe | mipseb | mipsel | mipsle \
     242        | mips16 \
     243        | mips64 | mips64el \
     244        | mips64vr | mips64vrel \
     245        | mips64orion | mips64orionel \
     246        | mips64vr4100 | mips64vr4100el \
     247        | mips64vr4300 | mips64vr4300el \
     248        | mips64vr5000 | mips64vr5000el \
     249        | mipsisa32 | mipsisa32el \
     250        | mipsisa32r2 | mipsisa32r2el \
     251        | mipsisa64 | mipsisa64el \
     252        | mipsisa64r2 | mipsisa64r2el \
     253        | mipsisa64sb1 | mipsisa64sb1el \
     254        | mipsisa64sr71k | mipsisa64sr71kel \
     255        | mipstx39 | mipstx39el \
     256        | mn10200 | mn10300 \
     257        | msp430 \
     258        | ns16k | ns32k \
     259        | openrisc | or32 \
     260        | pdp10 | pdp11 | pj | pjl \
     261        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
     262        | pyramid \
     263        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
     264        | sh64 | sh64le \
     265        | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
     266        | strongarm \
     267        | tahoe | thumb | tic4x | tic80 | tron \
     268        | v850 | v850e \
     269        | we32k \
     270        | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
     271        | z8k)
    160272                basic_machine=$basic_machine-unknown
    161273                ;;
     274        m6811 | m68hc11 | m6812 | m68hc12)
     275                # Motorola 68HC11/12.
     276                basic_machine=$basic_machine-unknown
     277                os=-none
     278                ;;
     279        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
     280                ;;
     281
    162282        # We use `pc' rather than `unknown'
    163283        # because (1) that's what they normally are, and
    164284        # (2) the word "unknown" tends to confuse beginning users.
    165         i[3456]86)
     285        i*86 | x86_64)
    166286          basic_machine=$basic_machine-pc
    167287          ;;
    168288        # Object if more than one company name word.
     
    171291                exit 1
    172292                ;;
    173293        # Recognize the basic CPU types with company name.
    174         vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
    175               | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
    176               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
    177               | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
    178               | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
    179               | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
    180               | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
    181               | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
    182               | sparc64-* | mips64-* | mipsel-* \
    183               | mips64el-* | mips64orion-* | mips64orionel-*  \
    184               | mipstx39-* | mipstx39el-* \
    185               | f301-*)
     294        580-* \
     295        | a29k-* \
     296        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
     297        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
     298        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
     299        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
     300        | avr-* \
     301        | bs2000-* \
     302        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
     303        | clipper-* | craynv-* | cydra-* \
     304        | d10v-* | d30v-* | dlx-* \
     305        | elxsi-* \
     306        | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
     307        | h8300-* | h8500-* \
     308        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
     309        | i*86-* | i860-* | i960-* | ia64-* \
     310        | ip2k-* | iq2000-* \
     311        | m32r-* | m32rle-* \
     312        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
     313        | m88110-* | m88k-* | maxq-* | mcore-* \
     314        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
     315        | mips16-* \
     316        | mips64-* | mips64el-* \
     317        | mips64vr-* | mips64vrel-* \
     318        | mips64orion-* | mips64orionel-* \
     319        | mips64vr4100-* | mips64vr4100el-* \
     320        | mips64vr4300-* | mips64vr4300el-* \
     321        | mips64vr5000-* | mips64vr5000el-* \
     322        | mipsisa32-* | mipsisa32el-* \
     323        | mipsisa32r2-* | mipsisa32r2el-* \
     324        | mipsisa64-* | mipsisa64el-* \
     325        | mipsisa64r2-* | mipsisa64r2el-* \
     326        | mipsisa64sb1-* | mipsisa64sb1el-* \
     327        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
     328        | mipstx39-* | mipstx39el-* \
     329        | mmix-* \
     330        | msp430-* \
     331        | none-* | np1-* | ns16k-* | ns32k-* \
     332        | orion-* \
     333        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     334        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
     335        | pyramid-* \
     336        | romp-* | rs6000-* \
     337        | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
     338        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
     339        | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
     340        | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
     341        | tahoe-* | thumb-* \
     342        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
     343        | tron-* \
     344        | v850-* | v850e-* | vax-* \
     345        | we32k-* \
     346        | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
     347        | xstormy16-* | xtensa-* \
     348        | ymp-* \
     349        | z8k-*)
    186350                ;;
    187351        # Recognize the various machine names and aliases which stand
    188352        # for a CPU type and a company and sometimes even an OS.
     353        386bsd)
     354                basic_machine=i386-unknown
     355                os=-bsd
     356                ;;
    189357        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
    190358                basic_machine=m68000-att
    191359                ;;
    192360        3b*)
    193361                basic_machine=we32k-att
    194362                ;;
     363        a29khif)
     364                basic_machine=a29k-amd
     365                os=-udi
     366                ;;
     367        abacus)
     368                basic_machine=abacus-unknown
     369                ;;
     370        adobe68k)
     371                basic_machine=m68010-adobe
     372                os=-scout
     373                ;;
    195374        alliant | fx80)
    196375                basic_machine=fx80-alliant
    197376                ;;
     
    202381                basic_machine=a29k-none
    203382                os=-bsd
    204383                ;;
     384        amd64)
     385                basic_machine=x86_64-pc
     386                ;;
     387        amd64-*)
     388                basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
     389                ;;
    205390        amdahl)
    206391                basic_machine=580-amdahl
    207392                os=-sysv
    208393                ;;
    209394        amiga | amiga-*)
    210                 basic_machine=m68k-cbm
     395                basic_machine=m68k-unknown
    211396                ;;
    212397        amigaos | amigados)
    213                 basic_machine=m68k-cbm
     398                basic_machine=m68k-unknown
    214399                os=-amigaos
    215400                ;;
    216401        amigaunix | amix)
    217                 basic_machine=m68k-cbm
     402                basic_machine=m68k-unknown
    218403                os=-sysv4
    219404                ;;
    220405        apollo68)
    221406                basic_machine=m68k-apollo
    222407                os=-sysv
    223408                ;;
     409        apollo68bsd)
     410                basic_machine=m68k-apollo
     411                os=-bsd
     412                ;;
    224413        aux)
    225414                basic_machine=m68k-apple
    226415                os=-aux
     
    229418                basic_machine=ns32k-sequent
    230419                os=-dynix
    231420                ;;
     421        c90)
     422                basic_machine=c90-cray
     423                os=-unicos
     424                ;;
    232425        convex-c1)
    233426                basic_machine=c1-convex
    234427                os=-bsd
     
    249442                basic_machine=c38-convex
    250443                os=-bsd
    251444                ;;
    252         cray | ymp)
    253                 basic_machine=ymp-cray
    254                 os=-unicos
    255                 ;;
    256         cray2)
    257                 basic_machine=cray2-cray
     445        cray | j90)
     446                basic_machine=j90-cray
    258447                os=-unicos
    259448                ;;
    260         [ctj]90-cray)
    261                 basic_machine=c90-cray
    262                 os=-unicos
     449        craynv)
     450                basic_machine=craynv-cray
     451                os=-unicosmp
     452                ;;
     453        cr16c)
     454                basic_machine=cr16c-unknown
     455                os=-elf
    263456                ;;
    264457        crds | unos)
    265458                basic_machine=m68k-crds
    266459                ;;
     460        crisv32 | crisv32-* | etraxfs*)
     461                basic_machine=crisv32-axis
     462                ;;
     463        cris | cris-* | etrax*)
     464                basic_machine=cris-axis
     465                ;;
     466        crx)
     467                basic_machine=crx-unknown
     468                os=-elf
     469                ;;
    267470        da30 | da30-*)
    268471                basic_machine=m68k-da30
    269472                ;;
    270473        decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
    271474                basic_machine=mips-dec
    272475                ;;
     476        decsystem10* | dec10*)
     477                basic_machine=pdp10-dec
     478                os=-tops10
     479                ;;
     480        decsystem20* | dec20*)
     481                basic_machine=pdp10-dec
     482                os=-tops20
     483                ;;
    273484        delta | 3300 | motorola-3300 | motorola-delta \
    274485              | 3300-motorola | delta-motorola)
    275486                basic_machine=m68k-motorola
     
    278489                basic_machine=m88k-motorola
    279490                os=-sysv3
    280491                ;;
     492        djgpp)
     493                basic_machine=i586-pc
     494                os=-msdosdjgpp
     495                ;;
    281496        dpx20 | dpx20-*)
    282497                basic_machine=rs6000-bull
    283498                os=-bosx
     
    297512        encore | umax | mmax)
    298513                basic_machine=ns32k-encore
    299514                ;;
     515        es1800 | OSE68k | ose68k | ose | OSE)
     516                basic_machine=m68k-ericsson
     517                os=-ose
     518                ;;
    300519        fx2800)
    301520                basic_machine=i860-alliant
    302521                ;;
     
    307526                basic_machine=tron-gmicro
    308527                os=-sysv
    309528                ;;
     529        go32)
     530                basic_machine=i386-pc
     531                os=-go32
     532                ;;
    310533        h3050r* | hiux*)
    311534                basic_machine=hppa1.1-hitachi
    312535                os=-hiuxwe2
     
    315538                basic_machine=h8300-hitachi
    316539                os=-hms
    317540                ;;
     541        h8300xray)
     542                basic_machine=h8300-hitachi
     543                os=-xray
     544                ;;
     545        h8500hms)
     546                basic_machine=h8500-hitachi
     547                os=-hms
     548                ;;
    318549        harris)
    319550                basic_machine=m88k-harris
    320551                os=-sysv3
     
    330561                basic_machine=m68k-hp
    331562                os=-hpux
    332563                ;;
     564        hp3k9[0-9][0-9] | hp9[0-9][0-9])
     565                basic_machine=hppa1.0-hp
     566                ;;
    333567        hp9k2[0-9][0-9] | hp9k31[0-9])
    334568                basic_machine=m68000-hp
    335569                ;;
    336570        hp9k3[2-9][0-9])
    337571                basic_machine=m68k-hp
    338572                ;;
    339         hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
     573        hp9k6[0-9][0-9] | hp6[0-9][0-9])
     574                basic_machine=hppa1.0-hp
     575                ;;
     576        hp9k7[0-79][0-9] | hp7[0-79][0-9])
     577                basic_machine=hppa1.1-hp
     578                ;;
     579        hp9k78[0-9] | hp78[0-9])
     580                # FIXME: really hppa2.0-hp
     581                basic_machine=hppa1.1-hp
     582                ;;
     583        hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
     584                # FIXME: really hppa2.0-hp
     585                basic_machine=hppa1.1-hp
     586                ;;
     587        hp9k8[0-9][13679] | hp8[0-9][13679])
    340588                basic_machine=hppa1.1-hp
    341589                ;;
    342590        hp9k8[0-9][0-9] | hp8[0-9][0-9])
     
    345593        hppa-next)
    346594                os=-nextstep3
    347595                ;;
     596        hppaosf)
     597                basic_machine=hppa1.1-hp
     598                os=-osf
     599                ;;
     600        hppro)
     601                basic_machine=hppa1.1-hp
     602                os=-proelf
     603                ;;
    348604        i370-ibm* | ibm*)
    349605                basic_machine=i370-ibm
    350                 os=-mvs
    351606                ;;
    352607# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
    353         i[3456]86v32)
     608        i*86v32)
    354609                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    355610                os=-sysv32
    356611                ;;
    357         i[3456]86v4*)
     612        i*86v4*)
    358613                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    359614                os=-sysv4
    360615                ;;
    361         i[3456]86v)
     616        i*86v)
    362617                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    363618                os=-sysv
    364619                ;;
    365         i[3456]86sol2)
     620        i*86sol2)
    366621                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    367622                os=-solaris2
    368623                ;;
     624        i386mach)
     625                basic_machine=i386-mach
     626                os=-mach
     627                ;;
     628        i386-vsta | vsta)
     629                basic_machine=i386-unknown
     630                os=-vsta
     631                ;;
    369632        iris | iris4d)
    370633                basic_machine=mips-sgi
    371634                case $os in
     
    391654                basic_machine=ns32k-utek
    392655                os=-sysv
    393656                ;;
     657        mingw32)
     658                basic_machine=i386-pc
     659                os=-mingw32
     660                ;;
    394661        miniframe)
    395662                basic_machine=m68000-convergent
    396663                ;;
    397         mipsel*-linux*)
    398                 basic_machine=mipsel-unknown
    399                 os=-linux-gnu
    400                 ;;
    401         mips*-linux*)
    402                 basic_machine=mips-unknown
    403                 os=-linux-gnu
     664        *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
     665                basic_machine=m68k-atari
     666                os=-mint
    404667                ;;
    405668        mips3*-*)
    406669                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
     
    408671        mips3*)
    409672                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    410673                ;;
     674        monitor)
     675                basic_machine=m68k-rom68k
     676                os=-coff
     677                ;;
     678        morphos)
     679                basic_machine=powerpc-unknown
     680                os=-morphos
     681                ;;
     682        msdos)
     683                basic_machine=i386-pc
     684                os=-msdos
     685                ;;
     686        mvs)
     687                basic_machine=i370-ibm
     688                os=-mvs
     689                ;;
    411690        ncr3000)
    412691                basic_machine=i486-ncr
    413692                os=-sysv4
    414693                ;;
     694        netbsd386)
     695                basic_machine=i386-unknown
     696                os=-netbsd
     697                ;;
     698        netwinder)
     699                basic_machine=armv4l-rebel
     700                os=-linux
     701                ;;
    415702        news | news700 | news800 | news900)
    416703                basic_machine=m68k-sony
    417704                os=-newsos
     
    424711                basic_machine=mips-sony
    425712                os=-newsos
    426713                ;;
     714        necv70)
     715                basic_machine=v70-nec
     716                os=-sysv
     717                ;;
    427718        next | m*-next )
    428719                basic_machine=m68k-next
    429720                case $os in
     
    449740                basic_machine=i960-intel
    450741                os=-nindy
    451742                ;;
     743        mon960)
     744                basic_machine=i960-intel
     745                os=-mon960
     746                ;;
     747        nonstopux)
     748                basic_machine=mips-compaq
     749                os=-nonstopux
     750                ;;
    452751        np1)
    453752                basic_machine=np1-gould
    454753                ;;
     754        nsr-tandem)
     755                basic_machine=nsr-tandem
     756                ;;
     757        op50n-* | op60c-*)
     758                basic_machine=hppa1.1-oki
     759                os=-proelf
     760                ;;
     761        or32 | or32-*)
     762                basic_machine=or32-unknown
     763                os=-coff
     764                ;;
     765        os400)
     766                basic_machine=powerpc-ibm
     767                os=-os400
     768                ;;
     769        OSE68000 | ose68000)
     770                basic_machine=m68000-ericsson
     771                os=-ose
     772                ;;
     773        os68k)
     774                basic_machine=m68k-none
     775                os=-os68k
     776                ;;
    455777        pa-hitachi)
    456778                basic_machine=hppa1.1-hitachi
    457779                os=-hiuxwe2
     
    466788        pbb)
    467789                basic_machine=m68k-tti
    468790                ;;
    469         pc532 | pc532-*)
     791        pc532 | pc532-*)
    470792                basic_machine=ns32k-pc532
    471793                ;;
    472         pentium | p5)
    473                 basic_machine=i586-intel
     794        pentium | p5 | k5 | k6 | nexgen | viac3)
     795                basic_machine=i586-pc
     796                ;;
     797        pentiumpro | p6 | 6x86 | athlon | athlon_*)
     798                basic_machine=i686-pc
    474799                ;;
    475         pentiumpro | p6)
    476                 basic_machine=i686-intel
     800        pentiumii | pentium2 | pentiumiii | pentium3)
     801                basic_machine=i686-pc
    477802                ;;
    478         pentium-* | p5-*)
     803        pentium4)
     804                basic_machine=i786-pc
     805                ;;
     806        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
    479807                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
    480808                ;;
    481         pentiumpro-* | p6-*)
     809        pentiumpro-* | p6-* | 6x86-* | athlon-*)
     810                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
     811                ;;
     812        pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
    482813                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    483814                ;;
    484         k5)
    485                 # We don't have specific support for AMD's K5 yet, so just call it a Pentium
    486                 basic_machine=i586-amd
    487                 ;;
    488         nexen)
    489                 # We don't have specific support for Nexgen yet, so just call it a Pentium
    490                 basic_machine=i586-nexgen
     815        pentium4-*)
     816                basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
    491817                ;;
    492818        pn)
    493819                basic_machine=pn-gould
    494820                ;;
    495         power)  basic_machine=rs6000-ibm
     821        power)  basic_machine=power-ibm
    496822                ;;
    497823        ppc)    basic_machine=powerpc-unknown
    498                 ;;
     824                ;;
    499825        ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
    500826                ;;
    501827        ppcle | powerpclittle | ppc-le | powerpc-little)
    502828                basic_machine=powerpcle-unknown
    503                 ;;
     829                ;;
    504830        ppcle-* | powerpclittle-*)
    505831                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
    506832                ;;
     833        ppc64)  basic_machine=powerpc64-unknown
     834                ;;
     835        ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
     836                ;;
     837        ppc64le | powerpc64little | ppc64-le | powerpc64-little)
     838                basic_machine=powerpc64le-unknown
     839                ;;
     840        ppc64le-* | powerpc64little-*)
     841                basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
     842                ;;
    507843        ps2)
    508844                basic_machine=i386-ibm
    509845                ;;
     846        pw32)
     847                basic_machine=i586-unknown
     848                os=-pw32
     849                ;;
     850        rom68k)
     851                basic_machine=m68k-rom68k
     852                os=-coff
     853                ;;
    510854        rm[46]00)
    511855                basic_machine=mips-siemens
    512856                ;;
    513857        rtpc | rtpc-*)
    514858                basic_machine=romp-ibm
    515859                ;;
     860        s390 | s390-*)
     861                basic_machine=s390-ibm
     862                ;;
     863        s390x | s390x-*)
     864                basic_machine=s390x-ibm
     865                ;;
     866        sa29200)
     867                basic_machine=a29k-amd
     868                os=-udi
     869                ;;
     870        sb1)
     871                basic_machine=mipsisa64sb1-unknown
     872                ;;
     873        sb1el)
     874                basic_machine=mipsisa64sb1el-unknown
     875                ;;
     876        sei)
     877                basic_machine=mips-sei
     878                os=-seiux
     879                ;;
    516880        sequent)
    517881                basic_machine=i386-sequent
    518882                ;;
     
    520884                basic_machine=sh-hitachi
    521885                os=-hms
    522886                ;;
     887        sh64)
     888                basic_machine=sh64-unknown
     889                ;;
     890        sparclite-wrs | simso-wrs)
     891                basic_machine=sparclite-wrs
     892                os=-vxworks
     893                ;;
    523894        sps7)
    524895                basic_machine=m68k-bull
    525896                os=-sysv2
     
    527898        spur)
    528899                basic_machine=spur-unknown
    529900                ;;
     901        st2000)
     902                basic_machine=m68k-tandem
     903                ;;
     904        stratus)
     905                basic_machine=i860-stratus
     906                os=-sysv4
     907                ;;
    530908        sun2)
    531909                basic_machine=m68000-sun
    532910                ;;
     
    567945        sun386 | sun386i | roadrunner)
    568946                basic_machine=i386-sun
    569947                ;;
     948        sv1)
     949                basic_machine=sv1-cray
     950                os=-unicos
     951                ;;
    570952        symmetry)
    571953                basic_machine=i386-sequent
    572954                os=-dynix
    573955                ;;
     956        t3e)
     957                basic_machine=alphaev5-cray
     958                os=-unicos
     959                ;;
     960        t90)
     961                basic_machine=t90-cray
     962                os=-unicos
     963                ;;
     964        tic54x | c54x*)
     965                basic_machine=tic54x-unknown
     966                os=-coff
     967                ;;
     968        tic55x | c55x*)
     969                basic_machine=tic55x-unknown
     970                os=-coff
     971                ;;
     972        tic6x | c6x*)
     973                basic_machine=tic6x-unknown
     974                os=-coff
     975                ;;
    574976        tx39)
    575977                basic_machine=mipstx39-unknown
    576978                ;;
    577979        tx39el)
    578980                basic_machine=mipstx39el-unknown
    579981                ;;
     982        toad1)
     983                basic_machine=pdp10-xkl
     984                os=-tops20
     985                ;;
    580986        tower | tower-32)
    581987                basic_machine=m68k-ncr
    582988                ;;
     989        tpf)
     990                basic_machine=s390x-ibm
     991                os=-tpf
     992                ;;
    583993        udi29k)
    584994                basic_machine=a29k-amd
    585995                os=-udi
     
    588998                basic_machine=a29k-nyu
    589999                os=-sym1
    5901000                ;;
     1001        v810 | necv810)
     1002                basic_machine=v810-nec
     1003                os=-none
     1004                ;;
    5911005        vaxv)
    5921006                basic_machine=vax-dec
    5931007                os=-sysv
     
    5971011                os=-vms
    5981012                ;;
    5991013        vpp*|vx|vx-*)
    600                basic_machine=f301-fujitsu
    601                ;;
     1014                basic_machine=f301-fujitsu
     1015                ;;
    6021016        vxworks960)
    6031017                basic_machine=i960-wrs
    6041018                os=-vxworks
     
    6111025                basic_machine=a29k-wrs
    6121026                os=-vxworks
    6131027                ;;
    614         xmp)
    615                 basic_machine=xmp-cray
    616                 os=-unicos
     1028        w65*)
     1029                basic_machine=w65-wdc
     1030                os=-none
     1031                ;;
     1032        w89k-*)
     1033                basic_machine=hppa1.1-winbond
     1034                os=-proelf
     1035                ;;
     1036        xbox)
     1037                basic_machine=i686-pc
     1038                os=-mingw32
    6171039                ;;
    618         xps | xps100)
     1040        xps | xps100)
    6191041                basic_machine=xps100-honeywell
    6201042                ;;
     1043        ymp)
     1044                basic_machine=ymp-cray
     1045                os=-unicos
     1046                ;;
     1047        z8k-*-coff)
     1048                basic_machine=z8k-unknown
     1049                os=-sim
     1050                ;;
    6211051        none)
    6221052                basic_machine=none-none
    6231053                os=-none
     
    6251055
    6261056# Here we handle the default manufacturer of certain CPU types.  It is in
    6271057# some cases the only manufacturer, in others, it is the most popular.
    628         mips)
    629                 if [ x$os = x-linux-gnu ]; then
    630                         basic_machine=mips-unknown
    631                 else
    632                         basic_machine=mips-mips
    633                 fi
     1058        w89k)
     1059                basic_machine=hppa1.1-winbond
     1060                ;;
     1061        op50n)
     1062                basic_machine=hppa1.1-oki
     1063                ;;
     1064        op60c)
     1065                basic_machine=hppa1.1-oki
    6341066                ;;
    6351067        romp)
    6361068                basic_machine=romp-ibm
    6371069                ;;
     1070        mmix)
     1071                basic_machine=mmix-knuth
     1072                ;;
    6381073        rs6000)
    6391074                basic_machine=rs6000-ibm
    6401075                ;;
    6411076        vax)
    6421077                basic_machine=vax-dec
    6431078                ;;
     1079        pdp10)
     1080                # there are many clones, so DEC is not a safe bet
     1081                basic_machine=pdp10-unknown
     1082                ;;
    6441083        pdp11)
    6451084                basic_machine=pdp11-dec
    6461085                ;;
    6471086        we32k)
    6481087                basic_machine=we32k-att
    6491088                ;;
    650         sparc)
     1089        sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
     1090                basic_machine=sh-unknown
     1091                ;;
     1092        sh64)
     1093                basic_machine=sh64-unknown
     1094                ;;
     1095        sparc | sparcv8 | sparcv9 | sparcv9b)
    6511096                basic_machine=sparc-sun
    6521097                ;;
    653         cydra)
     1098        cydra)
    6541099                basic_machine=cydra-cydrome
    6551100                ;;
    6561101        orion)
     
    6591104        orion105)
    6601105                basic_machine=clipper-highlevel
    6611106                ;;
     1107        mac | mpw | mac-mpw)
     1108                basic_machine=m68k-apple
     1109                ;;
     1110        pmac | pmac-mpw)
     1111                basic_machine=powerpc-apple
     1112                ;;
     1113        *-unknown)
     1114                # Make sure to match an already-canonicalized machine name.
     1115                ;;
    6621116        *)
    6631117                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
    6641118                exit 1
     
    7111165              | -aos* \
    7121166              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    7131167              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    714               | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
    715               | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
     1168              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
     1169              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
     1170              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    7161171              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    7171172              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    718               | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    719               | -mingw32* | -linux-gnu* | -uxpv*)
     1173              | -chorusos* | -chorusrdb* \
     1174              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
     1175              | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
     1176              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
     1177              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
     1178              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
     1179              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
     1180              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
     1181              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
    7201182        # Remember, each alternative MUST END IN *, to match a version number.
    7211183                ;;
     1184        -qnx*)
     1185                case $basic_machine in
     1186                    x86-* | i*86-*)
     1187                        ;;
     1188                    *)
     1189                        os=-nto$os
     1190                        ;;
     1191                esac
     1192                ;;
     1193        -nto-qnx*)
     1194                ;;
     1195        -nto*)
     1196                os=`echo $os | sed -e 's|nto|nto-qnx|'`
     1197                ;;
     1198        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
     1199              | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
     1200              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
     1201                ;;
     1202        -mac*)
     1203                os=`echo $os | sed -e 's|mac|macos|'`
     1204                ;;
     1205        -linux-dietlibc)
     1206                os=-linux-dietlibc
     1207                ;;
    7221208        -linux*)
    7231209                os=`echo $os | sed -e 's|linux|linux-gnu|'`
    7241210                ;;
     
    7281214        -sunos6*)
    7291215                os=`echo $os | sed -e 's|sunos6|solaris3|'`
    7301216                ;;
     1217        -opened*)
     1218                os=-openedition
     1219                ;;
     1220        -os400*)
     1221                os=-os400
     1222                ;;
     1223        -wince*)
     1224                os=-wince
     1225                ;;
    7311226        -osfrose*)
    7321227                os=-osfrose
    7331228                ;;
     
    7431238        -acis*)
    7441239                os=-aos
    7451240                ;;
     1241        -atheos*)
     1242                os=-atheos
     1243                ;;
     1244        -syllable*)
     1245                os=-syllable
     1246                ;;
     1247        -386bsd)
     1248                os=-bsd
     1249                ;;
    7461250        -ctix* | -uts*)
    7471251                os=-sysv
    7481252                ;;
     1253        -nova*)
     1254                os=-rtmk-nova
     1255                ;;
    7491256        -ns2 )
    750                 os=-nextstep2
     1257                os=-nextstep2
     1258                ;;
     1259        -nsk*)
     1260                os=-nsk
    7511261                ;;
    7521262        # Preserve the version number of sinix5.
    7531263        -sinix5.*)
     
    7561266        -sinix*)
    7571267                os=-sysv4
    7581268                ;;
     1269        -tpf*)
     1270                os=-tpf
     1271                ;;
    7591272        -triton*)
    7601273                os=-sysv3
    7611274                ;;
     
    7741287        # This must come after -sysvr4.
    7751288        -sysv*)
    7761289                ;;
     1290        -ose*)
     1291                os=-ose
     1292                ;;
     1293        -es1800*)
     1294                os=-ose
     1295                ;;
    7771296        -xenix)
    7781297                os=-xenix
    7791298                ;;
     1299        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
     1300                os=-mint
     1301                ;;
     1302        -aros*)
     1303                os=-aros
     1304                ;;
     1305        -kaos*)
     1306                os=-kaos
     1307                ;;
     1308        -zvmoe)
     1309                os=-zvmoe
     1310                ;;
    7801311        -none)
    7811312                ;;
    7821313        *)
     
    8021333        *-acorn)
    8031334                os=-riscix1.2
    8041335                ;;
     1336        arm*-rebel)
     1337                os=-linux
     1338                ;;
    8051339        arm*-semi)
    8061340                os=-aout
    8071341                ;;
    808         pdp11-*)
     1342    c4x-* | tic4x-*)
     1343        os=-coff
     1344        ;;
     1345        # This must come before the *-dec entry.
     1346        pdp10-*)
     1347                os=-tops20
     1348                ;;
     1349        pdp11-*)
    8091350                os=-none
    8101351                ;;
    8111352        *-dec | vax-*)
     
    8231364                # default.
    8241365                # os=-sunos4
    8251366                ;;
     1367        m68*-cisco)
     1368                os=-aout
     1369                ;;
     1370        mips*-cisco)
     1371                os=-elf
     1372                ;;
     1373        mips*-*)
     1374                os=-elf
     1375                ;;
     1376        or32-*)
     1377                os=-coff
     1378                ;;
    8261379        *-tti)  # must be before sparc entry or we get the wrong os.
    8271380                os=-sysv3
    8281381                ;;
    8291382        sparc-* | *-sun)
    8301383                os=-sunos4.1.1
    8311384                ;;
     1385        *-be)
     1386                os=-beos
     1387                ;;
    8321388        *-ibm)
    8331389                os=-aix
    8341390                ;;
     1391        *-knuth)
     1392                os=-mmixware
     1393                ;;
     1394        *-wec)
     1395                os=-proelf
     1396                ;;
     1397        *-winbond)
     1398                os=-proelf
     1399                ;;
     1400        *-oki)
     1401                os=-proelf
     1402                ;;
    8351403        *-hp)
    8361404                os=-hpux
    8371405                ;;
     
    8741442        *-next)
    8751443                os=-nextstep3
    8761444                ;;
    877         *-gould)
     1445        *-gould)
    8781446                os=-sysv
    8791447                ;;
    880         *-highlevel)
     1448        *-highlevel)
    8811449                os=-bsd
    8821450                ;;
    8831451        *-encore)
    8841452                os=-bsd
    8851453                ;;
    886         *-sgi)
     1454        *-sgi)
    8871455                os=-irix
    8881456                ;;
    889         *-siemens)
     1457        *-siemens)
    8901458                os=-sysv4
    8911459                ;;
    8921460        *-masscomp)
    8931461                os=-rtu
    8941462                ;;
    895         f301-fujitsu)
     1463        f30[01]-fujitsu | f700-fujitsu)
    8961464                os=-uxpv
    8971465                ;;
     1466        *-rom68k)
     1467                os=-coff
     1468                ;;
     1469        *-*bug)
     1470                os=-coff
     1471                ;;
     1472        *-apple)
     1473                os=-macos
     1474                ;;
     1475        *-atari*)
     1476                os=-mint
     1477                ;;
    8981478        *)
    8991479                os=-none
    9001480                ;;
     
    9161496                        -aix*)
    9171497                                vendor=ibm
    9181498                                ;;
     1499                        -beos*)
     1500                                vendor=be
     1501                                ;;
    9191502                        -hpux*)
    9201503                                vendor=hp
    9211504                                ;;
     1505                        -mpeix*)
     1506                                vendor=hp
     1507                                ;;
    9221508                        -hiux*)
    9231509                                vendor=hitachi
    9241510                                ;;
     
    9341520                        -genix*)
    9351521                                vendor=ns
    9361522                                ;;
    937                         -mvs*)
     1523                        -mvs* | -opened*)
     1524                                vendor=ibm
     1525                                ;;
     1526                        -os400*)
    9381527                                vendor=ibm
    9391528                                ;;
    9401529                        -ptx*)
    9411530                                vendor=sequent
    9421531                                ;;
    943                         -vxsim* | -vxworks*)
     1532                        -tpf*)
     1533                                vendor=ibm
     1534                                ;;
     1535                        -vxsim* | -vxworks* | -windiss*)
    9441536                                vendor=wrs
    9451537                                ;;
    9461538                        -aux*)
    9471539                                vendor=apple
    9481540                                ;;
     1541                        -hms*)
     1542                                vendor=hitachi
     1543                                ;;
     1544                        -mpw* | -macos*)
     1545                                vendor=apple
     1546                                ;;
     1547                        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
     1548                                vendor=atari
     1549                                ;;
     1550                        -vos*)
     1551                                vendor=stratus
     1552                                ;;
    9491553                esac
    9501554                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
    9511555                ;;
    9521556esac
    9531557
    9541558echo $basic_machine$os
     1559exit 0
     1560
     1561# Local variables:
     1562# eval: (add-hook 'write-file-hooks 'time-stamp)
     1563# time-stamp-start: "timestamp='"
     1564# time-stamp-format: "%:y-%02m-%02d"
     1565# time-stamp-end: "'"
     1566# End:
Note: See TracBrowser for help on using the repository browser.