source: scripts/untested/blfs-patches/libfame-0.9.1-update_gnu_config-1.patch @ fd5b1fe

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since fd5b1fe was fd5b1fe, checked in by Jim Gifford <clfs@…>, 18 years ago

r588@server (orig r586): ryan | 2005-08-05 22:47:43 -0700
Add pile of new patches for blfs packages



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

    diff -uNr libfame-0.9.1/config.guess libfame-0.9.1-mod/config.guess
    old new  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
    4 #   Free Software Foundation, Inc.
    5 #
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     4#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
     5
     6timestamp='2005-04-22'
     7
    68# This file is free software; you can redistribute it and/or modify it
    79# under the terms of the GNU General Public License as published by
    810# the Free Software Foundation; either version 2 of the License, or
     
    2224# configuration script generated by Autoconf, you may include it under
    2325# the same distribution terms that you use for the rest of that program.
    2426
    25 # Written by Per Bothner <bothner@cygnus.com>.
    26 # The master version of this file is at the FSF in /home/gd/gnu/lib.
    27 # Please send patches to <autoconf-patches@gnu.org>.
     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.
    2830#
    2931# This script attempts to guess a canonical system name similar to
    3032# config.sub.  If it succeeds, it prints the system name on stdout, and
    3133# exits with 0.  Otherwise, it exits with 1.
    3234#
    3335# The plan is that this can be called by configure scripts if you
    34 # don't specify an explicit system type (host/target name).
    35 #
    36 # Only a few systems have been added to this list; please add others
    37 # (but try to keep the structure clean).
    38 #
     36# don't specify an explicit build system type.
    3937
    40 # Use $HOST_CC if defined. $CC may point to a cross-compiler
    41 if test x"$CC_FOR_BUILD" = x; then
    42   if test x"$HOST_CC" != x; then
    43     CC_FOR_BUILD="$HOST_CC"
    44   else
    45     if test x"$CC" != x; then
    46       CC_FOR_BUILD="$CC"
    47     else
    48       CC_FOR_BUILD=cc
    49     fi
    50   fi
     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, 2005
     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
    5189fi
    5290
     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 ;'
    53127
    54128# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
    55 # (ghazi@noc.rutgers.edu 8/24/94.)
     129# (ghazi@noc.rutgers.edu 1994-08-24)
    56130if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
    57131        PATH=$PATH:/.attbin ; export PATH
    58132fi
    59133
    60134UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
    61135UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
    62 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
     136UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    63137UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    64138
    65 dummy=dummy-$$
    66 trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
    67 
    68139# Note: order is significant - the case branches are not exclusive.
    69140
    70141case "${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 ;;
    71248    alpha:OSF1:*:*)
    72         if test $UNAME_RELEASE = "V4.0"; then
     249        case $UNAME_RELEASE in
     250        *4.0)
    73251                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    74         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.
    75295        # A Vn.n version is a released version.
    76296        # A Tn.n version is a released field test version.
    77297        # A Xn.n version is an unreleased experimental baselevel.
    78298        # 1.2 uses "1.2" for uname -r.
    79         cat <<EOF >$dummy.s
    80         .globl main
    81         .ent main
    82 main:
    83         .frame \$30,0,\$26,0
    84         .prologue 0
    85         .long 0x47e03d80 # implver $0
    86         lda \$2,259
    87         .long 0x47e20c21 # amask $2,$1
    88         srl \$1,8,\$2
    89         sll \$2,2,\$2
    90         sll \$0,3,\$0
    91         addl \$1,\$0,\$0
    92         addl \$2,\$0,\$0
    93         ret \$31,(\$26),1
    94         .end main
    95 EOF
    96         $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
    97         if test "$?" = 0 ; then
    98                 ./$dummy
    99                 case "$?" in
    100                         7)
    101                                 UNAME_MACHINE="alpha"
    102                                 ;;
    103                         15)
    104                                 UNAME_MACHINE="alphaev5"
    105                                 ;;
    106                         14)
    107                                 UNAME_MACHINE="alphaev56"
    108                                 ;;
    109                         10)
    110                                 UNAME_MACHINE="alphapca56"
    111                                 ;;
    112                         16)
    113                                 UNAME_MACHINE="alphaev6"
    114                                 ;;
    115                 esac
    116         fi
    117         rm -f $dummy.s $dummy
    118         echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     299        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    119300        exit 0 ;;
    120301    Alpha\ *:Windows_NT*:*)
    121302        # How do we know it's Interix rather than the generic POSIX subsystem?
     
    127308        echo alpha-dec-winnt3.5
    128309        exit 0 ;;
    129310    Amiga*:UNIX_System_V:4.0:*)
    130         echo m68k-cbm-sysv4
     311        echo m68k-unknown-sysv4
    131312        exit 0;;
    132     amiga:NetBSD:*:*)
    133       echo m68k-cbm-netbsd${UNAME_RELEASE}
    134       exit 0 ;;
    135     amiga:OpenBSD:*:*)
    136         echo m68k-unknown-openbsd${UNAME_RELEASE}
    137         exit 0 ;;
    138313    *:[Aa]miga[Oo][Ss]:*:*)
    139314        echo ${UNAME_MACHINE}-unknown-amigaos
    140315        exit 0 ;;
    141     arc64:OpenBSD:*:*)
    142         echo mips64el-unknown-openbsd${UNAME_RELEASE}
    143         exit 0 ;;
    144     arc:OpenBSD:*:*)
    145         echo mipsel-unknown-openbsd${UNAME_RELEASE}
    146         exit 0 ;;
    147     hkmips:OpenBSD:*:*)
    148         echo mips-unknown-openbsd${UNAME_RELEASE}
    149         exit 0 ;;
    150     pmax:OpenBSD:*:*)
    151         echo mipsel-unknown-openbsd${UNAME_RELEASE}
    152         exit 0 ;;
    153     sgi:OpenBSD:*:*)
    154         echo mips-unknown-openbsd${UNAME_RELEASE}
    155         exit 0 ;;
    156     wgrisc:OpenBSD:*:*)
    157         echo mipsel-unknown-openbsd${UNAME_RELEASE}
     316    *:[Mm]orph[Oo][Ss]:*:*)
     317        echo ${UNAME_MACHINE}-unknown-morphos
    158318        exit 0 ;;
    159319    *:OS/390:*:*)
    160320        echo i370-ibm-openedition
    161321        exit 0 ;;
     322    *:z/VM:*:*)
     323        echo s390-ibm-zvmoe
     324        exit 0 ;;
     325    *:OS400:*:*)
     326        echo powerpc-ibm-os400
     327        exit 0 ;;
    162328    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    163329        echo arm-acorn-riscix${UNAME_RELEASE}
    164330        exit 0;;
    165     arm32:NetBSD:*:*)
    166         echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
    167         exit 0 ;;
    168     SR2?01:HI-UX/MPP:*:*)
     331    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    169332        echo hppa1.1-hitachi-hiuxmpp
    170333        exit 0;;
    171334    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
     
    179342    NILE*:*:*:dcosx)
    180343        echo pyramid-pyramid-svr4
    181344        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 ;;
    182352    sun4H:SunOS:5.*:*)
    183353        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    184354        exit 0 ;;
     
    207377        echo m68k-sun-sunos${UNAME_RELEASE}
    208378        exit 0 ;;
    209379    sun*:*:4.2BSD:*)
    210         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`
    211381        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
    212382        case "`/bin/arch`" in
    213383            sun3)
     
    221391    aushp:SunOS:*:*)
    222392        echo sparc-auspex-sunos${UNAME_RELEASE}
    223393        exit 0 ;;
    224     atari*:NetBSD:*:*)
    225         echo m68k-atari-netbsd${UNAME_RELEASE}
    226         exit 0 ;;
    227     atari*:OpenBSD:*:*)
    228         echo m68k-unknown-openbsd${UNAME_RELEASE}
    229         exit 0 ;;
    230394    # The situation for MiNT is a little confusing.  The machine name
    231395    # can be virtually everything (everything which is not
    232     # "atarist" or "atariste" at least should have a processor 
     396    # "atarist" or "atariste" at least should have a processor
    233397    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
    234398    # to the lowercase version "mint" (or "freemint").  Finally
    235399    # the system name "TOS" denotes a system which is actually not
     
    253417    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    254418        echo m68k-unknown-mint${UNAME_RELEASE}
    255419        exit 0 ;;
    256     sun3*:NetBSD:*:*)
    257         echo m68k-sun-netbsd${UNAME_RELEASE}
    258         exit 0 ;;
    259     sun3*:OpenBSD:*:*)
    260         echo m68k-unknown-openbsd${UNAME_RELEASE}
    261         exit 0 ;;
    262     mac68k:NetBSD:*:*)
    263         echo m68k-apple-netbsd${UNAME_RELEASE}
    264         exit 0 ;;
    265     mac68k:OpenBSD:*:*)
    266         echo m68k-unknown-openbsd${UNAME_RELEASE}
    267         exit 0 ;;
    268     mvme68k:OpenBSD:*:*)
    269         echo m68k-unknown-openbsd${UNAME_RELEASE}
    270         exit 0 ;;
    271     mvme88k:OpenBSD:*:*)
    272         echo m88k-unknown-openbsd${UNAME_RELEASE}
     420    m68k:machten:*:*)
     421        echo m68k-apple-machten${UNAME_RELEASE}
    273422        exit 0 ;;
    274423    powerpc:machten:*:*)
    275424        echo powerpc-apple-machten${UNAME_RELEASE}
    276425        exit 0 ;;
    277     macppc:NetBSD:*:*)
    278         echo powerpc-apple-netbsd${UNAME_RELEASE}
    279         exit 0 ;;
    280426    RISC*:Mach:*:*)
    281427        echo mips-dec-mach_bsd4.3
    282428        exit 0 ;;
     
    290436        echo clipper-intergraph-clix${UNAME_RELEASE}
    291437        exit 0 ;;
    292438    mips:*:*:UMIPS | mips:*:*:RISCos)
     439        eval $set_cc_for_build
    293440        sed 's/^        //' << EOF >$dummy.c
    294441#ifdef __cplusplus
     442#include <stdio.h>  /* for printf() prototype */
    295443        int main (int argc, char *argv[]) {
    296444#else
    297445        int main (argc, argv) int argc; char *argv[]; {
     
    310458          exit (-1);
    311459        }
    312460EOF
    313         $CC_FOR_BUILD $dummy.c -o $dummy \
    314           && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
    315           && rm $dummy.c $dummy && exit 0
    316         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
    317464        echo mips-mips-riscos${UNAME_RELEASE}
    318465        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 ;;
    319475    Night_Hawk:Power_UNIX:*:*)
    320476        echo powerpc-harris-powerunix
    321477        exit 0 ;;
     
    331487    AViiON:dgux:*:*)
    332488        # DG/UX returns AViiON for all architectures
    333489        UNAME_PROCESSOR=`/usr/bin/uname -p`
    334         if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
     490        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
    335491        then
    336492            if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
    337493               [ ${TARGET_BINARY_INTERFACE}x = x ]
     
    363519    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    364520        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
    365521        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
    366     i?86:AIX:*:*)
     522    i*86:AIX:*:*)
    367523        echo i386-ibm-aix
    368524        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 ;;
    369533    *:AIX:2:3)
    370534        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
     535                eval $set_cc_for_build
    371536                sed 's/^                //' << EOF >$dummy.c
    372537                #include <sys/systemcfg.h>
    373538
     
    379544                        exit(0);
    380545                        }
    381546EOF
    382                 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
    383                 rm -f $dummy.c $dummy
     547                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    384548                echo rs6000-ibm-aix3.2.5
    385549        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
    386550                echo rs6000-ibm-aix3.2.4
     
    388552                echo rs6000-ibm-aix3.2
    389553        fi
    390554        exit 0 ;;
    391     *:AIX:*:4)
    392         IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
    393         if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | 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
    394558                IBM_ARCH=rs6000
    395559        else
    396560                IBM_ARCH=powerpc
     
    398562        if [ -x /usr/bin/oslevel ] ; then
    399563                IBM_REV=`/usr/bin/oslevel`
    400564        else
    401                 IBM_REV=4.${UNAME_RELEASE}
     565                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    402566        fi
    403567        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
    404568        exit 0 ;;
     
    408572    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
    409573        echo romp-ibm-bsd4.4
    410574        exit 0 ;;
    411     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
     575    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    412576        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    413577        exit 0 ;;                           # report: romp-ibm BSD 4.3
    414578    *:BOSX:*:*)
     
    424588        echo m68k-hp-bsd4.4
    425589        exit 0 ;;
    426590    9000/[34678]??:HP-UX:*:*)
     591        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    427592        case "${UNAME_MACHINE}" in
    428593            9000/31? )            HP_ARCH=m68000 ;;
    429594            9000/[34]?? )         HP_ARCH=m68k ;;
    430595            9000/[678][0-9][0-9])
    431               sed 's/^              //' << EOF >$dummy.c
     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
    432615              #include <stdlib.h>
    433616              #include <unistd.h>
    434617
     
    459642                  exit (0);
    460643              }
    461644EOF
    462         (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
    463         rm -f $dummy.c $dummy
     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 ;;
    464648        esac
    465         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
    466660        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    467661        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 ;;
    468666    3050*:HI-UX:*:*)
     667        eval $set_cc_for_build
    469668        sed 's/^        //' << EOF >$dummy.c
    470669        #include <unistd.h>
    471670        int
     
    491690          exit (0);
    492691        }
    493692EOF
    494         $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
    495         rm -f $dummy.c $dummy
     693        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    496694        echo unknown-hitachi-hiuxwe2
    497695        exit 0 ;;
    498696    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
     
    501699    9000/8??:4.3bsd:*:*)
    502700        echo hppa1.0-hp-bsd
    503701        exit 0 ;;
    504     *9??*:MPE/iX:*:*)
     702    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    505703        echo hppa1.0-hp-mpeix
    506704        exit 0 ;;
    507705    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
     
    510708    hp8??:OSF1:*:*)
    511709        echo hppa1.0-hp-osf
    512710        exit 0 ;;
    513     i?86:OSF1:*:*)
     711    i*86:OSF1:*:*)
    514712        if [ -x /usr/sbin/sysversion ] ; then
    515713            echo ${UNAME_MACHINE}-unknown-osf1mk
    516714        else
     
    520718    parisc*:Lites*:*:*)
    521719        echo hppa1.1-hp-lites
    522720        exit 0 ;;
    523     hppa*:OpenBSD:*:*)
    524         echo hppa-unknown-openbsd
    525         exit 0 ;;
    526721    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
    527722        echo c1-convex-bsd
    528723        exit 0 ;;
     
    541736    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    542737        echo c4-convex-bsd
    543738        exit 0 ;;
    544     CRAY*X-MP:*:*:*)
    545         echo xmp-cray-unicos
    546         exit 0 ;;
    547739    CRAY*Y-MP:*:*:*)
    548         echo ymp-cray-unicos${UNAME_RELEASE}
     740        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    549741        exit 0 ;;
    550742    CRAY*[A-Z]90:*:*:*)
    551743        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
    552744        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
    553               -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
     745              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
     746              -e 's/\.[^.]*$/.X/'
    554747        exit 0 ;;
    555748    CRAY*TS:*:*:*)
    556         echo t90-cray-unicos${UNAME_RELEASE}
     749        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    557750        exit 0 ;;
    558751    CRAY*T3E:*:*:*)
    559         echo alpha-cray-unicosmk${UNAME_RELEASE}
     752        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    560753        exit 0 ;;
    561     CRAY-2:*:*:*)
    562         echo cray2-cray-unicos
    563         exit 0 ;;
    564     F300:UNIX_System_V:*:*)
     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'`
    565762        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    566763        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    567         echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     764        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    568765        exit 0 ;;
    569     F301:UNIX_System_V:*:*)
    570        echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
    571        exit 0 ;;
    572     hp3[0-9][05]:NetBSD:*:*)
    573         echo m68k-hp-netbsd${UNAME_RELEASE}
    574         exit 0 ;;
    575     hp300:OpenBSD:*:*)
    576         echo m68k-unknown-openbsd${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}"
    577770        exit 0 ;;
    578     i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
     771    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    579772        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    580773        exit 0 ;;
    581774    sparc*:BSD/OS:*:*)
     
    585778        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    586779        exit 0 ;;
    587780    *:FreeBSD:*:*)
    588         if test -x /usr/bin/objformat; then
    589             if test "elf" = "`/usr/bin/objformat`"; then
    590                 echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
    591                 exit 0
    592             fi
    593         fi
    594781        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
    595782        exit 0 ;;
    596     *:NetBSD:*:*)
    597         echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
    598         exit 0 ;;
    599     *:OpenBSD:*:*)
    600         echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
    601         exit 0 ;;
    602783    i*:CYGWIN*:*)
    603784        echo ${UNAME_MACHINE}-pc-cygwin
    604785        exit 0 ;;
    605786    i*:MINGW*:*)
    606787        echo ${UNAME_MACHINE}-pc-mingw32
    607788        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 ;;
    608798    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
    609799        # How do we know it's Interix rather than the generic POSIX subsystem?
    610800        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    611801        # UNAME_MACHINE based on the output of uname instead of i386?
    612         echo i386-pc-interix
     802        echo i586-pc-interix
    613803        exit 0 ;;
    614804    i*:UWIN*:*)
    615805        echo ${UNAME_MACHINE}-pc-uwin
    616806        exit 0 ;;
     807    amd64:CYGWIN*:*:*)
     808        echo x86_64-unknown-cygwin
     809        exit 0 ;;
    617810    p*:CYGWIN*:*)
    618811        echo powerpcle-unknown-cygwin
    619812        exit 0 ;;
     
    621814        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    622815        exit 0 ;;
    623816    *:GNU:*:*)
     817        # the GNU system
    624818        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    625819        exit 0 ;;
    626     *:Linux:*:*)
    627 
     820    *:GNU/*:*:*)
     821        # other systems with GNU libc and userland
     822        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
     823        exit 0 ;;
     824    i*86:Minix:*:*)
     825        echo ${UNAME_MACHINE}-pc-minix
     826        exit 0 ;;
     827    arm*:Linux:*:*)
     828        echo ${UNAME_MACHINE}-unknown-linux-gnu
     829        exit 0 ;;
     830    cris:Linux:*:*)
     831        echo cris-axis-linux-gnu
     832        exit 0 ;;
     833    crisv32:Linux:*:*)
     834        echo crisv32-axis-linux-gnu
     835        exit 0 ;;
     836    frv:Linux:*:*)
     837        echo frv-unknown-linux-gnu
     838        exit 0 ;;
     839    ia64:Linux:*:*)
     840        echo ${UNAME_MACHINE}-unknown-linux-gnu
     841        exit 0 ;;
     842    m32r*:Linux:*:*)
     843        echo ${UNAME_MACHINE}-unknown-linux-gnu
     844        exit 0 ;;
     845    m68*:Linux:*:*)
     846        echo ${UNAME_MACHINE}-unknown-linux-gnu
     847        exit 0 ;;
     848    mips:Linux:*:*)
     849        eval $set_cc_for_build
     850        sed 's/^        //' << EOF >$dummy.c
     851        #undef CPU
     852        #undef mips
     853        #undef mipsel
     854        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     855        CPU=mipsel
     856        #else
     857        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     858        CPU=mips
     859        #else
     860        CPU=
     861        #endif
     862        #endif
     863EOF
     864        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     865        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
     866        ;;
     867    mips64:Linux:*:*)
     868        eval $set_cc_for_build
     869        sed 's/^        //' << EOF >$dummy.c
     870        #undef CPU
     871        #undef mips64
     872        #undef mips64el
     873        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     874        CPU=mips64el
     875        #else
     876        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     877        CPU=mips64
     878        #else
     879        CPU=
     880        #endif
     881        #endif
     882EOF
     883        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     884        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
     885        ;;
     886    ppc:Linux:*:*)
     887        echo powerpc-unknown-linux-gnu
     888        exit 0 ;;
     889    ppc64:Linux:*:*)
     890        echo powerpc64-unknown-linux-gnu
     891        exit 0 ;;
     892    alpha:Linux:*:*)
     893        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     894          EV5)   UNAME_MACHINE=alphaev5 ;;
     895          EV56)  UNAME_MACHINE=alphaev56 ;;
     896          PCA56) UNAME_MACHINE=alphapca56 ;;
     897          PCA57) UNAME_MACHINE=alphapca56 ;;
     898          EV6)   UNAME_MACHINE=alphaev6 ;;
     899          EV67)  UNAME_MACHINE=alphaev67 ;;
     900          EV68*) UNAME_MACHINE=alphaev68 ;;
     901        esac
     902        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
     903        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
     904        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
     905        exit 0 ;;
     906    parisc:Linux:*:* | hppa:Linux:*:*)
     907        # Look for CPU level
     908        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
     909          PA7*) echo hppa1.1-unknown-linux-gnu ;;
     910          PA8*) echo hppa2.0-unknown-linux-gnu ;;
     911          *)    echo hppa-unknown-linux-gnu ;;
     912        esac
     913        exit 0 ;;
     914    parisc64:Linux:*:* | hppa64:Linux:*:*)
     915        echo hppa64-unknown-linux-gnu
     916        exit 0 ;;
     917    s390:Linux:*:* | s390x:Linux:*:*)
     918        echo ${UNAME_MACHINE}-ibm-linux
     919        exit 0 ;;
     920    sh64*:Linux:*:*)
     921        echo ${UNAME_MACHINE}-unknown-linux-gnu
     922        exit 0 ;;
     923    sh*:Linux:*:*)
     924        echo ${UNAME_MACHINE}-unknown-linux-gnu
     925        exit 0 ;;
     926    sparc:Linux:*:* | sparc64:Linux:*:*)
     927        echo ${UNAME_MACHINE}-unknown-linux-gnu
     928        exit 0 ;;
     929    x86_64:Linux:*:*)
     930        echo x86_64-unknown-linux-gnu
     931        exit 0 ;;
     932    i*86:Linux:*:*)
    628933        # The BFD linker knows what the default object file format is, so
    629934        # first see if it will tell us. cd to the root directory to prevent
    630935        # problems with other programs or directories called `ld' in the path.
    631         ld_help_string=`cd /; ld --help 2>&1`
    632         ld_supported_emulations=`echo $ld_help_string \
    633                          | sed -ne '/supported emulations:/!d
     936        # Set LC_ALL=C to ensure ld outputs messages in English.
     937        ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
     938                         | sed -ne '/supported targets:/!d
    634939                                    s/[         ][      ]*/ /g
    635                                     s/.*supported emulations: *//
     940                                    s/.*supported targets: *//
    636941                                    s/ .*//
    637942                                    p'`
    638         case "$ld_supported_emulations" in
    639           *ia64)
    640                 echo "${UNAME_MACHINE}-unknown-linux"
    641                 exit 0
     943        case "$ld_supported_targets" in
     944          elf32-i386)
     945                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
    642946                ;;
    643           i?86linux)
     947          a.out-i386-linux)
    644948                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
    645                 exit 0
    646                 ;;
    647           i?86coff)
     949                exit 0 ;;
     950          coff-i386)
    648951                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
    649                 exit 0
    650                 ;;
    651           sparclinux)
    652                 echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
    653                 exit 0
    654                 ;;
    655           armlinux)
    656                 echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
    657                 exit 0
    658                 ;;
    659           elf32arm*)
    660                 echo "${UNAME_MACHINE}-unknown-linux-gnu"
    661                 exit 0
    662                 ;;
    663           armelf_linux*)
    664                 echo "${UNAME_MACHINE}-unknown-linux-gnu"
    665                 exit 0
    666                 ;;
    667           m68klinux)
    668                 echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
    669                 exit 0
    670                 ;;
    671           elf32ppc)
    672                 # Determine Lib Version
    673                 cat >$dummy.c <<EOF
    674 #include <features.h>
    675 #if defined(__GLIBC__)
    676 extern char __libc_version[];
    677 extern char __libc_release[];
    678 #endif
    679 main(argc, argv)
    680      int argc;
    681      char *argv[];
    682 {
    683 #if defined(__GLIBC__)
    684   printf("%s %s\n", __libc_version, __libc_release);
    685 #else
    686   printf("unkown\n");
    687 #endif
    688   return 0;
    689 }
    690 EOF
    691                 LIBC=""
    692                 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
    693                 if test "$?" = 0 ; then
    694                         ./$dummy | grep 1\.99 > /dev/null
    695                         if test "$?" = 0 ; then
    696                                 LIBC="libc1"
    697                         fi
    698                 fi     
    699                 rm -f $dummy.c $dummy
    700                 echo powerpc-unknown-linux-gnu${LIBC}
    701                 exit 0
    702                 ;;
     952                exit 0 ;;
     953          "")
     954                # Either a pre-BFD a.out linker (linux-gnuoldld) or
     955                # one that does not give us useful --help.
     956                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
     957                exit 0 ;;
    703958        esac
    704 
    705         if test "${UNAME_MACHINE}" = "alpha" ; then
    706                 sed 's/^        //'  <<EOF >$dummy.s
    707                 .globl main
    708                 .ent main
    709         main:
    710                 .frame \$30,0,\$26,0
    711                 .prologue 0
    712                 .long 0x47e03d80 # implver $0
    713                 lda \$2,259
    714                 .long 0x47e20c21 # amask $2,$1
    715                 srl \$1,8,\$2
    716                 sll \$2,2,\$2
    717                 sll \$0,3,\$0
    718                 addl \$1,\$0,\$0
    719                 addl \$2,\$0,\$0
    720                 ret \$31,(\$26),1
    721                 .end main
    722 EOF
    723                 LIBC=""
    724                 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
    725                 if test "$?" = 0 ; then
    726                         ./$dummy
    727                         case "$?" in
    728                         7)
    729                                 UNAME_MACHINE="alpha"
    730                                 ;;
    731                         15)
    732                                 UNAME_MACHINE="alphaev5"
    733                                 ;;
    734                         14)
    735                                 UNAME_MACHINE="alphaev56"
    736                                 ;;
    737                         10)
    738                                 UNAME_MACHINE="alphapca56"
    739                                 ;;
    740                         16)
    741                                 UNAME_MACHINE="alphaev6"
    742                                 ;;
    743                         esac
    744 
    745                         objdump --private-headers $dummy | \
    746                           grep ld.so.1 > /dev/null
    747                         if test "$?" = 0 ; then
    748                                 LIBC="libc1"
    749                         fi
    750                 fi
    751                 rm -f $dummy.s $dummy
    752                 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
    753         elif test "${UNAME_MACHINE}" = "mips" ; then
    754           cat >$dummy.c <<EOF
    755 #ifdef __cplusplus
    756         int main (int argc, char *argv[]) {
    757 #else
    758         int main (argc, argv) int argc; char *argv[]; {
    759 #endif
    760 #ifdef __MIPSEB__
    761   printf ("%s-unknown-linux-gnu\n", argv[1]);
    762 #endif
    763 #ifdef __MIPSEL__
    764   printf ("%sel-unknown-linux-gnu\n", argv[1]);
    765 #endif
    766   return 0;
    767 }
    768 EOF
    769           $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
    770           rm -f $dummy.c $dummy
    771         else
    772           # Either a pre-BFD a.out linker (linux-gnuoldld)
    773           # or one that does not give us useful --help.
    774           # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
    775           # If ld does not provide *any* "supported emulations:"
    776           # that means it is gnuoldld.
    777           echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
    778           test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
    779 
    780           case "${UNAME_MACHINE}" in
    781           i?86)
    782             VENDOR=pc;
    783             ;;
    784           *)
    785             VENDOR=unknown;
    786             ;;
    787           esac
    788           # Determine whether the default compiler is a.out or elf
    789           cat >$dummy.c <<EOF
    790 #include <features.h>
    791 #ifdef __cplusplus
    792         int main (int argc, char *argv[]) {
    793 #else
    794         int main (argc, argv) int argc; char *argv[]; {
    795 #endif
    796 #ifdef __ELF__
    797 # ifdef __GLIBC__
    798 #  if __GLIBC__ >= 2
    799     printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
    800 #  else
    801     printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
    802 #  endif
    803 # else
    804    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
    805 # endif
    806 #else
    807   printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
    808 #endif
    809   return 0;
    810 }
     959        # Determine whether the default compiler is a.out or elf
     960        eval $set_cc_for_build
     961        sed 's/^        //' << EOF >$dummy.c
     962        #include <features.h>
     963        #ifdef __ELF__
     964        # ifdef __GLIBC__
     965        #  if __GLIBC__ >= 2
     966        LIBC=gnu
     967        #  else
     968        LIBC=gnulibc1
     969        #  endif
     970        # else
     971        LIBC=gnulibc1
     972        # endif
     973        #else
     974        #ifdef __INTEL_COMPILER
     975        LIBC=gnu
     976        #else
     977        LIBC=gnuaout
     978        #endif
     979        #endif
     980        #ifdef __dietlibc__
     981        LIBC=dietlibc
     982        #endif
    811983EOF
    812           $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
    813           rm -f $dummy.c $dummy
    814         fi ;;
    815 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
    816 # are messed up and put the nodename in both sysname and nodename.
    817     i?86:DYNIX/ptx:4*:*)
     984        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
     985        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
     986        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
     987        ;;
     988    i*86:DYNIX/ptx:4*:*)
     989        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
     990        # earlier versions are messed up and put the nodename in both
     991        # sysname and nodename.
    818992        echo i386-sequent-sysv4
    819993        exit 0 ;;
    820     i?86:UNIX_SV:4.2MP:2.*)
     994    i*86:UNIX_SV:4.2MP:2.*)
    821995        # Unixware is an offshoot of SVR4, but it has its own version
    822996        # number series starting with 2...
    823997        # I am not positive that other SVR4 systems won't match this,
     
    825999        # Use sysv4.2uw... so that sysv4* matches it.
    8261000        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
    8271001        exit 0 ;;
    828     i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
     1002    i*86:OS/2:*:*)
     1003        # If we were able to find `uname', then EMX Unix compatibility
     1004        # is probably installed.
     1005        echo ${UNAME_MACHINE}-pc-os2-emx
     1006        exit 0 ;;
     1007    i*86:XTS-300:*:STOP)
     1008        echo ${UNAME_MACHINE}-unknown-stop
     1009        exit 0 ;;
     1010    i*86:atheos:*:*)
     1011        echo ${UNAME_MACHINE}-unknown-atheos
     1012        exit 0 ;;
     1013        i*86:syllable:*:*)
     1014        echo ${UNAME_MACHINE}-pc-syllable
     1015        exit 0 ;;
     1016    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
     1017        echo i386-unknown-lynxos${UNAME_RELEASE}
     1018        exit 0 ;;
     1019    i*86:*DOS:*:*)
     1020        echo ${UNAME_MACHINE}-pc-msdosdjgpp
     1021        exit 0 ;;
     1022    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
    8291023        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
    8301024        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
    8311025                echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
     
    8331027                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
    8341028        fi
    8351029        exit 0 ;;
    836     i?86:*:5:7*)
    837         # Fixed at (any) Pentium or better
    838         UNAME_MACHINE=i586
    839         if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
    840             echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
    841         else
    842             echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
    843         fi
     1030    i*86:*:5:[78]*)
     1031        case `/bin/uname -X | grep "^Machine"` in
     1032            *486*)           UNAME_MACHINE=i486 ;;
     1033            *Pentium)        UNAME_MACHINE=i586 ;;
     1034            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
     1035        esac
     1036        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
    8441037        exit 0 ;;
    845     i?86:*:3.2:*)
     1038    i*86:*:3.2:*)
    8461039        if test -f /usr/options/cb.name; then
    8471040                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
    8481041                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
    8491042        elif /bin/uname -X 2>/dev/null >/dev/null ; then
    850                 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
    851                 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
    852                 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
     1043                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
     1044                (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
     1045                (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
    8531046                        && UNAME_MACHINE=i586
    854                 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
     1047                (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
    8551048                        && UNAME_MACHINE=i686
    856                 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
     1049                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
    8571050                        && UNAME_MACHINE=i686
    8581051                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
    8591052        else
     
    8611054        fi
    8621055        exit 0 ;;
    8631056    pc:*:*:*)
     1057        # Left here for compatibility:
    8641058        # uname -m prints for DJGPP always 'pc', but it prints nothing about
    8651059        # the processor, so we play safe by assuming i386.
    8661060        echo i386-pc-msdosdjgpp
     
    8821076        # "miniframe"
    8831077        echo m68010-convergent-sysv
    8841078        exit 0 ;;
    885     M68*:*:R3V[567]*:*)
     1079    mc68k:UNIX:SYSTEM5:3.51m)
     1080        echo m68k-convergent-sysv
     1081        exit 0 ;;
     1082    M680?0:D-NIX:5.3:*)
     1083        echo m68k-diab-dnix
     1084        exit 0 ;;
     1085    M68*:*:R3V[5678]*:*)
    8861086        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    887     3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
     1087    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)
    8881088        OS_REL=''
    8891089        test -r /etc/.relid \
    8901090        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
     
    8951095    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    8961096        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    8971097          && echo i486-ncr-sysv4 && exit 0 ;;
    898     m68*:LynxOS:2.*:*)
     1098    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    8991099        echo m68k-unknown-lynxos${UNAME_RELEASE}
    9001100        exit 0 ;;
    9011101    mc68030:UNIX_System_V:4.*:*)
    9021102        echo m68k-atari-sysv4
    9031103        exit 0 ;;
    904     i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
    905         echo i386-unknown-lynxos${UNAME_RELEASE}
    906         exit 0 ;;
    9071104    TSUNAMI:LynxOS:2.*:*)
    9081105        echo sparc-unknown-lynxos${UNAME_RELEASE}
    9091106        exit 0 ;;
    910     rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
     1107    rs6000:LynxOS:2.*:*)
    9111108        echo rs6000-unknown-lynxos${UNAME_RELEASE}
    9121109        exit 0 ;;
     1110    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
     1111        echo powerpc-unknown-lynxos${UNAME_RELEASE}
     1112        exit 0 ;;
    9131113    SM[BE]S:UNIX_SV:*:*)
    9141114        echo mips-dde-sysv${UNAME_RELEASE}
    9151115        exit 0 ;;
     
    9271127                echo ns32k-sni-sysv
    9281128        fi
    9291129        exit 0 ;;
    930     PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    931                            # says <Richard.M.Bartel@ccMail.Census.GOV>
     1130    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
     1131                      # says <Richard.M.Bartel@ccMail.Census.GOV>
    9321132        echo i586-unisys-sysv4
    9331133        exit 0 ;;
    9341134    *:UNIX_System_V:4*:FTX*)
     
    9401140        # From seanf@swdc.stratus.com.
    9411141        echo i860-stratus-sysv4
    9421142        exit 0 ;;
     1143    i*86:VOS:*:*)
     1144        # From Paul.Green@stratus.com.
     1145        echo ${UNAME_MACHINE}-stratus-vos
     1146        exit 0 ;;
     1147    *:VOS:*:*)
     1148        # From Paul.Green@stratus.com.
     1149        echo hppa1.1-stratus-vos
     1150        exit 0 ;;
    9431151    mc68*:A/UX:*:*)
    9441152        echo m68k-apple-aux${UNAME_RELEASE}
    9451153        exit 0 ;;
    946     news*:NEWS-OS:*:6*)
     1154    news*:NEWS-OS:6*:*)
    9471155        echo mips-sony-newsos6
    9481156        exit 0 ;;
    9491157    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
     
    9681176    SX-5:SUPER-UX:*:*)
    9691177        echo sx5-nec-superux${UNAME_RELEASE}
    9701178        exit 0 ;;
     1179    SX-6:SUPER-UX:*:*)
     1180        echo sx6-nec-superux${UNAME_RELEASE}
     1181        exit 0 ;;
    9711182    Power*:Rhapsody:*:*)
    9721183        echo powerpc-apple-rhapsody${UNAME_RELEASE}
    9731184        exit 0 ;;
    9741185    *:Rhapsody:*:*)
    9751186        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
    9761187        exit 0 ;;
     1188    *:Darwin:*:*)
     1189        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
     1190        case $UNAME_PROCESSOR in
     1191            *86) UNAME_PROCESSOR=i686 ;;
     1192            unknown) UNAME_PROCESSOR=powerpc ;;
     1193        esac
     1194        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
     1195        exit 0 ;;
     1196    *:procnto*:*:* | *:QNX:[0123456789]*:*)
     1197        UNAME_PROCESSOR=`uname -p`
     1198        if test "$UNAME_PROCESSOR" = "x86"; then
     1199                UNAME_PROCESSOR=i386
     1200                UNAME_MACHINE=pc
     1201        fi
     1202        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
     1203        exit 0 ;;
    9771204    *:QNX:*:4*)
    978         echo i386-qnx-qnx${UNAME_VERSION}
     1205        echo i386-pc-qnx
     1206        exit 0 ;;
     1207    NSE-?:NONSTOP_KERNEL:*:*)
     1208        echo nse-tandem-nsk${UNAME_RELEASE}
     1209        exit 0 ;;
     1210    NSR-?:NONSTOP_KERNEL:*:*)
     1211        echo nsr-tandem-nsk${UNAME_RELEASE}
     1212        exit 0 ;;
     1213    *:NonStop-UX:*:*)
     1214        echo mips-compaq-nonstopux
     1215        exit 0 ;;
     1216    BS2000:POSIX*:*:*)
     1217        echo bs2000-siemens-sysv
     1218        exit 0 ;;
     1219    DS/*:UNIX_System_V:*:*)
     1220        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
     1221        exit 0 ;;
     1222    *:Plan9:*:*)
     1223        # "uname -m" is not consistent, so use $cputype instead. 386
     1224        # is converted to i386 for consistency with other x86
     1225        # operating systems.
     1226        if test "$cputype" = "386"; then
     1227            UNAME_MACHINE=i386
     1228        else
     1229            UNAME_MACHINE="$cputype"
     1230        fi
     1231        echo ${UNAME_MACHINE}-unknown-plan9
     1232        exit 0 ;;
     1233    *:TOPS-10:*:*)
     1234        echo pdp10-unknown-tops10
     1235        exit 0 ;;
     1236    *:TENEX:*:*)
     1237        echo pdp10-unknown-tenex
     1238        exit 0 ;;
     1239    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
     1240        echo pdp10-dec-tops20
     1241        exit 0 ;;
     1242    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
     1243        echo pdp10-xkl-tops20
     1244        exit 0 ;;
     1245    *:TOPS-20:*:*)
     1246        echo pdp10-unknown-tops20
     1247        exit 0 ;;
     1248    *:ITS:*:*)
     1249        echo pdp10-unknown-its
     1250        exit 0 ;;
     1251    SEI:*:*:SEIUX)
     1252        echo mips-sei-seiux${UNAME_RELEASE}
     1253        exit 0 ;;
     1254    *:DragonFly:*:*)
     1255        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
     1256        exit 0 ;;
     1257    *:*VMS:*:*)
     1258        UNAME_MACHINE=`(uname -p) 2>/dev/null`
     1259        case "${UNAME_MACHINE}" in
     1260            A*) echo alpha-dec-vms && exit 0 ;;
     1261            I*) echo ia64-dec-vms && exit 0 ;;
     1262            V*) echo vax-dec-vms && exit 0 ;;
     1263        esac ;;
     1264    *:XENIX:*:SysV)
     1265        echo i386-pc-xenix
    9791266        exit 0 ;;
    9801267esac
    9811268
    9821269#echo '(No uname command or uname output not recognized.)' 1>&2
    9831270#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
    9841271
     1272eval $set_cc_for_build
    9851273cat >$dummy.c <<EOF
    9861274#ifdef _SEQUENT_
    9871275# include <sys/types.h>
     
    10681356#endif
    10691357
    10701358#if defined (vax)
    1071 #if !defined (ultrix)
    1072   printf ("vax-dec-bsd\n"); exit (0);
    1073 #else
    1074   printf ("vax-dec-ultrix\n"); exit (0);
    1075 #endif
     1359# if !defined (ultrix)
     1360#  include <sys/param.h>
     1361#  if defined (BSD)
     1362#   if BSD == 43
     1363      printf ("vax-dec-bsd4.3\n"); exit (0);
     1364#   else
     1365#    if BSD == 199006
     1366      printf ("vax-dec-bsd4.3reno\n"); exit (0);
     1367#    else
     1368      printf ("vax-dec-bsd\n"); exit (0);
     1369#    endif
     1370#   endif
     1371#  else
     1372    printf ("vax-dec-bsd\n"); exit (0);
     1373#  endif
     1374# else
     1375    printf ("vax-dec-ultrix\n"); exit (0);
     1376# endif
    10761377#endif
    10771378
    10781379#if defined (alliant) && defined (i860)
     
    10831384}
    10841385EOF
    10851386
    1086 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
    1087 rm -f $dummy.c $dummy
     1387$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
    10881388
    10891389# Apollos put the system type in the environment.
    10901390
     
    11161416    esac
    11171417fi
    11181418
    1119 #echo '(Unable to guess system type)' 1>&2
     1419cat >&2 <<EOF
     1420$0: unable to guess system type
     1421
     1422This script, last modified $timestamp, has failed to recognize
     1423the operating system you are using. It is advised that you
     1424download the most up to date version of the config scripts from
     1425
     1426  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
     1427and
     1428  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
     1429
     1430If the version you run ($0) is already up to date, please
     1431send the following data and any information you think might be
     1432pertinent to <config-patches@gnu.org> in order to provide the needed
     1433information to handle your system.
     1434
     1435config.guess timestamp = $timestamp
     1436
     1437uname -m = `(uname -m) 2>/dev/null || echo unknown`
     1438uname -r = `(uname -r) 2>/dev/null || echo unknown`
     1439uname -s = `(uname -s) 2>/dev/null || echo unknown`
     1440uname -v = `(uname -v) 2>/dev/null || echo unknown`
     1441
     1442/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
     1443/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
     1444
     1445hostinfo               = `(hostinfo) 2>/dev/null`
     1446/bin/universe          = `(/bin/universe) 2>/dev/null`
     1447/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
     1448/bin/arch              = `(/bin/arch) 2>/dev/null`
     1449/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
     1450/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
     1451
     1452UNAME_MACHINE = ${UNAME_MACHINE}
     1453UNAME_RELEASE = ${UNAME_RELEASE}
     1454UNAME_SYSTEM  = ${UNAME_SYSTEM}
     1455UNAME_VERSION = ${UNAME_VERSION}
     1456EOF
    11201457
    11211458exit 1
     1459
     1460# Local variables:
     1461# eval: (add-hook 'write-file-hooks 'time-stamp)
     1462# time-stamp-start: "timestamp='"
     1463# time-stamp-format: "%:y-%02m-%02d"
     1464# time-stamp-end: "'"
     1465# End:
  • libfame-0.9.

    diff -uNr libfame-0.9.1/config.sub libfame-0.9.1-mod/config.sub
    old new  
    11#! /bin/sh
    2 # Configuration validation subroutine script, version 1.1.
    3 #   Copyright (C) 1991, 92-97, 1998, 1999 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, 2005 Free Software Foundation, Inc.
     5
     6timestamp='2005-04-22'
     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, 2005
     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                ;;
     
    108159                os=-vxworks
    109160                basic_machine=$1
    110161                ;;
     162        -chorusos*)
     163                os=-chorusos
     164                basic_machine=$1
     165                ;;
     166        -chorusrdb)
     167                os=-chorusrdb
     168                basic_machine=$1
     169                ;;
    111170        -hiux*)
    112171                os=-hiuxwe2
    113172                ;;
     
    166225case $basic_machine in
    167226        # Recognize the basic CPU types without company name.
    168227        # Some are omitted here because they have special meanings below.
    169         tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
    170                 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
    171                 | 580 | i960 | h8300 \
    172                 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
    173                 | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
    174                 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
    175                 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
    176                 | mips64orion | mips64orionel | mipstx39 | mipstx39el \
    177                 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
    178                 | mips64vr5000 | miprs64vr5000el | mcore \
    179                 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
    180                 | thumb | d10v | fr30)
     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        | bfin \
     235        | c4x | clipper \
     236        | d10v | d30v | dlx | dsp16xx \
     237        | fr30 | frv \
     238        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
     239        | i370 | i860 | i960 | ia64 \
     240        | ip2k | iq2000 \
     241        | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
     242        | mips | mipsbe | mipseb | mipsel | mipsle \
     243        | mips16 \
     244        | mips64 | mips64el \
     245        | mips64vr | mips64vrel \
     246        | mips64orion | mips64orionel \
     247        | mips64vr4100 | mips64vr4100el \
     248        | mips64vr4300 | mips64vr4300el \
     249        | mips64vr5000 | mips64vr5000el \
     250        | mipsisa32 | mipsisa32el \
     251        | mipsisa32r2 | mipsisa32r2el \
     252        | mipsisa64 | mipsisa64el \
     253        | mipsisa64r2 | mipsisa64r2el \
     254        | mipsisa64sb1 | mipsisa64sb1el \
     255        | mipsisa64sr71k | mipsisa64sr71kel \
     256        | mipstx39 | mipstx39el \
     257        | mn10200 | mn10300 \
     258        | msp430 \
     259        | ns16k | ns32k \
     260        | openrisc | or32 \
     261        | pdp10 | pdp11 | pj | pjl \
     262        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
     263        | pyramid \
     264        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
     265        | sh64 | sh64le \
     266        | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
     267        | sparcv8 | sparcv9 | sparcv9b \
     268        | strongarm \
     269        | tahoe | thumb | tic4x | tic80 | tron \
     270        | v850 | v850e \
     271        | we32k \
     272        | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
     273        | z8k)
    181274                basic_machine=$basic_machine-unknown
    182275                ;;
    183         m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
     276        m6811 | m68hc11 | m6812 | m68hc12)
     277                # Motorola 68HC11/12.
     278                basic_machine=$basic_machine-unknown
     279                os=-none
     280                ;;
     281        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
    184282                ;;
    185283
    186284        # We use `pc' rather than `unknown'
    187285        # because (1) that's what they normally are, and
    188286        # (2) the word "unknown" tends to confuse beginning users.
    189         i[34567]86)
     287        i*86 | x86_64)
    190288          basic_machine=$basic_machine-pc
    191289          ;;
    192290        # Object if more than one company name word.
     
    195293                exit 1
    196294                ;;
    197295        # Recognize the basic CPU types with company name.
    198         # FIXME: clean up the formatting here.
    199         vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
    200               | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
    201               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
    202               | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
    203               | xmp-* | ymp-* \
    204               | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
    205               | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
    206               | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
    207               | clipper-* | orion-* \
    208               | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
    209               | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
    210               | mips64el-* | mips64orion-* | mips64orionel-* \
    211               | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
    212               | mipstx39-* | mipstx39el-* | mcore-* \
    213               | f301-* | armv*-* | t3e-* \
    214               | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
    215               | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
     296        580-* \
     297        | a29k-* \
     298        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
     299        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
     300        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
     301        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
     302        | avr-* \
     303        | bfin-* | bs2000-* \
     304        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
     305        | clipper-* | craynv-* | cydra-* \
     306        | d10v-* | d30v-* | dlx-* \
     307        | elxsi-* \
     308        | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
     309        | h8300-* | h8500-* \
     310        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
     311        | i*86-* | i860-* | i960-* | ia64-* \
     312        | ip2k-* | iq2000-* \
     313        | m32r-* | m32rle-* \
     314        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
     315        | m88110-* | m88k-* | maxq-* | mcore-* \
     316        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
     317        | mips16-* \
     318        | mips64-* | mips64el-* \
     319        | mips64vr-* | mips64vrel-* \
     320        | mips64orion-* | mips64orionel-* \
     321        | mips64vr4100-* | mips64vr4100el-* \
     322        | mips64vr4300-* | mips64vr4300el-* \
     323        | mips64vr5000-* | mips64vr5000el-* \
     324        | mipsisa32-* | mipsisa32el-* \
     325        | mipsisa32r2-* | mipsisa32r2el-* \
     326        | mipsisa64-* | mipsisa64el-* \
     327        | mipsisa64r2-* | mipsisa64r2el-* \
     328        | mipsisa64sb1-* | mipsisa64sb1el-* \
     329        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
     330        | mipstx39-* | mipstx39el-* \
     331        | mmix-* \
     332        | msp430-* \
     333        | none-* | np1-* | ns16k-* | ns32k-* \
     334        | orion-* \
     335        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     336        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
     337        | pyramid-* \
     338        | romp-* | rs6000-* \
     339        | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
     340        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
     341        | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
     342        | sparclite-* \
     343        | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
     344        | tahoe-* | thumb-* \
     345        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
     346        | tron-* \
     347        | v850-* | v850e-* | vax-* \
     348        | we32k-* \
     349        | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
     350        | xstormy16-* | xtensa-* \
     351        | ymp-* \
     352        | z8k-*)
    216353                ;;
    217354        # Recognize the various machine names and aliases which stand
    218355        # for a CPU type and a company and sometimes even an OS.
     
    230367                basic_machine=a29k-amd
    231368                os=-udi
    232369                ;;
     370        abacus)
     371                basic_machine=abacus-unknown
     372                ;;
    233373        adobe68k)
    234374                basic_machine=m68010-adobe
    235375                os=-scout
     
    244384                basic_machine=a29k-none
    245385                os=-bsd
    246386                ;;
     387        amd64)
     388                basic_machine=x86_64-pc
     389                ;;
     390        amd64-*)
     391                basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
     392                ;;
    247393        amdahl)
    248394                basic_machine=580-amdahl
    249395                os=-sysv
    250396                ;;
    251397        amiga | amiga-*)
    252                 basic_machine=m68k-cbm
     398                basic_machine=m68k-unknown
    253399                ;;
    254400        amigaos | amigados)
    255                 basic_machine=m68k-cbm
     401                basic_machine=m68k-unknown
    256402                os=-amigaos
    257403                ;;
    258404        amigaunix | amix)
    259                 basic_machine=m68k-cbm
     405                basic_machine=m68k-unknown
    260406                os=-sysv4
    261407                ;;
    262408        apollo68)
     
    275421                basic_machine=ns32k-sequent
    276422                os=-dynix
    277423                ;;
     424        c90)
     425                basic_machine=c90-cray
     426                os=-unicos
     427                ;;
    278428        convex-c1)
    279429                basic_machine=c1-convex
    280430                os=-bsd
     
    295445                basic_machine=c38-convex
    296446                os=-bsd
    297447                ;;
    298         cray | ymp)
    299                 basic_machine=ymp-cray
     448        cray | j90)
     449                basic_machine=j90-cray
    300450                os=-unicos
    301451                ;;
    302         cray2)
    303                 basic_machine=cray2-cray
    304                 os=-unicos
     452        craynv)
     453                basic_machine=craynv-cray
     454                os=-unicosmp
    305455                ;;
    306         [ctj]90-cray)
    307                 basic_machine=c90-cray
    308                 os=-unicos
     456        cr16c)
     457                basic_machine=cr16c-unknown
     458                os=-elf
    309459                ;;
    310460        crds | unos)
    311461                basic_machine=m68k-crds
    312462                ;;
     463        crisv32 | crisv32-* | etraxfs*)
     464                basic_machine=crisv32-axis
     465                ;;
     466        cris | cris-* | etrax*)
     467                basic_machine=cris-axis
     468                ;;
     469        crx)
     470                basic_machine=crx-unknown
     471                os=-elf
     472                ;;
    313473        da30 | da30-*)
    314474                basic_machine=m68k-da30
    315475                ;;
    316476        decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
    317477                basic_machine=mips-dec
    318478                ;;
     479        decsystem10* | dec10*)
     480                basic_machine=pdp10-dec
     481                os=-tops10
     482                ;;
     483        decsystem20* | dec20*)
     484                basic_machine=pdp10-dec
     485                os=-tops20
     486                ;;
    319487        delta | 3300 | motorola-3300 | motorola-delta \
    320488              | 3300-motorola | delta-motorola)
    321489                basic_machine=m68k-motorola
     
    324492                basic_machine=m88k-motorola
    325493                os=-sysv3
    326494                ;;
     495        djgpp)
     496                basic_machine=i586-pc
     497                os=-msdosdjgpp
     498                ;;
    327499        dpx20 | dpx20-*)
    328500                basic_machine=rs6000-bull
    329501                os=-bosx
     
    357529                basic_machine=tron-gmicro
    358530                os=-sysv
    359531                ;;
     532        go32)
     533                basic_machine=i386-pc
     534                os=-go32
     535                ;;
    360536        h3050r* | hiux*)
    361537                basic_machine=hppa1.1-hitachi
    362538                os=-hiuxwe2
     
    432608                basic_machine=i370-ibm
    433609                ;;
    434610# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
    435         i[34567]86v32)
     611        i*86v32)
    436612                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    437613                os=-sysv32
    438614                ;;
    439         i[34567]86v4*)
     615        i*86v4*)
    440616                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    441617                os=-sysv4
    442618                ;;
    443         i[34567]86v)
     619        i*86v)
    444620                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    445621                os=-sysv
    446622                ;;
    447         i[34567]86sol2)
     623        i*86sol2)
    448624                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    449625                os=-solaris2
    450626                ;;
     
    456632                basic_machine=i386-unknown
    457633                os=-vsta
    458634                ;;
    459         i386-go32 | go32)
    460                 basic_machine=i386-unknown
    461                 os=-go32
    462                 ;;
    463         i386-mingw32 | mingw32)
    464                 basic_machine=i386-unknown
    465                 os=-mingw32
    466                 ;;
    467         i386-qnx | qnx)
    468                 basic_machine=i386-qnx
    469                 ;;
    470635        iris | iris4d)
    471636                basic_machine=mips-sgi
    472637                case $os in
     
    492657                basic_machine=ns32k-utek
    493658                os=-sysv
    494659                ;;
     660        mingw32)
     661                basic_machine=i386-pc
     662                os=-mingw32
     663                ;;
    495664        miniframe)
    496665                basic_machine=m68000-convergent
    497666                ;;
     
    499668                basic_machine=m68k-atari
    500669                os=-mint
    501670                ;;
    502         mipsel*-linux*)
    503                 basic_machine=mipsel-unknown
    504                 os=-linux-gnu
    505                 ;;
    506         mips*-linux*)
    507                 basic_machine=mips-unknown
    508                 os=-linux-gnu
    509                 ;;
    510671        mips3*-*)
    511672                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
    512673                ;;
     
    517678                basic_machine=m68k-rom68k
    518679                os=-coff
    519680                ;;
     681        morphos)
     682                basic_machine=powerpc-unknown
     683                os=-morphos
     684                ;;
    520685        msdos)
    521                 basic_machine=i386-unknown
     686                basic_machine=i386-pc
    522687                os=-msdos
    523688                ;;
    524689        mvs)
     
    582747                basic_machine=i960-intel
    583748                os=-mon960
    584749                ;;
     750        nonstopux)
     751                basic_machine=mips-compaq
     752                os=-nonstopux
     753                ;;
    585754        np1)
    586755                basic_machine=np1-gould
    587756                ;;
     757        nsr-tandem)
     758                basic_machine=nsr-tandem
     759                ;;
    588760        op50n-* | op60c-*)
    589761                basic_machine=hppa1.1-oki
    590762                os=-proelf
    591763                ;;
     764        or32 | or32-*)
     765                basic_machine=or32-unknown
     766                os=-coff
     767                ;;
     768        os400)
     769                basic_machine=powerpc-ibm
     770                os=-os400
     771                ;;
    592772        OSE68000 | ose68000)
    593773                basic_machine=m68000-ericsson
    594774                os=-ose
     
    611791        pbb)
    612792                basic_machine=m68k-tti
    613793                ;;
    614         pc532 | pc532-*)
     794        pc532 | pc532-*)
    615795                basic_machine=ns32k-pc532
    616796                ;;
    617         pentium | p5 | k5 | k6 | nexen)
     797        pentium | p5 | k5 | k6 | nexgen | viac3)
    618798                basic_machine=i586-pc
    619799                ;;
    620         pentiumpro | p6 | 6x86)
     800        pentiumpro | p6 | 6x86 | athlon | athlon_*)
     801                basic_machine=i686-pc
     802                ;;
     803        pentiumii | pentium2 | pentiumiii | pentium3)
    621804                basic_machine=i686-pc
    622805                ;;
    623         pentiumii | pentium2)
     806        pentium4)
    624807                basic_machine=i786-pc
    625808                ;;
    626         pentium-* | p5-* | k5-* | k6-* | nexen-*)
     809        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
    627810                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
    628811                ;;
    629         pentiumpro-* | p6-* | 6x86-*)
     812        pentiumpro-* | p6-* | 6x86-* | athlon-*)
    630813                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    631814                ;;
    632         pentiumii-* | pentium2-*)
     815        pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
     816                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
     817                ;;
     818        pentium4-*)
    633819                basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
    634820                ;;
    635821        pn)
    636822                basic_machine=pn-gould
    637823                ;;
    638         power)  basic_machine=rs6000-ibm
     824        power)  basic_machine=power-ibm
    639825                ;;
    640826        ppc)    basic_machine=powerpc-unknown
    641                 ;;
     827                ;;
    642828        ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
    643829                ;;
    644830        ppcle | powerpclittle | ppc-le | powerpc-little)
    645831                basic_machine=powerpcle-unknown
    646                 ;;
     832                ;;
    647833        ppcle-* | powerpclittle-*)
    648834                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
    649835                ;;
     836        ppc64)  basic_machine=powerpc64-unknown
     837                ;;
     838        ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
     839                ;;
     840        ppc64le | powerpc64little | ppc64-le | powerpc64-little)
     841                basic_machine=powerpc64le-unknown
     842                ;;
     843        ppc64le-* | powerpc64little-*)
     844                basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
     845                ;;
    650846        ps2)
    651847                basic_machine=i386-ibm
    652848                ;;
     849        pw32)
     850                basic_machine=i586-unknown
     851                os=-pw32
     852                ;;
    653853        rom68k)
    654854                basic_machine=m68k-rom68k
    655855                os=-coff
     
    660860        rtpc | rtpc-*)
    661861                basic_machine=romp-ibm
    662862                ;;
     863        s390 | s390-*)
     864                basic_machine=s390-ibm
     865                ;;
     866        s390x | s390x-*)
     867                basic_machine=s390x-ibm
     868                ;;
    663869        sa29200)
    664870                basic_machine=a29k-amd
    665871                os=-udi
    666872                ;;
     873        sb1)
     874                basic_machine=mipsisa64sb1-unknown
     875                ;;
     876        sb1el)
     877                basic_machine=mipsisa64sb1el-unknown
     878                ;;
     879        sei)
     880                basic_machine=mips-sei
     881                os=-seiux
     882                ;;
    667883        sequent)
    668884                basic_machine=i386-sequent
    669885                ;;
     
    671887                basic_machine=sh-hitachi
    672888                os=-hms
    673889                ;;
    674         sparclite-wrs)
     890        sh64)
     891                basic_machine=sh64-unknown
     892                ;;
     893        sparclite-wrs | simso-wrs)
    675894                basic_machine=sparclite-wrs
    676895                os=-vxworks
    677896                ;;
     
    729948        sun386 | sun386i | roadrunner)
    730949                basic_machine=i386-sun
    731950                ;;
     951        sv1)
     952                basic_machine=sv1-cray
     953                os=-unicos
     954                ;;
    732955        symmetry)
    733956                basic_machine=i386-sequent
    734957                os=-dynix
    735958                ;;
    736959        t3e)
    737                 basic_machine=t3e-cray
     960                basic_machine=alphaev5-cray
    738961                os=-unicos
    739962                ;;
     963        t90)
     964                basic_machine=t90-cray
     965                os=-unicos
     966                ;;
     967        tic54x | c54x*)
     968                basic_machine=tic54x-unknown
     969                os=-coff
     970                ;;
     971        tic55x | c55x*)
     972                basic_machine=tic55x-unknown
     973                os=-coff
     974                ;;
     975        tic6x | c6x*)
     976                basic_machine=tic6x-unknown
     977                os=-coff
     978                ;;
    740979        tx39)
    741980                basic_machine=mipstx39-unknown
    742981                ;;
    743982        tx39el)
    744983                basic_machine=mipstx39el-unknown
    745984                ;;
     985        toad1)
     986                basic_machine=pdp10-xkl
     987                os=-tops20
     988                ;;
    746989        tower | tower-32)
    747990                basic_machine=m68k-ncr
    748991                ;;
     992        tpf)
     993                basic_machine=s390x-ibm
     994                os=-tpf
     995                ;;
    749996        udi29k)
    750997                basic_machine=a29k-amd
    751998                os=-udi
     
    7671014                os=-vms
    7681015                ;;
    7691016        vpp*|vx|vx-*)
    770                basic_machine=f301-fujitsu
    771                ;;
     1017                basic_machine=f301-fujitsu
     1018                ;;
    7721019        vxworks960)
    7731020                basic_machine=i960-wrs
    7741021                os=-vxworks
     
    7891036                basic_machine=hppa1.1-winbond
    7901037                os=-proelf
    7911038                ;;
    792         xmp)
    793                 basic_machine=xmp-cray
    794                 os=-unicos
     1039        xbox)
     1040                basic_machine=i686-pc
     1041                os=-mingw32
    7951042                ;;
    796         xps | xps100)
     1043        xps | xps100)
    7971044                basic_machine=xps100-honeywell
    7981045                ;;
     1046        ymp)
     1047                basic_machine=ymp-cray
     1048                os=-unicos
     1049                ;;
    7991050        z8k-*-coff)
    8001051                basic_machine=z8k-unknown
    8011052                os=-sim
     
    8161067        op60c)
    8171068                basic_machine=hppa1.1-oki
    8181069                ;;
    819         mips)
    820                 if [ x$os = x-linux-gnu ]; then
    821                         basic_machine=mips-unknown
    822                 else
    823                         basic_machine=mips-mips
    824                 fi
    825                 ;;
    8261070        romp)
    8271071                basic_machine=romp-ibm
    8281072                ;;
     1073        mmix)
     1074                basic_machine=mmix-knuth
     1075                ;;
    8291076        rs6000)
    8301077                basic_machine=rs6000-ibm
    8311078                ;;
    8321079        vax)
    8331080                basic_machine=vax-dec
    8341081                ;;
     1082        pdp10)
     1083                # there are many clones, so DEC is not a safe bet
     1084                basic_machine=pdp10-unknown
     1085                ;;
    8351086        pdp11)
    8361087                basic_machine=pdp11-dec
    8371088                ;;
    8381089        we32k)
    8391090                basic_machine=we32k-att
    8401091                ;;
    841         sparc | sparcv9)
     1092        sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
     1093                basic_machine=sh-unknown
     1094                ;;
     1095        sh64)
     1096                basic_machine=sh64-unknown
     1097                ;;
     1098        sparc | sparcv8 | sparcv9 | sparcv9b)
    8421099                basic_machine=sparc-sun
    8431100                ;;
    844         cydra)
     1101        cydra)
    8451102                basic_machine=cydra-cydrome
    8461103                ;;
    8471104        orion)
     
    8561113        pmac | pmac-mpw)
    8571114                basic_machine=powerpc-apple
    8581115                ;;
    859         c4x*)
    860                 basic_machine=c4x-none
    861                 os=-coff
     1116        *-unknown)
     1117                # Make sure to match an already-canonicalized machine name.
    8621118                ;;
    8631119        *)
    8641120                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
     
    9121168              | -aos* \
    9131169              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    9141170              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    915               | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
    916               | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
     1171              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
     1172              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
     1173              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    9171174              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    9181175              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
     1176              | -chorusos* | -chorusrdb* \
    9191177              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    920               | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    921               | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
     1178              | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
     1179              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
     1180              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
     1181              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
     1182              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
     1183              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
     1184              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
    9221185        # Remember, each alternative MUST END IN *, to match a version number.
    9231186                ;;
     1187        -qnx*)
     1188                case $basic_machine in
     1189                    x86-* | i*86-*)
     1190                        ;;
     1191                    *)
     1192                        os=-nto$os
     1193                        ;;
     1194                esac
     1195                ;;
     1196        -nto-qnx*)
     1197                ;;
     1198        -nto*)
     1199                os=`echo $os | sed -e 's|nto|nto-qnx|'`
     1200                ;;
    9241201        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    9251202              | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
    926               | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
     1203              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
    9271204                ;;
    9281205        -mac*)
    9291206                os=`echo $os | sed -e 's|mac|macos|'`
    9301207                ;;
     1208        -linux-dietlibc)
     1209                os=-linux-dietlibc
     1210                ;;
    9311211        -linux*)
    9321212                os=`echo $os | sed -e 's|linux|linux-gnu|'`
    9331213                ;;
     
    9401220        -opened*)
    9411221                os=-openedition
    9421222                ;;
     1223        -os400*)
     1224                os=-os400
     1225                ;;
     1226        -wince*)
     1227                os=-wince
     1228                ;;
    9431229        -osfrose*)
    9441230                os=-osfrose
    9451231                ;;
     
    9551241        -acis*)
    9561242                os=-aos
    9571243                ;;
     1244        -atheos*)
     1245                os=-atheos
     1246                ;;
     1247        -syllable*)
     1248                os=-syllable
     1249                ;;
    9581250        -386bsd)
    9591251                os=-bsd
    9601252                ;;
    9611253        -ctix* | -uts*)
    9621254                os=-sysv
    9631255                ;;
     1256        -nova*)
     1257                os=-rtmk-nova
     1258                ;;
    9641259        -ns2 )
    965                 os=-nextstep2
     1260                os=-nextstep2
     1261                ;;
     1262        -nsk*)
     1263                os=-nsk
    9661264                ;;
    9671265        # Preserve the version number of sinix5.
    9681266        -sinix5.*)
     
    9711269        -sinix*)
    9721270                os=-sysv4
    9731271                ;;
     1272        -tpf*)
     1273                os=-tpf
     1274                ;;
    9741275        -triton*)
    9751276                os=-sysv3
    9761277                ;;
    9771278        -oss*)
    9781279                os=-sysv3
    9791280                ;;
    980         -qnx)
    981                 os=-qnx4
    982                 ;;
    9831281        -svr4)
    9841282                os=-sysv4
    9851283                ;;
     
    10011299        -xenix)
    10021300                os=-xenix
    10031301                ;;
    1004         -*mint | -*MiNT)
    1005                 os=-mint
     1302        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
     1303                os=-mint
     1304                ;;
     1305        -aros*)
     1306                os=-aros
     1307                ;;
     1308        -kaos*)
     1309                os=-kaos
     1310                ;;
     1311        -zvmoe)
     1312                os=-zvmoe
    10061313                ;;
    10071314        -none)
    10081315                ;;
     
    10351342        arm*-semi)
    10361343                os=-aout
    10371344                ;;
    1038         pdp11-*)
     1345    c4x-* | tic4x-*)
     1346        os=-coff
     1347        ;;
     1348        # This must come before the *-dec entry.
     1349        pdp10-*)
     1350                os=-tops20
     1351                ;;
     1352        pdp11-*)
    10391353                os=-none
    10401354                ;;
    10411355        *-dec | vax-*)
     
    10621376        mips*-*)
    10631377                os=-elf
    10641378                ;;
     1379        or32-*)
     1380                os=-coff
     1381                ;;
    10651382        *-tti)  # must be before sparc entry or we get the wrong os.
    10661383                os=-sysv3
    10671384                ;;
     
    10741391        *-ibm)
    10751392                os=-aix
    10761393                ;;
     1394        *-knuth)
     1395                os=-mmixware
     1396                ;;
    10771397        *-wec)
    10781398                os=-proelf
    10791399                ;;
     
    11251445        *-next)
    11261446                os=-nextstep3
    11271447                ;;
    1128         *-gould)
     1448        *-gould)
    11291449                os=-sysv
    11301450                ;;
    1131         *-highlevel)
     1451        *-highlevel)
    11321452                os=-bsd
    11331453                ;;
    11341454        *-encore)
    11351455                os=-bsd
    11361456                ;;
    1137         *-sgi)
     1457        *-sgi)
    11381458                os=-irix
    11391459                ;;
    1140         *-siemens)
     1460        *-siemens)
    11411461                os=-sysv4
    11421462                ;;
    11431463        *-masscomp)
    11441464                os=-rtu
    11451465                ;;
    1146         f301-fujitsu)
     1466        f30[01]-fujitsu | f700-fujitsu)
    11471467                os=-uxpv
    11481468                ;;
    11491469        *-rom68k)
     
    12061526                        -mvs* | -opened*)
    12071527                                vendor=ibm
    12081528                                ;;
     1529                        -os400*)
     1530                                vendor=ibm
     1531                                ;;
    12091532                        -ptx*)
    12101533                                vendor=sequent
    12111534                                ;;
    1212                         -vxsim* | -vxworks*)
     1535                        -tpf*)
     1536                                vendor=ibm
     1537                                ;;
     1538                        -vxsim* | -vxworks* | -windiss*)
    12131539                                vendor=wrs
    12141540                                ;;
    12151541                        -aux*)
     
    12211547                        -mpw* | -macos*)
    12221548                                vendor=apple
    12231549                                ;;
    1224                         -*mint | -*MiNT)
     1550                        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    12251551                                vendor=atari
    12261552                                ;;
     1553                        -vos*)
     1554                                vendor=stratus
     1555                                ;;
    12271556                esac
    12281557                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
    12291558                ;;
    12301559esac
    12311560
    12321561echo $basic_machine$os
     1562exit 0
     1563
     1564# Local variables:
     1565# eval: (add-hook 'write-file-hooks 'time-stamp)
     1566# time-stamp-start: "timestamp='"
     1567# time-stamp-format: "%:y-%02m-%02d"
     1568# time-stamp-end: "'"
     1569# End:
Note: See TracBrowser for help on using the repository browser.