169408Sache#! /bin/sh
2100616Smp# Configuration validation subroutine script.
3316957Sdchagin#   Copyright 1992-2013 Free Software Foundation, Inc.
4100616Smp
5316957Sdchagintimestamp='2013-04-24'
6100616Smp
7316957Sdchagin# This file is free software; you can redistribute it and/or modify it
8316957Sdchagin# under the terms of the GNU General Public License as published by
9316957Sdchagin# the Free Software Foundation; either version 3 of the License, or
1069408Sache# (at your option) any later version.
1169408Sache#
12316957Sdchagin# This program is distributed in the hope that it will be useful, but
13316957Sdchagin# WITHOUT ANY WARRANTY; without even the implied warranty of
14316957Sdchagin# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15316957Sdchagin# General Public License for more details.
1669408Sache#
1769408Sache# You should have received a copy of the GNU General Public License
18316957Sdchagin# along with this program; if not, see <http://www.gnu.org/licenses/>.
19195609Smp#
2069408Sache# As a special exception to the GNU General Public License, if you
2169408Sache# distribute this file as part of a program that contains a
2269408Sache# configuration script generated by Autoconf, you may include it under
23316957Sdchagin# the same distribution terms that you use for the rest of that
24316957Sdchagin# program.  This Exception is an additional permission under section 7
25316957Sdchagin# of the GNU General Public License, version 3 ("GPLv3").
2669408Sache
27195609Smp
28316957Sdchagin# Please send patches with a ChangeLog entry to config-patches@gnu.org.
29100616Smp#
3069408Sache# Configuration subroutine to validate and canonicalize a configuration type.
3169408Sache# Supply the specified configuration type as an argument.
3269408Sache# If it is invalid, we print an error message on stderr and exit with code 1.
3369408Sache# Otherwise, we print the canonical config type on stdout and succeed.
3469408Sache
35231990Smp# You can get the latest version of this script from:
36231990Smp# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
37231990Smp
3869408Sache# This file is supposed to be the same for all GNU packages
3969408Sache# and recognize all the CPU types, system types and aliases
4069408Sache# that are meaningful with *any* GNU software.
4169408Sache# Each package is responsible for reporting which valid configurations
4269408Sache# it does not support.  The user should be able to distinguish
4369408Sache# a failure to support a valid configuration from a meaningless
4469408Sache# configuration.
4569408Sache
4669408Sache# The goal of this file is to map all the various variations of a given
4769408Sache# machine specification into a single specification in the form:
4869408Sache#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
4969408Sache# or in some cases, the newer four-part form:
5069408Sache#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
5169408Sache# It is wrong to echo any other type of specification.
5269408Sache
53100616Smpme=`echo "$0" | sed -e 's,.*/,,'`
5469408Sache
55100616Smpusage="\
56100616SmpUsage: $0 [OPTION] CPU-MFR-OPSYS
57100616Smp       $0 [OPTION] ALIAS
58100616Smp
59100616SmpCanonicalize a configuration name.
60100616Smp
61100616SmpOperation modes:
62100616Smp  -h, --help         print this help, then exit
63100616Smp  -t, --time-stamp   print date of last modification, then exit
64100616Smp  -v, --version      print version number, then exit
65100616Smp
66100616SmpReport bugs and patches to <config-patches@gnu.org>."
67100616Smp
68100616Smpversion="\
69100616SmpGNU config.sub ($timestamp)
70100616Smp
71316957SdchaginCopyright 1992-2013 Free Software Foundation, Inc.
72100616Smp
73100616SmpThis is free software; see the source for copying conditions.  There is NO
74100616Smpwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
75100616Smp
76100616Smphelp="
77100616SmpTry \`$me --help' for more information."
78100616Smp
79100616Smp# Parse command line
80100616Smpwhile test $# -gt 0 ; do
81100616Smp  case $1 in
82100616Smp    --time-stamp | --time* | -t )
83195609Smp       echo "$timestamp" ; exit ;;
84100616Smp    --version | -v )
85195609Smp       echo "$version" ; exit ;;
86100616Smp    --help | --h* | -h )
87195609Smp       echo "$usage"; exit ;;
88100616Smp    -- )     # Stop option processing
89100616Smp       shift; break ;;
90100616Smp    - )	# Use stdin as input.
91100616Smp       break ;;
92100616Smp    -* )
93100616Smp       echo "$me: invalid option $1$help"
94100616Smp       exit 1 ;;
95100616Smp
96100616Smp    *local*)
97100616Smp       # First pass through any local machine types.
98100616Smp       echo $1
99195609Smp       exit ;;
100100616Smp
101100616Smp    * )
102100616Smp       break ;;
103100616Smp  esac
104100616Smpdone
105100616Smp
106100616Smpcase $# in
107100616Smp 0) echo "$me: missing argument$help" >&2
108100616Smp    exit 1;;
109100616Smp 1) ;;
110100616Smp *) echo "$me: too many arguments$help" >&2
111100616Smp    exit 1;;
11269408Sacheesac
11369408Sache
11469408Sache# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
11569408Sache# Here we must recognize all the valid KERNEL-OS combinations.
11669408Sachemaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
11769408Sachecase $maybe_os in
118316957Sdchagin  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
119316957Sdchagin  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
120316957Sdchagin  knetbsd*-gnu* | netbsd*-gnu* | \
121195609Smp  kopensolaris*-gnu* | \
122195609Smp  storm-chaos* | os2-emx* | rtmk-nova*)
12369408Sache    os=-$maybe_os
12469408Sache    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
12569408Sache    ;;
126316957Sdchagin  android-linux)
127316957Sdchagin    os=-linux-android
128316957Sdchagin    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
129316957Sdchagin    ;;
13069408Sache  *)
13169408Sache    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
13269408Sache    if [ $basic_machine != $1 ]
13369408Sache    then os=`echo $1 | sed 's/.*-/-/'`
13469408Sache    else os=; fi
13569408Sache    ;;
13669408Sacheesac
13769408Sache
13869408Sache### Let's recognize common machines as not being operating systems so
13969408Sache### that things like config.sub decstation-3100 work.  We also
14069408Sache### recognize some manufacturers as not being operating systems, so we
14169408Sache### can provide default operating systems below.
14269408Sachecase $os in
14369408Sache	-sun*os*)
14469408Sache		# Prevent following clause from handling this invalid input.
14569408Sache		;;
14669408Sache	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
14769408Sache	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
14869408Sache	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
14969408Sache	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
15069408Sache	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
15169408Sache	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
152316957Sdchagin	-apple | -axis | -knuth | -cray | -microblaze*)
15369408Sache		os=
15469408Sache		basic_machine=$1
15569408Sache		;;
156316957Sdchagin	-bluegene*)
157316957Sdchagin		os=-cnk
158195609Smp		;;
15983098Smp	-sim | -cisco | -oki | -wec | -winbond)
16083098Smp		os=
16183098Smp		basic_machine=$1
16283098Smp		;;
16383098Smp	-scout)
16483098Smp		;;
16583098Smp	-wrs)
16683098Smp		os=-vxworks
16783098Smp		basic_machine=$1
16883098Smp		;;
169100616Smp	-chorusos*)
170100616Smp		os=-chorusos
171100616Smp		basic_machine=$1
172100616Smp		;;
173316957Sdchagin	-chorusrdb)
174316957Sdchagin		os=-chorusrdb
175100616Smp		basic_machine=$1
176316957Sdchagin		;;
17769408Sache	-hiux*)
17869408Sache		os=-hiuxwe2
17969408Sache		;;
180195609Smp	-sco6)
181195609Smp		os=-sco5v6
182195609Smp		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183195609Smp		;;
18469408Sache	-sco5)
18583098Smp		os=-sco3.2v5
18669408Sache		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
18769408Sache		;;
18869408Sache	-sco4)
18969408Sache		os=-sco3.2v4
19069408Sache		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19169408Sache		;;
19269408Sache	-sco3.2.[4-9]*)
19369408Sache		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
19469408Sache		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19569408Sache		;;
19669408Sache	-sco3.2v[4-9]*)
19769408Sache		# Don't forget version if it is 3.2v4 or newer.
19869408Sache		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19969408Sache		;;
200195609Smp	-sco5v6*)
201195609Smp		# Don't forget version if it is 3.2v4 or newer.
202195609Smp		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203195609Smp		;;
20469408Sache	-sco*)
20569408Sache		os=-sco3.2v2
20669408Sache		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
20769408Sache		;;
20883098Smp	-udk*)
20983098Smp		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
21083098Smp		;;
21169408Sache	-isc)
21269408Sache		os=-isc2.2
21369408Sache		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
21469408Sache		;;
21569408Sache	-clix*)
21669408Sache		basic_machine=clipper-intergraph
21769408Sache		;;
21869408Sache	-isc*)
21969408Sache		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
22069408Sache		;;
221316957Sdchagin	-lynx*178)
222316957Sdchagin		os=-lynxos178
223316957Sdchagin		;;
224316957Sdchagin	-lynx*5)
225316957Sdchagin		os=-lynxos5
226316957Sdchagin		;;
22769408Sache	-lynx*)
22869408Sache		os=-lynxos
22969408Sache		;;
23069408Sache	-ptx*)
23169408Sache		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
23269408Sache		;;
23369408Sache	-windowsnt*)
23469408Sache		os=`echo $os | sed -e 's/windowsnt/winnt/'`
23569408Sache		;;
23669408Sache	-psos*)
23769408Sache		os=-psos
23869408Sache		;;
23983098Smp	-mint | -mint[0-9]*)
24083098Smp		basic_machine=m68k-atari
24183098Smp		os=-mint
24283098Smp		;;
24369408Sacheesac
24469408Sache
24569408Sache# Decode aliases for certain CPU-COMPANY combinations.
24669408Sachecase $basic_machine in
24769408Sache	# Recognize the basic CPU types without company name.
24869408Sache	# Some are omitted here because they have special meanings below.
249100616Smp	1750a | 580 \
250100616Smp	| a29k \
251316957Sdchagin	| aarch64 | aarch64_be \
252100616Smp	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
253100616Smp	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
254195609Smp	| am33_2.0 \
255316957Sdchagin	| arc | arceb \
256316957Sdchagin	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
257316957Sdchagin	| avr | avr32 \
258316957Sdchagin	| be32 | be64 \
259195609Smp	| bfin \
260100616Smp	| c4x | clipper \
261100616Smp	| d10v | d30v | dlx | dsp16xx \
262316957Sdchagin	| epiphany \
263195609Smp	| fido | fr30 | frv \
264100616Smp	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
265316957Sdchagin	| hexagon \
266100616Smp	| i370 | i860 | i960 | ia64 \
267195609Smp	| ip2k | iq2000 \
268316957Sdchagin	| le32 | le64 \
269195609Smp	| lm32 \
270195609Smp	| m32c | m32r | m32rle | m68000 | m68k | m88k \
271316957Sdchagin	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
272100616Smp	| mips | mipsbe | mipseb | mipsel | mipsle \
273100616Smp	| mips16 \
274100616Smp	| mips64 | mips64el \
275195609Smp	| mips64octeon | mips64octeonel \
276100616Smp	| mips64orion | mips64orionel \
277195609Smp	| mips64r5900 | mips64r5900el \
278195609Smp	| mips64vr | mips64vrel \
279100616Smp	| mips64vr4100 | mips64vr4100el \
280100616Smp	| mips64vr4300 | mips64vr4300el \
281100616Smp	| mips64vr5000 | mips64vr5000el \
282195609Smp	| mips64vr5900 | mips64vr5900el \
283100616Smp	| mipsisa32 | mipsisa32el \
284195609Smp	| mipsisa32r2 | mipsisa32r2el \
285100616Smp	| mipsisa64 | mipsisa64el \
286195609Smp	| mipsisa64r2 | mipsisa64r2el \
287100616Smp	| mipsisa64sb1 | mipsisa64sb1el \
288195609Smp	| mipsisa64sr71k | mipsisa64sr71kel \
289316957Sdchagin	| mipsr5900 | mipsr5900el \
290100616Smp	| mipstx39 | mipstx39el \
291100616Smp	| mn10200 | mn10300 \
292195609Smp	| moxie \
293195609Smp	| mt \
294195609Smp	| msp430 \
295316957Sdchagin	| nds32 | nds32le | nds32be \
296316957Sdchagin	| nios | nios2 | nios2eb | nios2el \
297100616Smp	| ns16k | ns32k \
298316957Sdchagin	| open8 \
299316957Sdchagin	| or1k | or32 \
300100616Smp	| pdp10 | pdp11 | pj | pjl \
301316957Sdchagin	| powerpc | powerpc64 | powerpc64le | powerpcle \
302100616Smp	| pyramid \
303316957Sdchagin	| rl78 | rx \
304195609Smp	| score \
305195609Smp	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
306100616Smp	| sh64 | sh64le \
307195609Smp	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
308195609Smp	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
309316957Sdchagin	| spu \
310316957Sdchagin	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
311231990Smp	| ubicom32 \
312316957Sdchagin	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
313100616Smp	| we32k \
314316957Sdchagin	| x86 | xc16x | xstormy16 | xtensa \
315195609Smp	| z8k | z80)
31669408Sache		basic_machine=$basic_machine-unknown
31769408Sache		;;
318316957Sdchagin	c54x)
319316957Sdchagin		basic_machine=tic54x-unknown
320316957Sdchagin		;;
321316957Sdchagin	c55x)
322316957Sdchagin		basic_machine=tic55x-unknown
323316957Sdchagin		;;
324316957Sdchagin	c6x)
325316957Sdchagin		basic_machine=tic6x-unknown
326316957Sdchagin		;;
327316957Sdchagin	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
328100616Smp		basic_machine=$basic_machine-unknown
329100616Smp		os=-none
33083098Smp		;;
331100616Smp	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
332100616Smp		;;
333195609Smp	ms1)
334195609Smp		basic_machine=mt-unknown
335195609Smp		;;
33683098Smp
337316957Sdchagin	strongarm | thumb | xscale)
338316957Sdchagin		basic_machine=arm-unknown
339316957Sdchagin		;;
340316957Sdchagin	xgate)
341316957Sdchagin		basic_machine=$basic_machine-unknown
342316957Sdchagin		os=-none
343316957Sdchagin		;;
344316957Sdchagin	xscaleeb)
345316957Sdchagin		basic_machine=armeb-unknown
346316957Sdchagin		;;
347316957Sdchagin
348316957Sdchagin	xscaleel)
349316957Sdchagin		basic_machine=armel-unknown
350316957Sdchagin		;;
351316957Sdchagin
35269408Sache	# We use `pc' rather than `unknown'
35369408Sache	# because (1) that's what they normally are, and
35469408Sache	# (2) the word "unknown" tends to confuse beginning users.
355100616Smp	i*86 | x86_64)
35669408Sache	  basic_machine=$basic_machine-pc
35769408Sache	  ;;
35869408Sache	# Object if more than one company name word.
35969408Sache	*-*-*)
36069408Sache		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
36169408Sache		exit 1
36269408Sache		;;
36369408Sache	# Recognize the basic CPU types with company name.
364100616Smp	580-* \
365100616Smp	| a29k-* \
366316957Sdchagin	| aarch64-* | aarch64_be-* \
367100616Smp	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
368100616Smp	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
369316957Sdchagin	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
370100616Smp	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
371195609Smp	| avr-* | avr32-* \
372316957Sdchagin	| be32-* | be64-* \
373195609Smp	| bfin-* | bs2000-* \
374316957Sdchagin	| c[123]* | c30-* | [cjt]90-* | c4x-* \
375195609Smp	| clipper-* | craynv-* | cydra-* \
376100616Smp	| d10v-* | d30v-* | dlx-* \
377100616Smp	| elxsi-* \
378195609Smp	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
379100616Smp	| h8300-* | h8500-* \
380100616Smp	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
381316957Sdchagin	| hexagon-* \
382100616Smp	| i*86-* | i860-* | i960-* | ia64-* \
383195609Smp	| ip2k-* | iq2000-* \
384316957Sdchagin	| le32-* | le64-* \
385195609Smp	| lm32-* \
386195609Smp	| m32c-* | m32r-* | m32rle-* \
387100616Smp	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
388316957Sdchagin	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
389316957Sdchagin	| microblaze-* | microblazeel-* \
390100616Smp	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
391100616Smp	| mips16-* \
392100616Smp	| mips64-* | mips64el-* \
393195609Smp	| mips64octeon-* | mips64octeonel-* \
394100616Smp	| mips64orion-* | mips64orionel-* \
395195609Smp	| mips64r5900-* | mips64r5900el-* \
396195609Smp	| mips64vr-* | mips64vrel-* \
397100616Smp	| mips64vr4100-* | mips64vr4100el-* \
398100616Smp	| mips64vr4300-* | mips64vr4300el-* \
399100616Smp	| mips64vr5000-* | mips64vr5000el-* \
400195609Smp	| mips64vr5900-* | mips64vr5900el-* \
401100616Smp	| mipsisa32-* | mipsisa32el-* \
402195609Smp	| mipsisa32r2-* | mipsisa32r2el-* \
403100616Smp	| mipsisa64-* | mipsisa64el-* \
404195609Smp	| mipsisa64r2-* | mipsisa64r2el-* \
405100616Smp	| mipsisa64sb1-* | mipsisa64sb1el-* \
406195609Smp	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
407316957Sdchagin	| mipsr5900-* | mipsr5900el-* \
408195609Smp	| mipstx39-* | mipstx39el-* \
409195609Smp	| mmix-* \
410195609Smp	| mt-* \
411195609Smp	| msp430-* \
412316957Sdchagin	| nds32-* | nds32le-* | nds32be-* \
413316957Sdchagin	| nios-* | nios2-* | nios2eb-* | nios2el-* \
414100616Smp	| none-* | np1-* | ns16k-* | ns32k-* \
415316957Sdchagin	| open8-* \
416100616Smp	| orion-* \
417100616Smp	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
418316957Sdchagin	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
419100616Smp	| pyramid-* \
420316957Sdchagin	| rl78-* | romp-* | rs6000-* | rx-* \
421195609Smp	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
422100616Smp	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
423195609Smp	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
424195609Smp	| sparclite-* \
425316957Sdchagin	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
426316957Sdchagin	| tahoe-* \
427316957Sdchagin	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
428316957Sdchagin	| tile*-* \
429195609Smp	| tron-* \
430231990Smp	| ubicom32-* \
431316957Sdchagin	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
432316957Sdchagin	| vax-* \
433100616Smp	| we32k-* \
434316957Sdchagin	| x86-* | x86_64-* | xc16x-* | xps100-* \
435195609Smp	| xstormy16-* | xtensa*-* \
436100616Smp	| ymp-* \
437195609Smp	| z8k-* | z80-*)
43869408Sache		;;
439195609Smp	# Recognize the basic CPU types without company name, with glob match.
440195609Smp	xtensa*)
441195609Smp		basic_machine=$basic_machine-unknown
442195609Smp		;;
44369408Sache	# Recognize the various machine names and aliases which stand
44469408Sache	# for a CPU type and a company and sometimes even an OS.
44583098Smp	386bsd)
44683098Smp		basic_machine=i386-unknown
44783098Smp		os=-bsd
44883098Smp		;;
44969408Sache	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
45069408Sache		basic_machine=m68000-att
45169408Sache		;;
45269408Sache	3b*)
45369408Sache		basic_machine=we32k-att
45469408Sache		;;
45583098Smp	a29khif)
45683098Smp		basic_machine=a29k-amd
45783098Smp		os=-udi
45883098Smp		;;
459316957Sdchagin	abacus)
460195609Smp		basic_machine=abacus-unknown
461195609Smp		;;
46283098Smp	adobe68k)
46383098Smp		basic_machine=m68010-adobe
46483098Smp		os=-scout
46583098Smp		;;
46669408Sache	alliant | fx80)
46769408Sache		basic_machine=fx80-alliant
46869408Sache		;;
46969408Sache	altos | altos3068)
47069408Sache		basic_machine=m68k-altos
47169408Sache		;;
47269408Sache	am29k)
47369408Sache		basic_machine=a29k-none
47469408Sache		os=-bsd
47569408Sache		;;
476195609Smp	amd64)
477195609Smp		basic_machine=x86_64-pc
478195609Smp		;;
479195609Smp	amd64-*)
480195609Smp		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
481195609Smp		;;
48269408Sache	amdahl)
48369408Sache		basic_machine=580-amdahl
48469408Sache		os=-sysv
48569408Sache		;;
48669408Sache	amiga | amiga-*)
487100616Smp		basic_machine=m68k-unknown
48869408Sache		;;
48969408Sache	amigaos | amigados)
490100616Smp		basic_machine=m68k-unknown
49169408Sache		os=-amigaos
49269408Sache		;;
49369408Sache	amigaunix | amix)
494100616Smp		basic_machine=m68k-unknown
49569408Sache		os=-sysv4
49669408Sache		;;
49769408Sache	apollo68)
49869408Sache		basic_machine=m68k-apollo
49969408Sache		os=-sysv
50069408Sache		;;
50183098Smp	apollo68bsd)
50283098Smp		basic_machine=m68k-apollo
50383098Smp		os=-bsd
50483098Smp		;;
505195609Smp	aros)
506195609Smp		basic_machine=i386-pc
507195609Smp		os=-aros
508195609Smp		;;
50969408Sache	aux)
51069408Sache		basic_machine=m68k-apple
51169408Sache		os=-aux
51269408Sache		;;
51369408Sache	balance)
51469408Sache		basic_machine=ns32k-sequent
51569408Sache		os=-dynix
51669408Sache		;;
517195609Smp	blackfin)
518195609Smp		basic_machine=bfin-unknown
519195609Smp		os=-linux
520195609Smp		;;
521195609Smp	blackfin-*)
522195609Smp		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
523195609Smp		os=-linux
524195609Smp		;;
525195609Smp	bluegene*)
526195609Smp		basic_machine=powerpc-ibm
527195609Smp		os=-cnk
528195609Smp		;;
529316957Sdchagin	c54x-*)
530316957Sdchagin		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
531316957Sdchagin		;;
532316957Sdchagin	c55x-*)
533316957Sdchagin		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
534316957Sdchagin		;;
535316957Sdchagin	c6x-*)
536316957Sdchagin		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
537316957Sdchagin		;;
538100616Smp	c90)
539100616Smp		basic_machine=c90-cray
540100616Smp		os=-unicos
541100616Smp		;;
542316957Sdchagin	cegcc)
543195609Smp		basic_machine=arm-unknown
544195609Smp		os=-cegcc
545195609Smp		;;
54669408Sache	convex-c1)
54769408Sache		basic_machine=c1-convex
54869408Sache		os=-bsd
54969408Sache		;;
55069408Sache	convex-c2)
55169408Sache		basic_machine=c2-convex
55269408Sache		os=-bsd
55369408Sache		;;
55469408Sache	convex-c32)
55569408Sache		basic_machine=c32-convex
55669408Sache		os=-bsd
55769408Sache		;;
55869408Sache	convex-c34)
55969408Sache		basic_machine=c34-convex
56069408Sache		os=-bsd
56169408Sache		;;
56269408Sache	convex-c38)
56369408Sache		basic_machine=c38-convex
56469408Sache		os=-bsd
56569408Sache		;;
566100616Smp	cray | j90)
567100616Smp		basic_machine=j90-cray
56869408Sache		os=-unicos
56969408Sache		;;
570195609Smp	craynv)
571195609Smp		basic_machine=craynv-cray
572195609Smp		os=-unicosmp
573195609Smp		;;
574316957Sdchagin	cr16 | cr16-*)
575195609Smp		basic_machine=cr16-unknown
576195609Smp		os=-elf
577195609Smp		;;
57869408Sache	crds | unos)
57969408Sache		basic_machine=m68k-crds
58069408Sache		;;
581195609Smp	crisv32 | crisv32-* | etraxfs*)
582195609Smp		basic_machine=crisv32-axis
583195609Smp		;;
584100616Smp	cris | cris-* | etrax*)
585100616Smp		basic_machine=cris-axis
586100616Smp		;;
587195609Smp	crx)
588195609Smp		basic_machine=crx-unknown
589195609Smp		os=-elf
590195609Smp		;;
59169408Sache	da30 | da30-*)
59269408Sache		basic_machine=m68k-da30
59369408Sache		;;
59469408Sache	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
59569408Sache		basic_machine=mips-dec
59669408Sache		;;
597100616Smp	decsystem10* | dec10*)
598100616Smp		basic_machine=pdp10-dec
599100616Smp		os=-tops10
600100616Smp		;;
601100616Smp	decsystem20* | dec20*)
602100616Smp		basic_machine=pdp10-dec
603100616Smp		os=-tops20
604100616Smp		;;
60569408Sache	delta | 3300 | motorola-3300 | motorola-delta \
60669408Sache	      | 3300-motorola | delta-motorola)
60769408Sache		basic_machine=m68k-motorola
60869408Sache		;;
60969408Sache	delta88)
61069408Sache		basic_machine=m88k-motorola
61169408Sache		os=-sysv3
61269408Sache		;;
613195609Smp	dicos)
614195609Smp		basic_machine=i686-pc
615195609Smp		os=-dicos
616195609Smp		;;
617195609Smp	djgpp)
618195609Smp		basic_machine=i586-pc
619195609Smp		os=-msdosdjgpp
620195609Smp		;;
62169408Sache	dpx20 | dpx20-*)
62269408Sache		basic_machine=rs6000-bull
62369408Sache		os=-bosx
62469408Sache		;;
62569408Sache	dpx2* | dpx2*-bull)
62669408Sache		basic_machine=m68k-bull
62769408Sache		os=-sysv3
62869408Sache		;;
62969408Sache	ebmon29k)
63069408Sache		basic_machine=a29k-amd
63169408Sache		os=-ebmon
63269408Sache		;;
63369408Sache	elxsi)
63469408Sache		basic_machine=elxsi-elxsi
63569408Sache		os=-bsd
63669408Sache		;;
63769408Sache	encore | umax | mmax)
63869408Sache		basic_machine=ns32k-encore
63969408Sache		;;
64083098Smp	es1800 | OSE68k | ose68k | ose | OSE)
64183098Smp		basic_machine=m68k-ericsson
64283098Smp		os=-ose
64383098Smp		;;
64469408Sache	fx2800)
64569408Sache		basic_machine=i860-alliant
64669408Sache		;;
64769408Sache	genix)
64869408Sache		basic_machine=ns32k-ns
64969408Sache		;;
65069408Sache	gmicro)
65169408Sache		basic_machine=tron-gmicro
65269408Sache		os=-sysv
65369408Sache		;;
654100616Smp	go32)
655100616Smp		basic_machine=i386-pc
656100616Smp		os=-go32
657100616Smp		;;
65869408Sache	h3050r* | hiux*)
65969408Sache		basic_machine=hppa1.1-hitachi
66069408Sache		os=-hiuxwe2
66169408Sache		;;
66269408Sache	h8300hms)
66369408Sache		basic_machine=h8300-hitachi
66469408Sache		os=-hms
66569408Sache		;;
66683098Smp	h8300xray)
66783098Smp		basic_machine=h8300-hitachi
66883098Smp		os=-xray
66983098Smp		;;
67083098Smp	h8500hms)
67183098Smp		basic_machine=h8500-hitachi
67283098Smp		os=-hms
67383098Smp		;;
67469408Sache	harris)
67569408Sache		basic_machine=m88k-harris
67669408Sache		os=-sysv3
67769408Sache		;;
67869408Sache	hp300-*)
67969408Sache		basic_machine=m68k-hp
68069408Sache		;;
68169408Sache	hp300bsd)
68269408Sache		basic_machine=m68k-hp
68369408Sache		os=-bsd
68469408Sache		;;
68569408Sache	hp300hpux)
68669408Sache		basic_machine=m68k-hp
68769408Sache		os=-hpux
68869408Sache		;;
68983098Smp	hp3k9[0-9][0-9] | hp9[0-9][0-9])
69083098Smp		basic_machine=hppa1.0-hp
69183098Smp		;;
69269408Sache	hp9k2[0-9][0-9] | hp9k31[0-9])
69369408Sache		basic_machine=m68000-hp
69469408Sache		;;
69569408Sache	hp9k3[2-9][0-9])
69669408Sache		basic_machine=m68k-hp
69769408Sache		;;
69883098Smp	hp9k6[0-9][0-9] | hp6[0-9][0-9])
69983098Smp		basic_machine=hppa1.0-hp
70083098Smp		;;
70183098Smp	hp9k7[0-79][0-9] | hp7[0-79][0-9])
70269408Sache		basic_machine=hppa1.1-hp
70369408Sache		;;
70483098Smp	hp9k78[0-9] | hp78[0-9])
70583098Smp		# FIXME: really hppa2.0-hp
70683098Smp		basic_machine=hppa1.1-hp
70783098Smp		;;
70883098Smp	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
70983098Smp		# FIXME: really hppa2.0-hp
71083098Smp		basic_machine=hppa1.1-hp
71183098Smp		;;
71283098Smp	hp9k8[0-9][13679] | hp8[0-9][13679])
71383098Smp		basic_machine=hppa1.1-hp
71483098Smp		;;
71569408Sache	hp9k8[0-9][0-9] | hp8[0-9][0-9])
71669408Sache		basic_machine=hppa1.0-hp
71769408Sache		;;
71869408Sache	hppa-next)
71969408Sache		os=-nextstep3
72069408Sache		;;
72183098Smp	hppaosf)
72283098Smp		basic_machine=hppa1.1-hp
72383098Smp		os=-osf
72483098Smp		;;
72583098Smp	hppro)
72683098Smp		basic_machine=hppa1.1-hp
72783098Smp		os=-proelf
72883098Smp		;;
72969408Sache	i370-ibm* | ibm*)
73069408Sache		basic_machine=i370-ibm
73169408Sache		;;
732100616Smp	i*86v32)
73369408Sache		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
73469408Sache		os=-sysv32
73569408Sache		;;
736100616Smp	i*86v4*)
73769408Sache		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
73869408Sache		os=-sysv4
73969408Sache		;;
740100616Smp	i*86v)
74169408Sache		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
74269408Sache		os=-sysv
74369408Sache		;;
744100616Smp	i*86sol2)
74569408Sache		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
74669408Sache		os=-solaris2
74769408Sache		;;
74883098Smp	i386mach)
74983098Smp		basic_machine=i386-mach
75083098Smp		os=-mach
75183098Smp		;;
75283098Smp	i386-vsta | vsta)
75383098Smp		basic_machine=i386-unknown
75483098Smp		os=-vsta
75583098Smp		;;
75669408Sache	iris | iris4d)
75769408Sache		basic_machine=mips-sgi
75869408Sache		case $os in
75969408Sache		    -irix*)
76069408Sache			;;
76169408Sache		    *)
76269408Sache			os=-irix4
76369408Sache			;;
76469408Sache		esac
76569408Sache		;;
76669408Sache	isi68 | isi)
76769408Sache		basic_machine=m68k-isi
76869408Sache		os=-sysv
76969408Sache		;;
770195609Smp	m68knommu)
771195609Smp		basic_machine=m68k-unknown
772195609Smp		os=-linux
773195609Smp		;;
774195609Smp	m68knommu-*)
775195609Smp		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
776195609Smp		os=-linux
777195609Smp		;;
77869408Sache	m88k-omron*)
77969408Sache		basic_machine=m88k-omron
78069408Sache		;;
78169408Sache	magnum | m3230)
78269408Sache		basic_machine=mips-mips
78369408Sache		os=-sysv
78469408Sache		;;
78569408Sache	merlin)
78669408Sache		basic_machine=ns32k-utek
78769408Sache		os=-sysv
78869408Sache		;;
789316957Sdchagin	microblaze*)
790231990Smp		basic_machine=microblaze-xilinx
791231990Smp		;;
792316957Sdchagin	mingw64)
793316957Sdchagin		basic_machine=x86_64-pc
794316957Sdchagin		os=-mingw64
795316957Sdchagin		;;
796100616Smp	mingw32)
797100616Smp		basic_machine=i386-pc
798100616Smp		os=-mingw32
799100616Smp		;;
800195609Smp	mingw32ce)
801195609Smp		basic_machine=arm-unknown
802195609Smp		os=-mingw32ce
803195609Smp		;;
80469408Sache	miniframe)
80569408Sache		basic_machine=m68000-convergent
80669408Sache		;;
80783098Smp	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
80883098Smp		basic_machine=m68k-atari
80983098Smp		os=-mint
81083098Smp		;;
81169408Sache	mips3*-*)
81269408Sache		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
81369408Sache		;;
81469408Sache	mips3*)
81569408Sache		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
81669408Sache		;;
81783098Smp	monitor)
81883098Smp		basic_machine=m68k-rom68k
81983098Smp		os=-coff
82083098Smp		;;
821100616Smp	morphos)
822100616Smp		basic_machine=powerpc-unknown
823100616Smp		os=-morphos
824100616Smp		;;
82583098Smp	msdos)
826100616Smp		basic_machine=i386-pc
82783098Smp		os=-msdos
82883098Smp		;;
829195609Smp	ms1-*)
830195609Smp		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
831195609Smp		;;
832316957Sdchagin	msys)
833316957Sdchagin		basic_machine=i386-pc
834316957Sdchagin		os=-msys
835316957Sdchagin		;;
83683098Smp	mvs)
83783098Smp		basic_machine=i370-ibm
83883098Smp		os=-mvs
83983098Smp		;;
840316957Sdchagin	nacl)
841316957Sdchagin		basic_machine=le32-unknown
842316957Sdchagin		os=-nacl
843316957Sdchagin		;;
84469408Sache	ncr3000)
84569408Sache		basic_machine=i486-ncr
84669408Sache		os=-sysv4
84769408Sache		;;
84883098Smp	netbsd386)
84983098Smp		basic_machine=i386-unknown
85083098Smp		os=-netbsd
85183098Smp		;;
85283098Smp	netwinder)
85383098Smp		basic_machine=armv4l-rebel
85483098Smp		os=-linux
85583098Smp		;;
85669408Sache	news | news700 | news800 | news900)
85769408Sache		basic_machine=m68k-sony
85869408Sache		os=-newsos
85969408Sache		;;
86069408Sache	news1000)
86169408Sache		basic_machine=m68030-sony
86269408Sache		os=-newsos
86369408Sache		;;
86469408Sache	news-3600 | risc-news)
86569408Sache		basic_machine=mips-sony
86669408Sache		os=-newsos
86769408Sache		;;
86883098Smp	necv70)
86983098Smp		basic_machine=v70-nec
87083098Smp		os=-sysv
87183098Smp		;;
87269408Sache	next | m*-next )
87369408Sache		basic_machine=m68k-next
87469408Sache		case $os in
87569408Sache		    -nextstep* )
87669408Sache			;;
87769408Sache		    -ns2*)
87869408Sache		      os=-nextstep2
87969408Sache			;;
88069408Sache		    *)
88169408Sache		      os=-nextstep3
88269408Sache			;;
88369408Sache		esac
88469408Sache		;;
88569408Sache	nh3000)
88669408Sache		basic_machine=m68k-harris
88769408Sache		os=-cxux
88869408Sache		;;
88969408Sache	nh[45]000)
89069408Sache		basic_machine=m88k-harris
89169408Sache		os=-cxux
89269408Sache		;;
89369408Sache	nindy960)
89469408Sache		basic_machine=i960-intel
89569408Sache		os=-nindy
89669408Sache		;;
89783098Smp	mon960)
89883098Smp		basic_machine=i960-intel
89983098Smp		os=-mon960
90083098Smp		;;
901100616Smp	nonstopux)
902100616Smp		basic_machine=mips-compaq
903100616Smp		os=-nonstopux
904100616Smp		;;
90569408Sache	np1)
90669408Sache		basic_machine=np1-gould
90769408Sache		;;
908316957Sdchagin	neo-tandem)
909316957Sdchagin		basic_machine=neo-tandem
910316957Sdchagin		;;
911316957Sdchagin	nse-tandem)
912316957Sdchagin		basic_machine=nse-tandem
913316957Sdchagin		;;
914100616Smp	nsr-tandem)
915100616Smp		basic_machine=nsr-tandem
916100616Smp		;;
91783098Smp	op50n-* | op60c-*)
91883098Smp		basic_machine=hppa1.1-oki
91983098Smp		os=-proelf
92083098Smp		;;
921195609Smp	openrisc | openrisc-*)
922100616Smp		basic_machine=or32-unknown
923100616Smp		;;
924195609Smp	os400)
925195609Smp		basic_machine=powerpc-ibm
926195609Smp		os=-os400
927195609Smp		;;
92883098Smp	OSE68000 | ose68000)
92983098Smp		basic_machine=m68000-ericsson
93083098Smp		os=-ose
93183098Smp		;;
93283098Smp	os68k)
93383098Smp		basic_machine=m68k-none
93483098Smp		os=-os68k
93583098Smp		;;
93669408Sache	pa-hitachi)
93769408Sache		basic_machine=hppa1.1-hitachi
93869408Sache		os=-hiuxwe2
93969408Sache		;;
94069408Sache	paragon)
94169408Sache		basic_machine=i860-intel
94269408Sache		os=-osf
94369408Sache		;;
944195609Smp	parisc)
945195609Smp		basic_machine=hppa-unknown
946195609Smp		os=-linux
947195609Smp		;;
948195609Smp	parisc-*)
949195609Smp		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
950195609Smp		os=-linux
951195609Smp		;;
95269408Sache	pbd)
95369408Sache		basic_machine=sparc-tti
95469408Sache		;;
95569408Sache	pbb)
95669408Sache		basic_machine=m68k-tti
95769408Sache		;;
958195609Smp	pc532 | pc532-*)
95969408Sache		basic_machine=ns32k-pc532
96069408Sache		;;
961195609Smp	pc98)
962195609Smp		basic_machine=i386-pc
963195609Smp		;;
964195609Smp	pc98-*)
965195609Smp		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
966195609Smp		;;
967100616Smp	pentium | p5 | k5 | k6 | nexgen | viac3)
96869408Sache		basic_machine=i586-pc
96969408Sache		;;
970195609Smp	pentiumpro | p6 | 6x86 | athlon | athlon_*)
97169408Sache		basic_machine=i686-pc
97269408Sache		;;
973195609Smp	pentiumii | pentium2 | pentiumiii | pentium3)
974100616Smp		basic_machine=i686-pc
97569408Sache		;;
976195609Smp	pentium4)
977195609Smp		basic_machine=i786-pc
978195609Smp		;;
979100616Smp	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
98069408Sache		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
98169408Sache		;;
982100616Smp	pentiumpro-* | p6-* | 6x86-* | athlon-*)
98369408Sache		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
98469408Sache		;;
985195609Smp	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
986100616Smp		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
98769408Sache		;;
988195609Smp	pentium4-*)
989195609Smp		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
990195609Smp		;;
99169408Sache	pn)
99269408Sache		basic_machine=pn-gould
99369408Sache		;;
994100616Smp	power)	basic_machine=power-ibm
99569408Sache		;;
996316957Sdchagin	ppc | ppcbe)	basic_machine=powerpc-unknown
997195609Smp		;;
998316957Sdchagin	ppc-* | ppcbe-*)
999316957Sdchagin		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
100069408Sache		;;
100169408Sache	ppcle | powerpclittle | ppc-le | powerpc-little)
100269408Sache		basic_machine=powerpcle-unknown
1003195609Smp		;;
100469408Sache	ppcle-* | powerpclittle-*)
100569408Sache		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
100669408Sache		;;
1007100616Smp	ppc64)	basic_machine=powerpc64-unknown
1008195609Smp		;;
1009100616Smp	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1010100616Smp		;;
1011100616Smp	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1012100616Smp		basic_machine=powerpc64le-unknown
1013195609Smp		;;
1014100616Smp	ppc64le-* | powerpc64little-*)
1015100616Smp		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1016100616Smp		;;
101769408Sache	ps2)
101869408Sache		basic_machine=i386-ibm
101969408Sache		;;
1020100616Smp	pw32)
1021100616Smp		basic_machine=i586-unknown
1022100616Smp		os=-pw32
1023100616Smp		;;
1024316957Sdchagin	rdos | rdos64)
1025316957Sdchagin		basic_machine=x86_64-pc
1026316957Sdchagin		os=-rdos
1027316957Sdchagin		;;
1028316957Sdchagin	rdos32)
1029195609Smp		basic_machine=i386-pc
1030195609Smp		os=-rdos
1031195609Smp		;;
103283098Smp	rom68k)
103383098Smp		basic_machine=m68k-rom68k
103483098Smp		os=-coff
103583098Smp		;;
103669408Sache	rm[46]00)
103769408Sache		basic_machine=mips-siemens
103869408Sache		;;
103969408Sache	rtpc | rtpc-*)
104069408Sache		basic_machine=romp-ibm
104169408Sache		;;
1042100616Smp	s390 | s390-*)
1043100616Smp		basic_machine=s390-ibm
1044100616Smp		;;
1045100616Smp	s390x | s390x-*)
1046100616Smp		basic_machine=s390x-ibm
1047100616Smp		;;
104883098Smp	sa29200)
104983098Smp		basic_machine=a29k-amd
105083098Smp		os=-udi
105183098Smp		;;
1052195609Smp	sb1)
1053195609Smp		basic_machine=mipsisa64sb1-unknown
1054195609Smp		;;
1055195609Smp	sb1el)
1056195609Smp		basic_machine=mipsisa64sb1el-unknown
1057195609Smp		;;
1058195609Smp	sde)
1059195609Smp		basic_machine=mipsisa32-sde
1060195609Smp		os=-elf
1061195609Smp		;;
1062195609Smp	sei)
1063195609Smp		basic_machine=mips-sei
1064195609Smp		os=-seiux
1065195609Smp		;;
106669408Sache	sequent)
106769408Sache		basic_machine=i386-sequent
106869408Sache		;;
106969408Sache	sh)
107069408Sache		basic_machine=sh-hitachi
107169408Sache		os=-hms
107269408Sache		;;
1073195609Smp	sh5el)
1074195609Smp		basic_machine=sh5le-unknown
1075195609Smp		;;
1076195609Smp	sh64)
1077195609Smp		basic_machine=sh64-unknown
1078195609Smp		;;
1079100616Smp	sparclite-wrs | simso-wrs)
108083098Smp		basic_machine=sparclite-wrs
108183098Smp		os=-vxworks
108283098Smp		;;
108369408Sache	sps7)
108469408Sache		basic_machine=m68k-bull
108569408Sache		os=-sysv2
108669408Sache		;;
108769408Sache	spur)
108869408Sache		basic_machine=spur-unknown
108969408Sache		;;
109083098Smp	st2000)
109183098Smp		basic_machine=m68k-tandem
109283098Smp		;;
109383098Smp	stratus)
109483098Smp		basic_machine=i860-stratus
109583098Smp		os=-sysv4
109683098Smp		;;
1097316957Sdchagin	strongarm-* | thumb-*)
1098316957Sdchagin		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1099316957Sdchagin		;;
110069408Sache	sun2)
110169408Sache		basic_machine=m68000-sun
110269408Sache		;;
110369408Sache	sun2os3)
110469408Sache		basic_machine=m68000-sun
110569408Sache		os=-sunos3
110669408Sache		;;
110769408Sache	sun2os4)
110869408Sache		basic_machine=m68000-sun
110969408Sache		os=-sunos4
111069408Sache		;;
111169408Sache	sun3os3)
111269408Sache		basic_machine=m68k-sun
111369408Sache		os=-sunos3
111469408Sache		;;
111569408Sache	sun3os4)
111669408Sache		basic_machine=m68k-sun
111769408Sache		os=-sunos4
111869408Sache		;;
111969408Sache	sun4os3)
112069408Sache		basic_machine=sparc-sun
112169408Sache		os=-sunos3
112269408Sache		;;
112369408Sache	sun4os4)
112469408Sache		basic_machine=sparc-sun
112569408Sache		os=-sunos4
112669408Sache		;;
112769408Sache	sun4sol2)
112869408Sache		basic_machine=sparc-sun
112969408Sache		os=-solaris2
113069408Sache		;;
113169408Sache	sun3 | sun3-*)
113269408Sache		basic_machine=m68k-sun
113369408Sache		;;
113469408Sache	sun4)
113569408Sache		basic_machine=sparc-sun
113669408Sache		;;
113769408Sache	sun386 | sun386i | roadrunner)
113869408Sache		basic_machine=i386-sun
113969408Sache		;;
1140195609Smp	sv1)
1141100616Smp		basic_machine=sv1-cray
1142100616Smp		os=-unicos
1143100616Smp		;;
114469408Sache	symmetry)
114569408Sache		basic_machine=i386-sequent
114669408Sache		os=-dynix
114769408Sache		;;
114883098Smp	t3e)
1149100616Smp		basic_machine=alphaev5-cray
115083098Smp		os=-unicos
115183098Smp		;;
1152100616Smp	t90)
1153100616Smp		basic_machine=t90-cray
1154100616Smp		os=-unicos
1155100616Smp		;;
1156195609Smp	tile*)
1157316957Sdchagin		basic_machine=$basic_machine-unknown
1158195609Smp		os=-linux-gnu
1159195609Smp		;;
116069408Sache	tx39)
116169408Sache		basic_machine=mipstx39-unknown
116269408Sache		;;
116369408Sache	tx39el)
116469408Sache		basic_machine=mipstx39el-unknown
116569408Sache		;;
1166100616Smp	toad1)
1167100616Smp		basic_machine=pdp10-xkl
1168100616Smp		os=-tops20
1169100616Smp		;;
117069408Sache	tower | tower-32)
117169408Sache		basic_machine=m68k-ncr
117269408Sache		;;
1173195609Smp	tpf)
1174195609Smp		basic_machine=s390x-ibm
1175195609Smp		os=-tpf
1176195609Smp		;;
117769408Sache	udi29k)
117869408Sache		basic_machine=a29k-amd
117969408Sache		os=-udi
118069408Sache		;;
118169408Sache	ultra3)
118269408Sache		basic_machine=a29k-nyu
118369408Sache		os=-sym1
118469408Sache		;;
118583098Smp	v810 | necv810)
118683098Smp		basic_machine=v810-nec
118783098Smp		os=-none
118883098Smp		;;
118969408Sache	vaxv)
119069408Sache		basic_machine=vax-dec
119169408Sache		os=-sysv
119269408Sache		;;
119369408Sache	vms)
119469408Sache		basic_machine=vax-dec
119569408Sache		os=-vms
119669408Sache		;;
119769408Sache	vpp*|vx|vx-*)
1198195609Smp		basic_machine=f301-fujitsu
1199195609Smp		;;
120069408Sache	vxworks960)
120169408Sache		basic_machine=i960-wrs
120269408Sache		os=-vxworks
120369408Sache		;;
120469408Sache	vxworks68)
120569408Sache		basic_machine=m68k-wrs
120669408Sache		os=-vxworks
120769408Sache		;;
120869408Sache	vxworks29k)
120969408Sache		basic_machine=a29k-wrs
121069408Sache		os=-vxworks
121169408Sache		;;
121283098Smp	w65*)
121383098Smp		basic_machine=w65-wdc
121483098Smp		os=-none
121583098Smp		;;
121683098Smp	w89k-*)
121783098Smp		basic_machine=hppa1.1-winbond
121883098Smp		os=-proelf
121983098Smp		;;
1220195609Smp	xbox)
1221195609Smp		basic_machine=i686-pc
1222195609Smp		os=-mingw32
122369408Sache		;;
1224195609Smp	xps | xps100)
122569408Sache		basic_machine=xps100-honeywell
122669408Sache		;;
1227316957Sdchagin	xscale-* | xscalee[bl]-*)
1228316957Sdchagin		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1229316957Sdchagin		;;
1230100616Smp	ymp)
1231100616Smp		basic_machine=ymp-cray
1232100616Smp		os=-unicos
1233100616Smp		;;
123483098Smp	z8k-*-coff)
123583098Smp		basic_machine=z8k-unknown
123683098Smp		os=-sim
123783098Smp		;;
1238195609Smp	z80-*-coff)
1239195609Smp		basic_machine=z80-unknown
1240195609Smp		os=-sim
1241195609Smp		;;
124269408Sache	none)
124369408Sache		basic_machine=none-none
124469408Sache		os=-none
124569408Sache		;;
124669408Sache
124769408Sache# Here we handle the default manufacturer of certain CPU types.  It is in
124869408Sache# some cases the only manufacturer, in others, it is the most popular.
124983098Smp	w89k)
125083098Smp		basic_machine=hppa1.1-winbond
125183098Smp		;;
125283098Smp	op50n)
125383098Smp		basic_machine=hppa1.1-oki
125483098Smp		;;
125583098Smp	op60c)
125683098Smp		basic_machine=hppa1.1-oki
125783098Smp		;;
125869408Sache	romp)
125969408Sache		basic_machine=romp-ibm
126069408Sache		;;
1261195609Smp	mmix)
1262195609Smp		basic_machine=mmix-knuth
1263195609Smp		;;
126469408Sache	rs6000)
126569408Sache		basic_machine=rs6000-ibm
126669408Sache		;;
126769408Sache	vax)
126869408Sache		basic_machine=vax-dec
126969408Sache		;;
1270100616Smp	pdp10)
1271100616Smp		# there are many clones, so DEC is not a safe bet
1272100616Smp		basic_machine=pdp10-unknown
1273100616Smp		;;
127469408Sache	pdp11)
127569408Sache		basic_machine=pdp11-dec
127669408Sache		;;
127769408Sache	we32k)
127869408Sache		basic_machine=we32k-att
127969408Sache		;;
1280195609Smp	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1281100616Smp		basic_machine=sh-unknown
1282100616Smp		;;
1283195609Smp	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
128469408Sache		basic_machine=sparc-sun
128569408Sache		;;
1286195609Smp	cydra)
128769408Sache		basic_machine=cydra-cydrome
128869408Sache		;;
128969408Sache	orion)
129069408Sache		basic_machine=orion-highlevel
129169408Sache		;;
129269408Sache	orion105)
129369408Sache		basic_machine=clipper-highlevel
129469408Sache		;;
129583098Smp	mac | mpw | mac-mpw)
129683098Smp		basic_machine=m68k-apple
129783098Smp		;;
129883098Smp	pmac | pmac-mpw)
129983098Smp		basic_machine=powerpc-apple
130083098Smp		;;
1301100616Smp	*-unknown)
1302100616Smp		# Make sure to match an already-canonicalized machine name.
1303100616Smp		;;
130469408Sache	*)
130569408Sache		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
130669408Sache		exit 1
130769408Sache		;;
130869408Sacheesac
130969408Sache
131069408Sache# Here we canonicalize certain aliases for manufacturers.
131169408Sachecase $basic_machine in
131269408Sache	*-digital*)
131369408Sache		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
131469408Sache		;;
131569408Sache	*-commodore*)
131669408Sache		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
131769408Sache		;;
131869408Sache	*)
131969408Sache		;;
132069408Sacheesac
132169408Sache
132269408Sache# Decode manufacturer-specific aliases for certain operating systems.
132369408Sache
132469408Sacheif [ x"$os" != x"" ]
132569408Sachethen
132669408Sachecase $os in
1327316957Sdchagin	# First match some system type aliases
1328316957Sdchagin	# that might get confused with valid system types.
132969408Sache	# -solaris* is a basic system type, with this one exception.
1330316957Sdchagin	-auroraux)
1331316957Sdchagin		os=-auroraux
1332231990Smp		;;
133369408Sache	-solaris1 | -solaris1.*)
133469408Sache		os=`echo $os | sed -e 's|solaris1|sunos4|'`
133569408Sache		;;
133669408Sache	-solaris)
133769408Sache		os=-solaris2
133869408Sache		;;
133969408Sache	-svr4*)
134069408Sache		os=-sysv4
134169408Sache		;;
134269408Sache	-unixware*)
134369408Sache		os=-sysv4.2uw
134469408Sache		;;
134569408Sache	-gnu/linux*)
134669408Sache		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
134769408Sache		;;
134869408Sache	# First accept the basic system types.
134969408Sache	# The portable systems comes first.
135069408Sache	# Each alternative MUST END IN A *, to match a version number.
135169408Sache	# -sysv* is not here because it comes later, after sysvr4.
135269408Sache	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1353195609Smp	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1354231990Smp	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1355316957Sdchagin	      | -sym* | -kopensolaris* | -plan9* \
135669408Sache	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1357195609Smp	      | -aos* | -aros* \
135869408Sache	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
135969408Sache	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1360195609Smp	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1361316957Sdchagin	      | -bitrig* | -openbsd* | -solidbsd* \
1362195609Smp	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1363195609Smp	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
136469408Sache	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
136569408Sache	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1366195609Smp	      | -chorusos* | -chorusrdb* | -cegcc* \
1367316957Sdchagin	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1368316957Sdchagin	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1369316957Sdchagin	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1370195609Smp	      | -uxpv* | -beos* | -mpeix* | -udk* \
1371195609Smp	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1372100616Smp	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1373100616Smp	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1374100616Smp	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1375195609Smp	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1376195609Smp	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1377231990Smp	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
137869408Sache	# Remember, each alternative MUST END IN *, to match a version number.
137969408Sache		;;
1380100616Smp	-qnx*)
1381100616Smp		case $basic_machine in
1382100616Smp		    x86-* | i*86-*)
1383100616Smp			;;
1384100616Smp		    *)
1385100616Smp			os=-nto$os
1386100616Smp			;;
1387100616Smp		esac
1388100616Smp		;;
1389195609Smp	-nto-qnx*)
1390195609Smp		;;
1391100616Smp	-nto*)
1392195609Smp		os=`echo $os | sed -e 's|nto|nto-qnx|'`
1393100616Smp		;;
139483098Smp	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1395195609Smp	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1396100616Smp	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
139783098Smp		;;
139883098Smp	-mac*)
139983098Smp		os=`echo $os | sed -e 's|mac|macos|'`
140083098Smp		;;
1401195609Smp	-linux-dietlibc)
1402195609Smp		os=-linux-dietlibc
1403195609Smp		;;
140469408Sache	-linux*)
140569408Sache		os=`echo $os | sed -e 's|linux|linux-gnu|'`
140669408Sache		;;
140769408Sache	-sunos5*)
140869408Sache		os=`echo $os | sed -e 's|sunos5|solaris2|'`
140969408Sache		;;
141069408Sache	-sunos6*)
141169408Sache		os=`echo $os | sed -e 's|sunos6|solaris3|'`
141269408Sache		;;
141383098Smp	-opened*)
141483098Smp		os=-openedition
141583098Smp		;;
1416316957Sdchagin	-os400*)
1417195609Smp		os=-os400
1418195609Smp		;;
1419100616Smp	-wince*)
1420100616Smp		os=-wince
1421100616Smp		;;
142269408Sache	-osfrose*)
142369408Sache		os=-osfrose
142469408Sache		;;
142569408Sache	-osf*)
142669408Sache		os=-osf
142769408Sache		;;
142869408Sache	-utek*)
142969408Sache		os=-bsd
143069408Sache		;;
143169408Sache	-dynix*)
143269408Sache		os=-bsd
143369408Sache		;;
143469408Sache	-acis*)
143569408Sache		os=-aos
143669408Sache		;;
1437100616Smp	-atheos*)
1438100616Smp		os=-atheos
1439100616Smp		;;
1440195609Smp	-syllable*)
1441195609Smp		os=-syllable
1442195609Smp		;;
144383098Smp	-386bsd)
144483098Smp		os=-bsd
144583098Smp		;;
144669408Sache	-ctix* | -uts*)
144769408Sache		os=-sysv
144869408Sache		;;
1449100616Smp	-nova*)
1450100616Smp		os=-rtmk-nova
1451100616Smp		;;
145269408Sache	-ns2 )
1453195609Smp		os=-nextstep2
145469408Sache		;;
1455100616Smp	-nsk*)
1456100616Smp		os=-nsk
1457100616Smp		;;
145869408Sache	# Preserve the version number of sinix5.
145969408Sache	-sinix5.*)
146069408Sache		os=`echo $os | sed -e 's|sinix|sysv|'`
146169408Sache		;;
146269408Sache	-sinix*)
146369408Sache		os=-sysv4
146469408Sache		;;
1465316957Sdchagin	-tpf*)
1466195609Smp		os=-tpf
1467195609Smp		;;
146869408Sache	-triton*)
146969408Sache		os=-sysv3
147069408Sache		;;
147169408Sache	-oss*)
147269408Sache		os=-sysv3
147369408Sache		;;
147469408Sache	-svr4)
147569408Sache		os=-sysv4
147669408Sache		;;
147769408Sache	-svr3)
147869408Sache		os=-sysv3
147969408Sache		;;
148069408Sache	-sysvr4)
148169408Sache		os=-sysv4
148269408Sache		;;
148369408Sache	# This must come after -sysvr4.
148469408Sache	-sysv*)
148569408Sache		;;
148683098Smp	-ose*)
148783098Smp		os=-ose
148883098Smp		;;
148983098Smp	-es1800*)
149083098Smp		os=-ose
149183098Smp		;;
149269408Sache	-xenix)
149369408Sache		os=-xenix
149469408Sache		;;
1495195609Smp	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1496195609Smp		os=-mint
149769408Sache		;;
1498195609Smp	-aros*)
1499195609Smp		os=-aros
1500195609Smp		;;
1501195609Smp	-zvmoe)
1502195609Smp		os=-zvmoe
1503195609Smp		;;
1504195609Smp	-dicos*)
1505195609Smp		os=-dicos
1506195609Smp		;;
1507316957Sdchagin	-nacl*)
1508316957Sdchagin		;;
150969408Sache	-none)
151069408Sache		;;
151169408Sache	*)
151269408Sache		# Get rid of the `-' at the beginning of $os.
151369408Sache		os=`echo $os | sed 's/[^-]*-//'`
151469408Sache		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
151569408Sache		exit 1
151669408Sache		;;
151769408Sacheesac
151869408Sacheelse
151969408Sache
152069408Sache# Here we handle the default operating systems that come with various machines.
152169408Sache# The value should be what the vendor currently ships out the door with their
152269408Sache# machine or put another way, the most popular os provided with the machine.
152369408Sache
152469408Sache# Note that if you're going to try to match "-MANUFACTURER" here (say,
152569408Sache# "-sun"), then you have to tell the case statement up towards the top
152669408Sache# that MANUFACTURER isn't an operating system.  Otherwise, code above
152769408Sache# will signal an error saying that MANUFACTURER isn't an operating
152869408Sache# system, and we'll never get to this point.
152969408Sache
153069408Sachecase $basic_machine in
1531316957Sdchagin	score-*)
1532195609Smp		os=-elf
1533195609Smp		;;
1534316957Sdchagin	spu-*)
1535195609Smp		os=-elf
1536195609Smp		;;
153769408Sache	*-acorn)
153869408Sache		os=-riscix1.2
153969408Sache		;;
154083098Smp	arm*-rebel)
154183098Smp		os=-linux
154283098Smp		;;
154369408Sache	arm*-semi)
154469408Sache		os=-aout
154569408Sache		;;
1546316957Sdchagin	c4x-* | tic4x-*)
1547316957Sdchagin		os=-coff
1548195609Smp		;;
1549316957Sdchagin	hexagon-*)
1550316957Sdchagin		os=-elf
1551316957Sdchagin		;;
1552316957Sdchagin	tic54x-*)
1553316957Sdchagin		os=-coff
1554316957Sdchagin		;;
1555316957Sdchagin	tic55x-*)
1556316957Sdchagin		os=-coff
1557316957Sdchagin		;;
1558316957Sdchagin	tic6x-*)
1559316957Sdchagin		os=-coff
1560316957Sdchagin		;;
1561100616Smp	# This must come before the *-dec entry.
1562100616Smp	pdp10-*)
1563100616Smp		os=-tops20
1564100616Smp		;;
1565195609Smp	pdp11-*)
156669408Sache		os=-none
156769408Sache		;;
156869408Sache	*-dec | vax-*)
156969408Sache		os=-ultrix4.2
157069408Sache		;;
157169408Sache	m68*-apollo)
157269408Sache		os=-domain
157369408Sache		;;
157469408Sache	i386-sun)
157569408Sache		os=-sunos4.0.2
157669408Sache		;;
157769408Sache	m68000-sun)
157869408Sache		os=-sunos3
157969408Sache		;;
158083098Smp	m68*-cisco)
158183098Smp		os=-aout
158283098Smp		;;
1583316957Sdchagin	mep-*)
1584195609Smp		os=-elf
1585195609Smp		;;
158683098Smp	mips*-cisco)
158783098Smp		os=-elf
158883098Smp		;;
158983098Smp	mips*-*)
159083098Smp		os=-elf
159183098Smp		;;
1592316957Sdchagin	or1k-*)
1593316957Sdchagin		os=-elf
1594316957Sdchagin		;;
1595100616Smp	or32-*)
1596100616Smp		os=-coff
1597100616Smp		;;
159869408Sache	*-tti)	# must be before sparc entry or we get the wrong os.
159969408Sache		os=-sysv3
160069408Sache		;;
160169408Sache	sparc-* | *-sun)
160269408Sache		os=-sunos4.1.1
160369408Sache		;;
160469408Sache	*-be)
160569408Sache		os=-beos
160669408Sache		;;
1607195609Smp	*-haiku)
1608195609Smp		os=-haiku
1609195609Smp		;;
161069408Sache	*-ibm)
161169408Sache		os=-aix
161269408Sache		;;
1613316957Sdchagin	*-knuth)
1614195609Smp		os=-mmixware
1615195609Smp		;;
161683098Smp	*-wec)
161783098Smp		os=-proelf
161883098Smp		;;
161983098Smp	*-winbond)
162083098Smp		os=-proelf
162183098Smp		;;
162283098Smp	*-oki)
162383098Smp		os=-proelf
162483098Smp		;;
162569408Sache	*-hp)
162669408Sache		os=-hpux
162769408Sache		;;
162869408Sache	*-hitachi)
162969408Sache		os=-hiux
163069408Sache		;;
163169408Sache	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
163269408Sache		os=-sysv
163369408Sache		;;
163469408Sache	*-cbm)
163569408Sache		os=-amigaos
163669408Sache		;;
163769408Sache	*-dg)
163869408Sache		os=-dgux
163969408Sache		;;
164069408Sache	*-dolphin)
164169408Sache		os=-sysv3
164269408Sache		;;
164369408Sache	m68k-ccur)
164469408Sache		os=-rtu
164569408Sache		;;
164669408Sache	m88k-omron*)
164769408Sache		os=-luna
164869408Sache		;;
164969408Sache	*-next )
165069408Sache		os=-nextstep
165169408Sache		;;
165269408Sache	*-sequent)
165369408Sache		os=-ptx
165469408Sache		;;
165569408Sache	*-crds)
165669408Sache		os=-unos
165769408Sache		;;
165869408Sache	*-ns)
165969408Sache		os=-genix
166069408Sache		;;
166169408Sache	i370-*)
166269408Sache		os=-mvs
166369408Sache		;;
166469408Sache	*-next)
166569408Sache		os=-nextstep3
166669408Sache		;;
1667195609Smp	*-gould)
166869408Sache		os=-sysv
166969408Sache		;;
1670195609Smp	*-highlevel)
167169408Sache		os=-bsd
167269408Sache		;;
167369408Sache	*-encore)
167469408Sache		os=-bsd
167569408Sache		;;
1676195609Smp	*-sgi)
167769408Sache		os=-irix
167869408Sache		;;
1679195609Smp	*-siemens)
168069408Sache		os=-sysv4
168169408Sache		;;
168269408Sache	*-masscomp)
168369408Sache		os=-rtu
168469408Sache		;;
1685100616Smp	f30[01]-fujitsu | f700-fujitsu)
168669408Sache		os=-uxpv
168769408Sache		;;
168883098Smp	*-rom68k)
168983098Smp		os=-coff
169083098Smp		;;
169183098Smp	*-*bug)
169283098Smp		os=-coff
169383098Smp		;;
169483098Smp	*-apple)
169583098Smp		os=-macos
169683098Smp		;;
169783098Smp	*-atari*)
169883098Smp		os=-mint
169983098Smp		;;
170069408Sache	*)
170169408Sache		os=-none
170269408Sache		;;
170369408Sacheesac
170469408Sachefi
170569408Sache
170669408Sache# Here we handle the case where we know the os, and the CPU type, but not the
170769408Sache# manufacturer.  We pick the logical manufacturer.
170869408Sachevendor=unknown
170969408Sachecase $basic_machine in
171069408Sache	*-unknown)
171169408Sache		case $os in
171269408Sache			-riscix*)
171369408Sache				vendor=acorn
171469408Sache				;;
171569408Sache			-sunos*)
171669408Sache				vendor=sun
171769408Sache				;;
1718195609Smp			-cnk*|-aix*)
171969408Sache				vendor=ibm
172069408Sache				;;
172183098Smp			-beos*)
172283098Smp				vendor=be
172383098Smp				;;
172469408Sache			-hpux*)
172569408Sache				vendor=hp
172669408Sache				;;
172783098Smp			-mpeix*)
172883098Smp				vendor=hp
172983098Smp				;;
173069408Sache			-hiux*)
173169408Sache				vendor=hitachi
173269408Sache				;;
173369408Sache			-unos*)
173469408Sache				vendor=crds
173569408Sache				;;
173669408Sache			-dgux*)
173769408Sache				vendor=dg
173869408Sache				;;
173969408Sache			-luna*)
174069408Sache				vendor=omron
174169408Sache				;;
174269408Sache			-genix*)
174369408Sache				vendor=ns
174469408Sache				;;
174583098Smp			-mvs* | -opened*)
174669408Sache				vendor=ibm
174769408Sache				;;
1748195609Smp			-os400*)
1749195609Smp				vendor=ibm
1750195609Smp				;;
175169408Sache			-ptx*)
175269408Sache				vendor=sequent
175369408Sache				;;
1754195609Smp			-tpf*)
1755195609Smp				vendor=ibm
1756195609Smp				;;
1757100616Smp			-vxsim* | -vxworks* | -windiss*)
175869408Sache				vendor=wrs
175969408Sache				;;
176069408Sache			-aux*)
176169408Sache				vendor=apple
176269408Sache				;;
176383098Smp			-hms*)
176483098Smp				vendor=hitachi
176583098Smp				;;
176683098Smp			-mpw* | -macos*)
176783098Smp				vendor=apple
176883098Smp				;;
1769100616Smp			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
177083098Smp				vendor=atari
177183098Smp				;;
1772100616Smp			-vos*)
1773100616Smp				vendor=stratus
1774100616Smp				;;
177569408Sache		esac
177669408Sache		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
177769408Sache		;;
177869408Sacheesac
177969408Sache
178069408Sacheecho $basic_machine$os
1781195609Smpexit
1782100616Smp
1783100616Smp# Local variables:
1784100616Smp# eval: (add-hook 'write-file-hooks 'time-stamp)
1785100616Smp# time-stamp-start: "timestamp='"
1786100616Smp# time-stamp-format: "%:y-%02m-%02d"
1787100616Smp# time-stamp-end: "'"
1788100616Smp# End:
1789