Annotation of parser3/config.sub, revision 1.2

1.1       paf         1: #! /bin/sh
                      2: # Configuration validation subroutine script, version 1.1.
                      3: #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
                      4: #   Free Software Foundation, Inc.
                      5: #
                      6: # This file is (in principle) common to ALL GNU software.
                      7: # The presence of a machine in this file suggests that SOME GNU software
                      8: # can handle that machine.  It does not imply ALL GNU software can.
                      9: #
                     10: # This file is free software; you can redistribute it and/or modify
                     11: # it under the terms of the GNU General Public License as published by
                     12: # the Free Software Foundation; either version 2 of the License, or
                     13: # (at your option) any later version.
                     14: #
                     15: # This program is distributed in the hope that it will be useful,
                     16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
                     17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     18: # GNU General Public License for more details.
                     19: #
                     20: # You should have received a copy of the GNU General Public License
                     21: # along with this program; if not, write to the Free Software
                     22: # Foundation, Inc., 59 Temple Place - Suite 330,
                     23: # Boston, MA 02111-1307, USA.
                     24: 
                     25: # As a special exception to the GNU General Public License, if you
                     26: # distribute this file as part of a program that contains a
                     27: # configuration script generated by Autoconf, you may include it under
                     28: # the same distribution terms that you use for the rest of that program.
                     29: 
                     30: # Written by Per Bothner <bothner@cygnus.com>.
                     31: # Please send patches to <config-patches@gnu.org>.
                     32: #
                     33: # Configuration subroutine to validate and canonicalize a configuration type.
                     34: # Supply the specified configuration type as an argument.
                     35: # If it is invalid, we print an error message on stderr and exit with code 1.
                     36: # Otherwise, we print the canonical config type on stdout and succeed.
                     37: 
                     38: # This file is supposed to be the same for all GNU packages
                     39: # and recognize all the CPU types, system types and aliases
                     40: # that are meaningful with *any* GNU software.
                     41: # Each package is responsible for reporting which valid configurations
                     42: # it does not support.  The user should be able to distinguish
                     43: # a failure to support a valid configuration from a meaningless
                     44: # configuration.
                     45: 
                     46: # The goal of this file is to map all the various variations of a given
                     47: # machine specification into a single specification in the form:
                     48: #      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
                     49: # or in some cases, the newer four-part form:
                     50: #      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
                     51: # It is wrong to echo any other type of specification.
                     52: 
                     53: if [ x$1 = x ]
                     54: then
                     55:        echo Configuration name missing. 1>&2
                     56:        echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
                     57:        echo "or     $0 ALIAS" 1>&2
                     58:        echo where ALIAS is a recognized configuration type. 1>&2
                     59:        exit 1
                     60: fi
                     61: 
                     62: # First pass through any local machine types.
                     63: case $1 in
                     64:        *local*)
                     65:                echo $1
                     66:                exit 0
                     67:                ;;
                     68:        *)
                     69:        ;;
                     70: esac
                     71: 
                     72: # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
                     73: # Here we must recognize all the valid KERNEL-OS combinations.
                     74: maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
                     75: case $maybe_os in
                     76:   nto-qnx* | linux-gnu*)
                     77:     os=-$maybe_os
                     78:     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
                     79:     ;;
                     80:   *)
                     81:     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
                     82:     if [ $basic_machine != $1 ]
                     83:     then os=`echo $1 | sed 's/.*-/-/'`
                     84:     else os=; fi
                     85:     ;;
                     86: esac
                     87: 
                     88: ### Let's recognize common machines as not being operating systems so
                     89: ### that things like config.sub decstation-3100 work.  We also
                     90: ### recognize some manufacturers as not being operating systems, so we
                     91: ### can provide default operating systems below.
                     92: case $os in
                     93:        -sun*os*)
                     94:                # Prevent following clause from handling this invalid input.
                     95:                ;;
                     96:        -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
                     97:        -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
                     98:        -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
                     99:        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
                    100:        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
                    101:        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
                    102:        -apple)
                    103:                os=
                    104:                basic_machine=$1
                    105:                ;;
                    106:        -sim | -cisco | -oki | -wec | -winbond)
                    107:                os=
                    108:                basic_machine=$1
                    109:                ;;
                    110:        -scout)
                    111:                ;;
                    112:        -wrs)
                    113:                os=-vxworks
                    114:                basic_machine=$1
                    115:                ;;
                    116:        -hiux*)
                    117:                os=-hiuxwe2
                    118:                ;;
                    119:        -sco5)
                    120:                os=-sco3.2v5
                    121:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    122:                ;;
                    123:        -sco4)
                    124:                os=-sco3.2v4
                    125:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    126:                ;;
                    127:        -sco3.2.[4-9]*)
                    128:                os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
                    129:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    130:                ;;
                    131:        -sco3.2v[4-9]*)
                    132:                # Don't forget version if it is 3.2v4 or newer.
                    133:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    134:                ;;
                    135:        -sco*)
                    136:                os=-sco3.2v2
                    137:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    138:                ;;
                    139:        -udk*)
                    140:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    141:                ;;
                    142:        -isc)
                    143:                os=-isc2.2
                    144:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    145:                ;;
                    146:        -clix*)
                    147:                basic_machine=clipper-intergraph
                    148:                ;;
                    149:        -isc*)
                    150:                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                    151:                ;;
                    152:        -lynx*)
                    153:                os=-lynxos
                    154:                ;;
                    155:        -ptx*)
                    156:                basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
                    157:                ;;
                    158:        -windowsnt*)
                    159:                os=`echo $os | sed -e 's/windowsnt/winnt/'`
                    160:                ;;
                    161:        -psos*)
                    162:                os=-psos
                    163:                ;;
                    164:        -mint | -mint[0-9]*)
                    165:                basic_machine=m68k-atari
                    166:                os=-mint
                    167:                ;;
                    168: esac
                    169: 
                    170: # Decode aliases for certain CPU-COMPANY combinations.
                    171: case $basic_machine in
                    172:        # Recognize the basic CPU types without company name.
                    173:        # Some are omitted here because they have special meanings below.
                    174:        tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
                    175:                | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
                    176:                | 580 | i960 | h8300 \
                    177:                | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
                    178:                | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
                    179:                | hppa64 \
                    180:                | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
                    181:                | alphaev6[78] \
                    182:                | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
                    183:                | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
                    184:                | mips64orion | mips64orionel | mipstx39 | mipstx39el \
                    185:                | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
                    186:                | mips64vr5000 | miprs64vr5000el | mcore \
                    187:                | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
                    188:                | thumb | d10v | fr30 | avr)
                    189:                basic_machine=$basic_machine-unknown
                    190:                ;;
                    191:        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
                    192:                ;;
                    193: 
                    194:        # We use `pc' rather than `unknown'
                    195:        # because (1) that's what they normally are, and
                    196:        # (2) the word "unknown" tends to confuse beginning users.
                    197:        i[34567]86)
                    198:          basic_machine=$basic_machine-pc
                    199:          ;;
                    200:        # Object if more than one company name word.
                    201:        *-*-*)
                    202:                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
                    203:                exit 1
                    204:                ;;
                    205:        # Recognize the basic CPU types with company name.
                    206:        # FIXME: clean up the formatting here.
                    207:        vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
                    208:              | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
                    209:              | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
                    210:              | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
                    211:              | xmp-* | ymp-* \
                    212:              | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
                    213:              | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
                    214:              | hppa2.0n-* | hppa64-* \
                    215:              | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
                    216:              | alphaev6[78]-* \
                    217:              | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
                    218:              | clipper-* | orion-* \
                    219:              | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
                    220:              | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
                    221:              | mips64el-* | mips64orion-* | mips64orionel-* \
                    222:              | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
                    223:              | mipstx39-* | mipstx39el-* | mcore-* \
                    224:              | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
                    225:              | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
                    226:              | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
                    227:              | bs2000-*)
                    228:                ;;
                    229:        # Recognize the various machine names and aliases which stand
                    230:        # for a CPU type and a company and sometimes even an OS.
                    231:        386bsd)
                    232:                basic_machine=i386-unknown
                    233:                os=-bsd
                    234:                ;;
                    235:        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
                    236:                basic_machine=m68000-att
                    237:                ;;
                    238:        3b*)
                    239:                basic_machine=we32k-att
                    240:                ;;
                    241:        a29khif)
                    242:                basic_machine=a29k-amd
                    243:                os=-udi
                    244:                ;;
                    245:        adobe68k)
                    246:                basic_machine=m68010-adobe
                    247:                os=-scout
                    248:                ;;
                    249:        alliant | fx80)
                    250:                basic_machine=fx80-alliant
                    251:                ;;
                    252:        altos | altos3068)
                    253:                basic_machine=m68k-altos
                    254:                ;;
                    255:        am29k)
                    256:                basic_machine=a29k-none
                    257:                os=-bsd
                    258:                ;;
                    259:        amdahl)
                    260:                basic_machine=580-amdahl
                    261:                os=-sysv
                    262:                ;;
                    263:        amiga | amiga-*)
                    264:                basic_machine=m68k-cbm
                    265:                ;;
                    266:        amigaos | amigados)
                    267:                basic_machine=m68k-cbm
                    268:                os=-amigaos
                    269:                ;;
                    270:        amigaunix | amix)
                    271:                basic_machine=m68k-cbm
                    272:                os=-sysv4
                    273:                ;;
                    274:        apollo68)
                    275:                basic_machine=m68k-apollo
                    276:                os=-sysv
                    277:                ;;
                    278:        apollo68bsd)
                    279:                basic_machine=m68k-apollo
                    280:                os=-bsd
                    281:                ;;
                    282:        aux)
                    283:                basic_machine=m68k-apple
                    284:                os=-aux
                    285:                ;;
                    286:        balance)
                    287:                basic_machine=ns32k-sequent
                    288:                os=-dynix
                    289:                ;;
                    290:        convex-c1)
                    291:                basic_machine=c1-convex
                    292:                os=-bsd
                    293:                ;;
                    294:        convex-c2)
                    295:                basic_machine=c2-convex
                    296:                os=-bsd
                    297:                ;;
                    298:        convex-c32)
                    299:                basic_machine=c32-convex
                    300:                os=-bsd
                    301:                ;;
                    302:        convex-c34)
                    303:                basic_machine=c34-convex
                    304:                os=-bsd
                    305:                ;;
                    306:        convex-c38)
                    307:                basic_machine=c38-convex
                    308:                os=-bsd
                    309:                ;;
                    310:        cray | ymp)
                    311:                basic_machine=ymp-cray
                    312:                os=-unicos
                    313:                ;;
                    314:        cray2)
                    315:                basic_machine=cray2-cray
                    316:                os=-unicos
                    317:                ;;
                    318:        [ctj]90-cray)
                    319:                basic_machine=c90-cray
                    320:                os=-unicos
                    321:                ;;
                    322:        crds | unos)
                    323:                basic_machine=m68k-crds
                    324:                ;;
                    325:        da30 | da30-*)
                    326:                basic_machine=m68k-da30
                    327:                ;;
                    328:        decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
                    329:                basic_machine=mips-dec
                    330:                ;;
                    331:        delta | 3300 | motorola-3300 | motorola-delta \
                    332:              | 3300-motorola | delta-motorola)
                    333:                basic_machine=m68k-motorola
                    334:                ;;
                    335:        delta88)
                    336:                basic_machine=m88k-motorola
                    337:                os=-sysv3
                    338:                ;;
                    339:        dpx20 | dpx20-*)
                    340:                basic_machine=rs6000-bull
                    341:                os=-bosx
                    342:                ;;
                    343:        dpx2* | dpx2*-bull)
                    344:                basic_machine=m68k-bull
                    345:                os=-sysv3
                    346:                ;;
                    347:        ebmon29k)
                    348:                basic_machine=a29k-amd
                    349:                os=-ebmon
                    350:                ;;
                    351:        elxsi)
                    352:                basic_machine=elxsi-elxsi
                    353:                os=-bsd
                    354:                ;;
                    355:        encore | umax | mmax)
                    356:                basic_machine=ns32k-encore
                    357:                ;;
                    358:        es1800 | OSE68k | ose68k | ose | OSE)
                    359:                basic_machine=m68k-ericsson
                    360:                os=-ose
                    361:                ;;
                    362:        fx2800)
                    363:                basic_machine=i860-alliant
                    364:                ;;
                    365:        genix)
                    366:                basic_machine=ns32k-ns
                    367:                ;;
                    368:        gmicro)
                    369:                basic_machine=tron-gmicro
                    370:                os=-sysv
                    371:                ;;
                    372:        h3050r* | hiux*)
                    373:                basic_machine=hppa1.1-hitachi
                    374:                os=-hiuxwe2
                    375:                ;;
                    376:        h8300hms)
                    377:                basic_machine=h8300-hitachi
                    378:                os=-hms
                    379:                ;;
                    380:        h8300xray)
                    381:                basic_machine=h8300-hitachi
                    382:                os=-xray
                    383:                ;;
                    384:        h8500hms)
                    385:                basic_machine=h8500-hitachi
                    386:                os=-hms
                    387:                ;;
                    388:        harris)
                    389:                basic_machine=m88k-harris
                    390:                os=-sysv3
                    391:                ;;
                    392:        hp300-*)
                    393:                basic_machine=m68k-hp
                    394:                ;;
                    395:        hp300bsd)
                    396:                basic_machine=m68k-hp
                    397:                os=-bsd
                    398:                ;;
                    399:        hp300hpux)
                    400:                basic_machine=m68k-hp
                    401:                os=-hpux
                    402:                ;;
                    403:        hp3k9[0-9][0-9] | hp9[0-9][0-9])
                    404:                basic_machine=hppa1.0-hp
                    405:                ;;
                    406:        hp9k2[0-9][0-9] | hp9k31[0-9])
                    407:                basic_machine=m68000-hp
                    408:                ;;
                    409:        hp9k3[2-9][0-9])
                    410:                basic_machine=m68k-hp
                    411:                ;;
                    412:        hp9k6[0-9][0-9] | hp6[0-9][0-9])
                    413:                basic_machine=hppa1.0-hp
                    414:                ;;
                    415:        hp9k7[0-79][0-9] | hp7[0-79][0-9])
                    416:                basic_machine=hppa1.1-hp
                    417:                ;;
                    418:        hp9k78[0-9] | hp78[0-9])
                    419:                # FIXME: really hppa2.0-hp
                    420:                basic_machine=hppa1.1-hp
                    421:                ;;
                    422:        hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
                    423:                # FIXME: really hppa2.0-hp
                    424:                basic_machine=hppa1.1-hp
                    425:                ;;
                    426:        hp9k8[0-9][13679] | hp8[0-9][13679])
                    427:                basic_machine=hppa1.1-hp
                    428:                ;;
                    429:        hp9k8[0-9][0-9] | hp8[0-9][0-9])
                    430:                basic_machine=hppa1.0-hp
                    431:                ;;
                    432:        hppa-next)
                    433:                os=-nextstep3
                    434:                ;;
                    435:        hppaosf)
                    436:                basic_machine=hppa1.1-hp
                    437:                os=-osf
                    438:                ;;
                    439:        hppro)
                    440:                basic_machine=hppa1.1-hp
                    441:                os=-proelf
                    442:                ;;
                    443:        i370-ibm* | ibm*)
                    444:                basic_machine=i370-ibm
                    445:                ;;
                    446: # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
                    447:        i[34567]86v32)
                    448:                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                    449:                os=-sysv32
                    450:                ;;
                    451:        i[34567]86v4*)
                    452:                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                    453:                os=-sysv4
                    454:                ;;
                    455:        i[34567]86v)
                    456:                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                    457:                os=-sysv
                    458:                ;;
                    459:        i[34567]86sol2)
                    460:                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
                    461:                os=-solaris2
                    462:                ;;
1.2     ! paf       463: #paf@design.ru don't know how configure invented this:"i1586", hacking
        !           464:        i1586-pc)
        !           465:                basic_machine=i586-pc
        !           466:                ;;
1.1       paf       467:        i386mach)
                    468:                basic_machine=i386-mach
                    469:                os=-mach
                    470:                ;;
                    471:        i386-vsta | vsta)
                    472:                basic_machine=i386-unknown
                    473:                os=-vsta
                    474:                ;;
                    475:        i386-go32 | go32)
                    476:                basic_machine=i386-unknown
                    477:                os=-go32
                    478:                ;;
                    479:        i386-mingw32 | mingw32)
                    480:                basic_machine=i386-unknown
                    481:                os=-mingw32
                    482:                ;;
                    483:        iris | iris4d)
                    484:                basic_machine=mips-sgi
                    485:                case $os in
                    486:                    -irix*)
                    487:                        ;;
                    488:                    *)
                    489:                        os=-irix4
                    490:                        ;;
                    491:                esac
                    492:                ;;
                    493:        isi68 | isi)
                    494:                basic_machine=m68k-isi
                    495:                os=-sysv
                    496:                ;;
                    497:        m88k-omron*)
                    498:                basic_machine=m88k-omron
                    499:                ;;
                    500:        magnum | m3230)
                    501:                basic_machine=mips-mips
                    502:                os=-sysv
                    503:                ;;
                    504:        merlin)
                    505:                basic_machine=ns32k-utek
                    506:                os=-sysv
                    507:                ;;
                    508:        miniframe)
                    509:                basic_machine=m68000-convergent
                    510:                ;;
                    511:        *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
                    512:                basic_machine=m68k-atari
                    513:                os=-mint
                    514:                ;;
                    515:        mipsel*-linux*)
                    516:                basic_machine=mipsel-unknown
                    517:                os=-linux-gnu
                    518:                ;;
                    519:        mips*-linux*)
                    520:                basic_machine=mips-unknown
                    521:                os=-linux-gnu
                    522:                ;;
                    523:        mips3*-*)
                    524:                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
                    525:                ;;
                    526:        mips3*)
                    527:                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
                    528:                ;;
                    529:        mmix*)
                    530:                basic_machine=mmix-knuth
                    531:                os=-mmixware
                    532:                ;;
                    533:        monitor)
                    534:                basic_machine=m68k-rom68k
                    535:                os=-coff
                    536:                ;;
                    537:        msdos)
                    538:                basic_machine=i386-unknown
                    539:                os=-msdos
                    540:                ;;
                    541:        mvs)
                    542:                basic_machine=i370-ibm
                    543:                os=-mvs
                    544:                ;;
                    545:        ncr3000)
                    546:                basic_machine=i486-ncr
                    547:                os=-sysv4
                    548:                ;;
                    549:        netbsd386)
                    550:                basic_machine=i386-unknown
                    551:                os=-netbsd
                    552:                ;;
                    553:        netwinder)
                    554:                basic_machine=armv4l-rebel
                    555:                os=-linux
                    556:                ;;
                    557:        news | news700 | news800 | news900)
                    558:                basic_machine=m68k-sony
                    559:                os=-newsos
                    560:                ;;
                    561:        news1000)
                    562:                basic_machine=m68030-sony
                    563:                os=-newsos
                    564:                ;;
                    565:        news-3600 | risc-news)
                    566:                basic_machine=mips-sony
                    567:                os=-newsos
                    568:                ;;
                    569:        necv70)
                    570:                basic_machine=v70-nec
                    571:                os=-sysv
                    572:                ;;
                    573:        next | m*-next )
                    574:                basic_machine=m68k-next
                    575:                case $os in
                    576:                    -nextstep* )
                    577:                        ;;
                    578:                    -ns2*)
                    579:                      os=-nextstep2
                    580:                        ;;
                    581:                    *)
                    582:                      os=-nextstep3
                    583:                        ;;
                    584:                esac
                    585:                ;;
                    586:        nh3000)
                    587:                basic_machine=m68k-harris
                    588:                os=-cxux
                    589:                ;;
                    590:        nh[45]000)
                    591:                basic_machine=m88k-harris
                    592:                os=-cxux
                    593:                ;;
                    594:        nindy960)
                    595:                basic_machine=i960-intel
                    596:                os=-nindy
                    597:                ;;
                    598:        mon960)
                    599:                basic_machine=i960-intel
                    600:                os=-mon960
                    601:                ;;
                    602:        np1)
                    603:                basic_machine=np1-gould
                    604:                ;;
                    605:        nsr-tandem)
                    606:                basic_machine=nsr-tandem
                    607:                ;;
                    608:        op50n-* | op60c-*)
                    609:                basic_machine=hppa1.1-oki
                    610:                os=-proelf
                    611:                ;;
                    612:        OSE68000 | ose68000)
                    613:                basic_machine=m68000-ericsson
                    614:                os=-ose
                    615:                ;;
                    616:        os68k)
                    617:                basic_machine=m68k-none
                    618:                os=-os68k
                    619:                ;;
                    620:        pa-hitachi)
                    621:                basic_machine=hppa1.1-hitachi
                    622:                os=-hiuxwe2
                    623:                ;;
                    624:        paragon)
                    625:                basic_machine=i860-intel
                    626:                os=-osf
                    627:                ;;
                    628:        pbd)
                    629:                basic_machine=sparc-tti
                    630:                ;;
                    631:        pbb)
                    632:                basic_machine=m68k-tti
                    633:                ;;
                    634:         pc532 | pc532-*)
                    635:                basic_machine=ns32k-pc532
                    636:                ;;
                    637:        pentium | p5 | k5 | k6 | nexen)
                    638:                basic_machine=i586-pc
                    639:                ;;
                    640:        pentiumpro | p6 | 6x86)
                    641:                basic_machine=i686-pc
                    642:                ;;
                    643:        pentiumii | pentium2)
                    644:                basic_machine=i786-pc
                    645:                ;;
                    646:        pentium-* | p5-* | k5-* | k6-* | nexen-*)
                    647:                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
                    648:                ;;
                    649:        pentiumpro-* | p6-* | 6x86-*)
                    650:                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
                    651:                ;;
                    652:        pentiumii-* | pentium2-*)
                    653:                basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
                    654:                ;;
                    655:        pn)
                    656:                basic_machine=pn-gould
                    657:                ;;
                    658:        power)  basic_machine=rs6000-ibm
                    659:                ;;
                    660:        ppc)    basic_machine=powerpc-unknown
                    661:                ;;
                    662:        ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
                    663:                ;;
                    664:        ppcle | powerpclittle | ppc-le | powerpc-little)
                    665:                basic_machine=powerpcle-unknown
                    666:                ;;
                    667:        ppcle-* | powerpclittle-*)
                    668:                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
                    669:                ;;
                    670:        ps2)
                    671:                basic_machine=i386-ibm
                    672:                ;;
                    673:        rom68k)
                    674:                basic_machine=m68k-rom68k
                    675:                os=-coff
                    676:                ;;
                    677:        rm[46]00)
                    678:                basic_machine=mips-siemens
                    679:                ;;
                    680:        rtpc | rtpc-*)
                    681:                basic_machine=romp-ibm
                    682:                ;;
                    683:        sa29200)
                    684:                basic_machine=a29k-amd
                    685:                os=-udi
                    686:                ;;
                    687:        sequent)
                    688:                basic_machine=i386-sequent
                    689:                ;;
                    690:        sh)
                    691:                basic_machine=sh-hitachi
                    692:                os=-hms
                    693:                ;;
                    694:        sparclite-wrs)
                    695:                basic_machine=sparclite-wrs
                    696:                os=-vxworks
                    697:                ;;
                    698:        sps7)
                    699:                basic_machine=m68k-bull
                    700:                os=-sysv2
                    701:                ;;
                    702:        spur)
                    703:                basic_machine=spur-unknown
                    704:                ;;
                    705:        st2000)
                    706:                basic_machine=m68k-tandem
                    707:                ;;
                    708:        stratus)
                    709:                basic_machine=i860-stratus
                    710:                os=-sysv4
                    711:                ;;
                    712:        sun2)
                    713:                basic_machine=m68000-sun
                    714:                ;;
                    715:        sun2os3)
                    716:                basic_machine=m68000-sun
                    717:                os=-sunos3
                    718:                ;;
                    719:        sun2os4)
                    720:                basic_machine=m68000-sun
                    721:                os=-sunos4
                    722:                ;;
                    723:        sun3os3)
                    724:                basic_machine=m68k-sun
                    725:                os=-sunos3
                    726:                ;;
                    727:        sun3os4)
                    728:                basic_machine=m68k-sun
                    729:                os=-sunos4
                    730:                ;;
                    731:        sun4os3)
                    732:                basic_machine=sparc-sun
                    733:                os=-sunos3
                    734:                ;;
                    735:        sun4os4)
                    736:                basic_machine=sparc-sun
                    737:                os=-sunos4
                    738:                ;;
                    739:        sun4sol2)
                    740:                basic_machine=sparc-sun
                    741:                os=-solaris2
                    742:                ;;
                    743:        sun3 | sun3-*)
                    744:                basic_machine=m68k-sun
                    745:                ;;
                    746:        sun4)
                    747:                basic_machine=sparc-sun
                    748:                ;;
                    749:        sun386 | sun386i | roadrunner)
                    750:                basic_machine=i386-sun
                    751:                ;;
                    752:        sv1)
                    753:                basic_machine=sv1-cray
                    754:                os=-unicos
                    755:                ;;
                    756:        symmetry)
                    757:                basic_machine=i386-sequent
                    758:                os=-dynix
                    759:                ;;
                    760:        t3e)
                    761:                basic_machine=t3e-cray
                    762:                os=-unicos
                    763:                ;;
                    764:        tx39)
                    765:                basic_machine=mipstx39-unknown
                    766:                ;;
                    767:        tx39el)
                    768:                basic_machine=mipstx39el-unknown
                    769:                ;;
                    770:        tower | tower-32)
                    771:                basic_machine=m68k-ncr
                    772:                ;;
                    773:        udi29k)
                    774:                basic_machine=a29k-amd
                    775:                os=-udi
                    776:                ;;
                    777:        ultra3)
                    778:                basic_machine=a29k-nyu
                    779:                os=-sym1
                    780:                ;;
                    781:        v810 | necv810)
                    782:                basic_machine=v810-nec
                    783:                os=-none
                    784:                ;;
                    785:        vaxv)
                    786:                basic_machine=vax-dec
                    787:                os=-sysv
                    788:                ;;
                    789:        vms)
                    790:                basic_machine=vax-dec
                    791:                os=-vms
                    792:                ;;
                    793:        vpp*|vx|vx-*)
                    794:                basic_machine=f301-fujitsu
                    795:                ;;
                    796:        vxworks960)
                    797:                basic_machine=i960-wrs
                    798:                os=-vxworks
                    799:                ;;
                    800:        vxworks68)
                    801:                basic_machine=m68k-wrs
                    802:                os=-vxworks
                    803:                ;;
                    804:        vxworks29k)
                    805:                basic_machine=a29k-wrs
                    806:                os=-vxworks
                    807:                ;;
                    808:        w65*)
                    809:                basic_machine=w65-wdc
                    810:                os=-none
                    811:                ;;
                    812:        w89k-*)
                    813:                basic_machine=hppa1.1-winbond
                    814:                os=-proelf
                    815:                ;;
                    816:        xmp)
                    817:                basic_machine=xmp-cray
                    818:                os=-unicos
                    819:                ;;
                    820:         xps | xps100)
                    821:                basic_machine=xps100-honeywell
                    822:                ;;
                    823:        z8k-*-coff)
                    824:                basic_machine=z8k-unknown
                    825:                os=-sim
                    826:                ;;
                    827:        none)
                    828:                basic_machine=none-none
                    829:                os=-none
                    830:                ;;
                    831: 
                    832: # Here we handle the default manufacturer of certain CPU types.  It is in
                    833: # some cases the only manufacturer, in others, it is the most popular.
                    834:        w89k)
                    835:                basic_machine=hppa1.1-winbond
                    836:                ;;
                    837:        op50n)
                    838:                basic_machine=hppa1.1-oki
                    839:                ;;
                    840:        op60c)
                    841:                basic_machine=hppa1.1-oki
                    842:                ;;
                    843:        mips)
                    844:                if [ x$os = x-linux-gnu ]; then
                    845:                        basic_machine=mips-unknown
                    846:                else
                    847:                        basic_machine=mips-mips
                    848:                fi
                    849:                ;;
                    850:        romp)
                    851:                basic_machine=romp-ibm
                    852:                ;;
                    853:        rs6000)
                    854:                basic_machine=rs6000-ibm
                    855:                ;;
                    856:        vax)
                    857:                basic_machine=vax-dec
                    858:                ;;
                    859:        pdp11)
                    860:                basic_machine=pdp11-dec
                    861:                ;;
                    862:        we32k)
                    863:                basic_machine=we32k-att
                    864:                ;;
                    865:        sparc | sparcv9)
                    866:                basic_machine=sparc-sun
                    867:                ;;
                    868:         cydra)
                    869:                basic_machine=cydra-cydrome
                    870:                ;;
                    871:        orion)
                    872:                basic_machine=orion-highlevel
                    873:                ;;
                    874:        orion105)
                    875:                basic_machine=clipper-highlevel
                    876:                ;;
                    877:        mac | mpw | mac-mpw)
                    878:                basic_machine=m68k-apple
                    879:                ;;
                    880:        pmac | pmac-mpw)
                    881:                basic_machine=powerpc-apple
                    882:                ;;
                    883:        c4x*)
                    884:                basic_machine=c4x-none
                    885:                os=-coff
                    886:                ;;
                    887:        *)
                    888:                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
                    889:                exit 1
                    890:                ;;
                    891: esac
                    892: 
                    893: # Here we canonicalize certain aliases for manufacturers.
                    894: case $basic_machine in
                    895:        *-digital*)
                    896:                basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
                    897:                ;;
                    898:        *-commodore*)
                    899:                basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
                    900:                ;;
                    901:        *)
                    902:                ;;
                    903: esac
                    904: 
                    905: # Decode manufacturer-specific aliases for certain operating systems.
                    906: 
                    907: if [ x"$os" != x"" ]
                    908: then
                    909: case $os in
                    910:         # First match some system type aliases
                    911:         # that might get confused with valid system types.
                    912:        # -solaris* is a basic system type, with this one exception.
                    913:        -solaris1 | -solaris1.*)
                    914:                os=`echo $os | sed -e 's|solaris1|sunos4|'`
                    915:                ;;
                    916:        -solaris)
                    917:                os=-solaris2
                    918:                ;;
                    919:        -svr4*)
                    920:                os=-sysv4
                    921:                ;;
                    922:        -unixware*)
                    923:                os=-sysv4.2uw
                    924:                ;;
                    925:        -gnu/linux*)
                    926:                os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
                    927:                ;;
                    928:        # First accept the basic system types.
                    929:        # The portable systems comes first.
                    930:        # Each alternative MUST END IN A *, to match a version number.
                    931:        # -sysv* is not here because it comes later, after sysvr4.
                    932:        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
                    933:              | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
                    934:              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
                    935:              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
                    936:              | -aos* \
                    937:              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
                    938:              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
                    939:              | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
                    940:              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
                    941:              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
                    942:              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
                    943:              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
                    944:              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
                    945:              | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
                    946:              | -openstep* | -oskit*)
                    947:        # Remember, each alternative MUST END IN *, to match a version number.
                    948:                ;;
                    949:        -qnx*)
                    950:                case $basic_machine in
                    951:                    x86-* | i[34567]86-*)
                    952:                        ;;
                    953:                    *)
                    954:                        os=-nto$os
                    955:                        ;;
                    956:                esac
                    957:                ;;
                    958:        -nto*)
                    959:                os=-nto-qnx
                    960:                ;;
                    961:        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
                    962:              | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
                    963:              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
                    964:                ;;
                    965:        -mac*)
                    966:                os=`echo $os | sed -e 's|mac|macos|'`
                    967:                ;;
                    968:        -linux*)
                    969:                os=`echo $os | sed -e 's|linux|linux-gnu|'`
                    970:                ;;
                    971:        -sunos5*)
                    972:                os=`echo $os | sed -e 's|sunos5|solaris2|'`
                    973:                ;;
                    974:        -sunos6*)
                    975:                os=`echo $os | sed -e 's|sunos6|solaris3|'`
                    976:                ;;
                    977:        -opened*)
                    978:                os=-openedition
                    979:                ;;
                    980:        -wince*)
                    981:                os=-wince
                    982:                ;;
                    983:        -osfrose*)
                    984:                os=-osfrose
                    985:                ;;
                    986:        -osf*)
                    987:                os=-osf
                    988:                ;;
                    989:        -utek*)
                    990:                os=-bsd
                    991:                ;;
                    992:        -dynix*)
                    993:                os=-bsd
                    994:                ;;
                    995:        -acis*)
                    996:                os=-aos
                    997:                ;;
                    998:        -386bsd)
                    999:                os=-bsd
                   1000:                ;;
                   1001:        -ctix* | -uts*)
                   1002:                os=-sysv
                   1003:                ;;
                   1004:        -ns2 )
                   1005:                os=-nextstep2
                   1006:                ;;
                   1007:        -nsk)
                   1008:                os=-nsk
                   1009:                ;;
                   1010:        # Preserve the version number of sinix5.
                   1011:        -sinix5.*)
                   1012:                os=`echo $os | sed -e 's|sinix|sysv|'`
                   1013:                ;;
                   1014:        -sinix*)
                   1015:                os=-sysv4
                   1016:                ;;
                   1017:        -triton*)
                   1018:                os=-sysv3
                   1019:                ;;
                   1020:        -oss*)
                   1021:                os=-sysv3
                   1022:                ;;
                   1023:        -svr4)
                   1024:                os=-sysv4
                   1025:                ;;
                   1026:        -svr3)
                   1027:                os=-sysv3
                   1028:                ;;
                   1029:        -sysvr4)
                   1030:                os=-sysv4
                   1031:                ;;
                   1032:        # This must come after -sysvr4.
                   1033:        -sysv*)
                   1034:                ;;
                   1035:        -ose*)
                   1036:                os=-ose
                   1037:                ;;
                   1038:        -es1800*)
                   1039:                os=-ose
                   1040:                ;;
                   1041:        -xenix)
                   1042:                os=-xenix
                   1043:                ;;
                   1044:         -*mint | -*MiNT)
                   1045:                os=-mint
                   1046:                ;;
                   1047:        -none)
                   1048:                ;;
                   1049:        *)
                   1050:                # Get rid of the `-' at the beginning of $os.
                   1051:                os=`echo $os | sed 's/[^-]*-//'`
                   1052:                echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
                   1053:                exit 1
                   1054:                ;;
                   1055: esac
                   1056: else
                   1057: 
                   1058: # Here we handle the default operating systems that come with various machines.
                   1059: # The value should be what the vendor currently ships out the door with their
                   1060: # machine or put another way, the most popular os provided with the machine.
                   1061: 
                   1062: # Note that if you're going to try to match "-MANUFACTURER" here (say,
                   1063: # "-sun"), then you have to tell the case statement up towards the top
                   1064: # that MANUFACTURER isn't an operating system.  Otherwise, code above
                   1065: # will signal an error saying that MANUFACTURER isn't an operating
                   1066: # system, and we'll never get to this point.
                   1067: 
                   1068: case $basic_machine in
                   1069:        *-acorn)
                   1070:                os=-riscix1.2
                   1071:                ;;
                   1072:        arm*-rebel)
                   1073:                os=-linux
                   1074:                ;;
                   1075:        arm*-semi)
                   1076:                os=-aout
                   1077:                ;;
                   1078:         pdp11-*)
                   1079:                os=-none
                   1080:                ;;
                   1081:        *-dec | vax-*)
                   1082:                os=-ultrix4.2
                   1083:                ;;
                   1084:        m68*-apollo)
                   1085:                os=-domain
                   1086:                ;;
                   1087:        i386-sun)
                   1088:                os=-sunos4.0.2
                   1089:                ;;
                   1090:        m68000-sun)
                   1091:                os=-sunos3
                   1092:                # This also exists in the configure program, but was not the
                   1093:                # default.
                   1094:                # os=-sunos4
                   1095:                ;;
                   1096:        m68*-cisco)
                   1097:                os=-aout
                   1098:                ;;
                   1099:        mips*-cisco)
                   1100:                os=-elf
                   1101:                ;;
                   1102:        mips*-*)
                   1103:                os=-elf
                   1104:                ;;
                   1105:        *-tti)  # must be before sparc entry or we get the wrong os.
                   1106:                os=-sysv3
                   1107:                ;;
                   1108:        sparc-* | *-sun)
                   1109:                os=-sunos4.1.1
                   1110:                ;;
                   1111:        *-be)
                   1112:                os=-beos
                   1113:                ;;
                   1114:        *-ibm)
                   1115:                os=-aix
                   1116:                ;;
                   1117:        *-wec)
                   1118:                os=-proelf
                   1119:                ;;
                   1120:        *-winbond)
                   1121:                os=-proelf
                   1122:                ;;
                   1123:        *-oki)
                   1124:                os=-proelf
                   1125:                ;;
                   1126:        *-hp)
                   1127:                os=-hpux
                   1128:                ;;
                   1129:        *-hitachi)
                   1130:                os=-hiux
                   1131:                ;;
                   1132:        i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
                   1133:                os=-sysv
                   1134:                ;;
                   1135:        *-cbm)
                   1136:                os=-amigaos
                   1137:                ;;
                   1138:        *-dg)
                   1139:                os=-dgux
                   1140:                ;;
                   1141:        *-dolphin)
                   1142:                os=-sysv3
                   1143:                ;;
                   1144:        m68k-ccur)
                   1145:                os=-rtu
                   1146:                ;;
                   1147:        m88k-omron*)
                   1148:                os=-luna
                   1149:                ;;
                   1150:        *-next )
                   1151:                os=-nextstep
                   1152:                ;;
                   1153:        *-sequent)
                   1154:                os=-ptx
                   1155:                ;;
                   1156:        *-crds)
                   1157:                os=-unos
                   1158:                ;;
                   1159:        *-ns)
                   1160:                os=-genix
                   1161:                ;;
                   1162:        i370-*)
                   1163:                os=-mvs
                   1164:                ;;
                   1165:        *-next)
                   1166:                os=-nextstep3
                   1167:                ;;
                   1168:         *-gould)
                   1169:                os=-sysv
                   1170:                ;;
                   1171:         *-highlevel)
                   1172:                os=-bsd
                   1173:                ;;
                   1174:        *-encore)
                   1175:                os=-bsd
                   1176:                ;;
                   1177:         *-sgi)
                   1178:                os=-irix
                   1179:                ;;
                   1180:         *-siemens)
                   1181:                os=-sysv4
                   1182:                ;;
                   1183:        *-masscomp)
                   1184:                os=-rtu
                   1185:                ;;
                   1186:        f301-fujitsu)
                   1187:                os=-uxpv
                   1188:                ;;
                   1189:        *-rom68k)
                   1190:                os=-coff
                   1191:                ;;
                   1192:        *-*bug)
                   1193:                os=-coff
                   1194:                ;;
                   1195:        *-apple)
                   1196:                os=-macos
                   1197:                ;;
                   1198:        *-atari*)
                   1199:                os=-mint
                   1200:                ;;
                   1201:        *)
                   1202:                os=-none
                   1203:                ;;
                   1204: esac
                   1205: fi
                   1206: 
                   1207: # Here we handle the case where we know the os, and the CPU type, but not the
                   1208: # manufacturer.  We pick the logical manufacturer.
                   1209: vendor=unknown
                   1210: case $basic_machine in
                   1211:        *-unknown)
                   1212:                case $os in
                   1213:                        -riscix*)
                   1214:                                vendor=acorn
                   1215:                                ;;
                   1216:                        -sunos*)
                   1217:                                vendor=sun
                   1218:                                ;;
                   1219:                        -aix*)
                   1220:                                vendor=ibm
                   1221:                                ;;
                   1222:                        -beos*)
                   1223:                                vendor=be
                   1224:                                ;;
                   1225:                        -hpux*)
                   1226:                                vendor=hp
                   1227:                                ;;
                   1228:                        -mpeix*)
                   1229:                                vendor=hp
                   1230:                                ;;
                   1231:                        -hiux*)
                   1232:                                vendor=hitachi
                   1233:                                ;;
                   1234:                        -unos*)
                   1235:                                vendor=crds
                   1236:                                ;;
                   1237:                        -dgux*)
                   1238:                                vendor=dg
                   1239:                                ;;
                   1240:                        -luna*)
                   1241:                                vendor=omron
                   1242:                                ;;
                   1243:                        -genix*)
                   1244:                                vendor=ns
                   1245:                                ;;
                   1246:                        -mvs* | -opened*)
                   1247:                                vendor=ibm
                   1248:                                ;;
                   1249:                        -ptx*)
                   1250:                                vendor=sequent
                   1251:                                ;;
                   1252:                        -vxsim* | -vxworks*)
                   1253:                                vendor=wrs
                   1254:                                ;;
                   1255:                        -aux*)
                   1256:                                vendor=apple
                   1257:                                ;;
                   1258:                        -hms*)
                   1259:                                vendor=hitachi
                   1260:                                ;;
                   1261:                        -mpw* | -macos*)
                   1262:                                vendor=apple
                   1263:                                ;;
                   1264:                        -*mint | -*MiNT)
                   1265:                                vendor=atari
                   1266:                                ;;
                   1267:                esac
                   1268:                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
                   1269:                ;;
                   1270: esac
                   1271: 
                   1272: echo $basic_machine$os

E-mail: