config.sub revision af23b0a6
1b3eb03f3Smrg#! /bin/sh
2b3eb03f3Smrg# Configuration validation subroutine script.
3b3eb03f3Smrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4af23b0a6Smrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5b3eb03f3Smrg#   Free Software Foundation, Inc.
6b3eb03f3Smrg
7af23b0a6Smrgtimestamp='2010-09-11'
8b3eb03f3Smrg
9b3eb03f3Smrg# This file is (in principle) common to ALL GNU software.
10b3eb03f3Smrg# The presence of a machine in this file suggests that SOME GNU software
11b3eb03f3Smrg# can handle that machine.  It does not imply ALL GNU software can.
12b3eb03f3Smrg#
13b3eb03f3Smrg# This file is free software; you can redistribute it and/or modify
14b3eb03f3Smrg# it under the terms of the GNU General Public License as published by
15b3eb03f3Smrg# the Free Software Foundation; either version 2 of the License, or
16b3eb03f3Smrg# (at your option) any later version.
17b3eb03f3Smrg#
18b3eb03f3Smrg# This program is distributed in the hope that it will be useful,
19b3eb03f3Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
20b3eb03f3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21b3eb03f3Smrg# GNU General Public License for more details.
22b3eb03f3Smrg#
23b3eb03f3Smrg# You should have received a copy of the GNU General Public License
24b3eb03f3Smrg# along with this program; if not, write to the Free Software
25b3eb03f3Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
26b3eb03f3Smrg# 02110-1301, USA.
27b3eb03f3Smrg#
28b3eb03f3Smrg# As a special exception to the GNU General Public License, if you
29b3eb03f3Smrg# distribute this file as part of a program that contains a
30b3eb03f3Smrg# configuration script generated by Autoconf, you may include it under
31b3eb03f3Smrg# the same distribution terms that you use for the rest of that program.
32b3eb03f3Smrg
33b3eb03f3Smrg
34b3eb03f3Smrg# Please send patches to <config-patches@gnu.org>.  Submit a context
35af23b0a6Smrg# diff and a properly formatted GNU ChangeLog entry.
36b3eb03f3Smrg#
37b3eb03f3Smrg# Configuration subroutine to validate and canonicalize a configuration type.
38b3eb03f3Smrg# Supply the specified configuration type as an argument.
39b3eb03f3Smrg# If it is invalid, we print an error message on stderr and exit with code 1.
40b3eb03f3Smrg# Otherwise, we print the canonical config type on stdout and succeed.
41b3eb03f3Smrg
42af23b0a6Smrg# You can get the latest version of this script from:
43af23b0a6Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
44af23b0a6Smrg
45b3eb03f3Smrg# This file is supposed to be the same for all GNU packages
46b3eb03f3Smrg# and recognize all the CPU types, system types and aliases
47b3eb03f3Smrg# that are meaningful with *any* GNU software.
48b3eb03f3Smrg# Each package is responsible for reporting which valid configurations
49b3eb03f3Smrg# it does not support.  The user should be able to distinguish
50b3eb03f3Smrg# a failure to support a valid configuration from a meaningless
51b3eb03f3Smrg# configuration.
52b3eb03f3Smrg
53b3eb03f3Smrg# The goal of this file is to map all the various variations of a given
54b3eb03f3Smrg# machine specification into a single specification in the form:
55b3eb03f3Smrg#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
56b3eb03f3Smrg# or in some cases, the newer four-part form:
57b3eb03f3Smrg#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
58b3eb03f3Smrg# It is wrong to echo any other type of specification.
59b3eb03f3Smrg
60b3eb03f3Smrgme=`echo "$0" | sed -e 's,.*/,,'`
61b3eb03f3Smrg
62b3eb03f3Smrgusage="\
63b3eb03f3SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS
64b3eb03f3Smrg       $0 [OPTION] ALIAS
65b3eb03f3Smrg
66b3eb03f3SmrgCanonicalize a configuration name.
67b3eb03f3Smrg
68b3eb03f3SmrgOperation modes:
69b3eb03f3Smrg  -h, --help         print this help, then exit
70b3eb03f3Smrg  -t, --time-stamp   print date of last modification, then exit
71b3eb03f3Smrg  -v, --version      print version number, then exit
72b3eb03f3Smrg
73b3eb03f3SmrgReport bugs and patches to <config-patches@gnu.org>."
74b3eb03f3Smrg
75b3eb03f3Smrgversion="\
76b3eb03f3SmrgGNU config.sub ($timestamp)
77b3eb03f3Smrg
78af23b0a6SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
79af23b0a6Smrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
80af23b0a6SmrgSoftware Foundation, Inc.
81b3eb03f3Smrg
82b3eb03f3SmrgThis is free software; see the source for copying conditions.  There is NO
83b3eb03f3Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
84b3eb03f3Smrg
85b3eb03f3Smrghelp="
86b3eb03f3SmrgTry \`$me --help' for more information."
87b3eb03f3Smrg
88b3eb03f3Smrg# Parse command line
89b3eb03f3Smrgwhile test $# -gt 0 ; do
90b3eb03f3Smrg  case $1 in
91b3eb03f3Smrg    --time-stamp | --time* | -t )
92b3eb03f3Smrg       echo "$timestamp" ; exit ;;
93b3eb03f3Smrg    --version | -v )
94b3eb03f3Smrg       echo "$version" ; exit ;;
95b3eb03f3Smrg    --help | --h* | -h )
96b3eb03f3Smrg       echo "$usage"; exit ;;
97b3eb03f3Smrg    -- )     # Stop option processing
98b3eb03f3Smrg       shift; break ;;
99b3eb03f3Smrg    - )	# Use stdin as input.
100b3eb03f3Smrg       break ;;
101b3eb03f3Smrg    -* )
102b3eb03f3Smrg       echo "$me: invalid option $1$help"
103b3eb03f3Smrg       exit 1 ;;
104b3eb03f3Smrg
105b3eb03f3Smrg    *local*)
106b3eb03f3Smrg       # First pass through any local machine types.
107b3eb03f3Smrg       echo $1
108b3eb03f3Smrg       exit ;;
109b3eb03f3Smrg
110b3eb03f3Smrg    * )
111b3eb03f3Smrg       break ;;
112b3eb03f3Smrg  esac
113b3eb03f3Smrgdone
114b3eb03f3Smrg
115b3eb03f3Smrgcase $# in
116b3eb03f3Smrg 0) echo "$me: missing argument$help" >&2
117b3eb03f3Smrg    exit 1;;
118b3eb03f3Smrg 1) ;;
119b3eb03f3Smrg *) echo "$me: too many arguments$help" >&2
120b3eb03f3Smrg    exit 1;;
121b3eb03f3Smrgesac
122b3eb03f3Smrg
123b3eb03f3Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
124b3eb03f3Smrg# Here we must recognize all the valid KERNEL-OS combinations.
125b3eb03f3Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
126b3eb03f3Smrgcase $maybe_os in
127af23b0a6Smrg  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
128af23b0a6Smrg  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
129af23b0a6Smrg  knetbsd*-gnu* | netbsd*-gnu* | \
130b3eb03f3Smrg  kopensolaris*-gnu* | \
131b3eb03f3Smrg  storm-chaos* | os2-emx* | rtmk-nova*)
132b3eb03f3Smrg    os=-$maybe_os
133b3eb03f3Smrg    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
134b3eb03f3Smrg    ;;
135b3eb03f3Smrg  *)
136b3eb03f3Smrg    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
137b3eb03f3Smrg    if [ $basic_machine != $1 ]
138b3eb03f3Smrg    then os=`echo $1 | sed 's/.*-/-/'`
139b3eb03f3Smrg    else os=; fi
140b3eb03f3Smrg    ;;
141b3eb03f3Smrgesac
142b3eb03f3Smrg
143b3eb03f3Smrg### Let's recognize common machines as not being operating systems so
144b3eb03f3Smrg### that things like config.sub decstation-3100 work.  We also
145b3eb03f3Smrg### recognize some manufacturers as not being operating systems, so we
146b3eb03f3Smrg### can provide default operating systems below.
147b3eb03f3Smrgcase $os in
148b3eb03f3Smrg	-sun*os*)
149b3eb03f3Smrg		# Prevent following clause from handling this invalid input.
150b3eb03f3Smrg		;;
151b3eb03f3Smrg	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
152b3eb03f3Smrg	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
153b3eb03f3Smrg	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
154b3eb03f3Smrg	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
155b3eb03f3Smrg	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
156b3eb03f3Smrg	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
157af23b0a6Smrg	-apple | -axis | -knuth | -cray | -microblaze)
158b3eb03f3Smrg		os=
159b3eb03f3Smrg		basic_machine=$1
160b3eb03f3Smrg		;;
161af23b0a6Smrg        -bluegene*)
162af23b0a6Smrg	        os=-cnk
163af23b0a6Smrg		;;
164b3eb03f3Smrg	-sim | -cisco | -oki | -wec | -winbond)
165b3eb03f3Smrg		os=
166b3eb03f3Smrg		basic_machine=$1
167b3eb03f3Smrg		;;
168b3eb03f3Smrg	-scout)
169b3eb03f3Smrg		;;
170b3eb03f3Smrg	-wrs)
171b3eb03f3Smrg		os=-vxworks
172b3eb03f3Smrg		basic_machine=$1
173b3eb03f3Smrg		;;
174b3eb03f3Smrg	-chorusos*)
175b3eb03f3Smrg		os=-chorusos
176b3eb03f3Smrg		basic_machine=$1
177b3eb03f3Smrg		;;
178b3eb03f3Smrg 	-chorusrdb)
179b3eb03f3Smrg 		os=-chorusrdb
180b3eb03f3Smrg		basic_machine=$1
181b3eb03f3Smrg 		;;
182b3eb03f3Smrg	-hiux*)
183b3eb03f3Smrg		os=-hiuxwe2
184b3eb03f3Smrg		;;
185b3eb03f3Smrg	-sco6)
186b3eb03f3Smrg		os=-sco5v6
187b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
188b3eb03f3Smrg		;;
189b3eb03f3Smrg	-sco5)
190b3eb03f3Smrg		os=-sco3.2v5
191b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
192b3eb03f3Smrg		;;
193b3eb03f3Smrg	-sco4)
194b3eb03f3Smrg		os=-sco3.2v4
195b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
196b3eb03f3Smrg		;;
197b3eb03f3Smrg	-sco3.2.[4-9]*)
198b3eb03f3Smrg		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
199b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
200b3eb03f3Smrg		;;
201b3eb03f3Smrg	-sco3.2v[4-9]*)
202b3eb03f3Smrg		# Don't forget version if it is 3.2v4 or newer.
203b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
204b3eb03f3Smrg		;;
205b3eb03f3Smrg	-sco5v6*)
206b3eb03f3Smrg		# Don't forget version if it is 3.2v4 or newer.
207b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
208b3eb03f3Smrg		;;
209b3eb03f3Smrg	-sco*)
210b3eb03f3Smrg		os=-sco3.2v2
211b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
212b3eb03f3Smrg		;;
213b3eb03f3Smrg	-udk*)
214b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
215b3eb03f3Smrg		;;
216b3eb03f3Smrg	-isc)
217b3eb03f3Smrg		os=-isc2.2
218b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
219b3eb03f3Smrg		;;
220b3eb03f3Smrg	-clix*)
221b3eb03f3Smrg		basic_machine=clipper-intergraph
222b3eb03f3Smrg		;;
223b3eb03f3Smrg	-isc*)
224b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
225b3eb03f3Smrg		;;
226b3eb03f3Smrg	-lynx*)
227b3eb03f3Smrg		os=-lynxos
228b3eb03f3Smrg		;;
229b3eb03f3Smrg	-ptx*)
230b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
231b3eb03f3Smrg		;;
232b3eb03f3Smrg	-windowsnt*)
233b3eb03f3Smrg		os=`echo $os | sed -e 's/windowsnt/winnt/'`
234b3eb03f3Smrg		;;
235b3eb03f3Smrg	-psos*)
236b3eb03f3Smrg		os=-psos
237b3eb03f3Smrg		;;
238b3eb03f3Smrg	-mint | -mint[0-9]*)
239b3eb03f3Smrg		basic_machine=m68k-atari
240b3eb03f3Smrg		os=-mint
241b3eb03f3Smrg		;;
242b3eb03f3Smrgesac
243b3eb03f3Smrg
244b3eb03f3Smrg# Decode aliases for certain CPU-COMPANY combinations.
245b3eb03f3Smrgcase $basic_machine in
246b3eb03f3Smrg	# Recognize the basic CPU types without company name.
247b3eb03f3Smrg	# Some are omitted here because they have special meanings below.
248b3eb03f3Smrg	1750a | 580 \
249b3eb03f3Smrg	| a29k \
250b3eb03f3Smrg	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
251b3eb03f3Smrg	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
252b3eb03f3Smrg	| am33_2.0 \
253b3eb03f3Smrg	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
254b3eb03f3Smrg	| bfin \
255b3eb03f3Smrg	| c4x | clipper \
256b3eb03f3Smrg	| d10v | d30v | dlx | dsp16xx \
257b3eb03f3Smrg	| fido | fr30 | frv \
258b3eb03f3Smrg	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
259b3eb03f3Smrg	| i370 | i860 | i960 | ia64 \
260b3eb03f3Smrg	| ip2k | iq2000 \
261b3eb03f3Smrg	| lm32 \
262b3eb03f3Smrg	| m32c | m32r | m32rle | m68000 | m68k | m88k \
263b3eb03f3Smrg	| maxq | mb | microblaze | mcore | mep | metag \
264b3eb03f3Smrg	| mips | mipsbe | mipseb | mipsel | mipsle \
265b3eb03f3Smrg	| mips16 \
266b3eb03f3Smrg	| mips64 | mips64el \
267b3eb03f3Smrg	| mips64octeon | mips64octeonel \
268b3eb03f3Smrg	| mips64orion | mips64orionel \
269b3eb03f3Smrg	| mips64r5900 | mips64r5900el \
270b3eb03f3Smrg	| mips64vr | mips64vrel \
271b3eb03f3Smrg	| mips64vr4100 | mips64vr4100el \
272b3eb03f3Smrg	| mips64vr4300 | mips64vr4300el \
273b3eb03f3Smrg	| mips64vr5000 | mips64vr5000el \
274b3eb03f3Smrg	| mips64vr5900 | mips64vr5900el \
275b3eb03f3Smrg	| mipsisa32 | mipsisa32el \
276b3eb03f3Smrg	| mipsisa32r2 | mipsisa32r2el \
277b3eb03f3Smrg	| mipsisa64 | mipsisa64el \
278b3eb03f3Smrg	| mipsisa64r2 | mipsisa64r2el \
279b3eb03f3Smrg	| mipsisa64sb1 | mipsisa64sb1el \
280b3eb03f3Smrg	| mipsisa64sr71k | mipsisa64sr71kel \
281b3eb03f3Smrg	| mipstx39 | mipstx39el \
282b3eb03f3Smrg	| mn10200 | mn10300 \
283b3eb03f3Smrg	| moxie \
284b3eb03f3Smrg	| mt \
285b3eb03f3Smrg	| msp430 \
286af23b0a6Smrg	| nds32 | nds32le | nds32be \
287b3eb03f3Smrg	| nios | nios2 \
288b3eb03f3Smrg	| ns16k | ns32k \
289b3eb03f3Smrg	| or32 \
290b3eb03f3Smrg	| pdp10 | pdp11 | pj | pjl \
291b3eb03f3Smrg	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
292b3eb03f3Smrg	| pyramid \
293af23b0a6Smrg	| rx \
294b3eb03f3Smrg	| score \
295b3eb03f3Smrg	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
296b3eb03f3Smrg	| sh64 | sh64le \
297b3eb03f3Smrg	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
298b3eb03f3Smrg	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
299b3eb03f3Smrg	| spu | strongarm \
300af23b0a6Smrg	| tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
301af23b0a6Smrg	| ubicom32 \
302b3eb03f3Smrg	| v850 | v850e \
303b3eb03f3Smrg	| we32k \
304b3eb03f3Smrg	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
305b3eb03f3Smrg	| z8k | z80)
306b3eb03f3Smrg		basic_machine=$basic_machine-unknown
307b3eb03f3Smrg		;;
308af23b0a6Smrg	c54x)
309af23b0a6Smrg		basic_machine=tic54x-unknown
310af23b0a6Smrg		;;
311af23b0a6Smrg	c55x)
312af23b0a6Smrg		basic_machine=tic55x-unknown
313af23b0a6Smrg		;;
314af23b0a6Smrg	c6x)
315af23b0a6Smrg		basic_machine=tic6x-unknown
316af23b0a6Smrg		;;
317af23b0a6Smrg	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
318b3eb03f3Smrg		# Motorola 68HC11/12.
319b3eb03f3Smrg		basic_machine=$basic_machine-unknown
320b3eb03f3Smrg		os=-none
321b3eb03f3Smrg		;;
322b3eb03f3Smrg	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
323b3eb03f3Smrg		;;
324b3eb03f3Smrg	ms1)
325b3eb03f3Smrg		basic_machine=mt-unknown
326b3eb03f3Smrg		;;
327b3eb03f3Smrg
328b3eb03f3Smrg	# We use `pc' rather than `unknown'
329b3eb03f3Smrg	# because (1) that's what they normally are, and
330b3eb03f3Smrg	# (2) the word "unknown" tends to confuse beginning users.
331b3eb03f3Smrg	i*86 | x86_64)
332b3eb03f3Smrg	  basic_machine=$basic_machine-pc
333b3eb03f3Smrg	  ;;
334b3eb03f3Smrg	# Object if more than one company name word.
335b3eb03f3Smrg	*-*-*)
336b3eb03f3Smrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
337b3eb03f3Smrg		exit 1
338b3eb03f3Smrg		;;
339b3eb03f3Smrg	# Recognize the basic CPU types with company name.
340b3eb03f3Smrg	580-* \
341b3eb03f3Smrg	| a29k-* \
342b3eb03f3Smrg	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
343b3eb03f3Smrg	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
344b3eb03f3Smrg	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
345b3eb03f3Smrg	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
346b3eb03f3Smrg	| avr-* | avr32-* \
347b3eb03f3Smrg	| bfin-* | bs2000-* \
348af23b0a6Smrg	| c[123]* | c30-* | [cjt]90-* | c4x-* \
349b3eb03f3Smrg	| clipper-* | craynv-* | cydra-* \
350b3eb03f3Smrg	| d10v-* | d30v-* | dlx-* \
351b3eb03f3Smrg	| elxsi-* \
352b3eb03f3Smrg	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
353b3eb03f3Smrg	| h8300-* | h8500-* \
354b3eb03f3Smrg	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
355b3eb03f3Smrg	| i*86-* | i860-* | i960-* | ia64-* \
356b3eb03f3Smrg	| ip2k-* | iq2000-* \
357b3eb03f3Smrg	| lm32-* \
358b3eb03f3Smrg	| m32c-* | m32r-* | m32rle-* \
359b3eb03f3Smrg	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
360af23b0a6Smrg	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
361b3eb03f3Smrg	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
362b3eb03f3Smrg	| mips16-* \
363b3eb03f3Smrg	| mips64-* | mips64el-* \
364b3eb03f3Smrg	| mips64octeon-* | mips64octeonel-* \
365b3eb03f3Smrg	| mips64orion-* | mips64orionel-* \
366b3eb03f3Smrg	| mips64r5900-* | mips64r5900el-* \
367b3eb03f3Smrg	| mips64vr-* | mips64vrel-* \
368b3eb03f3Smrg	| mips64vr4100-* | mips64vr4100el-* \
369b3eb03f3Smrg	| mips64vr4300-* | mips64vr4300el-* \
370b3eb03f3Smrg	| mips64vr5000-* | mips64vr5000el-* \
371b3eb03f3Smrg	| mips64vr5900-* | mips64vr5900el-* \
372b3eb03f3Smrg	| mipsisa32-* | mipsisa32el-* \
373b3eb03f3Smrg	| mipsisa32r2-* | mipsisa32r2el-* \
374b3eb03f3Smrg	| mipsisa64-* | mipsisa64el-* \
375b3eb03f3Smrg	| mipsisa64r2-* | mipsisa64r2el-* \
376b3eb03f3Smrg	| mipsisa64sb1-* | mipsisa64sb1el-* \
377b3eb03f3Smrg	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
378b3eb03f3Smrg	| mipstx39-* | mipstx39el-* \
379b3eb03f3Smrg	| mmix-* \
380b3eb03f3Smrg	| mt-* \
381b3eb03f3Smrg	| msp430-* \
382af23b0a6Smrg	| nds32-* | nds32le-* | nds32be-* \
383b3eb03f3Smrg	| nios-* | nios2-* \
384b3eb03f3Smrg	| none-* | np1-* | ns16k-* | ns32k-* \
385b3eb03f3Smrg	| orion-* \
386b3eb03f3Smrg	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
387b3eb03f3Smrg	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
388b3eb03f3Smrg	| pyramid-* \
389af23b0a6Smrg	| romp-* | rs6000-* | rx-* \
390b3eb03f3Smrg	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
391b3eb03f3Smrg	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
392b3eb03f3Smrg	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
393b3eb03f3Smrg	| sparclite-* \
394b3eb03f3Smrg	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
395b3eb03f3Smrg	| tahoe-* | thumb-* \
396af23b0a6Smrg	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
397af23b0a6Smrg	| tile-* | tilegx-* \
398b3eb03f3Smrg	| tron-* \
399af23b0a6Smrg	| ubicom32-* \
400b3eb03f3Smrg	| v850-* | v850e-* | vax-* \
401b3eb03f3Smrg	| we32k-* \
402b3eb03f3Smrg	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
403b3eb03f3Smrg	| xstormy16-* | xtensa*-* \
404b3eb03f3Smrg	| ymp-* \
405b3eb03f3Smrg	| z8k-* | z80-*)
406b3eb03f3Smrg		;;
407b3eb03f3Smrg	# Recognize the basic CPU types without company name, with glob match.
408b3eb03f3Smrg	xtensa*)
409b3eb03f3Smrg		basic_machine=$basic_machine-unknown
410b3eb03f3Smrg		;;
411b3eb03f3Smrg	# Recognize the various machine names and aliases which stand
412b3eb03f3Smrg	# for a CPU type and a company and sometimes even an OS.
413b3eb03f3Smrg	386bsd)
414b3eb03f3Smrg		basic_machine=i386-unknown
415b3eb03f3Smrg		os=-bsd
416b3eb03f3Smrg		;;
417b3eb03f3Smrg	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
418b3eb03f3Smrg		basic_machine=m68000-att
419b3eb03f3Smrg		;;
420b3eb03f3Smrg	3b*)
421b3eb03f3Smrg		basic_machine=we32k-att
422b3eb03f3Smrg		;;
423b3eb03f3Smrg	a29khif)
424b3eb03f3Smrg		basic_machine=a29k-amd
425b3eb03f3Smrg		os=-udi
426b3eb03f3Smrg		;;
427b3eb03f3Smrg    	abacus)
428b3eb03f3Smrg		basic_machine=abacus-unknown
429b3eb03f3Smrg		;;
430b3eb03f3Smrg	adobe68k)
431b3eb03f3Smrg		basic_machine=m68010-adobe
432b3eb03f3Smrg		os=-scout
433b3eb03f3Smrg		;;
434b3eb03f3Smrg	alliant | fx80)
435b3eb03f3Smrg		basic_machine=fx80-alliant
436b3eb03f3Smrg		;;
437b3eb03f3Smrg	altos | altos3068)
438b3eb03f3Smrg		basic_machine=m68k-altos
439b3eb03f3Smrg		;;
440b3eb03f3Smrg	am29k)
441b3eb03f3Smrg		basic_machine=a29k-none
442b3eb03f3Smrg		os=-bsd
443b3eb03f3Smrg		;;
444b3eb03f3Smrg	amd64)
445b3eb03f3Smrg		basic_machine=x86_64-pc
446b3eb03f3Smrg		;;
447b3eb03f3Smrg	amd64-*)
448b3eb03f3Smrg		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
449b3eb03f3Smrg		;;
450b3eb03f3Smrg	amdahl)
451b3eb03f3Smrg		basic_machine=580-amdahl
452b3eb03f3Smrg		os=-sysv
453b3eb03f3Smrg		;;
454b3eb03f3Smrg	amiga | amiga-*)
455b3eb03f3Smrg		basic_machine=m68k-unknown
456b3eb03f3Smrg		;;
457b3eb03f3Smrg	amigaos | amigados)
458b3eb03f3Smrg		basic_machine=m68k-unknown
459b3eb03f3Smrg		os=-amigaos
460b3eb03f3Smrg		;;
461b3eb03f3Smrg	amigaunix | amix)
462b3eb03f3Smrg		basic_machine=m68k-unknown
463b3eb03f3Smrg		os=-sysv4
464b3eb03f3Smrg		;;
465b3eb03f3Smrg	apollo68)
466b3eb03f3Smrg		basic_machine=m68k-apollo
467b3eb03f3Smrg		os=-sysv
468b3eb03f3Smrg		;;
469b3eb03f3Smrg	apollo68bsd)
470b3eb03f3Smrg		basic_machine=m68k-apollo
471b3eb03f3Smrg		os=-bsd
472b3eb03f3Smrg		;;
473b3eb03f3Smrg	aros)
474b3eb03f3Smrg		basic_machine=i386-pc
475b3eb03f3Smrg		os=-aros
476b3eb03f3Smrg		;;
477b3eb03f3Smrg	aux)
478b3eb03f3Smrg		basic_machine=m68k-apple
479b3eb03f3Smrg		os=-aux
480b3eb03f3Smrg		;;
481b3eb03f3Smrg	balance)
482b3eb03f3Smrg		basic_machine=ns32k-sequent
483b3eb03f3Smrg		os=-dynix
484b3eb03f3Smrg		;;
485b3eb03f3Smrg	blackfin)
486b3eb03f3Smrg		basic_machine=bfin-unknown
487b3eb03f3Smrg		os=-linux
488b3eb03f3Smrg		;;
489b3eb03f3Smrg	blackfin-*)
490b3eb03f3Smrg		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
491b3eb03f3Smrg		os=-linux
492b3eb03f3Smrg		;;
493af23b0a6Smrg	bluegene*)
494af23b0a6Smrg		basic_machine=powerpc-ibm
495af23b0a6Smrg		os=-cnk
496af23b0a6Smrg		;;
497af23b0a6Smrg	c54x-*)
498af23b0a6Smrg		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
499af23b0a6Smrg		;;
500af23b0a6Smrg	c55x-*)
501af23b0a6Smrg		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
502af23b0a6Smrg		;;
503af23b0a6Smrg	c6x-*)
504af23b0a6Smrg		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
505af23b0a6Smrg		;;
506b3eb03f3Smrg	c90)
507b3eb03f3Smrg		basic_machine=c90-cray
508b3eb03f3Smrg		os=-unicos
509b3eb03f3Smrg		;;
510b3eb03f3Smrg        cegcc)
511b3eb03f3Smrg		basic_machine=arm-unknown
512b3eb03f3Smrg		os=-cegcc
513b3eb03f3Smrg		;;
514b3eb03f3Smrg	convex-c1)
515b3eb03f3Smrg		basic_machine=c1-convex
516b3eb03f3Smrg		os=-bsd
517b3eb03f3Smrg		;;
518b3eb03f3Smrg	convex-c2)
519b3eb03f3Smrg		basic_machine=c2-convex
520b3eb03f3Smrg		os=-bsd
521b3eb03f3Smrg		;;
522b3eb03f3Smrg	convex-c32)
523b3eb03f3Smrg		basic_machine=c32-convex
524b3eb03f3Smrg		os=-bsd
525b3eb03f3Smrg		;;
526b3eb03f3Smrg	convex-c34)
527b3eb03f3Smrg		basic_machine=c34-convex
528b3eb03f3Smrg		os=-bsd
529b3eb03f3Smrg		;;
530b3eb03f3Smrg	convex-c38)
531b3eb03f3Smrg		basic_machine=c38-convex
532b3eb03f3Smrg		os=-bsd
533b3eb03f3Smrg		;;
534b3eb03f3Smrg	cray | j90)
535b3eb03f3Smrg		basic_machine=j90-cray
536b3eb03f3Smrg		os=-unicos
537b3eb03f3Smrg		;;
538b3eb03f3Smrg	craynv)
539b3eb03f3Smrg		basic_machine=craynv-cray
540b3eb03f3Smrg		os=-unicosmp
541b3eb03f3Smrg		;;
542b3eb03f3Smrg	cr16)
543b3eb03f3Smrg		basic_machine=cr16-unknown
544b3eb03f3Smrg		os=-elf
545b3eb03f3Smrg		;;
546b3eb03f3Smrg	crds | unos)
547b3eb03f3Smrg		basic_machine=m68k-crds
548b3eb03f3Smrg		;;
549b3eb03f3Smrg	crisv32 | crisv32-* | etraxfs*)
550b3eb03f3Smrg		basic_machine=crisv32-axis
551b3eb03f3Smrg		;;
552b3eb03f3Smrg	cris | cris-* | etrax*)
553b3eb03f3Smrg		basic_machine=cris-axis
554b3eb03f3Smrg		;;
555b3eb03f3Smrg	crx)
556b3eb03f3Smrg		basic_machine=crx-unknown
557b3eb03f3Smrg		os=-elf
558b3eb03f3Smrg		;;
559b3eb03f3Smrg	da30 | da30-*)
560b3eb03f3Smrg		basic_machine=m68k-da30
561b3eb03f3Smrg		;;
562b3eb03f3Smrg	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
563b3eb03f3Smrg		basic_machine=mips-dec
564b3eb03f3Smrg		;;
565b3eb03f3Smrg	decsystem10* | dec10*)
566b3eb03f3Smrg		basic_machine=pdp10-dec
567b3eb03f3Smrg		os=-tops10
568b3eb03f3Smrg		;;
569b3eb03f3Smrg	decsystem20* | dec20*)
570b3eb03f3Smrg		basic_machine=pdp10-dec
571b3eb03f3Smrg		os=-tops20
572b3eb03f3Smrg		;;
573b3eb03f3Smrg	delta | 3300 | motorola-3300 | motorola-delta \
574b3eb03f3Smrg	      | 3300-motorola | delta-motorola)
575b3eb03f3Smrg		basic_machine=m68k-motorola
576b3eb03f3Smrg		;;
577b3eb03f3Smrg	delta88)
578b3eb03f3Smrg		basic_machine=m88k-motorola
579b3eb03f3Smrg		os=-sysv3
580b3eb03f3Smrg		;;
581b3eb03f3Smrg	dicos)
582b3eb03f3Smrg		basic_machine=i686-pc
583b3eb03f3Smrg		os=-dicos
584b3eb03f3Smrg		;;
585b3eb03f3Smrg	djgpp)
586b3eb03f3Smrg		basic_machine=i586-pc
587b3eb03f3Smrg		os=-msdosdjgpp
588b3eb03f3Smrg		;;
589b3eb03f3Smrg	dpx20 | dpx20-*)
590b3eb03f3Smrg		basic_machine=rs6000-bull
591b3eb03f3Smrg		os=-bosx
592b3eb03f3Smrg		;;
593b3eb03f3Smrg	dpx2* | dpx2*-bull)
594b3eb03f3Smrg		basic_machine=m68k-bull
595b3eb03f3Smrg		os=-sysv3
596b3eb03f3Smrg		;;
597b3eb03f3Smrg	ebmon29k)
598b3eb03f3Smrg		basic_machine=a29k-amd
599b3eb03f3Smrg		os=-ebmon
600b3eb03f3Smrg		;;
601b3eb03f3Smrg	elxsi)
602b3eb03f3Smrg		basic_machine=elxsi-elxsi
603b3eb03f3Smrg		os=-bsd
604b3eb03f3Smrg		;;
605b3eb03f3Smrg	encore | umax | mmax)
606b3eb03f3Smrg		basic_machine=ns32k-encore
607b3eb03f3Smrg		;;
608b3eb03f3Smrg	es1800 | OSE68k | ose68k | ose | OSE)
609b3eb03f3Smrg		basic_machine=m68k-ericsson
610b3eb03f3Smrg		os=-ose
611b3eb03f3Smrg		;;
612b3eb03f3Smrg	fx2800)
613b3eb03f3Smrg		basic_machine=i860-alliant
614b3eb03f3Smrg		;;
615b3eb03f3Smrg	genix)
616b3eb03f3Smrg		basic_machine=ns32k-ns
617b3eb03f3Smrg		;;
618b3eb03f3Smrg	gmicro)
619b3eb03f3Smrg		basic_machine=tron-gmicro
620b3eb03f3Smrg		os=-sysv
621b3eb03f3Smrg		;;
622b3eb03f3Smrg	go32)
623b3eb03f3Smrg		basic_machine=i386-pc
624b3eb03f3Smrg		os=-go32
625b3eb03f3Smrg		;;
626b3eb03f3Smrg	h3050r* | hiux*)
627b3eb03f3Smrg		basic_machine=hppa1.1-hitachi
628b3eb03f3Smrg		os=-hiuxwe2
629b3eb03f3Smrg		;;
630b3eb03f3Smrg	h8300hms)
631b3eb03f3Smrg		basic_machine=h8300-hitachi
632b3eb03f3Smrg		os=-hms
633b3eb03f3Smrg		;;
634b3eb03f3Smrg	h8300xray)
635b3eb03f3Smrg		basic_machine=h8300-hitachi
636b3eb03f3Smrg		os=-xray
637b3eb03f3Smrg		;;
638b3eb03f3Smrg	h8500hms)
639b3eb03f3Smrg		basic_machine=h8500-hitachi
640b3eb03f3Smrg		os=-hms
641b3eb03f3Smrg		;;
642b3eb03f3Smrg	harris)
643b3eb03f3Smrg		basic_machine=m88k-harris
644b3eb03f3Smrg		os=-sysv3
645b3eb03f3Smrg		;;
646b3eb03f3Smrg	hp300-*)
647b3eb03f3Smrg		basic_machine=m68k-hp
648b3eb03f3Smrg		;;
649b3eb03f3Smrg	hp300bsd)
650b3eb03f3Smrg		basic_machine=m68k-hp
651b3eb03f3Smrg		os=-bsd
652b3eb03f3Smrg		;;
653b3eb03f3Smrg	hp300hpux)
654b3eb03f3Smrg		basic_machine=m68k-hp
655b3eb03f3Smrg		os=-hpux
656b3eb03f3Smrg		;;
657b3eb03f3Smrg	hp3k9[0-9][0-9] | hp9[0-9][0-9])
658b3eb03f3Smrg		basic_machine=hppa1.0-hp
659b3eb03f3Smrg		;;
660b3eb03f3Smrg	hp9k2[0-9][0-9] | hp9k31[0-9])
661b3eb03f3Smrg		basic_machine=m68000-hp
662b3eb03f3Smrg		;;
663b3eb03f3Smrg	hp9k3[2-9][0-9])
664b3eb03f3Smrg		basic_machine=m68k-hp
665b3eb03f3Smrg		;;
666b3eb03f3Smrg	hp9k6[0-9][0-9] | hp6[0-9][0-9])
667b3eb03f3Smrg		basic_machine=hppa1.0-hp
668b3eb03f3Smrg		;;
669b3eb03f3Smrg	hp9k7[0-79][0-9] | hp7[0-79][0-9])
670b3eb03f3Smrg		basic_machine=hppa1.1-hp
671b3eb03f3Smrg		;;
672b3eb03f3Smrg	hp9k78[0-9] | hp78[0-9])
673b3eb03f3Smrg		# FIXME: really hppa2.0-hp
674b3eb03f3Smrg		basic_machine=hppa1.1-hp
675b3eb03f3Smrg		;;
676b3eb03f3Smrg	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
677b3eb03f3Smrg		# FIXME: really hppa2.0-hp
678b3eb03f3Smrg		basic_machine=hppa1.1-hp
679b3eb03f3Smrg		;;
680b3eb03f3Smrg	hp9k8[0-9][13679] | hp8[0-9][13679])
681b3eb03f3Smrg		basic_machine=hppa1.1-hp
682b3eb03f3Smrg		;;
683b3eb03f3Smrg	hp9k8[0-9][0-9] | hp8[0-9][0-9])
684b3eb03f3Smrg		basic_machine=hppa1.0-hp
685b3eb03f3Smrg		;;
686b3eb03f3Smrg	hppa-next)
687b3eb03f3Smrg		os=-nextstep3
688b3eb03f3Smrg		;;
689b3eb03f3Smrg	hppaosf)
690b3eb03f3Smrg		basic_machine=hppa1.1-hp
691b3eb03f3Smrg		os=-osf
692b3eb03f3Smrg		;;
693b3eb03f3Smrg	hppro)
694b3eb03f3Smrg		basic_machine=hppa1.1-hp
695b3eb03f3Smrg		os=-proelf
696b3eb03f3Smrg		;;
697b3eb03f3Smrg	i370-ibm* | ibm*)
698b3eb03f3Smrg		basic_machine=i370-ibm
699b3eb03f3Smrg		;;
700b3eb03f3Smrg# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
701b3eb03f3Smrg	i*86v32)
702b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
703b3eb03f3Smrg		os=-sysv32
704b3eb03f3Smrg		;;
705b3eb03f3Smrg	i*86v4*)
706b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
707b3eb03f3Smrg		os=-sysv4
708b3eb03f3Smrg		;;
709b3eb03f3Smrg	i*86v)
710b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
711b3eb03f3Smrg		os=-sysv
712b3eb03f3Smrg		;;
713b3eb03f3Smrg	i*86sol2)
714b3eb03f3Smrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
715b3eb03f3Smrg		os=-solaris2
716b3eb03f3Smrg		;;
717b3eb03f3Smrg	i386mach)
718b3eb03f3Smrg		basic_machine=i386-mach
719b3eb03f3Smrg		os=-mach
720b3eb03f3Smrg		;;
721b3eb03f3Smrg	i386-vsta | vsta)
722b3eb03f3Smrg		basic_machine=i386-unknown
723b3eb03f3Smrg		os=-vsta
724b3eb03f3Smrg		;;
725b3eb03f3Smrg	iris | iris4d)
726b3eb03f3Smrg		basic_machine=mips-sgi
727b3eb03f3Smrg		case $os in
728b3eb03f3Smrg		    -irix*)
729b3eb03f3Smrg			;;
730b3eb03f3Smrg		    *)
731b3eb03f3Smrg			os=-irix4
732b3eb03f3Smrg			;;
733b3eb03f3Smrg		esac
734b3eb03f3Smrg		;;
735b3eb03f3Smrg	isi68 | isi)
736b3eb03f3Smrg		basic_machine=m68k-isi
737b3eb03f3Smrg		os=-sysv
738b3eb03f3Smrg		;;
739b3eb03f3Smrg	m68knommu)
740b3eb03f3Smrg		basic_machine=m68k-unknown
741b3eb03f3Smrg		os=-linux
742b3eb03f3Smrg		;;
743b3eb03f3Smrg	m68knommu-*)
744b3eb03f3Smrg		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
745b3eb03f3Smrg		os=-linux
746b3eb03f3Smrg		;;
747b3eb03f3Smrg	m88k-omron*)
748b3eb03f3Smrg		basic_machine=m88k-omron
749b3eb03f3Smrg		;;
750b3eb03f3Smrg	magnum | m3230)
751b3eb03f3Smrg		basic_machine=mips-mips
752b3eb03f3Smrg		os=-sysv
753b3eb03f3Smrg		;;
754b3eb03f3Smrg	merlin)
755b3eb03f3Smrg		basic_machine=ns32k-utek
756b3eb03f3Smrg		os=-sysv
757b3eb03f3Smrg		;;
758af23b0a6Smrg        microblaze)
759af23b0a6Smrg		basic_machine=microblaze-xilinx
760af23b0a6Smrg		;;
761b3eb03f3Smrg	mingw32)
762b3eb03f3Smrg		basic_machine=i386-pc
763b3eb03f3Smrg		os=-mingw32
764b3eb03f3Smrg		;;
765b3eb03f3Smrg	mingw32ce)
766b3eb03f3Smrg		basic_machine=arm-unknown
767b3eb03f3Smrg		os=-mingw32ce
768b3eb03f3Smrg		;;
769b3eb03f3Smrg	miniframe)
770b3eb03f3Smrg		basic_machine=m68000-convergent
771b3eb03f3Smrg		;;
772b3eb03f3Smrg	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
773b3eb03f3Smrg		basic_machine=m68k-atari
774b3eb03f3Smrg		os=-mint
775b3eb03f3Smrg		;;
776b3eb03f3Smrg	mips3*-*)
777b3eb03f3Smrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
778b3eb03f3Smrg		;;
779b3eb03f3Smrg	mips3*)
780b3eb03f3Smrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
781b3eb03f3Smrg		;;
782b3eb03f3Smrg	monitor)
783b3eb03f3Smrg		basic_machine=m68k-rom68k
784b3eb03f3Smrg		os=-coff
785b3eb03f3Smrg		;;
786b3eb03f3Smrg	morphos)
787b3eb03f3Smrg		basic_machine=powerpc-unknown
788b3eb03f3Smrg		os=-morphos
789b3eb03f3Smrg		;;
790b3eb03f3Smrg	msdos)
791b3eb03f3Smrg		basic_machine=i386-pc
792b3eb03f3Smrg		os=-msdos
793b3eb03f3Smrg		;;
794b3eb03f3Smrg	ms1-*)
795b3eb03f3Smrg		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
796b3eb03f3Smrg		;;
797b3eb03f3Smrg	mvs)
798b3eb03f3Smrg		basic_machine=i370-ibm
799b3eb03f3Smrg		os=-mvs
800b3eb03f3Smrg		;;
801b3eb03f3Smrg	ncr3000)
802b3eb03f3Smrg		basic_machine=i486-ncr
803b3eb03f3Smrg		os=-sysv4
804b3eb03f3Smrg		;;
805b3eb03f3Smrg	netbsd386)
806b3eb03f3Smrg		basic_machine=i386-unknown
807b3eb03f3Smrg		os=-netbsd
808b3eb03f3Smrg		;;
809b3eb03f3Smrg	netwinder)
810b3eb03f3Smrg		basic_machine=armv4l-rebel
811b3eb03f3Smrg		os=-linux
812b3eb03f3Smrg		;;
813b3eb03f3Smrg	news | news700 | news800 | news900)
814b3eb03f3Smrg		basic_machine=m68k-sony
815b3eb03f3Smrg		os=-newsos
816b3eb03f3Smrg		;;
817b3eb03f3Smrg	news1000)
818b3eb03f3Smrg		basic_machine=m68030-sony
819b3eb03f3Smrg		os=-newsos
820b3eb03f3Smrg		;;
821b3eb03f3Smrg	news-3600 | risc-news)
822b3eb03f3Smrg		basic_machine=mips-sony
823b3eb03f3Smrg		os=-newsos
824b3eb03f3Smrg		;;
825b3eb03f3Smrg	necv70)
826b3eb03f3Smrg		basic_machine=v70-nec
827b3eb03f3Smrg		os=-sysv
828b3eb03f3Smrg		;;
829b3eb03f3Smrg	next | m*-next )
830b3eb03f3Smrg		basic_machine=m68k-next
831b3eb03f3Smrg		case $os in
832b3eb03f3Smrg		    -nextstep* )
833b3eb03f3Smrg			;;
834b3eb03f3Smrg		    -ns2*)
835b3eb03f3Smrg		      os=-nextstep2
836b3eb03f3Smrg			;;
837b3eb03f3Smrg		    *)
838b3eb03f3Smrg		      os=-nextstep3
839b3eb03f3Smrg			;;
840b3eb03f3Smrg		esac
841b3eb03f3Smrg		;;
842b3eb03f3Smrg	nh3000)
843b3eb03f3Smrg		basic_machine=m68k-harris
844b3eb03f3Smrg		os=-cxux
845b3eb03f3Smrg		;;
846b3eb03f3Smrg	nh[45]000)
847b3eb03f3Smrg		basic_machine=m88k-harris
848b3eb03f3Smrg		os=-cxux
849b3eb03f3Smrg		;;
850b3eb03f3Smrg	nindy960)
851b3eb03f3Smrg		basic_machine=i960-intel
852b3eb03f3Smrg		os=-nindy
853b3eb03f3Smrg		;;
854b3eb03f3Smrg	mon960)
855b3eb03f3Smrg		basic_machine=i960-intel
856b3eb03f3Smrg		os=-mon960
857b3eb03f3Smrg		;;
858b3eb03f3Smrg	nonstopux)
859b3eb03f3Smrg		basic_machine=mips-compaq
860b3eb03f3Smrg		os=-nonstopux
861b3eb03f3Smrg		;;
862b3eb03f3Smrg	np1)
863b3eb03f3Smrg		basic_machine=np1-gould
864b3eb03f3Smrg		;;
865af23b0a6Smrg        neo-tandem)
866af23b0a6Smrg		basic_machine=neo-tandem
867af23b0a6Smrg		;;
868af23b0a6Smrg        nse-tandem)
869af23b0a6Smrg		basic_machine=nse-tandem
870af23b0a6Smrg		;;
871b3eb03f3Smrg	nsr-tandem)
872b3eb03f3Smrg		basic_machine=nsr-tandem
873b3eb03f3Smrg		;;
874b3eb03f3Smrg	op50n-* | op60c-*)
875b3eb03f3Smrg		basic_machine=hppa1.1-oki
876b3eb03f3Smrg		os=-proelf
877b3eb03f3Smrg		;;
878b3eb03f3Smrg	openrisc | openrisc-*)
879b3eb03f3Smrg		basic_machine=or32-unknown
880b3eb03f3Smrg		;;
881b3eb03f3Smrg	os400)
882b3eb03f3Smrg		basic_machine=powerpc-ibm
883b3eb03f3Smrg		os=-os400
884b3eb03f3Smrg		;;
885b3eb03f3Smrg	OSE68000 | ose68000)
886b3eb03f3Smrg		basic_machine=m68000-ericsson
887b3eb03f3Smrg		os=-ose
888b3eb03f3Smrg		;;
889b3eb03f3Smrg	os68k)
890b3eb03f3Smrg		basic_machine=m68k-none
891b3eb03f3Smrg		os=-os68k
892b3eb03f3Smrg		;;
893b3eb03f3Smrg	pa-hitachi)
894b3eb03f3Smrg		basic_machine=hppa1.1-hitachi
895b3eb03f3Smrg		os=-hiuxwe2
896b3eb03f3Smrg		;;
897b3eb03f3Smrg	paragon)
898b3eb03f3Smrg		basic_machine=i860-intel
899b3eb03f3Smrg		os=-osf
900b3eb03f3Smrg		;;
901b3eb03f3Smrg	parisc)
902b3eb03f3Smrg		basic_machine=hppa-unknown
903b3eb03f3Smrg		os=-linux
904b3eb03f3Smrg		;;
905b3eb03f3Smrg	parisc-*)
906b3eb03f3Smrg		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
907b3eb03f3Smrg		os=-linux
908b3eb03f3Smrg		;;
909b3eb03f3Smrg	pbd)
910b3eb03f3Smrg		basic_machine=sparc-tti
911b3eb03f3Smrg		;;
912b3eb03f3Smrg	pbb)
913b3eb03f3Smrg		basic_machine=m68k-tti
914b3eb03f3Smrg		;;
915b3eb03f3Smrg	pc532 | pc532-*)
916b3eb03f3Smrg		basic_machine=ns32k-pc532
917b3eb03f3Smrg		;;
918b3eb03f3Smrg	pc98)
919b3eb03f3Smrg		basic_machine=i386-pc
920b3eb03f3Smrg		;;
921b3eb03f3Smrg	pc98-*)
922b3eb03f3Smrg		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
923b3eb03f3Smrg		;;
924b3eb03f3Smrg	pentium | p5 | k5 | k6 | nexgen | viac3)
925b3eb03f3Smrg		basic_machine=i586-pc
926b3eb03f3Smrg		;;
927b3eb03f3Smrg	pentiumpro | p6 | 6x86 | athlon | athlon_*)
928b3eb03f3Smrg		basic_machine=i686-pc
929b3eb03f3Smrg		;;
930b3eb03f3Smrg	pentiumii | pentium2 | pentiumiii | pentium3)
931b3eb03f3Smrg		basic_machine=i686-pc
932b3eb03f3Smrg		;;
933b3eb03f3Smrg	pentium4)
934b3eb03f3Smrg		basic_machine=i786-pc
935b3eb03f3Smrg		;;
936b3eb03f3Smrg	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
937b3eb03f3Smrg		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
938b3eb03f3Smrg		;;
939b3eb03f3Smrg	pentiumpro-* | p6-* | 6x86-* | athlon-*)
940b3eb03f3Smrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
941b3eb03f3Smrg		;;
942b3eb03f3Smrg	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
943b3eb03f3Smrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
944b3eb03f3Smrg		;;
945b3eb03f3Smrg	pentium4-*)
946b3eb03f3Smrg		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
947b3eb03f3Smrg		;;
948b3eb03f3Smrg	pn)
949b3eb03f3Smrg		basic_machine=pn-gould
950b3eb03f3Smrg		;;
951b3eb03f3Smrg	power)	basic_machine=power-ibm
952b3eb03f3Smrg		;;
953b3eb03f3Smrg	ppc)	basic_machine=powerpc-unknown
954b3eb03f3Smrg		;;
955b3eb03f3Smrg	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
956b3eb03f3Smrg		;;
957b3eb03f3Smrg	ppcle | powerpclittle | ppc-le | powerpc-little)
958b3eb03f3Smrg		basic_machine=powerpcle-unknown
959b3eb03f3Smrg		;;
960b3eb03f3Smrg	ppcle-* | powerpclittle-*)
961b3eb03f3Smrg		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
962b3eb03f3Smrg		;;
963b3eb03f3Smrg	ppc64)	basic_machine=powerpc64-unknown
964b3eb03f3Smrg		;;
965b3eb03f3Smrg	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
966b3eb03f3Smrg		;;
967b3eb03f3Smrg	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
968b3eb03f3Smrg		basic_machine=powerpc64le-unknown
969b3eb03f3Smrg		;;
970b3eb03f3Smrg	ppc64le-* | powerpc64little-*)
971b3eb03f3Smrg		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
972b3eb03f3Smrg		;;
973b3eb03f3Smrg	ps2)
974b3eb03f3Smrg		basic_machine=i386-ibm
975b3eb03f3Smrg		;;
976b3eb03f3Smrg	pw32)
977b3eb03f3Smrg		basic_machine=i586-unknown
978b3eb03f3Smrg		os=-pw32
979b3eb03f3Smrg		;;
980b3eb03f3Smrg	rdos)
981b3eb03f3Smrg		basic_machine=i386-pc
982b3eb03f3Smrg		os=-rdos
983b3eb03f3Smrg		;;
984b3eb03f3Smrg	rom68k)
985b3eb03f3Smrg		basic_machine=m68k-rom68k
986b3eb03f3Smrg		os=-coff
987b3eb03f3Smrg		;;
988b3eb03f3Smrg	rm[46]00)
989b3eb03f3Smrg		basic_machine=mips-siemens
990b3eb03f3Smrg		;;
991b3eb03f3Smrg	rtpc | rtpc-*)
992b3eb03f3Smrg		basic_machine=romp-ibm
993b3eb03f3Smrg		;;
994b3eb03f3Smrg	s390 | s390-*)
995b3eb03f3Smrg		basic_machine=s390-ibm
996b3eb03f3Smrg		;;
997b3eb03f3Smrg	s390x | s390x-*)
998b3eb03f3Smrg		basic_machine=s390x-ibm
999b3eb03f3Smrg		;;
1000b3eb03f3Smrg	sa29200)
1001b3eb03f3Smrg		basic_machine=a29k-amd
1002b3eb03f3Smrg		os=-udi
1003b3eb03f3Smrg		;;
1004b3eb03f3Smrg	sb1)
1005b3eb03f3Smrg		basic_machine=mipsisa64sb1-unknown
1006b3eb03f3Smrg		;;
1007b3eb03f3Smrg	sb1el)
1008b3eb03f3Smrg		basic_machine=mipsisa64sb1el-unknown
1009b3eb03f3Smrg		;;
1010b3eb03f3Smrg	sde)
1011b3eb03f3Smrg		basic_machine=mipsisa32-sde
1012b3eb03f3Smrg		os=-elf
1013b3eb03f3Smrg		;;
1014b3eb03f3Smrg	sei)
1015b3eb03f3Smrg		basic_machine=mips-sei
1016b3eb03f3Smrg		os=-seiux
1017b3eb03f3Smrg		;;
1018b3eb03f3Smrg	sequent)
1019b3eb03f3Smrg		basic_machine=i386-sequent
1020b3eb03f3Smrg		;;
1021b3eb03f3Smrg	sh)
1022b3eb03f3Smrg		basic_machine=sh-hitachi
1023b3eb03f3Smrg		os=-hms
1024b3eb03f3Smrg		;;
1025b3eb03f3Smrg	sh5el)
1026b3eb03f3Smrg		basic_machine=sh5le-unknown
1027b3eb03f3Smrg		;;
1028b3eb03f3Smrg	sh64)
1029b3eb03f3Smrg		basic_machine=sh64-unknown
1030b3eb03f3Smrg		;;
1031b3eb03f3Smrg	sparclite-wrs | simso-wrs)
1032b3eb03f3Smrg		basic_machine=sparclite-wrs
1033b3eb03f3Smrg		os=-vxworks
1034b3eb03f3Smrg		;;
1035b3eb03f3Smrg	sps7)
1036b3eb03f3Smrg		basic_machine=m68k-bull
1037b3eb03f3Smrg		os=-sysv2
1038b3eb03f3Smrg		;;
1039b3eb03f3Smrg	spur)
1040b3eb03f3Smrg		basic_machine=spur-unknown
1041b3eb03f3Smrg		;;
1042b3eb03f3Smrg	st2000)
1043b3eb03f3Smrg		basic_machine=m68k-tandem
1044b3eb03f3Smrg		;;
1045b3eb03f3Smrg	stratus)
1046b3eb03f3Smrg		basic_machine=i860-stratus
1047b3eb03f3Smrg		os=-sysv4
1048b3eb03f3Smrg		;;
1049b3eb03f3Smrg	sun2)
1050b3eb03f3Smrg		basic_machine=m68000-sun
1051b3eb03f3Smrg		;;
1052b3eb03f3Smrg	sun2os3)
1053b3eb03f3Smrg		basic_machine=m68000-sun
1054b3eb03f3Smrg		os=-sunos3
1055b3eb03f3Smrg		;;
1056b3eb03f3Smrg	sun2os4)
1057b3eb03f3Smrg		basic_machine=m68000-sun
1058b3eb03f3Smrg		os=-sunos4
1059b3eb03f3Smrg		;;
1060b3eb03f3Smrg	sun3os3)
1061b3eb03f3Smrg		basic_machine=m68k-sun
1062b3eb03f3Smrg		os=-sunos3
1063b3eb03f3Smrg		;;
1064b3eb03f3Smrg	sun3os4)
1065b3eb03f3Smrg		basic_machine=m68k-sun
1066b3eb03f3Smrg		os=-sunos4
1067b3eb03f3Smrg		;;
1068b3eb03f3Smrg	sun4os3)
1069b3eb03f3Smrg		basic_machine=sparc-sun
1070b3eb03f3Smrg		os=-sunos3
1071b3eb03f3Smrg		;;
1072b3eb03f3Smrg	sun4os4)
1073b3eb03f3Smrg		basic_machine=sparc-sun
1074b3eb03f3Smrg		os=-sunos4
1075b3eb03f3Smrg		;;
1076b3eb03f3Smrg	sun4sol2)
1077b3eb03f3Smrg		basic_machine=sparc-sun
1078b3eb03f3Smrg		os=-solaris2
1079b3eb03f3Smrg		;;
1080b3eb03f3Smrg	sun3 | sun3-*)
1081b3eb03f3Smrg		basic_machine=m68k-sun
1082b3eb03f3Smrg		;;
1083b3eb03f3Smrg	sun4)
1084b3eb03f3Smrg		basic_machine=sparc-sun
1085b3eb03f3Smrg		;;
1086b3eb03f3Smrg	sun386 | sun386i | roadrunner)
1087b3eb03f3Smrg		basic_machine=i386-sun
1088b3eb03f3Smrg		;;
1089b3eb03f3Smrg	sv1)
1090b3eb03f3Smrg		basic_machine=sv1-cray
1091b3eb03f3Smrg		os=-unicos
1092b3eb03f3Smrg		;;
1093b3eb03f3Smrg	symmetry)
1094b3eb03f3Smrg		basic_machine=i386-sequent
1095b3eb03f3Smrg		os=-dynix
1096b3eb03f3Smrg		;;
1097b3eb03f3Smrg	t3e)
1098b3eb03f3Smrg		basic_machine=alphaev5-cray
1099b3eb03f3Smrg		os=-unicos
1100b3eb03f3Smrg		;;
1101b3eb03f3Smrg	t90)
1102b3eb03f3Smrg		basic_machine=t90-cray
1103b3eb03f3Smrg		os=-unicos
1104b3eb03f3Smrg		;;
1105af23b0a6Smrg        # This must be matched before tile*.
1106af23b0a6Smrg        tilegx*)
1107af23b0a6Smrg		basic_machine=tilegx-unknown
1108af23b0a6Smrg		os=-linux-gnu
1109b3eb03f3Smrg		;;
1110b3eb03f3Smrg	tile*)
1111b3eb03f3Smrg		basic_machine=tile-unknown
1112b3eb03f3Smrg		os=-linux-gnu
1113b3eb03f3Smrg		;;
1114b3eb03f3Smrg	tx39)
1115b3eb03f3Smrg		basic_machine=mipstx39-unknown
1116b3eb03f3Smrg		;;
1117b3eb03f3Smrg	tx39el)
1118b3eb03f3Smrg		basic_machine=mipstx39el-unknown
1119b3eb03f3Smrg		;;
1120b3eb03f3Smrg	toad1)
1121b3eb03f3Smrg		basic_machine=pdp10-xkl
1122b3eb03f3Smrg		os=-tops20
1123b3eb03f3Smrg		;;
1124b3eb03f3Smrg	tower | tower-32)
1125b3eb03f3Smrg		basic_machine=m68k-ncr
1126b3eb03f3Smrg		;;
1127b3eb03f3Smrg	tpf)
1128b3eb03f3Smrg		basic_machine=s390x-ibm
1129b3eb03f3Smrg		os=-tpf
1130b3eb03f3Smrg		;;
1131b3eb03f3Smrg	udi29k)
1132b3eb03f3Smrg		basic_machine=a29k-amd
1133b3eb03f3Smrg		os=-udi
1134b3eb03f3Smrg		;;
1135b3eb03f3Smrg	ultra3)
1136b3eb03f3Smrg		basic_machine=a29k-nyu
1137b3eb03f3Smrg		os=-sym1
1138b3eb03f3Smrg		;;
1139b3eb03f3Smrg	v810 | necv810)
1140b3eb03f3Smrg		basic_machine=v810-nec
1141b3eb03f3Smrg		os=-none
1142b3eb03f3Smrg		;;
1143b3eb03f3Smrg	vaxv)
1144b3eb03f3Smrg		basic_machine=vax-dec
1145b3eb03f3Smrg		os=-sysv
1146b3eb03f3Smrg		;;
1147b3eb03f3Smrg	vms)
1148b3eb03f3Smrg		basic_machine=vax-dec
1149b3eb03f3Smrg		os=-vms
1150b3eb03f3Smrg		;;
1151b3eb03f3Smrg	vpp*|vx|vx-*)
1152b3eb03f3Smrg		basic_machine=f301-fujitsu
1153b3eb03f3Smrg		;;
1154b3eb03f3Smrg	vxworks960)
1155b3eb03f3Smrg		basic_machine=i960-wrs
1156b3eb03f3Smrg		os=-vxworks
1157b3eb03f3Smrg		;;
1158b3eb03f3Smrg	vxworks68)
1159b3eb03f3Smrg		basic_machine=m68k-wrs
1160b3eb03f3Smrg		os=-vxworks
1161b3eb03f3Smrg		;;
1162b3eb03f3Smrg	vxworks29k)
1163b3eb03f3Smrg		basic_machine=a29k-wrs
1164b3eb03f3Smrg		os=-vxworks
1165b3eb03f3Smrg		;;
1166b3eb03f3Smrg	w65*)
1167b3eb03f3Smrg		basic_machine=w65-wdc
1168b3eb03f3Smrg		os=-none
1169b3eb03f3Smrg		;;
1170b3eb03f3Smrg	w89k-*)
1171b3eb03f3Smrg		basic_machine=hppa1.1-winbond
1172b3eb03f3Smrg		os=-proelf
1173b3eb03f3Smrg		;;
1174b3eb03f3Smrg	xbox)
1175b3eb03f3Smrg		basic_machine=i686-pc
1176b3eb03f3Smrg		os=-mingw32
1177b3eb03f3Smrg		;;
1178b3eb03f3Smrg	xps | xps100)
1179b3eb03f3Smrg		basic_machine=xps100-honeywell
1180b3eb03f3Smrg		;;
1181b3eb03f3Smrg	ymp)
1182b3eb03f3Smrg		basic_machine=ymp-cray
1183b3eb03f3Smrg		os=-unicos
1184b3eb03f3Smrg		;;
1185b3eb03f3Smrg	z8k-*-coff)
1186b3eb03f3Smrg		basic_machine=z8k-unknown
1187b3eb03f3Smrg		os=-sim
1188b3eb03f3Smrg		;;
1189b3eb03f3Smrg	z80-*-coff)
1190b3eb03f3Smrg		basic_machine=z80-unknown
1191b3eb03f3Smrg		os=-sim
1192b3eb03f3Smrg		;;
1193b3eb03f3Smrg	none)
1194b3eb03f3Smrg		basic_machine=none-none
1195b3eb03f3Smrg		os=-none
1196b3eb03f3Smrg		;;
1197b3eb03f3Smrg
1198b3eb03f3Smrg# Here we handle the default manufacturer of certain CPU types.  It is in
1199b3eb03f3Smrg# some cases the only manufacturer, in others, it is the most popular.
1200b3eb03f3Smrg	w89k)
1201b3eb03f3Smrg		basic_machine=hppa1.1-winbond
1202b3eb03f3Smrg		;;
1203b3eb03f3Smrg	op50n)
1204b3eb03f3Smrg		basic_machine=hppa1.1-oki
1205b3eb03f3Smrg		;;
1206b3eb03f3Smrg	op60c)
1207b3eb03f3Smrg		basic_machine=hppa1.1-oki
1208b3eb03f3Smrg		;;
1209b3eb03f3Smrg	romp)
1210b3eb03f3Smrg		basic_machine=romp-ibm
1211b3eb03f3Smrg		;;
1212b3eb03f3Smrg	mmix)
1213b3eb03f3Smrg		basic_machine=mmix-knuth
1214b3eb03f3Smrg		;;
1215b3eb03f3Smrg	rs6000)
1216b3eb03f3Smrg		basic_machine=rs6000-ibm
1217b3eb03f3Smrg		;;
1218b3eb03f3Smrg	vax)
1219b3eb03f3Smrg		basic_machine=vax-dec
1220b3eb03f3Smrg		;;
1221b3eb03f3Smrg	pdp10)
1222b3eb03f3Smrg		# there are many clones, so DEC is not a safe bet
1223b3eb03f3Smrg		basic_machine=pdp10-unknown
1224b3eb03f3Smrg		;;
1225b3eb03f3Smrg	pdp11)
1226b3eb03f3Smrg		basic_machine=pdp11-dec
1227b3eb03f3Smrg		;;
1228b3eb03f3Smrg	we32k)
1229b3eb03f3Smrg		basic_machine=we32k-att
1230b3eb03f3Smrg		;;
1231b3eb03f3Smrg	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1232b3eb03f3Smrg		basic_machine=sh-unknown
1233b3eb03f3Smrg		;;
1234b3eb03f3Smrg	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1235b3eb03f3Smrg		basic_machine=sparc-sun
1236b3eb03f3Smrg		;;
1237b3eb03f3Smrg	cydra)
1238b3eb03f3Smrg		basic_machine=cydra-cydrome
1239b3eb03f3Smrg		;;
1240b3eb03f3Smrg	orion)
1241b3eb03f3Smrg		basic_machine=orion-highlevel
1242b3eb03f3Smrg		;;
1243b3eb03f3Smrg	orion105)
1244b3eb03f3Smrg		basic_machine=clipper-highlevel
1245b3eb03f3Smrg		;;
1246b3eb03f3Smrg	mac | mpw | mac-mpw)
1247b3eb03f3Smrg		basic_machine=m68k-apple
1248b3eb03f3Smrg		;;
1249b3eb03f3Smrg	pmac | pmac-mpw)
1250b3eb03f3Smrg		basic_machine=powerpc-apple
1251b3eb03f3Smrg		;;
1252b3eb03f3Smrg	*-unknown)
1253b3eb03f3Smrg		# Make sure to match an already-canonicalized machine name.
1254b3eb03f3Smrg		;;
1255b3eb03f3Smrg	*)
1256b3eb03f3Smrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1257b3eb03f3Smrg		exit 1
1258b3eb03f3Smrg		;;
1259b3eb03f3Smrgesac
1260b3eb03f3Smrg
1261b3eb03f3Smrg# Here we canonicalize certain aliases for manufacturers.
1262b3eb03f3Smrgcase $basic_machine in
1263b3eb03f3Smrg	*-digital*)
1264b3eb03f3Smrg		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1265b3eb03f3Smrg		;;
1266b3eb03f3Smrg	*-commodore*)
1267b3eb03f3Smrg		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1268b3eb03f3Smrg		;;
1269b3eb03f3Smrg	*)
1270b3eb03f3Smrg		;;
1271b3eb03f3Smrgesac
1272b3eb03f3Smrg
1273b3eb03f3Smrg# Decode manufacturer-specific aliases for certain operating systems.
1274b3eb03f3Smrg
1275b3eb03f3Smrgif [ x"$os" != x"" ]
1276b3eb03f3Smrgthen
1277b3eb03f3Smrgcase $os in
1278b3eb03f3Smrg        # First match some system type aliases
1279b3eb03f3Smrg        # that might get confused with valid system types.
1280b3eb03f3Smrg	# -solaris* is a basic system type, with this one exception.
1281af23b0a6Smrg        -auroraux)
1282af23b0a6Smrg	        os=-auroraux
1283af23b0a6Smrg		;;
1284b3eb03f3Smrg	-solaris1 | -solaris1.*)
1285b3eb03f3Smrg		os=`echo $os | sed -e 's|solaris1|sunos4|'`
1286b3eb03f3Smrg		;;
1287b3eb03f3Smrg	-solaris)
1288b3eb03f3Smrg		os=-solaris2
1289b3eb03f3Smrg		;;
1290b3eb03f3Smrg	-svr4*)
1291b3eb03f3Smrg		os=-sysv4
1292b3eb03f3Smrg		;;
1293b3eb03f3Smrg	-unixware*)
1294b3eb03f3Smrg		os=-sysv4.2uw
1295b3eb03f3Smrg		;;
1296b3eb03f3Smrg	-gnu/linux*)
1297b3eb03f3Smrg		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1298b3eb03f3Smrg		;;
1299b3eb03f3Smrg	# First accept the basic system types.
1300b3eb03f3Smrg	# The portable systems comes first.
1301b3eb03f3Smrg	# Each alternative MUST END IN A *, to match a version number.
1302b3eb03f3Smrg	# -sysv* is not here because it comes later, after sysvr4.
1303b3eb03f3Smrg	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1304af23b0a6Smrg	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1305af23b0a6Smrg	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1306af23b0a6Smrg	      | -sym* | -kopensolaris* \
1307b3eb03f3Smrg	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1308b3eb03f3Smrg	      | -aos* | -aros* \
1309b3eb03f3Smrg	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1310b3eb03f3Smrg	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1311b3eb03f3Smrg	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1312b3eb03f3Smrg	      | -openbsd* | -solidbsd* \
1313b3eb03f3Smrg	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1314b3eb03f3Smrg	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1315b3eb03f3Smrg	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1316b3eb03f3Smrg	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1317b3eb03f3Smrg	      | -chorusos* | -chorusrdb* | -cegcc* \
1318b3eb03f3Smrg	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1319af23b0a6Smrg	      | -mingw32* | -linux-gnu* | -linux-android* \
1320af23b0a6Smrg	      | -linux-newlib* | -linux-uclibc* \
1321b3eb03f3Smrg	      | -uxpv* | -beos* | -mpeix* | -udk* \
1322b3eb03f3Smrg	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1323b3eb03f3Smrg	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1324b3eb03f3Smrg	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1325b3eb03f3Smrg	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1326b3eb03f3Smrg	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1327b3eb03f3Smrg	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1328af23b0a6Smrg	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1329b3eb03f3Smrg	# Remember, each alternative MUST END IN *, to match a version number.
1330b3eb03f3Smrg		;;
1331b3eb03f3Smrg	-qnx*)
1332b3eb03f3Smrg		case $basic_machine in
1333b3eb03f3Smrg		    x86-* | i*86-*)
1334b3eb03f3Smrg			;;
1335b3eb03f3Smrg		    *)
1336b3eb03f3Smrg			os=-nto$os
1337b3eb03f3Smrg			;;
1338b3eb03f3Smrg		esac
1339b3eb03f3Smrg		;;
1340b3eb03f3Smrg	-nto-qnx*)
1341b3eb03f3Smrg		;;
1342b3eb03f3Smrg	-nto*)
1343b3eb03f3Smrg		os=`echo $os | sed -e 's|nto|nto-qnx|'`
1344b3eb03f3Smrg		;;
1345b3eb03f3Smrg	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1346b3eb03f3Smrg	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1347b3eb03f3Smrg	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1348b3eb03f3Smrg		;;
1349b3eb03f3Smrg	-mac*)
1350b3eb03f3Smrg		os=`echo $os | sed -e 's|mac|macos|'`
1351b3eb03f3Smrg		;;
1352b3eb03f3Smrg	-linux-dietlibc)
1353b3eb03f3Smrg		os=-linux-dietlibc
1354b3eb03f3Smrg		;;
1355b3eb03f3Smrg	-linux*)
1356b3eb03f3Smrg		os=`echo $os | sed -e 's|linux|linux-gnu|'`
1357b3eb03f3Smrg		;;
1358b3eb03f3Smrg	-sunos5*)
1359b3eb03f3Smrg		os=`echo $os | sed -e 's|sunos5|solaris2|'`
1360b3eb03f3Smrg		;;
1361b3eb03f3Smrg	-sunos6*)
1362b3eb03f3Smrg		os=`echo $os | sed -e 's|sunos6|solaris3|'`
1363b3eb03f3Smrg		;;
1364b3eb03f3Smrg	-opened*)
1365b3eb03f3Smrg		os=-openedition
1366b3eb03f3Smrg		;;
1367b3eb03f3Smrg        -os400*)
1368b3eb03f3Smrg		os=-os400
1369b3eb03f3Smrg		;;
1370b3eb03f3Smrg	-wince*)
1371b3eb03f3Smrg		os=-wince
1372b3eb03f3Smrg		;;
1373b3eb03f3Smrg	-osfrose*)
1374b3eb03f3Smrg		os=-osfrose
1375b3eb03f3Smrg		;;
1376b3eb03f3Smrg	-osf*)
1377b3eb03f3Smrg		os=-osf
1378b3eb03f3Smrg		;;
1379b3eb03f3Smrg	-utek*)
1380b3eb03f3Smrg		os=-bsd
1381b3eb03f3Smrg		;;
1382b3eb03f3Smrg	-dynix*)
1383b3eb03f3Smrg		os=-bsd
1384b3eb03f3Smrg		;;
1385b3eb03f3Smrg	-acis*)
1386b3eb03f3Smrg		os=-aos
1387b3eb03f3Smrg		;;
1388b3eb03f3Smrg	-atheos*)
1389b3eb03f3Smrg		os=-atheos
1390b3eb03f3Smrg		;;
1391b3eb03f3Smrg	-syllable*)
1392b3eb03f3Smrg		os=-syllable
1393b3eb03f3Smrg		;;
1394b3eb03f3Smrg	-386bsd)
1395b3eb03f3Smrg		os=-bsd
1396b3eb03f3Smrg		;;
1397b3eb03f3Smrg	-ctix* | -uts*)
1398b3eb03f3Smrg		os=-sysv
1399b3eb03f3Smrg		;;
1400b3eb03f3Smrg	-nova*)
1401b3eb03f3Smrg		os=-rtmk-nova
1402b3eb03f3Smrg		;;
1403b3eb03f3Smrg	-ns2 )
1404b3eb03f3Smrg		os=-nextstep2
1405b3eb03f3Smrg		;;
1406b3eb03f3Smrg	-nsk*)
1407b3eb03f3Smrg		os=-nsk
1408b3eb03f3Smrg		;;
1409b3eb03f3Smrg	# Preserve the version number of sinix5.
1410b3eb03f3Smrg	-sinix5.*)
1411b3eb03f3Smrg		os=`echo $os | sed -e 's|sinix|sysv|'`
1412b3eb03f3Smrg		;;
1413b3eb03f3Smrg	-sinix*)
1414b3eb03f3Smrg		os=-sysv4
1415b3eb03f3Smrg		;;
1416b3eb03f3Smrg        -tpf*)
1417b3eb03f3Smrg		os=-tpf
1418b3eb03f3Smrg		;;
1419b3eb03f3Smrg	-triton*)
1420b3eb03f3Smrg		os=-sysv3
1421b3eb03f3Smrg		;;
1422b3eb03f3Smrg	-oss*)
1423b3eb03f3Smrg		os=-sysv3
1424b3eb03f3Smrg		;;
1425b3eb03f3Smrg	-svr4)
1426b3eb03f3Smrg		os=-sysv4
1427b3eb03f3Smrg		;;
1428b3eb03f3Smrg	-svr3)
1429b3eb03f3Smrg		os=-sysv3
1430b3eb03f3Smrg		;;
1431b3eb03f3Smrg	-sysvr4)
1432b3eb03f3Smrg		os=-sysv4
1433b3eb03f3Smrg		;;
1434b3eb03f3Smrg	# This must come after -sysvr4.
1435b3eb03f3Smrg	-sysv*)
1436b3eb03f3Smrg		;;
1437b3eb03f3Smrg	-ose*)
1438b3eb03f3Smrg		os=-ose
1439b3eb03f3Smrg		;;
1440b3eb03f3Smrg	-es1800*)
1441b3eb03f3Smrg		os=-ose
1442b3eb03f3Smrg		;;
1443b3eb03f3Smrg	-xenix)
1444b3eb03f3Smrg		os=-xenix
1445b3eb03f3Smrg		;;
1446b3eb03f3Smrg	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1447b3eb03f3Smrg		os=-mint
1448b3eb03f3Smrg		;;
1449b3eb03f3Smrg	-aros*)
1450b3eb03f3Smrg		os=-aros
1451b3eb03f3Smrg		;;
1452b3eb03f3Smrg	-kaos*)
1453b3eb03f3Smrg		os=-kaos
1454b3eb03f3Smrg		;;
1455b3eb03f3Smrg	-zvmoe)
1456b3eb03f3Smrg		os=-zvmoe
1457b3eb03f3Smrg		;;
1458b3eb03f3Smrg	-dicos*)
1459b3eb03f3Smrg		os=-dicos
1460b3eb03f3Smrg		;;
1461af23b0a6Smrg        -nacl*)
1462af23b0a6Smrg	        ;;
1463b3eb03f3Smrg	-none)
1464b3eb03f3Smrg		;;
1465b3eb03f3Smrg	*)
1466b3eb03f3Smrg		# Get rid of the `-' at the beginning of $os.
1467b3eb03f3Smrg		os=`echo $os | sed 's/[^-]*-//'`
1468b3eb03f3Smrg		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1469b3eb03f3Smrg		exit 1
1470b3eb03f3Smrg		;;
1471b3eb03f3Smrgesac
1472b3eb03f3Smrgelse
1473b3eb03f3Smrg
1474b3eb03f3Smrg# Here we handle the default operating systems that come with various machines.
1475b3eb03f3Smrg# The value should be what the vendor currently ships out the door with their
1476b3eb03f3Smrg# machine or put another way, the most popular os provided with the machine.
1477b3eb03f3Smrg
1478b3eb03f3Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say,
1479b3eb03f3Smrg# "-sun"), then you have to tell the case statement up towards the top
1480b3eb03f3Smrg# that MANUFACTURER isn't an operating system.  Otherwise, code above
1481b3eb03f3Smrg# will signal an error saying that MANUFACTURER isn't an operating
1482b3eb03f3Smrg# system, and we'll never get to this point.
1483b3eb03f3Smrg
1484b3eb03f3Smrgcase $basic_machine in
1485b3eb03f3Smrg        score-*)
1486b3eb03f3Smrg		os=-elf
1487b3eb03f3Smrg		;;
1488b3eb03f3Smrg        spu-*)
1489b3eb03f3Smrg		os=-elf
1490b3eb03f3Smrg		;;
1491b3eb03f3Smrg	*-acorn)
1492b3eb03f3Smrg		os=-riscix1.2
1493b3eb03f3Smrg		;;
1494b3eb03f3Smrg	arm*-rebel)
1495b3eb03f3Smrg		os=-linux
1496b3eb03f3Smrg		;;
1497b3eb03f3Smrg	arm*-semi)
1498b3eb03f3Smrg		os=-aout
1499b3eb03f3Smrg		;;
1500b3eb03f3Smrg        c4x-* | tic4x-*)
1501b3eb03f3Smrg        	os=-coff
1502b3eb03f3Smrg		;;
1503af23b0a6Smrg	tic54x-*)
1504af23b0a6Smrg		os=-coff
1505af23b0a6Smrg		;;
1506af23b0a6Smrg	tic55x-*)
1507af23b0a6Smrg		os=-coff
1508af23b0a6Smrg		;;
1509af23b0a6Smrg	tic6x-*)
1510af23b0a6Smrg		os=-coff
1511af23b0a6Smrg		;;
1512b3eb03f3Smrg	# This must come before the *-dec entry.
1513b3eb03f3Smrg	pdp10-*)
1514b3eb03f3Smrg		os=-tops20
1515b3eb03f3Smrg		;;
1516b3eb03f3Smrg	pdp11-*)
1517b3eb03f3Smrg		os=-none
1518b3eb03f3Smrg		;;
1519b3eb03f3Smrg	*-dec | vax-*)
1520b3eb03f3Smrg		os=-ultrix4.2
1521b3eb03f3Smrg		;;
1522b3eb03f3Smrg	m68*-apollo)
1523b3eb03f3Smrg		os=-domain
1524b3eb03f3Smrg		;;
1525b3eb03f3Smrg	i386-sun)
1526b3eb03f3Smrg		os=-sunos4.0.2
1527b3eb03f3Smrg		;;
1528b3eb03f3Smrg	m68000-sun)
1529b3eb03f3Smrg		os=-sunos3
1530b3eb03f3Smrg		# This also exists in the configure program, but was not the
1531b3eb03f3Smrg		# default.
1532b3eb03f3Smrg		# os=-sunos4
1533b3eb03f3Smrg		;;
1534b3eb03f3Smrg	m68*-cisco)
1535b3eb03f3Smrg		os=-aout
1536b3eb03f3Smrg		;;
1537b3eb03f3Smrg        mep-*)
1538b3eb03f3Smrg		os=-elf
1539b3eb03f3Smrg		;;
1540b3eb03f3Smrg	mips*-cisco)
1541b3eb03f3Smrg		os=-elf
1542b3eb03f3Smrg		;;
1543b3eb03f3Smrg	mips*-*)
1544b3eb03f3Smrg		os=-elf
1545b3eb03f3Smrg		;;
1546b3eb03f3Smrg	or32-*)
1547b3eb03f3Smrg		os=-coff
1548b3eb03f3Smrg		;;
1549b3eb03f3Smrg	*-tti)	# must be before sparc entry or we get the wrong os.
1550b3eb03f3Smrg		os=-sysv3
1551b3eb03f3Smrg		;;
1552b3eb03f3Smrg	sparc-* | *-sun)
1553b3eb03f3Smrg		os=-sunos4.1.1
1554b3eb03f3Smrg		;;
1555b3eb03f3Smrg	*-be)
1556b3eb03f3Smrg		os=-beos
1557b3eb03f3Smrg		;;
1558b3eb03f3Smrg	*-haiku)
1559b3eb03f3Smrg		os=-haiku
1560b3eb03f3Smrg		;;
1561b3eb03f3Smrg	*-ibm)
1562b3eb03f3Smrg		os=-aix
1563b3eb03f3Smrg		;;
1564b3eb03f3Smrg    	*-knuth)
1565b3eb03f3Smrg		os=-mmixware
1566b3eb03f3Smrg		;;
1567b3eb03f3Smrg	*-wec)
1568b3eb03f3Smrg		os=-proelf
1569b3eb03f3Smrg		;;
1570b3eb03f3Smrg	*-winbond)
1571b3eb03f3Smrg		os=-proelf
1572b3eb03f3Smrg		;;
1573b3eb03f3Smrg	*-oki)
1574b3eb03f3Smrg		os=-proelf
1575b3eb03f3Smrg		;;
1576b3eb03f3Smrg	*-hp)
1577b3eb03f3Smrg		os=-hpux
1578b3eb03f3Smrg		;;
1579b3eb03f3Smrg	*-hitachi)
1580b3eb03f3Smrg		os=-hiux
1581b3eb03f3Smrg		;;
1582b3eb03f3Smrg	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1583b3eb03f3Smrg		os=-sysv
1584b3eb03f3Smrg		;;
1585b3eb03f3Smrg	*-cbm)
1586b3eb03f3Smrg		os=-amigaos
1587b3eb03f3Smrg		;;
1588b3eb03f3Smrg	*-dg)
1589b3eb03f3Smrg		os=-dgux
1590b3eb03f3Smrg		;;
1591b3eb03f3Smrg	*-dolphin)
1592b3eb03f3Smrg		os=-sysv3
1593b3eb03f3Smrg		;;
1594b3eb03f3Smrg	m68k-ccur)
1595b3eb03f3Smrg		os=-rtu
1596b3eb03f3Smrg		;;
1597b3eb03f3Smrg	m88k-omron*)
1598b3eb03f3Smrg		os=-luna
1599b3eb03f3Smrg		;;
1600b3eb03f3Smrg	*-next )
1601b3eb03f3Smrg		os=-nextstep
1602b3eb03f3Smrg		;;
1603b3eb03f3Smrg	*-sequent)
1604b3eb03f3Smrg		os=-ptx
1605b3eb03f3Smrg		;;
1606b3eb03f3Smrg	*-crds)
1607b3eb03f3Smrg		os=-unos
1608b3eb03f3Smrg		;;
1609b3eb03f3Smrg	*-ns)
1610b3eb03f3Smrg		os=-genix
1611b3eb03f3Smrg		;;
1612b3eb03f3Smrg	i370-*)
1613b3eb03f3Smrg		os=-mvs
1614b3eb03f3Smrg		;;
1615b3eb03f3Smrg	*-next)
1616b3eb03f3Smrg		os=-nextstep3
1617b3eb03f3Smrg		;;
1618b3eb03f3Smrg	*-gould)
1619b3eb03f3Smrg		os=-sysv
1620b3eb03f3Smrg		;;
1621b3eb03f3Smrg	*-highlevel)
1622b3eb03f3Smrg		os=-bsd
1623b3eb03f3Smrg		;;
1624b3eb03f3Smrg	*-encore)
1625b3eb03f3Smrg		os=-bsd
1626b3eb03f3Smrg		;;
1627b3eb03f3Smrg	*-sgi)
1628b3eb03f3Smrg		os=-irix
1629b3eb03f3Smrg		;;
1630b3eb03f3Smrg	*-siemens)
1631b3eb03f3Smrg		os=-sysv4
1632b3eb03f3Smrg		;;
1633b3eb03f3Smrg	*-masscomp)
1634b3eb03f3Smrg		os=-rtu
1635b3eb03f3Smrg		;;
1636b3eb03f3Smrg	f30[01]-fujitsu | f700-fujitsu)
1637b3eb03f3Smrg		os=-uxpv
1638b3eb03f3Smrg		;;
1639b3eb03f3Smrg	*-rom68k)
1640b3eb03f3Smrg		os=-coff
1641b3eb03f3Smrg		;;
1642b3eb03f3Smrg	*-*bug)
1643b3eb03f3Smrg		os=-coff
1644b3eb03f3Smrg		;;
1645b3eb03f3Smrg	*-apple)
1646b3eb03f3Smrg		os=-macos
1647b3eb03f3Smrg		;;
1648b3eb03f3Smrg	*-atari*)
1649b3eb03f3Smrg		os=-mint
1650b3eb03f3Smrg		;;
1651b3eb03f3Smrg	*)
1652b3eb03f3Smrg		os=-none
1653b3eb03f3Smrg		;;
1654b3eb03f3Smrgesac
1655b3eb03f3Smrgfi
1656b3eb03f3Smrg
1657b3eb03f3Smrg# Here we handle the case where we know the os, and the CPU type, but not the
1658b3eb03f3Smrg# manufacturer.  We pick the logical manufacturer.
1659b3eb03f3Smrgvendor=unknown
1660b3eb03f3Smrgcase $basic_machine in
1661b3eb03f3Smrg	*-unknown)
1662b3eb03f3Smrg		case $os in
1663b3eb03f3Smrg			-riscix*)
1664b3eb03f3Smrg				vendor=acorn
1665b3eb03f3Smrg				;;
1666b3eb03f3Smrg			-sunos*)
1667b3eb03f3Smrg				vendor=sun
1668b3eb03f3Smrg				;;
1669af23b0a6Smrg			-cnk*|-aix*)
1670b3eb03f3Smrg				vendor=ibm
1671b3eb03f3Smrg				;;
1672b3eb03f3Smrg			-beos*)
1673b3eb03f3Smrg				vendor=be
1674b3eb03f3Smrg				;;
1675b3eb03f3Smrg			-hpux*)
1676b3eb03f3Smrg				vendor=hp
1677b3eb03f3Smrg				;;
1678b3eb03f3Smrg			-mpeix*)
1679b3eb03f3Smrg				vendor=hp
1680b3eb03f3Smrg				;;
1681b3eb03f3Smrg			-hiux*)
1682b3eb03f3Smrg				vendor=hitachi
1683b3eb03f3Smrg				;;
1684b3eb03f3Smrg			-unos*)
1685b3eb03f3Smrg				vendor=crds
1686b3eb03f3Smrg				;;
1687b3eb03f3Smrg			-dgux*)
1688b3eb03f3Smrg				vendor=dg
1689b3eb03f3Smrg				;;
1690b3eb03f3Smrg			-luna*)
1691b3eb03f3Smrg				vendor=omron
1692b3eb03f3Smrg				;;
1693b3eb03f3Smrg			-genix*)
1694b3eb03f3Smrg				vendor=ns
1695b3eb03f3Smrg				;;
1696b3eb03f3Smrg			-mvs* | -opened*)
1697b3eb03f3Smrg				vendor=ibm
1698b3eb03f3Smrg				;;
1699b3eb03f3Smrg			-os400*)
1700b3eb03f3Smrg				vendor=ibm
1701b3eb03f3Smrg				;;
1702b3eb03f3Smrg			-ptx*)
1703b3eb03f3Smrg				vendor=sequent
1704b3eb03f3Smrg				;;
1705b3eb03f3Smrg			-tpf*)
1706b3eb03f3Smrg				vendor=ibm
1707b3eb03f3Smrg				;;
1708b3eb03f3Smrg			-vxsim* | -vxworks* | -windiss*)
1709b3eb03f3Smrg				vendor=wrs
1710b3eb03f3Smrg				;;
1711b3eb03f3Smrg			-aux*)
1712b3eb03f3Smrg				vendor=apple
1713b3eb03f3Smrg				;;
1714b3eb03f3Smrg			-hms*)
1715b3eb03f3Smrg				vendor=hitachi
1716b3eb03f3Smrg				;;
1717b3eb03f3Smrg			-mpw* | -macos*)
1718b3eb03f3Smrg				vendor=apple
1719b3eb03f3Smrg				;;
1720b3eb03f3Smrg			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1721b3eb03f3Smrg				vendor=atari
1722b3eb03f3Smrg				;;
1723b3eb03f3Smrg			-vos*)
1724b3eb03f3Smrg				vendor=stratus
1725b3eb03f3Smrg				;;
1726b3eb03f3Smrg		esac
1727b3eb03f3Smrg		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1728b3eb03f3Smrg		;;
1729b3eb03f3Smrgesac
1730b3eb03f3Smrg
1731b3eb03f3Smrgecho $basic_machine$os
1732b3eb03f3Smrgexit
1733b3eb03f3Smrg
1734b3eb03f3Smrg# Local variables:
1735b3eb03f3Smrg# eval: (add-hook 'write-file-hooks 'time-stamp)
1736b3eb03f3Smrg# time-stamp-start: "timestamp='"
1737b3eb03f3Smrg# time-stamp-format: "%:y-%02m-%02d"
1738b3eb03f3Smrg# time-stamp-end: "'"
1739b3eb03f3Smrg# End:
1740