config.sub revision e19dfac4
127702724Smrg#! /bin/sh
227702724Smrg# Configuration validation subroutine script.
327702724Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4e19dfac4Smrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5e19dfac4Smrg#   Free Software Foundation, Inc.
627702724Smrg
7e19dfac4Smrgtimestamp='2008-01-16'
827702724Smrg
927702724Smrg# This file is (in principle) common to ALL GNU software.
1027702724Smrg# The presence of a machine in this file suggests that SOME GNU software
1127702724Smrg# can handle that machine.  It does not imply ALL GNU software can.
1227702724Smrg#
1327702724Smrg# This file is free software; you can redistribute it and/or modify
1427702724Smrg# it under the terms of the GNU General Public License as published by
1527702724Smrg# the Free Software Foundation; either version 2 of the License, or
1627702724Smrg# (at your option) any later version.
1727702724Smrg#
1827702724Smrg# This program is distributed in the hope that it will be useful,
1927702724Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
2027702724Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2127702724Smrg# GNU General Public License for more details.
2227702724Smrg#
2327702724Smrg# You should have received a copy of the GNU General Public License
2427702724Smrg# along with this program; if not, write to the Free Software
2527702724Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
2627702724Smrg# 02110-1301, USA.
2727702724Smrg#
2827702724Smrg# As a special exception to the GNU General Public License, if you
2927702724Smrg# distribute this file as part of a program that contains a
3027702724Smrg# configuration script generated by Autoconf, you may include it under
3127702724Smrg# the same distribution terms that you use for the rest of that program.
3227702724Smrg
3327702724Smrg
3427702724Smrg# Please send patches to <config-patches@gnu.org>.  Submit a context
3527702724Smrg# diff and a properly formatted ChangeLog entry.
3627702724Smrg#
3727702724Smrg# Configuration subroutine to validate and canonicalize a configuration type.
3827702724Smrg# Supply the specified configuration type as an argument.
3927702724Smrg# If it is invalid, we print an error message on stderr and exit with code 1.
4027702724Smrg# Otherwise, we print the canonical config type on stdout and succeed.
4127702724Smrg
4227702724Smrg# This file is supposed to be the same for all GNU packages
4327702724Smrg# and recognize all the CPU types, system types and aliases
4427702724Smrg# that are meaningful with *any* GNU software.
4527702724Smrg# Each package is responsible for reporting which valid configurations
4627702724Smrg# it does not support.  The user should be able to distinguish
4727702724Smrg# a failure to support a valid configuration from a meaningless
4827702724Smrg# configuration.
4927702724Smrg
5027702724Smrg# The goal of this file is to map all the various variations of a given
5127702724Smrg# machine specification into a single specification in the form:
5227702724Smrg#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
5327702724Smrg# or in some cases, the newer four-part form:
5427702724Smrg#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
5527702724Smrg# It is wrong to echo any other type of specification.
5627702724Smrg
5727702724Smrgme=`echo "$0" | sed -e 's,.*/,,'`
5827702724Smrg
5927702724Smrgusage="\
6027702724SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS
6127702724Smrg       $0 [OPTION] ALIAS
6227702724Smrg
6327702724SmrgCanonicalize a configuration name.
6427702724Smrg
6527702724SmrgOperation modes:
6627702724Smrg  -h, --help         print this help, then exit
6727702724Smrg  -t, --time-stamp   print date of last modification, then exit
6827702724Smrg  -v, --version      print version number, then exit
6927702724Smrg
7027702724SmrgReport bugs and patches to <config-patches@gnu.org>."
7127702724Smrg
7227702724Smrgversion="\
7327702724SmrgGNU config.sub ($timestamp)
7427702724Smrg
75e19dfac4SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
76e19dfac4Smrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
7727702724Smrg
7827702724SmrgThis is free software; see the source for copying conditions.  There is NO
7927702724Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
8027702724Smrg
8127702724Smrghelp="
8227702724SmrgTry \`$me --help' for more information."
8327702724Smrg
8427702724Smrg# Parse command line
8527702724Smrgwhile test $# -gt 0 ; do
8627702724Smrg  case $1 in
8727702724Smrg    --time-stamp | --time* | -t )
8827702724Smrg       echo "$timestamp" ; exit ;;
8927702724Smrg    --version | -v )
9027702724Smrg       echo "$version" ; exit ;;
9127702724Smrg    --help | --h* | -h )
9227702724Smrg       echo "$usage"; exit ;;
9327702724Smrg    -- )     # Stop option processing
9427702724Smrg       shift; break ;;
9527702724Smrg    - )	# Use stdin as input.
9627702724Smrg       break ;;
9727702724Smrg    -* )
9827702724Smrg       echo "$me: invalid option $1$help"
9927702724Smrg       exit 1 ;;
10027702724Smrg
10127702724Smrg    *local*)
10227702724Smrg       # First pass through any local machine types.
10327702724Smrg       echo $1
10427702724Smrg       exit ;;
10527702724Smrg
10627702724Smrg    * )
10727702724Smrg       break ;;
10827702724Smrg  esac
10927702724Smrgdone
11027702724Smrg
11127702724Smrgcase $# in
11227702724Smrg 0) echo "$me: missing argument$help" >&2
11327702724Smrg    exit 1;;
11427702724Smrg 1) ;;
11527702724Smrg *) echo "$me: too many arguments$help" >&2
11627702724Smrg    exit 1;;
11727702724Smrgesac
11827702724Smrg
11927702724Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
12027702724Smrg# Here we must recognize all the valid KERNEL-OS combinations.
12127702724Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
12227702724Smrgcase $maybe_os in
12327702724Smrg  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
12427702724Smrg  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
12527702724Smrg  storm-chaos* | os2-emx* | rtmk-nova*)
12627702724Smrg    os=-$maybe_os
12727702724Smrg    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
12827702724Smrg    ;;
12927702724Smrg  *)
13027702724Smrg    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
13127702724Smrg    if [ $basic_machine != $1 ]
13227702724Smrg    then os=`echo $1 | sed 's/.*-/-/'`
13327702724Smrg    else os=; fi
13427702724Smrg    ;;
13527702724Smrgesac
13627702724Smrg
13727702724Smrg### Let's recognize common machines as not being operating systems so
13827702724Smrg### that things like config.sub decstation-3100 work.  We also
13927702724Smrg### recognize some manufacturers as not being operating systems, so we
14027702724Smrg### can provide default operating systems below.
14127702724Smrgcase $os in
14227702724Smrg	-sun*os*)
14327702724Smrg		# Prevent following clause from handling this invalid input.
14427702724Smrg		;;
14527702724Smrg	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
14627702724Smrg	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
14727702724Smrg	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
14827702724Smrg	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
14927702724Smrg	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
15027702724Smrg	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
15127702724Smrg	-apple | -axis | -knuth | -cray)
15227702724Smrg		os=
15327702724Smrg		basic_machine=$1
15427702724Smrg		;;
15527702724Smrg	-sim | -cisco | -oki | -wec | -winbond)
15627702724Smrg		os=
15727702724Smrg		basic_machine=$1
15827702724Smrg		;;
15927702724Smrg	-scout)
16027702724Smrg		;;
16127702724Smrg	-wrs)
16227702724Smrg		os=-vxworks
16327702724Smrg		basic_machine=$1
16427702724Smrg		;;
16527702724Smrg	-chorusos*)
16627702724Smrg		os=-chorusos
16727702724Smrg		basic_machine=$1
16827702724Smrg		;;
16927702724Smrg 	-chorusrdb)
17027702724Smrg 		os=-chorusrdb
17127702724Smrg		basic_machine=$1
17227702724Smrg 		;;
17327702724Smrg	-hiux*)
17427702724Smrg		os=-hiuxwe2
17527702724Smrg		;;
17627702724Smrg	-sco6)
17727702724Smrg		os=-sco5v6
17827702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17927702724Smrg		;;
18027702724Smrg	-sco5)
18127702724Smrg		os=-sco3.2v5
18227702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
18327702724Smrg		;;
18427702724Smrg	-sco4)
18527702724Smrg		os=-sco3.2v4
18627702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
18727702724Smrg		;;
18827702724Smrg	-sco3.2.[4-9]*)
18927702724Smrg		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
19027702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19127702724Smrg		;;
19227702724Smrg	-sco3.2v[4-9]*)
19327702724Smrg		# Don't forget version if it is 3.2v4 or newer.
19427702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19527702724Smrg		;;
19627702724Smrg	-sco5v6*)
19727702724Smrg		# Don't forget version if it is 3.2v4 or newer.
19827702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19927702724Smrg		;;
20027702724Smrg	-sco*)
20127702724Smrg		os=-sco3.2v2
20227702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
20327702724Smrg		;;
20427702724Smrg	-udk*)
20527702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
20627702724Smrg		;;
20727702724Smrg	-isc)
20827702724Smrg		os=-isc2.2
20927702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
21027702724Smrg		;;
21127702724Smrg	-clix*)
21227702724Smrg		basic_machine=clipper-intergraph
21327702724Smrg		;;
21427702724Smrg	-isc*)
21527702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
21627702724Smrg		;;
21727702724Smrg	-lynx*)
21827702724Smrg		os=-lynxos
21927702724Smrg		;;
22027702724Smrg	-ptx*)
22127702724Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
22227702724Smrg		;;
22327702724Smrg	-windowsnt*)
22427702724Smrg		os=`echo $os | sed -e 's/windowsnt/winnt/'`
22527702724Smrg		;;
22627702724Smrg	-psos*)
22727702724Smrg		os=-psos
22827702724Smrg		;;
22927702724Smrg	-mint | -mint[0-9]*)
23027702724Smrg		basic_machine=m68k-atari
23127702724Smrg		os=-mint
23227702724Smrg		;;
23327702724Smrgesac
23427702724Smrg
23527702724Smrg# Decode aliases for certain CPU-COMPANY combinations.
23627702724Smrgcase $basic_machine in
23727702724Smrg	# Recognize the basic CPU types without company name.
23827702724Smrg	# Some are omitted here because they have special meanings below.
23927702724Smrg	1750a | 580 \
24027702724Smrg	| a29k \
24127702724Smrg	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
24227702724Smrg	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
24327702724Smrg	| am33_2.0 \
244e19dfac4Smrg	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
24527702724Smrg	| bfin \
24627702724Smrg	| c4x | clipper \
24727702724Smrg	| d10v | d30v | dlx | dsp16xx \
248e19dfac4Smrg	| fido | fr30 | frv \
24927702724Smrg	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
25027702724Smrg	| i370 | i860 | i960 | ia64 \
25127702724Smrg	| ip2k | iq2000 \
252e19dfac4Smrg	| m32c | m32r | m32rle | m68000 | m68k | m88k \
253e19dfac4Smrg	| maxq | mb | microblaze | mcore | mep \
25427702724Smrg	| mips | mipsbe | mipseb | mipsel | mipsle \
25527702724Smrg	| mips16 \
25627702724Smrg	| mips64 | mips64el \
25727702724Smrg	| mips64vr | mips64vrel \
25827702724Smrg	| mips64orion | mips64orionel \
25927702724Smrg	| mips64vr4100 | mips64vr4100el \
26027702724Smrg	| mips64vr4300 | mips64vr4300el \
26127702724Smrg	| mips64vr5000 | mips64vr5000el \
26227702724Smrg	| mips64vr5900 | mips64vr5900el \
26327702724Smrg	| mipsisa32 | mipsisa32el \
26427702724Smrg	| mipsisa32r2 | mipsisa32r2el \
26527702724Smrg	| mipsisa64 | mipsisa64el \
26627702724Smrg	| mipsisa64r2 | mipsisa64r2el \
26727702724Smrg	| mipsisa64sb1 | mipsisa64sb1el \
26827702724Smrg	| mipsisa64sr71k | mipsisa64sr71kel \
26927702724Smrg	| mipstx39 | mipstx39el \
27027702724Smrg	| mn10200 | mn10300 \
27127702724Smrg	| mt \
27227702724Smrg	| msp430 \
27327702724Smrg	| nios | nios2 \
27427702724Smrg	| ns16k | ns32k \
27527702724Smrg	| or32 \
27627702724Smrg	| pdp10 | pdp11 | pj | pjl \
27727702724Smrg	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
27827702724Smrg	| pyramid \
279e19dfac4Smrg	| score \
280e19dfac4Smrg	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
28127702724Smrg	| sh64 | sh64le \
282e19dfac4Smrg	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
283e19dfac4Smrg	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
284e19dfac4Smrg	| spu | strongarm \
28527702724Smrg	| tahoe | thumb | tic4x | tic80 | tron \
28627702724Smrg	| v850 | v850e \
28727702724Smrg	| we32k \
288e19dfac4Smrg	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
28927702724Smrg	| z8k)
29027702724Smrg		basic_machine=$basic_machine-unknown
29127702724Smrg		;;
29227702724Smrg	m6811 | m68hc11 | m6812 | m68hc12)
29327702724Smrg		# Motorola 68HC11/12.
29427702724Smrg		basic_machine=$basic_machine-unknown
29527702724Smrg		os=-none
29627702724Smrg		;;
29727702724Smrg	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
29827702724Smrg		;;
29927702724Smrg	ms1)
30027702724Smrg		basic_machine=mt-unknown
30127702724Smrg		;;
30227702724Smrg
30327702724Smrg	# We use `pc' rather than `unknown'
30427702724Smrg	# because (1) that's what they normally are, and
30527702724Smrg	# (2) the word "unknown" tends to confuse beginning users.
30627702724Smrg	i*86 | x86_64)
30727702724Smrg	  basic_machine=$basic_machine-pc
30827702724Smrg	  ;;
30927702724Smrg	# Object if more than one company name word.
31027702724Smrg	*-*-*)
31127702724Smrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
31227702724Smrg		exit 1
31327702724Smrg		;;
31427702724Smrg	# Recognize the basic CPU types with company name.
31527702724Smrg	580-* \
31627702724Smrg	| a29k-* \
31727702724Smrg	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
31827702724Smrg	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
31927702724Smrg	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
32027702724Smrg	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
321e19dfac4Smrg	| avr-* | avr32-* \
32227702724Smrg	| bfin-* | bs2000-* \
32327702724Smrg	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
32427702724Smrg	| clipper-* | craynv-* | cydra-* \
32527702724Smrg	| d10v-* | d30v-* | dlx-* \
32627702724Smrg	| elxsi-* \
327e19dfac4Smrg	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
32827702724Smrg	| h8300-* | h8500-* \
32927702724Smrg	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
33027702724Smrg	| i*86-* | i860-* | i960-* | ia64-* \
33127702724Smrg	| ip2k-* | iq2000-* \
332e19dfac4Smrg	| m32c-* | m32r-* | m32rle-* \
33327702724Smrg	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
33427702724Smrg	| m88110-* | m88k-* | maxq-* | mcore-* \
33527702724Smrg	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
33627702724Smrg	| mips16-* \
33727702724Smrg	| mips64-* | mips64el-* \
33827702724Smrg	| mips64vr-* | mips64vrel-* \
33927702724Smrg	| mips64orion-* | mips64orionel-* \
34027702724Smrg	| mips64vr4100-* | mips64vr4100el-* \
34127702724Smrg	| mips64vr4300-* | mips64vr4300el-* \
34227702724Smrg	| mips64vr5000-* | mips64vr5000el-* \
34327702724Smrg	| mips64vr5900-* | mips64vr5900el-* \
34427702724Smrg	| mipsisa32-* | mipsisa32el-* \
34527702724Smrg	| mipsisa32r2-* | mipsisa32r2el-* \
34627702724Smrg	| mipsisa64-* | mipsisa64el-* \
34727702724Smrg	| mipsisa64r2-* | mipsisa64r2el-* \
34827702724Smrg	| mipsisa64sb1-* | mipsisa64sb1el-* \
34927702724Smrg	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
35027702724Smrg	| mipstx39-* | mipstx39el-* \
35127702724Smrg	| mmix-* \
35227702724Smrg	| mt-* \
35327702724Smrg	| msp430-* \
35427702724Smrg	| nios-* | nios2-* \
35527702724Smrg	| none-* | np1-* | ns16k-* | ns32k-* \
35627702724Smrg	| orion-* \
35727702724Smrg	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
35827702724Smrg	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
35927702724Smrg	| pyramid-* \
36027702724Smrg	| romp-* | rs6000-* \
361e19dfac4Smrg	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
36227702724Smrg	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
363e19dfac4Smrg	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
36427702724Smrg	| sparclite-* \
365e19dfac4Smrg	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
36627702724Smrg	| tahoe-* | thumb-* \
36727702724Smrg	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
36827702724Smrg	| tron-* \
36927702724Smrg	| v850-* | v850e-* | vax-* \
37027702724Smrg	| we32k-* \
371e19dfac4Smrg	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
372e19dfac4Smrg	| xstormy16-* | xtensa*-* \
37327702724Smrg	| ymp-* \
37427702724Smrg	| z8k-*)
37527702724Smrg		;;
376e19dfac4Smrg	# Recognize the basic CPU types without company name, with glob match.
377e19dfac4Smrg	xtensa*)
378e19dfac4Smrg		basic_machine=$basic_machine-unknown
37927702724Smrg		;;
38027702724Smrg	# Recognize the various machine names and aliases which stand
38127702724Smrg	# for a CPU type and a company and sometimes even an OS.
38227702724Smrg	386bsd)
38327702724Smrg		basic_machine=i386-unknown
38427702724Smrg		os=-bsd
38527702724Smrg		;;
38627702724Smrg	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
38727702724Smrg		basic_machine=m68000-att
38827702724Smrg		;;
38927702724Smrg	3b*)
39027702724Smrg		basic_machine=we32k-att
39127702724Smrg		;;
39227702724Smrg	a29khif)
39327702724Smrg		basic_machine=a29k-amd
39427702724Smrg		os=-udi
39527702724Smrg		;;
39627702724Smrg    	abacus)
39727702724Smrg		basic_machine=abacus-unknown
39827702724Smrg		;;
39927702724Smrg	adobe68k)
40027702724Smrg		basic_machine=m68010-adobe
40127702724Smrg		os=-scout
40227702724Smrg		;;
40327702724Smrg	alliant | fx80)
40427702724Smrg		basic_machine=fx80-alliant
40527702724Smrg		;;
40627702724Smrg	altos | altos3068)
40727702724Smrg		basic_machine=m68k-altos
40827702724Smrg		;;
40927702724Smrg	am29k)
41027702724Smrg		basic_machine=a29k-none
41127702724Smrg		os=-bsd
41227702724Smrg		;;
41327702724Smrg	amd64)
41427702724Smrg		basic_machine=x86_64-pc
41527702724Smrg		;;
41627702724Smrg	amd64-*)
41727702724Smrg		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
41827702724Smrg		;;
41927702724Smrg	amdahl)
42027702724Smrg		basic_machine=580-amdahl
42127702724Smrg		os=-sysv
42227702724Smrg		;;
42327702724Smrg	amiga | amiga-*)
42427702724Smrg		basic_machine=m68k-unknown
42527702724Smrg		;;
42627702724Smrg	amigaos | amigados)
42727702724Smrg		basic_machine=m68k-unknown
42827702724Smrg		os=-amigaos
42927702724Smrg		;;
43027702724Smrg	amigaunix | amix)
43127702724Smrg		basic_machine=m68k-unknown
43227702724Smrg		os=-sysv4
43327702724Smrg		;;
43427702724Smrg	apollo68)
43527702724Smrg		basic_machine=m68k-apollo
43627702724Smrg		os=-sysv
43727702724Smrg		;;
43827702724Smrg	apollo68bsd)
43927702724Smrg		basic_machine=m68k-apollo
44027702724Smrg		os=-bsd
44127702724Smrg		;;
44227702724Smrg	aux)
44327702724Smrg		basic_machine=m68k-apple
44427702724Smrg		os=-aux
44527702724Smrg		;;
44627702724Smrg	balance)
44727702724Smrg		basic_machine=ns32k-sequent
44827702724Smrg		os=-dynix
44927702724Smrg		;;
450e19dfac4Smrg	blackfin)
451e19dfac4Smrg		basic_machine=bfin-unknown
452e19dfac4Smrg		os=-linux
453e19dfac4Smrg		;;
454e19dfac4Smrg	blackfin-*)
455e19dfac4Smrg		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
456e19dfac4Smrg		os=-linux
457e19dfac4Smrg		;;
45827702724Smrg	c90)
45927702724Smrg		basic_machine=c90-cray
46027702724Smrg		os=-unicos
46127702724Smrg		;;
46227702724Smrg	convex-c1)
46327702724Smrg		basic_machine=c1-convex
46427702724Smrg		os=-bsd
46527702724Smrg		;;
46627702724Smrg	convex-c2)
46727702724Smrg		basic_machine=c2-convex
46827702724Smrg		os=-bsd
46927702724Smrg		;;
47027702724Smrg	convex-c32)
47127702724Smrg		basic_machine=c32-convex
47227702724Smrg		os=-bsd
47327702724Smrg		;;
47427702724Smrg	convex-c34)
47527702724Smrg		basic_machine=c34-convex
47627702724Smrg		os=-bsd
47727702724Smrg		;;
47827702724Smrg	convex-c38)
47927702724Smrg		basic_machine=c38-convex
48027702724Smrg		os=-bsd
48127702724Smrg		;;
48227702724Smrg	cray | j90)
48327702724Smrg		basic_machine=j90-cray
48427702724Smrg		os=-unicos
48527702724Smrg		;;
48627702724Smrg	craynv)
48727702724Smrg		basic_machine=craynv-cray
48827702724Smrg		os=-unicosmp
48927702724Smrg		;;
490e19dfac4Smrg	cr16)
491e19dfac4Smrg		basic_machine=cr16-unknown
49227702724Smrg		os=-elf
49327702724Smrg		;;
49427702724Smrg	crds | unos)
49527702724Smrg		basic_machine=m68k-crds
49627702724Smrg		;;
49727702724Smrg	crisv32 | crisv32-* | etraxfs*)
49827702724Smrg		basic_machine=crisv32-axis
49927702724Smrg		;;
50027702724Smrg	cris | cris-* | etrax*)
50127702724Smrg		basic_machine=cris-axis
50227702724Smrg		;;
50327702724Smrg	crx)
50427702724Smrg		basic_machine=crx-unknown
50527702724Smrg		os=-elf
50627702724Smrg		;;
50727702724Smrg	da30 | da30-*)
50827702724Smrg		basic_machine=m68k-da30
50927702724Smrg		;;
51027702724Smrg	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
51127702724Smrg		basic_machine=mips-dec
51227702724Smrg		;;
51327702724Smrg	decsystem10* | dec10*)
51427702724Smrg		basic_machine=pdp10-dec
51527702724Smrg		os=-tops10
51627702724Smrg		;;
51727702724Smrg	decsystem20* | dec20*)
51827702724Smrg		basic_machine=pdp10-dec
51927702724Smrg		os=-tops20
52027702724Smrg		;;
52127702724Smrg	delta | 3300 | motorola-3300 | motorola-delta \
52227702724Smrg	      | 3300-motorola | delta-motorola)
52327702724Smrg		basic_machine=m68k-motorola
52427702724Smrg		;;
52527702724Smrg	delta88)
52627702724Smrg		basic_machine=m88k-motorola
52727702724Smrg		os=-sysv3
52827702724Smrg		;;
52927702724Smrg	djgpp)
53027702724Smrg		basic_machine=i586-pc
53127702724Smrg		os=-msdosdjgpp
53227702724Smrg		;;
53327702724Smrg	dpx20 | dpx20-*)
53427702724Smrg		basic_machine=rs6000-bull
53527702724Smrg		os=-bosx
53627702724Smrg		;;
53727702724Smrg	dpx2* | dpx2*-bull)
53827702724Smrg		basic_machine=m68k-bull
53927702724Smrg		os=-sysv3
54027702724Smrg		;;
54127702724Smrg	ebmon29k)
54227702724Smrg		basic_machine=a29k-amd
54327702724Smrg		os=-ebmon
54427702724Smrg		;;
54527702724Smrg	elxsi)
54627702724Smrg		basic_machine=elxsi-elxsi
54727702724Smrg		os=-bsd
54827702724Smrg		;;
54927702724Smrg	encore | umax | mmax)
55027702724Smrg		basic_machine=ns32k-encore
55127702724Smrg		;;
55227702724Smrg	es1800 | OSE68k | ose68k | ose | OSE)
55327702724Smrg		basic_machine=m68k-ericsson
55427702724Smrg		os=-ose
55527702724Smrg		;;
55627702724Smrg	fx2800)
55727702724Smrg		basic_machine=i860-alliant
55827702724Smrg		;;
55927702724Smrg	genix)
56027702724Smrg		basic_machine=ns32k-ns
56127702724Smrg		;;
56227702724Smrg	gmicro)
56327702724Smrg		basic_machine=tron-gmicro
56427702724Smrg		os=-sysv
56527702724Smrg		;;
56627702724Smrg	go32)
56727702724Smrg		basic_machine=i386-pc
56827702724Smrg		os=-go32
56927702724Smrg		;;
57027702724Smrg	h3050r* | hiux*)
57127702724Smrg		basic_machine=hppa1.1-hitachi
57227702724Smrg		os=-hiuxwe2
57327702724Smrg		;;
57427702724Smrg	h8300hms)
57527702724Smrg		basic_machine=h8300-hitachi
57627702724Smrg		os=-hms
57727702724Smrg		;;
57827702724Smrg	h8300xray)
57927702724Smrg		basic_machine=h8300-hitachi
58027702724Smrg		os=-xray
58127702724Smrg		;;
58227702724Smrg	h8500hms)
58327702724Smrg		basic_machine=h8500-hitachi
58427702724Smrg		os=-hms
58527702724Smrg		;;
58627702724Smrg	harris)
58727702724Smrg		basic_machine=m88k-harris
58827702724Smrg		os=-sysv3
58927702724Smrg		;;
59027702724Smrg	hp300-*)
59127702724Smrg		basic_machine=m68k-hp
59227702724Smrg		;;
59327702724Smrg	hp300bsd)
59427702724Smrg		basic_machine=m68k-hp
59527702724Smrg		os=-bsd
59627702724Smrg		;;
59727702724Smrg	hp300hpux)
59827702724Smrg		basic_machine=m68k-hp
59927702724Smrg		os=-hpux
60027702724Smrg		;;
60127702724Smrg	hp3k9[0-9][0-9] | hp9[0-9][0-9])
60227702724Smrg		basic_machine=hppa1.0-hp
60327702724Smrg		;;
60427702724Smrg	hp9k2[0-9][0-9] | hp9k31[0-9])
60527702724Smrg		basic_machine=m68000-hp
60627702724Smrg		;;
60727702724Smrg	hp9k3[2-9][0-9])
60827702724Smrg		basic_machine=m68k-hp
60927702724Smrg		;;
61027702724Smrg	hp9k6[0-9][0-9] | hp6[0-9][0-9])
61127702724Smrg		basic_machine=hppa1.0-hp
61227702724Smrg		;;
61327702724Smrg	hp9k7[0-79][0-9] | hp7[0-79][0-9])
61427702724Smrg		basic_machine=hppa1.1-hp
61527702724Smrg		;;
61627702724Smrg	hp9k78[0-9] | hp78[0-9])
61727702724Smrg		# FIXME: really hppa2.0-hp
61827702724Smrg		basic_machine=hppa1.1-hp
61927702724Smrg		;;
62027702724Smrg	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
62127702724Smrg		# FIXME: really hppa2.0-hp
62227702724Smrg		basic_machine=hppa1.1-hp
62327702724Smrg		;;
62427702724Smrg	hp9k8[0-9][13679] | hp8[0-9][13679])
62527702724Smrg		basic_machine=hppa1.1-hp
62627702724Smrg		;;
62727702724Smrg	hp9k8[0-9][0-9] | hp8[0-9][0-9])
62827702724Smrg		basic_machine=hppa1.0-hp
62927702724Smrg		;;
63027702724Smrg	hppa-next)
63127702724Smrg		os=-nextstep3
63227702724Smrg		;;
63327702724Smrg	hppaosf)
63427702724Smrg		basic_machine=hppa1.1-hp
63527702724Smrg		os=-osf
63627702724Smrg		;;
63727702724Smrg	hppro)
63827702724Smrg		basic_machine=hppa1.1-hp
63927702724Smrg		os=-proelf
64027702724Smrg		;;
64127702724Smrg	i370-ibm* | ibm*)
64227702724Smrg		basic_machine=i370-ibm
64327702724Smrg		;;
64427702724Smrg# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
64527702724Smrg	i*86v32)
64627702724Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
64727702724Smrg		os=-sysv32
64827702724Smrg		;;
64927702724Smrg	i*86v4*)
65027702724Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
65127702724Smrg		os=-sysv4
65227702724Smrg		;;
65327702724Smrg	i*86v)
65427702724Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
65527702724Smrg		os=-sysv
65627702724Smrg		;;
65727702724Smrg	i*86sol2)
65827702724Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
65927702724Smrg		os=-solaris2
66027702724Smrg		;;
66127702724Smrg	i386mach)
66227702724Smrg		basic_machine=i386-mach
66327702724Smrg		os=-mach
66427702724Smrg		;;
66527702724Smrg	i386-vsta | vsta)
66627702724Smrg		basic_machine=i386-unknown
66727702724Smrg		os=-vsta
66827702724Smrg		;;
66927702724Smrg	iris | iris4d)
67027702724Smrg		basic_machine=mips-sgi
67127702724Smrg		case $os in
67227702724Smrg		    -irix*)
67327702724Smrg			;;
67427702724Smrg		    *)
67527702724Smrg			os=-irix4
67627702724Smrg			;;
67727702724Smrg		esac
67827702724Smrg		;;
67927702724Smrg	isi68 | isi)
68027702724Smrg		basic_machine=m68k-isi
68127702724Smrg		os=-sysv
68227702724Smrg		;;
683e19dfac4Smrg	m68knommu)
684e19dfac4Smrg		basic_machine=m68k-unknown
685e19dfac4Smrg		os=-linux
686e19dfac4Smrg		;;
687e19dfac4Smrg	m68knommu-*)
688e19dfac4Smrg		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
689e19dfac4Smrg		os=-linux
690e19dfac4Smrg		;;
69127702724Smrg	m88k-omron*)
69227702724Smrg		basic_machine=m88k-omron
69327702724Smrg		;;
69427702724Smrg	magnum | m3230)
69527702724Smrg		basic_machine=mips-mips
69627702724Smrg		os=-sysv
69727702724Smrg		;;
69827702724Smrg	merlin)
69927702724Smrg		basic_machine=ns32k-utek
70027702724Smrg		os=-sysv
70127702724Smrg		;;
70227702724Smrg	mingw32)
70327702724Smrg		basic_machine=i386-pc
70427702724Smrg		os=-mingw32
70527702724Smrg		;;
706e19dfac4Smrg	mingw32ce)
707e19dfac4Smrg		basic_machine=arm-unknown
708e19dfac4Smrg		os=-mingw32ce
709e19dfac4Smrg		;;
71027702724Smrg	miniframe)
71127702724Smrg		basic_machine=m68000-convergent
71227702724Smrg		;;
71327702724Smrg	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
71427702724Smrg		basic_machine=m68k-atari
71527702724Smrg		os=-mint
71627702724Smrg		;;
71727702724Smrg	mips3*-*)
71827702724Smrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
71927702724Smrg		;;
72027702724Smrg	mips3*)
72127702724Smrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
72227702724Smrg		;;
72327702724Smrg	monitor)
72427702724Smrg		basic_machine=m68k-rom68k
72527702724Smrg		os=-coff
72627702724Smrg		;;
72727702724Smrg	morphos)
72827702724Smrg		basic_machine=powerpc-unknown
72927702724Smrg		os=-morphos
73027702724Smrg		;;
73127702724Smrg	msdos)
73227702724Smrg		basic_machine=i386-pc
73327702724Smrg		os=-msdos
73427702724Smrg		;;
73527702724Smrg	ms1-*)
73627702724Smrg		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
73727702724Smrg		;;
73827702724Smrg	mvs)
73927702724Smrg		basic_machine=i370-ibm
74027702724Smrg		os=-mvs
74127702724Smrg		;;
74227702724Smrg	ncr3000)
74327702724Smrg		basic_machine=i486-ncr
74427702724Smrg		os=-sysv4
74527702724Smrg		;;
74627702724Smrg	netbsd386)
74727702724Smrg		basic_machine=i386-unknown
74827702724Smrg		os=-netbsd
74927702724Smrg		;;
75027702724Smrg	netwinder)
75127702724Smrg		basic_machine=armv4l-rebel
75227702724Smrg		os=-linux
75327702724Smrg		;;
75427702724Smrg	news | news700 | news800 | news900)
75527702724Smrg		basic_machine=m68k-sony
75627702724Smrg		os=-newsos
75727702724Smrg		;;
75827702724Smrg	news1000)
75927702724Smrg		basic_machine=m68030-sony
76027702724Smrg		os=-newsos
76127702724Smrg		;;
76227702724Smrg	news-3600 | risc-news)
76327702724Smrg		basic_machine=mips-sony
76427702724Smrg		os=-newsos
76527702724Smrg		;;
76627702724Smrg	necv70)
76727702724Smrg		basic_machine=v70-nec
76827702724Smrg		os=-sysv
76927702724Smrg		;;
77027702724Smrg	next | m*-next )
77127702724Smrg		basic_machine=m68k-next
77227702724Smrg		case $os in
77327702724Smrg		    -nextstep* )
77427702724Smrg			;;
77527702724Smrg		    -ns2*)
77627702724Smrg		      os=-nextstep2
77727702724Smrg			;;
77827702724Smrg		    *)
77927702724Smrg		      os=-nextstep3
78027702724Smrg			;;
78127702724Smrg		esac
78227702724Smrg		;;
78327702724Smrg	nh3000)
78427702724Smrg		basic_machine=m68k-harris
78527702724Smrg		os=-cxux
78627702724Smrg		;;
78727702724Smrg	nh[45]000)
78827702724Smrg		basic_machine=m88k-harris
78927702724Smrg		os=-cxux
79027702724Smrg		;;
79127702724Smrg	nindy960)
79227702724Smrg		basic_machine=i960-intel
79327702724Smrg		os=-nindy
79427702724Smrg		;;
79527702724Smrg	mon960)
79627702724Smrg		basic_machine=i960-intel
79727702724Smrg		os=-mon960
79827702724Smrg		;;
79927702724Smrg	nonstopux)
80027702724Smrg		basic_machine=mips-compaq
80127702724Smrg		os=-nonstopux
80227702724Smrg		;;
80327702724Smrg	np1)
80427702724Smrg		basic_machine=np1-gould
80527702724Smrg		;;
80627702724Smrg	nsr-tandem)
80727702724Smrg		basic_machine=nsr-tandem
80827702724Smrg		;;
80927702724Smrg	op50n-* | op60c-*)
81027702724Smrg		basic_machine=hppa1.1-oki
81127702724Smrg		os=-proelf
81227702724Smrg		;;
81327702724Smrg	openrisc | openrisc-*)
81427702724Smrg		basic_machine=or32-unknown
81527702724Smrg		;;
81627702724Smrg	os400)
81727702724Smrg		basic_machine=powerpc-ibm
81827702724Smrg		os=-os400
81927702724Smrg		;;
82027702724Smrg	OSE68000 | ose68000)
82127702724Smrg		basic_machine=m68000-ericsson
82227702724Smrg		os=-ose
82327702724Smrg		;;
82427702724Smrg	os68k)
82527702724Smrg		basic_machine=m68k-none
82627702724Smrg		os=-os68k
82727702724Smrg		;;
82827702724Smrg	pa-hitachi)
82927702724Smrg		basic_machine=hppa1.1-hitachi
83027702724Smrg		os=-hiuxwe2
83127702724Smrg		;;
83227702724Smrg	paragon)
83327702724Smrg		basic_machine=i860-intel
83427702724Smrg		os=-osf
83527702724Smrg		;;
836e19dfac4Smrg	parisc)
837e19dfac4Smrg		basic_machine=hppa-unknown
838e19dfac4Smrg		os=-linux
839e19dfac4Smrg		;;
840e19dfac4Smrg	parisc-*)
841e19dfac4Smrg		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
842e19dfac4Smrg		os=-linux
843e19dfac4Smrg		;;
84427702724Smrg	pbd)
84527702724Smrg		basic_machine=sparc-tti
84627702724Smrg		;;
84727702724Smrg	pbb)
84827702724Smrg		basic_machine=m68k-tti
84927702724Smrg		;;
85027702724Smrg	pc532 | pc532-*)
85127702724Smrg		basic_machine=ns32k-pc532
85227702724Smrg		;;
85327702724Smrg	pc98)
85427702724Smrg		basic_machine=i386-pc
85527702724Smrg		;;
85627702724Smrg	pc98-*)
85727702724Smrg		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
85827702724Smrg		;;
85927702724Smrg	pentium | p5 | k5 | k6 | nexgen | viac3)
86027702724Smrg		basic_machine=i586-pc
86127702724Smrg		;;
86227702724Smrg	pentiumpro | p6 | 6x86 | athlon | athlon_*)
86327702724Smrg		basic_machine=i686-pc
86427702724Smrg		;;
86527702724Smrg	pentiumii | pentium2 | pentiumiii | pentium3)
86627702724Smrg		basic_machine=i686-pc
86727702724Smrg		;;
86827702724Smrg	pentium4)
86927702724Smrg		basic_machine=i786-pc
87027702724Smrg		;;
87127702724Smrg	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
87227702724Smrg		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
87327702724Smrg		;;
87427702724Smrg	pentiumpro-* | p6-* | 6x86-* | athlon-*)
87527702724Smrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
87627702724Smrg		;;
87727702724Smrg	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
87827702724Smrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
87927702724Smrg		;;
88027702724Smrg	pentium4-*)
88127702724Smrg		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
88227702724Smrg		;;
88327702724Smrg	pn)
88427702724Smrg		basic_machine=pn-gould
88527702724Smrg		;;
88627702724Smrg	power)	basic_machine=power-ibm
88727702724Smrg		;;
88827702724Smrg	ppc)	basic_machine=powerpc-unknown
88927702724Smrg		;;
89027702724Smrg	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
89127702724Smrg		;;
89227702724Smrg	ppcle | powerpclittle | ppc-le | powerpc-little)
89327702724Smrg		basic_machine=powerpcle-unknown
89427702724Smrg		;;
89527702724Smrg	ppcle-* | powerpclittle-*)
89627702724Smrg		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
89727702724Smrg		;;
89827702724Smrg	ppc64)	basic_machine=powerpc64-unknown
89927702724Smrg		;;
90027702724Smrg	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
90127702724Smrg		;;
90227702724Smrg	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
90327702724Smrg		basic_machine=powerpc64le-unknown
90427702724Smrg		;;
90527702724Smrg	ppc64le-* | powerpc64little-*)
90627702724Smrg		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
90727702724Smrg		;;
90827702724Smrg	ps2)
90927702724Smrg		basic_machine=i386-ibm
91027702724Smrg		;;
91127702724Smrg	pw32)
91227702724Smrg		basic_machine=i586-unknown
91327702724Smrg		os=-pw32
91427702724Smrg		;;
91527702724Smrg	rdos)
91627702724Smrg		basic_machine=i386-pc
91727702724Smrg		os=-rdos
91827702724Smrg		;;
91927702724Smrg	rom68k)
92027702724Smrg		basic_machine=m68k-rom68k
92127702724Smrg		os=-coff
92227702724Smrg		;;
92327702724Smrg	rm[46]00)
92427702724Smrg		basic_machine=mips-siemens
92527702724Smrg		;;
92627702724Smrg	rtpc | rtpc-*)
92727702724Smrg		basic_machine=romp-ibm
92827702724Smrg		;;
92927702724Smrg	s390 | s390-*)
93027702724Smrg		basic_machine=s390-ibm
93127702724Smrg		;;
93227702724Smrg	s390x | s390x-*)
93327702724Smrg		basic_machine=s390x-ibm
93427702724Smrg		;;
93527702724Smrg	sa29200)
93627702724Smrg		basic_machine=a29k-amd
93727702724Smrg		os=-udi
93827702724Smrg		;;
93927702724Smrg	sb1)
94027702724Smrg		basic_machine=mipsisa64sb1-unknown
94127702724Smrg		;;
94227702724Smrg	sb1el)
94327702724Smrg		basic_machine=mipsisa64sb1el-unknown
94427702724Smrg		;;
945e19dfac4Smrg	sde)
946e19dfac4Smrg		basic_machine=mipsisa32-sde
947e19dfac4Smrg		os=-elf
948e19dfac4Smrg		;;
94927702724Smrg	sei)
95027702724Smrg		basic_machine=mips-sei
95127702724Smrg		os=-seiux
95227702724Smrg		;;
95327702724Smrg	sequent)
95427702724Smrg		basic_machine=i386-sequent
95527702724Smrg		;;
95627702724Smrg	sh)
95727702724Smrg		basic_machine=sh-hitachi
95827702724Smrg		os=-hms
95927702724Smrg		;;
960e19dfac4Smrg	sh5el)
961e19dfac4Smrg		basic_machine=sh5le-unknown
962e19dfac4Smrg		;;
96327702724Smrg	sh64)
96427702724Smrg		basic_machine=sh64-unknown
96527702724Smrg		;;
96627702724Smrg	sparclite-wrs | simso-wrs)
96727702724Smrg		basic_machine=sparclite-wrs
96827702724Smrg		os=-vxworks
96927702724Smrg		;;
97027702724Smrg	sps7)
97127702724Smrg		basic_machine=m68k-bull
97227702724Smrg		os=-sysv2
97327702724Smrg		;;
97427702724Smrg	spur)
97527702724Smrg		basic_machine=spur-unknown
97627702724Smrg		;;
97727702724Smrg	st2000)
97827702724Smrg		basic_machine=m68k-tandem
97927702724Smrg		;;
98027702724Smrg	stratus)
98127702724Smrg		basic_machine=i860-stratus
98227702724Smrg		os=-sysv4
98327702724Smrg		;;
98427702724Smrg	sun2)
98527702724Smrg		basic_machine=m68000-sun
98627702724Smrg		;;
98727702724Smrg	sun2os3)
98827702724Smrg		basic_machine=m68000-sun
98927702724Smrg		os=-sunos3
99027702724Smrg		;;
99127702724Smrg	sun2os4)
99227702724Smrg		basic_machine=m68000-sun
99327702724Smrg		os=-sunos4
99427702724Smrg		;;
99527702724Smrg	sun3os3)
99627702724Smrg		basic_machine=m68k-sun
99727702724Smrg		os=-sunos3
99827702724Smrg		;;
99927702724Smrg	sun3os4)
100027702724Smrg		basic_machine=m68k-sun
100127702724Smrg		os=-sunos4
100227702724Smrg		;;
100327702724Smrg	sun4os3)
100427702724Smrg		basic_machine=sparc-sun
100527702724Smrg		os=-sunos3
100627702724Smrg		;;
100727702724Smrg	sun4os4)
100827702724Smrg		basic_machine=sparc-sun
100927702724Smrg		os=-sunos4
101027702724Smrg		;;
101127702724Smrg	sun4sol2)
101227702724Smrg		basic_machine=sparc-sun
101327702724Smrg		os=-solaris2
101427702724Smrg		;;
101527702724Smrg	sun3 | sun3-*)
101627702724Smrg		basic_machine=m68k-sun
101727702724Smrg		;;
101827702724Smrg	sun4)
101927702724Smrg		basic_machine=sparc-sun
102027702724Smrg		;;
102127702724Smrg	sun386 | sun386i | roadrunner)
102227702724Smrg		basic_machine=i386-sun
102327702724Smrg		;;
102427702724Smrg	sv1)
102527702724Smrg		basic_machine=sv1-cray
102627702724Smrg		os=-unicos
102727702724Smrg		;;
102827702724Smrg	symmetry)
102927702724Smrg		basic_machine=i386-sequent
103027702724Smrg		os=-dynix
103127702724Smrg		;;
103227702724Smrg	t3e)
103327702724Smrg		basic_machine=alphaev5-cray
103427702724Smrg		os=-unicos
103527702724Smrg		;;
103627702724Smrg	t90)
103727702724Smrg		basic_machine=t90-cray
103827702724Smrg		os=-unicos
103927702724Smrg		;;
104027702724Smrg	tic54x | c54x*)
104127702724Smrg		basic_machine=tic54x-unknown
104227702724Smrg		os=-coff
104327702724Smrg		;;
104427702724Smrg	tic55x | c55x*)
104527702724Smrg		basic_machine=tic55x-unknown
104627702724Smrg		os=-coff
104727702724Smrg		;;
104827702724Smrg	tic6x | c6x*)
104927702724Smrg		basic_machine=tic6x-unknown
105027702724Smrg		os=-coff
105127702724Smrg		;;
1052e19dfac4Smrg	tile*)
1053e19dfac4Smrg		basic_machine=tile-unknown
1054e19dfac4Smrg		os=-linux-gnu
1055e19dfac4Smrg		;;
105627702724Smrg	tx39)
105727702724Smrg		basic_machine=mipstx39-unknown
105827702724Smrg		;;
105927702724Smrg	tx39el)
106027702724Smrg		basic_machine=mipstx39el-unknown
106127702724Smrg		;;
106227702724Smrg	toad1)
106327702724Smrg		basic_machine=pdp10-xkl
106427702724Smrg		os=-tops20
106527702724Smrg		;;
106627702724Smrg	tower | tower-32)
106727702724Smrg		basic_machine=m68k-ncr
106827702724Smrg		;;
106927702724Smrg	tpf)
107027702724Smrg		basic_machine=s390x-ibm
107127702724Smrg		os=-tpf
107227702724Smrg		;;
107327702724Smrg	udi29k)
107427702724Smrg		basic_machine=a29k-amd
107527702724Smrg		os=-udi
107627702724Smrg		;;
107727702724Smrg	ultra3)
107827702724Smrg		basic_machine=a29k-nyu
107927702724Smrg		os=-sym1
108027702724Smrg		;;
108127702724Smrg	v810 | necv810)
108227702724Smrg		basic_machine=v810-nec
108327702724Smrg		os=-none
108427702724Smrg		;;
108527702724Smrg	vaxv)
108627702724Smrg		basic_machine=vax-dec
108727702724Smrg		os=-sysv
108827702724Smrg		;;
108927702724Smrg	vms)
109027702724Smrg		basic_machine=vax-dec
109127702724Smrg		os=-vms
109227702724Smrg		;;
109327702724Smrg	vpp*|vx|vx-*)
109427702724Smrg		basic_machine=f301-fujitsu
109527702724Smrg		;;
109627702724Smrg	vxworks960)
109727702724Smrg		basic_machine=i960-wrs
109827702724Smrg		os=-vxworks
109927702724Smrg		;;
110027702724Smrg	vxworks68)
110127702724Smrg		basic_machine=m68k-wrs
110227702724Smrg		os=-vxworks
110327702724Smrg		;;
110427702724Smrg	vxworks29k)
110527702724Smrg		basic_machine=a29k-wrs
110627702724Smrg		os=-vxworks
110727702724Smrg		;;
110827702724Smrg	w65*)
110927702724Smrg		basic_machine=w65-wdc
111027702724Smrg		os=-none
111127702724Smrg		;;
111227702724Smrg	w89k-*)
111327702724Smrg		basic_machine=hppa1.1-winbond
111427702724Smrg		os=-proelf
111527702724Smrg		;;
111627702724Smrg	xbox)
111727702724Smrg		basic_machine=i686-pc
111827702724Smrg		os=-mingw32
111927702724Smrg		;;
112027702724Smrg	xps | xps100)
112127702724Smrg		basic_machine=xps100-honeywell
112227702724Smrg		;;
112327702724Smrg	ymp)
112427702724Smrg		basic_machine=ymp-cray
112527702724Smrg		os=-unicos
112627702724Smrg		;;
112727702724Smrg	z8k-*-coff)
112827702724Smrg		basic_machine=z8k-unknown
112927702724Smrg		os=-sim
113027702724Smrg		;;
113127702724Smrg	none)
113227702724Smrg		basic_machine=none-none
113327702724Smrg		os=-none
113427702724Smrg		;;
113527702724Smrg
113627702724Smrg# Here we handle the default manufacturer of certain CPU types.  It is in
113727702724Smrg# some cases the only manufacturer, in others, it is the most popular.
113827702724Smrg	w89k)
113927702724Smrg		basic_machine=hppa1.1-winbond
114027702724Smrg		;;
114127702724Smrg	op50n)
114227702724Smrg		basic_machine=hppa1.1-oki
114327702724Smrg		;;
114427702724Smrg	op60c)
114527702724Smrg		basic_machine=hppa1.1-oki
114627702724Smrg		;;
114727702724Smrg	romp)
114827702724Smrg		basic_machine=romp-ibm
114927702724Smrg		;;
115027702724Smrg	mmix)
115127702724Smrg		basic_machine=mmix-knuth
115227702724Smrg		;;
115327702724Smrg	rs6000)
115427702724Smrg		basic_machine=rs6000-ibm
115527702724Smrg		;;
115627702724Smrg	vax)
115727702724Smrg		basic_machine=vax-dec
115827702724Smrg		;;
115927702724Smrg	pdp10)
116027702724Smrg		# there are many clones, so DEC is not a safe bet
116127702724Smrg		basic_machine=pdp10-unknown
116227702724Smrg		;;
116327702724Smrg	pdp11)
116427702724Smrg		basic_machine=pdp11-dec
116527702724Smrg		;;
116627702724Smrg	we32k)
116727702724Smrg		basic_machine=we32k-att
116827702724Smrg		;;
116927702724Smrg	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
117027702724Smrg		basic_machine=sh-unknown
117127702724Smrg		;;
1172e19dfac4Smrg	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
117327702724Smrg		basic_machine=sparc-sun
117427702724Smrg		;;
117527702724Smrg	cydra)
117627702724Smrg		basic_machine=cydra-cydrome
117727702724Smrg		;;
117827702724Smrg	orion)
117927702724Smrg		basic_machine=orion-highlevel
118027702724Smrg		;;
118127702724Smrg	orion105)
118227702724Smrg		basic_machine=clipper-highlevel
118327702724Smrg		;;
118427702724Smrg	mac | mpw | mac-mpw)
118527702724Smrg		basic_machine=m68k-apple
118627702724Smrg		;;
118727702724Smrg	pmac | pmac-mpw)
118827702724Smrg		basic_machine=powerpc-apple
118927702724Smrg		;;
119027702724Smrg	*-unknown)
119127702724Smrg		# Make sure to match an already-canonicalized machine name.
119227702724Smrg		;;
119327702724Smrg	*)
119427702724Smrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
119527702724Smrg		exit 1
119627702724Smrg		;;
119727702724Smrgesac
119827702724Smrg
119927702724Smrg# Here we canonicalize certain aliases for manufacturers.
120027702724Smrgcase $basic_machine in
120127702724Smrg	*-digital*)
120227702724Smrg		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
120327702724Smrg		;;
120427702724Smrg	*-commodore*)
120527702724Smrg		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
120627702724Smrg		;;
120727702724Smrg	*)
120827702724Smrg		;;
120927702724Smrgesac
121027702724Smrg
121127702724Smrg# Decode manufacturer-specific aliases for certain operating systems.
121227702724Smrg
121327702724Smrgif [ x"$os" != x"" ]
121427702724Smrgthen
121527702724Smrgcase $os in
121627702724Smrg        # First match some system type aliases
121727702724Smrg        # that might get confused with valid system types.
121827702724Smrg	# -solaris* is a basic system type, with this one exception.
121927702724Smrg	-solaris1 | -solaris1.*)
122027702724Smrg		os=`echo $os | sed -e 's|solaris1|sunos4|'`
122127702724Smrg		;;
122227702724Smrg	-solaris)
122327702724Smrg		os=-solaris2
122427702724Smrg		;;
122527702724Smrg	-svr4*)
122627702724Smrg		os=-sysv4
122727702724Smrg		;;
122827702724Smrg	-unixware*)
122927702724Smrg		os=-sysv4.2uw
123027702724Smrg		;;
123127702724Smrg	-gnu/linux*)
123227702724Smrg		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
123327702724Smrg		;;
123427702724Smrg	# First accept the basic system types.
123527702724Smrg	# The portable systems comes first.
123627702724Smrg	# Each alternative MUST END IN A *, to match a version number.
123727702724Smrg	# -sysv* is not here because it comes later, after sysvr4.
123827702724Smrg	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
123927702724Smrg	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
124027702724Smrg	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
124127702724Smrg	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
124227702724Smrg	      | -aos* \
124327702724Smrg	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
124427702724Smrg	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
124527702724Smrg	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
124627702724Smrg	      | -openbsd* | -solidbsd* \
124727702724Smrg	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
124827702724Smrg	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
124927702724Smrg	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
125027702724Smrg	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
125127702724Smrg	      | -chorusos* | -chorusrdb* \
125227702724Smrg	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
125327702724Smrg	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
125427702724Smrg	      | -uxpv* | -beos* | -mpeix* | -udk* \
125527702724Smrg	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
125627702724Smrg	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
125727702724Smrg	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
125827702724Smrg	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
125927702724Smrg	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
126027702724Smrg	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1261e19dfac4Smrg	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
126227702724Smrg	# Remember, each alternative MUST END IN *, to match a version number.
126327702724Smrg		;;
126427702724Smrg	-qnx*)
126527702724Smrg		case $basic_machine in
126627702724Smrg		    x86-* | i*86-*)
126727702724Smrg			;;
126827702724Smrg		    *)
126927702724Smrg			os=-nto$os
127027702724Smrg			;;
127127702724Smrg		esac
127227702724Smrg		;;
127327702724Smrg	-nto-qnx*)
127427702724Smrg		;;
127527702724Smrg	-nto*)
127627702724Smrg		os=`echo $os | sed -e 's|nto|nto-qnx|'`
127727702724Smrg		;;
127827702724Smrg	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
127927702724Smrg	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
128027702724Smrg	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
128127702724Smrg		;;
128227702724Smrg	-mac*)
128327702724Smrg		os=`echo $os | sed -e 's|mac|macos|'`
128427702724Smrg		;;
128527702724Smrg	-linux-dietlibc)
128627702724Smrg		os=-linux-dietlibc
128727702724Smrg		;;
128827702724Smrg	-linux*)
128927702724Smrg		os=`echo $os | sed -e 's|linux|linux-gnu|'`
129027702724Smrg		;;
129127702724Smrg	-sunos5*)
129227702724Smrg		os=`echo $os | sed -e 's|sunos5|solaris2|'`
129327702724Smrg		;;
129427702724Smrg	-sunos6*)
129527702724Smrg		os=`echo $os | sed -e 's|sunos6|solaris3|'`
129627702724Smrg		;;
129727702724Smrg	-opened*)
129827702724Smrg		os=-openedition
129927702724Smrg		;;
130027702724Smrg        -os400*)
130127702724Smrg		os=-os400
130227702724Smrg		;;
130327702724Smrg	-wince*)
130427702724Smrg		os=-wince
130527702724Smrg		;;
130627702724Smrg	-osfrose*)
130727702724Smrg		os=-osfrose
130827702724Smrg		;;
130927702724Smrg	-osf*)
131027702724Smrg		os=-osf
131127702724Smrg		;;
131227702724Smrg	-utek*)
131327702724Smrg		os=-bsd
131427702724Smrg		;;
131527702724Smrg	-dynix*)
131627702724Smrg		os=-bsd
131727702724Smrg		;;
131827702724Smrg	-acis*)
131927702724Smrg		os=-aos
132027702724Smrg		;;
132127702724Smrg	-atheos*)
132227702724Smrg		os=-atheos
132327702724Smrg		;;
132427702724Smrg	-syllable*)
132527702724Smrg		os=-syllable
132627702724Smrg		;;
132727702724Smrg	-386bsd)
132827702724Smrg		os=-bsd
132927702724Smrg		;;
133027702724Smrg	-ctix* | -uts*)
133127702724Smrg		os=-sysv
133227702724Smrg		;;
133327702724Smrg	-nova*)
133427702724Smrg		os=-rtmk-nova
133527702724Smrg		;;
133627702724Smrg	-ns2 )
133727702724Smrg		os=-nextstep2
133827702724Smrg		;;
133927702724Smrg	-nsk*)
134027702724Smrg		os=-nsk
134127702724Smrg		;;
134227702724Smrg	# Preserve the version number of sinix5.
134327702724Smrg	-sinix5.*)
134427702724Smrg		os=`echo $os | sed -e 's|sinix|sysv|'`
134527702724Smrg		;;
134627702724Smrg	-sinix*)
134727702724Smrg		os=-sysv4
134827702724Smrg		;;
134927702724Smrg        -tpf*)
135027702724Smrg		os=-tpf
135127702724Smrg		;;
135227702724Smrg	-triton*)
135327702724Smrg		os=-sysv3
135427702724Smrg		;;
135527702724Smrg	-oss*)
135627702724Smrg		os=-sysv3
135727702724Smrg		;;
135827702724Smrg	-svr4)
135927702724Smrg		os=-sysv4
136027702724Smrg		;;
136127702724Smrg	-svr3)
136227702724Smrg		os=-sysv3
136327702724Smrg		;;
136427702724Smrg	-sysvr4)
136527702724Smrg		os=-sysv4
136627702724Smrg		;;
136727702724Smrg	# This must come after -sysvr4.
136827702724Smrg	-sysv*)
136927702724Smrg		;;
137027702724Smrg	-ose*)
137127702724Smrg		os=-ose
137227702724Smrg		;;
137327702724Smrg	-es1800*)
137427702724Smrg		os=-ose
137527702724Smrg		;;
137627702724Smrg	-xenix)
137727702724Smrg		os=-xenix
137827702724Smrg		;;
137927702724Smrg	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
138027702724Smrg		os=-mint
138127702724Smrg		;;
138227702724Smrg	-aros*)
138327702724Smrg		os=-aros
138427702724Smrg		;;
138527702724Smrg	-kaos*)
138627702724Smrg		os=-kaos
138727702724Smrg		;;
138827702724Smrg	-zvmoe)
138927702724Smrg		os=-zvmoe
139027702724Smrg		;;
139127702724Smrg	-none)
139227702724Smrg		;;
139327702724Smrg	*)
139427702724Smrg		# Get rid of the `-' at the beginning of $os.
139527702724Smrg		os=`echo $os | sed 's/[^-]*-//'`
139627702724Smrg		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
139727702724Smrg		exit 1
139827702724Smrg		;;
139927702724Smrgesac
140027702724Smrgelse
140127702724Smrg
140227702724Smrg# Here we handle the default operating systems that come with various machines.
140327702724Smrg# The value should be what the vendor currently ships out the door with their
140427702724Smrg# machine or put another way, the most popular os provided with the machine.
140527702724Smrg
140627702724Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say,
140727702724Smrg# "-sun"), then you have to tell the case statement up towards the top
140827702724Smrg# that MANUFACTURER isn't an operating system.  Otherwise, code above
140927702724Smrg# will signal an error saying that MANUFACTURER isn't an operating
141027702724Smrg# system, and we'll never get to this point.
141127702724Smrg
141227702724Smrgcase $basic_machine in
1413e19dfac4Smrg        score-*)
1414e19dfac4Smrg		os=-elf
1415e19dfac4Smrg		;;
1416e19dfac4Smrg        spu-*)
1417e19dfac4Smrg		os=-elf
1418e19dfac4Smrg		;;
141927702724Smrg	*-acorn)
142027702724Smrg		os=-riscix1.2
142127702724Smrg		;;
142227702724Smrg	arm*-rebel)
142327702724Smrg		os=-linux
142427702724Smrg		;;
142527702724Smrg	arm*-semi)
142627702724Smrg		os=-aout
142727702724Smrg		;;
1428e19dfac4Smrg        c4x-* | tic4x-*)
1429e19dfac4Smrg        	os=-coff
1430e19dfac4Smrg		;;
143127702724Smrg	# This must come before the *-dec entry.
143227702724Smrg	pdp10-*)
143327702724Smrg		os=-tops20
143427702724Smrg		;;
143527702724Smrg	pdp11-*)
143627702724Smrg		os=-none
143727702724Smrg		;;
143827702724Smrg	*-dec | vax-*)
143927702724Smrg		os=-ultrix4.2
144027702724Smrg		;;
144127702724Smrg	m68*-apollo)
144227702724Smrg		os=-domain
144327702724Smrg		;;
144427702724Smrg	i386-sun)
144527702724Smrg		os=-sunos4.0.2
144627702724Smrg		;;
144727702724Smrg	m68000-sun)
144827702724Smrg		os=-sunos3
144927702724Smrg		# This also exists in the configure program, but was not the
145027702724Smrg		# default.
145127702724Smrg		# os=-sunos4
145227702724Smrg		;;
145327702724Smrg	m68*-cisco)
145427702724Smrg		os=-aout
145527702724Smrg		;;
1456e19dfac4Smrg        mep-*)
1457e19dfac4Smrg		os=-elf
1458e19dfac4Smrg		;;
145927702724Smrg	mips*-cisco)
146027702724Smrg		os=-elf
146127702724Smrg		;;
146227702724Smrg	mips*-*)
146327702724Smrg		os=-elf
146427702724Smrg		;;
146527702724Smrg	or32-*)
146627702724Smrg		os=-coff
146727702724Smrg		;;
146827702724Smrg	*-tti)	# must be before sparc entry or we get the wrong os.
146927702724Smrg		os=-sysv3
147027702724Smrg		;;
147127702724Smrg	sparc-* | *-sun)
147227702724Smrg		os=-sunos4.1.1
147327702724Smrg		;;
147427702724Smrg	*-be)
147527702724Smrg		os=-beos
147627702724Smrg		;;
147727702724Smrg	*-haiku)
147827702724Smrg		os=-haiku
147927702724Smrg		;;
148027702724Smrg	*-ibm)
148127702724Smrg		os=-aix
148227702724Smrg		;;
148327702724Smrg    	*-knuth)
148427702724Smrg		os=-mmixware
148527702724Smrg		;;
148627702724Smrg	*-wec)
148727702724Smrg		os=-proelf
148827702724Smrg		;;
148927702724Smrg	*-winbond)
149027702724Smrg		os=-proelf
149127702724Smrg		;;
149227702724Smrg	*-oki)
149327702724Smrg		os=-proelf
149427702724Smrg		;;
149527702724Smrg	*-hp)
149627702724Smrg		os=-hpux
149727702724Smrg		;;
149827702724Smrg	*-hitachi)
149927702724Smrg		os=-hiux
150027702724Smrg		;;
150127702724Smrg	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
150227702724Smrg		os=-sysv
150327702724Smrg		;;
150427702724Smrg	*-cbm)
150527702724Smrg		os=-amigaos
150627702724Smrg		;;
150727702724Smrg	*-dg)
150827702724Smrg		os=-dgux
150927702724Smrg		;;
151027702724Smrg	*-dolphin)
151127702724Smrg		os=-sysv3
151227702724Smrg		;;
151327702724Smrg	m68k-ccur)
151427702724Smrg		os=-rtu
151527702724Smrg		;;
151627702724Smrg	m88k-omron*)
151727702724Smrg		os=-luna
151827702724Smrg		;;
151927702724Smrg	*-next )
152027702724Smrg		os=-nextstep
152127702724Smrg		;;
152227702724Smrg	*-sequent)
152327702724Smrg		os=-ptx
152427702724Smrg		;;
152527702724Smrg	*-crds)
152627702724Smrg		os=-unos
152727702724Smrg		;;
152827702724Smrg	*-ns)
152927702724Smrg		os=-genix
153027702724Smrg		;;
153127702724Smrg	i370-*)
153227702724Smrg		os=-mvs
153327702724Smrg		;;
153427702724Smrg	*-next)
153527702724Smrg		os=-nextstep3
153627702724Smrg		;;
153727702724Smrg	*-gould)
153827702724Smrg		os=-sysv
153927702724Smrg		;;
154027702724Smrg	*-highlevel)
154127702724Smrg		os=-bsd
154227702724Smrg		;;
154327702724Smrg	*-encore)
154427702724Smrg		os=-bsd
154527702724Smrg		;;
154627702724Smrg	*-sgi)
154727702724Smrg		os=-irix
154827702724Smrg		;;
154927702724Smrg	*-siemens)
155027702724Smrg		os=-sysv4
155127702724Smrg		;;
155227702724Smrg	*-masscomp)
155327702724Smrg		os=-rtu
155427702724Smrg		;;
155527702724Smrg	f30[01]-fujitsu | f700-fujitsu)
155627702724Smrg		os=-uxpv
155727702724Smrg		;;
155827702724Smrg	*-rom68k)
155927702724Smrg		os=-coff
156027702724Smrg		;;
156127702724Smrg	*-*bug)
156227702724Smrg		os=-coff
156327702724Smrg		;;
156427702724Smrg	*-apple)
156527702724Smrg		os=-macos
156627702724Smrg		;;
156727702724Smrg	*-atari*)
156827702724Smrg		os=-mint
156927702724Smrg		;;
157027702724Smrg	*)
157127702724Smrg		os=-none
157227702724Smrg		;;
157327702724Smrgesac
157427702724Smrgfi
157527702724Smrg
157627702724Smrg# Here we handle the case where we know the os, and the CPU type, but not the
157727702724Smrg# manufacturer.  We pick the logical manufacturer.
157827702724Smrgvendor=unknown
157927702724Smrgcase $basic_machine in
158027702724Smrg	*-unknown)
158127702724Smrg		case $os in
158227702724Smrg			-riscix*)
158327702724Smrg				vendor=acorn
158427702724Smrg				;;
158527702724Smrg			-sunos*)
158627702724Smrg				vendor=sun
158727702724Smrg				;;
158827702724Smrg			-aix*)
158927702724Smrg				vendor=ibm
159027702724Smrg				;;
159127702724Smrg			-beos*)
159227702724Smrg				vendor=be
159327702724Smrg				;;
159427702724Smrg			-hpux*)
159527702724Smrg				vendor=hp
159627702724Smrg				;;
159727702724Smrg			-mpeix*)
159827702724Smrg				vendor=hp
159927702724Smrg				;;
160027702724Smrg			-hiux*)
160127702724Smrg				vendor=hitachi
160227702724Smrg				;;
160327702724Smrg			-unos*)
160427702724Smrg				vendor=crds
160527702724Smrg				;;
160627702724Smrg			-dgux*)
160727702724Smrg				vendor=dg
160827702724Smrg				;;
160927702724Smrg			-luna*)
161027702724Smrg				vendor=omron
161127702724Smrg				;;
161227702724Smrg			-genix*)
161327702724Smrg				vendor=ns
161427702724Smrg				;;
161527702724Smrg			-mvs* | -opened*)
161627702724Smrg				vendor=ibm
161727702724Smrg				;;
161827702724Smrg			-os400*)
161927702724Smrg				vendor=ibm
162027702724Smrg				;;
162127702724Smrg			-ptx*)
162227702724Smrg				vendor=sequent
162327702724Smrg				;;
162427702724Smrg			-tpf*)
162527702724Smrg				vendor=ibm
162627702724Smrg				;;
162727702724Smrg			-vxsim* | -vxworks* | -windiss*)
162827702724Smrg				vendor=wrs
162927702724Smrg				;;
163027702724Smrg			-aux*)
163127702724Smrg				vendor=apple
163227702724Smrg				;;
163327702724Smrg			-hms*)
163427702724Smrg				vendor=hitachi
163527702724Smrg				;;
163627702724Smrg			-mpw* | -macos*)
163727702724Smrg				vendor=apple
163827702724Smrg				;;
163927702724Smrg			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
164027702724Smrg				vendor=atari
164127702724Smrg				;;
164227702724Smrg			-vos*)
164327702724Smrg				vendor=stratus
164427702724Smrg				;;
164527702724Smrg		esac
164627702724Smrg		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
164727702724Smrg		;;
164827702724Smrgesac
164927702724Smrg
165027702724Smrgecho $basic_machine$os
165127702724Smrgexit
165227702724Smrg
165327702724Smrg# Local variables:
165427702724Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
165527702724Smrg# time-stamp-start: "timestamp='"
165627702724Smrg# time-stamp-format: "%:y-%02m-%02d"
165727702724Smrg# time-stamp-end: "'"
165827702724Smrg# End:
1659