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