"Fossies" - the Fresh Open Source Software Archive

Member "ngrep-1_47/config.sub" (7 Sep 2017, 44965 Bytes) of package /linux/misc/ngrep-1_47.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 and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes reports for "config.sub": 1_45_vs_1_47 or 1_46_1_vs_1_47.

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