config.sub revision 195609
169408Sache#! /bin/sh
2100616Smp# Configuration validation subroutine script.
3100616Smp#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4195609Smp#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5195609Smp#   Free Software Foundation, Inc.
6100616Smp
7195609Smptimestamp='2009-06-11'
8100616Smp
969408Sache# This file is (in principle) common to ALL GNU software.
1069408Sache# The presence of a machine in this file suggests that SOME GNU software
1169408Sache# can handle that machine.  It does not imply ALL GNU software can.
1269408Sache#
1369408Sache# This file is free software; you can redistribute it and/or modify
1469408Sache# it under the terms of the GNU General Public License as published by
1569408Sache# the Free Software Foundation; either version 2 of the License, or
1669408Sache# (at your option) any later version.
1769408Sache#
1869408Sache# This program is distributed in the hope that it will be useful,
1969408Sache# but WITHOUT ANY WARRANTY; without even the implied warranty of
2069408Sache# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2169408Sache# GNU General Public License for more details.
2269408Sache#
2369408Sache# You should have received a copy of the GNU General Public License
2469408Sache# along with this program; if not, write to the Free Software
25195609Smp# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
26195609Smp# 02110-1301, USA.
27195609Smp#
2869408Sache# As a special exception to the GNU General Public License, if you
2969408Sache# distribute this file as part of a program that contains a
3069408Sache# configuration script generated by Autoconf, you may include it under
3169408Sache# the same distribution terms that you use for the rest of that program.
3269408Sache
33195609Smp
34100616Smp# Please send patches to <config-patches@gnu.org>.  Submit a context
35100616Smp# diff and a properly formatted ChangeLog entry.
36100616Smp#
3769408Sache# Configuration subroutine to validate and canonicalize a configuration type.
3869408Sache# Supply the specified configuration type as an argument.
3969408Sache# If it is invalid, we print an error message on stderr and exit with code 1.
4069408Sache# Otherwise, we print the canonical config type on stdout and succeed.
4169408Sache
4269408Sache# This file is supposed to be the same for all GNU packages
4369408Sache# and recognize all the CPU types, system types and aliases
4469408Sache# that are meaningful with *any* GNU software.
4569408Sache# Each package is responsible for reporting which valid configurations
4669408Sache# it does not support.  The user should be able to distinguish
4769408Sache# a failure to support a valid configuration from a meaningless
4869408Sache# configuration.
4969408Sache
5069408Sache# The goal of this file is to map all the various variations of a given
5169408Sache# machine specification into a single specification in the form:
5269408Sache#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
5369408Sache# or in some cases, the newer four-part form:
5469408Sache#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
5569408Sache# It is wrong to echo any other type of specification.
5669408Sache
57100616Smpme=`echo "$0" | sed -e 's,.*/,,'`
5869408Sache
59100616Smpusage="\
60100616SmpUsage: $0 [OPTION] CPU-MFR-OPSYS
61100616Smp       $0 [OPTION] ALIAS
62100616Smp
63100616SmpCanonicalize a configuration name.
64100616Smp
65100616SmpOperation modes:
66100616Smp  -h, --help         print this help, then exit
67100616Smp  -t, --time-stamp   print date of last modification, then exit
68100616Smp  -v, --version      print version number, then exit
69100616Smp
70100616SmpReport bugs and patches to <config-patches@gnu.org>."
71100616Smp
72100616Smpversion="\
73100616SmpGNU config.sub ($timestamp)
74100616Smp
75195609SmpCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
76195609Smp2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
77100616Smp
78100616SmpThis is free software; see the source for copying conditions.  There is NO
79100616Smpwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
80100616Smp
81100616Smphelp="
82100616SmpTry \`$me --help' for more information."
83100616Smp
84100616Smp# Parse command line
85100616Smpwhile test $# -gt 0 ; do
86100616Smp  case $1 in
87100616Smp    --time-stamp | --time* | -t )
88195609Smp       echo "$timestamp" ; exit ;;
89100616Smp    --version | -v )
90195609Smp       echo "$version" ; exit ;;
91100616Smp    --help | --h* | -h )
92195609Smp       echo "$usage"; exit ;;
93100616Smp    -- )     # Stop option processing
94100616Smp       shift; break ;;
95100616Smp    - )	# Use stdin as input.
96100616Smp       break ;;
97100616Smp    -* )
98100616Smp       echo "$me: invalid option $1$help"
99100616Smp       exit 1 ;;
100100616Smp
101100616Smp    *local*)
102100616Smp       # First pass through any local machine types.
103100616Smp       echo $1
104195609Smp       exit ;;
105100616Smp
106100616Smp    * )
107100616Smp       break ;;
108100616Smp  esac
109100616Smpdone
110100616Smp
111100616Smpcase $# in
112100616Smp 0) echo "$me: missing argument$help" >&2
113100616Smp    exit 1;;
114100616Smp 1) ;;
115100616Smp *) echo "$me: too many arguments$help" >&2
116100616Smp    exit 1;;
11769408Sacheesac
11869408Sache
11969408Sache# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
12069408Sache# Here we must recognize all the valid KERNEL-OS combinations.
12169408Sachemaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
12269408Sachecase $maybe_os in
123195609Smp  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
124195609Smp  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
125195609Smp  kopensolaris*-gnu* | \
126195609Smp  storm-chaos* | os2-emx* | rtmk-nova*)
12769408Sache    os=-$maybe_os
12869408Sache    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
12969408Sache    ;;
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 | \
152195609Smp	-apple | -axis | -knuth | -cray)
15369408Sache		os=
15469408Sache		basic_machine=$1
15569408Sache		;;
156195609Smp        -bluegene*)
157195609Smp	        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		;;
173100616Smp 	-chorusrdb)
174100616Smp 		os=-chorusrdb
175100616Smp		basic_machine=$1
176100616Smp 		;;
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		;;
22169408Sache	-lynx*)
22269408Sache		os=-lynxos
22369408Sache		;;
22469408Sache	-ptx*)
22569408Sache		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
22669408Sache		;;
22769408Sache	-windowsnt*)
22869408Sache		os=`echo $os | sed -e 's/windowsnt/winnt/'`
22969408Sache		;;
23069408Sache	-psos*)
23169408Sache		os=-psos
23269408Sache		;;
23383098Smp	-mint | -mint[0-9]*)
23483098Smp		basic_machine=m68k-atari
23583098Smp		os=-mint
23683098Smp		;;
23769408Sacheesac
23869408Sache
23969408Sache# Decode aliases for certain CPU-COMPANY combinations.
24069408Sachecase $basic_machine in
24169408Sache	# Recognize the basic CPU types without company name.
24269408Sache	# Some are omitted here because they have special meanings below.
243100616Smp	1750a | 580 \
244100616Smp	| a29k \
245100616Smp	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
246100616Smp	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
247195609Smp	| am33_2.0 \
248195609Smp	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
249195609Smp	| bfin \
250100616Smp	| c4x | clipper \
251100616Smp	| d10v | d30v | dlx | dsp16xx \
252195609Smp	| fido | fr30 | frv \
253100616Smp	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
254100616Smp	| i370 | i860 | i960 | ia64 \
255195609Smp	| ip2k | iq2000 \
256195609Smp	| lm32 \
257195609Smp	| m32c | m32r | m32rle | m68000 | m68k | m88k \
258195609Smp	| maxq | mb | microblaze | mcore | mep | metag \
259100616Smp	| mips | mipsbe | mipseb | mipsel | mipsle \
260100616Smp	| mips16 \
261100616Smp	| mips64 | mips64el \
262195609Smp	| mips64octeon | mips64octeonel \
263100616Smp	| mips64orion | mips64orionel \
264195609Smp	| mips64r5900 | mips64r5900el \
265195609Smp	| mips64vr | mips64vrel \
266100616Smp	| mips64vr4100 | mips64vr4100el \
267100616Smp	| mips64vr4300 | mips64vr4300el \
268100616Smp	| mips64vr5000 | mips64vr5000el \
269195609Smp	| mips64vr5900 | mips64vr5900el \
270100616Smp	| mipsisa32 | mipsisa32el \
271195609Smp	| mipsisa32r2 | mipsisa32r2el \
272100616Smp	| mipsisa64 | mipsisa64el \
273195609Smp	| mipsisa64r2 | mipsisa64r2el \
274100616Smp	| mipsisa64sb1 | mipsisa64sb1el \
275195609Smp	| mipsisa64sr71k | mipsisa64sr71kel \
276100616Smp	| mipstx39 | mipstx39el \
277100616Smp	| mn10200 | mn10300 \
278195609Smp	| moxie \
279195609Smp	| mt \
280195609Smp	| msp430 \
281195609Smp	| nios | nios2 \
282100616Smp	| ns16k | ns32k \
283195609Smp	| or32 \
284100616Smp	| pdp10 | pdp11 | pj | pjl \
285100616Smp	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
286100616Smp	| pyramid \
287195609Smp	| score \
288195609Smp	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
289100616Smp	| sh64 | sh64le \
290195609Smp	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
291195609Smp	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
292195609Smp	| spu | strongarm \
293195609Smp	| tahoe | thumb | tic4x | tic80 | tron \
294100616Smp	| v850 | v850e \
295100616Smp	| we32k \
296195609Smp	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
297195609Smp	| z8k | z80)
29869408Sache		basic_machine=$basic_machine-unknown
29969408Sache		;;
300100616Smp	m6811 | m68hc11 | m6812 | m68hc12)
301100616Smp		# Motorola 68HC11/12.
302100616Smp		basic_machine=$basic_machine-unknown
303100616Smp		os=-none
30483098Smp		;;
305100616Smp	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
306100616Smp		;;
307195609Smp	ms1)
308195609Smp		basic_machine=mt-unknown
309195609Smp		;;
31083098Smp
31169408Sache	# We use `pc' rather than `unknown'
31269408Sache	# because (1) that's what they normally are, and
31369408Sache	# (2) the word "unknown" tends to confuse beginning users.
314100616Smp	i*86 | x86_64)
31569408Sache	  basic_machine=$basic_machine-pc
31669408Sache	  ;;
31769408Sache	# Object if more than one company name word.
31869408Sache	*-*-*)
31969408Sache		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
32069408Sache		exit 1
32169408Sache		;;
32269408Sache	# Recognize the basic CPU types with company name.
323100616Smp	580-* \
324100616Smp	| a29k-* \
325100616Smp	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
326100616Smp	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
327100616Smp	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
328100616Smp	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
329195609Smp	| avr-* | avr32-* \
330195609Smp	| bfin-* | bs2000-* \
331195609Smp	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
332195609Smp	| clipper-* | craynv-* | cydra-* \
333100616Smp	| d10v-* | d30v-* | dlx-* \
334100616Smp	| elxsi-* \
335195609Smp	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
336100616Smp	| h8300-* | h8500-* \
337100616Smp	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
338100616Smp	| i*86-* | i860-* | i960-* | ia64-* \
339195609Smp	| ip2k-* | iq2000-* \
340195609Smp	| lm32-* \
341195609Smp	| m32c-* | m32r-* | m32rle-* \
342100616Smp	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
343195609Smp	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
344100616Smp	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
345100616Smp	| mips16-* \
346100616Smp	| mips64-* | mips64el-* \
347195609Smp	| mips64octeon-* | mips64octeonel-* \
348100616Smp	| mips64orion-* | mips64orionel-* \
349195609Smp	| mips64r5900-* | mips64r5900el-* \
350195609Smp	| mips64vr-* | mips64vrel-* \
351100616Smp	| mips64vr4100-* | mips64vr4100el-* \
352100616Smp	| mips64vr4300-* | mips64vr4300el-* \
353100616Smp	| mips64vr5000-* | mips64vr5000el-* \
354195609Smp	| mips64vr5900-* | mips64vr5900el-* \
355100616Smp	| mipsisa32-* | mipsisa32el-* \
356195609Smp	| mipsisa32r2-* | mipsisa32r2el-* \
357100616Smp	| mipsisa64-* | mipsisa64el-* \
358195609Smp	| mipsisa64r2-* | mipsisa64r2el-* \
359100616Smp	| mipsisa64sb1-* | mipsisa64sb1el-* \
360195609Smp	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
361195609Smp	| mipstx39-* | mipstx39el-* \
362195609Smp	| mmix-* \
363195609Smp	| mt-* \
364195609Smp	| msp430-* \
365195609Smp	| nios-* | nios2-* \
366100616Smp	| none-* | np1-* | ns16k-* | ns32k-* \
367100616Smp	| orion-* \
368100616Smp	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
369100616Smp	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
370100616Smp	| pyramid-* \
371100616Smp	| romp-* | rs6000-* \
372195609Smp	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
373100616Smp	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
374195609Smp	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
375195609Smp	| sparclite-* \
376195609Smp	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
377195609Smp	| tahoe-* | thumb-* \
378195609Smp	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
379195609Smp	| tron-* \
380100616Smp	| v850-* | v850e-* | vax-* \
381100616Smp	| we32k-* \
382195609Smp	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
383195609Smp	| xstormy16-* | xtensa*-* \
384100616Smp	| ymp-* \
385195609Smp	| z8k-* | z80-*)
38669408Sache		;;
387195609Smp	# Recognize the basic CPU types without company name, with glob match.
388195609Smp	xtensa*)
389195609Smp		basic_machine=$basic_machine-unknown
390195609Smp		;;
39169408Sache	# Recognize the various machine names and aliases which stand
39269408Sache	# for a CPU type and a company and sometimes even an OS.
39383098Smp	386bsd)
39483098Smp		basic_machine=i386-unknown
39583098Smp		os=-bsd
39683098Smp		;;
39769408Sache	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
39869408Sache		basic_machine=m68000-att
39969408Sache		;;
40069408Sache	3b*)
40169408Sache		basic_machine=we32k-att
40269408Sache		;;
40383098Smp	a29khif)
40483098Smp		basic_machine=a29k-amd
40583098Smp		os=-udi
40683098Smp		;;
407195609Smp    	abacus)
408195609Smp		basic_machine=abacus-unknown
409195609Smp		;;
41083098Smp	adobe68k)
41183098Smp		basic_machine=m68010-adobe
41283098Smp		os=-scout
41383098Smp		;;
41469408Sache	alliant | fx80)
41569408Sache		basic_machine=fx80-alliant
41669408Sache		;;
41769408Sache	altos | altos3068)
41869408Sache		basic_machine=m68k-altos
41969408Sache		;;
42069408Sache	am29k)
42169408Sache		basic_machine=a29k-none
42269408Sache		os=-bsd
42369408Sache		;;
424195609Smp	amd64)
425195609Smp		basic_machine=x86_64-pc
426195609Smp		;;
427195609Smp	amd64-*)
428195609Smp		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
429195609Smp		;;
43069408Sache	amdahl)
43169408Sache		basic_machine=580-amdahl
43269408Sache		os=-sysv
43369408Sache		;;
43469408Sache	amiga | amiga-*)
435100616Smp		basic_machine=m68k-unknown
43669408Sache		;;
43769408Sache	amigaos | amigados)
438100616Smp		basic_machine=m68k-unknown
43969408Sache		os=-amigaos
44069408Sache		;;
44169408Sache	amigaunix | amix)
442100616Smp		basic_machine=m68k-unknown
44369408Sache		os=-sysv4
44469408Sache		;;
44569408Sache	apollo68)
44669408Sache		basic_machine=m68k-apollo
44769408Sache		os=-sysv
44869408Sache		;;
44983098Smp	apollo68bsd)
45083098Smp		basic_machine=m68k-apollo
45183098Smp		os=-bsd
45283098Smp		;;
453195609Smp	aros)
454195609Smp		basic_machine=i386-pc
455195609Smp		os=-aros
456195609Smp		;;
45769408Sache	aux)
45869408Sache		basic_machine=m68k-apple
45969408Sache		os=-aux
46069408Sache		;;
46169408Sache	balance)
46269408Sache		basic_machine=ns32k-sequent
46369408Sache		os=-dynix
46469408Sache		;;
465195609Smp	blackfin)
466195609Smp		basic_machine=bfin-unknown
467195609Smp		os=-linux
468195609Smp		;;
469195609Smp	blackfin-*)
470195609Smp		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
471195609Smp		os=-linux
472195609Smp		;;
473195609Smp	bluegene*)
474195609Smp		basic_machine=powerpc-ibm
475195609Smp		os=-cnk
476195609Smp		;;
477100616Smp	c90)
478100616Smp		basic_machine=c90-cray
479100616Smp		os=-unicos
480100616Smp		;;
481195609Smp        cegcc)
482195609Smp		basic_machine=arm-unknown
483195609Smp		os=-cegcc
484195609Smp		;;
48569408Sache	convex-c1)
48669408Sache		basic_machine=c1-convex
48769408Sache		os=-bsd
48869408Sache		;;
48969408Sache	convex-c2)
49069408Sache		basic_machine=c2-convex
49169408Sache		os=-bsd
49269408Sache		;;
49369408Sache	convex-c32)
49469408Sache		basic_machine=c32-convex
49569408Sache		os=-bsd
49669408Sache		;;
49769408Sache	convex-c34)
49869408Sache		basic_machine=c34-convex
49969408Sache		os=-bsd
50069408Sache		;;
50169408Sache	convex-c38)
50269408Sache		basic_machine=c38-convex
50369408Sache		os=-bsd
50469408Sache		;;
505100616Smp	cray | j90)
506100616Smp		basic_machine=j90-cray
50769408Sache		os=-unicos
50869408Sache		;;
509195609Smp	craynv)
510195609Smp		basic_machine=craynv-cray
511195609Smp		os=-unicosmp
512195609Smp		;;
513195609Smp	cr16)
514195609Smp		basic_machine=cr16-unknown
515195609Smp		os=-elf
516195609Smp		;;
51769408Sache	crds | unos)
51869408Sache		basic_machine=m68k-crds
51969408Sache		;;
520195609Smp	crisv32 | crisv32-* | etraxfs*)
521195609Smp		basic_machine=crisv32-axis
522195609Smp		;;
523100616Smp	cris | cris-* | etrax*)
524100616Smp		basic_machine=cris-axis
525100616Smp		;;
526195609Smp	crx)
527195609Smp		basic_machine=crx-unknown
528195609Smp		os=-elf
529195609Smp		;;
53069408Sache	da30 | da30-*)
53169408Sache		basic_machine=m68k-da30
53269408Sache		;;
53369408Sache	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
53469408Sache		basic_machine=mips-dec
53569408Sache		;;
536100616Smp	decsystem10* | dec10*)
537100616Smp		basic_machine=pdp10-dec
538100616Smp		os=-tops10
539100616Smp		;;
540100616Smp	decsystem20* | dec20*)
541100616Smp		basic_machine=pdp10-dec
542100616Smp		os=-tops20
543100616Smp		;;
54469408Sache	delta | 3300 | motorola-3300 | motorola-delta \
54569408Sache	      | 3300-motorola | delta-motorola)
54669408Sache		basic_machine=m68k-motorola
54769408Sache		;;
54869408Sache	delta88)
54969408Sache		basic_machine=m88k-motorola
55069408Sache		os=-sysv3
55169408Sache		;;
552195609Smp	dicos)
553195609Smp		basic_machine=i686-pc
554195609Smp		os=-dicos
555195609Smp		;;
556195609Smp	djgpp)
557195609Smp		basic_machine=i586-pc
558195609Smp		os=-msdosdjgpp
559195609Smp		;;
56069408Sache	dpx20 | dpx20-*)
56169408Sache		basic_machine=rs6000-bull
56269408Sache		os=-bosx
56369408Sache		;;
56469408Sache	dpx2* | dpx2*-bull)
56569408Sache		basic_machine=m68k-bull
56669408Sache		os=-sysv3
56769408Sache		;;
56869408Sache	ebmon29k)
56969408Sache		basic_machine=a29k-amd
57069408Sache		os=-ebmon
57169408Sache		;;
57269408Sache	elxsi)
57369408Sache		basic_machine=elxsi-elxsi
57469408Sache		os=-bsd
57569408Sache		;;
57669408Sache	encore | umax | mmax)
57769408Sache		basic_machine=ns32k-encore
57869408Sache		;;
57983098Smp	es1800 | OSE68k | ose68k | ose | OSE)
58083098Smp		basic_machine=m68k-ericsson
58183098Smp		os=-ose
58283098Smp		;;
58369408Sache	fx2800)
58469408Sache		basic_machine=i860-alliant
58569408Sache		;;
58669408Sache	genix)
58769408Sache		basic_machine=ns32k-ns
58869408Sache		;;
58969408Sache	gmicro)
59069408Sache		basic_machine=tron-gmicro
59169408Sache		os=-sysv
59269408Sache		;;
593100616Smp	go32)
594100616Smp		basic_machine=i386-pc
595100616Smp		os=-go32
596100616Smp		;;
59769408Sache	h3050r* | hiux*)
59869408Sache		basic_machine=hppa1.1-hitachi
59969408Sache		os=-hiuxwe2
60069408Sache		;;
60169408Sache	h8300hms)
60269408Sache		basic_machine=h8300-hitachi
60369408Sache		os=-hms
60469408Sache		;;
60583098Smp	h8300xray)
60683098Smp		basic_machine=h8300-hitachi
60783098Smp		os=-xray
60883098Smp		;;
60983098Smp	h8500hms)
61083098Smp		basic_machine=h8500-hitachi
61183098Smp		os=-hms
61283098Smp		;;
61369408Sache	harris)
61469408Sache		basic_machine=m88k-harris
61569408Sache		os=-sysv3
61669408Sache		;;
61769408Sache	hp300-*)
61869408Sache		basic_machine=m68k-hp
61969408Sache		;;
62069408Sache	hp300bsd)
62169408Sache		basic_machine=m68k-hp
62269408Sache		os=-bsd
62369408Sache		;;
62469408Sache	hp300hpux)
62569408Sache		basic_machine=m68k-hp
62669408Sache		os=-hpux
62769408Sache		;;
62883098Smp	hp3k9[0-9][0-9] | hp9[0-9][0-9])
62983098Smp		basic_machine=hppa1.0-hp
63083098Smp		;;
63169408Sache	hp9k2[0-9][0-9] | hp9k31[0-9])
63269408Sache		basic_machine=m68000-hp
63369408Sache		;;
63469408Sache	hp9k3[2-9][0-9])
63569408Sache		basic_machine=m68k-hp
63669408Sache		;;
63783098Smp	hp9k6[0-9][0-9] | hp6[0-9][0-9])
63883098Smp		basic_machine=hppa1.0-hp
63983098Smp		;;
64083098Smp	hp9k7[0-79][0-9] | hp7[0-79][0-9])
64169408Sache		basic_machine=hppa1.1-hp
64269408Sache		;;
64383098Smp	hp9k78[0-9] | hp78[0-9])
64483098Smp		# FIXME: really hppa2.0-hp
64583098Smp		basic_machine=hppa1.1-hp
64683098Smp		;;
64783098Smp	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
64883098Smp		# FIXME: really hppa2.0-hp
64983098Smp		basic_machine=hppa1.1-hp
65083098Smp		;;
65183098Smp	hp9k8[0-9][13679] | hp8[0-9][13679])
65283098Smp		basic_machine=hppa1.1-hp
65383098Smp		;;
65469408Sache	hp9k8[0-9][0-9] | hp8[0-9][0-9])
65569408Sache		basic_machine=hppa1.0-hp
65669408Sache		;;
65769408Sache	hppa-next)
65869408Sache		os=-nextstep3
65969408Sache		;;
66083098Smp	hppaosf)
66183098Smp		basic_machine=hppa1.1-hp
66283098Smp		os=-osf
66383098Smp		;;
66483098Smp	hppro)
66583098Smp		basic_machine=hppa1.1-hp
66683098Smp		os=-proelf
66783098Smp		;;
66869408Sache	i370-ibm* | ibm*)
66969408Sache		basic_machine=i370-ibm
67069408Sache		;;
67169408Sache# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
672100616Smp	i*86v32)
67369408Sache		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
67469408Sache		os=-sysv32
67569408Sache		;;
676100616Smp	i*86v4*)
67769408Sache		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
67869408Sache		os=-sysv4
67969408Sache		;;
680100616Smp	i*86v)
68169408Sache		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
68269408Sache		os=-sysv
68369408Sache		;;
684100616Smp	i*86sol2)
68569408Sache		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
68669408Sache		os=-solaris2
68769408Sache		;;
68883098Smp	i386mach)
68983098Smp		basic_machine=i386-mach
69083098Smp		os=-mach
69183098Smp		;;
69283098Smp	i386-vsta | vsta)
69383098Smp		basic_machine=i386-unknown
69483098Smp		os=-vsta
69583098Smp		;;
69669408Sache	iris | iris4d)
69769408Sache		basic_machine=mips-sgi
69869408Sache		case $os in
69969408Sache		    -irix*)
70069408Sache			;;
70169408Sache		    *)
70269408Sache			os=-irix4
70369408Sache			;;
70469408Sache		esac
70569408Sache		;;
70669408Sache	isi68 | isi)
70769408Sache		basic_machine=m68k-isi
70869408Sache		os=-sysv
70969408Sache		;;
710195609Smp	m68knommu)
711195609Smp		basic_machine=m68k-unknown
712195609Smp		os=-linux
713195609Smp		;;
714195609Smp	m68knommu-*)
715195609Smp		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
716195609Smp		os=-linux
717195609Smp		;;
71869408Sache	m88k-omron*)
71969408Sache		basic_machine=m88k-omron
72069408Sache		;;
72169408Sache	magnum | m3230)
72269408Sache		basic_machine=mips-mips
72369408Sache		os=-sysv
72469408Sache		;;
72569408Sache	merlin)
72669408Sache		basic_machine=ns32k-utek
72769408Sache		os=-sysv
72869408Sache		;;
729100616Smp	mingw32)
730100616Smp		basic_machine=i386-pc
731100616Smp		os=-mingw32
732100616Smp		;;
733195609Smp	mingw32ce)
734195609Smp		basic_machine=arm-unknown
735195609Smp		os=-mingw32ce
736195609Smp		;;
73769408Sache	miniframe)
73869408Sache		basic_machine=m68000-convergent
73969408Sache		;;
74083098Smp	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
74183098Smp		basic_machine=m68k-atari
74283098Smp		os=-mint
74383098Smp		;;
74469408Sache	mips3*-*)
74569408Sache		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
74669408Sache		;;
74769408Sache	mips3*)
74869408Sache		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
74969408Sache		;;
75083098Smp	monitor)
75183098Smp		basic_machine=m68k-rom68k
75283098Smp		os=-coff
75383098Smp		;;
754100616Smp	morphos)
755100616Smp		basic_machine=powerpc-unknown
756100616Smp		os=-morphos
757100616Smp		;;
75883098Smp	msdos)
759100616Smp		basic_machine=i386-pc
76083098Smp		os=-msdos
76183098Smp		;;
762195609Smp	ms1-*)
763195609Smp		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
764195609Smp		;;
76583098Smp	mvs)
76683098Smp		basic_machine=i370-ibm
76783098Smp		os=-mvs
76883098Smp		;;
76969408Sache	ncr3000)
77069408Sache		basic_machine=i486-ncr
77169408Sache		os=-sysv4
77269408Sache		;;
77383098Smp	netbsd386)
77483098Smp		basic_machine=i386-unknown
77583098Smp		os=-netbsd
77683098Smp		;;
77783098Smp	netwinder)
77883098Smp		basic_machine=armv4l-rebel
77983098Smp		os=-linux
78083098Smp		;;
78169408Sache	news | news700 | news800 | news900)
78269408Sache		basic_machine=m68k-sony
78369408Sache		os=-newsos
78469408Sache		;;
78569408Sache	news1000)
78669408Sache		basic_machine=m68030-sony
78769408Sache		os=-newsos
78869408Sache		;;
78969408Sache	news-3600 | risc-news)
79069408Sache		basic_machine=mips-sony
79169408Sache		os=-newsos
79269408Sache		;;
79383098Smp	necv70)
79483098Smp		basic_machine=v70-nec
79583098Smp		os=-sysv
79683098Smp		;;
79769408Sache	next | m*-next )
79869408Sache		basic_machine=m68k-next
79969408Sache		case $os in
80069408Sache		    -nextstep* )
80169408Sache			;;
80269408Sache		    -ns2*)
80369408Sache		      os=-nextstep2
80469408Sache			;;
80569408Sache		    *)
80669408Sache		      os=-nextstep3
80769408Sache			;;
80869408Sache		esac
80969408Sache		;;
81069408Sache	nh3000)
81169408Sache		basic_machine=m68k-harris
81269408Sache		os=-cxux
81369408Sache		;;
81469408Sache	nh[45]000)
81569408Sache		basic_machine=m88k-harris
81669408Sache		os=-cxux
81769408Sache		;;
81869408Sache	nindy960)
81969408Sache		basic_machine=i960-intel
82069408Sache		os=-nindy
82169408Sache		;;
82283098Smp	mon960)
82383098Smp		basic_machine=i960-intel
82483098Smp		os=-mon960
82583098Smp		;;
826100616Smp	nonstopux)
827100616Smp		basic_machine=mips-compaq
828100616Smp		os=-nonstopux
829100616Smp		;;
83069408Sache	np1)
83169408Sache		basic_machine=np1-gould
83269408Sache		;;
833100616Smp	nsr-tandem)
834100616Smp		basic_machine=nsr-tandem
835100616Smp		;;
83683098Smp	op50n-* | op60c-*)
83783098Smp		basic_machine=hppa1.1-oki
83883098Smp		os=-proelf
83983098Smp		;;
840195609Smp	openrisc | openrisc-*)
841100616Smp		basic_machine=or32-unknown
842100616Smp		;;
843195609Smp	os400)
844195609Smp		basic_machine=powerpc-ibm
845195609Smp		os=-os400
846195609Smp		;;
84783098Smp	OSE68000 | ose68000)
84883098Smp		basic_machine=m68000-ericsson
84983098Smp		os=-ose
85083098Smp		;;
85183098Smp	os68k)
85283098Smp		basic_machine=m68k-none
85383098Smp		os=-os68k
85483098Smp		;;
85569408Sache	pa-hitachi)
85669408Sache		basic_machine=hppa1.1-hitachi
85769408Sache		os=-hiuxwe2
85869408Sache		;;
85969408Sache	paragon)
86069408Sache		basic_machine=i860-intel
86169408Sache		os=-osf
86269408Sache		;;
863195609Smp	parisc)
864195609Smp		basic_machine=hppa-unknown
865195609Smp		os=-linux
866195609Smp		;;
867195609Smp	parisc-*)
868195609Smp		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
869195609Smp		os=-linux
870195609Smp		;;
87169408Sache	pbd)
87269408Sache		basic_machine=sparc-tti
87369408Sache		;;
87469408Sache	pbb)
87569408Sache		basic_machine=m68k-tti
87669408Sache		;;
877195609Smp	pc532 | pc532-*)
87869408Sache		basic_machine=ns32k-pc532
87969408Sache		;;
880195609Smp	pc98)
881195609Smp		basic_machine=i386-pc
882195609Smp		;;
883195609Smp	pc98-*)
884195609Smp		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
885195609Smp		;;
886100616Smp	pentium | p5 | k5 | k6 | nexgen | viac3)
88769408Sache		basic_machine=i586-pc
88869408Sache		;;
889195609Smp	pentiumpro | p6 | 6x86 | athlon | athlon_*)
89069408Sache		basic_machine=i686-pc
89169408Sache		;;
892195609Smp	pentiumii | pentium2 | pentiumiii | pentium3)
893100616Smp		basic_machine=i686-pc
89469408Sache		;;
895195609Smp	pentium4)
896195609Smp		basic_machine=i786-pc
897195609Smp		;;
898100616Smp	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
89969408Sache		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
90069408Sache		;;
901100616Smp	pentiumpro-* | p6-* | 6x86-* | athlon-*)
90269408Sache		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
90369408Sache		;;
904195609Smp	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
905100616Smp		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
90669408Sache		;;
907195609Smp	pentium4-*)
908195609Smp		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
909195609Smp		;;
91069408Sache	pn)
91169408Sache		basic_machine=pn-gould
91269408Sache		;;
913100616Smp	power)	basic_machine=power-ibm
91469408Sache		;;
91569408Sache	ppc)	basic_machine=powerpc-unknown
916195609Smp		;;
91769408Sache	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
91869408Sache		;;
91969408Sache	ppcle | powerpclittle | ppc-le | powerpc-little)
92069408Sache		basic_machine=powerpcle-unknown
921195609Smp		;;
92269408Sache	ppcle-* | powerpclittle-*)
92369408Sache		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
92469408Sache		;;
925100616Smp	ppc64)	basic_machine=powerpc64-unknown
926195609Smp		;;
927100616Smp	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
928100616Smp		;;
929100616Smp	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
930100616Smp		basic_machine=powerpc64le-unknown
931195609Smp		;;
932100616Smp	ppc64le-* | powerpc64little-*)
933100616Smp		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
934100616Smp		;;
93569408Sache	ps2)
93669408Sache		basic_machine=i386-ibm
93769408Sache		;;
938100616Smp	pw32)
939100616Smp		basic_machine=i586-unknown
940100616Smp		os=-pw32
941100616Smp		;;
942195609Smp	rdos)
943195609Smp		basic_machine=i386-pc
944195609Smp		os=-rdos
945195609Smp		;;
94683098Smp	rom68k)
94783098Smp		basic_machine=m68k-rom68k
94883098Smp		os=-coff
94983098Smp		;;
95069408Sache	rm[46]00)
95169408Sache		basic_machine=mips-siemens
95269408Sache		;;
95369408Sache	rtpc | rtpc-*)
95469408Sache		basic_machine=romp-ibm
95569408Sache		;;
956100616Smp	s390 | s390-*)
957100616Smp		basic_machine=s390-ibm
958100616Smp		;;
959100616Smp	s390x | s390x-*)
960100616Smp		basic_machine=s390x-ibm
961100616Smp		;;
96283098Smp	sa29200)
96383098Smp		basic_machine=a29k-amd
96483098Smp		os=-udi
96583098Smp		;;
966195609Smp	sb1)
967195609Smp		basic_machine=mipsisa64sb1-unknown
968195609Smp		;;
969195609Smp	sb1el)
970195609Smp		basic_machine=mipsisa64sb1el-unknown
971195609Smp		;;
972195609Smp	sde)
973195609Smp		basic_machine=mipsisa32-sde
974195609Smp		os=-elf
975195609Smp		;;
976195609Smp	sei)
977195609Smp		basic_machine=mips-sei
978195609Smp		os=-seiux
979195609Smp		;;
98069408Sache	sequent)
98169408Sache		basic_machine=i386-sequent
98269408Sache		;;
98369408Sache	sh)
98469408Sache		basic_machine=sh-hitachi
98569408Sache		os=-hms
98669408Sache		;;
987195609Smp	sh5el)
988195609Smp		basic_machine=sh5le-unknown
989195609Smp		;;
990195609Smp	sh64)
991195609Smp		basic_machine=sh64-unknown
992195609Smp		;;
993100616Smp	sparclite-wrs | simso-wrs)
99483098Smp		basic_machine=sparclite-wrs
99583098Smp		os=-vxworks
99683098Smp		;;
99769408Sache	sps7)
99869408Sache		basic_machine=m68k-bull
99969408Sache		os=-sysv2
100069408Sache		;;
100169408Sache	spur)
100269408Sache		basic_machine=spur-unknown
100369408Sache		;;
100483098Smp	st2000)
100583098Smp		basic_machine=m68k-tandem
100683098Smp		;;
100783098Smp	stratus)
100883098Smp		basic_machine=i860-stratus
100983098Smp		os=-sysv4
101083098Smp		;;
101169408Sache	sun2)
101269408Sache		basic_machine=m68000-sun
101369408Sache		;;
101469408Sache	sun2os3)
101569408Sache		basic_machine=m68000-sun
101669408Sache		os=-sunos3
101769408Sache		;;
101869408Sache	sun2os4)
101969408Sache		basic_machine=m68000-sun
102069408Sache		os=-sunos4
102169408Sache		;;
102269408Sache	sun3os3)
102369408Sache		basic_machine=m68k-sun
102469408Sache		os=-sunos3
102569408Sache		;;
102669408Sache	sun3os4)
102769408Sache		basic_machine=m68k-sun
102869408Sache		os=-sunos4
102969408Sache		;;
103069408Sache	sun4os3)
103169408Sache		basic_machine=sparc-sun
103269408Sache		os=-sunos3
103369408Sache		;;
103469408Sache	sun4os4)
103569408Sache		basic_machine=sparc-sun
103669408Sache		os=-sunos4
103769408Sache		;;
103869408Sache	sun4sol2)
103969408Sache		basic_machine=sparc-sun
104069408Sache		os=-solaris2
104169408Sache		;;
104269408Sache	sun3 | sun3-*)
104369408Sache		basic_machine=m68k-sun
104469408Sache		;;
104569408Sache	sun4)
104669408Sache		basic_machine=sparc-sun
104769408Sache		;;
104869408Sache	sun386 | sun386i | roadrunner)
104969408Sache		basic_machine=i386-sun
105069408Sache		;;
1051195609Smp	sv1)
1052100616Smp		basic_machine=sv1-cray
1053100616Smp		os=-unicos
1054100616Smp		;;
105569408Sache	symmetry)
105669408Sache		basic_machine=i386-sequent
105769408Sache		os=-dynix
105869408Sache		;;
105983098Smp	t3e)
1060100616Smp		basic_machine=alphaev5-cray
106183098Smp		os=-unicos
106283098Smp		;;
1063100616Smp	t90)
1064100616Smp		basic_machine=t90-cray
1065100616Smp		os=-unicos
1066100616Smp		;;
1067100616Smp	tic54x | c54x*)
1068100616Smp		basic_machine=tic54x-unknown
1069100616Smp		os=-coff
1070100616Smp		;;
1071195609Smp	tic55x | c55x*)
1072195609Smp		basic_machine=tic55x-unknown
1073195609Smp		os=-coff
1074195609Smp		;;
1075195609Smp	tic6x | c6x*)
1076195609Smp		basic_machine=tic6x-unknown
1077195609Smp		os=-coff
1078195609Smp		;;
1079195609Smp	tile*)
1080195609Smp		basic_machine=tile-unknown
1081195609Smp		os=-linux-gnu
1082195609Smp		;;
108369408Sache	tx39)
108469408Sache		basic_machine=mipstx39-unknown
108569408Sache		;;
108669408Sache	tx39el)
108769408Sache		basic_machine=mipstx39el-unknown
108869408Sache		;;
1089100616Smp	toad1)
1090100616Smp		basic_machine=pdp10-xkl
1091100616Smp		os=-tops20
1092100616Smp		;;
109369408Sache	tower | tower-32)
109469408Sache		basic_machine=m68k-ncr
109569408Sache		;;
1096195609Smp	tpf)
1097195609Smp		basic_machine=s390x-ibm
1098195609Smp		os=-tpf
1099195609Smp		;;
110069408Sache	udi29k)
110169408Sache		basic_machine=a29k-amd
110269408Sache		os=-udi
110369408Sache		;;
110469408Sache	ultra3)
110569408Sache		basic_machine=a29k-nyu
110669408Sache		os=-sym1
110769408Sache		;;
110883098Smp	v810 | necv810)
110983098Smp		basic_machine=v810-nec
111083098Smp		os=-none
111183098Smp		;;
111269408Sache	vaxv)
111369408Sache		basic_machine=vax-dec
111469408Sache		os=-sysv
111569408Sache		;;
111669408Sache	vms)
111769408Sache		basic_machine=vax-dec
111869408Sache		os=-vms
111969408Sache		;;
112069408Sache	vpp*|vx|vx-*)
1121195609Smp		basic_machine=f301-fujitsu
1122195609Smp		;;
112369408Sache	vxworks960)
112469408Sache		basic_machine=i960-wrs
112569408Sache		os=-vxworks
112669408Sache		;;
112769408Sache	vxworks68)
112869408Sache		basic_machine=m68k-wrs
112969408Sache		os=-vxworks
113069408Sache		;;
113169408Sache	vxworks29k)
113269408Sache		basic_machine=a29k-wrs
113369408Sache		os=-vxworks
113469408Sache		;;
113583098Smp	w65*)
113683098Smp		basic_machine=w65-wdc
113783098Smp		os=-none
113883098Smp		;;
113983098Smp	w89k-*)
114083098Smp		basic_machine=hppa1.1-winbond
114183098Smp		os=-proelf
114283098Smp		;;
1143195609Smp	xbox)
1144195609Smp		basic_machine=i686-pc
1145195609Smp		os=-mingw32
114669408Sache		;;
1147195609Smp	xps | xps100)
114869408Sache		basic_machine=xps100-honeywell
114969408Sache		;;
1150100616Smp	ymp)
1151100616Smp		basic_machine=ymp-cray
1152100616Smp		os=-unicos
1153100616Smp		;;
115483098Smp	z8k-*-coff)
115583098Smp		basic_machine=z8k-unknown
115683098Smp		os=-sim
115783098Smp		;;
1158195609Smp	z80-*-coff)
1159195609Smp		basic_machine=z80-unknown
1160195609Smp		os=-sim
1161195609Smp		;;
116269408Sache	none)
116369408Sache		basic_machine=none-none
116469408Sache		os=-none
116569408Sache		;;
116669408Sache
116769408Sache# Here we handle the default manufacturer of certain CPU types.  It is in
116869408Sache# some cases the only manufacturer, in others, it is the most popular.
116983098Smp	w89k)
117083098Smp		basic_machine=hppa1.1-winbond
117183098Smp		;;
117283098Smp	op50n)
117383098Smp		basic_machine=hppa1.1-oki
117483098Smp		;;
117583098Smp	op60c)
117683098Smp		basic_machine=hppa1.1-oki
117783098Smp		;;
117869408Sache	romp)
117969408Sache		basic_machine=romp-ibm
118069408Sache		;;
1181195609Smp	mmix)
1182195609Smp		basic_machine=mmix-knuth
1183195609Smp		;;
118469408Sache	rs6000)
118569408Sache		basic_machine=rs6000-ibm
118669408Sache		;;
118769408Sache	vax)
118869408Sache		basic_machine=vax-dec
118969408Sache		;;
1190100616Smp	pdp10)
1191100616Smp		# there are many clones, so DEC is not a safe bet
1192100616Smp		basic_machine=pdp10-unknown
1193100616Smp		;;
119469408Sache	pdp11)
119569408Sache		basic_machine=pdp11-dec
119669408Sache		;;
119769408Sache	we32k)
119869408Sache		basic_machine=we32k-att
119969408Sache		;;
1200195609Smp	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1201100616Smp		basic_machine=sh-unknown
1202100616Smp		;;
1203195609Smp	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
120469408Sache		basic_machine=sparc-sun
120569408Sache		;;
1206195609Smp	cydra)
120769408Sache		basic_machine=cydra-cydrome
120869408Sache		;;
120969408Sache	orion)
121069408Sache		basic_machine=orion-highlevel
121169408Sache		;;
121269408Sache	orion105)
121369408Sache		basic_machine=clipper-highlevel
121469408Sache		;;
121583098Smp	mac | mpw | mac-mpw)
121683098Smp		basic_machine=m68k-apple
121783098Smp		;;
121883098Smp	pmac | pmac-mpw)
121983098Smp		basic_machine=powerpc-apple
122083098Smp		;;
1221100616Smp	*-unknown)
1222100616Smp		# Make sure to match an already-canonicalized machine name.
1223100616Smp		;;
122469408Sache	*)
122569408Sache		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
122669408Sache		exit 1
122769408Sache		;;
122869408Sacheesac
122969408Sache
123069408Sache# Here we canonicalize certain aliases for manufacturers.
123169408Sachecase $basic_machine in
123269408Sache	*-digital*)
123369408Sache		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
123469408Sache		;;
123569408Sache	*-commodore*)
123669408Sache		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
123769408Sache		;;
123869408Sache	*)
123969408Sache		;;
124069408Sacheesac
124169408Sache
124269408Sache# Decode manufacturer-specific aliases for certain operating systems.
124369408Sache
124469408Sacheif [ x"$os" != x"" ]
124569408Sachethen
124669408Sachecase $os in
124769408Sache        # First match some system type aliases
124869408Sache        # that might get confused with valid system types.
124969408Sache	# -solaris* is a basic system type, with this one exception.
125069408Sache	-solaris1 | -solaris1.*)
125169408Sache		os=`echo $os | sed -e 's|solaris1|sunos4|'`
125269408Sache		;;
125369408Sache	-solaris)
125469408Sache		os=-solaris2
125569408Sache		;;
125669408Sache	-svr4*)
125769408Sache		os=-sysv4
125869408Sache		;;
125969408Sache	-unixware*)
126069408Sache		os=-sysv4.2uw
126169408Sache		;;
126269408Sache	-gnu/linux*)
126369408Sache		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
126469408Sache		;;
126569408Sache	# First accept the basic system types.
126669408Sache	# The portable systems comes first.
126769408Sache	# Each alternative MUST END IN A *, to match a version number.
126869408Sache	# -sysv* is not here because it comes later, after sysvr4.
126969408Sache	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1270195609Smp	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
127169408Sache	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1272195609Smp	      | -kopensolaris* \
127369408Sache	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1274195609Smp	      | -aos* | -aros* \
127569408Sache	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
127669408Sache	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1277195609Smp	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1278195609Smp	      | -openbsd* | -solidbsd* \
1279195609Smp	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1280195609Smp	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
128169408Sache	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
128269408Sache	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1283195609Smp	      | -chorusos* | -chorusrdb* | -cegcc* \
128469408Sache	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1285195609Smp	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1286195609Smp	      | -uxpv* | -beos* | -mpeix* | -udk* \
1287195609Smp	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1288100616Smp	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1289100616Smp	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1290100616Smp	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1291195609Smp	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1292195609Smp	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1293195609Smp	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
129469408Sache	# Remember, each alternative MUST END IN *, to match a version number.
129569408Sache		;;
1296100616Smp	-qnx*)
1297100616Smp		case $basic_machine in
1298100616Smp		    x86-* | i*86-*)
1299100616Smp			;;
1300100616Smp		    *)
1301100616Smp			os=-nto$os
1302100616Smp			;;
1303100616Smp		esac
1304100616Smp		;;
1305195609Smp	-nto-qnx*)
1306195609Smp		;;
1307100616Smp	-nto*)
1308195609Smp		os=`echo $os | sed -e 's|nto|nto-qnx|'`
1309100616Smp		;;
131083098Smp	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1311195609Smp	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1312100616Smp	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
131383098Smp		;;
131483098Smp	-mac*)
131583098Smp		os=`echo $os | sed -e 's|mac|macos|'`
131683098Smp		;;
1317195609Smp	-linux-dietlibc)
1318195609Smp		os=-linux-dietlibc
1319195609Smp		;;
132069408Sache	-linux*)
132169408Sache		os=`echo $os | sed -e 's|linux|linux-gnu|'`
132269408Sache		;;
132369408Sache	-sunos5*)
132469408Sache		os=`echo $os | sed -e 's|sunos5|solaris2|'`
132569408Sache		;;
132669408Sache	-sunos6*)
132769408Sache		os=`echo $os | sed -e 's|sunos6|solaris3|'`
132869408Sache		;;
132983098Smp	-opened*)
133083098Smp		os=-openedition
133183098Smp		;;
1332195609Smp        -os400*)
1333195609Smp		os=-os400
1334195609Smp		;;
1335100616Smp	-wince*)
1336100616Smp		os=-wince
1337100616Smp		;;
133869408Sache	-osfrose*)
133969408Sache		os=-osfrose
134069408Sache		;;
134169408Sache	-osf*)
134269408Sache		os=-osf
134369408Sache		;;
134469408Sache	-utek*)
134569408Sache		os=-bsd
134669408Sache		;;
134769408Sache	-dynix*)
134869408Sache		os=-bsd
134969408Sache		;;
135069408Sache	-acis*)
135169408Sache		os=-aos
135269408Sache		;;
1353100616Smp	-atheos*)
1354100616Smp		os=-atheos
1355100616Smp		;;
1356195609Smp	-syllable*)
1357195609Smp		os=-syllable
1358195609Smp		;;
135983098Smp	-386bsd)
136083098Smp		os=-bsd
136183098Smp		;;
136269408Sache	-ctix* | -uts*)
136369408Sache		os=-sysv
136469408Sache		;;
1365100616Smp	-nova*)
1366100616Smp		os=-rtmk-nova
1367100616Smp		;;
136869408Sache	-ns2 )
1369195609Smp		os=-nextstep2
137069408Sache		;;
1371100616Smp	-nsk*)
1372100616Smp		os=-nsk
1373100616Smp		;;
137469408Sache	# Preserve the version number of sinix5.
137569408Sache	-sinix5.*)
137669408Sache		os=`echo $os | sed -e 's|sinix|sysv|'`
137769408Sache		;;
137869408Sache	-sinix*)
137969408Sache		os=-sysv4
138069408Sache		;;
1381195609Smp        -tpf*)
1382195609Smp		os=-tpf
1383195609Smp		;;
138469408Sache	-triton*)
138569408Sache		os=-sysv3
138669408Sache		;;
138769408Sache	-oss*)
138869408Sache		os=-sysv3
138969408Sache		;;
139069408Sache	-svr4)
139169408Sache		os=-sysv4
139269408Sache		;;
139369408Sache	-svr3)
139469408Sache		os=-sysv3
139569408Sache		;;
139669408Sache	-sysvr4)
139769408Sache		os=-sysv4
139869408Sache		;;
139969408Sache	# This must come after -sysvr4.
140069408Sache	-sysv*)
140169408Sache		;;
140283098Smp	-ose*)
140383098Smp		os=-ose
140483098Smp		;;
140583098Smp	-es1800*)
140683098Smp		os=-ose
140783098Smp		;;
140869408Sache	-xenix)
140969408Sache		os=-xenix
141069408Sache		;;
1411195609Smp	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1412195609Smp		os=-mint
141369408Sache		;;
1414195609Smp	-aros*)
1415195609Smp		os=-aros
1416195609Smp		;;
1417195609Smp	-kaos*)
1418195609Smp		os=-kaos
1419195609Smp		;;
1420195609Smp	-zvmoe)
1421195609Smp		os=-zvmoe
1422195609Smp		;;
1423195609Smp	-dicos*)
1424195609Smp		os=-dicos
1425195609Smp		;;
142669408Sache	-none)
142769408Sache		;;
142869408Sache	*)
142969408Sache		# Get rid of the `-' at the beginning of $os.
143069408Sache		os=`echo $os | sed 's/[^-]*-//'`
143169408Sache		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
143269408Sache		exit 1
143369408Sache		;;
143469408Sacheesac
143569408Sacheelse
143669408Sache
143769408Sache# Here we handle the default operating systems that come with various machines.
143869408Sache# The value should be what the vendor currently ships out the door with their
143969408Sache# machine or put another way, the most popular os provided with the machine.
144069408Sache
144169408Sache# Note that if you're going to try to match "-MANUFACTURER" here (say,
144269408Sache# "-sun"), then you have to tell the case statement up towards the top
144369408Sache# that MANUFACTURER isn't an operating system.  Otherwise, code above
144469408Sache# will signal an error saying that MANUFACTURER isn't an operating
144569408Sache# system, and we'll never get to this point.
144669408Sache
144769408Sachecase $basic_machine in
1448195609Smp        score-*)
1449195609Smp		os=-elf
1450195609Smp		;;
1451195609Smp        spu-*)
1452195609Smp		os=-elf
1453195609Smp		;;
145469408Sache	*-acorn)
145569408Sache		os=-riscix1.2
145669408Sache		;;
145783098Smp	arm*-rebel)
145883098Smp		os=-linux
145983098Smp		;;
146069408Sache	arm*-semi)
146169408Sache		os=-aout
146269408Sache		;;
1463195609Smp        c4x-* | tic4x-*)
1464195609Smp        	os=-coff
1465195609Smp		;;
1466100616Smp	# This must come before the *-dec entry.
1467100616Smp	pdp10-*)
1468100616Smp		os=-tops20
1469100616Smp		;;
1470195609Smp	pdp11-*)
147169408Sache		os=-none
147269408Sache		;;
147369408Sache	*-dec | vax-*)
147469408Sache		os=-ultrix4.2
147569408Sache		;;
147669408Sache	m68*-apollo)
147769408Sache		os=-domain
147869408Sache		;;
147969408Sache	i386-sun)
148069408Sache		os=-sunos4.0.2
148169408Sache		;;
148269408Sache	m68000-sun)
148369408Sache		os=-sunos3
148469408Sache		# This also exists in the configure program, but was not the
148569408Sache		# default.
148669408Sache		# os=-sunos4
148769408Sache		;;
148883098Smp	m68*-cisco)
148983098Smp		os=-aout
149083098Smp		;;
1491195609Smp        mep-*)
1492195609Smp		os=-elf
1493195609Smp		;;
149483098Smp	mips*-cisco)
149583098Smp		os=-elf
149683098Smp		;;
149783098Smp	mips*-*)
149883098Smp		os=-elf
149983098Smp		;;
1500100616Smp	or32-*)
1501100616Smp		os=-coff
1502100616Smp		;;
150369408Sache	*-tti)	# must be before sparc entry or we get the wrong os.
150469408Sache		os=-sysv3
150569408Sache		;;
150669408Sache	sparc-* | *-sun)
150769408Sache		os=-sunos4.1.1
150869408Sache		;;
150969408Sache	*-be)
151069408Sache		os=-beos
151169408Sache		;;
1512195609Smp	*-haiku)
1513195609Smp		os=-haiku
1514195609Smp		;;
151569408Sache	*-ibm)
151669408Sache		os=-aix
151769408Sache		;;
1518195609Smp    	*-knuth)
1519195609Smp		os=-mmixware
1520195609Smp		;;
152183098Smp	*-wec)
152283098Smp		os=-proelf
152383098Smp		;;
152483098Smp	*-winbond)
152583098Smp		os=-proelf
152683098Smp		;;
152783098Smp	*-oki)
152883098Smp		os=-proelf
152983098Smp		;;
153069408Sache	*-hp)
153169408Sache		os=-hpux
153269408Sache		;;
153369408Sache	*-hitachi)
153469408Sache		os=-hiux
153569408Sache		;;
153669408Sache	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
153769408Sache		os=-sysv
153869408Sache		;;
153969408Sache	*-cbm)
154069408Sache		os=-amigaos
154169408Sache		;;
154269408Sache	*-dg)
154369408Sache		os=-dgux
154469408Sache		;;
154569408Sache	*-dolphin)
154669408Sache		os=-sysv3
154769408Sache		;;
154869408Sache	m68k-ccur)
154969408Sache		os=-rtu
155069408Sache		;;
155169408Sache	m88k-omron*)
155269408Sache		os=-luna
155369408Sache		;;
155469408Sache	*-next )
155569408Sache		os=-nextstep
155669408Sache		;;
155769408Sache	*-sequent)
155869408Sache		os=-ptx
155969408Sache		;;
156069408Sache	*-crds)
156169408Sache		os=-unos
156269408Sache		;;
156369408Sache	*-ns)
156469408Sache		os=-genix
156569408Sache		;;
156669408Sache	i370-*)
156769408Sache		os=-mvs
156869408Sache		;;
156969408Sache	*-next)
157069408Sache		os=-nextstep3
157169408Sache		;;
1572195609Smp	*-gould)
157369408Sache		os=-sysv
157469408Sache		;;
1575195609Smp	*-highlevel)
157669408Sache		os=-bsd
157769408Sache		;;
157869408Sache	*-encore)
157969408Sache		os=-bsd
158069408Sache		;;
1581195609Smp	*-sgi)
158269408Sache		os=-irix
158369408Sache		;;
1584195609Smp	*-siemens)
158569408Sache		os=-sysv4
158669408Sache		;;
158769408Sache	*-masscomp)
158869408Sache		os=-rtu
158969408Sache		;;
1590100616Smp	f30[01]-fujitsu | f700-fujitsu)
159169408Sache		os=-uxpv
159269408Sache		;;
159383098Smp	*-rom68k)
159483098Smp		os=-coff
159583098Smp		;;
159683098Smp	*-*bug)
159783098Smp		os=-coff
159883098Smp		;;
159983098Smp	*-apple)
160083098Smp		os=-macos
160183098Smp		;;
160283098Smp	*-atari*)
160383098Smp		os=-mint
160483098Smp		;;
160569408Sache	*)
160669408Sache		os=-none
160769408Sache		;;
160869408Sacheesac
160969408Sachefi
161069408Sache
161169408Sache# Here we handle the case where we know the os, and the CPU type, but not the
161269408Sache# manufacturer.  We pick the logical manufacturer.
161369408Sachevendor=unknown
161469408Sachecase $basic_machine in
161569408Sache	*-unknown)
161669408Sache		case $os in
161769408Sache			-riscix*)
161869408Sache				vendor=acorn
161969408Sache				;;
162069408Sache			-sunos*)
162169408Sache				vendor=sun
162269408Sache				;;
1623195609Smp			-cnk*|-aix*)
162469408Sache				vendor=ibm
162569408Sache				;;
162683098Smp			-beos*)
162783098Smp				vendor=be
162883098Smp				;;
162969408Sache			-hpux*)
163069408Sache				vendor=hp
163169408Sache				;;
163283098Smp			-mpeix*)
163383098Smp				vendor=hp
163483098Smp				;;
163569408Sache			-hiux*)
163669408Sache				vendor=hitachi
163769408Sache				;;
163869408Sache			-unos*)
163969408Sache				vendor=crds
164069408Sache				;;
164169408Sache			-dgux*)
164269408Sache				vendor=dg
164369408Sache				;;
164469408Sache			-luna*)
164569408Sache				vendor=omron
164669408Sache				;;
164769408Sache			-genix*)
164869408Sache				vendor=ns
164969408Sache				;;
165083098Smp			-mvs* | -opened*)
165169408Sache				vendor=ibm
165269408Sache				;;
1653195609Smp			-os400*)
1654195609Smp				vendor=ibm
1655195609Smp				;;
165669408Sache			-ptx*)
165769408Sache				vendor=sequent
165869408Sache				;;
1659195609Smp			-tpf*)
1660195609Smp				vendor=ibm
1661195609Smp				;;
1662100616Smp			-vxsim* | -vxworks* | -windiss*)
166369408Sache				vendor=wrs
166469408Sache				;;
166569408Sache			-aux*)
166669408Sache				vendor=apple
166769408Sache				;;
166883098Smp			-hms*)
166983098Smp				vendor=hitachi
167083098Smp				;;
167183098Smp			-mpw* | -macos*)
167283098Smp				vendor=apple
167383098Smp				;;
1674100616Smp			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
167583098Smp				vendor=atari
167683098Smp				;;
1677100616Smp			-vos*)
1678100616Smp				vendor=stratus
1679100616Smp				;;
168069408Sache		esac
168169408Sache		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
168269408Sache		;;
168369408Sacheesac
168469408Sache
168569408Sacheecho $basic_machine$os
1686195609Smpexit
1687100616Smp
1688100616Smp# Local variables:
1689100616Smp# eval: (add-hook 'write-file-hooks 'time-stamp)
1690100616Smp# time-stamp-start: "timestamp='"
1691100616Smp# time-stamp-format: "%:y-%02m-%02d"
1692100616Smp# time-stamp-end: "'"
1693100616Smp# End:
1694