[BACK]Return to config.sub CVS log [TXT][DIR] Up to [local] / src / usr.bin / sudo

Annotation of src/usr.bin/sudo/config.sub, Revision 1.7

1.1       millert     1: #! /bin/sh
1.2       millert     2: # Configuration validation subroutine script.
1.3       millert     3: #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1.7     ! millert     4: #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
        !             5: #   Free Software Foundation, Inc.
1.2       millert     6:
1.7     ! millert     7: timestamp='2008-01-16'
1.2       millert     8:
1.1       millert     9: # This file is (in principle) common to ALL GNU software.
                     10: # The presence of a machine in this file suggests that SOME GNU software
                     11: # can handle that machine.  It does not imply ALL GNU software can.
                     12: #
                     13: # This file is free software; you can redistribute it and/or modify
                     14: # it under the terms of the GNU General Public License as published by
                     15: # the Free Software Foundation; either version 2 of the License, or
                     16: # (at your option) any later version.
                     17: #
                     18: # This program is distributed in the hope that it will be useful,
                     19: # but WITHOUT ANY WARRANTY; without even the implied warranty of
                     20: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     21: # GNU General Public License for more details.
                     22: #
                     23: # You should have received a copy of the GNU General Public License
                     24: # along with this program; if not, write to the Free Software
1.5       millert    25: # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
                     26: # 02110-1301, USA.
                     27: #
1.1       millert    28: # As a special exception to the GNU General Public License, if you
                     29: # distribute this file as part of a program that contains a
                     30: # configuration script generated by Autoconf, you may include it under
                     31: # the same distribution terms that you use for the rest of that program.
                     32:
1.5       millert    33:
1.3       millert    34: # Please send patches to <config-patches@gnu.org>.  Submit a context
                     35: # diff and a properly formatted ChangeLog entry.
1.2       millert    36: #
1.1       millert    37: # Configuration subroutine to validate and canonicalize a configuration type.
                     38: # Supply the specified configuration type as an argument.
                     39: # If it is invalid, we print an error message on stderr and exit with code 1.
                     40: # Otherwise, we print the canonical config type on stdout and succeed.
                     41:
                     42: # This file is supposed to be the same for all GNU packages
                     43: # and recognize all the CPU types, system types and aliases
                     44: # that are meaningful with *any* GNU software.
                     45: # Each package is responsible for reporting which valid configurations
                     46: # it does not support.  The user should be able to distinguish
                     47: # a failure to support a valid configuration from a meaningless
                     48: # configuration.
                     49:
                     50: # The goal of this file is to map all the various variations of a given
                     51: # machine specification into a single specification in the form:
                     52: #      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
                     53: # or in some cases, the newer four-part form:
                     54: #      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
                     55: # It is wrong to echo any other type of specification.
                     56:
1.2       millert    57: me=`echo "$0" | sed -e 's,.*/,,'`
                     58:
                     59: usage="\
                     60: Usage: $0 [OPTION] CPU-MFR-OPSYS
                     61:        $0 [OPTION] ALIAS
                     62:
                     63: Canonicalize a configuration name.
                     64:
                     65: Operation modes:
                     66:   -h, --help         print this help, then exit
                     67:   -t, --time-stamp   print date of last modification, then exit
                     68:   -v, --version      print version number, then exit
                     69:
                     70: Report bugs and patches to <config-patches@gnu.org>."
                     71:
                     72: version="\
                     73: GNU config.sub ($timestamp)
                     74:
1.7     ! millert    75: Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
        !            76: 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1.2       millert    77:
                     78: This is free software; see the source for copying conditions.  There is NO
                     79: warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
                     80:
                     81: help="
                     82: Try \`$me --help' for more information."
                     83:
                     84: # Parse command line
                     85: while test $# -gt 0 ; do
                     86:   case $1 in
                     87:     --time-stamp | --time* | -t )
1.5       millert    88:        echo "$timestamp" ; exit ;;
1.2       millert    89:     --version | -v )
1.5       millert    90:        echo "$version" ; exit ;;
1.2       millert    91:     --help | --h* | -h )
1.5       millert    92:        echo "$usage"; exit ;;
1.2       millert    93:     -- )     # Stop option processing
                     94:        shift; break ;;
                     95:     - )        # Use stdin as input.
                     96:        break ;;
                     97:     -* )
                     98:        echo "$me: invalid option $1$help"
                     99:        exit 1 ;;
                    100:
                    101:     *local*)
                    102:        # First pass through any local machine types.
                    103:        echo $1
1.5       millert   104:        exit ;;
1.2       millert   105:
                    106:     * )
                    107:        break ;;
                    108:   esac
                    109: done
1.1       millert   110:
1.2       millert   111: case $# in
                    112:  0) echo "$me: missing argument$help" >&2
                    113:     exit 1;;
                    114:  1) ;;
                    115:  *) echo "$me: too many arguments$help" >&2
                    116:     exit 1;;
1.1       millert   117: esac
                    118:
                    119: # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
                    120: # Here we must recognize all the valid KERNEL-OS combinations.
                    121: maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
                    122: case $maybe_os in
1.5       millert   123:   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
                    124:   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
                    125:   storm-chaos* | os2-emx* | rtmk-nova*)
1.1       millert   126:     os=-$maybe_os
                    127:     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
                    128:     ;;
                    129:   *)
                    130:     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
                    131:     if [ $basic_machine != $1 ]
                    132:     then os=`echo $1 | sed 's/.*-/-/'`
                    133:     else os=; fi
                    134:     ;;
                    135: esac
                    136:
                    137: ### Let's recognize common machines as not being operating systems so
                    138: ### that things like config.sub decstation-3100 work.  We also
                    139: ### recognize some manufacturers as not being operating systems, so we
                    140: ### can provide default operating systems below.
                    141: case $os in
                    142:        -sun*os*)
                    143:                # Prevent following clause from handling this invalid input.
                    144:                ;;
                    145:        -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
                    146:        -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
                    147:        -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
                    148:        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
                    149:        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
                    150:        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
1.5       millert   151:        -apple | -axis | -knuth | -cray | -sr2201*)
1.2       millert   152:                os=
                    153:                basic_machine=$1
                    154:                ;;
                    155:        -sim | -cisco | -oki | -wec | -winbond)
1.1       millert   156:                os=
                    157:                basic_machine=$1
                    158:                ;;
1.2       millert   159:        -scout)
                    160:                ;;
                    161:        -wrs)
                    162:                os=-vxworks
                    163:                basic_machine=$1
                    164:                ;;
                    165:        -chorusos*)
                    166:                os=-chorusos
                    167:                basic_machine=$1
                    168:                ;;
                    169:        -chorusrdb)
                    170:                os=-chorusrdb
                    171:                basic_machine=$1
                    172:                ;;
1.1       millert   173:        -hiux*)
                    174:                os=-hiuxwe2
                    175:                ;;
1.5       millert   176:        -sco6)
                    177:                os=-sco5v6
                    178:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    179:                ;;
1.1       millert   180:        -sco5)
1.2       millert   181:                os=-sco3.2v5
1.1       millert   182:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    183:                ;;
                    184:        -sco4)
                    185:                os=-sco3.2v4
                    186:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    187:                ;;
                    188:        -sco3.2.[4-9]*)
                    189:                os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
                    190:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    191:                ;;
                    192:        -sco3.2v[4-9]*)
                    193:                # Don't forget version if it is 3.2v4 or newer.
                    194:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    195:                ;;
1.5       millert   196:        -sco5v6*)
                    197:                # Don't forget version if it is 3.2v4 or newer.
                    198:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    199:                ;;
1.1       millert   200:        -sco*)
                    201:                os=-sco3.2v2
                    202:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    203:                ;;
1.2       millert   204:        -udk*)
                    205:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    206:                ;;
1.1       millert   207:        -isc)
                    208:                os=-isc2.2
                    209:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    210:                ;;
                    211:        -clix*)
                    212:                basic_machine=clipper-intergraph
                    213:                ;;
                    214:        -isc*)
                    215:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    216:                ;;
                    217:        -lynx*)
                    218:                os=-lynxos
                    219:                ;;
                    220:        -ptx*)
                    221:                basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
                    222:                ;;
                    223:        -windowsnt*)
                    224:                os=`echo $os | sed -e 's/windowsnt/winnt/'`
                    225:                ;;
                    226:        -psos*)
                    227:                os=-psos
                    228:                ;;
1.2       millert   229:        -mint | -mint[0-9]*)
                    230:                basic_machine=m68k-atari
                    231:                os=-mint
                    232:                ;;
1.1       millert   233: esac
                    234:
                    235: # Decode aliases for certain CPU-COMPANY combinations.
                    236: case $basic_machine in
                    237:        # Recognize the basic CPU types without company name.
                    238:        # Some are omitted here because they have special meanings below.
1.3       millert   239:        1750a | 580 \
                    240:        | a29k \
                    241:        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
                    242:        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
1.5       millert   243:        | am33_2.0 \
                    244:        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
                    245:        | bfin \
                    246:        | c4x | clipper \
1.3       millert   247:        | d10v | d30v | dlx | dsp16xx \
1.7     ! millert   248:        | fido | fr30 | frv \
1.3       millert   249:        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
                    250:        | i370 | i860 | i960 | ia64 \
1.5       millert   251:        | ip2k | iq2000 \
                    252:        | m32c | m32r | m32rle | m68000 | m68k | m88k \
1.7     ! millert   253:        | maxq | mb | microblaze | mcore | mep \
1.3       millert   254:        | mips | mipsbe | mipseb | mipsel | mipsle \
                    255:        | mips16 \
                    256:        | mips64 | mips64el \
                    257:        | mips64vr | mips64vrel \
                    258:        | mips64orion | mips64orionel \
                    259:        | mips64vr4100 | mips64vr4100el \
                    260:        | mips64vr4300 | mips64vr4300el \
                    261:        | mips64vr5000 | mips64vr5000el \
1.5       millert   262:        | mips64vr5900 | mips64vr5900el \
1.3       millert   263:        | mipsisa32 | mipsisa32el \
1.5       millert   264:        | mipsisa32r2 | mipsisa32r2el \
1.3       millert   265:        | mipsisa64 | mipsisa64el \
1.5       millert   266:        | mipsisa64r2 | mipsisa64r2el \
1.3       millert   267:        | mipsisa64sb1 | mipsisa64sb1el \
                    268:        | mipsisa64sr71k | mipsisa64sr71kel \
                    269:        | mipstx39 | mipstx39el \
                    270:        | mn10200 | mn10300 \
1.5       millert   271:        | mt \
                    272:        | msp430 \
                    273:        | nios | nios2 \
1.3       millert   274:        | ns16k | ns32k \
1.5       millert   275:        | or32 \
1.3       millert   276:        | pdp10 | pdp11 | pj | pjl \
                    277:        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
                    278:        | pyramid \
1.6       millert   279:        | score \
1.5       millert   280:        | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
1.3       millert   281:        | sh64 | sh64le \
1.5       millert   282:        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
                    283:        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
                    284:        | spu | strongarm \
                    285:        | tahoe | thumb | tic4x | tic80 | tron \
1.3       millert   286:        | v850 | v850e \
                    287:        | we32k \
1.6       millert   288:        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
1.3       millert   289:        | z8k)
1.2       millert   290:                basic_machine=$basic_machine-unknown
                    291:                ;;
                    292:        m6811 | m68hc11 | m6812 | m68hc12)
                    293:                # Motorola 68HC11/12.
1.1       millert   294:                basic_machine=$basic_machine-unknown
1.2       millert   295:                os=-none
                    296:                ;;
                    297:        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
1.1       millert   298:                ;;
1.5       millert   299:        ms1)
                    300:                basic_machine=mt-unknown
                    301:                ;;
1.2       millert   302:
1.1       millert   303:        # We use `pc' rather than `unknown'
                    304:        # because (1) that's what they normally are, and
                    305:        # (2) the word "unknown" tends to confuse beginning users.
1.2       millert   306:        i*86 | x86_64)
1.1       millert   307:          basic_machine=$basic_machine-pc
                    308:          ;;
                    309:        # Object if more than one company name word.
                    310:        *-*-*)
                    311:                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
                    312:                exit 1
                    313:                ;;
                    314:        # Recognize the basic CPU types with company name.
1.3       millert   315:        580-* \
                    316:        | a29k-* \
                    317:        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
                    318:        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
                    319:        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
                    320:        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
1.5       millert   321:        | avr-* | avr32-* \
                    322:        | bfin-* | bs2000-* \
                    323:        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
                    324:        | clipper-* | craynv-* | cydra-* \
1.3       millert   325:        | d10v-* | d30v-* | dlx-* \
                    326:        | elxsi-* \
1.7     ! millert   327:        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
1.3       millert   328:        | h8300-* | h8500-* \
                    329:        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
                    330:        | i*86-* | i860-* | i960-* | ia64-* \
1.5       millert   331:        | ip2k-* | iq2000-* \
                    332:        | m32c-* | m32r-* | m32rle-* \
1.3       millert   333:        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
1.5       millert   334:        | m88110-* | m88k-* | maxq-* | mcore-* \
1.3       millert   335:        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
                    336:        | mips16-* \
                    337:        | mips64-* | mips64el-* \
                    338:        | mips64vr-* | mips64vrel-* \
                    339:        | mips64orion-* | mips64orionel-* \
                    340:        | mips64vr4100-* | mips64vr4100el-* \
                    341:        | mips64vr4300-* | mips64vr4300el-* \
                    342:        | mips64vr5000-* | mips64vr5000el-* \
1.5       millert   343:        | mips64vr5900-* | mips64vr5900el-* \
1.3       millert   344:        | mipsisa32-* | mipsisa32el-* \
1.5       millert   345:        | mipsisa32r2-* | mipsisa32r2el-* \
1.3       millert   346:        | mipsisa64-* | mipsisa64el-* \
1.5       millert   347:        | mipsisa64r2-* | mipsisa64r2el-* \
1.3       millert   348:        | mipsisa64sb1-* | mipsisa64sb1el-* \
                    349:        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
1.5       millert   350:        | mipstx39-* | mipstx39el-* \
                    351:        | mmix-* \
                    352:        | mt-* \
                    353:        | msp430-* \
                    354:        | nios-* | nios2-* \
1.3       millert   355:        | none-* | np1-* | ns16k-* | ns32k-* \
                    356:        | orion-* \
                    357:        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
                    358:        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
                    359:        | pyramid-* \
                    360:        | romp-* | rs6000-* \
1.5       millert   361:        | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
1.3       millert   362:        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
1.5       millert   363:        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
                    364:        | sparclite-* \
                    365:        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
                    366:        | tahoe-* | thumb-* \
                    367:        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
                    368:        | tron-* \
1.3       millert   369:        | v850-* | v850e-* | vax-* \
                    370:        | we32k-* \
1.6       millert   371:        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
1.7     ! millert   372:        | xstormy16-* | xtensa*-* \
1.3       millert   373:        | ymp-* \
                    374:        | z8k-*)
1.1       millert   375:                ;;
1.7     ! millert   376:        # Recognize the basic CPU types without company name, with glob match.
        !           377:        xtensa*)
        !           378:                basic_machine=$basic_machine-unknown
        !           379:                ;;
1.1       millert   380:        # Recognize the various machine names and aliases which stand
                    381:        # for a CPU type and a company and sometimes even an OS.
1.2       millert   382:        386bsd)
                    383:                basic_machine=i386-unknown
                    384:                os=-bsd
                    385:                ;;
1.1       millert   386:        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
                    387:                basic_machine=m68000-att
                    388:                ;;
                    389:        3b*)
                    390:                basic_machine=we32k-att
                    391:                ;;
1.2       millert   392:        a29khif)
                    393:                basic_machine=a29k-amd
                    394:                os=-udi
                    395:                ;;
1.5       millert   396:        abacus)
                    397:                basic_machine=abacus-unknown
                    398:                ;;
1.2       millert   399:        adobe68k)
                    400:                basic_machine=m68010-adobe
                    401:                os=-scout
                    402:                ;;
1.1       millert   403:        alliant | fx80)
                    404:                basic_machine=fx80-alliant
                    405:                ;;
                    406:        altos | altos3068)
                    407:                basic_machine=m68k-altos
                    408:                ;;
                    409:        am29k)
                    410:                basic_machine=a29k-none
                    411:                os=-bsd
                    412:                ;;
1.4       brad      413:        amd64)
                    414:                basic_machine=x86_64-pc
                    415:                ;;
                    416:        amd64-*)
                    417:                basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
                    418:                ;;
1.1       millert   419:        amdahl)
                    420:                basic_machine=580-amdahl
                    421:                os=-sysv
                    422:                ;;
                    423:        amiga | amiga-*)
1.2       millert   424:                basic_machine=m68k-unknown
1.1       millert   425:                ;;
1.2       millert   426:        amigaos | amigados)
                    427:                basic_machine=m68k-unknown
                    428:                os=-amigaos
1.1       millert   429:                ;;
                    430:        amigaunix | amix)
1.2       millert   431:                basic_machine=m68k-unknown
1.1       millert   432:                os=-sysv4
                    433:                ;;
                    434:        apollo68)
                    435:                basic_machine=m68k-apollo
                    436:                os=-sysv
                    437:                ;;
1.2       millert   438:        apollo68bsd)
                    439:                basic_machine=m68k-apollo
                    440:                os=-bsd
                    441:                ;;
1.1       millert   442:        aux)
                    443:                basic_machine=m68k-apple
                    444:                os=-aux
                    445:                ;;
                    446:        balance)
                    447:                basic_machine=ns32k-sequent
                    448:                os=-dynix
                    449:                ;;
1.7     ! millert   450:        blackfin)
        !           451:                basic_machine=bfin-unknown
        !           452:                os=-linux
        !           453:                ;;
        !           454:        blackfin-*)
        !           455:                basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
        !           456:                os=-linux
        !           457:                ;;
1.3       millert   458:        c90)
                    459:                basic_machine=c90-cray
                    460:                os=-unicos
                    461:                ;;
1.1       millert   462:        convex-c1)
                    463:                basic_machine=c1-convex
                    464:                os=-bsd
                    465:                ;;
                    466:        convex-c2)
                    467:                basic_machine=c2-convex
                    468:                os=-bsd
                    469:                ;;
                    470:        convex-c32)
                    471:                basic_machine=c32-convex
                    472:                os=-bsd
                    473:                ;;
                    474:        convex-c34)
                    475:                basic_machine=c34-convex
                    476:                os=-bsd
                    477:                ;;
                    478:        convex-c38)
                    479:                basic_machine=c38-convex
                    480:                os=-bsd
                    481:                ;;
1.3       millert   482:        cray | j90)
                    483:                basic_machine=j90-cray
1.1       millert   484:                os=-unicos
                    485:                ;;
1.5       millert   486:        craynv)
                    487:                basic_machine=craynv-cray
                    488:                os=-unicosmp
                    489:                ;;
1.7     ! millert   490:        cr16)
        !           491:                basic_machine=cr16-unknown
1.5       millert   492:                os=-elf
                    493:                ;;
1.1       millert   494:        crds | unos)
                    495:                basic_machine=m68k-crds
                    496:                ;;
1.5       millert   497:        crisv32 | crisv32-* | etraxfs*)
                    498:                basic_machine=crisv32-axis
                    499:                ;;
1.2       millert   500:        cris | cris-* | etrax*)
                    501:                basic_machine=cris-axis
                    502:                ;;
1.5       millert   503:        crx)
                    504:                basic_machine=crx-unknown
                    505:                os=-elf
                    506:                ;;
1.1       millert   507:        da30 | da30-*)
                    508:                basic_machine=m68k-da30
                    509:                ;;
                    510:        decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
                    511:                basic_machine=mips-dec
                    512:                ;;
1.3       millert   513:        decsystem10* | dec10*)
                    514:                basic_machine=pdp10-dec
                    515:                os=-tops10
                    516:                ;;
                    517:        decsystem20* | dec20*)
                    518:                basic_machine=pdp10-dec
                    519:                os=-tops20
                    520:                ;;
1.1       millert   521:        delta | 3300 | motorola-3300 | motorola-delta \
                    522:              | 3300-motorola | delta-motorola)
                    523:                basic_machine=m68k-motorola
                    524:                ;;
                    525:        delta88)
                    526:                basic_machine=m88k-motorola
                    527:                os=-sysv3
                    528:                ;;
1.5       millert   529:        djgpp)
                    530:                basic_machine=i586-pc
                    531:                os=-msdosdjgpp
                    532:                ;;
1.1       millert   533:        dpx20 | dpx20-*)
                    534:                basic_machine=rs6000-bull
                    535:                os=-bosx
                    536:                ;;
                    537:        dpx2* | dpx2*-bull)
                    538:                basic_machine=m68k-bull
                    539:                os=-sysv3
                    540:                ;;
                    541:        ebmon29k)
                    542:                basic_machine=a29k-amd
                    543:                os=-ebmon
                    544:                ;;
                    545:        elxsi)
                    546:                basic_machine=elxsi-elxsi
                    547:                os=-bsd
                    548:                ;;
                    549:        encore | umax | mmax)
                    550:                basic_machine=ns32k-encore
                    551:                ;;
1.2       millert   552:        es1800 | OSE68k | ose68k | ose | OSE)
                    553:                basic_machine=m68k-ericsson
                    554:                os=-ose
                    555:                ;;
1.1       millert   556:        fx2800)
                    557:                basic_machine=i860-alliant
                    558:                ;;
                    559:        genix)
                    560:                basic_machine=ns32k-ns
                    561:                ;;
                    562:        gmicro)
                    563:                basic_machine=tron-gmicro
                    564:                os=-sysv
                    565:                ;;
1.2       millert   566:        go32)
                    567:                basic_machine=i386-pc
                    568:                os=-go32
                    569:                ;;
1.1       millert   570:        h3050r* | hiux*)
                    571:                basic_machine=hppa1.1-hitachi
                    572:                os=-hiuxwe2
                    573:                ;;
                    574:        h8300hms)
                    575:                basic_machine=h8300-hitachi
                    576:                os=-hms
                    577:                ;;
1.2       millert   578:        h8300xray)
                    579:                basic_machine=h8300-hitachi
                    580:                os=-xray
                    581:                ;;
                    582:        h8500hms)
                    583:                basic_machine=h8500-hitachi
                    584:                os=-hms
                    585:                ;;
1.1       millert   586:        sr2201*)
                    587:                basic_machine=harp1e-hitachi
                    588:                os=-hiuxmpp
                    589:                ;;
                    590:        harris)
                    591:                basic_machine=m88k-harris
                    592:                os=-sysv3
                    593:                ;;
                    594:        hp300-*)
                    595:                basic_machine=m68k-hp
                    596:                ;;
                    597:        hp300bsd)
                    598:                basic_machine=m68k-hp
                    599:                os=-bsd
                    600:                ;;
                    601:        hp300hpux)
                    602:                basic_machine=m68k-hp
                    603:                os=-hpux
                    604:                ;;
1.2       millert   605:        hp3k9[0-9][0-9] | hp9[0-9][0-9])
                    606:                basic_machine=hppa1.0-hp
                    607:                ;;
1.1       millert   608:        hp9k2[0-9][0-9] | hp9k31[0-9])
                    609:                basic_machine=m68000-hp
                    610:                ;;
                    611:        hp9k3[2-9][0-9])
                    612:                basic_machine=m68k-hp
                    613:                ;;
1.2       millert   614:        hp9k6[0-9][0-9] | hp6[0-9][0-9])
                    615:                basic_machine=hppa1.0-hp
                    616:                ;;
                    617:        hp9k7[0-79][0-9] | hp7[0-79][0-9])
                    618:                basic_machine=hppa1.1-hp
                    619:                ;;
                    620:        hp9k78[0-9] | hp78[0-9])
                    621:                # FIXME: really hppa2.0-hp
                    622:                basic_machine=hppa1.1-hp
                    623:                ;;
                    624:        hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
                    625:                # FIXME: really hppa2.0-hp
                    626:                basic_machine=hppa1.1-hp
                    627:                ;;
                    628:        hp9k8[0-9][13679] | hp8[0-9][13679])
1.1       millert   629:                basic_machine=hppa1.1-hp
                    630:                ;;
                    631:        hp9k8[0-9][0-9] | hp8[0-9][0-9])
                    632:                basic_machine=hppa1.0-hp
                    633:                ;;
                    634:        hppa-next)
                    635:                os=-nextstep3
                    636:                ;;
1.2       millert   637:        hppaosf)
                    638:                basic_machine=hppa1.1-hp
                    639:                os=-osf
                    640:                ;;
                    641:        hppro)
                    642:                basic_machine=hppa1.1-hp
                    643:                os=-proelf
                    644:                ;;
1.1       millert   645:        i370-ibm* | ibm*)
                    646:                basic_machine=i370-ibm
                    647:                ;;
                    648: # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
1.2       millert   649:        i*86v32)
1.1       millert   650:                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                    651:                os=-sysv32
                    652:                ;;
1.2       millert   653:        i*86v4*)
1.1       millert   654:                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                    655:                os=-sysv4
                    656:                ;;
1.2       millert   657:        i*86v)
1.1       millert   658:                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                    659:                os=-sysv
                    660:                ;;
1.2       millert   661:        i*86sol2)
1.1       millert   662:                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                    663:                os=-solaris2
                    664:                ;;
1.2       millert   665:        i386mach)
                    666:                basic_machine=i386-mach
                    667:                os=-mach
                    668:                ;;
                    669:        i386-vsta | vsta)
                    670:                basic_machine=i386-unknown
                    671:                os=-vsta
                    672:                ;;
1.1       millert   673:        iris | iris4d)
                    674:                basic_machine=mips-sgi
                    675:                case $os in
                    676:                    -irix*)
                    677:                        ;;
                    678:                    *)
                    679:                        os=-irix4
                    680:                        ;;
                    681:                esac
                    682:                ;;
                    683:        isi68 | isi)
                    684:                basic_machine=m68k-isi
                    685:                os=-sysv
                    686:                ;;
1.7     ! millert   687:        m68knommu)
        !           688:                basic_machine=m68k-unknown
        !           689:                os=-linux
        !           690:                ;;
        !           691:        m68knommu-*)
        !           692:                basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
        !           693:                os=-linux
        !           694:                ;;
1.1       millert   695:        m88k-omron*)
                    696:                basic_machine=m88k-omron
                    697:                ;;
                    698:        magnum | m3230)
                    699:                basic_machine=mips-mips
                    700:                os=-sysv
                    701:                ;;
                    702:        merlin)
                    703:                basic_machine=ns32k-utek
                    704:                os=-sysv
                    705:                ;;
1.2       millert   706:        mingw32)
                    707:                basic_machine=i386-pc
                    708:                os=-mingw32
                    709:                ;;
1.7     ! millert   710:        mingw32ce)
        !           711:                basic_machine=arm-unknown
        !           712:                os=-mingw32ce
        !           713:                ;;
1.1       millert   714:        miniframe)
                    715:                basic_machine=m68000-convergent
                    716:                ;;
1.2       millert   717:        *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
                    718:                basic_machine=m68k-atari
                    719:                os=-mint
                    720:                ;;
1.1       millert   721:        mips3*-*)
                    722:                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
                    723:                ;;
                    724:        mips3*)
                    725:                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
                    726:                ;;
1.2       millert   727:        monitor)
                    728:                basic_machine=m68k-rom68k
                    729:                os=-coff
                    730:                ;;
1.3       millert   731:        morphos)
                    732:                basic_machine=powerpc-unknown
                    733:                os=-morphos
                    734:                ;;
1.2       millert   735:        msdos)
                    736:                basic_machine=i386-pc
                    737:                os=-msdos
                    738:                ;;
1.5       millert   739:        ms1-*)
                    740:                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
                    741:                ;;
1.2       millert   742:        mvs)
                    743:                basic_machine=i370-ibm
                    744:                os=-mvs
                    745:                ;;
1.1       millert   746:        ncr3000)
                    747:                basic_machine=i486-ncr
                    748:                os=-sysv4
                    749:                ;;
1.2       millert   750:        netbsd386)
                    751:                basic_machine=i386-unknown
                    752:                os=-netbsd
                    753:                ;;
                    754:        netwinder)
                    755:                basic_machine=armv4l-rebel
                    756:                os=-linux
                    757:                ;;
1.1       millert   758:        news | news700 | news800 | news900)
                    759:                basic_machine=m68k-sony
                    760:                os=-newsos
                    761:                ;;
                    762:        news1000)
                    763:                basic_machine=m68030-sony
                    764:                os=-newsos
                    765:                ;;
                    766:        news-3600 | risc-news)
                    767:                basic_machine=mips-sony
                    768:                os=-newsos
                    769:                ;;
1.2       millert   770:        necv70)
                    771:                basic_machine=v70-nec
                    772:                os=-sysv
                    773:                ;;
1.1       millert   774:        next | m*-next )
                    775:                basic_machine=m68k-next
                    776:                case $os in
                    777:                    -nextstep* )
                    778:                        ;;
                    779:                    -ns2*)
                    780:                      os=-nextstep2
                    781:                        ;;
                    782:                    *)
                    783:                      os=-nextstep3
                    784:                        ;;
                    785:                esac
                    786:                ;;
                    787:        nh3000)
                    788:                basic_machine=m68k-harris
                    789:                os=-cxux
                    790:                ;;
                    791:        nh[45]000)
                    792:                basic_machine=m88k-harris
                    793:                os=-cxux
                    794:                ;;
                    795:        nindy960)
                    796:                basic_machine=i960-intel
                    797:                os=-nindy
                    798:                ;;
1.2       millert   799:        mon960)
                    800:                basic_machine=i960-intel
                    801:                os=-mon960
                    802:                ;;
                    803:        nonstopux)
                    804:                basic_machine=mips-compaq
                    805:                os=-nonstopux
                    806:                ;;
1.1       millert   807:        np1)
                    808:                basic_machine=np1-gould
                    809:                ;;
1.2       millert   810:        nsr-tandem)
                    811:                basic_machine=nsr-tandem
                    812:                ;;
                    813:        op50n-* | op60c-*)
                    814:                basic_machine=hppa1.1-oki
                    815:                os=-proelf
                    816:                ;;
1.5       millert   817:        openrisc | openrisc-*)
1.3       millert   818:                basic_machine=or32-unknown
1.5       millert   819:                ;;
                    820:        os400)
                    821:                basic_machine=powerpc-ibm
                    822:                os=-os400
1.3       millert   823:                ;;
1.2       millert   824:        OSE68000 | ose68000)
                    825:                basic_machine=m68000-ericsson
                    826:                os=-ose
                    827:                ;;
                    828:        os68k)
                    829:                basic_machine=m68k-none
                    830:                os=-os68k
                    831:                ;;
1.1       millert   832:        pa-hitachi)
                    833:                basic_machine=hppa1.1-hitachi
                    834:                os=-hiuxwe2
                    835:                ;;
                    836:        paragon)
                    837:                basic_machine=i860-intel
                    838:                os=-osf
                    839:                ;;
1.7     ! millert   840:        parisc)
        !           841:                basic_machine=hppa-unknown
        !           842:                os=-linux
        !           843:                ;;
        !           844:        parisc-*)
        !           845:                basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
        !           846:                os=-linux
        !           847:                ;;
1.1       millert   848:        pbd)
                    849:                basic_machine=sparc-tti
                    850:                ;;
                    851:        pbb)
                    852:                basic_machine=m68k-tti
                    853:                ;;
1.3       millert   854:        pc532 | pc532-*)
1.1       millert   855:                basic_machine=ns32k-pc532
                    856:                ;;
1.5       millert   857:        pc98)
                    858:                basic_machine=i386-pc
                    859:                ;;
                    860:        pc98-*)
                    861:                basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
                    862:                ;;
1.3       millert   863:        pentium | p5 | k5 | k6 | nexgen | viac3)
1.2       millert   864:                basic_machine=i586-pc
1.1       millert   865:                ;;
1.3       millert   866:        pentiumpro | p6 | 6x86 | athlon | athlon_*)
1.2       millert   867:                basic_machine=i686-pc
1.1       millert   868:                ;;
1.5       millert   869:        pentiumii | pentium2 | pentiumiii | pentium3)
1.2       millert   870:                basic_machine=i686-pc
                    871:                ;;
1.5       millert   872:        pentium4)
                    873:                basic_machine=i786-pc
                    874:                ;;
1.3       millert   875:        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1.1       millert   876:                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
                    877:                ;;
1.2       millert   878:        pentiumpro-* | p6-* | 6x86-* | athlon-*)
1.1       millert   879:                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                    880:                ;;
1.5       millert   881:        pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1.2       millert   882:                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1.1       millert   883:                ;;
1.5       millert   884:        pentium4-*)
                    885:                basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
                    886:                ;;
1.1       millert   887:        pn)
                    888:                basic_machine=pn-gould
                    889:                ;;
1.2       millert   890:        power)  basic_machine=power-ibm
1.1       millert   891:                ;;
                    892:        ppc)    basic_machine=powerpc-unknown
1.3       millert   893:                ;;
1.1       millert   894:        ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
                    895:                ;;
                    896:        ppcle | powerpclittle | ppc-le | powerpc-little)
                    897:                basic_machine=powerpcle-unknown
1.3       millert   898:                ;;
1.1       millert   899:        ppcle-* | powerpclittle-*)
                    900:                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
                    901:                ;;
1.3       millert   902:        ppc64)  basic_machine=powerpc64-unknown
                    903:                ;;
                    904:        ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
                    905:                ;;
                    906:        ppc64le | powerpc64little | ppc64-le | powerpc64-little)
                    907:                basic_machine=powerpc64le-unknown
                    908:                ;;
                    909:        ppc64le-* | powerpc64little-*)
                    910:                basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
                    911:                ;;
1.1       millert   912:        ps2)
                    913:                basic_machine=i386-ibm
                    914:                ;;
1.2       millert   915:        pw32)
                    916:                basic_machine=i586-unknown
                    917:                os=-pw32
                    918:                ;;
1.5       millert   919:        rdos)
                    920:                basic_machine=i386-pc
                    921:                os=-rdos
                    922:                ;;
1.2       millert   923:        rom68k)
                    924:                basic_machine=m68k-rom68k
                    925:                os=-coff
                    926:                ;;
1.1       millert   927:        rm[46]00)
                    928:                basic_machine=mips-siemens
                    929:                ;;
                    930:        rtpc | rtpc-*)
                    931:                basic_machine=romp-ibm
                    932:                ;;
1.3       millert   933:        s390 | s390-*)
                    934:                basic_machine=s390-ibm
                    935:                ;;
                    936:        s390x | s390x-*)
                    937:                basic_machine=s390x-ibm
                    938:                ;;
1.2       millert   939:        sa29200)
                    940:                basic_machine=a29k-amd
                    941:                os=-udi
                    942:                ;;
1.3       millert   943:        sb1)
                    944:                basic_machine=mipsisa64sb1-unknown
                    945:                ;;
                    946:        sb1el)
                    947:                basic_machine=mipsisa64sb1el-unknown
                    948:                ;;
1.6       millert   949:        sde)
                    950:                basic_machine=mipsisa32-sde
                    951:                os=-elf
                    952:                ;;
1.5       millert   953:        sei)
                    954:                basic_machine=mips-sei
                    955:                os=-seiux
                    956:                ;;
1.1       millert   957:        sequent)
                    958:                basic_machine=i386-sequent
                    959:                ;;
                    960:        sh)
                    961:                basic_machine=sh-hitachi
                    962:                os=-hms
                    963:                ;;
1.6       millert   964:        sh5el)
                    965:                basic_machine=sh5le-unknown
                    966:                ;;
1.5       millert   967:        sh64)
                    968:                basic_machine=sh64-unknown
                    969:                ;;
1.3       millert   970:        sparclite-wrs | simso-wrs)
1.2       millert   971:                basic_machine=sparclite-wrs
                    972:                os=-vxworks
                    973:                ;;
1.1       millert   974:        sps7)
                    975:                basic_machine=m68k-bull
                    976:                os=-sysv2
                    977:                ;;
                    978:        spur)
                    979:                basic_machine=spur-unknown
                    980:                ;;
1.2       millert   981:        st2000)
                    982:                basic_machine=m68k-tandem
                    983:                ;;
                    984:        stratus)
                    985:                basic_machine=i860-stratus
                    986:                os=-sysv4
                    987:                ;;
1.1       millert   988:        sun2)
                    989:                basic_machine=m68000-sun
                    990:                ;;
                    991:        sun2os3)
                    992:                basic_machine=m68000-sun
                    993:                os=-sunos3
                    994:                ;;
                    995:        sun2os4)
                    996:                basic_machine=m68000-sun
                    997:                os=-sunos4
                    998:                ;;
                    999:        sun3os3)
                   1000:                basic_machine=m68k-sun
                   1001:                os=-sunos3
                   1002:                ;;
                   1003:        sun3os4)
                   1004:                basic_machine=m68k-sun
                   1005:                os=-sunos4
                   1006:                ;;
                   1007:        sun4os3)
                   1008:                basic_machine=sparc-sun
                   1009:                os=-sunos3
                   1010:                ;;
                   1011:        sun4os4)
                   1012:                basic_machine=sparc-sun
                   1013:                os=-sunos4
                   1014:                ;;
                   1015:        sun4sol2)
                   1016:                basic_machine=sparc-sun
                   1017:                os=-solaris2
                   1018:                ;;
                   1019:        sun3 | sun3-*)
                   1020:                basic_machine=m68k-sun
                   1021:                ;;
                   1022:        sun4)
                   1023:                basic_machine=sparc-sun
                   1024:                ;;
                   1025:        sun386 | sun386i | roadrunner)
                   1026:                basic_machine=i386-sun
                   1027:                ;;
1.2       millert  1028:        sv1)
                   1029:                basic_machine=sv1-cray
                   1030:                os=-unicos
                   1031:                ;;
1.1       millert  1032:        symmetry)
                   1033:                basic_machine=i386-sequent
                   1034:                os=-dynix
                   1035:                ;;
1.2       millert  1036:        t3e)
1.3       millert  1037:                basic_machine=alphaev5-cray
                   1038:                os=-unicos
                   1039:                ;;
                   1040:        t90)
                   1041:                basic_machine=t90-cray
1.2       millert  1042:                os=-unicos
                   1043:                ;;
1.5       millert  1044:        tic54x | c54x*)
                   1045:                basic_machine=tic54x-unknown
1.3       millert  1046:                os=-coff
                   1047:                ;;
1.5       millert  1048:        tic55x | c55x*)
                   1049:                basic_machine=tic55x-unknown
                   1050:                os=-coff
                   1051:                ;;
                   1052:        tic6x | c6x*)
                   1053:                basic_machine=tic6x-unknown
1.2       millert  1054:                os=-coff
                   1055:                ;;
1.7     ! millert  1056:        tile*)
        !          1057:                basic_machine=tile-unknown
        !          1058:                os=-linux-gnu
        !          1059:                ;;
1.2       millert  1060:        tx39)
                   1061:                basic_machine=mipstx39-unknown
                   1062:                ;;
                   1063:        tx39el)
                   1064:                basic_machine=mipstx39el-unknown
                   1065:                ;;
1.3       millert  1066:        toad1)
                   1067:                basic_machine=pdp10-xkl
                   1068:                os=-tops20
                   1069:                ;;
1.1       millert  1070:        tower | tower-32)
                   1071:                basic_machine=m68k-ncr
                   1072:                ;;
1.5       millert  1073:        tpf)
                   1074:                basic_machine=s390x-ibm
                   1075:                os=-tpf
                   1076:                ;;
1.1       millert  1077:        udi29k)
                   1078:                basic_machine=a29k-amd
                   1079:                os=-udi
                   1080:                ;;
                   1081:        ultra3)
                   1082:                basic_machine=a29k-nyu
                   1083:                os=-sym1
                   1084:                ;;
1.2       millert  1085:        v810 | necv810)
                   1086:                basic_machine=v810-nec
                   1087:                os=-none
                   1088:                ;;
1.1       millert  1089:        vaxv)
                   1090:                basic_machine=vax-dec
                   1091:                os=-sysv
                   1092:                ;;
                   1093:        vms)
                   1094:                basic_machine=vax-dec
                   1095:                os=-vms
                   1096:                ;;
1.2       millert  1097:        vpp*|vx|vx-*)
1.3       millert  1098:                basic_machine=f301-fujitsu
                   1099:                ;;
1.1       millert  1100:        vxworks960)
                   1101:                basic_machine=i960-wrs
                   1102:                os=-vxworks
                   1103:                ;;
                   1104:        vxworks68)
                   1105:                basic_machine=m68k-wrs
                   1106:                os=-vxworks
                   1107:                ;;
                   1108:        vxworks29k)
                   1109:                basic_machine=a29k-wrs
                   1110:                os=-vxworks
                   1111:                ;;
1.2       millert  1112:        w65*)
                   1113:                basic_machine=w65-wdc
                   1114:                os=-none
                   1115:                ;;
                   1116:        w89k-*)
                   1117:                basic_machine=hppa1.1-winbond
                   1118:                os=-proelf
                   1119:                ;;
1.5       millert  1120:        xbox)
                   1121:                basic_machine=i686-pc
                   1122:                os=-mingw32
                   1123:                ;;
1.3       millert  1124:        xps | xps100)
                   1125:                basic_machine=xps100-honeywell
1.2       millert  1126:                ;;
1.3       millert  1127:        ymp)
                   1128:                basic_machine=ymp-cray
1.1       millert  1129:                os=-unicos
                   1130:                ;;
1.2       millert  1131:        z8k-*-coff)
                   1132:                basic_machine=z8k-unknown
                   1133:                os=-sim
                   1134:                ;;
1.1       millert  1135:        none)
                   1136:                basic_machine=none-none
                   1137:                os=-none
                   1138:                ;;
                   1139:
                   1140: # Here we handle the default manufacturer of certain CPU types.  It is in
                   1141: # some cases the only manufacturer, in others, it is the most popular.
1.2       millert  1142:        w89k)
                   1143:                basic_machine=hppa1.1-winbond
                   1144:                ;;
                   1145:        op50n)
                   1146:                basic_machine=hppa1.1-oki
                   1147:                ;;
                   1148:        op60c)
                   1149:                basic_machine=hppa1.1-oki
                   1150:                ;;
1.1       millert  1151:        romp)
                   1152:                basic_machine=romp-ibm
                   1153:                ;;
1.5       millert  1154:        mmix)
                   1155:                basic_machine=mmix-knuth
                   1156:                ;;
1.1       millert  1157:        rs6000)
                   1158:                basic_machine=rs6000-ibm
                   1159:                ;;
                   1160:        vax)
                   1161:                basic_machine=vax-dec
                   1162:                ;;
1.2       millert  1163:        pdp10)
                   1164:                # there are many clones, so DEC is not a safe bet
                   1165:                basic_machine=pdp10-unknown
                   1166:                ;;
1.1       millert  1167:        pdp11)
                   1168:                basic_machine=pdp11-dec
                   1169:                ;;
                   1170:        we32k)
                   1171:                basic_machine=we32k-att
                   1172:                ;;
1.5       millert  1173:        sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1.2       millert  1174:                basic_machine=sh-unknown
                   1175:                ;;
1.5       millert  1176:        sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1.1       millert  1177:                basic_machine=sparc-sun
                   1178:                ;;
1.3       millert  1179:        cydra)
1.1       millert  1180:                basic_machine=cydra-cydrome
                   1181:                ;;
                   1182:        orion)
                   1183:                basic_machine=orion-highlevel
                   1184:                ;;
                   1185:        orion105)
                   1186:                basic_machine=clipper-highlevel
                   1187:                ;;
1.2       millert  1188:        mac | mpw | mac-mpw)
                   1189:                basic_machine=m68k-apple
                   1190:                ;;
                   1191:        pmac | pmac-mpw)
                   1192:                basic_machine=powerpc-apple
                   1193:                ;;
                   1194:        *-unknown)
                   1195:                # Make sure to match an already-canonicalized machine name.
                   1196:                ;;
1.1       millert  1197:        *)
                   1198:                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
                   1199:                exit 1
                   1200:                ;;
                   1201: esac
                   1202:
                   1203: # Here we canonicalize certain aliases for manufacturers.
                   1204: case $basic_machine in
                   1205:        *-digital*)
                   1206:                basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
                   1207:                ;;
                   1208:        *-commodore*)
                   1209:                basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
                   1210:                ;;
                   1211:        *)
                   1212:                ;;
                   1213: esac
                   1214:
                   1215: # Decode manufacturer-specific aliases for certain operating systems.
                   1216:
                   1217: if [ x"$os" != x"" ]
                   1218: then
                   1219: case $os in
                   1220:         # First match some system type aliases
                   1221:         # that might get confused with valid system types.
                   1222:        # -solaris* is a basic system type, with this one exception.
                   1223:        -solaris1 | -solaris1.*)
                   1224:                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                   1225:                ;;
                   1226:        -solaris)
                   1227:                os=-solaris2
                   1228:                ;;
1.2       millert  1229:        -svr4*)
1.1       millert  1230:                os=-sysv4
                   1231:                ;;
1.2       millert  1232:        -unixware*)
                   1233:                os=-sysv4.2uw
                   1234:                ;;
1.1       millert  1235:        -gnu/linux*)
                   1236:                os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
                   1237:                ;;
                   1238:        # First accept the basic system types.
                   1239:        # The portable systems comes first.
                   1240:        # Each alternative MUST END IN A *, to match a version number.
                   1241:        # -sysv* is not here because it comes later, after sysvr4.
                   1242:        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
                   1243:              | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
                   1244:              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1.2       millert  1245:              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
                   1246:              | -aos* \
1.1       millert  1247:              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
                   1248:              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1.5       millert  1249:              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
                   1250:              | -openbsd* | -solidbsd* \
                   1251:              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
                   1252:              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1.1       millert  1253:              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
                   1254:              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1.2       millert  1255:              | -chorusos* | -chorusrdb* \
                   1256:              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1.5       millert  1257:              | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
                   1258:              | -uxpv* | -beos* | -mpeix* | -udk* \
1.3       millert  1259:              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1.2       millert  1260:              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1.3       millert  1261:              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
                   1262:              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
                   1263:              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1.5       millert  1264:              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1.7     ! millert  1265:              | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1.1       millert  1266:        # Remember, each alternative MUST END IN *, to match a version number.
                   1267:                ;;
1.2       millert  1268:        -qnx*)
                   1269:                case $basic_machine in
                   1270:                    x86-* | i*86-*)
                   1271:                        ;;
                   1272:                    *)
                   1273:                        os=-nto$os
                   1274:                        ;;
                   1275:                esac
                   1276:                ;;
1.3       millert  1277:        -nto-qnx*)
                   1278:                ;;
1.2       millert  1279:        -nto*)
1.3       millert  1280:                os=`echo $os | sed -e 's|nto|nto-qnx|'`
1.2       millert  1281:                ;;
                   1282:        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1.5       millert  1283:              | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1.2       millert  1284:              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
                   1285:                ;;
                   1286:        -mac*)
                   1287:                os=`echo $os | sed -e 's|mac|macos|'`
                   1288:                ;;
1.5       millert  1289:        -linux-dietlibc)
                   1290:                os=-linux-dietlibc
                   1291:                ;;
1.1       millert  1292:        -linux*)
                   1293:                os=`echo $os | sed -e 's|linux|linux-gnu|'`
                   1294:                ;;
                   1295:        -sunos5*)
                   1296:                os=`echo $os | sed -e 's|sunos5|solaris2|'`
                   1297:                ;;
                   1298:        -sunos6*)
                   1299:                os=`echo $os | sed -e 's|sunos6|solaris3|'`
                   1300:                ;;
1.2       millert  1301:        -opened*)
                   1302:                os=-openedition
                   1303:                ;;
1.5       millert  1304:         -os400*)
                   1305:                os=-os400
                   1306:                ;;
1.2       millert  1307:        -wince*)
                   1308:                os=-wince
                   1309:                ;;
1.1       millert  1310:        -osfrose*)
                   1311:                os=-osfrose
                   1312:                ;;
                   1313:        -osf*)
                   1314:                os=-osf
                   1315:                ;;
                   1316:        -utek*)
                   1317:                os=-bsd
                   1318:                ;;
                   1319:        -dynix*)
                   1320:                os=-bsd
                   1321:                ;;
                   1322:        -acis*)
                   1323:                os=-aos
                   1324:                ;;
1.3       millert  1325:        -atheos*)
                   1326:                os=-atheos
                   1327:                ;;
1.5       millert  1328:        -syllable*)
                   1329:                os=-syllable
                   1330:                ;;
1.2       millert  1331:        -386bsd)
                   1332:                os=-bsd
                   1333:                ;;
1.1       millert  1334:        -ctix* | -uts*)
                   1335:                os=-sysv
                   1336:                ;;
1.3       millert  1337:        -nova*)
                   1338:                os=-rtmk-nova
                   1339:                ;;
1.1       millert  1340:        -ns2 )
1.3       millert  1341:                os=-nextstep2
1.1       millert  1342:                ;;
1.2       millert  1343:        -nsk*)
                   1344:                os=-nsk
                   1345:                ;;
1.1       millert  1346:        # Preserve the version number of sinix5.
                   1347:        -sinix5.*)
                   1348:                os=`echo $os | sed -e 's|sinix|sysv|'`
                   1349:                ;;
                   1350:        -sinix*)
                   1351:                os=-sysv4
                   1352:                ;;
1.5       millert  1353:         -tpf*)
                   1354:                os=-tpf
                   1355:                ;;
1.1       millert  1356:        -triton*)
                   1357:                os=-sysv3
                   1358:                ;;
                   1359:        -oss*)
                   1360:                os=-sysv3
                   1361:                ;;
                   1362:        -svr4)
                   1363:                os=-sysv4
                   1364:                ;;
                   1365:        -svr3)
                   1366:                os=-sysv3
                   1367:                ;;
                   1368:        -sysvr4)
                   1369:                os=-sysv4
                   1370:                ;;
                   1371:        # This must come after -sysvr4.
                   1372:        -sysv*)
                   1373:                ;;
1.2       millert  1374:        -ose*)
                   1375:                os=-ose
                   1376:                ;;
                   1377:        -es1800*)
                   1378:                os=-ose
                   1379:                ;;
1.1       millert  1380:        -xenix)
                   1381:                os=-xenix
                   1382:                ;;
1.3       millert  1383:        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
                   1384:                os=-mint
1.2       millert  1385:                ;;
1.5       millert  1386:        -aros*)
                   1387:                os=-aros
                   1388:                ;;
                   1389:        -kaos*)
                   1390:                os=-kaos
                   1391:                ;;
                   1392:        -zvmoe)
                   1393:                os=-zvmoe
                   1394:                ;;
1.1       millert  1395:        -none)
                   1396:                ;;
                   1397:        *)
                   1398:                # Get rid of the `-' at the beginning of $os.
                   1399:                os=`echo $os | sed 's/[^-]*-//'`
                   1400:                echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
                   1401:                exit 1
                   1402:                ;;
                   1403: esac
                   1404: else
                   1405:
                   1406: # Here we handle the default operating systems that come with various machines.
                   1407: # The value should be what the vendor currently ships out the door with their
                   1408: # machine or put another way, the most popular os provided with the machine.
                   1409:
                   1410: # Note that if you're going to try to match "-MANUFACTURER" here (say,
                   1411: # "-sun"), then you have to tell the case statement up towards the top
                   1412: # that MANUFACTURER isn't an operating system.  Otherwise, code above
                   1413: # will signal an error saying that MANUFACTURER isn't an operating
                   1414: # system, and we'll never get to this point.
                   1415:
                   1416: case $basic_machine in
1.6       millert  1417:         score-*)
                   1418:                os=-elf
                   1419:                ;;
1.5       millert  1420:         spu-*)
                   1421:                os=-elf
                   1422:                ;;
1.1       millert  1423:        *-acorn)
                   1424:                os=-riscix1.2
                   1425:                ;;
1.2       millert  1426:        arm*-rebel)
                   1427:                os=-linux
                   1428:                ;;
1.1       millert  1429:        arm*-semi)
                   1430:                os=-aout
                   1431:                ;;
1.5       millert  1432:         c4x-* | tic4x-*)
                   1433:                os=-coff
                   1434:                ;;
1.3       millert  1435:        # This must come before the *-dec entry.
1.2       millert  1436:        pdp10-*)
                   1437:                os=-tops20
                   1438:                ;;
1.3       millert  1439:        pdp11-*)
1.1       millert  1440:                os=-none
                   1441:                ;;
                   1442:        *-dec | vax-*)
                   1443:                os=-ultrix4.2
                   1444:                ;;
                   1445:        m68*-apollo)
                   1446:                os=-domain
                   1447:                ;;
                   1448:        i386-sun)
                   1449:                os=-sunos4.0.2
                   1450:                ;;
                   1451:        m68000-sun)
                   1452:                os=-sunos3
                   1453:                # This also exists in the configure program, but was not the
                   1454:                # default.
                   1455:                # os=-sunos4
                   1456:                ;;
1.2       millert  1457:        m68*-cisco)
                   1458:                os=-aout
1.7     ! millert  1459:                ;;
        !          1460:         mep-*)
        !          1461:                os=-elf
1.2       millert  1462:                ;;
                   1463:        mips*-cisco)
                   1464:                os=-elf
                   1465:                ;;
                   1466:        mips*-*)
                   1467:                os=-elf
                   1468:                ;;
1.3       millert  1469:        or32-*)
                   1470:                os=-coff
                   1471:                ;;
1.1       millert  1472:        *-tti)  # must be before sparc entry or we get the wrong os.
                   1473:                os=-sysv3
                   1474:                ;;
                   1475:        sparc-* | *-sun)
                   1476:                os=-sunos4.1.1
                   1477:                ;;
1.2       millert  1478:        *-be)
                   1479:                os=-beos
                   1480:                ;;
1.5       millert  1481:        *-haiku)
                   1482:                os=-haiku
                   1483:                ;;
1.1       millert  1484:        *-ibm)
                   1485:                os=-aix
                   1486:                ;;
1.5       millert  1487:        *-knuth)
                   1488:                os=-mmixware
                   1489:                ;;
1.2       millert  1490:        *-wec)
                   1491:                os=-proelf
                   1492:                ;;
                   1493:        *-winbond)
                   1494:                os=-proelf
                   1495:                ;;
                   1496:        *-oki)
                   1497:                os=-proelf
                   1498:                ;;
1.1       millert  1499:        *-hp)
                   1500:                os=-hpux
                   1501:                ;;
                   1502:        *-hitachi)
                   1503:                os=-hiux
                   1504:                ;;
                   1505:        i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
                   1506:                os=-sysv
                   1507:                ;;
                   1508:        *-cbm)
1.2       millert  1509:                os=-amigaos
1.1       millert  1510:                ;;
                   1511:        *-dg)
                   1512:                os=-dgux
                   1513:                ;;
                   1514:        *-dolphin)
                   1515:                os=-sysv3
                   1516:                ;;
                   1517:        m68k-ccur)
                   1518:                os=-rtu
                   1519:                ;;
                   1520:        m88k-omron*)
                   1521:                os=-luna
                   1522:                ;;
                   1523:        *-next )
                   1524:                os=-nextstep
                   1525:                ;;
                   1526:        *-sequent)
                   1527:                os=-ptx
                   1528:                ;;
                   1529:        *-crds)
                   1530:                os=-unos
                   1531:                ;;
                   1532:        *-ns)
                   1533:                os=-genix
                   1534:                ;;
                   1535:        i370-*)
                   1536:                os=-mvs
                   1537:                ;;
                   1538:        *-next)
                   1539:                os=-nextstep3
                   1540:                ;;
1.3       millert  1541:        *-gould)
1.1       millert  1542:                os=-sysv
                   1543:                ;;
1.3       millert  1544:        *-highlevel)
1.1       millert  1545:                os=-bsd
                   1546:                ;;
                   1547:        *-encore)
                   1548:                os=-bsd
                   1549:                ;;
1.3       millert  1550:        *-sgi)
1.1       millert  1551:                os=-irix
                   1552:                ;;
1.3       millert  1553:        *-siemens)
1.1       millert  1554:                os=-sysv4
                   1555:                ;;
                   1556:        *-masscomp)
                   1557:                os=-rtu
                   1558:                ;;
1.2       millert  1559:        f30[01]-fujitsu | f700-fujitsu)
1.1       millert  1560:                os=-uxpv
                   1561:                ;;
1.2       millert  1562:        *-rom68k)
                   1563:                os=-coff
                   1564:                ;;
                   1565:        *-*bug)
                   1566:                os=-coff
                   1567:                ;;
                   1568:        *-apple)
                   1569:                os=-macos
                   1570:                ;;
                   1571:        *-atari*)
                   1572:                os=-mint
                   1573:                ;;
1.1       millert  1574:        *)
                   1575:                os=-none
                   1576:                ;;
                   1577: esac
                   1578: fi
                   1579:
                   1580: # Here we handle the case where we know the os, and the CPU type, but not the
                   1581: # manufacturer.  We pick the logical manufacturer.
                   1582: vendor=unknown
                   1583: case $basic_machine in
                   1584:        *-unknown)
                   1585:                case $os in
                   1586:                        -riscix*)
                   1587:                                vendor=acorn
                   1588:                                ;;
                   1589:                        -sunos*)
                   1590:                                vendor=sun
                   1591:                                ;;
                   1592:                        -aix*)
                   1593:                                vendor=ibm
                   1594:                                ;;
1.2       millert  1595:                        -beos*)
                   1596:                                vendor=be
                   1597:                                ;;
1.1       millert  1598:                        -hpux*)
                   1599:                                vendor=hp
                   1600:                                ;;
1.2       millert  1601:                        -mpeix*)
                   1602:                                vendor=hp
                   1603:                                ;;
1.1       millert  1604:                        -hiux*)
                   1605:                                vendor=hitachi
                   1606:                                ;;
                   1607:                        -unos*)
                   1608:                                vendor=crds
                   1609:                                ;;
                   1610:                        -dgux*)
                   1611:                                vendor=dg
                   1612:                                ;;
                   1613:                        -luna*)
                   1614:                                vendor=omron
                   1615:                                ;;
                   1616:                        -genix*)
                   1617:                                vendor=ns
                   1618:                                ;;
1.2       millert  1619:                        -mvs* | -opened*)
1.1       millert  1620:                                vendor=ibm
                   1621:                                ;;
1.5       millert  1622:                        -os400*)
                   1623:                                vendor=ibm
                   1624:                                ;;
1.1       millert  1625:                        -ptx*)
                   1626:                                vendor=sequent
                   1627:                                ;;
1.5       millert  1628:                        -tpf*)
                   1629:                                vendor=ibm
                   1630:                                ;;
1.3       millert  1631:                        -vxsim* | -vxworks* | -windiss*)
1.1       millert  1632:                                vendor=wrs
                   1633:                                ;;
                   1634:                        -aux*)
                   1635:                                vendor=apple
                   1636:                                ;;
1.2       millert  1637:                        -hms*)
                   1638:                                vendor=hitachi
                   1639:                                ;;
                   1640:                        -mpw* | -macos*)
                   1641:                                vendor=apple
                   1642:                                ;;
                   1643:                        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
                   1644:                                vendor=atari
1.3       millert  1645:                                ;;
                   1646:                        -vos*)
                   1647:                                vendor=stratus
1.2       millert  1648:                                ;;
1.1       millert  1649:                esac
                   1650:                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
                   1651:                ;;
                   1652: esac
                   1653:
                   1654: echo $basic_machine$os
1.5       millert  1655: exit
1.2       millert  1656:
                   1657: # Local variables:
                   1658: # eval: (add-hook 'write-file-hooks 'time-stamp)
                   1659: # time-stamp-start: "timestamp='"
                   1660: # time-stamp-format: "%:y-%02m-%02d"
                   1661: # time-stamp-end: "'"
                   1662: # End: