Changeset 5f32e0b in git


Ignore:
Timestamp:
Jun 20, 2003, 6:40:04 PM (21 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f1eb3fef71d066c8f429ed0be5b11f2f8677c577
Parents:
63d3510e4ce4338f12303edb034a00e101e2fe36
Message:
*hannes: ports


git-svn-id: file:///usr/local/Singular/svn/trunk@6813 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
MP
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • MP/config.guess

    r63d351 r5f32e0b  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
    4 #
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
     4#   2000, 2001, 2002 Free Software Foundation, Inc.
     5
     6timestamp='2002-03-20'
     7
    58# This file is free software; you can redistribute it and/or modify it
    69# under the terms of the GNU General Public License as published by
     
    2225# the same distribution terms that you use for the rest of that program.
    2326
    24 # Written by Per Bothner <bothner@cygnus.com>.
    25 # The master version of this file is at the FSF in /home/gd/gnu/lib.
     27# Originally written by Per Bothner <per@bothner.com>.
     28# Please send patches to <config-patches@gnu.org>.  Submit a context
     29# diff and a properly formatted ChangeLog entry.
    2630#
    2731# This script attempts to guess a canonical system name similar to
     
    3034#
    3135# The plan is that this can be called by configure scripts if you
    32 # don't specify an explicit system type (host/target name).
    33 #
    34 # Only a few systems have been added to this list; please add others
    35 # (but try to keep the structure clean).
    36 #
     36# don't specify an explicit build system type.
     37
     38me=`echo "$0" | sed -e 's,.*/,,'`
     39
     40usage="\
     41Usage: $0 [OPTION]
     42
     43Output the configuration name of the system \`$me' is run on.
     44
     45Operation modes:
     46  -h, --help         print this help, then exit
     47  -t, --time-stamp   print date of last modification, then exit
     48  -v, --version      print version number, then exit
     49
     50Report bugs and patches to <config-patches@gnu.org>."
     51
     52version="\
     53GNU config.guess ($timestamp)
     54
     55Originally written by Per Bothner.
     56Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     57Free Software Foundation, Inc.
     58
     59This is free software; see the source for copying conditions.  There is NO
     60warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     61
     62help="
     63Try \`$me --help' for more information."
     64
     65# Parse command line
     66while test $# -gt 0 ; do
     67  case $1 in
     68    --time-stamp | --time* | -t )
     69       echo "$timestamp" ; exit 0 ;;
     70    --version | -v )
     71       echo "$version" ; exit 0 ;;
     72    --help | --h* | -h )
     73       echo "$usage"; exit 0 ;;
     74    -- )     # Stop option processing
     75       shift; break ;;
     76    - ) # Use stdin as input.
     77       break ;;
     78    -* )
     79       echo "$me: invalid option $1$help" >&2
     80       exit 1 ;;
     81    * )
     82       break ;;
     83  esac
     84done
     85
     86if test $# != 0; then
     87  echo "$me: too many arguments$help" >&2
     88  exit 1
     89fi
     90
     91
     92dummy=dummy-$$
     93trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
     94
     95# CC_FOR_BUILD -- compiler used by this script.
     96# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
     97# use `HOST_CC' if defined, but it is deprecated.
     98
     99set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
     100 ,,)    echo "int dummy(){}" > $dummy.c ;
     101        for c in cc gcc c89 c99 ; do
     102          ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
     103          if test $? = 0 ; then
     104             CC_FOR_BUILD="$c"; break ;
     105          fi ;
     106        done ;
     107        rm -f $dummy.c $dummy.o $dummy.rel ;
     108        if test x"$CC_FOR_BUILD" = x ; then
     109          CC_FOR_BUILD=no_compiler_found ;
     110        fi
     111        ;;
     112 ,,*)   CC_FOR_BUILD=$CC ;;
     113 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
     114esac'
    37115
    38116# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
    39 # (ghazi@noc.rutgers.edu 8/24/94.)
     117# (ghazi@noc.rutgers.edu 1994-08-24)
    40118if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
    41119        PATH=$PATH:/.attbin ; export PATH
     
    44122UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
    45123UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
    46 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
     124UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    47125UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    48126
    49 trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
    50 
    51127# Note: order is significant - the case branches are not exclusive.
    52128
    53129case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
    54     alpha:OSF1:[VX]*:*)
    55         # After 1.2, OSF1 uses "V1.3" for uname -r.
    56         # After 4.x, OSF1 uses "X4.x" for uname -r.
    57         echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VX]//'`
     130    *:NetBSD:*:*)
     131        # NetBSD (nbsd) targets should (where applicable) match one or
     132        # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
     133        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
     134        # switched to ELF, *-*-netbsd* would select the old
     135        # object file format.  This provides both forward
     136        # compatibility and a consistent mechanism for selecting the
     137        # object file format.
     138        #
     139        # Note: NetBSD doesn't particularly care about the vendor
     140        # portion of the name.  We always set it to "unknown".
     141        sysctl="sysctl -n hw.machine_arch"
     142        UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
     143            /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
     144        case "${UNAME_MACHINE_ARCH}" in
     145            arm*) machine=arm-unknown ;;
     146            sh3el) machine=shl-unknown ;;
     147            sh3eb) machine=sh-unknown ;;
     148            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
     149        esac
     150        # The Operating System including object format, if it has switched
     151        # to ELF recently, or will in the future.
     152        case "${UNAME_MACHINE_ARCH}" in
     153            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
     154                eval $set_cc_for_build
     155                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
     156                        | grep __ELF__ >/dev/null
     157                then
     158                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
     159                    # Return netbsd for either.  FIX?
     160                    os=netbsd
     161                else
     162                    os=netbsdelf
     163                fi
     164                ;;
     165            *)
     166                os=netbsd
     167                ;;
     168        esac
     169        # The OS release
     170        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     171        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
     172        # contains redundant information, the shorter form:
     173        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
     174        echo "${machine}-${os}${release}"
     175        exit 0 ;;
     176    amiga:OpenBSD:*:*)
     177        echo m68k-unknown-openbsd${UNAME_RELEASE}
     178        exit 0 ;;
     179    arc:OpenBSD:*:*)
     180        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     181        exit 0 ;;
     182    hp300:OpenBSD:*:*)
     183        echo m68k-unknown-openbsd${UNAME_RELEASE}
     184        exit 0 ;;
     185    mac68k:OpenBSD:*:*)
     186        echo m68k-unknown-openbsd${UNAME_RELEASE}
     187        exit 0 ;;
     188    macppc:OpenBSD:*:*)
     189        echo powerpc-unknown-openbsd${UNAME_RELEASE}
     190        exit 0 ;;
     191    mvme68k:OpenBSD:*:*)
     192        echo m68k-unknown-openbsd${UNAME_RELEASE}
     193        exit 0 ;;
     194    mvme88k:OpenBSD:*:*)
     195        echo m88k-unknown-openbsd${UNAME_RELEASE}
     196        exit 0 ;;
     197    mvmeppc:OpenBSD:*:*)
     198        echo powerpc-unknown-openbsd${UNAME_RELEASE}
     199        exit 0 ;;
     200    pmax:OpenBSD:*:*)
     201        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     202        exit 0 ;;
     203    sgi:OpenBSD:*:*)
     204        echo mipseb-unknown-openbsd${UNAME_RELEASE}
     205        exit 0 ;;
     206    sun3:OpenBSD:*:*)
     207        echo m68k-unknown-openbsd${UNAME_RELEASE}
     208        exit 0 ;;
     209    wgrisc:OpenBSD:*:*)
     210        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     211        exit 0 ;;
     212    *:OpenBSD:*:*)
     213        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
    58214        exit 0 ;;
    59215    alpha:OSF1:*:*)
     216        if test $UNAME_RELEASE = "V4.0"; then
     217                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
     218        fi
     219        # A Vn.n version is a released version.
     220        # A Tn.n version is a released field test version.
     221        # A Xn.n version is an unreleased experimental baselevel.
    60222        # 1.2 uses "1.2" for uname -r.
    61         echo alpha-dec-osf${UNAME_RELEASE}
    62         exit 0 ;;
     223        cat <<EOF >$dummy.s
     224        .data
     225\$Lformat:
     226        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
     227
     228        .text
     229        .globl main
     230        .align 4
     231        .ent main
     232main:
     233        .frame \$30,16,\$26,0
     234        ldgp \$29,0(\$27)
     235        .prologue 1
     236        .long 0x47e03d80 # implver \$0
     237        lda \$2,-1
     238        .long 0x47e20c21 # amask \$2,\$1
     239        lda \$16,\$Lformat
     240        mov \$0,\$17
     241        not \$1,\$18
     242        jsr \$26,printf
     243        ldgp \$29,0(\$26)
     244        mov 0,\$16
     245        jsr \$26,exit
     246        .end main
     247EOF
     248        eval $set_cc_for_build
     249        $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
     250        if test "$?" = 0 ; then
     251                case `./$dummy` in
     252                        0-0)
     253                                UNAME_MACHINE="alpha"
     254                                ;;
     255                        1-0)
     256                                UNAME_MACHINE="alphaev5"
     257                                ;;
     258                        1-1)
     259                                UNAME_MACHINE="alphaev56"
     260                                ;;
     261                        1-101)
     262                                UNAME_MACHINE="alphapca56"
     263                                ;;
     264                        2-303)
     265                                UNAME_MACHINE="alphaev6"
     266                                ;;
     267                        2-307)
     268                                UNAME_MACHINE="alphaev67"
     269                                ;;
     270                        2-1307)
     271                                UNAME_MACHINE="alphaev68"
     272                                ;;
     273                esac
     274        fi
     275        rm -f $dummy.s $dummy
     276        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     277        exit 0 ;;
     278    Alpha\ *:Windows_NT*:*)
     279        # How do we know it's Interix rather than the generic POSIX subsystem?
     280        # Should we change UNAME_MACHINE based on the output of uname instead
     281        # of the specific Alpha model?
     282        echo alpha-pc-interix
     283        exit 0 ;;
    63284    21064:Windows_NT:50:3)
    64285        echo alpha-dec-winnt3.5
    65286        exit 0 ;;
    66287    Amiga*:UNIX_System_V:4.0:*)
    67         echo m68k-cbm-sysv4
     288        echo m68k-unknown-sysv4
    68289        exit 0;;
    69     amiga:NetBSD:*:*)
    70       echo m68k-cbm-netbsd${UNAME_RELEASE}
    71       exit 0 ;;
     290    *:[Aa]miga[Oo][Ss]:*:*)
     291        echo ${UNAME_MACHINE}-unknown-amigaos
     292        exit 0 ;;
     293    *:[Mm]orph[Oo][Ss]:*:*)
     294        echo ${UNAME_MACHINE}-unknown-morphos
     295        exit 0 ;;
     296    *:OS/390:*:*)
     297        echo i370-ibm-openedition
     298        exit 0 ;;
    72299    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    73300        echo arm-acorn-riscix${UNAME_RELEASE}
    74301        exit 0;;
    75     Pyramid*:OSx*:*:*)
     302    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
     303        echo hppa1.1-hitachi-hiuxmpp
     304        exit 0;;
     305    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
     306        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
    76307        if test "`(/bin/universe) 2>/dev/null`" = att ; then
    77308                echo pyramid-pyramid-sysv3
     
    80311        fi
    81312        exit 0 ;;
    82     sun4*:SunOS:5.*:*)
     313    NILE*:*:*:dcosx)
     314        echo pyramid-pyramid-svr4
     315        exit 0 ;;
     316    sun4H:SunOS:5.*:*)
     317        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     318        exit 0 ;;
     319    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    83320        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    84321        exit 0 ;;
    85322    i86pc:SunOS:5.*:*)
    86         echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     323        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    87324        exit 0 ;;
    88325    sun4*:SunOS:6*:*)
     
    104341        echo m68k-sun-sunos${UNAME_RELEASE}
    105342        exit 0 ;;
    106     atari*:NetBSD:*:*)
    107         echo m68k-atari-netbsd${UNAME_RELEASE}
    108         exit 0 ;;
    109     sun3*:NetBSD:*:*)
    110         echo m68k-sun-netbsd${UNAME_RELEASE}
    111         exit 0 ;;
    112     mac68k:NetBSD:*:*)
    113         echo m68k-apple-netbsd${UNAME_RELEASE}
     343    sun*:*:4.2BSD:*)
     344        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
     345        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
     346        case "`/bin/arch`" in
     347            sun3)
     348                echo m68k-sun-sunos${UNAME_RELEASE}
     349                ;;
     350            sun4)
     351                echo sparc-sun-sunos${UNAME_RELEASE}
     352                ;;
     353        esac
     354        exit 0 ;;
     355    aushp:SunOS:*:*)
     356        echo sparc-auspex-sunos${UNAME_RELEASE}
     357        exit 0 ;;
     358    # The situation for MiNT is a little confusing.  The machine name
     359    # can be virtually everything (everything which is not
     360    # "atarist" or "atariste" at least should have a processor
     361    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
     362    # to the lowercase version "mint" (or "freemint").  Finally
     363    # the system name "TOS" denotes a system which is actually not
     364    # MiNT.  But MiNT is downward compatible to TOS, so this should
     365    # be no problem.
     366    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
     367        echo m68k-atari-mint${UNAME_RELEASE}
     368        exit 0 ;;
     369    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
     370        echo m68k-atari-mint${UNAME_RELEASE}
     371        exit 0 ;;
     372    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
     373        echo m68k-atari-mint${UNAME_RELEASE}
     374        exit 0 ;;
     375    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
     376        echo m68k-milan-mint${UNAME_RELEASE}
     377        exit 0 ;;
     378    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
     379        echo m68k-hades-mint${UNAME_RELEASE}
     380        exit 0 ;;
     381    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
     382        echo m68k-unknown-mint${UNAME_RELEASE}
     383        exit 0 ;;
     384    powerpc:machten:*:*)
     385        echo powerpc-apple-machten${UNAME_RELEASE}
     386        exit 0 ;;
     387    RISC*:Mach:*:*)
     388        echo mips-dec-mach_bsd4.3
    114389        exit 0 ;;
    115390    RISC*:ULTRIX:*:*)
     
    119394        echo vax-dec-ultrix${UNAME_RELEASE}
    120395        exit 0 ;;
    121     mips:*:4*:UMIPS)
    122         echo mips-mips-riscos4sysv
    123         exit 0 ;;
    124     mips:*:5*:RISCos)
     396    2020:CLIX:*:* | 2430:CLIX:*:*)
     397        echo clipper-intergraph-clix${UNAME_RELEASE}
     398        exit 0 ;;
     399    mips:*:*:UMIPS | mips:*:*:RISCos)
     400        eval $set_cc_for_build
     401        sed 's/^        //' << EOF >$dummy.c
     402#ifdef __cplusplus
     403#include <stdio.h>  /* for printf() prototype */
     404        int main (int argc, char *argv[]) {
     405#else
     406        int main (argc, argv) int argc; char *argv[]; {
     407#endif
     408        #if defined (host_mips) && defined (MIPSEB)
     409        #if defined (SYSTYPE_SYSV)
     410          printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
     411        #endif
     412        #if defined (SYSTYPE_SVR4)
     413          printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
     414        #endif
     415        #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
     416          printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
     417        #endif
     418        #endif
     419          exit (-1);
     420        }
     421EOF
     422        $CC_FOR_BUILD $dummy.c -o $dummy \
     423          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
     424          && rm -f $dummy.c $dummy && exit 0
     425        rm -f $dummy.c $dummy
    125426        echo mips-mips-riscos${UNAME_RELEASE}
     427        exit 0 ;;
     428    Motorola:PowerMAX_OS:*:*)
     429        echo powerpc-motorola-powermax
    126430        exit 0 ;;
    127431    Night_Hawk:Power_UNIX:*:*)
     
    139443    AViiON:dgux:*:*)
    140444        # DG/UX returns AViiON for all architectures
    141         UNAME_PROCESSOR=`uname -p`
    142         if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88100 ] ; then
    143         if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
    144              -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
     445        UNAME_PROCESSOR=`/usr/bin/uname -p`
     446        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
     447        then
     448            if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
     449               [ ${TARGET_BINARY_INTERFACE}x = x ]
     450            then
    145451                echo m88k-dg-dgux${UNAME_RELEASE}
     452            else
     453                echo m88k-dg-dguxbcs${UNAME_RELEASE}
     454            fi
    146455        else
    147                 echo m88k-dg-dguxbcs${UNAME_RELEASE}
    148         fi
    149         else echo i586-dg-dgux${UNAME_RELEASE}
    150         fi
     456            echo i586-dg-dgux${UNAME_RELEASE}
     457        fi
    151458        exit 0 ;;
    152459    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
     
    166473        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
    167474        exit 0 ;;
    168    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
     475    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    169476        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
    170477        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
    171     i[34]86:AIX:*:*)
     478    i*86:AIX:*:*)
    172479        echo i386-ibm-aix
     480        exit 0 ;;
     481    ia64:AIX:*:*)
     482        if [ -x /usr/bin/oslevel ] ; then
     483                IBM_REV=`/usr/bin/oslevel`
     484        else
     485                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
     486        fi
     487        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
    173488        exit 0 ;;
    174489    *:AIX:2:3)
    175490        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
    176                 sed 's/^                //' << EOF >dummy.c
     491                eval $set_cc_for_build
     492                sed 's/^                //' << EOF >$dummy.c
    177493                #include <sys/systemcfg.h>
    178494
     
    185501                        }
    186502EOF
    187                 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
    188                 rm -f dummy.c dummy
     503                $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
     504                rm -f $dummy.c $dummy
    189505                echo rs6000-ibm-aix3.2.5
    190506        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
     
    194510        fi
    195511        exit 0 ;;
    196     *:AIX:*:4)
    197         if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
     512    *:AIX:*:[45])
     513        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
     514        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
    198515                IBM_ARCH=rs6000
    199516        else
     
    203520                IBM_REV=`/usr/bin/oslevel`
    204521        else
    205                 IBM_REV=4.${UNAME_RELEASE}
     522                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    206523        fi
    207524        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
     
    213530        echo romp-ibm-bsd4.4
    214531        exit 0 ;;
    215     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
    216         echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to 
     532    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
     533        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    217534        exit 0 ;;                           # report: romp-ibm BSD 4.3
    218535    *:BOSX:*:*)
     
    228545        echo m68k-hp-bsd4.4
    229546        exit 0 ;;
    230     9000/[3478]??:HP-UX:*:*)
     547    9000/[34678]??:HP-UX:*:*)
     548        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    231549        case "${UNAME_MACHINE}" in
    232550            9000/31? )            HP_ARCH=m68000 ;;
    233551            9000/[34]?? )         HP_ARCH=m68k ;;
    234             9000/7?? | 9000/8?[679] ) HP_ARCH=hppa1.1 ;;
    235             9000/8?? )            HP_ARCH=hppa1.0 ;;
     552            9000/[678][0-9][0-9])
     553                if [ -x /usr/bin/getconf ]; then
     554                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
     555                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
     556                    case "${sc_cpu_version}" in
     557                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
     558                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
     559                      532)                      # CPU_PA_RISC2_0
     560                        case "${sc_kernel_bits}" in
     561                          32) HP_ARCH="hppa2.0n" ;;
     562                          64) HP_ARCH="hppa2.0w" ;;
     563                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
     564                        esac ;;
     565                    esac
     566                fi
     567                if [ "${HP_ARCH}" = "" ]; then
     568                    eval $set_cc_for_build
     569                    sed 's/^              //' << EOF >$dummy.c
     570
     571              #define _HPUX_SOURCE
     572              #include <stdlib.h>
     573              #include <unistd.h>
     574
     575              int main ()
     576              {
     577              #if defined(_SC_KERNEL_BITS)
     578                  long bits = sysconf(_SC_KERNEL_BITS);
     579              #endif
     580                  long cpu  = sysconf (_SC_CPU_VERSION);
     581
     582                  switch (cpu)
     583                {
     584                case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
     585                case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
     586                case CPU_PA_RISC2_0:
     587              #if defined(_SC_KERNEL_BITS)
     588                    switch (bits)
     589                        {
     590                        case 64: puts ("hppa2.0w"); break;
     591                        case 32: puts ("hppa2.0n"); break;
     592                        default: puts ("hppa2.0"); break;
     593                        } break;
     594              #else  /* !defined(_SC_KERNEL_BITS) */
     595                    puts ("hppa2.0"); break;
     596              #endif
     597                default: puts ("hppa1.0"); break;
     598                }
     599                  exit (0);
     600              }
     601EOF
     602                    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
     603                    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
     604                    rm -f $dummy.c $dummy
     605                fi ;;
    236606        esac
     607        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
     608        exit 0 ;;
     609    ia64:HP-UX:*:*)
    237610        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    238         echo ${HP_ARCH}-hp-hpux${HPUX_REV}
     611        echo ia64-hp-hpux${HPUX_REV}
    239612        exit 0 ;;
    240613    3050*:HI-UX:*:*)
    241         sed 's/^        //' << EOF >dummy.c
     614        eval $set_cc_for_build
     615        sed 's/^        //' << EOF >$dummy.c
    242616        #include <unistd.h>
    243617        int
     
    264638        }
    265639EOF
    266         ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
    267         rm -f dummy.c dummy
     640        $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
     641        rm -f $dummy.c $dummy
    268642        echo unknown-hitachi-hiuxwe2
    269643        exit 0 ;;
     
    274648        echo hppa1.0-hp-bsd
    275649        exit 0 ;;
     650    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
     651        echo hppa1.0-hp-mpeix
     652        exit 0 ;;
    276653    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
    277654        echo hppa1.1-hp-osf
     
    279656    hp8??:OSF1:*:*)
    280657        echo hppa1.0-hp-osf
     658        exit 0 ;;
     659    i*86:OSF1:*:*)
     660        if [ -x /usr/sbin/sysversion ] ; then
     661            echo ${UNAME_MACHINE}-unknown-osf1mk
     662        else
     663            echo ${UNAME_MACHINE}-unknown-osf1
     664        fi
    281665        exit 0 ;;
    282666    parisc*:Lites*:*:*)
     
    301685        echo c4-convex-bsd
    302686        exit 0 ;;
    303     CRAY*X-MP:*:*:*)
    304         echo xmp-cray-unicos
     687    CRAY*Y-MP:*:*:*)
     688        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     689        exit 0 ;;
     690    CRAY*[A-Z]90:*:*:*)
     691        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
     692        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
     693              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
     694              -e 's/\.[^.]*$/.X/'
     695        exit 0 ;;
     696    CRAY*TS:*:*:*)
     697        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     698        exit 0 ;;
     699    CRAY*T3D:*:*:*)
     700        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     701        exit 0 ;;
     702    CRAY*T3E:*:*:*)
     703        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     704        exit 0 ;;
     705    CRAY*SV1:*:*:*)
     706        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     707        exit 0 ;;
     708    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
     709        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     710        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
     711        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
     712        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    305713        exit 0 ;;
    306     CRAY*Y-MP:*:*:*)
    307         echo ymp-cray-unicos${UNAME_RELEASE}
    308         exit 0 ;;
    309     CRAY*C90:*:*:*)
    310         echo c90-cray-unicos${UNAME_RELEASE}
    311         exit 0 ;;
    312     CRAY-2:*:*:*)
    313         echo cray2-cray-unicos
    314         exit 0 ;;
    315     hp3[0-9][05]:NetBSD:*:*)
    316         echo m68k-hp-netbsd${UNAME_RELEASE}
    317         exit 0 ;;
    318     i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
     714    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
     715        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
     716        exit 0 ;;
     717    sparc*:BSD/OS:*:*)
     718        echo sparc-unknown-bsdi${UNAME_RELEASE}
     719        exit 0 ;;
     720    *:BSD/OS:*:*)
    319721        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    320722        exit 0 ;;
     
    322724        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
    323725        exit 0 ;;
    324     *:NetBSD:*:*)
    325         echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
    326         exit 0 ;;
    327726    i*:CYGWIN*:*)
    328         echo i386-unknown-cygwin32
     727        echo ${UNAME_MACHINE}-pc-cygwin
     728        exit 0 ;;
     729    i*:MINGW*:*)
     730        echo ${UNAME_MACHINE}-pc-mingw32
     731        exit 0 ;;
     732    i*:PW*:*)
     733        echo ${UNAME_MACHINE}-pc-pw32
     734        exit 0 ;;
     735    x86:Interix*:3*)
     736        echo i386-pc-interix3
     737        exit 0 ;;
     738    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
     739        # How do we know it's Interix rather than the generic POSIX subsystem?
     740        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
     741        # UNAME_MACHINE based on the output of uname instead of i386?
     742        echo i386-pc-interix
     743        exit 0 ;;
     744    i*:UWIN*:*)
     745        echo ${UNAME_MACHINE}-pc-uwin
    329746        exit 0 ;;
    330747    p*:CYGWIN*:*)
    331         echo powerpcle-unknown-cygwin32
     748        echo powerpcle-unknown-cygwin
     749        exit 0 ;;
     750    prep*:SunOS:5.*:*)
     751        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    332752        exit 0 ;;
    333753    *:GNU:*:*)
    334         echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    335         exit 0 ;;
    336     *:Linux:*:*)
     754        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
     755        exit 0 ;;
     756    i*86:Minix:*:*)
     757        echo ${UNAME_MACHINE}-pc-minix
     758        exit 0 ;;
     759    arm*:Linux:*:*)
     760        echo ${UNAME_MACHINE}-unknown-linux-gnu
     761        exit 0 ;;
     762    ia64:Linux:*:*)
     763        echo ${UNAME_MACHINE}-unknown-linux-gnu
     764        exit 0 ;;
     765    m68*:Linux:*:*)
     766        echo ${UNAME_MACHINE}-unknown-linux-gnu
     767        exit 0 ;;
     768    mips:Linux:*:*)
     769        eval $set_cc_for_build
     770        sed 's/^        //' << EOF >$dummy.c
     771        #undef CPU
     772        #undef mips
     773        #undef mipsel
     774        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     775        CPU=mipsel
     776        #else
     777        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     778        CPU=mips
     779        #else
     780        CPU=
     781        #endif
     782        #endif
     783EOF
     784        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     785        rm -f $dummy.c
     786        test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
     787        ;;
     788    ppc:Linux:*:*)
     789        echo powerpc-unknown-linux-gnu
     790        exit 0 ;;
     791    ppc64:Linux:*:*)
     792        echo powerpc64-unknown-linux-gnu
     793        exit 0 ;;
     794    alpha:Linux:*:*)
     795        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     796          EV5)   UNAME_MACHINE=alphaev5 ;;
     797          EV56)  UNAME_MACHINE=alphaev56 ;;
     798          PCA56) UNAME_MACHINE=alphapca56 ;;
     799          PCA57) UNAME_MACHINE=alphapca56 ;;
     800          EV6)   UNAME_MACHINE=alphaev6 ;;
     801          EV67)  UNAME_MACHINE=alphaev67 ;;
     802          EV68*) UNAME_MACHINE=alphaev68 ;;
     803        esac
     804        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
     805        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
     806        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
     807        exit 0 ;;
     808    parisc:Linux:*:* | hppa:Linux:*:*)
     809        # Look for CPU level
     810        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
     811          PA7*) echo hppa1.1-unknown-linux-gnu ;;
     812          PA8*) echo hppa2.0-unknown-linux-gnu ;;
     813          *)    echo hppa-unknown-linux-gnu ;;
     814        esac
     815        exit 0 ;;
     816    parisc64:Linux:*:* | hppa64:Linux:*:*)
     817        echo hppa64-unknown-linux-gnu
     818        exit 0 ;;
     819    s390:Linux:*:* | s390x:Linux:*:*)
     820        echo ${UNAME_MACHINE}-ibm-linux
     821        exit 0 ;;
     822    sh*:Linux:*:*)
     823        echo ${UNAME_MACHINE}-unknown-linux-gnu
     824        exit 0 ;;
     825    sparc:Linux:*:* | sparc64:Linux:*:*)
     826        echo ${UNAME_MACHINE}-unknown-linux-gnu
     827        exit 0 ;;
     828    x86_64:Linux:*:*)
     829        echo x86_64-unknown-linux-gnu
     830        exit 0 ;;
     831    i*86:Linux:*:*)
    337832        # The BFD linker knows what the default object file format is, so
    338         # first see if it will tell us.
    339         ld_help_string=`ld --help 2>&1`
    340         if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then
    341           echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
    342         elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
    343           echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
    344         elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then
    345           echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0
    346         elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
    347           echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
    348         elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
    349           echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
    350         elif test "${UNAME_MACHINE}" = "alpha" ; then
    351           echo alpha-unknown-linux ; exit 0
     833        # first see if it will tell us. cd to the root directory to prevent
     834        # problems with other programs or directories called `ld' in the path.
     835        # Set LC_ALL=C to ensure ld outputs messages in English.
     836        ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
     837                         | sed -ne '/supported targets:/!d
     838                                    s/[         ][      ]*/ /g
     839                                    s/.*supported targets: *//
     840                                    s/ .*//
     841                                    p'`
     842        case "$ld_supported_targets" in
     843          elf32-i386)
     844                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
     845                ;;
     846          a.out-i386-linux)
     847                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
     848                exit 0 ;;               
     849          coff-i386)
     850                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
     851                exit 0 ;;
     852          "")
     853                # Either a pre-BFD a.out linker (linux-gnuoldld) or
     854                # one that does not give us useful --help.
     855                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
     856                exit 0 ;;
     857        esac
     858        # Determine whether the default compiler is a.out or elf
     859        eval $set_cc_for_build
     860        sed 's/^        //' << EOF >$dummy.c
     861        #include <features.h>
     862        #ifdef __ELF__
     863        # ifdef __GLIBC__
     864        #  if __GLIBC__ >= 2
     865        LIBC=gnu
     866        #  else
     867        LIBC=gnulibc1
     868        #  endif
     869        # else
     870        LIBC=gnulibc1
     871        # endif
     872        #else
     873        #ifdef __INTEL_COMPILER
     874        LIBC=gnu
     875        #else
     876        LIBC=gnuaout
     877        #endif
     878        #endif
     879EOF
     880        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
     881        rm -f $dummy.c
     882        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
     883        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
     884        ;;
     885    i*86:DYNIX/ptx:4*:*)
     886        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
     887        # earlier versions are messed up and put the nodename in both
     888        # sysname and nodename.
     889        echo i386-sequent-sysv4
     890        exit 0 ;;
     891    i*86:UNIX_SV:4.2MP:2.*)
     892        # Unixware is an offshoot of SVR4, but it has its own version
     893        # number series starting with 2...
     894        # I am not positive that other SVR4 systems won't match this,
     895        # I just have to hope.  -- rms.
     896        # Use sysv4.2uw... so that sysv4* matches it.
     897        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
     898        exit 0 ;;
     899    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
     900        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
     901        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
     902                echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
    352903        else
    353           # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us
    354           # useful --help.  Gcc wants to distinguish between linuxoldld and linuxaout.
    355           test ! -d /usr/lib/ldscripts/. \
    356             && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0
    357           # Determine whether the default compiler is a.out or elf
    358           cat >dummy.c <<EOF
    359 main(argc, argv)
    360 int argc;
    361 char *argv[];
    362 {
    363 #ifdef __ELF__
    364   printf ("%s-unknown-linux\n", argv[1]);
    365 #else
    366   printf ("%s-unknown-linuxaout\n", argv[1]);
    367 #endif
    368   return 0;
    369 }
    370 EOF
    371           ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
    372           rm -f dummy.c dummy
    373         fi ;;
    374 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
    375 # are messed up and put the nodename in both sysname and nodename.
    376     i[34]86:DYNIX/ptx:4*:*)
    377         echo i386-sequent-sysv4
    378         exit 0 ;;
    379     i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*)
    380         if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
    381                 echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
    382         else
    383                 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
    384         fi
    385         exit 0 ;;
    386     i[34]86:*:3.2:*)
     904                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
     905        fi
     906        exit 0 ;;
     907    i*86:*:5:[78]*)
     908        case `/bin/uname -X | grep "^Machine"` in
     909            *486*)           UNAME_MACHINE=i486 ;;
     910            *Pentium)        UNAME_MACHINE=i586 ;;
     911            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
     912        esac
     913        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
     914        exit 0 ;;
     915    i*86:*:3.2:*)
    387916        if test -f /usr/options/cb.name; then
    388917                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
    389                 echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
     918                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
    390919        elif /bin/uname -X 2>/dev/null >/dev/null ; then
    391920                UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
     
    393922                (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
    394923                        && UNAME_MACHINE=i586
    395                 echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
     924                (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
     925                        && UNAME_MACHINE=i686
     926                (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
     927                        && UNAME_MACHINE=i686
     928                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
    396929        else
    397                 echo ${UNAME_MACHINE}-unknown-sysv32
    398         fi
    399         exit 0 ;;
     930                echo ${UNAME_MACHINE}-pc-sysv32
     931        fi
     932        exit 0 ;;
     933    i*86:*DOS:*:*)
     934        echo ${UNAME_MACHINE}-pc-msdosdjgpp
     935        exit 0 ;;
     936    pc:*:*:*)
     937        # Left here for compatibility:
     938        # uname -m prints for DJGPP always 'pc', but it prints nothing about
     939        # the processor, so we play safe by assuming i386.
     940        echo i386-pc-msdosdjgpp
     941        exit 0 ;;
    400942    Intel:Mach:3*:*)
    401         echo i386-unknown-mach3
     943        echo i386-pc-mach3
    402944        exit 0 ;;
    403945    paragon:*:*:*)
     
    415957        echo m68010-convergent-sysv
    416958        exit 0 ;;
    417     M680[234]0:*:R3V[567]*:*)
     959    M68*:*:R3V[567]*:*)
    418960        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    419     3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0)
    420         uname -p 2>/dev/null | grep 86 >/dev/null \
    421           && echo i486-ncr-sysv4.3 && exit 0 ;;
     961    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
     962        OS_REL=''
     963        test -r /etc/.relid \
     964        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
     965        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
     966          && echo i486-ncr-sysv4.3${OS_REL} && exit 0
     967        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
     968          && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
    422969    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    423         uname -p 2>/dev/null | grep 86 >/dev/null \
     970        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    424971          && echo i486-ncr-sysv4 && exit 0 ;;
    425     m680[234]0:LynxOS:2.[23]*:*)
    426         echo m68k-lynx-lynxos${UNAME_RELEASE}
     972    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
     973        echo m68k-unknown-lynxos${UNAME_RELEASE}
    427974        exit 0 ;;
    428975    mc68030:UNIX_System_V:4.*:*)
    429976        echo m68k-atari-sysv4
    430977        exit 0 ;;
    431     i[34]86:LynxOS:2.[23]*:*)
    432         echo i386-lynx-lynxos${UNAME_RELEASE}
    433         exit 0 ;;
    434     TSUNAMI:LynxOS:2.[23]*:*)
    435         echo sparc-lynx-lynxos${UNAME_RELEASE}
    436         exit 0 ;;
    437     rs6000:LynxOS:2.[23]*:*)
    438         echo rs6000-lynx-lynxos${UNAME_RELEASE}
     978    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
     979        echo i386-unknown-lynxos${UNAME_RELEASE}
     980        exit 0 ;;
     981    TSUNAMI:LynxOS:2.*:*)
     982        echo sparc-unknown-lynxos${UNAME_RELEASE}
     983        exit 0 ;;
     984    rs6000:LynxOS:2.*:*)
     985        echo rs6000-unknown-lynxos${UNAME_RELEASE}
     986        exit 0 ;;
     987    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
     988        echo powerpc-unknown-lynxos${UNAME_RELEASE}
     989        exit 0 ;;
     990    SM[BE]S:UNIX_SV:*:*)
     991        echo mips-dde-sysv${UNAME_RELEASE}
     992        exit 0 ;;
     993    RM*:ReliantUNIX-*:*:*)
     994        echo mips-sni-sysv4
    439995        exit 0 ;;
    440996    RM*:SINIX-*:*:*)
     
    4491005        fi
    4501006        exit 0 ;;
     1007    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
     1008                      # says <Richard.M.Bartel@ccMail.Census.GOV>
     1009        echo i586-unisys-sysv4
     1010        exit 0 ;;
     1011    *:UNIX_System_V:4*:FTX*)
     1012        # From Gerald Hewes <hewes@openmarket.com>.
     1013        # How about differentiating between stratus architectures? -djm
     1014        echo hppa1.1-stratus-sysv4
     1015        exit 0 ;;
     1016    *:*:*:FTX*)
     1017        # From seanf@swdc.stratus.com.
     1018        echo i860-stratus-sysv4
     1019        exit 0 ;;
     1020    *:VOS:*:*)
     1021        # From Paul.Green@stratus.com.
     1022        echo hppa1.1-stratus-vos
     1023        exit 0 ;;
    4511024    mc68*:A/UX:*:*)
    4521025        echo m68k-apple-aux${UNAME_RELEASE}
    4531026        exit 0 ;;
     1027    news*:NEWS-OS:6*:*)
     1028        echo mips-sony-newsos6
     1029        exit 0 ;;
     1030    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
     1031        if [ -d /usr/nec ]; then
     1032                echo mips-nec-sysv${UNAME_RELEASE}
     1033        else
     1034                echo mips-unknown-sysv${UNAME_RELEASE}
     1035        fi
     1036        exit 0 ;;
     1037    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
     1038        echo powerpc-be-beos
     1039        exit 0 ;;
     1040    BeMac:BeOS:*:*)     # BeOS running on Mac or Mac clone, PPC only.
     1041        echo powerpc-apple-beos
     1042        exit 0 ;;
     1043    BePC:BeOS:*:*)      # BeOS running on Intel PC compatible.
     1044        echo i586-pc-beos
     1045        exit 0 ;;
     1046    SX-4:SUPER-UX:*:*)
     1047        echo sx4-nec-superux${UNAME_RELEASE}
     1048        exit 0 ;;
     1049    SX-5:SUPER-UX:*:*)
     1050        echo sx5-nec-superux${UNAME_RELEASE}
     1051        exit 0 ;;
     1052    Power*:Rhapsody:*:*)
     1053        echo powerpc-apple-rhapsody${UNAME_RELEASE}
     1054        exit 0 ;;
     1055    *:Rhapsody:*:*)
     1056        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
     1057        exit 0 ;;
     1058    *:Darwin:*:*)
     1059        echo `uname -p`-apple-darwin${UNAME_RELEASE}
     1060        exit 0 ;;
     1061    *:procnto*:*:* | *:QNX:[0123456789]*:*)
     1062        UNAME_PROCESSOR=`uname -p`
     1063        if test "$UNAME_PROCESSOR" = "x86"; then
     1064                UNAME_PROCESSOR=i386
     1065                UNAME_MACHINE=pc
     1066        fi
     1067        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
     1068        exit 0 ;;
     1069    *:QNX:*:4*)
     1070        echo i386-pc-qnx
     1071        exit 0 ;;
     1072    NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
     1073        echo nsr-tandem-nsk${UNAME_RELEASE}
     1074        exit 0 ;;
     1075    *:NonStop-UX:*:*)
     1076        echo mips-compaq-nonstopux
     1077        exit 0 ;;
     1078    BS2000:POSIX*:*:*)
     1079        echo bs2000-siemens-sysv
     1080        exit 0 ;;
     1081    DS/*:UNIX_System_V:*:*)
     1082        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
     1083        exit 0 ;;
     1084    *:Plan9:*:*)
     1085        # "uname -m" is not consistent, so use $cputype instead. 386
     1086        # is converted to i386 for consistency with other x86
     1087        # operating systems.
     1088        if test "$cputype" = "386"; then
     1089            UNAME_MACHINE=i386
     1090        else
     1091            UNAME_MACHINE="$cputype"
     1092        fi
     1093        echo ${UNAME_MACHINE}-unknown-plan9
     1094        exit 0 ;;
     1095    i*86:OS/2:*:*)
     1096        # If we were able to find `uname', then EMX Unix compatibility
     1097        # is probably installed.
     1098        echo ${UNAME_MACHINE}-pc-os2-emx
     1099        exit 0 ;;
     1100    *:TOPS-10:*:*)
     1101        echo pdp10-unknown-tops10
     1102        exit 0 ;;
     1103    *:TENEX:*:*)
     1104        echo pdp10-unknown-tenex
     1105        exit 0 ;;
     1106    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
     1107        echo pdp10-dec-tops20
     1108        exit 0 ;;
     1109    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
     1110        echo pdp10-xkl-tops20
     1111        exit 0 ;;
     1112    *:TOPS-20:*:*)
     1113        echo pdp10-unknown-tops20
     1114        exit 0 ;;
     1115    *:ITS:*:*)
     1116        echo pdp10-unknown-its
     1117        exit 0 ;;
     1118    i*86:XTS-300:*:STOP)
     1119        echo ${UNAME_MACHINE}-unknown-stop
     1120        exit 0 ;;
     1121    i*86:atheos:*:*)
     1122        echo ${UNAME_MACHINE}-unknown-atheos
     1123        exit 0 ;;
    4541124esac
    4551125
     
    4571127#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
    4581128
    459 cat >dummy.c <<EOF
     1129eval $set_cc_for_build
     1130cat >$dummy.c <<EOF
    4601131#ifdef _SEQUENT_
    4611132# include <sys/types.h>
     
    4951166  int version;
    4961167  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
    497   printf ("%s-next-nextstep%s\n", __ARCHITECTURE__,  version==2 ? "2" : "3");
     1168  if (version < 4)
     1169    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
     1170  else
     1171    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
    4981172  exit (0);
    4991173#endif
     
    5121186
    5131187#if defined (__386BSD__)
    514   printf ("i386-unknown-bsd\n"); exit (0);
     1188  printf ("i386-pc-bsd\n"); exit (0);
    5151189#endif
    5161190
     
    5401214
    5411215#if defined (vax)
    542 #if !defined (ultrix)
    543   printf ("vax-dec-bsd\n"); exit (0);
    544 #else
    545   printf ("vax-dec-ultrix\n"); exit (0);
    546 #endif
     1216# if !defined (ultrix)
     1217#  include <sys/param.h>
     1218#  if defined (BSD)
     1219#   if BSD == 43
     1220      printf ("vax-dec-bsd4.3\n"); exit (0);
     1221#   else
     1222#    if BSD == 199006
     1223      printf ("vax-dec-bsd4.3reno\n"); exit (0);
     1224#    else
     1225      printf ("vax-dec-bsd\n"); exit (0);
     1226#    endif
     1227#   endif
     1228#  else
     1229    printf ("vax-dec-bsd\n"); exit (0);
     1230#  endif
     1231# else
     1232    printf ("vax-dec-ultrix\n"); exit (0);
     1233# endif
    5471234#endif
    5481235
     
    5551242EOF
    5561243
    557 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
    558 rm -f dummy.c dummy
     1244$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
     1245rm -f $dummy.c $dummy
    5591246
    5601247# Apollos put the system type in the environment.
     
    5881275fi
    5891276
    590 #echo '(Unable to guess system type)' 1>&2
     1277cat >&2 <<EOF
     1278$0: unable to guess system type
     1279
     1280This script, last modified $timestamp, has failed to recognize
     1281the operating system you are using. It is advised that you
     1282download the most up to date version of the config scripts from
     1283
     1284    ftp://ftp.gnu.org/pub/gnu/config/
     1285
     1286If the version you run ($0) is already up to date, please
     1287send the following data and any information you think might be
     1288pertinent to <config-patches@gnu.org> in order to provide the needed
     1289information to handle your system.
     1290
     1291config.guess timestamp = $timestamp
     1292
     1293uname -m = `(uname -m) 2>/dev/null || echo unknown`
     1294uname -r = `(uname -r) 2>/dev/null || echo unknown`
     1295uname -s = `(uname -s) 2>/dev/null || echo unknown`
     1296uname -v = `(uname -v) 2>/dev/null || echo unknown`
     1297
     1298/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
     1299/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
     1300
     1301hostinfo               = `(hostinfo) 2>/dev/null`
     1302/bin/universe          = `(/bin/universe) 2>/dev/null`
     1303/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
     1304/bin/arch              = `(/bin/arch) 2>/dev/null`
     1305/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
     1306/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
     1307
     1308UNAME_MACHINE = ${UNAME_MACHINE}
     1309UNAME_RELEASE = ${UNAME_RELEASE}
     1310UNAME_SYSTEM  = ${UNAME_SYSTEM}
     1311UNAME_VERSION = ${UNAME_VERSION}
     1312EOF
    5911313
    5921314exit 1
     1315
     1316# Local variables:
     1317# eval: (add-hook 'write-file-hooks 'time-stamp)
     1318# time-stamp-start: "timestamp='"
     1319# time-stamp-format: "%:y-%02m-%02d"
     1320# time-stamp-end: "'"
     1321# End:
  • MP/config.sub

    r63d351 r5f32e0b  
    11#! /bin/sh
    2 # Configuration validation subroutine script, version 1.1.
    3 #   Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
     2# Configuration validation subroutine script.
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     4#   Free Software Foundation, Inc.
     5
     6timestamp='2001-09-07'
     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
    6 # can handle that machine.  It does not imply ALL GNU software can. 
     10# can handle that machine.  It does not imply ALL GNU software can.
    711#
    812# This file is free software; you can redistribute it and/or modify
     
    2630# the same distribution terms that you use for the rest of that program.
    2731
     32# Please send patches to <config-patches@gnu.org>.
     33#
    2834# Configuration subroutine to validate and canonicalize a configuration type.
    2935# Supply the specified configuration type as an argument.
     
    4248# machine specification into a single specification in the form:
    4349#       CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
     50# or in some cases, the newer four-part form:
     51#       CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
    4452# It is wrong to echo any other type of specification.
    4553
    46 if [ x$1 = x ]
    47 then
    48         echo Configuration name missing. 1>&2
    49         echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
    50         echo "or     $0 ALIAS" 1>&2
    51         echo where ALIAS is a recognized configuration type. 1>&2
    52         exit 1
    53 fi
    54 
    55 # First pass through any local machine types.
    56 case $1 in
    57         *local*)
    58                 echo $1
    59                 exit 0
    60                 ;;
    61         *)
    62         ;;
     54me=`echo "$0" | sed -e 's,.*/,,'`
     55
     56usage="\
     57Usage: $0 [OPTION] CPU-MFR-OPSYS
     58       $0 [OPTION] ALIAS
     59
     60Canonicalize a configuration name.
     61
     62Operation modes:
     63  -h, --help         print this help, then exit
     64  -t, --time-stamp   print date of last modification, then exit
     65  -v, --version      print version number, then exit
     66
     67Report bugs and patches to <config-patches@gnu.org>."
     68
     69version="\
     70GNU config.sub ($timestamp)
     71
     72Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     73Free Software Foundation, Inc.
     74
     75This is free software; see the source for copying conditions.  There is NO
     76warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     77
     78help="
     79Try \`$me --help' for more information."
     80
     81# Parse command line
     82while test $# -gt 0 ; do
     83  case $1 in
     84    --time-stamp | --time* | -t )
     85       echo "$timestamp" ; exit 0 ;;
     86    --version | -v )
     87       echo "$version" ; exit 0 ;;
     88    --help | --h* | -h )
     89       echo "$usage"; exit 0 ;;
     90    -- )     # Stop option processing
     91       shift; break ;;
     92    - ) # Use stdin as input.
     93       break ;;
     94    -* )
     95       echo "$me: invalid option $1$help"
     96       exit 1 ;;
     97
     98    *local*)
     99       # First pass through any local machine types.
     100       echo $1
     101       exit 0;;
     102
     103    * )
     104       break ;;
     105  esac
     106done
     107
     108case $# in
     109 0) echo "$me: missing argument$help" >&2
     110    exit 1;;
     111 1) ;;
     112 *) echo "$me: too many arguments$help" >&2
     113    exit 1;;
    63114esac
    64115
    65 # Separate what the user gave into CPU-COMPANY and OS (if any).
    66 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
    67 if [ $basic_machine != $1 ]
    68 then os=`echo $1 | sed 's/.*-/-/'`
    69 else os=; fi
     116# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
     117# Here we must recognize all the valid KERNEL-OS combinations.
     118maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
     119case $maybe_os in
     120  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
     121    os=-$maybe_os
     122    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     123    ;;
     124  *)
     125    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     126    if [ $basic_machine != $1 ]
     127    then os=`echo $1 | sed 's/.*-/-/'`
     128    else os=; fi
     129    ;;
     130esac
    70131
    71132### Let's recognize common machines as not being operating systems so
     
    82143        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
    83144        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    84         -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
     145        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
     146        -apple | -axis)
    85147                os=
    86148                basic_machine=$1
    87149                ;;
    88         -sim | -cisco | -oki | -wec | -winbond )        # CYGNUS LOCAL
     150        -sim | -cisco | -oki | -wec | -winbond)
    89151                os=
    90152                basic_machine=$1
    91153                ;;
    92         -apple*)                                        # CYGNUS LOCAL
    93                 os=
     154        -scout)
     155                ;;
     156        -wrs)
     157                os=-vxworks
    94158                basic_machine=$1
    95159                ;;
    96         -scout)                                         # CYGNUS LOCAL
    97                 ;;
    98         -wrs)                                           # CYGNUS LOCAL
    99                 os=vxworks
     160        -chorusos*)
     161                os=-chorusos
    100162                basic_machine=$1
    101163                ;;
     164        -chorusrdb)
     165                os=-chorusrdb
     166                basic_machine=$1
     167                ;;
    102168        -hiux*)
    103169                os=-hiuxwe2
    104170                ;;
     171        -sco5)
     172                os=-sco3.2v5
     173                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     174                ;;
    105175        -sco4)
    106176                os=-sco3.2v4
    107                 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
     177                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    108178                ;;
    109179        -sco3.2.[4-9]*)
    110180                os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
    111                 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
     181                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    112182                ;;
    113183        -sco3.2v[4-9]*)
    114184                # Don't forget version if it is 3.2v4 or newer.
    115                 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
     185                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    116186                ;;
    117187        -sco*)
    118188                os=-sco3.2v2
    119                 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
     189                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     190                ;;
     191        -udk*)
     192                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    120193                ;;
    121194        -isc)
    122195                os=-isc2.2
    123                 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
     196                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    124197                ;;
    125198        -clix*)
     
    127200                ;;
    128201        -isc*)
    129                 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
     202                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    130203                ;;
    131204        -lynx*)
     
    137210        -windowsnt*)
    138211                os=`echo $os | sed -e 's/windowsnt/winnt/'`
     212                ;;
     213        -psos*)
     214                os=-psos
     215                ;;
     216        -mint | -mint[0-9]*)
     217                basic_machine=m68k-atari
     218                os=-mint
    139219                ;;
    140220esac
     
    144224        # Recognize the basic CPU types without company name.
    145225        # Some are omitted here because they have special meanings below.
    146         tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm | armeb \
    147                 | armel | pyramid \
    148                 | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
    149                 | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
    150                 | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
    151                 | pdp11 | mips64el | mips64orion | mips64orionel \
    152                 | sparc | supersparc | microsparc | ultrasparc)
     226        1750a | 580 \
     227        | a29k \
     228        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
     229        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
     230        | c4x | clipper \
     231        | d10v | d30v | dsp16xx \
     232        | fr30 \
     233        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
     234        | i370 | i860 | i960 | ia64 \
     235        | m32r | m68000 | m68k | m88k | mcore \
     236        | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
     237        | mips64vr4100 | mips64vr4100el | mips64vr4300 \
     238        | mips64vr4300el | mips64vr5000 | mips64vr5000el \
     239        | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
     240        | mipsisa32 \
     241        | mn10200 | mn10300 \
     242        | ns16k | ns32k \
     243        | openrisc \
     244        | pdp10 | pdp11 | pj | pjl \
     245        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
     246        | pyramid \
     247        | s390 | s390x \
     248        | sh | sh[34] | sh[34]eb | shbe | shle \
     249        | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
     250        | stormy16 | strongarm \
     251        | tahoe | thumb | tic80 | tron \
     252        | v850 \
     253        | we32k \
     254        | x86 | xscale \
     255        | z8k)
    153256                basic_machine=$basic_machine-unknown
    154257                ;;
    155         m88110 | m680[012346]0 | m683?2 | m68360 | z8k | v70 | h8500 | w65) # CYGNUS LOCAL
     258        m6811 | m68hc11 | m6812 | m68hc12)
     259                # Motorola 68HC11/12.
    156260                basic_machine=$basic_machine-unknown
    157                 ;;
    158         mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith
    159                 basic_machine=$basic_machine-unknown
    160                 ;;
     261                os=-none
     262                ;;
     263        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
     264                ;;
     265
     266        # We use `pc' rather than `unknown'
     267        # because (1) that's what they normally are, and
     268        # (2) the word "unknown" tends to confuse beginning users.
     269        i*86 | x86_64)
     270          basic_machine=$basic_machine-pc
     271          ;;
    161272        # Object if more than one company name word.
    162273        *-*-*)
     
    165276                ;;
    166277        # Recognize the basic CPU types with company name.
    167         vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
    168               | sparc-* | ns32k-* | fx80-* | arm-* | arme[lb]-* | c[123]* \
    169               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
    170               | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
    171               | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
    172               | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
    173               | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* \
    174               | mips64-* | mipsel-* | mips64el-* | mips64orion-* \
    175               | mips64orionel-* | supersparc-* | microsparc-* | ultrasparc-*)
    176                 ;;
    177         m88110-* | m680[012346]0-* | m683?2-* | m68360-* | z8k-* | h8500-*) # CYGNUS LOCAL
    178                 ;;
    179         mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith
     278        580-* \
     279        | a29k-* \
     280        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
     281        | alphapca5[67]-* | arc-* \
     282        | arm-*  | armbe-* | armle-* | armv*-* \
     283        | bs2000-* \
     284        | c[123]* | c30-* | [cjt]90-* | c54x-* \
     285        | clipper-* | cray2-* | cydra-* \
     286        | d10v-* | d30v-* \
     287        | elxsi-* \
     288        | f30[01]-* | f700-* | fr30-* | fx80-* \
     289        | h8300-* | h8500-* \
     290        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
     291        | i*86-* | i860-* | i960-* | ia64-* \
     292        | m32r-* \
     293        | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
     294        | m88110-* | m88k-* | mcore-* \
     295        | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
     296        | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
     297        | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
     298        | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
     299        | none-* | np1-* | ns16k-* | ns32k-* \
     300        | orion-* \
     301        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     302        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
     303        | pyramid-* \
     304        | romp-* | rs6000-* \
     305        | s390-* | s390x-* \
     306        | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
     307        | sparc-* | sparc64-* | sparc86x-* | sparclite-* \
     308        | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
     309        | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
     310        | v850-* | vax-* \
     311        | we32k-* \
     312        | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
     313        | ymp-* \
     314        | z8k-*)
    180315                ;;
    181316        # Recognize the various machine names and aliases which stand
    182317        # for a CPU type and a company and sometimes even an OS.
    183         386bsd)                                         # CYGNUS LOCAL
     318        386bsd)
    184319                basic_machine=i386-unknown
    185320                os=-bsd
     
    191326                basic_machine=we32k-att
    192327                ;;
    193         a29khif)                                        # CYGNUS LOCAL
     328        a29khif)
    194329                basic_machine=a29k-amd
    195330                os=-udi
    196331                ;;
    197         adobe68k)                                       # CYGNUS LOCAL
     332        adobe68k)
    198333                basic_machine=m68010-adobe
    199334                os=-scout
     
    214349                ;;
    215350        amiga | amiga-*)
    216                 basic_machine=m68k-cbm
    217                 ;;
    218         amigados)
    219                 basic_machine=m68k-cbm
    220                 os=-amigados
     351                basic_machine=m68k-unknown
     352                ;;
     353        amigaos | amigados)
     354                basic_machine=m68k-unknown
     355                os=-amigaos
    221356                ;;
    222357        amigaunix | amix)
    223                 basic_machine=m68k-cbm
     358                basic_machine=m68k-unknown
    224359                os=-sysv4
    225360                ;;
     
    228363                os=-sysv
    229364                ;;
    230         apollo68bsd)                                    # CYGNUS LOCAL
     365        apollo68bsd)
    231366                basic_machine=m68k-apollo
    232367                os=-bsd
    233368                ;;
    234         arm | armel | armeb)
    235                 basic_machine=arm-arm
    236                 os=-aout
     369        aux)
     370                basic_machine=m68k-apple
     371                os=-aux
    237372                ;;
    238373        balance)
     
    240375                os=-dynix
    241376                ;;
    242         [ctj]90-cray)
    243                 basic_machine=c90-cray
    244                 os=-unicos
    245                 ;;
    246377        convex-c1)
    247378                basic_machine=c1-convex
     
    272403                os=-unicos
    273404                ;;
     405        [cjt]90)
     406                basic_machine=${basic_machine}-cray
     407                os=-unicos
     408                ;;
    274409        crds | unos)
    275410                basic_machine=m68k-crds
     411                ;;
     412        cris | cris-* | etrax*)
     413                basic_machine=cris-axis
    276414                ;;
    277415        da30 | da30-*)
     
    308446                basic_machine=ns32k-encore
    309447                ;;
    310         es1800 | OSE68k | ose68k | ose | OSE)           # CYGNUS LOCAL
     448        es1800 | OSE68k | ose68k | ose | OSE)
    311449                basic_machine=m68k-ericsson
    312450                os=-ose
     
    322460                os=-sysv
    323461                ;;
     462        go32)
     463                basic_machine=i386-pc
     464                os=-go32
     465                ;;
    324466        h3050r* | hiux*)
    325467                basic_machine=hppa1.1-hitachi
     
    330472                os=-hms
    331473                ;;
    332         h8300xray)                                      # CYGNUS LOCAL
     474        h8300xray)
    333475                basic_machine=h8300-hitachi
    334476                os=-xray
    335477                ;;
    336         h8500hms)                                       # CYGNUS LOCAL
     478        h8500hms)
    337479                basic_machine=h8500-hitachi
    338480                os=-hms
     
    353495                os=-hpux
    354496                ;;
    355         w89k-*)                                         # CYGNUS LOCAL
    356                 basic_machine=hppa1.1-winbond
    357                 os=-proelf
    358                 ;;
    359         op50n-*)                                        # CYGNUS LOCAL
    360                 basic_machine=hppa1.1-oki
    361                 os=-proelf
    362                 ;;
    363         op60c-*)                                        # CYGNUS LOCAL
    364                 basic_machine=hppa1.1-oki
    365                 os=-proelf
    366                 ;;
    367         hppro)                                          # CYGNUS LOCAL
    368                 basic_machine=hppa1.1-hp
    369                 os=-proelf
    370                 ;;
     497        hp3k9[0-9][0-9] | hp9[0-9][0-9])
     498                basic_machine=hppa1.0-hp
     499                ;;
    371500        hp9k2[0-9][0-9] | hp9k31[0-9])
    372501                basic_machine=m68000-hp
     
    375504                basic_machine=m68k-hp
    376505                ;;
    377         hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
     506        hp9k6[0-9][0-9] | hp6[0-9][0-9])
     507                basic_machine=hppa1.0-hp
     508                ;;
     509        hp9k7[0-79][0-9] | hp7[0-79][0-9])
     510                basic_machine=hppa1.1-hp
     511                ;;
     512        hp9k78[0-9] | hp78[0-9])
     513                # FIXME: really hppa2.0-hp
     514                basic_machine=hppa1.1-hp
     515                ;;
     516        hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
     517                # FIXME: really hppa2.0-hp
     518                basic_machine=hppa1.1-hp
     519                ;;
     520        hp9k8[0-9][13679] | hp8[0-9][13679])
    378521                basic_machine=hppa1.1-hp
    379522                ;;
     
    381524                basic_machine=hppa1.0-hp
    382525                ;;
    383         hppaosf)                                        # CYGNUS LOCAL
     526        hppa-next)
     527                os=-nextstep3
     528                ;;
     529        hppaosf)
    384530                basic_machine=hppa1.1-hp
    385531                os=-osf
    386532                ;;
     533        hppro)
     534                basic_machine=hppa1.1-hp
     535                os=-proelf
     536                ;;
    387537        i370-ibm* | ibm*)
    388538                basic_machine=i370-ibm
    389                 os=-mvs
    390539                ;;
    391540# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
    392         i[3456]86v32)
    393                 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
     541        i*86v32)
     542                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    394543                os=-sysv32
    395544                ;;
    396         i[3456]86v4*)
    397                 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
     545        i*86v4*)
     546                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    398547                os=-sysv4
    399548                ;;
    400         i[3456]86v)
    401                 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
     549        i*86v)
     550                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    402551                os=-sysv
    403552                ;;
    404         i[3456]86sol2)
    405                 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
     553        i*86sol2)
     554                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    406555                os=-solaris2
    407556                ;;
    408         i386mach)                                       # CYGNUS LOCAL
     557        i386mach)
    409558                basic_machine=i386-mach
    410559                os=-mach
    411560                ;;
    412         i386-vsta | vsta)                               # CYGNUS LOCAL
     561        i386-vsta | vsta)
    413562                basic_machine=i386-unknown
    414563                os=-vsta
    415                 ;;
    416         i386-go32 | go32)                               # CYGNUS LOCAL
    417                 basic_machine=i386-unknown
    418                 os=-go32
    419564                ;;
    420565        iris | iris4d)
     
    443588                os=-sysv
    444589                ;;
     590        mingw32)
     591                basic_machine=i386-pc
     592                os=-mingw32
     593                ;;
    445594        miniframe)
    446595                basic_machine=m68000-convergent
    447596                ;;
     597        *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
     598                basic_machine=m68k-atari
     599                os=-mint
     600                ;;
     601        mipsel*-linux*)
     602                basic_machine=mipsel-unknown
     603                os=-linux-gnu
     604                ;;
     605        mips*-linux*)
     606                basic_machine=mips-unknown
     607                os=-linux-gnu
     608                ;;
    448609        mips3*-*)
    449610                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
     
    452613                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    453614                ;;
    454         monitor)                                        # CYGNUS LOCAL
     615        mmix*)
     616                basic_machine=mmix-knuth
     617                os=-mmixware
     618                ;;
     619        monitor)
    455620                basic_machine=m68k-rom68k
    456621                os=-coff
    457622                ;;
    458         msdos)                                          # CYGNUS LOCAL
    459                 basic_machine=i386-unknown     
     623        msdos)
     624                basic_machine=i386-pc
    460625                os=-msdos
     626                ;;
     627        mvs)
     628                basic_machine=i370-ibm
     629                os=-mvs
    461630                ;;
    462631        ncr3000)
     
    465634                ;;
    466635        netbsd386)
    467                 basic_machine=i386-unknown              # CYGNUS LOCAL
     636                basic_machine=i386-unknown
    468637                os=-netbsd
     638                ;;
     639        netwinder)
     640                basic_machine=armv4l-rebel
     641                os=-linux
    469642                ;;
    470643        news | news700 | news800 | news900)
     
    480653                os=-newsos
    481654                ;;
    482         necv70)                                         # CYGNUS LOCAL
     655        necv70)
    483656                basic_machine=v70-nec
    484657                os=-sysv
     
    509682                os=-nindy
    510683                ;;
     684        mon960)
     685                basic_machine=i960-intel
     686                os=-mon960
     687                ;;
     688        nonstopux)
     689                basic_machine=mips-compaq
     690                os=-nonstopux
     691                ;;
    511692        np1)
    512693                basic_machine=np1-gould
    513694                ;;
    514         OSE68000 | ose68000)                            # CYGNUS LOCAL
     695        nsr-tandem)
     696                basic_machine=nsr-tandem
     697                ;;
     698        op50n-* | op60c-*)
     699                basic_machine=hppa1.1-oki
     700                os=-proelf
     701                ;;
     702        OSE68000 | ose68000)
    515703                basic_machine=m68000-ericsson
    516704                os=-ose
    517705                ;;
    518         os68k)                                          # CYGNUS LOCAL
     706        os68k)
    519707                basic_machine=m68k-none
    520708                os=-os68k
     
    537725                basic_machine=ns32k-pc532
    538726                ;;
    539         pentium | p5)
    540                 basic_machine=i586-intel
    541                 ;;
    542         pentiumpro | p6)
    543                 basic_machine=i686-intel
    544                 ;;
    545         pentium-* | p5-*)
     727        pentium | p5 | k5 | k6 | nexgen)
     728                basic_machine=i586-pc
     729                ;;
     730        pentiumpro | p6 | 6x86 | athlon)
     731                basic_machine=i686-pc
     732                ;;
     733        pentiumii | pentium2)
     734                basic_machine=i686-pc
     735                ;;
     736        pentium-* | p5-* | k5-* | k6-* | nexgen-*)
    546737                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
    547738                ;;
    548         pentiumpro-* | p6-*)
     739        pentiumpro-* | p6-* | 6x86-* | athlon-*)
    549740                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    550741                ;;
    551         k5)
    552                 # We don't have specific support for AMD's K5 yet, so just call it a Pentium
    553                 basic_machine=i586-amd
    554                 ;;
    555         nexgen)
    556                 # We don't have specific support for Nexgen yet, so just call it a Pentium
    557                 basic_machine=i586-nexgen
     742        pentiumii-* | pentium2-*)
     743                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    558744                ;;
    559745        pn)
    560746                basic_machine=pn-gould
    561747                ;;
    562         power)  basic_machine=rs6000-ibm
     748        power)  basic_machine=power-ibm
    563749                ;;
    564750        ppc)    basic_machine=powerpc-unknown
     
    572758                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
    573759                ;;
     760        ppc64)  basic_machine=powerpc64-unknown
     761                ;;
     762        ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
     763                ;;
     764        ppc64le | powerpc64little | ppc64-le | powerpc64-little)
     765                basic_machine=powerpc64le-unknown
     766                ;;
     767        ppc64le-* | powerpc64little-*)
     768                basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
     769                ;;
    574770        ps2)
    575771                basic_machine=i386-ibm
    576772                ;;
    577         rom68k)                                         # CYGNUS LOCAL
     773        pw32)
     774                basic_machine=i586-unknown
     775                os=-pw32
     776                ;;
     777        rom68k)
    578778                basic_machine=m68k-rom68k
    579779                os=-coff
     
    585785                basic_machine=romp-ibm
    586786                ;;
    587         sa29200)                                        # CYGNUS LOCAL
     787        sa29200)
    588788                basic_machine=a29k-amd
    589789                os=-udi
     
    596796                os=-hms
    597797                ;;
    598         sparclite-wrs)                                  # CYGNUS LOCAL
     798        sparclite-wrs)
    599799                basic_machine=sparclite-wrs
    600800                os=-vxworks
    601                 ;;
    602         sparcfrw)                                       # CYGNUS LOCAL
    603                 basic_machine=sparcfrw-sun
    604                 os=-sunos4
    605                 ;;
    606         sparcfrwcompat)                                 # CYGNUS LOCAL
    607                 basic_machine=sparcfrwcompat-sun
    608                 os=-sunos4
    609                 ;;
    610         sparclitefrw)                                   # CYGNUS LOCAL
    611                 basic_machine=sparclitefrw-fujitsu
    612                 ;;
    613         sparclitefrwcompat)                             # CYGNUS LOCAL
    614                 basic_machine=sparclitefrwcompat-fujitsu
    615801                ;;
    616802        sps7)
     
    621807                basic_machine=spur-unknown
    622808                ;;
    623         st2000)                                         # CYGNUS LOCAL
     809        st2000)
    624810                basic_machine=m68k-tandem
    625811                ;;
    626         stratus)                                        # CYGNUS LOCAL
     812        stratus)
    627813                basic_machine=i860-stratus
    628814                os=-sysv4
     
    668854                basic_machine=i386-sun
    669855                ;;
     856        sv1)
     857                basic_machine=sv1-cray
     858                os=-unicos
     859                ;;
    670860        symmetry)
    671861                basic_machine=i386-sequent
    672862                os=-dynix
    673863                ;;
     864        t3e)
     865                basic_machine=t3e-cray
     866                os=-unicos
     867                ;;
     868        tic54x | c54x*)
     869                basic_machine=tic54x-unknown
     870                os=-coff
     871                ;;
     872        tx39)
     873                basic_machine=mipstx39-unknown
     874                ;;
     875        tx39el)
     876                basic_machine=mipstx39el-unknown
     877                ;;
    674878        tower | tower-32)
    675879                basic_machine=m68k-ncr
     
    683887                os=-sym1
    684888                ;;
    685         v810 | necv810)                                 # CYGNUS LOCAL
     889        v810 | necv810)
    686890                basic_machine=v810-nec
    687891                os=-none
     
    695899                os=-vms
    696900                ;;
     901        vpp*|vx|vx-*)
     902               basic_machine=f301-fujitsu
     903               ;;
    697904        vxworks960)
    698905                basic_machine=i960-wrs
     
    703910                os=-vxworks
    704911                ;;
    705         vxworks29k)                                     # CYGNUS LOCAL
    706                 basic_machine=a29k-wrs
    707                 os=-vxworks
    708                 ;;
    709         w65*)                                           # CYGNUS LOCAL
    710                 basic_machine=w65-wdc
    711                 os=-none
     912        vxworks29k)
     913                basic_machine=a29k-wrs
     914                os=-vxworks
     915                ;;
     916        w65*)
     917                basic_machine=w65-wdc
     918                os=-none
     919                ;;
     920        w89k-*)
     921                basic_machine=hppa1.1-winbond
     922                os=-proelf
     923                ;;
     924        windows32)
     925                basic_machine=i386-pc
     926                os=-windows32-msvcrt
    712927                ;;
    713928        xmp)
     
    718933                basic_machine=xps100-honeywell
    719934                ;;
    720         z8k-*-coff)                                     # CYGNUS LOCAL
     935        z8k-*-coff)
    721936                basic_machine=z8k-unknown
    722937                os=-sim
     
    729944# Here we handle the default manufacturer of certain CPU types.  It is in
    730945# some cases the only manufacturer, in others, it is the most popular.
    731         w89k)                                           # CYGNUS LOCAL
     946        w89k)
    732947                basic_machine=hppa1.1-winbond
    733948                ;;
    734         op50n)                                          # CYGNUS LOCAL
     949        op50n)
    735950                basic_machine=hppa1.1-oki
    736951                ;;
    737         op60c)                                          # CYGNUS LOCAL
     952        op60c)
    738953                basic_machine=hppa1.1-oki
    739954                ;;
    740955        mips)
    741                 basic_machine=mips-mips
     956                if [ x$os = x-linux-gnu ]; then
     957                        basic_machine=mips-unknown
     958                else
     959                        basic_machine=mips-mips
     960                fi
    742961                ;;
    743962        romp)
     
    750969                basic_machine=vax-dec
    751970                ;;
     971        pdp10)
     972                # there are many clones, so DEC is not a safe bet
     973                basic_machine=pdp10-unknown
     974                ;;
    752975        pdp11)
    753976                basic_machine=pdp11-dec
     
    756979                basic_machine=we32k-att
    757980                ;;
    758         sparc)
     981        sh3 | sh4 | sh3eb | sh4eb)
     982                basic_machine=sh-unknown
     983                ;;
     984        sparc | sparcv9 | sparcv9b)
    759985                basic_machine=sparc-sun
    760986                ;;
     
    768994                basic_machine=clipper-highlevel
    769995                ;;
    770         mac | mpw | mac-mpw)                            # CYGNUS LOCAL
     996        mac | mpw | mac-mpw)
    771997                basic_machine=m68k-apple
    772998                ;;
    773         pmac | pmac-mpw)                                # CYGNUS LOCAL
     999        pmac | pmac-mpw)
    7741000                basic_machine=powerpc-apple
     1001                ;;
     1002        c4x*)
     1003                basic_machine=c4x-none
     1004                os=-coff
     1005                ;;
     1006        *-unknown)
     1007                # Make sure to match an already-canonicalized machine name.
    7751008                ;;
    7761009        *)
     
    7971030then
    7981031case $os in
     1032        # First match some system type aliases
     1033        # that might get confused with valid system types.
    7991034        # -solaris* is a basic system type, with this one exception.
    8001035        -solaris1 | -solaris1.*)
     
    8041039                os=-solaris2
    8051040                ;;
    806         -unixware* | svr4*)
     1041        -svr4*)
    8071042                os=-sysv4
    8081043                ;;
     1044        -unixware*)
     1045                os=-sysv4.2uw
     1046                ;;
    8091047        -gnu/linux*)
    810                 os=`echo $os | sed -e 's|gnu/linux|linux|'`
     1048                os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
    8111049                ;;
    8121050        # First accept the basic system types.
    8131051        # The portable systems comes first.
    814         # Each alternative must end in a *, to match a version number.
     1052        # Each alternative MUST END IN A *, to match a version number.
    8151053        # -sysv* is not here because it comes later, after sysvr4.
    816         -gnu* | -bsd* | -mach* | -lites* | -minix* | -genix* | -ultrix* | -irix* \
    817               | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \
     1054        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
     1055              | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
    8181056              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
    819               | -amigados* | -msdos* | -moss* | -newsos* | -unicos* | -aos* \
    820               | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
    821               | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
    822               | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix*  | -lites* \
    823               | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
    824               | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta | -udi \
    825               | -eabi* | -ieee*)
    826                 ;;
    827         # CYGNUS LOCAL
    828         -go32 | -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    829               | -windows* | -osx | -abug |  -netware* | -proelf | -os9* \
    830               | -macos* | -mpw* | -magic* | -pe* | -win32)
    831                 ;;
    832         -mac*)                                          # CYGNUS LOCAL
     1057              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
     1058              | -aos* \
     1059              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
     1060              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
     1061              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
     1062              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
     1063              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
     1064              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
     1065              | -chorusos* | -chorusrdb* \
     1066              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
     1067              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
     1068              | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
     1069              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
     1070              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
     1071              | -os2* | -vos*)
     1072        # Remember, each alternative MUST END IN *, to match a version number.
     1073                ;;
     1074        -qnx*)
     1075                case $basic_machine in
     1076                    x86-* | i*86-*)
     1077                        ;;
     1078                    *)
     1079                        os=-nto$os
     1080                        ;;
     1081                esac
     1082                ;;
     1083        -nto*)
     1084                os=-nto-qnx
     1085                ;;
     1086        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
     1087              | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
     1088              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
     1089                ;;
     1090        -mac*)
    8331091                os=`echo $os | sed -e 's|mac|macos|'`
     1092                ;;
     1093        -linux*)
     1094                os=`echo $os | sed -e 's|linux|linux-gnu|'`
    8341095                ;;
    8351096        -sunos5*)
     
    8391100                os=`echo $os | sed -e 's|sunos6|solaris3|'`
    8401101                ;;
     1102        -opened*)
     1103                os=-openedition
     1104                ;;
     1105        -wince*)
     1106                os=-wince
     1107                ;;
    8411108        -osfrose*)
    8421109                os=-osfrose
     
    8541121                os=-aos
    8551122                ;;
    856         -386bsd)                                        # CYGNUS LOCAL
     1123        -386bsd)
    8571124                os=-bsd
    8581125                ;;
    8591126        -ctix* | -uts*)
    8601127                os=-sysv
     1128                ;;
     1129        -ns2 )
     1130                os=-nextstep2
     1131                ;;
     1132        -nsk*)
     1133                os=-nsk
    8611134                ;;
    8621135        # Preserve the version number of sinix5.
     
    8851158        -sysv*)
    8861159                ;;
    887         -ose*)                                          # CYGNUS LOCAL
     1160        -ose*)
    8881161                os=-ose
    8891162                ;;
    890         -es1800*)                                       # CYGNUS LOCAL
     1163        -es1800*)
    8911164                os=-ose
    8921165                ;;
    8931166        -xenix)
    8941167                os=-xenix
     1168                ;;
     1169        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
     1170                os=-mint
    8951171                ;;
    8961172        -none)
     
    9191195                os=-riscix1.2
    9201196                ;;
     1197        arm*-rebel)
     1198                os=-linux
     1199                ;;
     1200        arm*-semi)
     1201                os=-aout
     1202                ;;
     1203        pdp10-*)
     1204                os=-tops20
     1205                ;;
    9211206        pdp11-*)
    9221207                os=-none
     
    9371222                # os=-sunos4
    9381223                ;;
    939         m68*-cisco)                                     # CYGNUS LOCAL
     1224        m68*-cisco)
    9401225                os=-aout
    9411226                ;;
    942         mips*-cisco)                                    # CYGNUS LOCAL
     1227        mips*-cisco)
     1228                os=-elf
     1229                ;;
     1230        mips*-*)
    9431231                os=-elf
    9441232                ;;
     
    9491237                os=-sunos4.1.1
    9501238                ;;
     1239        *-be)
     1240                os=-beos
     1241                ;;
    9511242        *-ibm)
    9521243                os=-aix
    9531244                ;;
    954         *-wec)                                          # CYGNUS LOCAL
     1245        *-wec)
    9551246                os=-proelf
    9561247                ;;
    957         *-winbond)                                      # CYGNUS LOCAL
     1248        *-winbond)
    9581249                os=-proelf
    9591250                ;;
    960         *-oki)                                          # CYGNUS LOCAL
     1251        *-oki)
    9611252                os=-proelf
    9621253                ;;
     
    9711262                ;;
    9721263        *-cbm)
    973                 os=-amigados
     1264                os=-amigaos
    9741265                ;;
    9751266        *-dg)
     
    9851276                os=-luna
    9861277                ;;
     1278        *-next )
     1279                os=-nextstep
     1280                ;;
    9871281        *-sequent)
    9881282                os=-ptx
     
    10181312                os=-rtu
    10191313                ;;
    1020         *-rom68k)                                       # CYGNUS LOCAL
     1314        f30[01]-fujitsu | f700-fujitsu)
     1315                os=-uxpv
     1316                ;;
     1317        *-rom68k)
    10211318                os=-coff
    10221319                ;;
    1023         *-*bug)                                         # CYGNUS LOCAL
     1320        *-*bug)
    10241321                os=-coff
    10251322                ;;
    1026         *-apple)                                        # CYGNUS LOCAL
     1323        *-apple)
    10271324                os=-macos
     1325                ;;
     1326        *-atari*)
     1327                os=-mint
    10281328                ;;
    10291329        *)
     
    10451345                                vendor=sun
    10461346                                ;;
    1047                         -bosx*)                         # CYGNUS LOCAL
    1048                                 vendor=bull
    1049                                 ;;
    1050                         -lynxos*)
    1051                                 vendor=lynx
    1052                                 ;;
    10531347                        -aix*)
    10541348                                vendor=ibm
    10551349                                ;;
     1350                        -beos*)
     1351                                vendor=be
     1352                                ;;
    10561353                        -hpux*)
    10571354                                vendor=hp
    10581355                                ;;
     1356                        -mpeix*)
     1357                                vendor=hp
     1358                                ;;
    10591359                        -hiux*)
    10601360                                vendor=hitachi
     
    10721372                                vendor=ns
    10731373                                ;;
    1074                         -mvs*)
     1374                        -mvs* | -opened*)
    10751375                                vendor=ibm
    10761376                                ;;
     
    10781378                                vendor=sequent
    10791379                                ;;
    1080                         -vxworks*)
     1380                        -vxsim* | -vxworks*)
    10811381                                vendor=wrs
    10821382                                ;;
    1083                         -hms*)                          # CYGNUS LOCAL
     1383                        -aux*)
     1384                                vendor=apple
     1385                                ;;
     1386                        -hms*)
    10841387                                vendor=hitachi
    10851388                                ;;
    1086                         -mpw* | -macos*)                # CYGNUS LOCAL
     1389                        -mpw* | -macos*)
    10871390                                vendor=apple
     1391                                ;;
     1392                        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
     1393                                vendor=atari
     1394                                ;;
     1395                        -vos*)
     1396                                vendor=stratus
    10881397                                ;;
    10891398                esac
     
    10931402
    10941403echo $basic_machine$os
     1404exit 0
     1405
     1406# Local variables:
     1407# eval: (add-hook 'write-file-hooks 'time-stamp)
     1408# time-stamp-start: "timestamp='"
     1409# time-stamp-format: "%:y-%02m-%02d"
     1410# time-stamp-end: "'"
     1411# End:
  • MP/pvmgetarch

    r63d351 r5f32e0b  
    5353        FreeBSD,i386 )          ARCH=FREEBSD ;;
    5454        SUPER-UX,SX-3 )         ARCH=SX3 ;;
     55        Darwin,*)               ARCH=PPCMAC ;;
    5556        uts,* )                 ARCH=UTS2 ;;
    5657        esac
Note: See TracChangeset for help on using the changeset viewer.