config.sub revision 86dafe34
176888252Smrg#! /bin/sh
276888252Smrg# Configuration validation subroutine script.
376888252Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
41ae1b5e8Smrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
51ae1b5e8Smrg#   Free Software Foundation, Inc.
676888252Smrg
786dafe34Smrgtimestamp='2008-09-08'
876888252Smrg
976888252Smrg# This file is (in principle) common to ALL GNU software.
1076888252Smrg# The presence of a machine in this file suggests that SOME GNU software
1176888252Smrg# can handle that machine.  It does not imply ALL GNU software can.
1276888252Smrg#
1376888252Smrg# This file is free software; you can redistribute it and/or modify
1476888252Smrg# it under the terms of the GNU General Public License as published by
1576888252Smrg# the Free Software Foundation; either version 2 of the License, or
1676888252Smrg# (at your option) any later version.
1776888252Smrg#
1876888252Smrg# This program is distributed in the hope that it will be useful,
1976888252Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2076888252Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2176888252Smrg# GNU General Public License for more details.
2276888252Smrg#
2376888252Smrg# You should have received a copy of the GNU General Public License
2476888252Smrg# along with this program; if not, write to the Free Software
251ae1b5e8Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
261ae1b5e8Smrg# 02110-1301, USA.
271ae1b5e8Smrg#
2876888252Smrg# As a special exception to the GNU General Public License, if you
2976888252Smrg# distribute this file as part of a program that contains a
3076888252Smrg# configuration script generated by Autoconf, you may include it under
3176888252Smrg# the same distribution terms that you use for the rest of that program.
3276888252Smrg
331ae1b5e8Smrg
3476888252Smrg# Please send patches to <config-patches@gnu.org>.  Submit a context
3576888252Smrg# diff and a properly formatted ChangeLog entry.
3676888252Smrg#
3776888252Smrg# Configuration subroutine to validate and canonicalize a configuration type.
3876888252Smrg# Supply the specified configuration type as an argument.
3976888252Smrg# If it is invalid, we print an error message on stderr and exit with code 1.
4076888252Smrg# Otherwise, we print the canonical config type on stdout and succeed.
4176888252Smrg
4276888252Smrg# This file is supposed to be the same for all GNU packages
4376888252Smrg# and recognize all the CPU types, system types and aliases
4476888252Smrg# that are meaningful with *any* GNU software.
4576888252Smrg# Each package is responsible for reporting which valid configurations
4676888252Smrg# it does not support.  The user should be able to distinguish
4776888252Smrg# a failure to support a valid configuration from a meaningless
4876888252Smrg# configuration.
4976888252Smrg
5076888252Smrg# The goal of this file is to map all the various variations of a given
5176888252Smrg# machine specification into a single specification in the form:
5276888252Smrg#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
5376888252Smrg# or in some cases, the newer four-part form:
5476888252Smrg#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
5576888252Smrg# It is wrong to echo any other type of specification.
5676888252Smrg
5776888252Smrgme=`echo "$0" | sed -e 's,.*/,,'`
5876888252Smrg
5976888252Smrgusage="\
6076888252SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS
6176888252Smrg       $0 [OPTION] ALIAS
6276888252Smrg
6376888252SmrgCanonicalize a configuration name.
6476888252Smrg
6576888252SmrgOperation modes:
6676888252Smrg  -h, --help         print this help, then exit
6776888252Smrg  -t, --time-stamp   print date of last modification, then exit
6876888252Smrg  -v, --version      print version number, then exit
6976888252Smrg
7076888252SmrgReport bugs and patches to <config-patches@gnu.org>."
7176888252Smrg
7276888252Smrgversion="\
7376888252SmrgGNU config.sub ($timestamp)
7476888252Smrg
751ae1b5e8SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
761ae1b5e8Smrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
7776888252Smrg
7876888252SmrgThis is free software; see the source for copying conditions.  There is NO
7976888252Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
8076888252Smrg
8176888252Smrghelp="
8276888252SmrgTry \`$me --help' for more information."
8376888252Smrg
8476888252Smrg# Parse command line
8576888252Smrgwhile test $# -gt 0 ; do
8676888252Smrg  case $1 in
8776888252Smrg    --time-stamp | --time* | -t )
881ae1b5e8Smrg       echo "$timestamp" ; exit ;;
8976888252Smrg    --version | -v )
901ae1b5e8Smrg       echo "$version" ; exit ;;
9176888252Smrg    --help | --h* | -h )
921ae1b5e8Smrg       echo "$usage"; exit ;;
9376888252Smrg    -- )     # Stop option processing
9476888252Smrg       shift; break ;;
9576888252Smrg    - )	# Use stdin as input.
9676888252Smrg       break ;;
9776888252Smrg    -* )
9876888252Smrg       echo "$me: invalid option $1$help"
9976888252Smrg       exit 1 ;;
10076888252Smrg
10176888252Smrg    *local*)
10276888252Smrg       # First pass through any local machine types.
10376888252Smrg       echo $1
1041ae1b5e8Smrg       exit ;;
10576888252Smrg
10676888252Smrg    * )
10776888252Smrg       break ;;
10876888252Smrg  esac
10976888252Smrgdone
11076888252Smrg
11176888252Smrgcase $# in
11276888252Smrg 0) echo "$me: missing argument$help" >&2
11376888252Smrg    exit 1;;
11476888252Smrg 1) ;;
11576888252Smrg *) echo "$me: too many arguments$help" >&2
11676888252Smrg    exit 1;;
11776888252Smrgesac
11876888252Smrg
11976888252Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
12076888252Smrg# Here we must recognize all the valid KERNEL-OS combinations.
12176888252Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
12276888252Smrgcase $maybe_os in
1231ae1b5e8Smrg  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
1241ae1b5e8Smrg  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
1251ae1b5e8Smrg  storm-chaos* | os2-emx* | rtmk-nova*)
12676888252Smrg    os=-$maybe_os
12776888252Smrg    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
12876888252Smrg    ;;
12976888252Smrg  *)
13076888252Smrg    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
13176888252Smrg    if [ $basic_machine != $1 ]
13276888252Smrg    then os=`echo $1 | sed 's/.*-/-/'`
13376888252Smrg    else os=; fi
13476888252Smrg    ;;
13576888252Smrgesac
13676888252Smrg
13776888252Smrg### Let's recognize common machines as not being operating systems so
13876888252Smrg### that things like config.sub decstation-3100 work.  We also
13976888252Smrg### recognize some manufacturers as not being operating systems, so we
14076888252Smrg### can provide default operating systems below.
14176888252Smrgcase $os in
14276888252Smrg	-sun*os*)
14376888252Smrg		# Prevent following clause from handling this invalid input.
14476888252Smrg		;;
14576888252Smrg	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
14676888252Smrg	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
14776888252Smrg	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
14876888252Smrg	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
14976888252Smrg	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
15076888252Smrg	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
1511ae1b5e8Smrg	-apple | -axis | -knuth | -cray)
15276888252Smrg		os=
15376888252Smrg		basic_machine=$1
15476888252Smrg		;;
15576888252Smrg	-sim | -cisco | -oki | -wec | -winbond)
15676888252Smrg		os=
15776888252Smrg		basic_machine=$1
15876888252Smrg		;;
15976888252Smrg	-scout)
16076888252Smrg		;;
16176888252Smrg	-wrs)
16276888252Smrg		os=-vxworks
16376888252Smrg		basic_machine=$1
16476888252Smrg		;;
16576888252Smrg	-chorusos*)
16676888252Smrg		os=-chorusos
16776888252Smrg		basic_machine=$1
16876888252Smrg		;;
16976888252Smrg 	-chorusrdb)
17076888252Smrg 		os=-chorusrdb
17176888252Smrg		basic_machine=$1
17276888252Smrg 		;;
17376888252Smrg	-hiux*)
17476888252Smrg		os=-hiuxwe2
17576888252Smrg		;;
1761ae1b5e8Smrg	-sco6)
1771ae1b5e8Smrg		os=-sco5v6
1781ae1b5e8Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1791ae1b5e8Smrg		;;
18076888252Smrg	-sco5)
18176888252Smrg		os=-sco3.2v5
18276888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
18376888252Smrg		;;
18476888252Smrg	-sco4)
18576888252Smrg		os=-sco3.2v4
18676888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
18776888252Smrg		;;
18876888252Smrg	-sco3.2.[4-9]*)
18976888252Smrg		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
19076888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19176888252Smrg		;;
19276888252Smrg	-sco3.2v[4-9]*)
19376888252Smrg		# Don't forget version if it is 3.2v4 or newer.
19476888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19576888252Smrg		;;
1961ae1b5e8Smrg	-sco5v6*)
1971ae1b5e8Smrg		# Don't forget version if it is 3.2v4 or newer.
1981ae1b5e8Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1991ae1b5e8Smrg		;;
20076888252Smrg	-sco*)
20176888252Smrg		os=-sco3.2v2
20276888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
20376888252Smrg		;;
20476888252Smrg	-udk*)
20576888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
20676888252Smrg		;;
20776888252Smrg	-isc)
20876888252Smrg		os=-isc2.2
20976888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
21076888252Smrg		;;
21176888252Smrg	-clix*)
21276888252Smrg		basic_machine=clipper-intergraph
21376888252Smrg		;;
21476888252Smrg	-isc*)
21576888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
21676888252Smrg		;;
21776888252Smrg	-lynx*)
21876888252Smrg		os=-lynxos
21976888252Smrg		;;
22076888252Smrg	-ptx*)
22176888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
22276888252Smrg		;;
22376888252Smrg	-windowsnt*)
22476888252Smrg		os=`echo $os | sed -e 's/windowsnt/winnt/'`
22576888252Smrg		;;
22676888252Smrg	-psos*)
22776888252Smrg		os=-psos
22876888252Smrg		;;
22976888252Smrg	-mint | -mint[0-9]*)
23076888252Smrg		basic_machine=m68k-atari
23176888252Smrg		os=-mint
23276888252Smrg		;;
23376888252Smrgesac
23476888252Smrg
23576888252Smrg# Decode aliases for certain CPU-COMPANY combinations.
23676888252Smrgcase $basic_machine in
23776888252Smrg	# Recognize the basic CPU types without company name.
23876888252Smrg	# Some are omitted here because they have special meanings below.
23976888252Smrg	1750a | 580 \
24076888252Smrg	| a29k \
24176888252Smrg	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
24276888252Smrg	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
2431ae1b5e8Smrg	| am33_2.0 \
2441ae1b5e8Smrg	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
2451ae1b5e8Smrg	| bfin \
24676888252Smrg	| c4x | clipper \
24776888252Smrg	| d10v | d30v | dlx | dsp16xx \
2481ae1b5e8Smrg	| fido | fr30 | frv \
24976888252Smrg	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
25076888252Smrg	| i370 | i860 | i960 | ia64 \
2511ae1b5e8Smrg	| ip2k | iq2000 \
2521ae1b5e8Smrg	| m32c | m32r | m32rle | m68000 | m68k | m88k \
2531ae1b5e8Smrg	| maxq | mb | microblaze | mcore | mep | metag \
25476888252Smrg	| mips | mipsbe | mipseb | mipsel | mipsle \
25576888252Smrg	| mips16 \
25676888252Smrg	| mips64 | mips64el \
2571ae1b5e8Smrg	| mips64octeon | mips64octeonel \
25876888252Smrg	| mips64orion | mips64orionel \
2591ae1b5e8Smrg	| mips64r5900 | mips64r5900el \
2601ae1b5e8Smrg	| mips64vr | mips64vrel \
26176888252Smrg	| mips64vr4100 | mips64vr4100el \
26276888252Smrg	| mips64vr4300 | mips64vr4300el \
26376888252Smrg	| mips64vr5000 | mips64vr5000el \
2641ae1b5e8Smrg	| mips64vr5900 | mips64vr5900el \
26576888252Smrg	| mipsisa32 | mipsisa32el \
26676888252Smrg	| mipsisa32r2 | mipsisa32r2el \
26776888252Smrg	| mipsisa64 | mipsisa64el \
2681ae1b5e8Smrg	| mipsisa64r2 | mipsisa64r2el \
26976888252Smrg	| mipsisa64sb1 | mipsisa64sb1el \
27076888252Smrg	| mipsisa64sr71k | mipsisa64sr71kel \
27176888252Smrg	| mipstx39 | mipstx39el \
27276888252Smrg	| mn10200 | mn10300 \
2731ae1b5e8Smrg	| mt \
27476888252Smrg	| msp430 \
2751ae1b5e8Smrg	| nios | nios2 \
27676888252Smrg	| ns16k | ns32k \
2771ae1b5e8Smrg	| or32 \
27876888252Smrg	| pdp10 | pdp11 | pj | pjl \
27976888252Smrg	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
28076888252Smrg	| pyramid \
2811ae1b5e8Smrg	| score \
28286dafe34Smrg	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
28376888252Smrg	| sh64 | sh64le \
2841ae1b5e8Smrg	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
2851ae1b5e8Smrg	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
2861ae1b5e8Smrg	| spu | strongarm \
28776888252Smrg	| tahoe | thumb | tic4x | tic80 | tron \
28876888252Smrg	| v850 | v850e \
28976888252Smrg	| we32k \
2901ae1b5e8Smrg	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
2911ae1b5e8Smrg	| z8k | z80)
29276888252Smrg		basic_machine=$basic_machine-unknown
29376888252Smrg		;;
29476888252Smrg	m6811 | m68hc11 | m6812 | m68hc12)
29576888252Smrg		# Motorola 68HC11/12.
29676888252Smrg		basic_machine=$basic_machine-unknown
29776888252Smrg		os=-none
29876888252Smrg		;;
29976888252Smrg	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
30076888252Smrg		;;
3011ae1b5e8Smrg	ms1)
3021ae1b5e8Smrg		basic_machine=mt-unknown
3031ae1b5e8Smrg		;;
30476888252Smrg
30576888252Smrg	# We use `pc' rather than `unknown'
30676888252Smrg	# because (1) that's what they normally are, and
30776888252Smrg	# (2) the word "unknown" tends to confuse beginning users.
30876888252Smrg	i*86 | x86_64)
30976888252Smrg	  basic_machine=$basic_machine-pc
31076888252Smrg	  ;;
31176888252Smrg	# Object if more than one company name word.
31276888252Smrg	*-*-*)
31376888252Smrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
31476888252Smrg		exit 1
31576888252Smrg		;;
31676888252Smrg	# Recognize the basic CPU types with company name.
31776888252Smrg	580-* \
31876888252Smrg	| a29k-* \
31976888252Smrg	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
32076888252Smrg	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
32176888252Smrg	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
32276888252Smrg	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
3231ae1b5e8Smrg	| avr-* | avr32-* \
3241ae1b5e8Smrg	| bfin-* | bs2000-* \
32576888252Smrg	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
3261ae1b5e8Smrg	| clipper-* | craynv-* | cydra-* \
32776888252Smrg	| d10v-* | d30v-* | dlx-* \
32876888252Smrg	| elxsi-* \
3291ae1b5e8Smrg	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
33076888252Smrg	| h8300-* | h8500-* \
33176888252Smrg	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
33276888252Smrg	| i*86-* | i860-* | i960-* | ia64-* \
3331ae1b5e8Smrg	| ip2k-* | iq2000-* \
3341ae1b5e8Smrg	| m32c-* | m32r-* | m32rle-* \
33576888252Smrg	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
3361ae1b5e8Smrg	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
33776888252Smrg	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
33876888252Smrg	| mips16-* \
33976888252Smrg	| mips64-* | mips64el-* \
3401ae1b5e8Smrg	| mips64octeon-* | mips64octeonel-* \
34176888252Smrg	| mips64orion-* | mips64orionel-* \
3421ae1b5e8Smrg	| mips64r5900-* | mips64r5900el-* \
3431ae1b5e8Smrg	| mips64vr-* | mips64vrel-* \
34476888252Smrg	| mips64vr4100-* | mips64vr4100el-* \
34576888252Smrg	| mips64vr4300-* | mips64vr4300el-* \
34676888252Smrg	| mips64vr5000-* | mips64vr5000el-* \
3471ae1b5e8Smrg	| mips64vr5900-* | mips64vr5900el-* \
34876888252Smrg	| mipsisa32-* | mipsisa32el-* \
34976888252Smrg	| mipsisa32r2-* | mipsisa32r2el-* \
35076888252Smrg	| mipsisa64-* | mipsisa64el-* \
3511ae1b5e8Smrg	| mipsisa64r2-* | mipsisa64r2el-* \
35276888252Smrg	| mipsisa64sb1-* | mipsisa64sb1el-* \
35376888252Smrg	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
35476888252Smrg	| mipstx39-* | mipstx39el-* \
3551ae1b5e8Smrg	| mmix-* \
3561ae1b5e8Smrg	| mt-* \
35776888252Smrg	| msp430-* \
3581ae1b5e8Smrg	| nios-* | nios2-* \
3591ae1b5e8Smrg	| none-* | np1-* | ns16k-* | ns32k-* \
36076888252Smrg	| orion-* \
36176888252Smrg	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
36276888252Smrg	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
36376888252Smrg	| pyramid-* \
36476888252Smrg	| romp-* | rs6000-* \
36586dafe34Smrg	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
36676888252Smrg	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
3671ae1b5e8Smrg	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
3681ae1b5e8Smrg	| sparclite-* \
3691ae1b5e8Smrg	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
37076888252Smrg	| tahoe-* | thumb-* \
3711ae1b5e8Smrg	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
37276888252Smrg	| tron-* \
37376888252Smrg	| v850-* | v850e-* | vax-* \
37476888252Smrg	| we32k-* \
3751ae1b5e8Smrg	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
3761ae1b5e8Smrg	| xstormy16-* | xtensa*-* \
37776888252Smrg	| ymp-* \
3781ae1b5e8Smrg	| z8k-* | z80-*)
3791ae1b5e8Smrg		;;
3801ae1b5e8Smrg	# Recognize the basic CPU types without company name, with glob match.
3811ae1b5e8Smrg	xtensa*)
3821ae1b5e8Smrg		basic_machine=$basic_machine-unknown
38376888252Smrg		;;
38476888252Smrg	# Recognize the various machine names and aliases which stand
38576888252Smrg	# for a CPU type and a company and sometimes even an OS.
38676888252Smrg	386bsd)
38776888252Smrg		basic_machine=i386-unknown
38876888252Smrg		os=-bsd
38976888252Smrg		;;
39076888252Smrg	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
39176888252Smrg		basic_machine=m68000-att
39276888252Smrg		;;
39376888252Smrg	3b*)
39476888252Smrg		basic_machine=we32k-att
39576888252Smrg		;;
39676888252Smrg	a29khif)
39776888252Smrg		basic_machine=a29k-amd
39876888252Smrg		os=-udi
39976888252Smrg		;;
4001ae1b5e8Smrg    	abacus)
4011ae1b5e8Smrg		basic_machine=abacus-unknown
4021ae1b5e8Smrg		;;
40376888252Smrg	adobe68k)
40476888252Smrg		basic_machine=m68010-adobe
40576888252Smrg		os=-scout
40676888252Smrg		;;
40776888252Smrg	alliant | fx80)
40876888252Smrg		basic_machine=fx80-alliant
40976888252Smrg		;;
41076888252Smrg	altos | altos3068)
41176888252Smrg		basic_machine=m68k-altos
41276888252Smrg		;;
41376888252Smrg	am29k)
41476888252Smrg		basic_machine=a29k-none
41576888252Smrg		os=-bsd
41676888252Smrg		;;
41776888252Smrg	amd64)
41876888252Smrg		basic_machine=x86_64-pc
41976888252Smrg		;;
4201ae1b5e8Smrg	amd64-*)
4211ae1b5e8Smrg		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
4221ae1b5e8Smrg		;;
42376888252Smrg	amdahl)
42476888252Smrg		basic_machine=580-amdahl
42576888252Smrg		os=-sysv
42676888252Smrg		;;
42776888252Smrg	amiga | amiga-*)
42876888252Smrg		basic_machine=m68k-unknown
42976888252Smrg		;;
43076888252Smrg	amigaos | amigados)
43176888252Smrg		basic_machine=m68k-unknown
43276888252Smrg		os=-amigaos
43376888252Smrg		;;
43476888252Smrg	amigaunix | amix)
43576888252Smrg		basic_machine=m68k-unknown
43676888252Smrg		os=-sysv4
43776888252Smrg		;;
43876888252Smrg	apollo68)
43976888252Smrg		basic_machine=m68k-apollo
44076888252Smrg		os=-sysv
44176888252Smrg		;;
44276888252Smrg	apollo68bsd)
44376888252Smrg		basic_machine=m68k-apollo
44476888252Smrg		os=-bsd
44576888252Smrg		;;
44676888252Smrg	aux)
44776888252Smrg		basic_machine=m68k-apple
44876888252Smrg		os=-aux
44976888252Smrg		;;
45076888252Smrg	balance)
45176888252Smrg		basic_machine=ns32k-sequent
45276888252Smrg		os=-dynix
45376888252Smrg		;;
4541ae1b5e8Smrg	blackfin)
4551ae1b5e8Smrg		basic_machine=bfin-unknown
4561ae1b5e8Smrg		os=-linux
4571ae1b5e8Smrg		;;
4581ae1b5e8Smrg	blackfin-*)
4591ae1b5e8Smrg		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
4601ae1b5e8Smrg		os=-linux
4611ae1b5e8Smrg		;;
46276888252Smrg	c90)
46376888252Smrg		basic_machine=c90-cray
46476888252Smrg		os=-unicos
46576888252Smrg		;;
4661ae1b5e8Smrg        cegcc)
4671ae1b5e8Smrg		basic_machine=arm-unknown
4681ae1b5e8Smrg		os=-cegcc
4691ae1b5e8Smrg		;;
47076888252Smrg	convex-c1)
47176888252Smrg		basic_machine=c1-convex
47276888252Smrg		os=-bsd
47376888252Smrg		;;
47476888252Smrg	convex-c2)
47576888252Smrg		basic_machine=c2-convex
47676888252Smrg		os=-bsd
47776888252Smrg		;;
47876888252Smrg	convex-c32)
47976888252Smrg		basic_machine=c32-convex
48076888252Smrg		os=-bsd
48176888252Smrg		;;
48276888252Smrg	convex-c34)
48376888252Smrg		basic_machine=c34-convex
48476888252Smrg		os=-bsd
48576888252Smrg		;;
48676888252Smrg	convex-c38)
48776888252Smrg		basic_machine=c38-convex
48876888252Smrg		os=-bsd
48976888252Smrg		;;
49076888252Smrg	cray | j90)
49176888252Smrg		basic_machine=j90-cray
49276888252Smrg		os=-unicos
49376888252Smrg		;;
4941ae1b5e8Smrg	craynv)
4951ae1b5e8Smrg		basic_machine=craynv-cray
4961ae1b5e8Smrg		os=-unicosmp
4971ae1b5e8Smrg		;;
4981ae1b5e8Smrg	cr16)
4991ae1b5e8Smrg		basic_machine=cr16-unknown
5001ae1b5e8Smrg		os=-elf
5011ae1b5e8Smrg		;;
50276888252Smrg	crds | unos)
50376888252Smrg		basic_machine=m68k-crds
50476888252Smrg		;;
5051ae1b5e8Smrg	crisv32 | crisv32-* | etraxfs*)
5061ae1b5e8Smrg		basic_machine=crisv32-axis
5071ae1b5e8Smrg		;;
50876888252Smrg	cris | cris-* | etrax*)
50976888252Smrg		basic_machine=cris-axis
51076888252Smrg		;;
5111ae1b5e8Smrg	crx)
5121ae1b5e8Smrg		basic_machine=crx-unknown
5131ae1b5e8Smrg		os=-elf
5141ae1b5e8Smrg		;;
51576888252Smrg	da30 | da30-*)
51676888252Smrg		basic_machine=m68k-da30
51776888252Smrg		;;
51876888252Smrg	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
51976888252Smrg		basic_machine=mips-dec
52076888252Smrg		;;
52176888252Smrg	decsystem10* | dec10*)
52276888252Smrg		basic_machine=pdp10-dec
52376888252Smrg		os=-tops10
52476888252Smrg		;;
52576888252Smrg	decsystem20* | dec20*)
52676888252Smrg		basic_machine=pdp10-dec
52776888252Smrg		os=-tops20
52876888252Smrg		;;
52976888252Smrg	delta | 3300 | motorola-3300 | motorola-delta \
53076888252Smrg	      | 3300-motorola | delta-motorola)
53176888252Smrg		basic_machine=m68k-motorola
53276888252Smrg		;;
53376888252Smrg	delta88)
53476888252Smrg		basic_machine=m88k-motorola
53576888252Smrg		os=-sysv3
53676888252Smrg		;;
5371ae1b5e8Smrg	dicos)
5381ae1b5e8Smrg		basic_machine=i686-pc
5391ae1b5e8Smrg		os=-dicos
5401ae1b5e8Smrg		;;
5411ae1b5e8Smrg	djgpp)
5421ae1b5e8Smrg		basic_machine=i586-pc
5431ae1b5e8Smrg		os=-msdosdjgpp
5441ae1b5e8Smrg		;;
54576888252Smrg	dpx20 | dpx20-*)
54676888252Smrg		basic_machine=rs6000-bull
54776888252Smrg		os=-bosx
54876888252Smrg		;;
54976888252Smrg	dpx2* | dpx2*-bull)
55076888252Smrg		basic_machine=m68k-bull
55176888252Smrg		os=-sysv3
55276888252Smrg		;;
55376888252Smrg	ebmon29k)
55476888252Smrg		basic_machine=a29k-amd
55576888252Smrg		os=-ebmon
55676888252Smrg		;;
55776888252Smrg	elxsi)
55876888252Smrg		basic_machine=elxsi-elxsi
55976888252Smrg		os=-bsd
56076888252Smrg		;;
56176888252Smrg	encore | umax | mmax)
56276888252Smrg		basic_machine=ns32k-encore
56376888252Smrg		;;
56476888252Smrg	es1800 | OSE68k | ose68k | ose | OSE)
56576888252Smrg		basic_machine=m68k-ericsson
56676888252Smrg		os=-ose
56776888252Smrg		;;
56876888252Smrg	fx2800)
56976888252Smrg		basic_machine=i860-alliant
57076888252Smrg		;;
57176888252Smrg	genix)
57276888252Smrg		basic_machine=ns32k-ns
57376888252Smrg		;;
57476888252Smrg	gmicro)
57576888252Smrg		basic_machine=tron-gmicro
57676888252Smrg		os=-sysv
57776888252Smrg		;;
57876888252Smrg	go32)
57976888252Smrg		basic_machine=i386-pc
58076888252Smrg		os=-go32
58176888252Smrg		;;
58276888252Smrg	h3050r* | hiux*)
58376888252Smrg		basic_machine=hppa1.1-hitachi
58476888252Smrg		os=-hiuxwe2
58576888252Smrg		;;
58676888252Smrg	h8300hms)
58776888252Smrg		basic_machine=h8300-hitachi
58876888252Smrg		os=-hms
58976888252Smrg		;;
59076888252Smrg	h8300xray)
59176888252Smrg		basic_machine=h8300-hitachi
59276888252Smrg		os=-xray
59376888252Smrg		;;
59476888252Smrg	h8500hms)
59576888252Smrg		basic_machine=h8500-hitachi
59676888252Smrg		os=-hms
59776888252Smrg		;;
59876888252Smrg	harris)
59976888252Smrg		basic_machine=m88k-harris
60076888252Smrg		os=-sysv3
60176888252Smrg		;;
60276888252Smrg	hp300-*)
60376888252Smrg		basic_machine=m68k-hp
60476888252Smrg		;;
60576888252Smrg	hp300bsd)
60676888252Smrg		basic_machine=m68k-hp
60776888252Smrg		os=-bsd
60876888252Smrg		;;
60976888252Smrg	hp300hpux)
61076888252Smrg		basic_machine=m68k-hp
61176888252Smrg		os=-hpux
61276888252Smrg		;;
61376888252Smrg	hp3k9[0-9][0-9] | hp9[0-9][0-9])
61476888252Smrg		basic_machine=hppa1.0-hp
61576888252Smrg		;;
61676888252Smrg	hp9k2[0-9][0-9] | hp9k31[0-9])
61776888252Smrg		basic_machine=m68000-hp
61876888252Smrg		;;
61976888252Smrg	hp9k3[2-9][0-9])
62076888252Smrg		basic_machine=m68k-hp
62176888252Smrg		;;
62276888252Smrg	hp9k6[0-9][0-9] | hp6[0-9][0-9])
62376888252Smrg		basic_machine=hppa1.0-hp
62476888252Smrg		;;
62576888252Smrg	hp9k7[0-79][0-9] | hp7[0-79][0-9])
62676888252Smrg		basic_machine=hppa1.1-hp
62776888252Smrg		;;
62876888252Smrg	hp9k78[0-9] | hp78[0-9])
62976888252Smrg		# FIXME: really hppa2.0-hp
63076888252Smrg		basic_machine=hppa1.1-hp
63176888252Smrg		;;
63276888252Smrg	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
63376888252Smrg		# FIXME: really hppa2.0-hp
63476888252Smrg		basic_machine=hppa1.1-hp
63576888252Smrg		;;
63676888252Smrg	hp9k8[0-9][13679] | hp8[0-9][13679])
63776888252Smrg		basic_machine=hppa1.1-hp
63876888252Smrg		;;
63976888252Smrg	hp9k8[0-9][0-9] | hp8[0-9][0-9])
64076888252Smrg		basic_machine=hppa1.0-hp
64176888252Smrg		;;
64276888252Smrg	hppa-next)
64376888252Smrg		os=-nextstep3
64476888252Smrg		;;
64576888252Smrg	hppaosf)
64676888252Smrg		basic_machine=hppa1.1-hp
64776888252Smrg		os=-osf
64876888252Smrg		;;
64976888252Smrg	hppro)
65076888252Smrg		basic_machine=hppa1.1-hp
65176888252Smrg		os=-proelf
65276888252Smrg		;;
65376888252Smrg	i370-ibm* | ibm*)
65476888252Smrg		basic_machine=i370-ibm
65576888252Smrg		;;
65676888252Smrg# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
65776888252Smrg	i*86v32)
65876888252Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
65976888252Smrg		os=-sysv32
66076888252Smrg		;;
66176888252Smrg	i*86v4*)
66276888252Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
66376888252Smrg		os=-sysv4
66476888252Smrg		;;
66576888252Smrg	i*86v)
66676888252Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
66776888252Smrg		os=-sysv
66876888252Smrg		;;
66976888252Smrg	i*86sol2)
67076888252Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
67176888252Smrg		os=-solaris2
67276888252Smrg		;;
67376888252Smrg	i386mach)
67476888252Smrg		basic_machine=i386-mach
67576888252Smrg		os=-mach
67676888252Smrg		;;
67776888252Smrg	i386-vsta | vsta)
67876888252Smrg		basic_machine=i386-unknown
67976888252Smrg		os=-vsta
68076888252Smrg		;;
68176888252Smrg	iris | iris4d)
68276888252Smrg		basic_machine=mips-sgi
68376888252Smrg		case $os in
68476888252Smrg		    -irix*)
68576888252Smrg			;;
68676888252Smrg		    *)
68776888252Smrg			os=-irix4
68876888252Smrg			;;
68976888252Smrg		esac
69076888252Smrg		;;
69176888252Smrg	isi68 | isi)
69276888252Smrg		basic_machine=m68k-isi
69376888252Smrg		os=-sysv
69476888252Smrg		;;
6951ae1b5e8Smrg	m68knommu)
6961ae1b5e8Smrg		basic_machine=m68k-unknown
6971ae1b5e8Smrg		os=-linux
6981ae1b5e8Smrg		;;
6991ae1b5e8Smrg	m68knommu-*)
7001ae1b5e8Smrg		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
7011ae1b5e8Smrg		os=-linux
7021ae1b5e8Smrg		;;
70376888252Smrg	m88k-omron*)
70476888252Smrg		basic_machine=m88k-omron
70576888252Smrg		;;
70676888252Smrg	magnum | m3230)
70776888252Smrg		basic_machine=mips-mips
70876888252Smrg		os=-sysv
70976888252Smrg		;;
71076888252Smrg	merlin)
71176888252Smrg		basic_machine=ns32k-utek
71276888252Smrg		os=-sysv
71376888252Smrg		;;
71476888252Smrg	mingw32)
71576888252Smrg		basic_machine=i386-pc
71676888252Smrg		os=-mingw32
71776888252Smrg		;;
7181ae1b5e8Smrg	mingw32ce)
7191ae1b5e8Smrg		basic_machine=arm-unknown
7201ae1b5e8Smrg		os=-mingw32ce
7211ae1b5e8Smrg		;;
72276888252Smrg	miniframe)
72376888252Smrg		basic_machine=m68000-convergent
72476888252Smrg		;;
72576888252Smrg	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
72676888252Smrg		basic_machine=m68k-atari
72776888252Smrg		os=-mint
72876888252Smrg		;;
72976888252Smrg	mips3*-*)
73076888252Smrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
73176888252Smrg		;;
73276888252Smrg	mips3*)
73376888252Smrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
73476888252Smrg		;;
73576888252Smrg	monitor)
73676888252Smrg		basic_machine=m68k-rom68k
73776888252Smrg		os=-coff
73876888252Smrg		;;
73976888252Smrg	morphos)
74076888252Smrg		basic_machine=powerpc-unknown
74176888252Smrg		os=-morphos
74276888252Smrg		;;
74376888252Smrg	msdos)
74476888252Smrg		basic_machine=i386-pc
74576888252Smrg		os=-msdos
74676888252Smrg		;;
7471ae1b5e8Smrg	ms1-*)
7481ae1b5e8Smrg		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
7491ae1b5e8Smrg		;;
75076888252Smrg	mvs)
75176888252Smrg		basic_machine=i370-ibm
75276888252Smrg		os=-mvs
75376888252Smrg		;;
75476888252Smrg	ncr3000)
75576888252Smrg		basic_machine=i486-ncr
75676888252Smrg		os=-sysv4
75776888252Smrg		;;
75876888252Smrg	netbsd386)
75976888252Smrg		basic_machine=i386-unknown
76076888252Smrg		os=-netbsd
76176888252Smrg		;;
76276888252Smrg	netwinder)
76376888252Smrg		basic_machine=armv4l-rebel
76476888252Smrg		os=-linux
76576888252Smrg		;;
76676888252Smrg	news | news700 | news800 | news900)
76776888252Smrg		basic_machine=m68k-sony
76876888252Smrg		os=-newsos
76976888252Smrg		;;
77076888252Smrg	news1000)
77176888252Smrg		basic_machine=m68030-sony
77276888252Smrg		os=-newsos
77376888252Smrg		;;
77476888252Smrg	news-3600 | risc-news)
77576888252Smrg		basic_machine=mips-sony
77676888252Smrg		os=-newsos
77776888252Smrg		;;
77876888252Smrg	necv70)
77976888252Smrg		basic_machine=v70-nec
78076888252Smrg		os=-sysv
78176888252Smrg		;;
78276888252Smrg	next | m*-next )
78376888252Smrg		basic_machine=m68k-next
78476888252Smrg		case $os in
78576888252Smrg		    -nextstep* )
78676888252Smrg			;;
78776888252Smrg		    -ns2*)
78876888252Smrg		      os=-nextstep2
78976888252Smrg			;;
79076888252Smrg		    *)
79176888252Smrg		      os=-nextstep3
79276888252Smrg			;;
79376888252Smrg		esac
79476888252Smrg		;;
79576888252Smrg	nh3000)
79676888252Smrg		basic_machine=m68k-harris
79776888252Smrg		os=-cxux
79876888252Smrg		;;
79976888252Smrg	nh[45]000)
80076888252Smrg		basic_machine=m88k-harris
80176888252Smrg		os=-cxux
80276888252Smrg		;;
80376888252Smrg	nindy960)
80476888252Smrg		basic_machine=i960-intel
80576888252Smrg		os=-nindy
80676888252Smrg		;;
80776888252Smrg	mon960)
80876888252Smrg		basic_machine=i960-intel
80976888252Smrg		os=-mon960
81076888252Smrg		;;
81176888252Smrg	nonstopux)
81276888252Smrg		basic_machine=mips-compaq
81376888252Smrg		os=-nonstopux
81476888252Smrg		;;
81576888252Smrg	np1)
81676888252Smrg		basic_machine=np1-gould
81776888252Smrg		;;
81876888252Smrg	nsr-tandem)
81976888252Smrg		basic_machine=nsr-tandem
82076888252Smrg		;;
82176888252Smrg	op50n-* | op60c-*)
82276888252Smrg		basic_machine=hppa1.1-oki
82376888252Smrg		os=-proelf
82476888252Smrg		;;
8251ae1b5e8Smrg	openrisc | openrisc-*)
82676888252Smrg		basic_machine=or32-unknown
8271ae1b5e8Smrg		;;
8281ae1b5e8Smrg	os400)
8291ae1b5e8Smrg		basic_machine=powerpc-ibm
8301ae1b5e8Smrg		os=-os400
83176888252Smrg		;;
83276888252Smrg	OSE68000 | ose68000)
83376888252Smrg		basic_machine=m68000-ericsson
83476888252Smrg		os=-ose
83576888252Smrg		;;
83676888252Smrg	os68k)
83776888252Smrg		basic_machine=m68k-none
83876888252Smrg		os=-os68k
83976888252Smrg		;;
84076888252Smrg	pa-hitachi)
84176888252Smrg		basic_machine=hppa1.1-hitachi
84276888252Smrg		os=-hiuxwe2
84376888252Smrg		;;
84476888252Smrg	paragon)
84576888252Smrg		basic_machine=i860-intel
84676888252Smrg		os=-osf
84776888252Smrg		;;
8481ae1b5e8Smrg	parisc)
8491ae1b5e8Smrg		basic_machine=hppa-unknown
8501ae1b5e8Smrg		os=-linux
8511ae1b5e8Smrg		;;
8521ae1b5e8Smrg	parisc-*)
8531ae1b5e8Smrg		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
8541ae1b5e8Smrg		os=-linux
8551ae1b5e8Smrg		;;
85676888252Smrg	pbd)
85776888252Smrg		basic_machine=sparc-tti
85876888252Smrg		;;
85976888252Smrg	pbb)
86076888252Smrg		basic_machine=m68k-tti
86176888252Smrg		;;
86276888252Smrg	pc532 | pc532-*)
86376888252Smrg		basic_machine=ns32k-pc532
86476888252Smrg		;;
8651ae1b5e8Smrg	pc98)
8661ae1b5e8Smrg		basic_machine=i386-pc
8671ae1b5e8Smrg		;;
8681ae1b5e8Smrg	pc98-*)
8691ae1b5e8Smrg		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
8701ae1b5e8Smrg		;;
87176888252Smrg	pentium | p5 | k5 | k6 | nexgen | viac3)
87276888252Smrg		basic_machine=i586-pc
87376888252Smrg		;;
87476888252Smrg	pentiumpro | p6 | 6x86 | athlon | athlon_*)
87576888252Smrg		basic_machine=i686-pc
87676888252Smrg		;;
87776888252Smrg	pentiumii | pentium2 | pentiumiii | pentium3)
87876888252Smrg		basic_machine=i686-pc
87976888252Smrg		;;
88076888252Smrg	pentium4)
88176888252Smrg		basic_machine=i786-pc
88276888252Smrg		;;
88376888252Smrg	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
88476888252Smrg		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
88576888252Smrg		;;
88676888252Smrg	pentiumpro-* | p6-* | 6x86-* | athlon-*)
88776888252Smrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
88876888252Smrg		;;
88976888252Smrg	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
89076888252Smrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
89176888252Smrg		;;
89276888252Smrg	pentium4-*)
89376888252Smrg		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
89476888252Smrg		;;
89576888252Smrg	pn)
89676888252Smrg		basic_machine=pn-gould
89776888252Smrg		;;
89876888252Smrg	power)	basic_machine=power-ibm
89976888252Smrg		;;
90076888252Smrg	ppc)	basic_machine=powerpc-unknown
90176888252Smrg		;;
90276888252Smrg	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
90376888252Smrg		;;
90476888252Smrg	ppcle | powerpclittle | ppc-le | powerpc-little)
90576888252Smrg		basic_machine=powerpcle-unknown
90676888252Smrg		;;
90776888252Smrg	ppcle-* | powerpclittle-*)
90876888252Smrg		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
90976888252Smrg		;;
91076888252Smrg	ppc64)	basic_machine=powerpc64-unknown
91176888252Smrg		;;
91276888252Smrg	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
91376888252Smrg		;;
91476888252Smrg	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
91576888252Smrg		basic_machine=powerpc64le-unknown
91676888252Smrg		;;
91776888252Smrg	ppc64le-* | powerpc64little-*)
91876888252Smrg		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
91976888252Smrg		;;
92076888252Smrg	ps2)
92176888252Smrg		basic_machine=i386-ibm
92276888252Smrg		;;
92376888252Smrg	pw32)
92476888252Smrg		basic_machine=i586-unknown
92576888252Smrg		os=-pw32
92676888252Smrg		;;
9271ae1b5e8Smrg	rdos)
9281ae1b5e8Smrg		basic_machine=i386-pc
9291ae1b5e8Smrg		os=-rdos
9301ae1b5e8Smrg		;;
93176888252Smrg	rom68k)
93276888252Smrg		basic_machine=m68k-rom68k
93376888252Smrg		os=-coff
93476888252Smrg		;;
93576888252Smrg	rm[46]00)
93676888252Smrg		basic_machine=mips-siemens
93776888252Smrg		;;
93876888252Smrg	rtpc | rtpc-*)
93976888252Smrg		basic_machine=romp-ibm
94076888252Smrg		;;
9411ae1b5e8Smrg	s390 | s390-*)
9421ae1b5e8Smrg		basic_machine=s390-ibm
9431ae1b5e8Smrg		;;
9441ae1b5e8Smrg	s390x | s390x-*)
9451ae1b5e8Smrg		basic_machine=s390x-ibm
9461ae1b5e8Smrg		;;
94776888252Smrg	sa29200)
94876888252Smrg		basic_machine=a29k-amd
94976888252Smrg		os=-udi
95076888252Smrg		;;
95176888252Smrg	sb1)
95276888252Smrg		basic_machine=mipsisa64sb1-unknown
95376888252Smrg		;;
95476888252Smrg	sb1el)
95576888252Smrg		basic_machine=mipsisa64sb1el-unknown
95676888252Smrg		;;
9571ae1b5e8Smrg	sde)
9581ae1b5e8Smrg		basic_machine=mipsisa32-sde
9591ae1b5e8Smrg		os=-elf
9601ae1b5e8Smrg		;;
96176888252Smrg	sei)
96276888252Smrg		basic_machine=mips-sei
96376888252Smrg		os=-seiux
96476888252Smrg		;;
96576888252Smrg	sequent)
96676888252Smrg		basic_machine=i386-sequent
96776888252Smrg		;;
96876888252Smrg	sh)
96976888252Smrg		basic_machine=sh-hitachi
97076888252Smrg		os=-hms
97176888252Smrg		;;
9721ae1b5e8Smrg	sh5el)
9731ae1b5e8Smrg		basic_machine=sh5le-unknown
9741ae1b5e8Smrg		;;
97576888252Smrg	sh64)
97676888252Smrg		basic_machine=sh64-unknown
97776888252Smrg		;;
97876888252Smrg	sparclite-wrs | simso-wrs)
97976888252Smrg		basic_machine=sparclite-wrs
98076888252Smrg		os=-vxworks
98176888252Smrg		;;
98276888252Smrg	sps7)
98376888252Smrg		basic_machine=m68k-bull
98476888252Smrg		os=-sysv2
98576888252Smrg		;;
98676888252Smrg	spur)
98776888252Smrg		basic_machine=spur-unknown
98876888252Smrg		;;
98976888252Smrg	st2000)
99076888252Smrg		basic_machine=m68k-tandem
99176888252Smrg		;;
99276888252Smrg	stratus)
99376888252Smrg		basic_machine=i860-stratus
99476888252Smrg		os=-sysv4
99576888252Smrg		;;
99676888252Smrg	sun2)
99776888252Smrg		basic_machine=m68000-sun
99876888252Smrg		;;
99976888252Smrg	sun2os3)
100076888252Smrg		basic_machine=m68000-sun
100176888252Smrg		os=-sunos3
100276888252Smrg		;;
100376888252Smrg	sun2os4)
100476888252Smrg		basic_machine=m68000-sun
100576888252Smrg		os=-sunos4
100676888252Smrg		;;
100776888252Smrg	sun3os3)
100876888252Smrg		basic_machine=m68k-sun
100976888252Smrg		os=-sunos3
101076888252Smrg		;;
101176888252Smrg	sun3os4)
101276888252Smrg		basic_machine=m68k-sun
101376888252Smrg		os=-sunos4
101476888252Smrg		;;
101576888252Smrg	sun4os3)
101676888252Smrg		basic_machine=sparc-sun
101776888252Smrg		os=-sunos3
101876888252Smrg		;;
101976888252Smrg	sun4os4)
102076888252Smrg		basic_machine=sparc-sun
102176888252Smrg		os=-sunos4
102276888252Smrg		;;
102376888252Smrg	sun4sol2)
102476888252Smrg		basic_machine=sparc-sun
102576888252Smrg		os=-solaris2
102676888252Smrg		;;
102776888252Smrg	sun3 | sun3-*)
102876888252Smrg		basic_machine=m68k-sun
102976888252Smrg		;;
103076888252Smrg	sun4)
103176888252Smrg		basic_machine=sparc-sun
103276888252Smrg		;;
103376888252Smrg	sun386 | sun386i | roadrunner)
103476888252Smrg		basic_machine=i386-sun
103576888252Smrg		;;
103676888252Smrg	sv1)
103776888252Smrg		basic_machine=sv1-cray
103876888252Smrg		os=-unicos
103976888252Smrg		;;
104076888252Smrg	symmetry)
104176888252Smrg		basic_machine=i386-sequent
104276888252Smrg		os=-dynix
104376888252Smrg		;;
104476888252Smrg	t3e)
104576888252Smrg		basic_machine=alphaev5-cray
104676888252Smrg		os=-unicos
104776888252Smrg		;;
104876888252Smrg	t90)
104976888252Smrg		basic_machine=t90-cray
105076888252Smrg		os=-unicos
105176888252Smrg		;;
105276888252Smrg	tic54x | c54x*)
105376888252Smrg		basic_machine=tic54x-unknown
105476888252Smrg		os=-coff
105576888252Smrg		;;
105676888252Smrg	tic55x | c55x*)
105776888252Smrg		basic_machine=tic55x-unknown
105876888252Smrg		os=-coff
105976888252Smrg		;;
106076888252Smrg	tic6x | c6x*)
106176888252Smrg		basic_machine=tic6x-unknown
106276888252Smrg		os=-coff
106376888252Smrg		;;
10641ae1b5e8Smrg	tile*)
10651ae1b5e8Smrg		basic_machine=tile-unknown
10661ae1b5e8Smrg		os=-linux-gnu
10671ae1b5e8Smrg		;;
106876888252Smrg	tx39)
106976888252Smrg		basic_machine=mipstx39-unknown
107076888252Smrg		;;
107176888252Smrg	tx39el)
107276888252Smrg		basic_machine=mipstx39el-unknown
107376888252Smrg		;;
107476888252Smrg	toad1)
107576888252Smrg		basic_machine=pdp10-xkl
107676888252Smrg		os=-tops20
107776888252Smrg		;;
107876888252Smrg	tower | tower-32)
107976888252Smrg		basic_machine=m68k-ncr
108076888252Smrg		;;
10811ae1b5e8Smrg	tpf)
10821ae1b5e8Smrg		basic_machine=s390x-ibm
10831ae1b5e8Smrg		os=-tpf
10841ae1b5e8Smrg		;;
108576888252Smrg	udi29k)
108676888252Smrg		basic_machine=a29k-amd
108776888252Smrg		os=-udi
108876888252Smrg		;;
108976888252Smrg	ultra3)
109076888252Smrg		basic_machine=a29k-nyu
109176888252Smrg		os=-sym1
109276888252Smrg		;;
109376888252Smrg	v810 | necv810)
109476888252Smrg		basic_machine=v810-nec
109576888252Smrg		os=-none
109676888252Smrg		;;
109776888252Smrg	vaxv)
109876888252Smrg		basic_machine=vax-dec
109976888252Smrg		os=-sysv
110076888252Smrg		;;
110176888252Smrg	vms)
110276888252Smrg		basic_machine=vax-dec
110376888252Smrg		os=-vms
110476888252Smrg		;;
110576888252Smrg	vpp*|vx|vx-*)
110676888252Smrg		basic_machine=f301-fujitsu
110776888252Smrg		;;
110876888252Smrg	vxworks960)
110976888252Smrg		basic_machine=i960-wrs
111076888252Smrg		os=-vxworks
111176888252Smrg		;;
111276888252Smrg	vxworks68)
111376888252Smrg		basic_machine=m68k-wrs
111476888252Smrg		os=-vxworks
111576888252Smrg		;;
111676888252Smrg	vxworks29k)
111776888252Smrg		basic_machine=a29k-wrs
111876888252Smrg		os=-vxworks
111976888252Smrg		;;
112076888252Smrg	w65*)
112176888252Smrg		basic_machine=w65-wdc
112276888252Smrg		os=-none
112376888252Smrg		;;
112476888252Smrg	w89k-*)
112576888252Smrg		basic_machine=hppa1.1-winbond
112676888252Smrg		os=-proelf
112776888252Smrg		;;
11281ae1b5e8Smrg	xbox)
11291ae1b5e8Smrg		basic_machine=i686-pc
11301ae1b5e8Smrg		os=-mingw32
11311ae1b5e8Smrg		;;
113276888252Smrg	xps | xps100)
113376888252Smrg		basic_machine=xps100-honeywell
113476888252Smrg		;;
113576888252Smrg	ymp)
113676888252Smrg		basic_machine=ymp-cray
113776888252Smrg		os=-unicos
113876888252Smrg		;;
113976888252Smrg	z8k-*-coff)
114076888252Smrg		basic_machine=z8k-unknown
114176888252Smrg		os=-sim
114276888252Smrg		;;
11431ae1b5e8Smrg	z80-*-coff)
11441ae1b5e8Smrg		basic_machine=z80-unknown
11451ae1b5e8Smrg		os=-sim
11461ae1b5e8Smrg		;;
114776888252Smrg	none)
114876888252Smrg		basic_machine=none-none
114976888252Smrg		os=-none
115076888252Smrg		;;
115176888252Smrg
115276888252Smrg# Here we handle the default manufacturer of certain CPU types.  It is in
115376888252Smrg# some cases the only manufacturer, in others, it is the most popular.
115476888252Smrg	w89k)
115576888252Smrg		basic_machine=hppa1.1-winbond
115676888252Smrg		;;
115776888252Smrg	op50n)
115876888252Smrg		basic_machine=hppa1.1-oki
115976888252Smrg		;;
116076888252Smrg	op60c)
116176888252Smrg		basic_machine=hppa1.1-oki
116276888252Smrg		;;
116376888252Smrg	romp)
116476888252Smrg		basic_machine=romp-ibm
116576888252Smrg		;;
11661ae1b5e8Smrg	mmix)
11671ae1b5e8Smrg		basic_machine=mmix-knuth
11681ae1b5e8Smrg		;;
116976888252Smrg	rs6000)
117076888252Smrg		basic_machine=rs6000-ibm
117176888252Smrg		;;
117276888252Smrg	vax)
117376888252Smrg		basic_machine=vax-dec
117476888252Smrg		;;
117576888252Smrg	pdp10)
117676888252Smrg		# there are many clones, so DEC is not a safe bet
117776888252Smrg		basic_machine=pdp10-unknown
117876888252Smrg		;;
117976888252Smrg	pdp11)
118076888252Smrg		basic_machine=pdp11-dec
118176888252Smrg		;;
118276888252Smrg	we32k)
118376888252Smrg		basic_machine=we32k-att
118476888252Smrg		;;
118586dafe34Smrg	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
118676888252Smrg		basic_machine=sh-unknown
118776888252Smrg		;;
11881ae1b5e8Smrg	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
118976888252Smrg		basic_machine=sparc-sun
119076888252Smrg		;;
119176888252Smrg	cydra)
119276888252Smrg		basic_machine=cydra-cydrome
119376888252Smrg		;;
119476888252Smrg	orion)
119576888252Smrg		basic_machine=orion-highlevel
119676888252Smrg		;;
119776888252Smrg	orion105)
119876888252Smrg		basic_machine=clipper-highlevel
119976888252Smrg		;;
120076888252Smrg	mac | mpw | mac-mpw)
120176888252Smrg		basic_machine=m68k-apple
120276888252Smrg		;;
120376888252Smrg	pmac | pmac-mpw)
120476888252Smrg		basic_machine=powerpc-apple
120576888252Smrg		;;
120676888252Smrg	*-unknown)
120776888252Smrg		# Make sure to match an already-canonicalized machine name.
120876888252Smrg		;;
120976888252Smrg	*)
121076888252Smrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
121176888252Smrg		exit 1
121276888252Smrg		;;
121376888252Smrgesac
121476888252Smrg
121576888252Smrg# Here we canonicalize certain aliases for manufacturers.
121676888252Smrgcase $basic_machine in
121776888252Smrg	*-digital*)
121876888252Smrg		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
121976888252Smrg		;;
122076888252Smrg	*-commodore*)
122176888252Smrg		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
122276888252Smrg		;;
122376888252Smrg	*)
122476888252Smrg		;;
122576888252Smrgesac
122676888252Smrg
122776888252Smrg# Decode manufacturer-specific aliases for certain operating systems.
122876888252Smrg
122976888252Smrgif [ x"$os" != x"" ]
123076888252Smrgthen
123176888252Smrgcase $os in
123276888252Smrg        # First match some system type aliases
123376888252Smrg        # that might get confused with valid system types.
123476888252Smrg	# -solaris* is a basic system type, with this one exception.
123576888252Smrg	-solaris1 | -solaris1.*)
123676888252Smrg		os=`echo $os | sed -e 's|solaris1|sunos4|'`
123776888252Smrg		;;
123876888252Smrg	-solaris)
123976888252Smrg		os=-solaris2
124076888252Smrg		;;
124176888252Smrg	-svr4*)
124276888252Smrg		os=-sysv4
124376888252Smrg		;;
124476888252Smrg	-unixware*)
124576888252Smrg		os=-sysv4.2uw
124676888252Smrg		;;
124776888252Smrg	-gnu/linux*)
124876888252Smrg		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
124976888252Smrg		;;
125076888252Smrg	# First accept the basic system types.
125176888252Smrg	# The portable systems comes first.
125276888252Smrg	# Each alternative MUST END IN A *, to match a version number.
125376888252Smrg	# -sysv* is not here because it comes later, after sysvr4.
125476888252Smrg	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
125576888252Smrg	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
125676888252Smrg	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
125776888252Smrg	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
125886dafe34Smrg	      | -aos* \
125976888252Smrg	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
126076888252Smrg	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
12611ae1b5e8Smrg	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
12621ae1b5e8Smrg	      | -openbsd* | -solidbsd* \
12631ae1b5e8Smrg	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
12641ae1b5e8Smrg	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
126576888252Smrg	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
126676888252Smrg	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
12671ae1b5e8Smrg	      | -chorusos* | -chorusrdb* | -cegcc* \
126876888252Smrg	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
12691ae1b5e8Smrg	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
12701ae1b5e8Smrg	      | -uxpv* | -beos* | -mpeix* | -udk* \
127176888252Smrg	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
127276888252Smrg	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
127376888252Smrg	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
127476888252Smrg	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
127576888252Smrg	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
12761ae1b5e8Smrg	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
12771ae1b5e8Smrg	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
127876888252Smrg	# Remember, each alternative MUST END IN *, to match a version number.
127976888252Smrg		;;
128076888252Smrg	-qnx*)
128176888252Smrg		case $basic_machine in
128276888252Smrg		    x86-* | i*86-*)
128376888252Smrg			;;
128476888252Smrg		    *)
128576888252Smrg			os=-nto$os
128676888252Smrg			;;
128776888252Smrg		esac
128876888252Smrg		;;
128976888252Smrg	-nto-qnx*)
129076888252Smrg		;;
129176888252Smrg	-nto*)
129276888252Smrg		os=`echo $os | sed -e 's|nto|nto-qnx|'`
129376888252Smrg		;;
129476888252Smrg	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
12951ae1b5e8Smrg	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
129676888252Smrg	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
129776888252Smrg		;;
129876888252Smrg	-mac*)
129976888252Smrg		os=`echo $os | sed -e 's|mac|macos|'`
130076888252Smrg		;;
13011ae1b5e8Smrg	-linux-dietlibc)
13021ae1b5e8Smrg		os=-linux-dietlibc
13031ae1b5e8Smrg		;;
130476888252Smrg	-linux*)
130576888252Smrg		os=`echo $os | sed -e 's|linux|linux-gnu|'`
130676888252Smrg		;;
130776888252Smrg	-sunos5*)
130876888252Smrg		os=`echo $os | sed -e 's|sunos5|solaris2|'`
130976888252Smrg		;;
131076888252Smrg	-sunos6*)
131176888252Smrg		os=`echo $os | sed -e 's|sunos6|solaris3|'`
131276888252Smrg		;;
131376888252Smrg	-opened*)
131476888252Smrg		os=-openedition
131576888252Smrg		;;
13161ae1b5e8Smrg        -os400*)
13171ae1b5e8Smrg		os=-os400
13181ae1b5e8Smrg		;;
131976888252Smrg	-wince*)
132076888252Smrg		os=-wince
132176888252Smrg		;;
132276888252Smrg	-osfrose*)
132376888252Smrg		os=-osfrose
132476888252Smrg		;;
132576888252Smrg	-osf*)
132676888252Smrg		os=-osf
132776888252Smrg		;;
132876888252Smrg	-utek*)
132976888252Smrg		os=-bsd
133076888252Smrg		;;
133176888252Smrg	-dynix*)
133276888252Smrg		os=-bsd
133376888252Smrg		;;
133476888252Smrg	-acis*)
133576888252Smrg		os=-aos
133676888252Smrg		;;
133776888252Smrg	-atheos*)
133876888252Smrg		os=-atheos
133976888252Smrg		;;
13401ae1b5e8Smrg	-syllable*)
13411ae1b5e8Smrg		os=-syllable
13421ae1b5e8Smrg		;;
134376888252Smrg	-386bsd)
134476888252Smrg		os=-bsd
134576888252Smrg		;;
134676888252Smrg	-ctix* | -uts*)
134776888252Smrg		os=-sysv
134876888252Smrg		;;
134976888252Smrg	-nova*)
135076888252Smrg		os=-rtmk-nova
135176888252Smrg		;;
135276888252Smrg	-ns2 )
135376888252Smrg		os=-nextstep2
135476888252Smrg		;;
135576888252Smrg	-nsk*)
135676888252Smrg		os=-nsk
135776888252Smrg		;;
135876888252Smrg	# Preserve the version number of sinix5.
135976888252Smrg	-sinix5.*)
136076888252Smrg		os=`echo $os | sed -e 's|sinix|sysv|'`
136176888252Smrg		;;
136276888252Smrg	-sinix*)
136376888252Smrg		os=-sysv4
136476888252Smrg		;;
13651ae1b5e8Smrg        -tpf*)
13661ae1b5e8Smrg		os=-tpf
13671ae1b5e8Smrg		;;
136876888252Smrg	-triton*)
136976888252Smrg		os=-sysv3
137076888252Smrg		;;
137176888252Smrg	-oss*)
137276888252Smrg		os=-sysv3
137376888252Smrg		;;
137476888252Smrg	-svr4)
137576888252Smrg		os=-sysv4
137676888252Smrg		;;
137776888252Smrg	-svr3)
137876888252Smrg		os=-sysv3
137976888252Smrg		;;
138076888252Smrg	-sysvr4)
138176888252Smrg		os=-sysv4
138276888252Smrg		;;
138376888252Smrg	# This must come after -sysvr4.
138476888252Smrg	-sysv*)
138576888252Smrg		;;
138676888252Smrg	-ose*)
138776888252Smrg		os=-ose
138876888252Smrg		;;
138976888252Smrg	-es1800*)
139076888252Smrg		os=-ose
139176888252Smrg		;;
139276888252Smrg	-xenix)
139376888252Smrg		os=-xenix
139476888252Smrg		;;
139576888252Smrg	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
139676888252Smrg		os=-mint
139776888252Smrg		;;
139876888252Smrg	-aros*)
139976888252Smrg		os=-aros
140076888252Smrg		;;
140176888252Smrg	-kaos*)
140276888252Smrg		os=-kaos
140376888252Smrg		;;
14041ae1b5e8Smrg	-zvmoe)
14051ae1b5e8Smrg		os=-zvmoe
14061ae1b5e8Smrg		;;
14071ae1b5e8Smrg	-dicos*)
14081ae1b5e8Smrg		os=-dicos
14091ae1b5e8Smrg		;;
141076888252Smrg	-none)
141176888252Smrg		;;
141276888252Smrg	*)
141376888252Smrg		# Get rid of the `-' at the beginning of $os.
141476888252Smrg		os=`echo $os | sed 's/[^-]*-//'`
141576888252Smrg		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
141676888252Smrg		exit 1
141776888252Smrg		;;
141876888252Smrgesac
141976888252Smrgelse
142076888252Smrg
142176888252Smrg# Here we handle the default operating systems that come with various machines.
142276888252Smrg# The value should be what the vendor currently ships out the door with their
142376888252Smrg# machine or put another way, the most popular os provided with the machine.
142476888252Smrg
142576888252Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say,
142676888252Smrg# "-sun"), then you have to tell the case statement up towards the top
142776888252Smrg# that MANUFACTURER isn't an operating system.  Otherwise, code above
142876888252Smrg# will signal an error saying that MANUFACTURER isn't an operating
142976888252Smrg# system, and we'll never get to this point.
143076888252Smrg
143176888252Smrgcase $basic_machine in
14321ae1b5e8Smrg        score-*)
14331ae1b5e8Smrg		os=-elf
14341ae1b5e8Smrg		;;
14351ae1b5e8Smrg        spu-*)
14361ae1b5e8Smrg		os=-elf
14371ae1b5e8Smrg		;;
143876888252Smrg	*-acorn)
143976888252Smrg		os=-riscix1.2
144076888252Smrg		;;
144176888252Smrg	arm*-rebel)
144276888252Smrg		os=-linux
144376888252Smrg		;;
144476888252Smrg	arm*-semi)
144576888252Smrg		os=-aout
144676888252Smrg		;;
14471ae1b5e8Smrg        c4x-* | tic4x-*)
14481ae1b5e8Smrg        	os=-coff
144976888252Smrg		;;
145076888252Smrg	# This must come before the *-dec entry.
145176888252Smrg	pdp10-*)
145276888252Smrg		os=-tops20
145376888252Smrg		;;
145476888252Smrg	pdp11-*)
145576888252Smrg		os=-none
145676888252Smrg		;;
145776888252Smrg	*-dec | vax-*)
145876888252Smrg		os=-ultrix4.2
145976888252Smrg		;;
146076888252Smrg	m68*-apollo)
146176888252Smrg		os=-domain
146276888252Smrg		;;
146376888252Smrg	i386-sun)
146476888252Smrg		os=-sunos4.0.2
146576888252Smrg		;;
146676888252Smrg	m68000-sun)
146776888252Smrg		os=-sunos3
146876888252Smrg		# This also exists in the configure program, but was not the
146976888252Smrg		# default.
147076888252Smrg		# os=-sunos4
147176888252Smrg		;;
147276888252Smrg	m68*-cisco)
147376888252Smrg		os=-aout
147476888252Smrg		;;
14751ae1b5e8Smrg        mep-*)
14761ae1b5e8Smrg		os=-elf
14771ae1b5e8Smrg		;;
147876888252Smrg	mips*-cisco)
147976888252Smrg		os=-elf
148076888252Smrg		;;
148176888252Smrg	mips*-*)
148276888252Smrg		os=-elf
148376888252Smrg		;;
148476888252Smrg	or32-*)
148576888252Smrg		os=-coff
148676888252Smrg		;;
148776888252Smrg	*-tti)	# must be before sparc entry or we get the wrong os.
148876888252Smrg		os=-sysv3
148976888252Smrg		;;
149076888252Smrg	sparc-* | *-sun)
149176888252Smrg		os=-sunos4.1.1
149276888252Smrg		;;
149376888252Smrg	*-be)
149476888252Smrg		os=-beos
149576888252Smrg		;;
14961ae1b5e8Smrg	*-haiku)
14971ae1b5e8Smrg		os=-haiku
14981ae1b5e8Smrg		;;
149976888252Smrg	*-ibm)
150076888252Smrg		os=-aix
150176888252Smrg		;;
15021ae1b5e8Smrg    	*-knuth)
15031ae1b5e8Smrg		os=-mmixware
15041ae1b5e8Smrg		;;
150576888252Smrg	*-wec)
150676888252Smrg		os=-proelf
150776888252Smrg		;;
150876888252Smrg	*-winbond)
150976888252Smrg		os=-proelf
151076888252Smrg		;;
151176888252Smrg	*-oki)
151276888252Smrg		os=-proelf
151376888252Smrg		;;
151476888252Smrg	*-hp)
151576888252Smrg		os=-hpux
151676888252Smrg		;;
151776888252Smrg	*-hitachi)
151876888252Smrg		os=-hiux
151976888252Smrg		;;
152076888252Smrg	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
152176888252Smrg		os=-sysv
152276888252Smrg		;;
152376888252Smrg	*-cbm)
152476888252Smrg		os=-amigaos
152576888252Smrg		;;
152676888252Smrg	*-dg)
152776888252Smrg		os=-dgux
152876888252Smrg		;;
152976888252Smrg	*-dolphin)
153076888252Smrg		os=-sysv3
153176888252Smrg		;;
153276888252Smrg	m68k-ccur)
153376888252Smrg		os=-rtu
153476888252Smrg		;;
153576888252Smrg	m88k-omron*)
153676888252Smrg		os=-luna
153776888252Smrg		;;
153876888252Smrg	*-next )
153976888252Smrg		os=-nextstep
154076888252Smrg		;;
154176888252Smrg	*-sequent)
154276888252Smrg		os=-ptx
154376888252Smrg		;;
154476888252Smrg	*-crds)
154576888252Smrg		os=-unos
154676888252Smrg		;;
154776888252Smrg	*-ns)
154876888252Smrg		os=-genix
154976888252Smrg		;;
155076888252Smrg	i370-*)
155176888252Smrg		os=-mvs
155276888252Smrg		;;
155376888252Smrg	*-next)
155476888252Smrg		os=-nextstep3
155576888252Smrg		;;
155676888252Smrg	*-gould)
155776888252Smrg		os=-sysv
155876888252Smrg		;;
155976888252Smrg	*-highlevel)
156076888252Smrg		os=-bsd
156176888252Smrg		;;
156276888252Smrg	*-encore)
156376888252Smrg		os=-bsd
156476888252Smrg		;;
156576888252Smrg	*-sgi)
156676888252Smrg		os=-irix
156776888252Smrg		;;
156876888252Smrg	*-siemens)
156976888252Smrg		os=-sysv4
157076888252Smrg		;;
157176888252Smrg	*-masscomp)
157276888252Smrg		os=-rtu
157376888252Smrg		;;
157476888252Smrg	f30[01]-fujitsu | f700-fujitsu)
157576888252Smrg		os=-uxpv
157676888252Smrg		;;
157776888252Smrg	*-rom68k)
157876888252Smrg		os=-coff
157976888252Smrg		;;
158076888252Smrg	*-*bug)
158176888252Smrg		os=-coff
158276888252Smrg		;;
158376888252Smrg	*-apple)
158476888252Smrg		os=-macos
158576888252Smrg		;;
158676888252Smrg	*-atari*)
158776888252Smrg		os=-mint
158876888252Smrg		;;
158976888252Smrg	*)
159076888252Smrg		os=-none
159176888252Smrg		;;
159276888252Smrgesac
159376888252Smrgfi
159476888252Smrg
159576888252Smrg# Here we handle the case where we know the os, and the CPU type, but not the
159676888252Smrg# manufacturer.  We pick the logical manufacturer.
159776888252Smrgvendor=unknown
159876888252Smrgcase $basic_machine in
159976888252Smrg	*-unknown)
160076888252Smrg		case $os in
160176888252Smrg			-riscix*)
160276888252Smrg				vendor=acorn
160376888252Smrg				;;
160476888252Smrg			-sunos*)
160576888252Smrg				vendor=sun
160676888252Smrg				;;
160776888252Smrg			-aix*)
160876888252Smrg				vendor=ibm
160976888252Smrg				;;
161076888252Smrg			-beos*)
161176888252Smrg				vendor=be
161276888252Smrg				;;
161376888252Smrg			-hpux*)
161476888252Smrg				vendor=hp
161576888252Smrg				;;
161676888252Smrg			-mpeix*)
161776888252Smrg				vendor=hp
161876888252Smrg				;;
161976888252Smrg			-hiux*)
162076888252Smrg				vendor=hitachi
162176888252Smrg				;;
162276888252Smrg			-unos*)
162376888252Smrg				vendor=crds
162476888252Smrg				;;
162576888252Smrg			-dgux*)
162676888252Smrg				vendor=dg
162776888252Smrg				;;
162876888252Smrg			-luna*)
162976888252Smrg				vendor=omron
163076888252Smrg				;;
163176888252Smrg			-genix*)
163276888252Smrg				vendor=ns
163376888252Smrg				;;
163476888252Smrg			-mvs* | -opened*)
163576888252Smrg				vendor=ibm
163676888252Smrg				;;
16371ae1b5e8Smrg			-os400*)
16381ae1b5e8Smrg				vendor=ibm
16391ae1b5e8Smrg				;;
164076888252Smrg			-ptx*)
164176888252Smrg				vendor=sequent
164276888252Smrg				;;
16431ae1b5e8Smrg			-tpf*)
16441ae1b5e8Smrg				vendor=ibm
16451ae1b5e8Smrg				;;
164676888252Smrg			-vxsim* | -vxworks* | -windiss*)
164776888252Smrg				vendor=wrs
164876888252Smrg				;;
164976888252Smrg			-aux*)
165076888252Smrg				vendor=apple
165176888252Smrg				;;
165276888252Smrg			-hms*)
165376888252Smrg				vendor=hitachi
165476888252Smrg				;;
165576888252Smrg			-mpw* | -macos*)
165676888252Smrg				vendor=apple
165776888252Smrg				;;
165876888252Smrg			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
165976888252Smrg				vendor=atari
166076888252Smrg				;;
166176888252Smrg			-vos*)
166276888252Smrg				vendor=stratus
166376888252Smrg				;;
166476888252Smrg		esac
166576888252Smrg		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
166676888252Smrg		;;
166776888252Smrgesac
166876888252Smrg
166976888252Smrgecho $basic_machine$os
16701ae1b5e8Smrgexit
167176888252Smrg
167276888252Smrg# Local variables:
167376888252Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
167476888252Smrg# time-stamp-start: "timestamp='"
167576888252Smrg# time-stamp-format: "%:y-%02m-%02d"
167676888252Smrg# time-stamp-end: "'"
167776888252Smrg# End:
1678