config.sub revision 1ae1b5e8
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
71ae1b5e8Smrgtimestamp='2009-02-03'
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  kopensolaris*-gnu* | \
1261ae1b5e8Smrg  storm-chaos* | os2-emx* | rtmk-nova*)
12776888252Smrg    os=-$maybe_os
12876888252Smrg    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
12976888252Smrg    ;;
13076888252Smrg  *)
13176888252Smrg    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
13276888252Smrg    if [ $basic_machine != $1 ]
13376888252Smrg    then os=`echo $1 | sed 's/.*-/-/'`
13476888252Smrg    else os=; fi
13576888252Smrg    ;;
13676888252Smrgesac
13776888252Smrg
13876888252Smrg### Let's recognize common machines as not being operating systems so
13976888252Smrg### that things like config.sub decstation-3100 work.  We also
14076888252Smrg### recognize some manufacturers as not being operating systems, so we
14176888252Smrg### can provide default operating systems below.
14276888252Smrgcase $os in
14376888252Smrg	-sun*os*)
14476888252Smrg		# Prevent following clause from handling this invalid input.
14576888252Smrg		;;
14676888252Smrg	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
14776888252Smrg	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
14876888252Smrg	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
14976888252Smrg	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
15076888252Smrg	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
15176888252Smrg	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
1521ae1b5e8Smrg	-apple | -axis | -knuth | -cray)
15376888252Smrg		os=
15476888252Smrg		basic_machine=$1
15576888252Smrg		;;
15676888252Smrg	-sim | -cisco | -oki | -wec | -winbond)
15776888252Smrg		os=
15876888252Smrg		basic_machine=$1
15976888252Smrg		;;
16076888252Smrg	-scout)
16176888252Smrg		;;
16276888252Smrg	-wrs)
16376888252Smrg		os=-vxworks
16476888252Smrg		basic_machine=$1
16576888252Smrg		;;
16676888252Smrg	-chorusos*)
16776888252Smrg		os=-chorusos
16876888252Smrg		basic_machine=$1
16976888252Smrg		;;
17076888252Smrg 	-chorusrdb)
17176888252Smrg 		os=-chorusrdb
17276888252Smrg		basic_machine=$1
17376888252Smrg 		;;
17476888252Smrg	-hiux*)
17576888252Smrg		os=-hiuxwe2
17676888252Smrg		;;
1771ae1b5e8Smrg	-sco6)
1781ae1b5e8Smrg		os=-sco5v6
1791ae1b5e8Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1801ae1b5e8Smrg		;;
18176888252Smrg	-sco5)
18276888252Smrg		os=-sco3.2v5
18376888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
18476888252Smrg		;;
18576888252Smrg	-sco4)
18676888252Smrg		os=-sco3.2v4
18776888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
18876888252Smrg		;;
18976888252Smrg	-sco3.2.[4-9]*)
19076888252Smrg		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
19176888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19276888252Smrg		;;
19376888252Smrg	-sco3.2v[4-9]*)
19476888252Smrg		# Don't forget version if it is 3.2v4 or newer.
19576888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19676888252Smrg		;;
1971ae1b5e8Smrg	-sco5v6*)
1981ae1b5e8Smrg		# Don't forget version if it is 3.2v4 or newer.
1991ae1b5e8Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2001ae1b5e8Smrg		;;
20176888252Smrg	-sco*)
20276888252Smrg		os=-sco3.2v2
20376888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
20476888252Smrg		;;
20576888252Smrg	-udk*)
20676888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
20776888252Smrg		;;
20876888252Smrg	-isc)
20976888252Smrg		os=-isc2.2
21076888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
21176888252Smrg		;;
21276888252Smrg	-clix*)
21376888252Smrg		basic_machine=clipper-intergraph
21476888252Smrg		;;
21576888252Smrg	-isc*)
21676888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
21776888252Smrg		;;
21876888252Smrg	-lynx*)
21976888252Smrg		os=-lynxos
22076888252Smrg		;;
22176888252Smrg	-ptx*)
22276888252Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
22376888252Smrg		;;
22476888252Smrg	-windowsnt*)
22576888252Smrg		os=`echo $os | sed -e 's/windowsnt/winnt/'`
22676888252Smrg		;;
22776888252Smrg	-psos*)
22876888252Smrg		os=-psos
22976888252Smrg		;;
23076888252Smrg	-mint | -mint[0-9]*)
23176888252Smrg		basic_machine=m68k-atari
23276888252Smrg		os=-mint
23376888252Smrg		;;
23476888252Smrgesac
23576888252Smrg
23676888252Smrg# Decode aliases for certain CPU-COMPANY combinations.
23776888252Smrgcase $basic_machine in
23876888252Smrg	# Recognize the basic CPU types without company name.
23976888252Smrg	# Some are omitted here because they have special meanings below.
24076888252Smrg	1750a | 580 \
24176888252Smrg	| a29k \
24276888252Smrg	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
24376888252Smrg	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
2441ae1b5e8Smrg	| am33_2.0 \
2451ae1b5e8Smrg	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
2461ae1b5e8Smrg	| bfin \
24776888252Smrg	| c4x | clipper \
24876888252Smrg	| d10v | d30v | dlx | dsp16xx \
2491ae1b5e8Smrg	| fido | fr30 | frv \
25076888252Smrg	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
25176888252Smrg	| i370 | i860 | i960 | ia64 \
2521ae1b5e8Smrg	| ip2k | iq2000 \
2531ae1b5e8Smrg	| lm32 \
2541ae1b5e8Smrg	| m32c | m32r | m32rle | m68000 | m68k | m88k \
2551ae1b5e8Smrg	| maxq | mb | microblaze | mcore | mep | metag \
25676888252Smrg	| mips | mipsbe | mipseb | mipsel | mipsle \
25776888252Smrg	| mips16 \
25876888252Smrg	| mips64 | mips64el \
2591ae1b5e8Smrg	| mips64octeon | mips64octeonel \
26076888252Smrg	| mips64orion | mips64orionel \
2611ae1b5e8Smrg	| mips64r5900 | mips64r5900el \
2621ae1b5e8Smrg	| mips64vr | mips64vrel \
26376888252Smrg	| mips64vr4100 | mips64vr4100el \
26476888252Smrg	| mips64vr4300 | mips64vr4300el \
26576888252Smrg	| mips64vr5000 | mips64vr5000el \
2661ae1b5e8Smrg	| mips64vr5900 | mips64vr5900el \
26776888252Smrg	| mipsisa32 | mipsisa32el \
26876888252Smrg	| mipsisa32r2 | mipsisa32r2el \
26976888252Smrg	| mipsisa64 | mipsisa64el \
2701ae1b5e8Smrg	| mipsisa64r2 | mipsisa64r2el \
27176888252Smrg	| mipsisa64sb1 | mipsisa64sb1el \
27276888252Smrg	| mipsisa64sr71k | mipsisa64sr71kel \
27376888252Smrg	| mipstx39 | mipstx39el \
27476888252Smrg	| mn10200 | mn10300 \
2751ae1b5e8Smrg	| mt \
27676888252Smrg	| msp430 \
2771ae1b5e8Smrg	| nios | nios2 \
27876888252Smrg	| ns16k | ns32k \
2791ae1b5e8Smrg	| or32 \
28076888252Smrg	| pdp10 | pdp11 | pj | pjl \
28176888252Smrg	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
28276888252Smrg	| pyramid \
2831ae1b5e8Smrg	| score \
2841ae1b5e8Smrg	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
28576888252Smrg	| sh64 | sh64le \
2861ae1b5e8Smrg	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
2871ae1b5e8Smrg	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
2881ae1b5e8Smrg	| spu | strongarm \
28976888252Smrg	| tahoe | thumb | tic4x | tic80 | tron \
29076888252Smrg	| v850 | v850e \
29176888252Smrg	| we32k \
2921ae1b5e8Smrg	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
2931ae1b5e8Smrg	| z8k | z80)
29476888252Smrg		basic_machine=$basic_machine-unknown
29576888252Smrg		;;
29676888252Smrg	m6811 | m68hc11 | m6812 | m68hc12)
29776888252Smrg		# Motorola 68HC11/12.
29876888252Smrg		basic_machine=$basic_machine-unknown
29976888252Smrg		os=-none
30076888252Smrg		;;
30176888252Smrg	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
30276888252Smrg		;;
3031ae1b5e8Smrg	ms1)
3041ae1b5e8Smrg		basic_machine=mt-unknown
3051ae1b5e8Smrg		;;
30676888252Smrg
30776888252Smrg	# We use `pc' rather than `unknown'
30876888252Smrg	# because (1) that's what they normally are, and
30976888252Smrg	# (2) the word "unknown" tends to confuse beginning users.
31076888252Smrg	i*86 | x86_64)
31176888252Smrg	  basic_machine=$basic_machine-pc
31276888252Smrg	  ;;
31376888252Smrg	# Object if more than one company name word.
31476888252Smrg	*-*-*)
31576888252Smrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
31676888252Smrg		exit 1
31776888252Smrg		;;
31876888252Smrg	# Recognize the basic CPU types with company name.
31976888252Smrg	580-* \
32076888252Smrg	| a29k-* \
32176888252Smrg	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
32276888252Smrg	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
32376888252Smrg	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
32476888252Smrg	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
3251ae1b5e8Smrg	| avr-* | avr32-* \
3261ae1b5e8Smrg	| bfin-* | bs2000-* \
32776888252Smrg	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
3281ae1b5e8Smrg	| clipper-* | craynv-* | cydra-* \
32976888252Smrg	| d10v-* | d30v-* | dlx-* \
33076888252Smrg	| elxsi-* \
3311ae1b5e8Smrg	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
33276888252Smrg	| h8300-* | h8500-* \
33376888252Smrg	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
33476888252Smrg	| i*86-* | i860-* | i960-* | ia64-* \
3351ae1b5e8Smrg	| ip2k-* | iq2000-* \
3361ae1b5e8Smrg	| lm32-* \
3371ae1b5e8Smrg	| m32c-* | m32r-* | m32rle-* \
33876888252Smrg	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
3391ae1b5e8Smrg	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
34076888252Smrg	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
34176888252Smrg	| mips16-* \
34276888252Smrg	| mips64-* | mips64el-* \
3431ae1b5e8Smrg	| mips64octeon-* | mips64octeonel-* \
34476888252Smrg	| mips64orion-* | mips64orionel-* \
3451ae1b5e8Smrg	| mips64r5900-* | mips64r5900el-* \
3461ae1b5e8Smrg	| mips64vr-* | mips64vrel-* \
34776888252Smrg	| mips64vr4100-* | mips64vr4100el-* \
34876888252Smrg	| mips64vr4300-* | mips64vr4300el-* \
34976888252Smrg	| mips64vr5000-* | mips64vr5000el-* \
3501ae1b5e8Smrg	| mips64vr5900-* | mips64vr5900el-* \
35176888252Smrg	| mipsisa32-* | mipsisa32el-* \
35276888252Smrg	| mipsisa32r2-* | mipsisa32r2el-* \
35376888252Smrg	| mipsisa64-* | mipsisa64el-* \
3541ae1b5e8Smrg	| mipsisa64r2-* | mipsisa64r2el-* \
35576888252Smrg	| mipsisa64sb1-* | mipsisa64sb1el-* \
35676888252Smrg	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
35776888252Smrg	| mipstx39-* | mipstx39el-* \
3581ae1b5e8Smrg	| mmix-* \
3591ae1b5e8Smrg	| mt-* \
36076888252Smrg	| msp430-* \
3611ae1b5e8Smrg	| nios-* | nios2-* \
3621ae1b5e8Smrg	| none-* | np1-* | ns16k-* | ns32k-* \
36376888252Smrg	| orion-* \
36476888252Smrg	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
36576888252Smrg	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
36676888252Smrg	| pyramid-* \
36776888252Smrg	| romp-* | rs6000-* \
3681ae1b5e8Smrg	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
36976888252Smrg	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
3701ae1b5e8Smrg	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
3711ae1b5e8Smrg	| sparclite-* \
3721ae1b5e8Smrg	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
37376888252Smrg	| tahoe-* | thumb-* \
3741ae1b5e8Smrg	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
37576888252Smrg	| tron-* \
37676888252Smrg	| v850-* | v850e-* | vax-* \
37776888252Smrg	| we32k-* \
3781ae1b5e8Smrg	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
3791ae1b5e8Smrg	| xstormy16-* | xtensa*-* \
38076888252Smrg	| ymp-* \
3811ae1b5e8Smrg	| z8k-* | z80-*)
3821ae1b5e8Smrg		;;
3831ae1b5e8Smrg	# Recognize the basic CPU types without company name, with glob match.
3841ae1b5e8Smrg	xtensa*)
3851ae1b5e8Smrg		basic_machine=$basic_machine-unknown
38676888252Smrg		;;
38776888252Smrg	# Recognize the various machine names and aliases which stand
38876888252Smrg	# for a CPU type and a company and sometimes even an OS.
38976888252Smrg	386bsd)
39076888252Smrg		basic_machine=i386-unknown
39176888252Smrg		os=-bsd
39276888252Smrg		;;
39376888252Smrg	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
39476888252Smrg		basic_machine=m68000-att
39576888252Smrg		;;
39676888252Smrg	3b*)
39776888252Smrg		basic_machine=we32k-att
39876888252Smrg		;;
39976888252Smrg	a29khif)
40076888252Smrg		basic_machine=a29k-amd
40176888252Smrg		os=-udi
40276888252Smrg		;;
4031ae1b5e8Smrg    	abacus)
4041ae1b5e8Smrg		basic_machine=abacus-unknown
4051ae1b5e8Smrg		;;
40676888252Smrg	adobe68k)
40776888252Smrg		basic_machine=m68010-adobe
40876888252Smrg		os=-scout
40976888252Smrg		;;
41076888252Smrg	alliant | fx80)
41176888252Smrg		basic_machine=fx80-alliant
41276888252Smrg		;;
41376888252Smrg	altos | altos3068)
41476888252Smrg		basic_machine=m68k-altos
41576888252Smrg		;;
41676888252Smrg	am29k)
41776888252Smrg		basic_machine=a29k-none
41876888252Smrg		os=-bsd
41976888252Smrg		;;
42076888252Smrg	amd64)
42176888252Smrg		basic_machine=x86_64-pc
42276888252Smrg		;;
4231ae1b5e8Smrg	amd64-*)
4241ae1b5e8Smrg		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
4251ae1b5e8Smrg		;;
42676888252Smrg	amdahl)
42776888252Smrg		basic_machine=580-amdahl
42876888252Smrg		os=-sysv
42976888252Smrg		;;
43076888252Smrg	amiga | amiga-*)
43176888252Smrg		basic_machine=m68k-unknown
43276888252Smrg		;;
43376888252Smrg	amigaos | amigados)
43476888252Smrg		basic_machine=m68k-unknown
43576888252Smrg		os=-amigaos
43676888252Smrg		;;
43776888252Smrg	amigaunix | amix)
43876888252Smrg		basic_machine=m68k-unknown
43976888252Smrg		os=-sysv4
44076888252Smrg		;;
44176888252Smrg	apollo68)
44276888252Smrg		basic_machine=m68k-apollo
44376888252Smrg		os=-sysv
44476888252Smrg		;;
44576888252Smrg	apollo68bsd)
44676888252Smrg		basic_machine=m68k-apollo
44776888252Smrg		os=-bsd
44876888252Smrg		;;
4491ae1b5e8Smrg	aros)
4501ae1b5e8Smrg		basic_machine=i386-pc
4511ae1b5e8Smrg		os=-aros
4521ae1b5e8Smrg		;;
45376888252Smrg	aux)
45476888252Smrg		basic_machine=m68k-apple
45576888252Smrg		os=-aux
45676888252Smrg		;;
45776888252Smrg	balance)
45876888252Smrg		basic_machine=ns32k-sequent
45976888252Smrg		os=-dynix
46076888252Smrg		;;
4611ae1b5e8Smrg	blackfin)
4621ae1b5e8Smrg		basic_machine=bfin-unknown
4631ae1b5e8Smrg		os=-linux
4641ae1b5e8Smrg		;;
4651ae1b5e8Smrg	blackfin-*)
4661ae1b5e8Smrg		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
4671ae1b5e8Smrg		os=-linux
4681ae1b5e8Smrg		;;
46976888252Smrg	c90)
47076888252Smrg		basic_machine=c90-cray
47176888252Smrg		os=-unicos
47276888252Smrg		;;
4731ae1b5e8Smrg        cegcc)
4741ae1b5e8Smrg		basic_machine=arm-unknown
4751ae1b5e8Smrg		os=-cegcc
4761ae1b5e8Smrg		;;
47776888252Smrg	convex-c1)
47876888252Smrg		basic_machine=c1-convex
47976888252Smrg		os=-bsd
48076888252Smrg		;;
48176888252Smrg	convex-c2)
48276888252Smrg		basic_machine=c2-convex
48376888252Smrg		os=-bsd
48476888252Smrg		;;
48576888252Smrg	convex-c32)
48676888252Smrg		basic_machine=c32-convex
48776888252Smrg		os=-bsd
48876888252Smrg		;;
48976888252Smrg	convex-c34)
49076888252Smrg		basic_machine=c34-convex
49176888252Smrg		os=-bsd
49276888252Smrg		;;
49376888252Smrg	convex-c38)
49476888252Smrg		basic_machine=c38-convex
49576888252Smrg		os=-bsd
49676888252Smrg		;;
49776888252Smrg	cray | j90)
49876888252Smrg		basic_machine=j90-cray
49976888252Smrg		os=-unicos
50076888252Smrg		;;
5011ae1b5e8Smrg	craynv)
5021ae1b5e8Smrg		basic_machine=craynv-cray
5031ae1b5e8Smrg		os=-unicosmp
5041ae1b5e8Smrg		;;
5051ae1b5e8Smrg	cr16)
5061ae1b5e8Smrg		basic_machine=cr16-unknown
5071ae1b5e8Smrg		os=-elf
5081ae1b5e8Smrg		;;
50976888252Smrg	crds | unos)
51076888252Smrg		basic_machine=m68k-crds
51176888252Smrg		;;
5121ae1b5e8Smrg	crisv32 | crisv32-* | etraxfs*)
5131ae1b5e8Smrg		basic_machine=crisv32-axis
5141ae1b5e8Smrg		;;
51576888252Smrg	cris | cris-* | etrax*)
51676888252Smrg		basic_machine=cris-axis
51776888252Smrg		;;
5181ae1b5e8Smrg	crx)
5191ae1b5e8Smrg		basic_machine=crx-unknown
5201ae1b5e8Smrg		os=-elf
5211ae1b5e8Smrg		;;
52276888252Smrg	da30 | da30-*)
52376888252Smrg		basic_machine=m68k-da30
52476888252Smrg		;;
52576888252Smrg	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
52676888252Smrg		basic_machine=mips-dec
52776888252Smrg		;;
52876888252Smrg	decsystem10* | dec10*)
52976888252Smrg		basic_machine=pdp10-dec
53076888252Smrg		os=-tops10
53176888252Smrg		;;
53276888252Smrg	decsystem20* | dec20*)
53376888252Smrg		basic_machine=pdp10-dec
53476888252Smrg		os=-tops20
53576888252Smrg		;;
53676888252Smrg	delta | 3300 | motorola-3300 | motorola-delta \
53776888252Smrg	      | 3300-motorola | delta-motorola)
53876888252Smrg		basic_machine=m68k-motorola
53976888252Smrg		;;
54076888252Smrg	delta88)
54176888252Smrg		basic_machine=m88k-motorola
54276888252Smrg		os=-sysv3
54376888252Smrg		;;
5441ae1b5e8Smrg	dicos)
5451ae1b5e8Smrg		basic_machine=i686-pc
5461ae1b5e8Smrg		os=-dicos
5471ae1b5e8Smrg		;;
5481ae1b5e8Smrg	djgpp)
5491ae1b5e8Smrg		basic_machine=i586-pc
5501ae1b5e8Smrg		os=-msdosdjgpp
5511ae1b5e8Smrg		;;
55276888252Smrg	dpx20 | dpx20-*)
55376888252Smrg		basic_machine=rs6000-bull
55476888252Smrg		os=-bosx
55576888252Smrg		;;
55676888252Smrg	dpx2* | dpx2*-bull)
55776888252Smrg		basic_machine=m68k-bull
55876888252Smrg		os=-sysv3
55976888252Smrg		;;
56076888252Smrg	ebmon29k)
56176888252Smrg		basic_machine=a29k-amd
56276888252Smrg		os=-ebmon
56376888252Smrg		;;
56476888252Smrg	elxsi)
56576888252Smrg		basic_machine=elxsi-elxsi
56676888252Smrg		os=-bsd
56776888252Smrg		;;
56876888252Smrg	encore | umax | mmax)
56976888252Smrg		basic_machine=ns32k-encore
57076888252Smrg		;;
57176888252Smrg	es1800 | OSE68k | ose68k | ose | OSE)
57276888252Smrg		basic_machine=m68k-ericsson
57376888252Smrg		os=-ose
57476888252Smrg		;;
57576888252Smrg	fx2800)
57676888252Smrg		basic_machine=i860-alliant
57776888252Smrg		;;
57876888252Smrg	genix)
57976888252Smrg		basic_machine=ns32k-ns
58076888252Smrg		;;
58176888252Smrg	gmicro)
58276888252Smrg		basic_machine=tron-gmicro
58376888252Smrg		os=-sysv
58476888252Smrg		;;
58576888252Smrg	go32)
58676888252Smrg		basic_machine=i386-pc
58776888252Smrg		os=-go32
58876888252Smrg		;;
58976888252Smrg	h3050r* | hiux*)
59076888252Smrg		basic_machine=hppa1.1-hitachi
59176888252Smrg		os=-hiuxwe2
59276888252Smrg		;;
59376888252Smrg	h8300hms)
59476888252Smrg		basic_machine=h8300-hitachi
59576888252Smrg		os=-hms
59676888252Smrg		;;
59776888252Smrg	h8300xray)
59876888252Smrg		basic_machine=h8300-hitachi
59976888252Smrg		os=-xray
60076888252Smrg		;;
60176888252Smrg	h8500hms)
60276888252Smrg		basic_machine=h8500-hitachi
60376888252Smrg		os=-hms
60476888252Smrg		;;
60576888252Smrg	harris)
60676888252Smrg		basic_machine=m88k-harris
60776888252Smrg		os=-sysv3
60876888252Smrg		;;
60976888252Smrg	hp300-*)
61076888252Smrg		basic_machine=m68k-hp
61176888252Smrg		;;
61276888252Smrg	hp300bsd)
61376888252Smrg		basic_machine=m68k-hp
61476888252Smrg		os=-bsd
61576888252Smrg		;;
61676888252Smrg	hp300hpux)
61776888252Smrg		basic_machine=m68k-hp
61876888252Smrg		os=-hpux
61976888252Smrg		;;
62076888252Smrg	hp3k9[0-9][0-9] | hp9[0-9][0-9])
62176888252Smrg		basic_machine=hppa1.0-hp
62276888252Smrg		;;
62376888252Smrg	hp9k2[0-9][0-9] | hp9k31[0-9])
62476888252Smrg		basic_machine=m68000-hp
62576888252Smrg		;;
62676888252Smrg	hp9k3[2-9][0-9])
62776888252Smrg		basic_machine=m68k-hp
62876888252Smrg		;;
62976888252Smrg	hp9k6[0-9][0-9] | hp6[0-9][0-9])
63076888252Smrg		basic_machine=hppa1.0-hp
63176888252Smrg		;;
63276888252Smrg	hp9k7[0-79][0-9] | hp7[0-79][0-9])
63376888252Smrg		basic_machine=hppa1.1-hp
63476888252Smrg		;;
63576888252Smrg	hp9k78[0-9] | hp78[0-9])
63676888252Smrg		# FIXME: really hppa2.0-hp
63776888252Smrg		basic_machine=hppa1.1-hp
63876888252Smrg		;;
63976888252Smrg	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
64076888252Smrg		# FIXME: really hppa2.0-hp
64176888252Smrg		basic_machine=hppa1.1-hp
64276888252Smrg		;;
64376888252Smrg	hp9k8[0-9][13679] | hp8[0-9][13679])
64476888252Smrg		basic_machine=hppa1.1-hp
64576888252Smrg		;;
64676888252Smrg	hp9k8[0-9][0-9] | hp8[0-9][0-9])
64776888252Smrg		basic_machine=hppa1.0-hp
64876888252Smrg		;;
64976888252Smrg	hppa-next)
65076888252Smrg		os=-nextstep3
65176888252Smrg		;;
65276888252Smrg	hppaosf)
65376888252Smrg		basic_machine=hppa1.1-hp
65476888252Smrg		os=-osf
65576888252Smrg		;;
65676888252Smrg	hppro)
65776888252Smrg		basic_machine=hppa1.1-hp
65876888252Smrg		os=-proelf
65976888252Smrg		;;
66076888252Smrg	i370-ibm* | ibm*)
66176888252Smrg		basic_machine=i370-ibm
66276888252Smrg		;;
66376888252Smrg# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
66476888252Smrg	i*86v32)
66576888252Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
66676888252Smrg		os=-sysv32
66776888252Smrg		;;
66876888252Smrg	i*86v4*)
66976888252Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
67076888252Smrg		os=-sysv4
67176888252Smrg		;;
67276888252Smrg	i*86v)
67376888252Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
67476888252Smrg		os=-sysv
67576888252Smrg		;;
67676888252Smrg	i*86sol2)
67776888252Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
67876888252Smrg		os=-solaris2
67976888252Smrg		;;
68076888252Smrg	i386mach)
68176888252Smrg		basic_machine=i386-mach
68276888252Smrg		os=-mach
68376888252Smrg		;;
68476888252Smrg	i386-vsta | vsta)
68576888252Smrg		basic_machine=i386-unknown
68676888252Smrg		os=-vsta
68776888252Smrg		;;
68876888252Smrg	iris | iris4d)
68976888252Smrg		basic_machine=mips-sgi
69076888252Smrg		case $os in
69176888252Smrg		    -irix*)
69276888252Smrg			;;
69376888252Smrg		    *)
69476888252Smrg			os=-irix4
69576888252Smrg			;;
69676888252Smrg		esac
69776888252Smrg		;;
69876888252Smrg	isi68 | isi)
69976888252Smrg		basic_machine=m68k-isi
70076888252Smrg		os=-sysv
70176888252Smrg		;;
7021ae1b5e8Smrg	m68knommu)
7031ae1b5e8Smrg		basic_machine=m68k-unknown
7041ae1b5e8Smrg		os=-linux
7051ae1b5e8Smrg		;;
7061ae1b5e8Smrg	m68knommu-*)
7071ae1b5e8Smrg		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
7081ae1b5e8Smrg		os=-linux
7091ae1b5e8Smrg		;;
71076888252Smrg	m88k-omron*)
71176888252Smrg		basic_machine=m88k-omron
71276888252Smrg		;;
71376888252Smrg	magnum | m3230)
71476888252Smrg		basic_machine=mips-mips
71576888252Smrg		os=-sysv
71676888252Smrg		;;
71776888252Smrg	merlin)
71876888252Smrg		basic_machine=ns32k-utek
71976888252Smrg		os=-sysv
72076888252Smrg		;;
72176888252Smrg	mingw32)
72276888252Smrg		basic_machine=i386-pc
72376888252Smrg		os=-mingw32
72476888252Smrg		;;
7251ae1b5e8Smrg	mingw32ce)
7261ae1b5e8Smrg		basic_machine=arm-unknown
7271ae1b5e8Smrg		os=-mingw32ce
7281ae1b5e8Smrg		;;
72976888252Smrg	miniframe)
73076888252Smrg		basic_machine=m68000-convergent
73176888252Smrg		;;
73276888252Smrg	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
73376888252Smrg		basic_machine=m68k-atari
73476888252Smrg		os=-mint
73576888252Smrg		;;
73676888252Smrg	mips3*-*)
73776888252Smrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
73876888252Smrg		;;
73976888252Smrg	mips3*)
74076888252Smrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
74176888252Smrg		;;
74276888252Smrg	monitor)
74376888252Smrg		basic_machine=m68k-rom68k
74476888252Smrg		os=-coff
74576888252Smrg		;;
74676888252Smrg	morphos)
74776888252Smrg		basic_machine=powerpc-unknown
74876888252Smrg		os=-morphos
74976888252Smrg		;;
75076888252Smrg	msdos)
75176888252Smrg		basic_machine=i386-pc
75276888252Smrg		os=-msdos
75376888252Smrg		;;
7541ae1b5e8Smrg	ms1-*)
7551ae1b5e8Smrg		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
7561ae1b5e8Smrg		;;
75776888252Smrg	mvs)
75876888252Smrg		basic_machine=i370-ibm
75976888252Smrg		os=-mvs
76076888252Smrg		;;
76176888252Smrg	ncr3000)
76276888252Smrg		basic_machine=i486-ncr
76376888252Smrg		os=-sysv4
76476888252Smrg		;;
76576888252Smrg	netbsd386)
76676888252Smrg		basic_machine=i386-unknown
76776888252Smrg		os=-netbsd
76876888252Smrg		;;
76976888252Smrg	netwinder)
77076888252Smrg		basic_machine=armv4l-rebel
77176888252Smrg		os=-linux
77276888252Smrg		;;
77376888252Smrg	news | news700 | news800 | news900)
77476888252Smrg		basic_machine=m68k-sony
77576888252Smrg		os=-newsos
77676888252Smrg		;;
77776888252Smrg	news1000)
77876888252Smrg		basic_machine=m68030-sony
77976888252Smrg		os=-newsos
78076888252Smrg		;;
78176888252Smrg	news-3600 | risc-news)
78276888252Smrg		basic_machine=mips-sony
78376888252Smrg		os=-newsos
78476888252Smrg		;;
78576888252Smrg	necv70)
78676888252Smrg		basic_machine=v70-nec
78776888252Smrg		os=-sysv
78876888252Smrg		;;
78976888252Smrg	next | m*-next )
79076888252Smrg		basic_machine=m68k-next
79176888252Smrg		case $os in
79276888252Smrg		    -nextstep* )
79376888252Smrg			;;
79476888252Smrg		    -ns2*)
79576888252Smrg		      os=-nextstep2
79676888252Smrg			;;
79776888252Smrg		    *)
79876888252Smrg		      os=-nextstep3
79976888252Smrg			;;
80076888252Smrg		esac
80176888252Smrg		;;
80276888252Smrg	nh3000)
80376888252Smrg		basic_machine=m68k-harris
80476888252Smrg		os=-cxux
80576888252Smrg		;;
80676888252Smrg	nh[45]000)
80776888252Smrg		basic_machine=m88k-harris
80876888252Smrg		os=-cxux
80976888252Smrg		;;
81076888252Smrg	nindy960)
81176888252Smrg		basic_machine=i960-intel
81276888252Smrg		os=-nindy
81376888252Smrg		;;
81476888252Smrg	mon960)
81576888252Smrg		basic_machine=i960-intel
81676888252Smrg		os=-mon960
81776888252Smrg		;;
81876888252Smrg	nonstopux)
81976888252Smrg		basic_machine=mips-compaq
82076888252Smrg		os=-nonstopux
82176888252Smrg		;;
82276888252Smrg	np1)
82376888252Smrg		basic_machine=np1-gould
82476888252Smrg		;;
82576888252Smrg	nsr-tandem)
82676888252Smrg		basic_machine=nsr-tandem
82776888252Smrg		;;
82876888252Smrg	op50n-* | op60c-*)
82976888252Smrg		basic_machine=hppa1.1-oki
83076888252Smrg		os=-proelf
83176888252Smrg		;;
8321ae1b5e8Smrg	openrisc | openrisc-*)
83376888252Smrg		basic_machine=or32-unknown
8341ae1b5e8Smrg		;;
8351ae1b5e8Smrg	os400)
8361ae1b5e8Smrg		basic_machine=powerpc-ibm
8371ae1b5e8Smrg		os=-os400
83876888252Smrg		;;
83976888252Smrg	OSE68000 | ose68000)
84076888252Smrg		basic_machine=m68000-ericsson
84176888252Smrg		os=-ose
84276888252Smrg		;;
84376888252Smrg	os68k)
84476888252Smrg		basic_machine=m68k-none
84576888252Smrg		os=-os68k
84676888252Smrg		;;
84776888252Smrg	pa-hitachi)
84876888252Smrg		basic_machine=hppa1.1-hitachi
84976888252Smrg		os=-hiuxwe2
85076888252Smrg		;;
85176888252Smrg	paragon)
85276888252Smrg		basic_machine=i860-intel
85376888252Smrg		os=-osf
85476888252Smrg		;;
8551ae1b5e8Smrg	parisc)
8561ae1b5e8Smrg		basic_machine=hppa-unknown
8571ae1b5e8Smrg		os=-linux
8581ae1b5e8Smrg		;;
8591ae1b5e8Smrg	parisc-*)
8601ae1b5e8Smrg		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
8611ae1b5e8Smrg		os=-linux
8621ae1b5e8Smrg		;;
86376888252Smrg	pbd)
86476888252Smrg		basic_machine=sparc-tti
86576888252Smrg		;;
86676888252Smrg	pbb)
86776888252Smrg		basic_machine=m68k-tti
86876888252Smrg		;;
86976888252Smrg	pc532 | pc532-*)
87076888252Smrg		basic_machine=ns32k-pc532
87176888252Smrg		;;
8721ae1b5e8Smrg	pc98)
8731ae1b5e8Smrg		basic_machine=i386-pc
8741ae1b5e8Smrg		;;
8751ae1b5e8Smrg	pc98-*)
8761ae1b5e8Smrg		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
8771ae1b5e8Smrg		;;
87876888252Smrg	pentium | p5 | k5 | k6 | nexgen | viac3)
87976888252Smrg		basic_machine=i586-pc
88076888252Smrg		;;
88176888252Smrg	pentiumpro | p6 | 6x86 | athlon | athlon_*)
88276888252Smrg		basic_machine=i686-pc
88376888252Smrg		;;
88476888252Smrg	pentiumii | pentium2 | pentiumiii | pentium3)
88576888252Smrg		basic_machine=i686-pc
88676888252Smrg		;;
88776888252Smrg	pentium4)
88876888252Smrg		basic_machine=i786-pc
88976888252Smrg		;;
89076888252Smrg	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
89176888252Smrg		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
89276888252Smrg		;;
89376888252Smrg	pentiumpro-* | p6-* | 6x86-* | athlon-*)
89476888252Smrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
89576888252Smrg		;;
89676888252Smrg	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
89776888252Smrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
89876888252Smrg		;;
89976888252Smrg	pentium4-*)
90076888252Smrg		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
90176888252Smrg		;;
90276888252Smrg	pn)
90376888252Smrg		basic_machine=pn-gould
90476888252Smrg		;;
90576888252Smrg	power)	basic_machine=power-ibm
90676888252Smrg		;;
90776888252Smrg	ppc)	basic_machine=powerpc-unknown
90876888252Smrg		;;
90976888252Smrg	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
91076888252Smrg		;;
91176888252Smrg	ppcle | powerpclittle | ppc-le | powerpc-little)
91276888252Smrg		basic_machine=powerpcle-unknown
91376888252Smrg		;;
91476888252Smrg	ppcle-* | powerpclittle-*)
91576888252Smrg		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
91676888252Smrg		;;
91776888252Smrg	ppc64)	basic_machine=powerpc64-unknown
91876888252Smrg		;;
91976888252Smrg	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
92076888252Smrg		;;
92176888252Smrg	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
92276888252Smrg		basic_machine=powerpc64le-unknown
92376888252Smrg		;;
92476888252Smrg	ppc64le-* | powerpc64little-*)
92576888252Smrg		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
92676888252Smrg		;;
92776888252Smrg	ps2)
92876888252Smrg		basic_machine=i386-ibm
92976888252Smrg		;;
93076888252Smrg	pw32)
93176888252Smrg		basic_machine=i586-unknown
93276888252Smrg		os=-pw32
93376888252Smrg		;;
9341ae1b5e8Smrg	rdos)
9351ae1b5e8Smrg		basic_machine=i386-pc
9361ae1b5e8Smrg		os=-rdos
9371ae1b5e8Smrg		;;
93876888252Smrg	rom68k)
93976888252Smrg		basic_machine=m68k-rom68k
94076888252Smrg		os=-coff
94176888252Smrg		;;
94276888252Smrg	rm[46]00)
94376888252Smrg		basic_machine=mips-siemens
94476888252Smrg		;;
94576888252Smrg	rtpc | rtpc-*)
94676888252Smrg		basic_machine=romp-ibm
94776888252Smrg		;;
9481ae1b5e8Smrg	s390 | s390-*)
9491ae1b5e8Smrg		basic_machine=s390-ibm
9501ae1b5e8Smrg		;;
9511ae1b5e8Smrg	s390x | s390x-*)
9521ae1b5e8Smrg		basic_machine=s390x-ibm
9531ae1b5e8Smrg		;;
95476888252Smrg	sa29200)
95576888252Smrg		basic_machine=a29k-amd
95676888252Smrg		os=-udi
95776888252Smrg		;;
95876888252Smrg	sb1)
95976888252Smrg		basic_machine=mipsisa64sb1-unknown
96076888252Smrg		;;
96176888252Smrg	sb1el)
96276888252Smrg		basic_machine=mipsisa64sb1el-unknown
96376888252Smrg		;;
9641ae1b5e8Smrg	sde)
9651ae1b5e8Smrg		basic_machine=mipsisa32-sde
9661ae1b5e8Smrg		os=-elf
9671ae1b5e8Smrg		;;
96876888252Smrg	sei)
96976888252Smrg		basic_machine=mips-sei
97076888252Smrg		os=-seiux
97176888252Smrg		;;
97276888252Smrg	sequent)
97376888252Smrg		basic_machine=i386-sequent
97476888252Smrg		;;
97576888252Smrg	sh)
97676888252Smrg		basic_machine=sh-hitachi
97776888252Smrg		os=-hms
97876888252Smrg		;;
9791ae1b5e8Smrg	sh5el)
9801ae1b5e8Smrg		basic_machine=sh5le-unknown
9811ae1b5e8Smrg		;;
98276888252Smrg	sh64)
98376888252Smrg		basic_machine=sh64-unknown
98476888252Smrg		;;
98576888252Smrg	sparclite-wrs | simso-wrs)
98676888252Smrg		basic_machine=sparclite-wrs
98776888252Smrg		os=-vxworks
98876888252Smrg		;;
98976888252Smrg	sps7)
99076888252Smrg		basic_machine=m68k-bull
99176888252Smrg		os=-sysv2
99276888252Smrg		;;
99376888252Smrg	spur)
99476888252Smrg		basic_machine=spur-unknown
99576888252Smrg		;;
99676888252Smrg	st2000)
99776888252Smrg		basic_machine=m68k-tandem
99876888252Smrg		;;
99976888252Smrg	stratus)
100076888252Smrg		basic_machine=i860-stratus
100176888252Smrg		os=-sysv4
100276888252Smrg		;;
100376888252Smrg	sun2)
100476888252Smrg		basic_machine=m68000-sun
100576888252Smrg		;;
100676888252Smrg	sun2os3)
100776888252Smrg		basic_machine=m68000-sun
100876888252Smrg		os=-sunos3
100976888252Smrg		;;
101076888252Smrg	sun2os4)
101176888252Smrg		basic_machine=m68000-sun
101276888252Smrg		os=-sunos4
101376888252Smrg		;;
101476888252Smrg	sun3os3)
101576888252Smrg		basic_machine=m68k-sun
101676888252Smrg		os=-sunos3
101776888252Smrg		;;
101876888252Smrg	sun3os4)
101976888252Smrg		basic_machine=m68k-sun
102076888252Smrg		os=-sunos4
102176888252Smrg		;;
102276888252Smrg	sun4os3)
102376888252Smrg		basic_machine=sparc-sun
102476888252Smrg		os=-sunos3
102576888252Smrg		;;
102676888252Smrg	sun4os4)
102776888252Smrg		basic_machine=sparc-sun
102876888252Smrg		os=-sunos4
102976888252Smrg		;;
103076888252Smrg	sun4sol2)
103176888252Smrg		basic_machine=sparc-sun
103276888252Smrg		os=-solaris2
103376888252Smrg		;;
103476888252Smrg	sun3 | sun3-*)
103576888252Smrg		basic_machine=m68k-sun
103676888252Smrg		;;
103776888252Smrg	sun4)
103876888252Smrg		basic_machine=sparc-sun
103976888252Smrg		;;
104076888252Smrg	sun386 | sun386i | roadrunner)
104176888252Smrg		basic_machine=i386-sun
104276888252Smrg		;;
104376888252Smrg	sv1)
104476888252Smrg		basic_machine=sv1-cray
104576888252Smrg		os=-unicos
104676888252Smrg		;;
104776888252Smrg	symmetry)
104876888252Smrg		basic_machine=i386-sequent
104976888252Smrg		os=-dynix
105076888252Smrg		;;
105176888252Smrg	t3e)
105276888252Smrg		basic_machine=alphaev5-cray
105376888252Smrg		os=-unicos
105476888252Smrg		;;
105576888252Smrg	t90)
105676888252Smrg		basic_machine=t90-cray
105776888252Smrg		os=-unicos
105876888252Smrg		;;
105976888252Smrg	tic54x | c54x*)
106076888252Smrg		basic_machine=tic54x-unknown
106176888252Smrg		os=-coff
106276888252Smrg		;;
106376888252Smrg	tic55x | c55x*)
106476888252Smrg		basic_machine=tic55x-unknown
106576888252Smrg		os=-coff
106676888252Smrg		;;
106776888252Smrg	tic6x | c6x*)
106876888252Smrg		basic_machine=tic6x-unknown
106976888252Smrg		os=-coff
107076888252Smrg		;;
10711ae1b5e8Smrg	tile*)
10721ae1b5e8Smrg		basic_machine=tile-unknown
10731ae1b5e8Smrg		os=-linux-gnu
10741ae1b5e8Smrg		;;
107576888252Smrg	tx39)
107676888252Smrg		basic_machine=mipstx39-unknown
107776888252Smrg		;;
107876888252Smrg	tx39el)
107976888252Smrg		basic_machine=mipstx39el-unknown
108076888252Smrg		;;
108176888252Smrg	toad1)
108276888252Smrg		basic_machine=pdp10-xkl
108376888252Smrg		os=-tops20
108476888252Smrg		;;
108576888252Smrg	tower | tower-32)
108676888252Smrg		basic_machine=m68k-ncr
108776888252Smrg		;;
10881ae1b5e8Smrg	tpf)
10891ae1b5e8Smrg		basic_machine=s390x-ibm
10901ae1b5e8Smrg		os=-tpf
10911ae1b5e8Smrg		;;
109276888252Smrg	udi29k)
109376888252Smrg		basic_machine=a29k-amd
109476888252Smrg		os=-udi
109576888252Smrg		;;
109676888252Smrg	ultra3)
109776888252Smrg		basic_machine=a29k-nyu
109876888252Smrg		os=-sym1
109976888252Smrg		;;
110076888252Smrg	v810 | necv810)
110176888252Smrg		basic_machine=v810-nec
110276888252Smrg		os=-none
110376888252Smrg		;;
110476888252Smrg	vaxv)
110576888252Smrg		basic_machine=vax-dec
110676888252Smrg		os=-sysv
110776888252Smrg		;;
110876888252Smrg	vms)
110976888252Smrg		basic_machine=vax-dec
111076888252Smrg		os=-vms
111176888252Smrg		;;
111276888252Smrg	vpp*|vx|vx-*)
111376888252Smrg		basic_machine=f301-fujitsu
111476888252Smrg		;;
111576888252Smrg	vxworks960)
111676888252Smrg		basic_machine=i960-wrs
111776888252Smrg		os=-vxworks
111876888252Smrg		;;
111976888252Smrg	vxworks68)
112076888252Smrg		basic_machine=m68k-wrs
112176888252Smrg		os=-vxworks
112276888252Smrg		;;
112376888252Smrg	vxworks29k)
112476888252Smrg		basic_machine=a29k-wrs
112576888252Smrg		os=-vxworks
112676888252Smrg		;;
112776888252Smrg	w65*)
112876888252Smrg		basic_machine=w65-wdc
112976888252Smrg		os=-none
113076888252Smrg		;;
113176888252Smrg	w89k-*)
113276888252Smrg		basic_machine=hppa1.1-winbond
113376888252Smrg		os=-proelf
113476888252Smrg		;;
11351ae1b5e8Smrg	xbox)
11361ae1b5e8Smrg		basic_machine=i686-pc
11371ae1b5e8Smrg		os=-mingw32
11381ae1b5e8Smrg		;;
113976888252Smrg	xps | xps100)
114076888252Smrg		basic_machine=xps100-honeywell
114176888252Smrg		;;
114276888252Smrg	ymp)
114376888252Smrg		basic_machine=ymp-cray
114476888252Smrg		os=-unicos
114576888252Smrg		;;
114676888252Smrg	z8k-*-coff)
114776888252Smrg		basic_machine=z8k-unknown
114876888252Smrg		os=-sim
114976888252Smrg		;;
11501ae1b5e8Smrg	z80-*-coff)
11511ae1b5e8Smrg		basic_machine=z80-unknown
11521ae1b5e8Smrg		os=-sim
11531ae1b5e8Smrg		;;
115476888252Smrg	none)
115576888252Smrg		basic_machine=none-none
115676888252Smrg		os=-none
115776888252Smrg		;;
115876888252Smrg
115976888252Smrg# Here we handle the default manufacturer of certain CPU types.  It is in
116076888252Smrg# some cases the only manufacturer, in others, it is the most popular.
116176888252Smrg	w89k)
116276888252Smrg		basic_machine=hppa1.1-winbond
116376888252Smrg		;;
116476888252Smrg	op50n)
116576888252Smrg		basic_machine=hppa1.1-oki
116676888252Smrg		;;
116776888252Smrg	op60c)
116876888252Smrg		basic_machine=hppa1.1-oki
116976888252Smrg		;;
117076888252Smrg	romp)
117176888252Smrg		basic_machine=romp-ibm
117276888252Smrg		;;
11731ae1b5e8Smrg	mmix)
11741ae1b5e8Smrg		basic_machine=mmix-knuth
11751ae1b5e8Smrg		;;
117676888252Smrg	rs6000)
117776888252Smrg		basic_machine=rs6000-ibm
117876888252Smrg		;;
117976888252Smrg	vax)
118076888252Smrg		basic_machine=vax-dec
118176888252Smrg		;;
118276888252Smrg	pdp10)
118376888252Smrg		# there are many clones, so DEC is not a safe bet
118476888252Smrg		basic_machine=pdp10-unknown
118576888252Smrg		;;
118676888252Smrg	pdp11)
118776888252Smrg		basic_machine=pdp11-dec
118876888252Smrg		;;
118976888252Smrg	we32k)
119076888252Smrg		basic_machine=we32k-att
119176888252Smrg		;;
11921ae1b5e8Smrg	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
119376888252Smrg		basic_machine=sh-unknown
119476888252Smrg		;;
11951ae1b5e8Smrg	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
119676888252Smrg		basic_machine=sparc-sun
119776888252Smrg		;;
119876888252Smrg	cydra)
119976888252Smrg		basic_machine=cydra-cydrome
120076888252Smrg		;;
120176888252Smrg	orion)
120276888252Smrg		basic_machine=orion-highlevel
120376888252Smrg		;;
120476888252Smrg	orion105)
120576888252Smrg		basic_machine=clipper-highlevel
120676888252Smrg		;;
120776888252Smrg	mac | mpw | mac-mpw)
120876888252Smrg		basic_machine=m68k-apple
120976888252Smrg		;;
121076888252Smrg	pmac | pmac-mpw)
121176888252Smrg		basic_machine=powerpc-apple
121276888252Smrg		;;
121376888252Smrg	*-unknown)
121476888252Smrg		# Make sure to match an already-canonicalized machine name.
121576888252Smrg		;;
121676888252Smrg	*)
121776888252Smrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
121876888252Smrg		exit 1
121976888252Smrg		;;
122076888252Smrgesac
122176888252Smrg
122276888252Smrg# Here we canonicalize certain aliases for manufacturers.
122376888252Smrgcase $basic_machine in
122476888252Smrg	*-digital*)
122576888252Smrg		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
122676888252Smrg		;;
122776888252Smrg	*-commodore*)
122876888252Smrg		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
122976888252Smrg		;;
123076888252Smrg	*)
123176888252Smrg		;;
123276888252Smrgesac
123376888252Smrg
123476888252Smrg# Decode manufacturer-specific aliases for certain operating systems.
123576888252Smrg
123676888252Smrgif [ x"$os" != x"" ]
123776888252Smrgthen
123876888252Smrgcase $os in
123976888252Smrg        # First match some system type aliases
124076888252Smrg        # that might get confused with valid system types.
124176888252Smrg	# -solaris* is a basic system type, with this one exception.
124276888252Smrg	-solaris1 | -solaris1.*)
124376888252Smrg		os=`echo $os | sed -e 's|solaris1|sunos4|'`
124476888252Smrg		;;
124576888252Smrg	-solaris)
124676888252Smrg		os=-solaris2
124776888252Smrg		;;
124876888252Smrg	-svr4*)
124976888252Smrg		os=-sysv4
125076888252Smrg		;;
125176888252Smrg	-unixware*)
125276888252Smrg		os=-sysv4.2uw
125376888252Smrg		;;
125476888252Smrg	-gnu/linux*)
125576888252Smrg		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
125676888252Smrg		;;
125776888252Smrg	# First accept the basic system types.
125876888252Smrg	# The portable systems comes first.
125976888252Smrg	# Each alternative MUST END IN A *, to match a version number.
126076888252Smrg	# -sysv* is not here because it comes later, after sysvr4.
126176888252Smrg	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
126276888252Smrg	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
126376888252Smrg	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
12641ae1b5e8Smrg	      | -kopensolaris* \
126576888252Smrg	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
12661ae1b5e8Smrg	      | -aos* | -aros* \
126776888252Smrg	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
126876888252Smrg	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
12691ae1b5e8Smrg	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
12701ae1b5e8Smrg	      | -openbsd* | -solidbsd* \
12711ae1b5e8Smrg	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
12721ae1b5e8Smrg	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
127376888252Smrg	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
127476888252Smrg	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
12751ae1b5e8Smrg	      | -chorusos* | -chorusrdb* | -cegcc* \
127676888252Smrg	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
12771ae1b5e8Smrg	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
12781ae1b5e8Smrg	      | -uxpv* | -beos* | -mpeix* | -udk* \
127976888252Smrg	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
128076888252Smrg	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
128176888252Smrg	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
128276888252Smrg	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
128376888252Smrg	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
12841ae1b5e8Smrg	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
12851ae1b5e8Smrg	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
128676888252Smrg	# Remember, each alternative MUST END IN *, to match a version number.
128776888252Smrg		;;
128876888252Smrg	-qnx*)
128976888252Smrg		case $basic_machine in
129076888252Smrg		    x86-* | i*86-*)
129176888252Smrg			;;
129276888252Smrg		    *)
129376888252Smrg			os=-nto$os
129476888252Smrg			;;
129576888252Smrg		esac
129676888252Smrg		;;
129776888252Smrg	-nto-qnx*)
129876888252Smrg		;;
129976888252Smrg	-nto*)
130076888252Smrg		os=`echo $os | sed -e 's|nto|nto-qnx|'`
130176888252Smrg		;;
130276888252Smrg	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
13031ae1b5e8Smrg	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
130476888252Smrg	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
130576888252Smrg		;;
130676888252Smrg	-mac*)
130776888252Smrg		os=`echo $os | sed -e 's|mac|macos|'`
130876888252Smrg		;;
13091ae1b5e8Smrg	-linux-dietlibc)
13101ae1b5e8Smrg		os=-linux-dietlibc
13111ae1b5e8Smrg		;;
131276888252Smrg	-linux*)
131376888252Smrg		os=`echo $os | sed -e 's|linux|linux-gnu|'`
131476888252Smrg		;;
131576888252Smrg	-sunos5*)
131676888252Smrg		os=`echo $os | sed -e 's|sunos5|solaris2|'`
131776888252Smrg		;;
131876888252Smrg	-sunos6*)
131976888252Smrg		os=`echo $os | sed -e 's|sunos6|solaris3|'`
132076888252Smrg		;;
132176888252Smrg	-opened*)
132276888252Smrg		os=-openedition
132376888252Smrg		;;
13241ae1b5e8Smrg        -os400*)
13251ae1b5e8Smrg		os=-os400
13261ae1b5e8Smrg		;;
132776888252Smrg	-wince*)
132876888252Smrg		os=-wince
132976888252Smrg		;;
133076888252Smrg	-osfrose*)
133176888252Smrg		os=-osfrose
133276888252Smrg		;;
133376888252Smrg	-osf*)
133476888252Smrg		os=-osf
133576888252Smrg		;;
133676888252Smrg	-utek*)
133776888252Smrg		os=-bsd
133876888252Smrg		;;
133976888252Smrg	-dynix*)
134076888252Smrg		os=-bsd
134176888252Smrg		;;
134276888252Smrg	-acis*)
134376888252Smrg		os=-aos
134476888252Smrg		;;
134576888252Smrg	-atheos*)
134676888252Smrg		os=-atheos
134776888252Smrg		;;
13481ae1b5e8Smrg	-syllable*)
13491ae1b5e8Smrg		os=-syllable
13501ae1b5e8Smrg		;;
135176888252Smrg	-386bsd)
135276888252Smrg		os=-bsd
135376888252Smrg		;;
135476888252Smrg	-ctix* | -uts*)
135576888252Smrg		os=-sysv
135676888252Smrg		;;
135776888252Smrg	-nova*)
135876888252Smrg		os=-rtmk-nova
135976888252Smrg		;;
136076888252Smrg	-ns2 )
136176888252Smrg		os=-nextstep2
136276888252Smrg		;;
136376888252Smrg	-nsk*)
136476888252Smrg		os=-nsk
136576888252Smrg		;;
136676888252Smrg	# Preserve the version number of sinix5.
136776888252Smrg	-sinix5.*)
136876888252Smrg		os=`echo $os | sed -e 's|sinix|sysv|'`
136976888252Smrg		;;
137076888252Smrg	-sinix*)
137176888252Smrg		os=-sysv4
137276888252Smrg		;;
13731ae1b5e8Smrg        -tpf*)
13741ae1b5e8Smrg		os=-tpf
13751ae1b5e8Smrg		;;
137676888252Smrg	-triton*)
137776888252Smrg		os=-sysv3
137876888252Smrg		;;
137976888252Smrg	-oss*)
138076888252Smrg		os=-sysv3
138176888252Smrg		;;
138276888252Smrg	-svr4)
138376888252Smrg		os=-sysv4
138476888252Smrg		;;
138576888252Smrg	-svr3)
138676888252Smrg		os=-sysv3
138776888252Smrg		;;
138876888252Smrg	-sysvr4)
138976888252Smrg		os=-sysv4
139076888252Smrg		;;
139176888252Smrg	# This must come after -sysvr4.
139276888252Smrg	-sysv*)
139376888252Smrg		;;
139476888252Smrg	-ose*)
139576888252Smrg		os=-ose
139676888252Smrg		;;
139776888252Smrg	-es1800*)
139876888252Smrg		os=-ose
139976888252Smrg		;;
140076888252Smrg	-xenix)
140176888252Smrg		os=-xenix
140276888252Smrg		;;
140376888252Smrg	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
140476888252Smrg		os=-mint
140576888252Smrg		;;
140676888252Smrg	-aros*)
140776888252Smrg		os=-aros
140876888252Smrg		;;
140976888252Smrg	-kaos*)
141076888252Smrg		os=-kaos
141176888252Smrg		;;
14121ae1b5e8Smrg	-zvmoe)
14131ae1b5e8Smrg		os=-zvmoe
14141ae1b5e8Smrg		;;
14151ae1b5e8Smrg	-dicos*)
14161ae1b5e8Smrg		os=-dicos
14171ae1b5e8Smrg		;;
141876888252Smrg	-none)
141976888252Smrg		;;
142076888252Smrg	*)
142176888252Smrg		# Get rid of the `-' at the beginning of $os.
142276888252Smrg		os=`echo $os | sed 's/[^-]*-//'`
142376888252Smrg		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
142476888252Smrg		exit 1
142576888252Smrg		;;
142676888252Smrgesac
142776888252Smrgelse
142876888252Smrg
142976888252Smrg# Here we handle the default operating systems that come with various machines.
143076888252Smrg# The value should be what the vendor currently ships out the door with their
143176888252Smrg# machine or put another way, the most popular os provided with the machine.
143276888252Smrg
143376888252Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say,
143476888252Smrg# "-sun"), then you have to tell the case statement up towards the top
143576888252Smrg# that MANUFACTURER isn't an operating system.  Otherwise, code above
143676888252Smrg# will signal an error saying that MANUFACTURER isn't an operating
143776888252Smrg# system, and we'll never get to this point.
143876888252Smrg
143976888252Smrgcase $basic_machine in
14401ae1b5e8Smrg        score-*)
14411ae1b5e8Smrg		os=-elf
14421ae1b5e8Smrg		;;
14431ae1b5e8Smrg        spu-*)
14441ae1b5e8Smrg		os=-elf
14451ae1b5e8Smrg		;;
144676888252Smrg	*-acorn)
144776888252Smrg		os=-riscix1.2
144876888252Smrg		;;
144976888252Smrg	arm*-rebel)
145076888252Smrg		os=-linux
145176888252Smrg		;;
145276888252Smrg	arm*-semi)
145376888252Smrg		os=-aout
145476888252Smrg		;;
14551ae1b5e8Smrg        c4x-* | tic4x-*)
14561ae1b5e8Smrg        	os=-coff
145776888252Smrg		;;
145876888252Smrg	# This must come before the *-dec entry.
145976888252Smrg	pdp10-*)
146076888252Smrg		os=-tops20
146176888252Smrg		;;
146276888252Smrg	pdp11-*)
146376888252Smrg		os=-none
146476888252Smrg		;;
146576888252Smrg	*-dec | vax-*)
146676888252Smrg		os=-ultrix4.2
146776888252Smrg		;;
146876888252Smrg	m68*-apollo)
146976888252Smrg		os=-domain
147076888252Smrg		;;
147176888252Smrg	i386-sun)
147276888252Smrg		os=-sunos4.0.2
147376888252Smrg		;;
147476888252Smrg	m68000-sun)
147576888252Smrg		os=-sunos3
147676888252Smrg		# This also exists in the configure program, but was not the
147776888252Smrg		# default.
147876888252Smrg		# os=-sunos4
147976888252Smrg		;;
148076888252Smrg	m68*-cisco)
148176888252Smrg		os=-aout
148276888252Smrg		;;
14831ae1b5e8Smrg        mep-*)
14841ae1b5e8Smrg		os=-elf
14851ae1b5e8Smrg		;;
148676888252Smrg	mips*-cisco)
148776888252Smrg		os=-elf
148876888252Smrg		;;
148976888252Smrg	mips*-*)
149076888252Smrg		os=-elf
149176888252Smrg		;;
149276888252Smrg	or32-*)
149376888252Smrg		os=-coff
149476888252Smrg		;;
149576888252Smrg	*-tti)	# must be before sparc entry or we get the wrong os.
149676888252Smrg		os=-sysv3
149776888252Smrg		;;
149876888252Smrg	sparc-* | *-sun)
149976888252Smrg		os=-sunos4.1.1
150076888252Smrg		;;
150176888252Smrg	*-be)
150276888252Smrg		os=-beos
150376888252Smrg		;;
15041ae1b5e8Smrg	*-haiku)
15051ae1b5e8Smrg		os=-haiku
15061ae1b5e8Smrg		;;
150776888252Smrg	*-ibm)
150876888252Smrg		os=-aix
150976888252Smrg		;;
15101ae1b5e8Smrg    	*-knuth)
15111ae1b5e8Smrg		os=-mmixware
15121ae1b5e8Smrg		;;
151376888252Smrg	*-wec)
151476888252Smrg		os=-proelf
151576888252Smrg		;;
151676888252Smrg	*-winbond)
151776888252Smrg		os=-proelf
151876888252Smrg		;;
151976888252Smrg	*-oki)
152076888252Smrg		os=-proelf
152176888252Smrg		;;
152276888252Smrg	*-hp)
152376888252Smrg		os=-hpux
152476888252Smrg		;;
152576888252Smrg	*-hitachi)
152676888252Smrg		os=-hiux
152776888252Smrg		;;
152876888252Smrg	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
152976888252Smrg		os=-sysv
153076888252Smrg		;;
153176888252Smrg	*-cbm)
153276888252Smrg		os=-amigaos
153376888252Smrg		;;
153476888252Smrg	*-dg)
153576888252Smrg		os=-dgux
153676888252Smrg		;;
153776888252Smrg	*-dolphin)
153876888252Smrg		os=-sysv3
153976888252Smrg		;;
154076888252Smrg	m68k-ccur)
154176888252Smrg		os=-rtu
154276888252Smrg		;;
154376888252Smrg	m88k-omron*)
154476888252Smrg		os=-luna
154576888252Smrg		;;
154676888252Smrg	*-next )
154776888252Smrg		os=-nextstep
154876888252Smrg		;;
154976888252Smrg	*-sequent)
155076888252Smrg		os=-ptx
155176888252Smrg		;;
155276888252Smrg	*-crds)
155376888252Smrg		os=-unos
155476888252Smrg		;;
155576888252Smrg	*-ns)
155676888252Smrg		os=-genix
155776888252Smrg		;;
155876888252Smrg	i370-*)
155976888252Smrg		os=-mvs
156076888252Smrg		;;
156176888252Smrg	*-next)
156276888252Smrg		os=-nextstep3
156376888252Smrg		;;
156476888252Smrg	*-gould)
156576888252Smrg		os=-sysv
156676888252Smrg		;;
156776888252Smrg	*-highlevel)
156876888252Smrg		os=-bsd
156976888252Smrg		;;
157076888252Smrg	*-encore)
157176888252Smrg		os=-bsd
157276888252Smrg		;;
157376888252Smrg	*-sgi)
157476888252Smrg		os=-irix
157576888252Smrg		;;
157676888252Smrg	*-siemens)
157776888252Smrg		os=-sysv4
157876888252Smrg		;;
157976888252Smrg	*-masscomp)
158076888252Smrg		os=-rtu
158176888252Smrg		;;
158276888252Smrg	f30[01]-fujitsu | f700-fujitsu)
158376888252Smrg		os=-uxpv
158476888252Smrg		;;
158576888252Smrg	*-rom68k)
158676888252Smrg		os=-coff
158776888252Smrg		;;
158876888252Smrg	*-*bug)
158976888252Smrg		os=-coff
159076888252Smrg		;;
159176888252Smrg	*-apple)
159276888252Smrg		os=-macos
159376888252Smrg		;;
159476888252Smrg	*-atari*)
159576888252Smrg		os=-mint
159676888252Smrg		;;
159776888252Smrg	*)
159876888252Smrg		os=-none
159976888252Smrg		;;
160076888252Smrgesac
160176888252Smrgfi
160276888252Smrg
160376888252Smrg# Here we handle the case where we know the os, and the CPU type, but not the
160476888252Smrg# manufacturer.  We pick the logical manufacturer.
160576888252Smrgvendor=unknown
160676888252Smrgcase $basic_machine in
160776888252Smrg	*-unknown)
160876888252Smrg		case $os in
160976888252Smrg			-riscix*)
161076888252Smrg				vendor=acorn
161176888252Smrg				;;
161276888252Smrg			-sunos*)
161376888252Smrg				vendor=sun
161476888252Smrg				;;
161576888252Smrg			-aix*)
161676888252Smrg				vendor=ibm
161776888252Smrg				;;
161876888252Smrg			-beos*)
161976888252Smrg				vendor=be
162076888252Smrg				;;
162176888252Smrg			-hpux*)
162276888252Smrg				vendor=hp
162376888252Smrg				;;
162476888252Smrg			-mpeix*)
162576888252Smrg				vendor=hp
162676888252Smrg				;;
162776888252Smrg			-hiux*)
162876888252Smrg				vendor=hitachi
162976888252Smrg				;;
163076888252Smrg			-unos*)
163176888252Smrg				vendor=crds
163276888252Smrg				;;
163376888252Smrg			-dgux*)
163476888252Smrg				vendor=dg
163576888252Smrg				;;
163676888252Smrg			-luna*)
163776888252Smrg				vendor=omron
163876888252Smrg				;;
163976888252Smrg			-genix*)
164076888252Smrg				vendor=ns
164176888252Smrg				;;
164276888252Smrg			-mvs* | -opened*)
164376888252Smrg				vendor=ibm
164476888252Smrg				;;
16451ae1b5e8Smrg			-os400*)
16461ae1b5e8Smrg				vendor=ibm
16471ae1b5e8Smrg				;;
164876888252Smrg			-ptx*)
164976888252Smrg				vendor=sequent
165076888252Smrg				;;
16511ae1b5e8Smrg			-tpf*)
16521ae1b5e8Smrg				vendor=ibm
16531ae1b5e8Smrg				;;
165476888252Smrg			-vxsim* | -vxworks* | -windiss*)
165576888252Smrg				vendor=wrs
165676888252Smrg				;;
165776888252Smrg			-aux*)
165876888252Smrg				vendor=apple
165976888252Smrg				;;
166076888252Smrg			-hms*)
166176888252Smrg				vendor=hitachi
166276888252Smrg				;;
166376888252Smrg			-mpw* | -macos*)
166476888252Smrg				vendor=apple
166576888252Smrg				;;
166676888252Smrg			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
166776888252Smrg				vendor=atari
166876888252Smrg				;;
166976888252Smrg			-vos*)
167076888252Smrg				vendor=stratus
167176888252Smrg				;;
167276888252Smrg		esac
167376888252Smrg		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
167476888252Smrg		;;
167576888252Smrgesac
167676888252Smrg
167776888252Smrgecho $basic_machine$os
16781ae1b5e8Smrgexit
167976888252Smrg
168076888252Smrg# Local variables:
168176888252Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
168276888252Smrg# time-stamp-start: "timestamp='"
168376888252Smrg# time-stamp-format: "%:y-%02m-%02d"
168476888252Smrg# time-stamp-end: "'"
168576888252Smrg# End:
1686