"Fossies" - the Fresh Open Source Software Archive

Member "tin-2.4.1/config.sub" (24 Dec 2016, 36384 Bytes) of package /linux/misc/tin-2.4.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "config.sub": 2.4.0_vs_2.4.1.

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