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