191a17321Smrg#! /bin/sh
291a17321Smrg# Configuration validation subroutine script.
391a17321Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
491a17321Smrg#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
591a17321Smrg
691a17321Smrgtimestamp='2005-07-08'
791a17321Smrg
891a17321Smrg# This file is (in principle) common to ALL GNU software.
991a17321Smrg# The presence of a machine in this file suggests that SOME GNU software
1091a17321Smrg# can handle that machine.  It does not imply ALL GNU software can.
1191a17321Smrg#
1291a17321Smrg# This file is free software; you can redistribute it and/or modify
1391a17321Smrg# it under the terms of the GNU General Public License as published by
1491a17321Smrg# the Free Software Foundation; either version 2 of the License, or
1591a17321Smrg# (at your option) any later version.
1691a17321Smrg#
1791a17321Smrg# This program is distributed in the hope that it will be useful,
1891a17321Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
1991a17321Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2091a17321Smrg# GNU General Public License for more details.
2191a17321Smrg#
2291a17321Smrg# You should have received a copy of the GNU General Public License
2391a17321Smrg# along with this program; if not, write to the Free Software
2491a17321Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
2591a17321Smrg# 02110-1301, USA.
2691a17321Smrg#
2791a17321Smrg# As a special exception to the GNU General Public License, if you
2891a17321Smrg# distribute this file as part of a program that contains a
2991a17321Smrg# configuration script generated by Autoconf, you may include it under
3091a17321Smrg# the same distribution terms that you use for the rest of that program.
3191a17321Smrg
3291a17321Smrg
3391a17321Smrg# Please send patches to <config-patches@gnu.org>.  Submit a context
3491a17321Smrg# diff and a properly formatted ChangeLog entry.
3591a17321Smrg#
3691a17321Smrg# Configuration subroutine to validate and canonicalize a configuration type.
3791a17321Smrg# Supply the specified configuration type as an argument.
3891a17321Smrg# If it is invalid, we print an error message on stderr and exit with code 1.
3991a17321Smrg# Otherwise, we print the canonical config type on stdout and succeed.
4091a17321Smrg
4191a17321Smrg# This file is supposed to be the same for all GNU packages
4291a17321Smrg# and recognize all the CPU types, system types and aliases
4391a17321Smrg# that are meaningful with *any* GNU software.
4491a17321Smrg# Each package is responsible for reporting which valid configurations
4591a17321Smrg# it does not support.  The user should be able to distinguish
4691a17321Smrg# a failure to support a valid configuration from a meaningless
4791a17321Smrg# configuration.
4891a17321Smrg
4991a17321Smrg# The goal of this file is to map all the various variations of a given
5091a17321Smrg# machine specification into a single specification in the form:
5191a17321Smrg#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
5291a17321Smrg# or in some cases, the newer four-part form:
5391a17321Smrg#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
5491a17321Smrg# It is wrong to echo any other type of specification.
5591a17321Smrg
5691a17321Smrgme=`echo "$0" | sed -e 's,.*/,,'`
5791a17321Smrg
5891a17321Smrgusage="\
5991a17321SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS
6091a17321Smrg       $0 [OPTION] ALIAS
6191a17321Smrg
6291a17321SmrgCanonicalize a configuration name.
6391a17321Smrg
6491a17321SmrgOperation modes:
6591a17321Smrg  -h, --help         print this help, then exit
6691a17321Smrg  -t, --time-stamp   print date of last modification, then exit
6791a17321Smrg  -v, --version      print version number, then exit
6891a17321Smrg
6991a17321SmrgReport bugs and patches to <config-patches@gnu.org>."
7091a17321Smrg
7191a17321Smrgversion="\
7291a17321SmrgGNU config.sub ($timestamp)
7391a17321Smrg
7491a17321SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
7591a17321SmrgFree Software Foundation, Inc.
7691a17321Smrg
7791a17321SmrgThis is free software; see the source for copying conditions.  There is NO
7891a17321Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
7991a17321Smrg
8091a17321Smrghelp="
8191a17321SmrgTry \`$me --help' for more information."
8291a17321Smrg
8391a17321Smrg# Parse command line
8491a17321Smrgwhile test $# -gt 0 ; do
8591a17321Smrg  case $1 in
8691a17321Smrg    --time-stamp | --time* | -t )
8791a17321Smrg       echo "$timestamp" ; exit ;;
8891a17321Smrg    --version | -v )
8991a17321Smrg       echo "$version" ; exit ;;
9091a17321Smrg    --help | --h* | -h )
9191a17321Smrg       echo "$usage"; exit ;;
9291a17321Smrg    -- )     # Stop option processing
9391a17321Smrg       shift; break ;;
9491a17321Smrg    - )	# Use stdin as input.
9591a17321Smrg       break ;;
9691a17321Smrg    -* )
9791a17321Smrg       echo "$me: invalid option $1$help"
9891a17321Smrg       exit 1 ;;
9991a17321Smrg
10091a17321Smrg    *local*)
10191a17321Smrg       # First pass through any local machine types.
10291a17321Smrg       echo $1
10391a17321Smrg       exit ;;
10491a17321Smrg
10591a17321Smrg    * )
10691a17321Smrg       break ;;
10791a17321Smrg  esac
10891a17321Smrgdone
10991a17321Smrg
11091a17321Smrgcase $# in
11191a17321Smrg 0) echo "$me: missing argument$help" >&2
11291a17321Smrg    exit 1;;
11391a17321Smrg 1) ;;
11491a17321Smrg *) echo "$me: too many arguments$help" >&2
11591a17321Smrg    exit 1;;
11691a17321Smrgesac
11791a17321Smrg
11891a17321Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
11991a17321Smrg# Here we must recognize all the valid KERNEL-OS combinations.
12091a17321Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
12191a17321Smrgcase $maybe_os in
12291a17321Smrg  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
12391a17321Smrg  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
12491a17321Smrg    os=-$maybe_os
12591a17321Smrg    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
12691a17321Smrg    ;;
12791a17321Smrg  *)
12891a17321Smrg    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
12991a17321Smrg    if [ $basic_machine != $1 ]
13091a17321Smrg    then os=`echo $1 | sed 's/.*-/-/'`
13191a17321Smrg    else os=; fi
13291a17321Smrg    ;;
13391a17321Smrgesac
13491a17321Smrg
13591a17321Smrg### Let's recognize common machines as not being operating systems so
13691a17321Smrg### that things like config.sub decstation-3100 work.  We also
13791a17321Smrg### recognize some manufacturers as not being operating systems, so we
13891a17321Smrg### can provide default operating systems below.
13991a17321Smrgcase $os in
14091a17321Smrg	-sun*os*)
14191a17321Smrg		# Prevent following clause from handling this invalid input.
14291a17321Smrg		;;
14391a17321Smrg	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
14491a17321Smrg	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
14591a17321Smrg	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
14691a17321Smrg	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
14791a17321Smrg	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
14891a17321Smrg	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
14991a17321Smrg	-apple | -axis | -knuth | -cray)
15091a17321Smrg		os=
15191a17321Smrg		basic_machine=$1
15291a17321Smrg		;;
15391a17321Smrg	-sim | -cisco | -oki | -wec | -winbond)
15491a17321Smrg		os=
15591a17321Smrg		basic_machine=$1
15691a17321Smrg		;;
15791a17321Smrg	-scout)
15891a17321Smrg		;;
15991a17321Smrg	-wrs)
16091a17321Smrg		os=-vxworks
16191a17321Smrg		basic_machine=$1
16291a17321Smrg		;;
16391a17321Smrg	-chorusos*)
16491a17321Smrg		os=-chorusos
16591a17321Smrg		basic_machine=$1
16691a17321Smrg		;;
16791a17321Smrg 	-chorusrdb)
16891a17321Smrg 		os=-chorusrdb
16991a17321Smrg		basic_machine=$1
17091a17321Smrg 		;;
17191a17321Smrg	-hiux*)
17291a17321Smrg		os=-hiuxwe2
17391a17321Smrg		;;
17491a17321Smrg	-sco5)
17591a17321Smrg		os=-sco3.2v5
17691a17321Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
17791a17321Smrg		;;
17891a17321Smrg	-sco4)
17991a17321Smrg		os=-sco3.2v4
18091a17321Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
18191a17321Smrg		;;
18291a17321Smrg	-sco3.2.[4-9]*)
18391a17321Smrg		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
18491a17321Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
18591a17321Smrg		;;
18691a17321Smrg	-sco3.2v[4-9]*)
18791a17321Smrg		# Don't forget version if it is 3.2v4 or newer.
18891a17321Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
18991a17321Smrg		;;
19091a17321Smrg	-sco*)
19191a17321Smrg		os=-sco3.2v2
19291a17321Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19391a17321Smrg		;;
19491a17321Smrg	-udk*)
19591a17321Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19691a17321Smrg		;;
19791a17321Smrg	-isc)
19891a17321Smrg		os=-isc2.2
19991a17321Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
20091a17321Smrg		;;
20191a17321Smrg	-clix*)
20291a17321Smrg		basic_machine=clipper-intergraph
20391a17321Smrg		;;
20491a17321Smrg	-isc*)
20591a17321Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
20691a17321Smrg		;;
20791a17321Smrg	-lynx*)
20891a17321Smrg		os=-lynxos
20991a17321Smrg		;;
21091a17321Smrg	-ptx*)
21191a17321Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
21291a17321Smrg		;;
21391a17321Smrg	-windowsnt*)
21491a17321Smrg		os=`echo $os | sed -e 's/windowsnt/winnt/'`
21591a17321Smrg		;;
21691a17321Smrg	-psos*)
21791a17321Smrg		os=-psos
21891a17321Smrg		;;
21991a17321Smrg	-mint | -mint[0-9]*)
22091a17321Smrg		basic_machine=m68k-atari
22191a17321Smrg		os=-mint
22291a17321Smrg		;;
22391a17321Smrgesac
22491a17321Smrg
22591a17321Smrg# Decode aliases for certain CPU-COMPANY combinations.
22691a17321Smrgcase $basic_machine in
22791a17321Smrg	# Recognize the basic CPU types without company name.
22891a17321Smrg	# Some are omitted here because they have special meanings below.
22991a17321Smrg	1750a | 580 \
23091a17321Smrg	| a29k \
23191a17321Smrg	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
23291a17321Smrg	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
23391a17321Smrg	| am33_2.0 \
23491a17321Smrg	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
23591a17321Smrg	| bfin \
23691a17321Smrg	| c4x | clipper \
23791a17321Smrg	| d10v | d30v | dlx | dsp16xx \
23891a17321Smrg	| fr30 | frv \
23991a17321Smrg	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
24091a17321Smrg	| i370 | i860 | i960 | ia64 \
24191a17321Smrg	| ip2k | iq2000 \
24291a17321Smrg	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
24391a17321Smrg	| mips | mipsbe | mipseb | mipsel | mipsle \
24491a17321Smrg	| mips16 \
24591a17321Smrg	| mips64 | mips64el \
24691a17321Smrg	| mips64vr | mips64vrel \
24791a17321Smrg	| mips64orion | mips64orionel \
24891a17321Smrg	| mips64vr4100 | mips64vr4100el \
24991a17321Smrg	| mips64vr4300 | mips64vr4300el \
25091a17321Smrg	| mips64vr5000 | mips64vr5000el \
25191a17321Smrg	| mips64vr5900 | mips64vr5900el \
25291a17321Smrg	| mipsisa32 | mipsisa32el \
25391a17321Smrg	| mipsisa32r2 | mipsisa32r2el \
25491a17321Smrg	| mipsisa64 | mipsisa64el \
25591a17321Smrg	| mipsisa64r2 | mipsisa64r2el \
25691a17321Smrg	| mipsisa64sb1 | mipsisa64sb1el \
25791a17321Smrg	| mipsisa64sr71k | mipsisa64sr71kel \
25891a17321Smrg	| mipstx39 | mipstx39el \
25991a17321Smrg	| mn10200 | mn10300 \
26091a17321Smrg	| ms1 \
26191a17321Smrg	| msp430 \
26291a17321Smrg	| ns16k | ns32k \
26391a17321Smrg	| or32 \
26491a17321Smrg	| pdp10 | pdp11 | pj | pjl \
26591a17321Smrg	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
26691a17321Smrg	| pyramid \
26791a17321Smrg	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
26891a17321Smrg	| sh64 | sh64le \
26991a17321Smrg	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
27091a17321Smrg	| sparcv8 | sparcv9 | sparcv9b \
27191a17321Smrg	| strongarm \
27291a17321Smrg	| tahoe | thumb | tic4x | tic80 | tron \
27391a17321Smrg	| v850 | v850e \
27491a17321Smrg	| we32k \
27591a17321Smrg	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
27691a17321Smrg	| z8k)
27791a17321Smrg		basic_machine=$basic_machine-unknown
27891a17321Smrg		;;
27991a17321Smrg	m32c)
28091a17321Smrg		basic_machine=$basic_machine-unknown
28191a17321Smrg		;;
28291a17321Smrg	m6811 | m68hc11 | m6812 | m68hc12)
28391a17321Smrg		# Motorola 68HC11/12.
28491a17321Smrg		basic_machine=$basic_machine-unknown
28591a17321Smrg		os=-none
28691a17321Smrg		;;
28791a17321Smrg	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
28891a17321Smrg		;;
28991a17321Smrg
29091a17321Smrg	# We use `pc' rather than `unknown'
29191a17321Smrg	# because (1) that's what they normally are, and
29291a17321Smrg	# (2) the word "unknown" tends to confuse beginning users.
29391a17321Smrg	i*86 | x86_64)
29491a17321Smrg	  basic_machine=$basic_machine-pc
29591a17321Smrg	  ;;
29691a17321Smrg	# Object if more than one company name word.
29791a17321Smrg	*-*-*)
29891a17321Smrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
29991a17321Smrg		exit 1
30091a17321Smrg		;;
30191a17321Smrg	# Recognize the basic CPU types with company name.
30291a17321Smrg	580-* \
30391a17321Smrg	| a29k-* \
30491a17321Smrg	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
30591a17321Smrg	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
30691a17321Smrg	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
30791a17321Smrg	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
30891a17321Smrg	| avr-* \
30991a17321Smrg	| bfin-* | bs2000-* \
31091a17321Smrg	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
31191a17321Smrg	| clipper-* | craynv-* | cydra-* \
31291a17321Smrg	| d10v-* | d30v-* | dlx-* \
31391a17321Smrg	| elxsi-* \
31491a17321Smrg	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
31591a17321Smrg	| h8300-* | h8500-* \
31691a17321Smrg	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
31791a17321Smrg	| i*86-* | i860-* | i960-* | ia64-* \
31891a17321Smrg	| ip2k-* | iq2000-* \
31991a17321Smrg	| m32r-* | m32rle-* \
32091a17321Smrg	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
32191a17321Smrg	| m88110-* | m88k-* | maxq-* | mcore-* \
32291a17321Smrg	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
32391a17321Smrg	| mips16-* \
32491a17321Smrg	| mips64-* | mips64el-* \
32591a17321Smrg	| mips64vr-* | mips64vrel-* \
32691a17321Smrg	| mips64orion-* | mips64orionel-* \
32791a17321Smrg	| mips64vr4100-* | mips64vr4100el-* \
32891a17321Smrg	| mips64vr4300-* | mips64vr4300el-* \
32991a17321Smrg	| mips64vr5000-* | mips64vr5000el-* \
33091a17321Smrg	| mips64vr5900-* | mips64vr5900el-* \
33191a17321Smrg	| mipsisa32-* | mipsisa32el-* \
33291a17321Smrg	| mipsisa32r2-* | mipsisa32r2el-* \
33391a17321Smrg	| mipsisa64-* | mipsisa64el-* \
33491a17321Smrg	| mipsisa64r2-* | mipsisa64r2el-* \
33591a17321Smrg	| mipsisa64sb1-* | mipsisa64sb1el-* \
33691a17321Smrg	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
33791a17321Smrg	| mipstx39-* | mipstx39el-* \
33891a17321Smrg	| mmix-* \
33991a17321Smrg	| ms1-* \
34091a17321Smrg	| msp430-* \
34191a17321Smrg	| none-* | np1-* | ns16k-* | ns32k-* \
34291a17321Smrg	| orion-* \
34391a17321Smrg	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
34491a17321Smrg	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
34591a17321Smrg	| pyramid-* \
34691a17321Smrg	| romp-* | rs6000-* \
34791a17321Smrg	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
34891a17321Smrg	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
34991a17321Smrg	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
35091a17321Smrg	| sparclite-* \
35191a17321Smrg	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
35291a17321Smrg	| tahoe-* | thumb-* \
35391a17321Smrg	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
35491a17321Smrg	| tron-* \
35591a17321Smrg	| v850-* | v850e-* | vax-* \
35691a17321Smrg	| we32k-* \
35791a17321Smrg	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
35891a17321Smrg	| xstormy16-* | xtensa-* \
35991a17321Smrg	| ymp-* \
36091a17321Smrg	| z8k-*)
36191a17321Smrg		;;
36291a17321Smrg	m32c-*)
36391a17321Smrg		;;
36491a17321Smrg	# Recognize the various machine names and aliases which stand
36591a17321Smrg	# for a CPU type and a company and sometimes even an OS.
36691a17321Smrg	386bsd)
36791a17321Smrg		basic_machine=i386-unknown
36891a17321Smrg		os=-bsd
36991a17321Smrg		;;
37091a17321Smrg	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
37191a17321Smrg		basic_machine=m68000-att
37291a17321Smrg		;;
37391a17321Smrg	3b*)
37491a17321Smrg		basic_machine=we32k-att
37591a17321Smrg		;;
37691a17321Smrg	a29khif)
37791a17321Smrg		basic_machine=a29k-amd
37891a17321Smrg		os=-udi
37991a17321Smrg		;;
38091a17321Smrg    	abacus)
38191a17321Smrg		basic_machine=abacus-unknown
38291a17321Smrg		;;
38391a17321Smrg	adobe68k)
38491a17321Smrg		basic_machine=m68010-adobe
38591a17321Smrg		os=-scout
38691a17321Smrg		;;
38791a17321Smrg	alliant | fx80)
38891a17321Smrg		basic_machine=fx80-alliant
38991a17321Smrg		;;
39091a17321Smrg	altos | altos3068)
39191a17321Smrg		basic_machine=m68k-altos
39291a17321Smrg		;;
39391a17321Smrg	am29k)
39491a17321Smrg		basic_machine=a29k-none
39591a17321Smrg		os=-bsd
39691a17321Smrg		;;
39791a17321Smrg	amd64)
39891a17321Smrg		basic_machine=x86_64-pc
39991a17321Smrg		;;
40091a17321Smrg	amd64-*)
40191a17321Smrg		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
40291a17321Smrg		;;
40391a17321Smrg	amdahl)
40491a17321Smrg		basic_machine=580-amdahl
40591a17321Smrg		os=-sysv
40691a17321Smrg		;;
40791a17321Smrg	amiga | amiga-*)
40891a17321Smrg		basic_machine=m68k-unknown
40991a17321Smrg		;;
41091a17321Smrg	amigaos | amigados)
41191a17321Smrg		basic_machine=m68k-unknown
41291a17321Smrg		os=-amigaos
41391a17321Smrg		;;
41491a17321Smrg	amigaunix | amix)
41591a17321Smrg		basic_machine=m68k-unknown
41691a17321Smrg		os=-sysv4
41791a17321Smrg		;;
41891a17321Smrg	apollo68)
41991a17321Smrg		basic_machine=m68k-apollo
42091a17321Smrg		os=-sysv
42191a17321Smrg		;;
42291a17321Smrg	apollo68bsd)
42391a17321Smrg		basic_machine=m68k-apollo
42491a17321Smrg		os=-bsd
42591a17321Smrg		;;
42691a17321Smrg	aux)
42791a17321Smrg		basic_machine=m68k-apple
42891a17321Smrg		os=-aux
42991a17321Smrg		;;
43091a17321Smrg	balance)
43191a17321Smrg		basic_machine=ns32k-sequent
43291a17321Smrg		os=-dynix
43391a17321Smrg		;;
43491a17321Smrg	c90)
43591a17321Smrg		basic_machine=c90-cray
43691a17321Smrg		os=-unicos
43791a17321Smrg		;;
43891a17321Smrg	convex-c1)
43991a17321Smrg		basic_machine=c1-convex
44091a17321Smrg		os=-bsd
44191a17321Smrg		;;
44291a17321Smrg	convex-c2)
44391a17321Smrg		basic_machine=c2-convex
44491a17321Smrg		os=-bsd
44591a17321Smrg		;;
44691a17321Smrg	convex-c32)
44791a17321Smrg		basic_machine=c32-convex
44891a17321Smrg		os=-bsd
44991a17321Smrg		;;
45091a17321Smrg	convex-c34)
45191a17321Smrg		basic_machine=c34-convex
45291a17321Smrg		os=-bsd
45391a17321Smrg		;;
45491a17321Smrg	convex-c38)
45591a17321Smrg		basic_machine=c38-convex
45691a17321Smrg		os=-bsd
45791a17321Smrg		;;
45891a17321Smrg	cray | j90)
45991a17321Smrg		basic_machine=j90-cray
46091a17321Smrg		os=-unicos
46191a17321Smrg		;;
46291a17321Smrg	craynv)
46391a17321Smrg		basic_machine=craynv-cray
46491a17321Smrg		os=-unicosmp
46591a17321Smrg		;;
46691a17321Smrg	cr16c)
46791a17321Smrg		basic_machine=cr16c-unknown
46891a17321Smrg		os=-elf
46991a17321Smrg		;;
47091a17321Smrg	crds | unos)
47191a17321Smrg		basic_machine=m68k-crds
47291a17321Smrg		;;
47391a17321Smrg	crisv32 | crisv32-* | etraxfs*)
47491a17321Smrg		basic_machine=crisv32-axis
47591a17321Smrg		;;
47691a17321Smrg	cris | cris-* | etrax*)
47791a17321Smrg		basic_machine=cris-axis
47891a17321Smrg		;;
47991a17321Smrg	crx)
48091a17321Smrg		basic_machine=crx-unknown
48191a17321Smrg		os=-elf
48291a17321Smrg		;;
48391a17321Smrg	da30 | da30-*)
48491a17321Smrg		basic_machine=m68k-da30
48591a17321Smrg		;;
48691a17321Smrg	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
48791a17321Smrg		basic_machine=mips-dec
48891a17321Smrg		;;
48991a17321Smrg	decsystem10* | dec10*)
49091a17321Smrg		basic_machine=pdp10-dec
49191a17321Smrg		os=-tops10
49291a17321Smrg		;;
49391a17321Smrg	decsystem20* | dec20*)
49491a17321Smrg		basic_machine=pdp10-dec
49591a17321Smrg		os=-tops20
49691a17321Smrg		;;
49791a17321Smrg	delta | 3300 | motorola-3300 | motorola-delta \
49891a17321Smrg	      | 3300-motorola | delta-motorola)
49991a17321Smrg		basic_machine=m68k-motorola
50091a17321Smrg		;;
50191a17321Smrg	delta88)
50291a17321Smrg		basic_machine=m88k-motorola
50391a17321Smrg		os=-sysv3
50491a17321Smrg		;;
50591a17321Smrg	djgpp)
50691a17321Smrg		basic_machine=i586-pc
50791a17321Smrg		os=-msdosdjgpp
50891a17321Smrg		;;
50991a17321Smrg	dpx20 | dpx20-*)
51091a17321Smrg		basic_machine=rs6000-bull
51191a17321Smrg		os=-bosx
51291a17321Smrg		;;
51391a17321Smrg	dpx2* | dpx2*-bull)
51491a17321Smrg		basic_machine=m68k-bull
51591a17321Smrg		os=-sysv3
51691a17321Smrg		;;
51791a17321Smrg	ebmon29k)
51891a17321Smrg		basic_machine=a29k-amd
51991a17321Smrg		os=-ebmon
52091a17321Smrg		;;
52191a17321Smrg	elxsi)
52291a17321Smrg		basic_machine=elxsi-elxsi
52391a17321Smrg		os=-bsd
52491a17321Smrg		;;
52591a17321Smrg	encore | umax | mmax)
52691a17321Smrg		basic_machine=ns32k-encore
52791a17321Smrg		;;
52891a17321Smrg	es1800 | OSE68k | ose68k | ose | OSE)
52991a17321Smrg		basic_machine=m68k-ericsson
53091a17321Smrg		os=-ose
53191a17321Smrg		;;
53291a17321Smrg	fx2800)
53391a17321Smrg		basic_machine=i860-alliant
53491a17321Smrg		;;
53591a17321Smrg	genix)
53691a17321Smrg		basic_machine=ns32k-ns
53791a17321Smrg		;;
53891a17321Smrg	gmicro)
53991a17321Smrg		basic_machine=tron-gmicro
54091a17321Smrg		os=-sysv
54191a17321Smrg		;;
54291a17321Smrg	go32)
54391a17321Smrg		basic_machine=i386-pc
54491a17321Smrg		os=-go32
54591a17321Smrg		;;
54691a17321Smrg	h3050r* | hiux*)
54791a17321Smrg		basic_machine=hppa1.1-hitachi
54891a17321Smrg		os=-hiuxwe2
54991a17321Smrg		;;
55091a17321Smrg	h8300hms)
55191a17321Smrg		basic_machine=h8300-hitachi
55291a17321Smrg		os=-hms
55391a17321Smrg		;;
55491a17321Smrg	h8300xray)
55591a17321Smrg		basic_machine=h8300-hitachi
55691a17321Smrg		os=-xray
55791a17321Smrg		;;
55891a17321Smrg	h8500hms)
55991a17321Smrg		basic_machine=h8500-hitachi
56091a17321Smrg		os=-hms
56191a17321Smrg		;;
56291a17321Smrg	harris)
56391a17321Smrg		basic_machine=m88k-harris
56491a17321Smrg		os=-sysv3
56591a17321Smrg		;;
56691a17321Smrg	hp300-*)
56791a17321Smrg		basic_machine=m68k-hp
56891a17321Smrg		;;
56991a17321Smrg	hp300bsd)
57091a17321Smrg		basic_machine=m68k-hp
57191a17321Smrg		os=-bsd
57291a17321Smrg		;;
57391a17321Smrg	hp300hpux)
57491a17321Smrg		basic_machine=m68k-hp
57591a17321Smrg		os=-hpux
57691a17321Smrg		;;
57791a17321Smrg	hp3k9[0-9][0-9] | hp9[0-9][0-9])
57891a17321Smrg		basic_machine=hppa1.0-hp
57991a17321Smrg		;;
58091a17321Smrg	hp9k2[0-9][0-9] | hp9k31[0-9])
58191a17321Smrg		basic_machine=m68000-hp
58291a17321Smrg		;;
58391a17321Smrg	hp9k3[2-9][0-9])
58491a17321Smrg		basic_machine=m68k-hp
58591a17321Smrg		;;
58691a17321Smrg	hp9k6[0-9][0-9] | hp6[0-9][0-9])
58791a17321Smrg		basic_machine=hppa1.0-hp
58891a17321Smrg		;;
58991a17321Smrg	hp9k7[0-79][0-9] | hp7[0-79][0-9])
59091a17321Smrg		basic_machine=hppa1.1-hp
59191a17321Smrg		;;
59291a17321Smrg	hp9k78[0-9] | hp78[0-9])
59391a17321Smrg		# FIXME: really hppa2.0-hp
59491a17321Smrg		basic_machine=hppa1.1-hp
59591a17321Smrg		;;
59691a17321Smrg	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
59791a17321Smrg		# FIXME: really hppa2.0-hp
59891a17321Smrg		basic_machine=hppa1.1-hp
59991a17321Smrg		;;
60091a17321Smrg	hp9k8[0-9][13679] | hp8[0-9][13679])
60191a17321Smrg		basic_machine=hppa1.1-hp
60291a17321Smrg		;;
60391a17321Smrg	hp9k8[0-9][0-9] | hp8[0-9][0-9])
60491a17321Smrg		basic_machine=hppa1.0-hp
60591a17321Smrg		;;
60691a17321Smrg	hppa-next)
60791a17321Smrg		os=-nextstep3
60891a17321Smrg		;;
60991a17321Smrg	hppaosf)
61091a17321Smrg		basic_machine=hppa1.1-hp
61191a17321Smrg		os=-osf
61291a17321Smrg		;;
61391a17321Smrg	hppro)
61491a17321Smrg		basic_machine=hppa1.1-hp
61591a17321Smrg		os=-proelf
61691a17321Smrg		;;
61791a17321Smrg	i370-ibm* | ibm*)
61891a17321Smrg		basic_machine=i370-ibm
61991a17321Smrg		;;
62091a17321Smrg# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
62191a17321Smrg	i*86v32)
62291a17321Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
62391a17321Smrg		os=-sysv32
62491a17321Smrg		;;
62591a17321Smrg	i*86v4*)
62691a17321Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
62791a17321Smrg		os=-sysv4
62891a17321Smrg		;;
62991a17321Smrg	i*86v)
63091a17321Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
63191a17321Smrg		os=-sysv
63291a17321Smrg		;;
63391a17321Smrg	i*86sol2)
63491a17321Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
63591a17321Smrg		os=-solaris2
63691a17321Smrg		;;
63791a17321Smrg	i386mach)
63891a17321Smrg		basic_machine=i386-mach
63991a17321Smrg		os=-mach
64091a17321Smrg		;;
64191a17321Smrg	i386-vsta | vsta)
64291a17321Smrg		basic_machine=i386-unknown
64391a17321Smrg		os=-vsta
64491a17321Smrg		;;
64591a17321Smrg	iris | iris4d)
64691a17321Smrg		basic_machine=mips-sgi
64791a17321Smrg		case $os in
64891a17321Smrg		    -irix*)
64991a17321Smrg			;;
65091a17321Smrg		    *)
65191a17321Smrg			os=-irix4
65291a17321Smrg			;;
65391a17321Smrg		esac
65491a17321Smrg		;;
65591a17321Smrg	isi68 | isi)
65691a17321Smrg		basic_machine=m68k-isi
65791a17321Smrg		os=-sysv
65891a17321Smrg		;;
65991a17321Smrg	m88k-omron*)
66091a17321Smrg		basic_machine=m88k-omron
66191a17321Smrg		;;
66291a17321Smrg	magnum | m3230)
66391a17321Smrg		basic_machine=mips-mips
66491a17321Smrg		os=-sysv
66591a17321Smrg		;;
66691a17321Smrg	merlin)
66791a17321Smrg		basic_machine=ns32k-utek
66891a17321Smrg		os=-sysv
66991a17321Smrg		;;
67091a17321Smrg	mingw32)
67191a17321Smrg		basic_machine=i386-pc
67291a17321Smrg		os=-mingw32
67391a17321Smrg		;;
67491a17321Smrg	miniframe)
67591a17321Smrg		basic_machine=m68000-convergent
67691a17321Smrg		;;
67791a17321Smrg	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
67891a17321Smrg		basic_machine=m68k-atari
67991a17321Smrg		os=-mint
68091a17321Smrg		;;
68191a17321Smrg	mips3*-*)
68291a17321Smrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
68391a17321Smrg		;;
68491a17321Smrg	mips3*)
68591a17321Smrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
68691a17321Smrg		;;
68791a17321Smrg	monitor)
68891a17321Smrg		basic_machine=m68k-rom68k
68991a17321Smrg		os=-coff
69091a17321Smrg		;;
69191a17321Smrg	morphos)
69291a17321Smrg		basic_machine=powerpc-unknown
69391a17321Smrg		os=-morphos
69491a17321Smrg		;;
69591a17321Smrg	msdos)
69691a17321Smrg		basic_machine=i386-pc
69791a17321Smrg		os=-msdos
69891a17321Smrg		;;
69991a17321Smrg	mvs)
70091a17321Smrg		basic_machine=i370-ibm
70191a17321Smrg		os=-mvs
70291a17321Smrg		;;
70391a17321Smrg	ncr3000)
70491a17321Smrg		basic_machine=i486-ncr
70591a17321Smrg		os=-sysv4
70691a17321Smrg		;;
70791a17321Smrg	netbsd386)
70891a17321Smrg		basic_machine=i386-unknown
70991a17321Smrg		os=-netbsd
71091a17321Smrg		;;
71191a17321Smrg	netwinder)
71291a17321Smrg		basic_machine=armv4l-rebel
71391a17321Smrg		os=-linux
71491a17321Smrg		;;
71591a17321Smrg	news | news700 | news800 | news900)
71691a17321Smrg		basic_machine=m68k-sony
71791a17321Smrg		os=-newsos
71891a17321Smrg		;;
71991a17321Smrg	news1000)
72091a17321Smrg		basic_machine=m68030-sony
72191a17321Smrg		os=-newsos
72291a17321Smrg		;;
72391a17321Smrg	news-3600 | risc-news)
72491a17321Smrg		basic_machine=mips-sony
72591a17321Smrg		os=-newsos
72691a17321Smrg		;;
72791a17321Smrg	necv70)
72891a17321Smrg		basic_machine=v70-nec
72991a17321Smrg		os=-sysv
73091a17321Smrg		;;
73191a17321Smrg	next | m*-next )
73291a17321Smrg		basic_machine=m68k-next
73391a17321Smrg		case $os in
73491a17321Smrg		    -nextstep* )
73591a17321Smrg			;;
73691a17321Smrg		    -ns2*)
73791a17321Smrg		      os=-nextstep2
73891a17321Smrg			;;
73991a17321Smrg		    *)
74091a17321Smrg		      os=-nextstep3
74191a17321Smrg			;;
74291a17321Smrg		esac
74391a17321Smrg		;;
74491a17321Smrg	nh3000)
74591a17321Smrg		basic_machine=m68k-harris
74691a17321Smrg		os=-cxux
74791a17321Smrg		;;
74891a17321Smrg	nh[45]000)
74991a17321Smrg		basic_machine=m88k-harris
75091a17321Smrg		os=-cxux
75191a17321Smrg		;;
75291a17321Smrg	nindy960)
75391a17321Smrg		basic_machine=i960-intel
75491a17321Smrg		os=-nindy
75591a17321Smrg		;;
75691a17321Smrg	mon960)
75791a17321Smrg		basic_machine=i960-intel
75891a17321Smrg		os=-mon960
75991a17321Smrg		;;
76091a17321Smrg	nonstopux)
76191a17321Smrg		basic_machine=mips-compaq
76291a17321Smrg		os=-nonstopux
76391a17321Smrg		;;
76491a17321Smrg	np1)
76591a17321Smrg		basic_machine=np1-gould
76691a17321Smrg		;;
76791a17321Smrg	nsr-tandem)
76891a17321Smrg		basic_machine=nsr-tandem
76991a17321Smrg		;;
77091a17321Smrg	op50n-* | op60c-*)
77191a17321Smrg		basic_machine=hppa1.1-oki
77291a17321Smrg		os=-proelf
77391a17321Smrg		;;
77491a17321Smrg	openrisc | openrisc-*)
77591a17321Smrg		basic_machine=or32-unknown
77691a17321Smrg		;;
77791a17321Smrg	os400)
77891a17321Smrg		basic_machine=powerpc-ibm
77991a17321Smrg		os=-os400
78091a17321Smrg		;;
78191a17321Smrg	OSE68000 | ose68000)
78291a17321Smrg		basic_machine=m68000-ericsson
78391a17321Smrg		os=-ose
78491a17321Smrg		;;
78591a17321Smrg	os68k)
78691a17321Smrg		basic_machine=m68k-none
78791a17321Smrg		os=-os68k
78891a17321Smrg		;;
78991a17321Smrg	pa-hitachi)
79091a17321Smrg		basic_machine=hppa1.1-hitachi
79191a17321Smrg		os=-hiuxwe2
79291a17321Smrg		;;
79391a17321Smrg	paragon)
79491a17321Smrg		basic_machine=i860-intel
79591a17321Smrg		os=-osf
79691a17321Smrg		;;
79791a17321Smrg	pbd)
79891a17321Smrg		basic_machine=sparc-tti
79991a17321Smrg		;;
80091a17321Smrg	pbb)
80191a17321Smrg		basic_machine=m68k-tti
80291a17321Smrg		;;
80391a17321Smrg	pc532 | pc532-*)
80491a17321Smrg		basic_machine=ns32k-pc532
80591a17321Smrg		;;
80691a17321Smrg	pentium | p5 | k5 | k6 | nexgen | viac3)
80791a17321Smrg		basic_machine=i586-pc
80891a17321Smrg		;;
80991a17321Smrg	pentiumpro | p6 | 6x86 | athlon | athlon_*)
81091a17321Smrg		basic_machine=i686-pc
81191a17321Smrg		;;
81291a17321Smrg	pentiumii | pentium2 | pentiumiii | pentium3)
81391a17321Smrg		basic_machine=i686-pc
81491a17321Smrg		;;
81591a17321Smrg	pentium4)
81691a17321Smrg		basic_machine=i786-pc
81791a17321Smrg		;;
81891a17321Smrg	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
81991a17321Smrg		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
82091a17321Smrg		;;
82191a17321Smrg	pentiumpro-* | p6-* | 6x86-* | athlon-*)
82291a17321Smrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
82391a17321Smrg		;;
82491a17321Smrg	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
82591a17321Smrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
82691a17321Smrg		;;
82791a17321Smrg	pentium4-*)
82891a17321Smrg		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
82991a17321Smrg		;;
83091a17321Smrg	pn)
83191a17321Smrg		basic_machine=pn-gould
83291a17321Smrg		;;
83391a17321Smrg	power)	basic_machine=power-ibm
83491a17321Smrg		;;
83591a17321Smrg	ppc)	basic_machine=powerpc-unknown
83691a17321Smrg		;;
83791a17321Smrg	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
83891a17321Smrg		;;
83991a17321Smrg	ppcle | powerpclittle | ppc-le | powerpc-little)
84091a17321Smrg		basic_machine=powerpcle-unknown
84191a17321Smrg		;;
84291a17321Smrg	ppcle-* | powerpclittle-*)
84391a17321Smrg		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
84491a17321Smrg		;;
84591a17321Smrg	ppc64)	basic_machine=powerpc64-unknown
84691a17321Smrg		;;
84791a17321Smrg	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
84891a17321Smrg		;;
84991a17321Smrg	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
85091a17321Smrg		basic_machine=powerpc64le-unknown
85191a17321Smrg		;;
85291a17321Smrg	ppc64le-* | powerpc64little-*)
85391a17321Smrg		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
85491a17321Smrg		;;
85591a17321Smrg	ps2)
85691a17321Smrg		basic_machine=i386-ibm
85791a17321Smrg		;;
85891a17321Smrg	pw32)
85991a17321Smrg		basic_machine=i586-unknown
86091a17321Smrg		os=-pw32
86191a17321Smrg		;;
86291a17321Smrg	rom68k)
86391a17321Smrg		basic_machine=m68k-rom68k
86491a17321Smrg		os=-coff
86591a17321Smrg		;;
86691a17321Smrg	rm[46]00)
86791a17321Smrg		basic_machine=mips-siemens
86891a17321Smrg		;;
86991a17321Smrg	rtpc | rtpc-*)
87091a17321Smrg		basic_machine=romp-ibm
87191a17321Smrg		;;
87291a17321Smrg	s390 | s390-*)
87391a17321Smrg		basic_machine=s390-ibm
87491a17321Smrg		;;
87591a17321Smrg	s390x | s390x-*)
87691a17321Smrg		basic_machine=s390x-ibm
87791a17321Smrg		;;
87891a17321Smrg	sa29200)
87991a17321Smrg		basic_machine=a29k-amd
88091a17321Smrg		os=-udi
88191a17321Smrg		;;
88291a17321Smrg	sb1)
88391a17321Smrg		basic_machine=mipsisa64sb1-unknown
88491a17321Smrg		;;
88591a17321Smrg	sb1el)
88691a17321Smrg		basic_machine=mipsisa64sb1el-unknown
88791a17321Smrg		;;
88891a17321Smrg	sei)
88991a17321Smrg		basic_machine=mips-sei
89091a17321Smrg		os=-seiux
89191a17321Smrg		;;
89291a17321Smrg	sequent)
89391a17321Smrg		basic_machine=i386-sequent
89491a17321Smrg		;;
89591a17321Smrg	sh)
89691a17321Smrg		basic_machine=sh-hitachi
89791a17321Smrg		os=-hms
89891a17321Smrg		;;
89991a17321Smrg	sh64)
90091a17321Smrg		basic_machine=sh64-unknown
90191a17321Smrg		;;
90291a17321Smrg	sparclite-wrs | simso-wrs)
90391a17321Smrg		basic_machine=sparclite-wrs
90491a17321Smrg		os=-vxworks
90591a17321Smrg		;;
90691a17321Smrg	sps7)
90791a17321Smrg		basic_machine=m68k-bull
90891a17321Smrg		os=-sysv2
90991a17321Smrg		;;
91091a17321Smrg	spur)
91191a17321Smrg		basic_machine=spur-unknown
91291a17321Smrg		;;
91391a17321Smrg	st2000)
91491a17321Smrg		basic_machine=m68k-tandem
91591a17321Smrg		;;
91691a17321Smrg	stratus)
91791a17321Smrg		basic_machine=i860-stratus
91891a17321Smrg		os=-sysv4
91991a17321Smrg		;;
92091a17321Smrg	sun2)
92191a17321Smrg		basic_machine=m68000-sun
92291a17321Smrg		;;
92391a17321Smrg	sun2os3)
92491a17321Smrg		basic_machine=m68000-sun
92591a17321Smrg		os=-sunos3
92691a17321Smrg		;;
92791a17321Smrg	sun2os4)
92891a17321Smrg		basic_machine=m68000-sun
92991a17321Smrg		os=-sunos4
93091a17321Smrg		;;
93191a17321Smrg	sun3os3)
93291a17321Smrg		basic_machine=m68k-sun
93391a17321Smrg		os=-sunos3
93491a17321Smrg		;;
93591a17321Smrg	sun3os4)
93691a17321Smrg		basic_machine=m68k-sun
93791a17321Smrg		os=-sunos4
93891a17321Smrg		;;
93991a17321Smrg	sun4os3)
94091a17321Smrg		basic_machine=sparc-sun
94191a17321Smrg		os=-sunos3
94291a17321Smrg		;;
94391a17321Smrg	sun4os4)
94491a17321Smrg		basic_machine=sparc-sun
94591a17321Smrg		os=-sunos4
94691a17321Smrg		;;
94791a17321Smrg	sun4sol2)
94891a17321Smrg		basic_machine=sparc-sun
94991a17321Smrg		os=-solaris2
95091a17321Smrg		;;
95191a17321Smrg	sun3 | sun3-*)
95291a17321Smrg		basic_machine=m68k-sun
95391a17321Smrg		;;
95491a17321Smrg	sun4)
95591a17321Smrg		basic_machine=sparc-sun
95691a17321Smrg		;;
95791a17321Smrg	sun386 | sun386i | roadrunner)
95891a17321Smrg		basic_machine=i386-sun
95991a17321Smrg		;;
96091a17321Smrg	sv1)
96191a17321Smrg		basic_machine=sv1-cray
96291a17321Smrg		os=-unicos
96391a17321Smrg		;;
96491a17321Smrg	symmetry)
96591a17321Smrg		basic_machine=i386-sequent
96691a17321Smrg		os=-dynix
96791a17321Smrg		;;
96891a17321Smrg	t3e)
96991a17321Smrg		basic_machine=alphaev5-cray
97091a17321Smrg		os=-unicos
97191a17321Smrg		;;
97291a17321Smrg	t90)
97391a17321Smrg		basic_machine=t90-cray
97491a17321Smrg		os=-unicos
97591a17321Smrg		;;
97691a17321Smrg	tic54x | c54x*)
97791a17321Smrg		basic_machine=tic54x-unknown
97891a17321Smrg		os=-coff
97991a17321Smrg		;;
98091a17321Smrg	tic55x | c55x*)
98191a17321Smrg		basic_machine=tic55x-unknown
98291a17321Smrg		os=-coff
98391a17321Smrg		;;
98491a17321Smrg	tic6x | c6x*)
98591a17321Smrg		basic_machine=tic6x-unknown
98691a17321Smrg		os=-coff
98791a17321Smrg		;;
98891a17321Smrg	tx39)
98991a17321Smrg		basic_machine=mipstx39-unknown
99091a17321Smrg		;;
99191a17321Smrg	tx39el)
99291a17321Smrg		basic_machine=mipstx39el-unknown
99391a17321Smrg		;;
99491a17321Smrg	toad1)
99591a17321Smrg		basic_machine=pdp10-xkl
99691a17321Smrg		os=-tops20
99791a17321Smrg		;;
99891a17321Smrg	tower | tower-32)
99991a17321Smrg		basic_machine=m68k-ncr
100091a17321Smrg		;;
100191a17321Smrg	tpf)
100291a17321Smrg		basic_machine=s390x-ibm
100391a17321Smrg		os=-tpf
100491a17321Smrg		;;
100591a17321Smrg	udi29k)
100691a17321Smrg		basic_machine=a29k-amd
100791a17321Smrg		os=-udi
100891a17321Smrg		;;
100991a17321Smrg	ultra3)
101091a17321Smrg		basic_machine=a29k-nyu
101191a17321Smrg		os=-sym1
101291a17321Smrg		;;
101391a17321Smrg	v810 | necv810)
101491a17321Smrg		basic_machine=v810-nec
101591a17321Smrg		os=-none
101691a17321Smrg		;;
101791a17321Smrg	vaxv)
101891a17321Smrg		basic_machine=vax-dec
101991a17321Smrg		os=-sysv
102091a17321Smrg		;;
102191a17321Smrg	vms)
102291a17321Smrg		basic_machine=vax-dec
102391a17321Smrg		os=-vms
102491a17321Smrg		;;
102591a17321Smrg	vpp*|vx|vx-*)
102691a17321Smrg		basic_machine=f301-fujitsu
102791a17321Smrg		;;
102891a17321Smrg	vxworks960)
102991a17321Smrg		basic_machine=i960-wrs
103091a17321Smrg		os=-vxworks
103191a17321Smrg		;;
103291a17321Smrg	vxworks68)
103391a17321Smrg		basic_machine=m68k-wrs
103491a17321Smrg		os=-vxworks
103591a17321Smrg		;;
103691a17321Smrg	vxworks29k)
103791a17321Smrg		basic_machine=a29k-wrs
103891a17321Smrg		os=-vxworks
103991a17321Smrg		;;
104091a17321Smrg	w65*)
104191a17321Smrg		basic_machine=w65-wdc
104291a17321Smrg		os=-none
104391a17321Smrg		;;
104491a17321Smrg	w89k-*)
104591a17321Smrg		basic_machine=hppa1.1-winbond
104691a17321Smrg		os=-proelf
104791a17321Smrg		;;
104891a17321Smrg	xbox)
104991a17321Smrg		basic_machine=i686-pc
105091a17321Smrg		os=-mingw32
105191a17321Smrg		;;
105291a17321Smrg	xps | xps100)
105391a17321Smrg		basic_machine=xps100-honeywell
105491a17321Smrg		;;
105591a17321Smrg	ymp)
105691a17321Smrg		basic_machine=ymp-cray
105791a17321Smrg		os=-unicos
105891a17321Smrg		;;
105991a17321Smrg	z8k-*-coff)
106091a17321Smrg		basic_machine=z8k-unknown
106191a17321Smrg		os=-sim
106291a17321Smrg		;;
106391a17321Smrg	none)
106491a17321Smrg		basic_machine=none-none
106591a17321Smrg		os=-none
106691a17321Smrg		;;
106791a17321Smrg
106891a17321Smrg# Here we handle the default manufacturer of certain CPU types.  It is in
106991a17321Smrg# some cases the only manufacturer, in others, it is the most popular.
107091a17321Smrg	w89k)
107191a17321Smrg		basic_machine=hppa1.1-winbond
107291a17321Smrg		;;
107391a17321Smrg	op50n)
107491a17321Smrg		basic_machine=hppa1.1-oki
107591a17321Smrg		;;
107691a17321Smrg	op60c)
107791a17321Smrg		basic_machine=hppa1.1-oki
107891a17321Smrg		;;
107991a17321Smrg	romp)
108091a17321Smrg		basic_machine=romp-ibm
108191a17321Smrg		;;
108291a17321Smrg	mmix)
108391a17321Smrg		basic_machine=mmix-knuth
108491a17321Smrg		;;
108591a17321Smrg	rs6000)
108691a17321Smrg		basic_machine=rs6000-ibm
108791a17321Smrg		;;
108891a17321Smrg	vax)
108991a17321Smrg		basic_machine=vax-dec
109091a17321Smrg		;;
109191a17321Smrg	pdp10)
109291a17321Smrg		# there are many clones, so DEC is not a safe bet
109391a17321Smrg		basic_machine=pdp10-unknown
109491a17321Smrg		;;
109591a17321Smrg	pdp11)
109691a17321Smrg		basic_machine=pdp11-dec
109791a17321Smrg		;;
109891a17321Smrg	we32k)
109991a17321Smrg		basic_machine=we32k-att
110091a17321Smrg		;;
110191a17321Smrg	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
110291a17321Smrg		basic_machine=sh-unknown
110391a17321Smrg		;;
110491a17321Smrg	sparc | sparcv8 | sparcv9 | sparcv9b)
110591a17321Smrg		basic_machine=sparc-sun
110691a17321Smrg		;;
110791a17321Smrg	cydra)
110891a17321Smrg		basic_machine=cydra-cydrome
110991a17321Smrg		;;
111091a17321Smrg	orion)
111191a17321Smrg		basic_machine=orion-highlevel
111291a17321Smrg		;;
111391a17321Smrg	orion105)
111491a17321Smrg		basic_machine=clipper-highlevel
111591a17321Smrg		;;
111691a17321Smrg	mac | mpw | mac-mpw)
111791a17321Smrg		basic_machine=m68k-apple
111891a17321Smrg		;;
111991a17321Smrg	pmac | pmac-mpw)
112091a17321Smrg		basic_machine=powerpc-apple
112191a17321Smrg		;;
112291a17321Smrg	*-unknown)
112391a17321Smrg		# Make sure to match an already-canonicalized machine name.
112491a17321Smrg		;;
112591a17321Smrg	*)
112691a17321Smrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
112791a17321Smrg		exit 1
112891a17321Smrg		;;
112991a17321Smrgesac
113091a17321Smrg
113191a17321Smrg# Here we canonicalize certain aliases for manufacturers.
113291a17321Smrgcase $basic_machine in
113391a17321Smrg	*-digital*)
113491a17321Smrg		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
113591a17321Smrg		;;
113691a17321Smrg	*-commodore*)
113791a17321Smrg		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
113891a17321Smrg		;;
113991a17321Smrg	*)
114091a17321Smrg		;;
114191a17321Smrgesac
114291a17321Smrg
114391a17321Smrg# Decode manufacturer-specific aliases for certain operating systems.
114491a17321Smrg
114591a17321Smrgif [ x"$os" != x"" ]
114691a17321Smrgthen
114791a17321Smrgcase $os in
114891a17321Smrg        # First match some system type aliases
114991a17321Smrg        # that might get confused with valid system types.
115091a17321Smrg	# -solaris* is a basic system type, with this one exception.
115191a17321Smrg	-solaris1 | -solaris1.*)
115291a17321Smrg		os=`echo $os | sed -e 's|solaris1|sunos4|'`
115391a17321Smrg		;;
115491a17321Smrg	-solaris)
115591a17321Smrg		os=-solaris2
115691a17321Smrg		;;
115791a17321Smrg	-svr4*)
115891a17321Smrg		os=-sysv4
115991a17321Smrg		;;
116091a17321Smrg	-unixware*)
116191a17321Smrg		os=-sysv4.2uw
116291a17321Smrg		;;
116391a17321Smrg	-gnu/linux*)
116491a17321Smrg		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
116591a17321Smrg		;;
116691a17321Smrg	# First accept the basic system types.
116791a17321Smrg	# The portable systems comes first.
116891a17321Smrg	# Each alternative MUST END IN A *, to match a version number.
116991a17321Smrg	# -sysv* is not here because it comes later, after sysvr4.
117091a17321Smrg	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
117191a17321Smrg	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
117291a17321Smrg	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
117391a17321Smrg	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
117491a17321Smrg	      | -aos* \
117591a17321Smrg	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
117691a17321Smrg	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
117791a17321Smrg	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
117891a17321Smrg	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
117991a17321Smrg	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
118091a17321Smrg	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
118191a17321Smrg	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
118291a17321Smrg	      | -chorusos* | -chorusrdb* \
118391a17321Smrg	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
118491a17321Smrg	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
118591a17321Smrg	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
118691a17321Smrg	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
118791a17321Smrg	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
118891a17321Smrg	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
118991a17321Smrg	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
119091a17321Smrg	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
119191a17321Smrg	      | -skyos* | -haiku*)
119291a17321Smrg	# Remember, each alternative MUST END IN *, to match a version number.
119391a17321Smrg		;;
119491a17321Smrg	-qnx*)
119591a17321Smrg		case $basic_machine in
119691a17321Smrg		    x86-* | i*86-*)
119791a17321Smrg			;;
119891a17321Smrg		    *)
119991a17321Smrg			os=-nto$os
120091a17321Smrg			;;
120191a17321Smrg		esac
120291a17321Smrg		;;
120391a17321Smrg	-nto-qnx*)
120491a17321Smrg		;;
120591a17321Smrg	-nto*)
120691a17321Smrg		os=`echo $os | sed -e 's|nto|nto-qnx|'`
120791a17321Smrg		;;
120891a17321Smrg	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
120991a17321Smrg	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
121091a17321Smrg	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
121191a17321Smrg		;;
121291a17321Smrg	-mac*)
121391a17321Smrg		os=`echo $os | sed -e 's|mac|macos|'`
121491a17321Smrg		;;
121591a17321Smrg	-linux-dietlibc)
121691a17321Smrg		os=-linux-dietlibc
121791a17321Smrg		;;
121891a17321Smrg	-linux*)
121991a17321Smrg		os=`echo $os | sed -e 's|linux|linux-gnu|'`
122091a17321Smrg		;;
122191a17321Smrg	-sunos5*)
122291a17321Smrg		os=`echo $os | sed -e 's|sunos5|solaris2|'`
122391a17321Smrg		;;
122491a17321Smrg	-sunos6*)
122591a17321Smrg		os=`echo $os | sed -e 's|sunos6|solaris3|'`
122691a17321Smrg		;;
122791a17321Smrg	-opened*)
122891a17321Smrg		os=-openedition
122991a17321Smrg		;;
123091a17321Smrg        -os400*)
123191a17321Smrg		os=-os400
123291a17321Smrg		;;
123391a17321Smrg	-wince*)
123491a17321Smrg		os=-wince
123591a17321Smrg		;;
123691a17321Smrg	-osfrose*)
123791a17321Smrg		os=-osfrose
123891a17321Smrg		;;
123991a17321Smrg	-osf*)
124091a17321Smrg		os=-osf
124191a17321Smrg		;;
124291a17321Smrg	-utek*)
124391a17321Smrg		os=-bsd
124491a17321Smrg		;;
124591a17321Smrg	-dynix*)
124691a17321Smrg		os=-bsd
124791a17321Smrg		;;
124891a17321Smrg	-acis*)
124991a17321Smrg		os=-aos
125091a17321Smrg		;;
125191a17321Smrg	-atheos*)
125291a17321Smrg		os=-atheos
125391a17321Smrg		;;
125491a17321Smrg	-syllable*)
125591a17321Smrg		os=-syllable
125691a17321Smrg		;;
125791a17321Smrg	-386bsd)
125891a17321Smrg		os=-bsd
125991a17321Smrg		;;
126091a17321Smrg	-ctix* | -uts*)
126191a17321Smrg		os=-sysv
126291a17321Smrg		;;
126391a17321Smrg	-nova*)
126491a17321Smrg		os=-rtmk-nova
126591a17321Smrg		;;
126691a17321Smrg	-ns2 )
126791a17321Smrg		os=-nextstep2
126891a17321Smrg		;;
126991a17321Smrg	-nsk*)
127091a17321Smrg		os=-nsk
127191a17321Smrg		;;
127291a17321Smrg	# Preserve the version number of sinix5.
127391a17321Smrg	-sinix5.*)
127491a17321Smrg		os=`echo $os | sed -e 's|sinix|sysv|'`
127591a17321Smrg		;;
127691a17321Smrg	-sinix*)
127791a17321Smrg		os=-sysv4
127891a17321Smrg		;;
127991a17321Smrg        -tpf*)
128091a17321Smrg		os=-tpf
128191a17321Smrg		;;
128291a17321Smrg	-triton*)
128391a17321Smrg		os=-sysv3
128491a17321Smrg		;;
128591a17321Smrg	-oss*)
128691a17321Smrg		os=-sysv3
128791a17321Smrg		;;
128891a17321Smrg	-svr4)
128991a17321Smrg		os=-sysv4
129091a17321Smrg		;;
129191a17321Smrg	-svr3)
129291a17321Smrg		os=-sysv3
129391a17321Smrg		;;
129491a17321Smrg	-sysvr4)
129591a17321Smrg		os=-sysv4
129691a17321Smrg		;;
129791a17321Smrg	# This must come after -sysvr4.
129891a17321Smrg	-sysv*)
129991a17321Smrg		;;
130091a17321Smrg	-ose*)
130191a17321Smrg		os=-ose
130291a17321Smrg		;;
130391a17321Smrg	-es1800*)
130491a17321Smrg		os=-ose
130591a17321Smrg		;;
130691a17321Smrg	-xenix)
130791a17321Smrg		os=-xenix
130891a17321Smrg		;;
130991a17321Smrg	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
131091a17321Smrg		os=-mint
131191a17321Smrg		;;
131291a17321Smrg	-aros*)
131391a17321Smrg		os=-aros
131491a17321Smrg		;;
131591a17321Smrg	-kaos*)
131691a17321Smrg		os=-kaos
131791a17321Smrg		;;
131891a17321Smrg	-zvmoe)
131991a17321Smrg		os=-zvmoe
132091a17321Smrg		;;
132191a17321Smrg	-none)
132291a17321Smrg		;;
132391a17321Smrg	*)
132491a17321Smrg		# Get rid of the `-' at the beginning of $os.
132591a17321Smrg		os=`echo $os | sed 's/[^-]*-//'`
132691a17321Smrg		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
132791a17321Smrg		exit 1
132891a17321Smrg		;;
132991a17321Smrgesac
133091a17321Smrgelse
133191a17321Smrg
133291a17321Smrg# Here we handle the default operating systems that come with various machines.
133391a17321Smrg# The value should be what the vendor currently ships out the door with their
133491a17321Smrg# machine or put another way, the most popular os provided with the machine.
133591a17321Smrg
133691a17321Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say,
133791a17321Smrg# "-sun"), then you have to tell the case statement up towards the top
133891a17321Smrg# that MANUFACTURER isn't an operating system.  Otherwise, code above
133991a17321Smrg# will signal an error saying that MANUFACTURER isn't an operating
134091a17321Smrg# system, and we'll never get to this point.
134191a17321Smrg
134291a17321Smrgcase $basic_machine in
134391a17321Smrg	*-acorn)
134491a17321Smrg		os=-riscix1.2
134591a17321Smrg		;;
134691a17321Smrg	arm*-rebel)
134791a17321Smrg		os=-linux
134891a17321Smrg		;;
134991a17321Smrg	arm*-semi)
135091a17321Smrg		os=-aout
135191a17321Smrg		;;
135291a17321Smrg    c4x-* | tic4x-*)
135391a17321Smrg        os=-coff
135491a17321Smrg        ;;
135591a17321Smrg	# This must come before the *-dec entry.
135691a17321Smrg	pdp10-*)
135791a17321Smrg		os=-tops20
135891a17321Smrg		;;
135991a17321Smrg	pdp11-*)
136091a17321Smrg		os=-none
136191a17321Smrg		;;
136291a17321Smrg	*-dec | vax-*)
136391a17321Smrg		os=-ultrix4.2
136491a17321Smrg		;;
136591a17321Smrg	m68*-apollo)
136691a17321Smrg		os=-domain
136791a17321Smrg		;;
136891a17321Smrg	i386-sun)
136991a17321Smrg		os=-sunos4.0.2
137091a17321Smrg		;;
137191a17321Smrg	m68000-sun)
137291a17321Smrg		os=-sunos3
137391a17321Smrg		# This also exists in the configure program, but was not the
137491a17321Smrg		# default.
137591a17321Smrg		# os=-sunos4
137691a17321Smrg		;;
137791a17321Smrg	m68*-cisco)
137891a17321Smrg		os=-aout
137991a17321Smrg		;;
138091a17321Smrg	mips*-cisco)
138191a17321Smrg		os=-elf
138291a17321Smrg		;;
138391a17321Smrg	mips*-*)
138491a17321Smrg		os=-elf
138591a17321Smrg		;;
138691a17321Smrg	or32-*)
138791a17321Smrg		os=-coff
138891a17321Smrg		;;
138991a17321Smrg	*-tti)	# must be before sparc entry or we get the wrong os.
139091a17321Smrg		os=-sysv3
139191a17321Smrg		;;
139291a17321Smrg	sparc-* | *-sun)
139391a17321Smrg		os=-sunos4.1.1
139491a17321Smrg		;;
139591a17321Smrg	*-be)
139691a17321Smrg		os=-beos
139791a17321Smrg		;;
139891a17321Smrg	*-haiku)
139991a17321Smrg		os=-haiku
140091a17321Smrg		;;
140191a17321Smrg	*-ibm)
140291a17321Smrg		os=-aix
140391a17321Smrg		;;
140491a17321Smrg    	*-knuth)
140591a17321Smrg		os=-mmixware
140691a17321Smrg		;;
140791a17321Smrg	*-wec)
140891a17321Smrg		os=-proelf
140991a17321Smrg		;;
141091a17321Smrg	*-winbond)
141191a17321Smrg		os=-proelf
141291a17321Smrg		;;
141391a17321Smrg	*-oki)
141491a17321Smrg		os=-proelf
141591a17321Smrg		;;
141691a17321Smrg	*-hp)
141791a17321Smrg		os=-hpux
141891a17321Smrg		;;
141991a17321Smrg	*-hitachi)
142091a17321Smrg		os=-hiux
142191a17321Smrg		;;
142291a17321Smrg	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
142391a17321Smrg		os=-sysv
142491a17321Smrg		;;
142591a17321Smrg	*-cbm)
142691a17321Smrg		os=-amigaos
142791a17321Smrg		;;
142891a17321Smrg	*-dg)
142991a17321Smrg		os=-dgux
143091a17321Smrg		;;
143191a17321Smrg	*-dolphin)
143291a17321Smrg		os=-sysv3
143391a17321Smrg		;;
143491a17321Smrg	m68k-ccur)
143591a17321Smrg		os=-rtu
143691a17321Smrg		;;
143791a17321Smrg	m88k-omron*)
143891a17321Smrg		os=-luna
143991a17321Smrg		;;
144091a17321Smrg	*-next )
144191a17321Smrg		os=-nextstep
144291a17321Smrg		;;
144391a17321Smrg	*-sequent)
144491a17321Smrg		os=-ptx
144591a17321Smrg		;;
144691a17321Smrg	*-crds)
144791a17321Smrg		os=-unos
144891a17321Smrg		;;
144991a17321Smrg	*-ns)
145091a17321Smrg		os=-genix
145191a17321Smrg		;;
145291a17321Smrg	i370-*)
145391a17321Smrg		os=-mvs
145491a17321Smrg		;;
145591a17321Smrg	*-next)
145691a17321Smrg		os=-nextstep3
145791a17321Smrg		;;
145891a17321Smrg	*-gould)
145991a17321Smrg		os=-sysv
146091a17321Smrg		;;
146191a17321Smrg	*-highlevel)
146291a17321Smrg		os=-bsd
146391a17321Smrg		;;
146491a17321Smrg	*-encore)
146591a17321Smrg		os=-bsd
146691a17321Smrg		;;
146791a17321Smrg	*-sgi)
146891a17321Smrg		os=-irix
146991a17321Smrg		;;
147091a17321Smrg	*-siemens)
147191a17321Smrg		os=-sysv4
147291a17321Smrg		;;
147391a17321Smrg	*-masscomp)
147491a17321Smrg		os=-rtu
147591a17321Smrg		;;
147691a17321Smrg	f30[01]-fujitsu | f700-fujitsu)
147791a17321Smrg		os=-uxpv
147891a17321Smrg		;;
147991a17321Smrg	*-rom68k)
148091a17321Smrg		os=-coff
148191a17321Smrg		;;
148291a17321Smrg	*-*bug)
148391a17321Smrg		os=-coff
148491a17321Smrg		;;
148591a17321Smrg	*-apple)
148691a17321Smrg		os=-macos
148791a17321Smrg		;;
148891a17321Smrg	*-atari*)
148991a17321Smrg		os=-mint
149091a17321Smrg		;;
149191a17321Smrg	*)
149291a17321Smrg		os=-none
149391a17321Smrg		;;
149491a17321Smrgesac
149591a17321Smrgfi
149691a17321Smrg
149791a17321Smrg# Here we handle the case where we know the os, and the CPU type, but not the
149891a17321Smrg# manufacturer.  We pick the logical manufacturer.
149991a17321Smrgvendor=unknown
150091a17321Smrgcase $basic_machine in
150191a17321Smrg	*-unknown)
150291a17321Smrg		case $os in
150391a17321Smrg			-riscix*)
150491a17321Smrg				vendor=acorn
150591a17321Smrg				;;
150691a17321Smrg			-sunos*)
150791a17321Smrg				vendor=sun
150891a17321Smrg				;;
150991a17321Smrg			-aix*)
151091a17321Smrg				vendor=ibm
151191a17321Smrg				;;
151291a17321Smrg			-beos*)
151391a17321Smrg				vendor=be
151491a17321Smrg				;;
151591a17321Smrg			-hpux*)
151691a17321Smrg				vendor=hp
151791a17321Smrg				;;
151891a17321Smrg			-mpeix*)
151991a17321Smrg				vendor=hp
152091a17321Smrg				;;
152191a17321Smrg			-hiux*)
152291a17321Smrg				vendor=hitachi
152391a17321Smrg				;;
152491a17321Smrg			-unos*)
152591a17321Smrg				vendor=crds
152691a17321Smrg				;;
152791a17321Smrg			-dgux*)
152891a17321Smrg				vendor=dg
152991a17321Smrg				;;
153091a17321Smrg			-luna*)
153191a17321Smrg				vendor=omron
153291a17321Smrg				;;
153391a17321Smrg			-genix*)
153491a17321Smrg				vendor=ns
153591a17321Smrg				;;
153691a17321Smrg			-mvs* | -opened*)
153791a17321Smrg				vendor=ibm
153891a17321Smrg				;;
153991a17321Smrg			-os400*)
154091a17321Smrg				vendor=ibm
154191a17321Smrg				;;
154291a17321Smrg			-ptx*)
154391a17321Smrg				vendor=sequent
154491a17321Smrg				;;
154591a17321Smrg			-tpf*)
154691a17321Smrg				vendor=ibm
154791a17321Smrg				;;
154891a17321Smrg			-vxsim* | -vxworks* | -windiss*)
154991a17321Smrg				vendor=wrs
155091a17321Smrg				;;
155191a17321Smrg			-aux*)
155291a17321Smrg				vendor=apple
155391a17321Smrg				;;
155491a17321Smrg			-hms*)
155591a17321Smrg				vendor=hitachi
155691a17321Smrg				;;
155791a17321Smrg			-mpw* | -macos*)
155891a17321Smrg				vendor=apple
155991a17321Smrg				;;
156091a17321Smrg			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
156191a17321Smrg				vendor=atari
156291a17321Smrg				;;
156391a17321Smrg			-vos*)
156491a17321Smrg				vendor=stratus
156591a17321Smrg				;;
156691a17321Smrg		esac
156791a17321Smrg		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
156891a17321Smrg		;;
156991a17321Smrgesac
157091a17321Smrg
157191a17321Smrgecho $basic_machine$os
157291a17321Smrgexit
157391a17321Smrg
157491a17321Smrg# Local variables:
157591a17321Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
157691a17321Smrg# time-stamp-start: "timestamp='"
157791a17321Smrg# time-stamp-format: "%:y-%02m-%02d"
157891a17321Smrg# time-stamp-end: "'"
157991a17321Smrg# End:
1580