Changeset baedcbb in rtems


Ignore:
Timestamp:
11/27/00 14:18:32 (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
86ec6ed
Parents:
85a0f07
Message:

2000-11-27 Ralf Corsepius <corsepiu@…>

  • config.guess, config.sub: Update from CVS-autoconf to pick up new features (e.g. CC_FOR_BUILD in config.guess) but is necessary anyway to use autoconf-versions > 2.13.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r85a0f07 rbaedcbb  
     12000-11-27      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
     2
     3        * config.guess, config.sub: Update from CVS-autoconf to pick
     4        up new features (e.g. CC_FOR_BUILD in config.guess) but is
     5        necessary anyway to use autoconf-versions > 2.13.
     6
    172000-11-13      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    28
  • config.guess

    r85a0f07 rbaedcbb  
    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, 2000
     4#   Free Software Foundation, Inc.
     5
     6version='2000-10-03'
     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
     
    2326
    2427# Written by Per Bothner <bothner@cygnus.com>.
    25 # The master version of this file is at the FSF in /home/gd/gnu/lib.
     28# Please send patches to <config-patches@gnu.org>.
    2629#
    2730# This script attempts to guess a canonical system name similar to
     
    3538# (but try to keep the structure clean).
    3639#
    37 #  $Id$
    38 #
     40
     41me=`echo "$0" | sed -e 's,.*/,,'`
     42
     43usage="\
     44Usage: $0 [OPTION]
     45
     46Output the configuration name of this system.
     47
     48Operation modes:
     49  -h, --help               print this help, then exit
     50  -V, --version            print version number, then exit"
     51
     52help="
     53Try \`$me --help' for more information."
     54
     55# Parse command line
     56while test $# -gt 0 ; do
     57  case "$1" in
     58    --version | --vers* | -V )
     59       echo "$version" ; exit 0 ;;
     60    --help | --h* | -h )
     61       echo "$usage"; exit 0 ;;
     62    -- )     # Stop option processing
     63       shift; break ;;
     64    - ) # Use stdin as input.
     65       break ;;
     66    -* )
     67       exec >&2
     68       echo "$me: invalid option $1"
     69       echo "$help"
     70       exit 1 ;;
     71    * )
     72       break ;;
     73  esac
     74done
     75
     76if test $# != 0; then
     77  echo "$me: too many arguments$help" >&2
     78  exit 1
     79fi
     80
     81# Use $HOST_CC if defined. $CC may point to a cross-compiler
     82if test x"$CC_FOR_BUILD" = x; then
     83  if test x"$HOST_CC" != x; then
     84    CC_FOR_BUILD="$HOST_CC"
     85  else
     86    if test x"$CC" != x; then
     87      CC_FOR_BUILD="$CC"
     88    else
     89      CC_FOR_BUILD=cc
     90    fi
     91  fi
     92fi
     93
    3994
    4095# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
     
    49104UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    50105
    51 trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
     106dummy=dummy-$$
     107trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
    52108
    53109# Note: order is significant - the case branches are not exclusive.
    54110
    55111case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     112    *:NetBSD:*:*)
     113        # Netbsd (nbsd) targets should (where applicable) match one or
     114        # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
     115        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
     116        # switched to ELF, *-*-netbsd* would select the old
     117        # object file format.  This provides both forward
     118        # compatibility and a consistent mechanism for selecting the
     119        # object file format.
     120        # Determine the machine/vendor (is the vendor relevant).
     121        case "${UNAME_MACHINE}" in
     122            amiga) machine=m68k-unknown ;;
     123            arm32) machine=arm-unknown ;;
     124            atari*) machine=m68k-atari ;;
     125            sun3*) machine=m68k-sun ;;
     126            mac68k) machine=m68k-apple ;;
     127            macppc) machine=powerpc-apple ;;
     128            hp3[0-9][05]) machine=m68k-hp ;;
     129            ibmrt|romp-ibm) machine=romp-ibm ;;
     130            *) machine=${UNAME_MACHINE}-unknown ;;
     131        esac
     132        # The Operating System including object format.
     133        if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
     134                | grep __ELF__ >/dev/null
     135        then
     136            # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
     137            # Return netbsd for either.  FIX?
     138            os=netbsd
     139        else
     140            os=netbsdelf
     141        fi
     142        # The OS release
     143        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     144        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
     145        # contains redundant information, the shorter form:
     146        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
     147        echo "${machine}-${os}${release}"
     148        exit 0 ;;
    56149    alpha:OSF1:*:*)
     150        if test $UNAME_RELEASE = "V4.0"; then
     151                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
     152        fi
    57153        # A Vn.n version is a released version.
    58154        # A Tn.n version is a released field test version.
    59155        # A Xn.n version is an unreleased experimental baselevel.
    60156        # 1.2 uses "1.2" for uname -r.
    61         echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
     157        cat <<EOF >$dummy.s
     158        .data
     159\$Lformat:
     160        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
     161
     162        .text
     163        .globl main
     164        .align 4
     165        .ent main
     166main:
     167        .frame \$30,16,\$26,0
     168        ldgp \$29,0(\$27)
     169        .prologue 1
     170        .long 0x47e03d80 # implver \$0
     171        lda \$2,-1
     172        .long 0x47e20c21 # amask \$2,\$1
     173        lda \$16,\$Lformat
     174        mov \$0,\$17
     175        not \$1,\$18
     176        jsr \$26,printf
     177        ldgp \$29,0(\$26)
     178        mov 0,\$16
     179        jsr \$26,exit
     180        .end main
     181EOF
     182        $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
     183        if test "$?" = 0 ; then
     184                case `./$dummy` in
     185                        0-0)
     186                                UNAME_MACHINE="alpha"
     187                                ;;
     188                        1-0)
     189                                UNAME_MACHINE="alphaev5"
     190                                ;;
     191                        1-1)
     192                                UNAME_MACHINE="alphaev56"
     193                                ;;
     194                        1-101)
     195                                UNAME_MACHINE="alphapca56"
     196                                ;;
     197                        2-303)
     198                                UNAME_MACHINE="alphaev6"
     199                                ;;
     200                        2-307)
     201                                UNAME_MACHINE="alphaev67"
     202                                ;;
     203                esac
     204        fi
     205        rm -f $dummy.s $dummy
     206        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     207        exit 0 ;;
     208    Alpha\ *:Windows_NT*:*)
     209        # How do we know it's Interix rather than the generic POSIX subsystem?
     210        # Should we change UNAME_MACHINE based on the output of uname instead
     211        # of the specific Alpha model?
     212        echo alpha-pc-interix
    62213        exit 0 ;;
    63214    21064:Windows_NT:50:3)
     
    65216        exit 0 ;;
    66217    Amiga*:UNIX_System_V:4.0:*)
    67         echo m68k-cbm-sysv4
     218        echo m68k-unknown-sysv4
    68219        exit 0;;
    69     amiga:NetBSD:*:*)
    70       echo m68k-cbm-netbsd${UNAME_RELEASE}
    71       exit 0 ;;
    72220    amiga:OpenBSD:*:*)
    73       echo m68k-cbm-openbsd${UNAME_RELEASE}
    74       exit 0 ;;
     221        echo m68k-unknown-openbsd${UNAME_RELEASE}
     222        exit 0 ;;
     223    *:[Aa]miga[Oo][Ss]:*:*)
     224        echo ${UNAME_MACHINE}-unknown-amigaos
     225        exit 0 ;;
     226    arc64:OpenBSD:*:*)
     227        echo mips64el-unknown-openbsd${UNAME_RELEASE}
     228        exit 0 ;;
     229    arc:OpenBSD:*:*)
     230        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     231        exit 0 ;;
     232    hkmips:OpenBSD:*:*)
     233        echo mips-unknown-openbsd${UNAME_RELEASE}
     234        exit 0 ;;
     235    pmax:OpenBSD:*:*)
     236        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     237        exit 0 ;;
     238    sgi:OpenBSD:*:*)
     239        echo mips-unknown-openbsd${UNAME_RELEASE}
     240        exit 0 ;;
     241    wgrisc:OpenBSD:*:*)
     242        echo mipsel-unknown-openbsd${UNAME_RELEASE}
     243        exit 0 ;;
     244    *:OS/390:*:*)
     245        echo i370-ibm-openedition
     246        exit 0 ;;
    75247    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    76248        echo arm-acorn-riscix${UNAME_RELEASE}
    77249        exit 0;;
    78     Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
     250    SR2?01:HI-UX/MPP:*:*)
     251        echo hppa1.1-hitachi-hiuxmpp
     252        exit 0;;
     253    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
    79254        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
    80255        if test "`(/bin/universe) 2>/dev/null`" = att ; then
     
    84259        fi
    85260        exit 0 ;;
    86     NILE:*:*:dcosx)
     261    NILE*:*:*:dcosx)
    87262        echo pyramid-pyramid-svr4
     263        exit 0 ;;
     264    sun4H:SunOS:5.*:*)
     265        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    88266        exit 0 ;;
    89267    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
     
    111289        echo m68k-sun-sunos${UNAME_RELEASE}
    112290        exit 0 ;;
     291    sun*:*:4.2BSD:*)
     292        UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
     293        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
     294        case "`/bin/arch`" in
     295            sun3)
     296                echo m68k-sun-sunos${UNAME_RELEASE}
     297                ;;
     298            sun4)
     299                echo sparc-sun-sunos${UNAME_RELEASE}
     300                ;;
     301        esac
     302        exit 0 ;;
    113303    aushp:SunOS:*:*)
    114304        echo sparc-auspex-sunos${UNAME_RELEASE}
    115305        exit 0 ;;
    116     atari*:NetBSD:*:*)
    117         echo m68k-atari-netbsd${UNAME_RELEASE}
    118         exit 0 ;;
    119306    atari*:OpenBSD:*:*)
    120         echo m68k-atari-openbsd${UNAME_RELEASE}
    121         exit 0 ;;
    122     sun3*:NetBSD:*:*)
    123         echo m68k-sun-netbsd${UNAME_RELEASE}
    124         exit 0 ;;
     307        echo m68k-unknown-openbsd${UNAME_RELEASE}
     308        exit 0 ;;
     309    # The situation for MiNT is a little confusing.  The machine name
     310    # can be virtually everything (everything which is not
     311    # "atarist" or "atariste" at least should have a processor
     312    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
     313    # to the lowercase version "mint" (or "freemint").  Finally
     314    # the system name "TOS" denotes a system which is actually not
     315    # MiNT.  But MiNT is downward compatible to TOS, so this should
     316    # be no problem.
     317    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
     318        echo m68k-atari-mint${UNAME_RELEASE}
     319        exit 0 ;;
     320    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
     321        echo m68k-atari-mint${UNAME_RELEASE}
     322        exit 0 ;;
     323    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
     324        echo m68k-atari-mint${UNAME_RELEASE}
     325        exit 0 ;;
     326    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
     327        echo m68k-milan-mint${UNAME_RELEASE}
     328        exit 0 ;;
     329    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
     330        echo m68k-hades-mint${UNAME_RELEASE}
     331        exit 0 ;;
     332    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
     333        echo m68k-unknown-mint${UNAME_RELEASE}
     334        exit 0 ;;
    125335    sun3*:OpenBSD:*:*)
    126         echo m68k-sun-openbsd${UNAME_RELEASE}
    127         exit 0 ;;
    128     mac68k:NetBSD:*:*)
    129         echo m68k-apple-netbsd${UNAME_RELEASE}
     336        echo m68k-unknown-openbsd${UNAME_RELEASE}
    130337        exit 0 ;;
    131338    mac68k:OpenBSD:*:*)
    132         echo m68k-apple-openbsd${UNAME_RELEASE}
     339        echo m68k-unknown-openbsd${UNAME_RELEASE}
     340        exit 0 ;;
     341    mvme68k:OpenBSD:*:*)
     342        echo m68k-unknown-openbsd${UNAME_RELEASE}
     343        exit 0 ;;
     344    mvme88k:OpenBSD:*:*)
     345        echo m88k-unknown-openbsd${UNAME_RELEASE}
    133346        exit 0 ;;
    134347    powerpc:machten:*:*)
     
    144357        echo vax-dec-ultrix${UNAME_RELEASE}
    145358        exit 0 ;;
     359    2020:CLIX:*:* | 2430:CLIX:*:*)
     360        echo clipper-intergraph-clix${UNAME_RELEASE}
     361        exit 0 ;;
    146362    mips:*:*:UMIPS | mips:*:*:RISCos)
    147         sed 's/^        //' << EOF >dummy.c
    148         int main (argc, argv) int argc; char **argv; {
     363        sed 's/^        //' << EOF >$dummy.c
     364#ifdef __cplusplus
     365#include <stdio.h>  /* for printf() prototype */
     366        int main (int argc, char *argv[]) {
     367#else
     368        int main (argc, argv) int argc; char *argv[]; {
     369#endif
    149370        #if defined (host_mips) && defined (MIPSEB)
    150371        #if defined (SYSTYPE_SYSV)
     
    161382        }
    162383EOF
    163         ${CC-cc} dummy.c -o dummy \
    164           && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
    165           && rm dummy.c dummy && exit 0
    166         rm -f dummy.c dummy
     384        $CC_FOR_BUILD $dummy.c -o $dummy \
     385          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
     386          && rm $dummy.c $dummy && exit 0
     387        rm -f $dummy.c $dummy
    167388        echo mips-mips-riscos${UNAME_RELEASE}
    168389        exit 0 ;;
     
    182403        # DG/UX returns AViiON for all architectures
    183404        UNAME_PROCESSOR=`/usr/bin/uname -p`
    184         if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
    185         if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
    186              -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
     405        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
     406        then
     407            if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
     408               [ ${TARGET_BINARY_INTERFACE}x = x ]
     409            then
    187410                echo m88k-dg-dgux${UNAME_RELEASE}
    188         else
     411            else
    189412                echo m88k-dg-dguxbcs${UNAME_RELEASE}
    190         fi
    191         else echo i586-dg-dgux${UNAME_RELEASE}
    192         fi
     413            fi
     414        else
     415            echo i586-dg-dgux${UNAME_RELEASE}
     416        fi
    193417        exit 0 ;;
    194418    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
     
    216440    *:AIX:2:3)
    217441        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
    218                 sed 's/^                //' << EOF >dummy.c
     442                sed 's/^                //' << EOF >$dummy.c
    219443                #include <sys/systemcfg.h>
    220444
     
    227451                        }
    228452EOF
    229                 ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
    230                 rm -f dummy.c dummy
     453                $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
     454                rm -f $dummy.c $dummy
    231455                echo rs6000-ibm-aix3.2.5
    232456        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
     
    237461        exit 0 ;;
    238462    *:AIX:*:4)
    239         if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
     463        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
     464        if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
    240465                IBM_ARCH=rs6000
    241466        else
     
    255480        echo romp-ibm-bsd4.4
    256481        exit 0 ;;
    257     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
     482    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    258483        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    259484        exit 0 ;;                           # report: romp-ibm BSD 4.3
     
    270495        echo m68k-hp-bsd4.4
    271496        exit 0 ;;
    272     9000/[3478]??:HP-UX:*:*)
     497    9000/[34678]??:HP-UX:*:*)
    273498        case "${UNAME_MACHINE}" in
    274499            9000/31? )            HP_ARCH=m68000 ;;
    275500            9000/[34]?? )         HP_ARCH=m68k ;;
    276             9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
    277             9000/8?? )            HP_ARCH=hppa1.0 ;;
     501            9000/[678][0-9][0-9])
     502              sed 's/^              //' << EOF >$dummy.c
     503
     504              #define _HPUX_SOURCE
     505              #include <stdlib.h>
     506              #include <unistd.h>
     507
     508              int main ()
     509              {
     510              #if defined(_SC_KERNEL_BITS)
     511                  long bits = sysconf(_SC_KERNEL_BITS);
     512              #endif
     513                  long cpu  = sysconf (_SC_CPU_VERSION);
     514
     515                  switch (cpu)
     516                {
     517                case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
     518                case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
     519                case CPU_PA_RISC2_0:
     520              #if defined(_SC_KERNEL_BITS)
     521                    switch (bits)
     522                        {
     523                        case 64: puts ("hppa2.0w"); break;
     524                        case 32: puts ("hppa2.0n"); break;
     525                        default: puts ("hppa2.0"); break;
     526                        } break;
     527              #else  /* !defined(_SC_KERNEL_BITS) */
     528                    puts ("hppa2.0"); break;
     529              #endif
     530                default: puts ("hppa1.0"); break;
     531                }
     532                  exit (0);
     533              }
     534EOF
     535        (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
     536        rm -f $dummy.c $dummy
    278537        esac
    279538        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
     
    281540        exit 0 ;;
    282541    3050*:HI-UX:*:*)
    283         sed 's/^        //' << EOF >dummy.c
     542        sed 's/^        //' << EOF >$dummy.c
    284543        #include <unistd.h>
    285544        int
     
    306565        }
    307566EOF
    308         ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
    309         rm -f dummy.c dummy
     567        $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
     568        rm -f $dummy.c $dummy
    310569        echo unknown-hitachi-hiuxwe2
    311570        exit 0 ;;
     
    315574    9000/8??:4.3bsd:*:*)
    316575        echo hppa1.0-hp-bsd
     576        exit 0 ;;
     577    *9??*:MPE/iX:*:*)
     578        echo hppa1.0-hp-mpeix
    317579        exit 0 ;;
    318580    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
     
    331593    parisc*:Lites*:*:*)
    332594        echo hppa1.1-hp-lites
     595        exit 0 ;;
     596    hppa*:OpenBSD:*:*)
     597        echo hppa-unknown-openbsd
    333598        exit 0 ;;
    334599    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
     
    362627        exit 0 ;;
    363628    CRAY*TS:*:*:*)
    364         echo t90-cray-unicos${UNAME_RELEASE}
     629        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     630        exit 0 ;;
     631    CRAY*T3E:*:*:*)
     632        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     633        exit 0 ;;
     634    CRAY*SV1:*:*:*)
     635        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    365636        exit 0 ;;
    366637    CRAY-2:*:*:*)
     
    368639        exit 0 ;;
    369640    F300:UNIX_System_V:*:*)
    370         FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
     641        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    371642        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    372643        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     
    375646       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
    376647       exit 0 ;;
    377     hp3[0-9][05]:NetBSD:*:*)
    378         echo m68k-hp-netbsd${UNAME_RELEASE}
    379         exit 0 ;;
    380     hp3[0-9][05]:OpenBSD:*:*)
    381         echo m68k-hp-openbsd${UNAME_RELEASE}
    382         exit 0 ;;
    383     i?86:BSD/386:*:* | *:BSD/OS:*:*)
     648    hp300:OpenBSD:*:*)
     649        echo m68k-unknown-openbsd${UNAME_RELEASE}
     650        exit 0 ;;
     651    i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    384652        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
     653        exit 0 ;;
     654    sparc*:BSD/OS:*:*)
     655        echo sparc-unknown-bsdi${UNAME_RELEASE}
     656        exit 0 ;;
     657    *:BSD/OS:*:*)
     658        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    385659        exit 0 ;;
    386660    *:FreeBSD:*:*)
    387661        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
    388662        exit 0 ;;
    389     *:NetBSD:*:*)
    390         echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
    391         exit 0 ;;
    392663    *:OpenBSD:*:*)
    393664        echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
    394665        exit 0 ;;
    395666    i*:CYGWIN*:*)
    396         echo i386-pc-cygwin32
     667        echo ${UNAME_MACHINE}-pc-cygwin
     668        exit 0 ;;
     669    i*:MINGW*:*)
     670        echo ${UNAME_MACHINE}-pc-mingw32
     671        exit 0 ;;
     672    i*:PW*:*)
     673        echo ${UNAME_MACHINE}-pc-pw32
     674        exit 0 ;;
     675    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
     676        # How do we know it's Interix rather than the generic POSIX subsystem?
     677        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
     678        # UNAME_MACHINE based on the output of uname instead of i386?
     679        echo i386-pc-interix
     680        exit 0 ;;
     681    i*:UWIN*:*)
     682        echo ${UNAME_MACHINE}-pc-uwin
    397683        exit 0 ;;
    398684    p*:CYGWIN*:*)
    399         echo powerpcle-unknown-cygwin32
     685        echo powerpcle-unknown-cygwin
    400686        exit 0 ;;
    401687    prep*:SunOS:5.*:*)
     
    403689        exit 0 ;;
    404690    *:GNU:*:*)
    405         echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
     691        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
     692        exit 0 ;;
     693    i*86:Minix:*:*)
     694        echo ${UNAME_MACHINE}-pc-minix
    406695        exit 0 ;;
    407696    *:Linux:*:*)
     697
    408698        # The BFD linker knows what the default object file format is, so
    409         # first see if it will tell us.
    410         ld_help_string=`ld --help 2>&1`
    411         if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
    412           echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
    413         elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
    414           echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
    415         elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
    416           echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
    417         elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
    418           echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
    419         elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
    420           echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
    421         elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
    422           echo "powerpc-unknown-linux-gnu" ; exit 0
    423         elif test "${UNAME_MACHINE}" = "alpha" ; then
    424           echo alpha-unknown-linux-gnu ; exit 0
    425         elif test "${UNAME_MACHINE}" = "sparc" ; then
    426           echo sparc-unknown-linux-gnu ; exit 0
    427         else
    428           # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
    429           # useful --help.  Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
    430           test ! -d /usr/lib/ldscripts/. \
    431             && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
    432           # Determine whether the default compiler is a.out or elf
    433           cat >dummy.c <<EOF
     699        # first see if it will tell us. cd to the root directory to prevent
     700        # problems with other programs or directories called `ld' in the path.
     701        ld_supported_emulations=`cd /; ld --help 2>&1 \
     702                         | sed -ne '/supported emulations:/!d
     703                                    s/[         ][      ]*/ /g
     704                                    s/.*supported emulations: *//
     705                                    s/ .*//
     706                                    p'`
     707        case "$ld_supported_emulations" in
     708          *ia64)
     709                echo "${UNAME_MACHINE}-unknown-linux"
     710                exit 0
     711                ;;
     712          i?86linux)
     713                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
     714                exit 0
     715                ;;
     716          elf_i?86)
     717                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
     718                ;;
     719          i?86coff)
     720                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
     721                exit 0
     722                ;;
     723          sparclinux)
     724                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
     725                exit 0
     726                ;;
     727          armlinux)
     728                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
     729                exit 0
     730                ;;
     731          elf32arm*)
     732                echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
     733                exit 0
     734                ;;
     735          armelf_linux*)
     736                echo "${UNAME_MACHINE}-unknown-linux-gnu"
     737                exit 0
     738                ;;
     739          m68klinux)
     740                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
     741                exit 0
     742                ;;
     743          elf32ppc | elf32ppclinux)
     744                # Determine Lib Version
     745                cat >$dummy.c <<EOF
     746#include <features.h>
     747#if defined(__GLIBC__)
     748extern char __libc_version[];
     749extern char __libc_release[];
     750#endif
    434751main(argc, argv)
    435 int argc;
    436 char *argv[];
     752     int argc;
     753     char *argv[];
    437754{
    438 #ifdef __ELF__
    439   printf ("%s-pc-linux-gnu\n", argv[1]);
     755#if defined(__GLIBC__)
     756  printf("%s %s\n", __libc_version, __libc_release);
    440757#else
    441   printf ("%s-pc-linux-gnuaout\n", argv[1]);
     758  printf("unkown\n");
    442759#endif
    443760  return 0;
    444761}
    445762EOF
    446           ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
    447           rm -f dummy.c dummy
     763                LIBC=""
     764                $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
     765                if test "$?" = 0 ; then
     766                        ./$dummy | grep 1\.99 > /dev/null
     767                        if test "$?" = 0 ; then
     768                                LIBC="libc1"
     769                        fi
     770                fi
     771                rm -f $dummy.c $dummy
     772                echo powerpc-unknown-linux-gnu${LIBC}
     773                exit 0
     774                ;;
     775          shelf_linux)
     776                echo "${UNAME_MACHINE}-unknown-linux-gnu"
     777                exit 0
     778                ;;
     779        esac
     780
     781        if test "${UNAME_MACHINE}" = "alpha" ; then
     782                cat <<EOF >$dummy.s
     783                        .data
     784                \$Lformat:
     785                        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
     786
     787                        .text
     788                        .globl main
     789                        .align 4
     790                        .ent main
     791                main:
     792                        .frame \$30,16,\$26,0
     793                        ldgp \$29,0(\$27)
     794                        .prologue 1
     795                        .long 0x47e03d80 # implver \$0
     796                        lda \$2,-1
     797                        .long 0x47e20c21 # amask \$2,\$1
     798                        lda \$16,\$Lformat
     799                        mov \$0,\$17
     800                        not \$1,\$18
     801                        jsr \$26,printf
     802                        ldgp \$29,0(\$26)
     803                        mov 0,\$16
     804                        jsr \$26,exit
     805                        .end main
     806EOF
     807                LIBC=""
     808                $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
     809                if test "$?" = 0 ; then
     810                        case `./$dummy` in
     811                        0-0)
     812                                UNAME_MACHINE="alpha"
     813                                ;;
     814                        1-0)
     815                                UNAME_MACHINE="alphaev5"
     816                                ;;
     817                        1-1)
     818                                UNAME_MACHINE="alphaev56"
     819                                ;;
     820                        1-101)
     821                                UNAME_MACHINE="alphapca56"
     822                                ;;
     823                        2-303)
     824                                UNAME_MACHINE="alphaev6"
     825                                ;;
     826                        2-307)
     827                                UNAME_MACHINE="alphaev67"
     828                                ;;
     829                        esac
     830
     831                        objdump --private-headers $dummy | \
     832                          grep ld.so.1 > /dev/null
     833                        if test "$?" = 0 ; then
     834                                LIBC="libc1"
     835                        fi
     836                fi
     837                rm -f $dummy.s $dummy
     838                echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
     839        elif test "${UNAME_MACHINE}" = "mips" ; then
     840          cat >$dummy.c <<EOF
     841#ifdef __cplusplus
     842#include <stdio.h>  /* for printf() prototype */
     843        int main (int argc, char *argv[]) {
     844#else
     845        int main (argc, argv) int argc; char *argv[]; {
     846#endif
     847#ifdef __MIPSEB__
     848  printf ("%s-unknown-linux-gnu\n", argv[1]);
     849#endif
     850#ifdef __MIPSEL__
     851  printf ("%sel-unknown-linux-gnu\n", argv[1]);
     852#endif
     853  return 0;
     854}
     855EOF
     856          $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
     857          rm -f $dummy.c $dummy
     858        elif test "${UNAME_MACHINE}" = "s390"; then
     859          echo s390-ibm-linux && exit 0
     860        elif test "${UNAME_MACHINE}" = "x86_64"; then
     861          echo x86_64-unknown-linux-gnu && exit 0
     862        else
     863          # Either a pre-BFD a.out linker (linux-gnuoldld)
     864          # or one that does not give us useful --help.
     865          # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
     866          # If ld does not provide *any* "supported emulations:"
     867          # that means it is gnuoldld.
     868          test -z "$ld_supported_emulations" \
     869            && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
     870
     871          case "${UNAME_MACHINE}" in
     872          i?86)
     873            VENDOR=pc;
     874            ;;
     875          *)
     876            VENDOR=unknown;
     877            ;;
     878          esac
     879          # Determine whether the default compiler is a.out or elf
     880          cat >$dummy.c <<EOF
     881#include <features.h>
     882#ifdef __cplusplus
     883#include <stdio.h>  /* for printf() prototype */
     884        int main (int argc, char *argv[]) {
     885#else
     886        int main (argc, argv) int argc; char *argv[]; {
     887#endif
     888#ifdef __ELF__
     889# ifdef __GLIBC__
     890#  if __GLIBC__ >= 2
     891    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
     892#  else
     893    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
     894#  endif
     895# else
     896   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
     897# endif
     898#else
     899  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
     900#endif
     901  return 0;
     902}
     903EOF
     904          $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
     905          rm -f $dummy.c $dummy
     906          test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
    448907        fi ;;
    449908# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
     
    452911        echo i386-sequent-sysv4
    453912        exit 0 ;;
     913    i?86:UNIX_SV:4.2MP:2.*)
     914        # Unixware is an offshoot of SVR4, but it has its own version
     915        # number series starting with 2...
     916        # I am not positive that other SVR4 systems won't match this,
     917        # I just have to hope.  -- rms.
     918        # Use sysv4.2uw... so that sysv4* matches it.
     919        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
     920        exit 0 ;;
    454921    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
     922        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
    455923        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
    456                 echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
    457         else
    458                 echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
     924                echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
     925        else
     926                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
     927        fi
     928        exit 0 ;;
     929    i?86:*:5:7*)
     930        # Fixed at (any) Pentium or better
     931        UNAME_MACHINE=i586
     932        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
     933            echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
     934        else
     935            echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
    459936        fi
    460937        exit 0 ;;
     
    468945                (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
    469946                        && UNAME_MACHINE=i586
     947                (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
     948                        && UNAME_MACHINE=i686
     949                (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
     950                        && UNAME_MACHINE=i686
    470951                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
    471952        else
     
    473954        fi
    474955        exit 0 ;;
     956    i?86:*DOS:*:*)
     957        echo ${UNAME_MACHINE}-pc-msdosdjgpp
     958        exit 0 ;;
     959    pc:*:*:*)
     960        # Left here for compatibility:
     961        # uname -m prints for DJGPP always 'pc', but it prints nothing about
     962        # the processor, so we play safe by assuming i386.
     963        echo i386-pc-msdosdjgpp
     964        exit 0 ;;
    475965    Intel:Mach:3*:*)
    476966        echo i386-pc-mach3
     
    509999        echo m68k-atari-sysv4
    5101000        exit 0 ;;
    511     i?86:LynxOS:2.*:*)
     1001    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
    5121002        echo i386-unknown-lynxos${UNAME_RELEASE}
    5131003        exit 0 ;;
     
    5201010    SM[BE]S:UNIX_SV:*:*)
    5211011        echo mips-dde-sysv${UNAME_RELEASE}
     1012        exit 0 ;;
     1013    RM*:ReliantUNIX-*:*:*)
     1014        echo mips-sni-sysv4
    5221015        exit 0 ;;
    5231016    RM*:SINIX-*:*:*)
     
    5321025        fi
    5331026        exit 0 ;;
     1027    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
     1028                           # says <Richard.M.Bartel@ccMail.Census.GOV>
     1029        echo i586-unisys-sysv4
     1030        exit 0 ;;
    5341031    *:UNIX_System_V:4*:FTX*)
    5351032        # From Gerald Hewes <hewes@openmarket.com>.
     
    5441041        echo m68k-apple-aux${UNAME_RELEASE}
    5451042        exit 0 ;;
    546     R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
     1043    news*:NEWS-OS:6*:*)
     1044        echo mips-sony-newsos6
     1045        exit 0 ;;
     1046    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
    5471047        if [ -d /usr/nec ]; then
    5481048                echo mips-nec-sysv${UNAME_RELEASE}
     
    5511051        fi
    5521052        exit 0 ;;
    553     PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    554                            # says <Richard.M.Bartel@ccMail.Census.GOV>
    555         echo i586-unisys-sysv4
    556         exit 0 ;;
     1053    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
     1054        echo powerpc-be-beos
     1055        exit 0 ;;
     1056    BeMac:BeOS:*:*)     # BeOS running on Mac or Mac clone, PPC only.
     1057        echo powerpc-apple-beos
     1058        exit 0 ;;
     1059    BePC:BeOS:*:*)      # BeOS running on Intel PC compatible.
     1060        echo i586-pc-beos
     1061        exit 0 ;;
     1062    SX-4:SUPER-UX:*:*)
     1063        echo sx4-nec-superux${UNAME_RELEASE}
     1064        exit 0 ;;
     1065    SX-5:SUPER-UX:*:*)
     1066        echo sx5-nec-superux${UNAME_RELEASE}
     1067        exit 0 ;;
     1068    Power*:Rhapsody:*:*)
     1069        echo powerpc-apple-rhapsody${UNAME_RELEASE}
     1070        exit 0 ;;
     1071    *:Rhapsody:*:*)
     1072        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
     1073        exit 0 ;;
     1074    *:Darwin:*:*)
     1075        echo `uname -p`-apple-darwin${UNAME_RELEASE}
     1076        exit 0 ;;
     1077    *:procnto*:*:* | *:QNX:[0123456789]*:*)
     1078        if test "${UNAME_MACHINE}" = "x86pc"; then
     1079                UNAME_MACHINE=pc
     1080        fi
     1081        echo `uname -p`-${UNAME_MACHINE}-nto-qnx
     1082        exit 0 ;;
     1083    *:QNX:*:4*)
     1084        echo i386-pc-qnx
     1085        exit 0 ;;
     1086    NSR-[KW]:NONSTOP_KERNEL:*:*)
     1087        echo nsr-tandem-nsk${UNAME_RELEASE}
     1088        exit 0 ;;
     1089    BS2000:POSIX*:*:*)
     1090        echo bs2000-siemens-sysv
     1091        exit 0 ;;
     1092    DS/*:UNIX_System_V:*:*)
     1093        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
     1094        exit 0 ;;
     1095    *:Plan9:*:*)
     1096        # "uname -m" is not consistent, so use $cputype instead. 386
     1097        # is converted to i386 for consistency with other x86
     1098        # operating systems.
     1099        if test "$cputype" = "386"; then
     1100            UNAME_MACHINE=i386
     1101        else
     1102            UNAME_MACHINE="$cputype"
     1103        fi
     1104        echo ${UNAME_MACHINE}-unknown-plan9
     1105        exit 0 ;;
    5571106esac
    5581107
     
    5601109#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
    5611110
    562 cat >dummy.c <<EOF
     1111cat >$dummy.c <<EOF
    5631112#ifdef _SEQUENT_
    5641113# include <sys/types.h>
     
    5981147  int version;
    5991148  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
    600   printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
     1149  if (version < 4)
     1150    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
     1151  else
     1152    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
    6011153  exit (0);
    6021154#endif
     
    6581210EOF
    6591211
    660 ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
    661 rm -f dummy.c dummy
     1212$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
     1213rm -f $dummy.c $dummy
    6621214
    6631215# Apollos put the system type in the environment.
     
    6911243fi
    6921244
    693 #echo '(Unable to guess system type)' 1>&2
     1245cat >&2 <<EOF
     1246$0: unable to guess system type
     1247
     1248The $version version of this script cannot recognize your system type.
     1249Please download the most up to date version of the config scripts:
     1250
     1251    ftp://ftp.gnu.org/pub/gnu/config/
     1252
     1253If the version you run ($0) is already up to date, please
     1254send the following data and any information you think might be
     1255pertinent to <config-patches@gnu.org> in order to provide the needed
     1256information to handle your system.
     1257
     1258config.guess version = $version
     1259
     1260uname -m = `(uname -m) 2>/dev/null || echo unknown`
     1261uname -r = `(uname -r) 2>/dev/null || echo unknown`
     1262uname -s = `(uname -s) 2>/dev/null || echo unknown`
     1263uname -v = `(uname -v) 2>/dev/null || echo unknown`
     1264
     1265/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
     1266/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
     1267
     1268hostinfo               = `(hostinfo) 2>/dev/null`
     1269/bin/universe          = `(/bin/universe) 2>/dev/null`
     1270/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
     1271/bin/arch              = `(/bin/arch) 2>/dev/null`
     1272/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
     1273/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
     1274
     1275UNAME_MACHINE = ${UNAME_MACHINE}
     1276UNAME_RELEASE = ${UNAME_RELEASE}
     1277UNAME_SYSTEM  = ${UNAME_SYSTEM}
     1278UNAME_VERSION = ${UNAME_VERSION}
     1279EOF
    6941280
    6951281exit 1
     1282
     1283# Local variables:
     1284# eval: (add-hook 'write-file-hooks 'time-stamp)
     1285# time-stamp-start: "version='"
     1286# time-stamp-format: "%:y-%02m-%02d"
     1287# time-stamp-end: "'"
     1288# End:
  • config.sub

    r85a0f07 rbaedcbb  
    11#! /bin/sh
    22# Configuration validation subroutine script, version 1.1.
    3 #   Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
     4#   Free Software Foundation, Inc.
     5
     6version='2000-09-11'
     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
     
    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.
     
    4652# It is wrong to echo any other type of specification.
    4753
    48 if [ x$1 = x ]
    49 then
    50         echo Configuration name missing. 1>&2
    51         echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
    52         echo "or     $0 ALIAS" 1>&2
    53         echo where ALIAS is a recognized configuration type. 1>&2
    54         exit 1
    55 fi
    56 
    57 # First pass through any local machine types.
    58 case $1 in
    59         *local*)
    60                 echo $1
    61                 exit 0
    62                 ;;
    63         *)
    64         ;;
     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  -V, --version            print version number, then exit"
     65
     66help="
     67Try \`$me --help' for more information."
     68
     69# Parse command line
     70while test $# -gt 0 ; do
     71  case "$1" in
     72    --version | --vers* | -V )
     73       echo "$version" ; exit 0 ;;
     74    --help | --h* | -h )
     75       echo "$usage"; exit 0 ;;
     76    -- )     # Stop option processing
     77       shift; break ;;
     78    - ) # Use stdin as input.
     79       break ;;
     80    -* )
     81       exec >&2
     82       echo "$me: invalid option $1"
     83       echo "$help"
     84       exit 1 ;;
     85
     86    *local*)
     87       # First pass through any local machine types.
     88       echo $1
     89       exit 0;;
     90
     91    * )
     92       break ;;
     93  esac
     94done
     95
     96case $# in
     97 0) echo "$me: missing argument$help" >&2
     98    exit 1;;
     99 1) ;;
     100 *) echo "$me: too many arguments$help" >&2
     101    exit 1;;
    65102esac
    66103
     
    69106maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    70107case $maybe_os in
    71   linux-gnu*)
     108  nto-qnx* | linux-gnu*)
    72109    os=-$maybe_os
    73110    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     
    95132        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    96133        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    97         -apple)
     134        -apple | -axis)
    98135                os=
    99136                basic_machine=$1
    100137                ;;
    101         -sim | -cisco | -oki | -wec | -winbond )        # CYGNUS LOCAL
     138        -sim | -cisco | -oki | -wec | -winbond)
    102139                os=
    103140                basic_machine=$1
    104141                ;;
    105         -scout)                                         # CYGNUS LOCAL
    106                 ;;
    107         -wrs)                                           # CYGNUS LOCAL
    108                 os=vxworks
     142        -scout)
     143                ;;
     144        -wrs)
     145                os=-vxworks
    109146                basic_machine=$1
    110147                ;;
     
    113150                ;;
    114151        -sco5)
    115                 os=sco3.2v5
     152                os=-sco3.2v5
    116153                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    117154                ;;
     
    132169                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    133170                ;;
     171        -udk*)
     172                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     173                ;;
    134174        -isc)
    135175                os=-isc2.2
     
    153193        -psos*)
    154194                os=-psos
     195                ;;
     196        -mint | -mint[0-9]*)
     197                basic_machine=m68k-atari
     198                os=-mint
    155199                ;;
    156200esac
     
    160204        # Recognize the basic CPU types without company name.
    161205        # Some are omitted here because they have special meanings below.
    162         tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
    163                 | arme[lb] | pyramid | mn10200 | mn10300 \
    164                 | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
    165                 | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
    166                 | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
    167                 | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
    168                 | mipstx39 | mipstx39el \
    169                 | sparc | sparclet | sparclite | sparc64 | v850 | c4x \
    170                 | or16 | or32)
     206        tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
     207                | arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \
     208                | 580 | i960 | h8300 \
     209                | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
     210                | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
     211                | hppa64 \
     212                | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
     213                | alphaev6[78] \
     214                | we32k | ns16k | clipper | i370 | sh | sh[34] \
     215                | powerpc | powerpcle \
     216                | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
     217                | mips64orion | mips64orionel | mipstx39 | mipstx39el \
     218                | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
     219                | mips64vr5000 | miprs64vr5000el | mcore \
     220                | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
     221                | thumb | d10v | d30v | fr30 | avr)
    171222                basic_machine=$basic_machine-unknown
    172223                ;;
    173         m88110 | m680[01234]0 | m683?2 | m68360 | z8k | v70 | h8500 | w65) # CYGNUS LOCAL
     224        m6811 | m68hc11 | m6812 | m68hc12)
     225                # Motorola 68HC11/12.
    174226                basic_machine=$basic_machine-unknown
    175                 ;;
    176         mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith/vr4300
    177                 basic_machine=$basic_machine-unknown
    178                 ;;
    179         mips64vr4100 | mips64vr4100el) # CYGNUS LOCAL jsmith/vr4100
    180                 basic_machine=$basic_machine-unknown
    181                 ;;
    182         mips64vr5000 | mips64vr5000el) # CYGNUS LOCAL ian/vr5000
    183                 basic_machine=$basic_machine-unknown
    184                 ;;
    185         mips16) # CYGNUS LOCAL krk/mips16
    186                 basic_machine=$basic_machine-unknown
    187                 ;;
    188         d10v)                           # CYGNUS LOCAL meissner/d10v
    189                 basic_machine=$basic_machine-unknown
    190                 ;;
     227                os=-none
     228                ;;
     229        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
     230                ;;
     231
    191232        # We use `pc' rather than `unknown'
    192233        # because (1) that's what they normally are, and
    193234        # (2) the word "unknown" tends to confuse beginning users.
    194         i[3456]86)
     235        i[234567]86 | x86_64)
    195236          basic_machine=$basic_machine-pc
    196237          ;;
     
    201242                ;;
    202243        # Recognize the basic CPU types with company name.
    203         vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
     244        # FIXME: clean up the formatting here.
     245        vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
    204246              | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
    205247              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
    206               | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
    207               | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
    208               | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
    209               | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
     248              | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
     249              | xmp-* | ymp-* \
     250              | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
     251              | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
     252              | hppa2.0n-* | hppa64-* \
     253              | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
     254              | alphaev6[78]-* \
     255              | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
     256              | clipper-* | orion-* \
    210257              | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
    211               | sparc64-* | mips64-* | mipsel-* \
     258              | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
    212259              | mips64el-* | mips64orion-* | mips64orionel-* \
    213               | mipstx39-* | mipstx39el-* \
    214               | f301-*)
    215                 ;;
    216         m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # CYGNUS LOCAL
    217                 ;;
    218         mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith/vr4300
    219                 ;;
    220         mips64vr4100-* | mips64vr4100el-*) # CYGNUS LOCAL jsmith/vr4100
    221                 ;;
    222         mips16-*) # CYGNUS LOCAL krk/mips16
     260              | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
     261              | mipstx39-* | mipstx39el-* | mcore-* \
     262              | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
     263              | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
     264              | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
     265              | bs2000-* | tic54x-* | c54x-* | x86_64-*)
    223266                ;;
    224267        # Recognize the various machine names and aliases which stand
    225268        # for a CPU type and a company and sometimes even an OS.
    226         386bsd)                                         # CYGNUS LOCAL
     269        386bsd)
    227270                basic_machine=i386-unknown
    228271                os=-bsd
     
    234277                basic_machine=we32k-att
    235278                ;;
    236         a29khif)                                        # CYGNUS LOCAL
     279        a29khif)
    237280                basic_machine=a29k-amd
    238281                os=-udi
    239282                ;;
    240         adobe68k)                                       # CYGNUS LOCAL
     283        adobe68k)
    241284                basic_machine=m68010-adobe
    242285                os=-scout
     
    257300                ;;
    258301        amiga | amiga-*)
    259                 basic_machine=m68k-cbm
     302                basic_machine=m68k-unknown
    260303                ;;
    261304        amigaos | amigados)
    262                 basic_machine=m68k-cbm
     305                basic_machine=m68k-unknown
    263306                os=-amigaos
    264307                ;;
    265308        amigaunix | amix)
    266                 basic_machine=m68k-cbm
     309                basic_machine=m68k-unknown
    267310                os=-sysv4
    268311                ;;
     
    271314                os=-sysv
    272315                ;;
    273         apollo68bsd)                                    # CYGNUS LOCAL
     316        apollo68bsd)
    274317                basic_machine=m68k-apollo
    275318                os=-bsd
     
    318361                basic_machine=m68k-crds
    319362                ;;
     363        cris | cris-* | etrax*)
     364                basic_machine=cris-axis
     365                ;;
    320366        da30 | da30-*)
    321367                basic_machine=m68k-da30
     
    351397                basic_machine=ns32k-encore
    352398                ;;
    353         es1800 | OSE68k | ose68k | ose | OSE)           # CYGNUS LOCAL
     399        es1800 | OSE68k | ose68k | ose | OSE)
    354400                basic_machine=m68k-ericsson
    355401                os=-ose
     
    373419                os=-hms
    374420                ;;
    375         h8300xray)                                      # CYGNUS LOCAL
     421        h8300xray)
    376422                basic_machine=h8300-hitachi
    377423                os=-xray
    378424                ;;
    379         h8500hms)                                       # CYGNUS LOCAL
     425        h8500hms)
    380426                basic_machine=h8500-hitachi
    381427                os=-hms
     
    396442                os=-hpux
    397443                ;;
    398         w89k-*)                                         # CYGNUS LOCAL
    399                 basic_machine=hppa1.1-winbond
    400                 os=-proelf
    401                 ;;
    402         op50n-*)                                        # CYGNUS LOCAL
    403                 basic_machine=hppa1.1-oki
    404                 os=-proelf
    405                 ;;
    406         op60c-*)                                        # CYGNUS LOCAL
    407                 basic_machine=hppa1.1-oki
    408                 os=-proelf
    409                 ;;
    410         hppro)                                          # CYGNUS LOCAL
    411                 basic_machine=hppa1.1-hp
    412                 os=-proelf
    413                 ;;
     444        hp3k9[0-9][0-9] | hp9[0-9][0-9])
     445                basic_machine=hppa1.0-hp
     446                ;;
    414447        hp9k2[0-9][0-9] | hp9k31[0-9])
    415448                basic_machine=m68000-hp
     
    418451                basic_machine=m68k-hp
    419452                ;;
    420         hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
     453        hp9k6[0-9][0-9] | hp6[0-9][0-9])
     454                basic_machine=hppa1.0-hp
     455                ;;
     456        hp9k7[0-79][0-9] | hp7[0-79][0-9])
     457                basic_machine=hppa1.1-hp
     458                ;;
     459        hp9k78[0-9] | hp78[0-9])
     460                # FIXME: really hppa2.0-hp
     461                basic_machine=hppa1.1-hp
     462                ;;
     463        hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
     464                # FIXME: really hppa2.0-hp
     465                basic_machine=hppa1.1-hp
     466                ;;
     467        hp9k8[0-9][13679] | hp8[0-9][13679])
    421468                basic_machine=hppa1.1-hp
    422469                ;;
     
    427474                os=-nextstep3
    428475                ;;
    429         hppaosf)                                        # CYGNUS LOCAL
     476        hppaosf)
    430477                basic_machine=hppa1.1-hp
    431478                os=-osf
    432479                ;;
     480        hppro)
     481                basic_machine=hppa1.1-hp
     482                os=-proelf
     483                ;;
    433484        i370-ibm* | ibm*)
    434485                basic_machine=i370-ibm
    435                 os=-mvs
    436486                ;;
    437487# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
    438         i[3456]86v32)
     488        i[34567]86v32)
    439489                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    440490                os=-sysv32
    441491                ;;
    442         i[3456]86v4*)
     492        i[34567]86v4*)
    443493                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    444494                os=-sysv4
    445495                ;;
    446         i[3456]86v)
     496        i[34567]86v)
    447497                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    448498                os=-sysv
    449499                ;;
    450         i[3456]86sol2)
     500        i[34567]86sol2)
    451501                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    452502                os=-solaris2
    453503                ;;
    454         i386mach)                                       # CYGNUS LOCAL
     504        i386mach)
    455505                basic_machine=i386-mach
    456506                os=-mach
    457507                ;;
    458         i386-vsta | vsta)                               # CYGNUS LOCAL
     508        i386-vsta | vsta)
    459509                basic_machine=i386-unknown
    460510                os=-vsta
    461511                ;;
    462         i386-go32 | go32)                               # CYGNUS LOCAL
     512        i386-go32 | go32)
    463513                basic_machine=i386-unknown
    464514                os=-go32
     515                ;;
     516        i386-mingw32 | mingw32)
     517                basic_machine=i386-unknown
     518                os=-mingw32
     519                ;;
     520        i[34567]86-pw32 | pw32)
     521                basic_machine=i586-unknown
     522                os=-pw32
    465523                ;;
    466524        iris | iris4d)
     
    492550                basic_machine=m68000-convergent
    493551                ;;
     552        *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
     553                basic_machine=m68k-atari
     554                os=-mint
     555                ;;
    494556        mipsel*-linux*)
    495557                basic_machine=mipsel-unknown
     
    506568                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    507569                ;;
    508         monitor)                                        # CYGNUS LOCAL
     570        mmix*)
     571                basic_machine=mmix-knuth
     572                os=-mmixware
     573                ;;
     574        monitor)
    509575                basic_machine=m68k-rom68k
    510576                os=-coff
    511577                ;;
    512         msdos)                                          # CYGNUS LOCAL
    513                 basic_machine=i386-unknown     
     578        msdos)
     579                basic_machine=i386-unknown
    514580                os=-msdos
     581                ;;
     582        mvs)
     583                basic_machine=i370-ibm
     584                os=-mvs
    515585                ;;
    516586        ncr3000)
     
    519589                ;;
    520590        netbsd386)
    521                 basic_machine=i386-unknown              # CYGNUS LOCAL
     591                basic_machine=i386-unknown
    522592                os=-netbsd
     593                ;;
     594        netwinder)
     595                basic_machine=armv4l-rebel
     596                os=-linux
    523597                ;;
    524598        news | news700 | news800 | news900)
     
    534608                os=-newsos
    535609                ;;
    536         necv70)                                         # CYGNUS LOCAL
     610        necv70)
    537611                basic_machine=v70-nec
    538612                os=-sysv
     
    563637                os=-nindy
    564638                ;;
    565         mon960)                                         # CYGNUS LOCAL
     639        mon960)
    566640                basic_machine=i960-intel
    567641                os=-mon960
     
    570644                basic_machine=np1-gould
    571645                ;;
    572         OSE68000 | ose68000)                            # CYGNUS LOCAL
     646        nsr-tandem)
     647                basic_machine=nsr-tandem
     648                ;;
     649        op50n-* | op60c-*)
     650                basic_machine=hppa1.1-oki
     651                os=-proelf
     652                ;;
     653        OSE68000 | ose68000)
    573654                basic_machine=m68000-ericsson
    574655                os=-ose
    575656                ;;
    576         os68k)                                          # CYGNUS LOCAL
     657        os68k)
    577658                basic_machine=m68k-none
    578659                os=-os68k
     
    595676                basic_machine=ns32k-pc532
    596677                ;;
    597         pentium | p5)
    598                 basic_machine=i586-intel
    599                 ;;
    600         pentiumpro | p6)
    601                 basic_machine=i686-intel
    602                 ;;
    603         pentium-* | p5-*)
     678        pentium | p5 | k5 | k6 | nexen)
     679                basic_machine=i586-pc
     680                ;;
     681        pentiumpro | p6 | 6x86 | athlon)
     682                basic_machine=i686-pc
     683                ;;
     684        pentiumii | pentium2)
     685                basic_machine=i786-pc
     686                ;;
     687        pentium-* | p5-* | k5-* | k6-* | nexen-*)
    604688                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
    605689                ;;
    606         pentiumpro-* | p6-*)
     690        pentiumpro-* | p6-* | 6x86-* | athlon-*)
    607691                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    608692                ;;
    609         k5)
    610                 # We don't have specific support for AMD's K5 yet, so just call it a Pentium
    611                 basic_machine=i586-amd
    612                 ;;
    613         nexen)
    614                 # We don't have specific support for Nexgen yet, so just call it a Pentium
    615                 basic_machine=i586-nexgen
     693        pentiumii-* | pentium2-*)
     694                basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
    616695                ;;
    617696        pn)
     
    633712                basic_machine=i386-ibm
    634713                ;;
    635         rom68k)                                         # CYGNUS LOCAL
     714        rom68k)
    636715                basic_machine=m68k-rom68k
    637716                os=-coff
     
    643722                basic_machine=romp-ibm
    644723                ;;
    645         sa29200)                                        # CYGNUS LOCAL
     724        sa29200)
    646725                basic_machine=a29k-amd
    647726                os=-udi
     
    654733                os=-hms
    655734                ;;
    656         sparclite-wrs)                                  # CYGNUS LOCAL
     735        sparclite-wrs)
    657736                basic_machine=sparclite-wrs
    658737                os=-vxworks
     
    665744                basic_machine=spur-unknown
    666745                ;;
    667         st2000)                                         # CYGNUS LOCAL
     746        st2000)
    668747                basic_machine=m68k-tandem
    669748                ;;
    670         stratus)                                        # CYGNUS LOCAL
     749        stratus)
    671750                basic_machine=i860-stratus
    672751                os=-sysv4
     
    712791                basic_machine=i386-sun
    713792                ;;
     793        sv1)
     794                basic_machine=sv1-cray
     795                os=-unicos
     796                ;;
    714797        symmetry)
    715798                basic_machine=i386-sequent
    716799                os=-dynix
    717800                ;;
     801        t3e)
     802                basic_machine=t3e-cray
     803                os=-unicos
     804                ;;
     805        tic54x | c54x*)
     806                basic_machine=tic54x-unknown
     807                os=-coff
     808                ;;
    718809        tx39)
    719810                basic_machine=mipstx39-unknown
     
    733824                os=-sym1
    734825                ;;
    735         v810 | necv810)                                 # CYGNUS LOCAL
     826        v810 | necv810)
    736827                basic_machine=v810-nec
    737828                os=-none
     
    760851                os=-vxworks
    761852                ;;
    762         w65*)                                           # CYGNUS LOCAL
    763                 basic_machine=w65-wdc
    764                 os=-none
     853        w65*)
     854                basic_machine=w65-wdc
     855                os=-none
     856                ;;
     857        w89k-*)
     858                basic_machine=hppa1.1-winbond
     859                os=-proelf
    765860                ;;
    766861        xmp)
     
    771866                basic_machine=xps100-honeywell
    772867                ;;
    773         z8k-*-coff)                                     # CYGNUS LOCAL
     868        z8k-*-coff)
    774869                basic_machine=z8k-unknown
    775870                os=-sim
     
    782877# Here we handle the default manufacturer of certain CPU types.  It is in
    783878# some cases the only manufacturer, in others, it is the most popular.
    784         w89k)                                           # CYGNUS LOCAL
     879        w89k)
    785880                basic_machine=hppa1.1-winbond
    786881                ;;
    787         op50n)                                          # CYGNUS LOCAL
     882        op50n)
    788883                basic_machine=hppa1.1-oki
    789884                ;;
    790         op60c)                                          # CYGNUS LOCAL
     885        op60c)
    791886                basic_machine=hppa1.1-oki
    792887                ;;
     
    813908                basic_machine=we32k-att
    814909                ;;
    815         sparc)
     910        sh3 | sh4)
     911                base_machine=sh-unknown
     912                ;;
     913        sparc | sparcv9)
    816914                basic_machine=sparc-sun
    817915                ;;
     
    825923                basic_machine=clipper-highlevel
    826924                ;;
    827         mac | mpw | mac-mpw)                            # CYGNUS LOCAL
     925        mac | mpw | mac-mpw)
    828926                basic_machine=m68k-apple
    829927                ;;
    830         pmac | pmac-mpw)                                # CYGNUS LOCAL
     928        pmac | pmac-mpw)
    831929                basic_machine=powerpc-apple
     930                ;;
     931        c4x*)
     932                basic_machine=c4x-none
     933                os=-coff
    832934                ;;
    833935        *)
     
    863965                os=-solaris2
    864966                ;;
    865         -unixware* | svr4*)
     967        -svr4*)
    866968                os=-sysv4
     969                ;;
     970        -unixware*)
     971                os=-sysv4.2uw
    867972                ;;
    868973        -gnu/linux*)
     
    881986              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    882987              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
    883               | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
     988              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    884989              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    885990              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    886               | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    887               | -mingw32* | -linux-gnu* | -uxpv*)
     991              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
     992              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
     993              | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
     994              | -openstep* | -oskit* | -conix* | -pw32*)
    888995        # Remember, each alternative MUST END IN *, to match a version number.
    889996                ;;
    890         # CYGNUS LOCAL
     997        -qnx*)
     998                case $basic_machine in
     999                    x86-* | i[34567]86-*)
     1000                        ;;
     1001                    *)
     1002                        os=-nto$os
     1003                        ;;
     1004                esac
     1005                ;;
     1006        -nto*)
     1007                os=-nto-qnx
     1008                ;;
    8911009        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    892               | -windows* | -osx | -abug |  -netware* | -os9* | -beos* \
    893               | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
     1010              | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
     1011              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
    8941012                ;;
    8951013        -mac*)
    8961014                os=`echo $os | sed -e 's|mac|macos|'`
    8971015                ;;
    898         # END CYGNUS LOCAL
    8991016        -linux*)
    9001017                os=`echo $os | sed -e 's|linux|linux-gnu|'`
     
    9061023                os=`echo $os | sed -e 's|sunos6|solaris3|'`
    9071024                ;;
     1025        -opened*)
     1026                os=-openedition
     1027                ;;
     1028        -wince*)
     1029                os=-wince
     1030                ;;
    9081031        -osfrose*)
    9091032                os=-osfrose
     
    9211044                os=-aos
    9221045                ;;
    923         -386bsd)                                        # CYGNUS LOCAL
     1046        -386bsd)
    9241047                os=-bsd
    9251048                ;;
     
    9291052        -ns2 )
    9301053                os=-nextstep2
     1054                ;;
     1055        -nsk*)
     1056                os=-nsk
    9311057                ;;
    9321058        # Preserve the version number of sinix5.
     
    9551081        -sysv*)
    9561082                ;;
    957         -ose*)                                          # CYGNUS LOCAL
     1083        -ose*)
    9581084                os=-ose
    9591085                ;;
    960         -es1800*)                                       # CYGNUS LOCAL
     1086        -es1800*)
    9611087                os=-ose
    9621088                ;;
    9631089        -xenix)
    9641090                os=-xenix
     1091                ;;
     1092        -*mint | -*MiNT)
     1093                os=-mint
    9651094                ;;
    9661095        -none)
     
    9891118                os=-riscix1.2
    9901119                ;;
     1120        arm*-rebel)
     1121                os=-linux
     1122                ;;
    9911123        arm*-semi)
    9921124                os=-aout
     
    10101142                # os=-sunos4
    10111143                ;;
    1012         m68*-cisco)                                     # CYGNUS LOCAL
     1144        m68*-cisco)
    10131145                os=-aout
    10141146                ;;
    1015         mips*-cisco)                                    # CYGNUS LOCAL
     1147        mips*-cisco)
    10161148                os=-elf
    10171149                ;;
    1018         mips*-*)                                        # CYGNUS LOCAL
    1019                 os=-elf
    1020                 ;;
     1150        mips*-*)
     1151                os=-elf
     1152                ;;
    10211153        *-tti)  # must be before sparc entry or we get the wrong os.
    10221154                os=-sysv3
     
    10251157                os=-sunos4.1.1
    10261158                ;;
    1027         *-be)                                           # CYGNUS LOCAL
     1159        *-be)
    10281160                os=-beos
    10291161                ;;
     
    10311163                os=-aix
    10321164                ;;
    1033         *-wec)                                          # CYGNUS LOCAL
     1165        *-wec)
    10341166                os=-proelf
    10351167                ;;
    1036         *-winbond)                                      # CYGNUS LOCAL
     1168        *-winbond)
    10371169                os=-proelf
    10381170                ;;
    1039         *-oki)                                          # CYGNUS LOCAL
     1171        *-oki)
    10401172                os=-proelf
    10411173                ;;
     
    11031235                os=-uxpv
    11041236                ;;
    1105         *-rom68k)                                       # CYGNUS LOCAL
     1237        *-rom68k)
    11061238                os=-coff
    11071239                ;;
    1108         *-*bug)                                         # CYGNUS LOCAL
     1240        *-*bug)
    11091241                os=-coff
    11101242                ;;
    1111         *-apple)                                        # CYGNUS LOCAL
     1243        *-apple)
    11121244                os=-macos
     1245                ;;
     1246        *-atari*)
     1247                os=-mint
    11131248                ;;
    11141249        *)
     
    11331268                                vendor=ibm
    11341269                                ;;
    1135                         -beos*)                                         # CYGNUS LOCAL
     1270                        -beos*)
    11361271                                vendor=be
    11371272                                ;;
     
    11391274                                vendor=hp
    11401275                                ;;
     1276                        -mpeix*)
     1277                                vendor=hp
     1278                                ;;
    11411279                        -hiux*)
    11421280                                vendor=hitachi
     
    11541292                                vendor=ns
    11551293                                ;;
    1156                         -mvs*)
     1294                        -mvs* | -opened*)
    11571295                                vendor=ibm
    11581296                                ;;
     
    11661304                                vendor=apple
    11671305                                ;;
    1168                         -hms*)                          # CYGNUS LOCAL
     1306                        -hms*)
    11691307                                vendor=hitachi
    11701308                                ;;
    1171                         -mpw* | -macos*)                # CYGNUS LOCAL
     1309                        -mpw* | -macos*)
    11721310                                vendor=apple
     1311                                ;;
     1312                        -*mint | -*MiNT)
     1313                                vendor=atari
    11731314                                ;;
    11741315                esac
     
    11781319
    11791320echo $basic_machine$os
     1321exit 0
     1322
     1323# Local variables:
     1324# eval: (add-hook 'write-file-hooks 'time-stamp)
     1325# time-stamp-start: "version='"
     1326# time-stamp-format: "%:y-%02m-%02d"
     1327# time-stamp-end: "'"
     1328# End:
Note: See TracChangeset for help on using the changeset viewer.