xref: /minix3/external/bsd/flex/dist/config.sub (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1357f1050SThomas Veerman#! /bin/sh
2357f1050SThomas Veerman# Configuration validation subroutine script.
3357f1050SThomas Veerman#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4*0a6a1f1dSLionel Sambuc#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5*0a6a1f1dSLionel Sambuc#   2011, 2012 Free Software Foundation, Inc.
6357f1050SThomas Veerman
7*0a6a1f1dSLionel Sambuctimestamp='2012-04-18'
8357f1050SThomas Veerman
9357f1050SThomas Veerman# This file is (in principle) common to ALL GNU software.
10357f1050SThomas Veerman# The presence of a machine in this file suggests that SOME GNU software
11357f1050SThomas Veerman# can handle that machine.  It does not imply ALL GNU software can.
12357f1050SThomas Veerman#
13357f1050SThomas Veerman# This file is free software; you can redistribute it and/or modify
14357f1050SThomas Veerman# it under the terms of the GNU General Public License as published by
15357f1050SThomas Veerman# the Free Software Foundation; either version 2 of the License, or
16357f1050SThomas Veerman# (at your option) any later version.
17357f1050SThomas Veerman#
18357f1050SThomas Veerman# This program is distributed in the hope that it will be useful,
19357f1050SThomas Veerman# but WITHOUT ANY WARRANTY; without even the implied warranty of
20357f1050SThomas Veerman# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21357f1050SThomas Veerman# GNU General Public License for more details.
22357f1050SThomas Veerman#
23357f1050SThomas Veerman# You should have received a copy of the GNU General Public License
24*0a6a1f1dSLionel Sambuc# along with this program; if not, see <http://www.gnu.org/licenses/>.
25357f1050SThomas Veerman#
26357f1050SThomas Veerman# As a special exception to the GNU General Public License, if you
27357f1050SThomas Veerman# distribute this file as part of a program that contains a
28357f1050SThomas Veerman# configuration script generated by Autoconf, you may include it under
29357f1050SThomas Veerman# the same distribution terms that you use for the rest of that program.
30357f1050SThomas Veerman
31357f1050SThomas Veerman
32357f1050SThomas Veerman# Please send patches to <config-patches@gnu.org>.  Submit a context
33*0a6a1f1dSLionel Sambuc# diff and a properly formatted GNU ChangeLog entry.
34357f1050SThomas Veerman#
35357f1050SThomas Veerman# Configuration subroutine to validate and canonicalize a configuration type.
36357f1050SThomas Veerman# Supply the specified configuration type as an argument.
37357f1050SThomas Veerman# If it is invalid, we print an error message on stderr and exit with code 1.
38357f1050SThomas Veerman# Otherwise, we print the canonical config type on stdout and succeed.
39357f1050SThomas Veerman
40*0a6a1f1dSLionel Sambuc# You can get the latest version of this script from:
41*0a6a1f1dSLionel Sambuc# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
42*0a6a1f1dSLionel Sambuc
43357f1050SThomas Veerman# This file is supposed to be the same for all GNU packages
44357f1050SThomas Veerman# and recognize all the CPU types, system types and aliases
45357f1050SThomas Veerman# that are meaningful with *any* GNU software.
46357f1050SThomas Veerman# Each package is responsible for reporting which valid configurations
47357f1050SThomas Veerman# it does not support.  The user should be able to distinguish
48357f1050SThomas Veerman# a failure to support a valid configuration from a meaningless
49357f1050SThomas Veerman# configuration.
50357f1050SThomas Veerman
51357f1050SThomas Veerman# The goal of this file is to map all the various variations of a given
52357f1050SThomas Veerman# machine specification into a single specification in the form:
53357f1050SThomas Veerman#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
54357f1050SThomas Veerman# or in some cases, the newer four-part form:
55357f1050SThomas Veerman#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
56357f1050SThomas Veerman# It is wrong to echo any other type of specification.
57357f1050SThomas Veerman
58357f1050SThomas Veermanme=`echo "$0" | sed -e 's,.*/,,'`
59357f1050SThomas Veerman
60357f1050SThomas Veermanusage="\
61357f1050SThomas VeermanUsage: $0 [OPTION] CPU-MFR-OPSYS
62357f1050SThomas Veerman       $0 [OPTION] ALIAS
63357f1050SThomas Veerman
64357f1050SThomas VeermanCanonicalize a configuration name.
65357f1050SThomas Veerman
66357f1050SThomas VeermanOperation modes:
67357f1050SThomas Veerman  -h, --help         print this help, then exit
68357f1050SThomas Veerman  -t, --time-stamp   print date of last modification, then exit
69357f1050SThomas Veerman  -v, --version      print version number, then exit
70357f1050SThomas Veerman
71357f1050SThomas VeermanReport bugs and patches to <config-patches@gnu.org>."
72357f1050SThomas Veerman
73357f1050SThomas Veermanversion="\
74357f1050SThomas VeermanGNU config.sub ($timestamp)
75357f1050SThomas Veerman
76*0a6a1f1dSLionel SambucCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
77*0a6a1f1dSLionel Sambuc2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
78*0a6a1f1dSLionel SambucFree Software Foundation, Inc.
79357f1050SThomas Veerman
80357f1050SThomas VeermanThis is free software; see the source for copying conditions.  There is NO
81357f1050SThomas Veermanwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
82357f1050SThomas Veerman
83357f1050SThomas Veermanhelp="
84357f1050SThomas VeermanTry \`$me --help' for more information."
85357f1050SThomas Veerman
86357f1050SThomas Veerman# Parse command line
87357f1050SThomas Veermanwhile test $# -gt 0 ; do
88357f1050SThomas Veerman  case $1 in
89357f1050SThomas Veerman    --time-stamp | --time* | -t )
90357f1050SThomas Veerman       echo "$timestamp" ; exit ;;
91357f1050SThomas Veerman    --version | -v )
92357f1050SThomas Veerman       echo "$version" ; exit ;;
93357f1050SThomas Veerman    --help | --h* | -h )
94357f1050SThomas Veerman       echo "$usage"; exit ;;
95357f1050SThomas Veerman    -- )     # Stop option processing
96357f1050SThomas Veerman       shift; break ;;
97357f1050SThomas Veerman    - )	# Use stdin as input.
98357f1050SThomas Veerman       break ;;
99357f1050SThomas Veerman    -* )
100357f1050SThomas Veerman       echo "$me: invalid option $1$help"
101357f1050SThomas Veerman       exit 1 ;;
102357f1050SThomas Veerman
103357f1050SThomas Veerman    *local*)
104357f1050SThomas Veerman       # First pass through any local machine types.
105357f1050SThomas Veerman       echo $1
106357f1050SThomas Veerman       exit ;;
107357f1050SThomas Veerman
108357f1050SThomas Veerman    * )
109357f1050SThomas Veerman       break ;;
110357f1050SThomas Veerman  esac
111357f1050SThomas Veermandone
112357f1050SThomas Veerman
113357f1050SThomas Veermancase $# in
114357f1050SThomas Veerman 0) echo "$me: missing argument$help" >&2
115357f1050SThomas Veerman    exit 1;;
116357f1050SThomas Veerman 1) ;;
117357f1050SThomas Veerman *) echo "$me: too many arguments$help" >&2
118357f1050SThomas Veerman    exit 1;;
119357f1050SThomas Veermanesac
120357f1050SThomas Veerman
121357f1050SThomas Veerman# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
122357f1050SThomas Veerman# Here we must recognize all the valid KERNEL-OS combinations.
123357f1050SThomas Veermanmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
124357f1050SThomas Veermancase $maybe_os in
125*0a6a1f1dSLionel Sambuc  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
126*0a6a1f1dSLionel Sambuc  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
127*0a6a1f1dSLionel Sambuc  knetbsd*-gnu* | netbsd*-gnu* | \
12884d9c625SLionel Sambuc  kopensolaris*-gnu* | \
12984d9c625SLionel Sambuc  storm-chaos* | os2-emx* | rtmk-nova*)
130357f1050SThomas Veerman    os=-$maybe_os
131357f1050SThomas Veerman    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
132357f1050SThomas Veerman    ;;
133*0a6a1f1dSLionel Sambuc  android-linux)
134*0a6a1f1dSLionel Sambuc    os=-linux-android
135*0a6a1f1dSLionel Sambuc    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
136*0a6a1f1dSLionel Sambuc    ;;
137357f1050SThomas Veerman  *)
138357f1050SThomas Veerman    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
139357f1050SThomas Veerman    if [ $basic_machine != $1 ]
140357f1050SThomas Veerman    then os=`echo $1 | sed 's/.*-/-/'`
141357f1050SThomas Veerman    else os=; fi
142357f1050SThomas Veerman    ;;
143357f1050SThomas Veermanesac
144357f1050SThomas Veerman
145357f1050SThomas Veerman### Let's recognize common machines as not being operating systems so
146357f1050SThomas Veerman### that things like config.sub decstation-3100 work.  We also
147357f1050SThomas Veerman### recognize some manufacturers as not being operating systems, so we
148357f1050SThomas Veerman### can provide default operating systems below.
149357f1050SThomas Veermancase $os in
150357f1050SThomas Veerman	-sun*os*)
151357f1050SThomas Veerman		# Prevent following clause from handling this invalid input.
152357f1050SThomas Veerman		;;
153357f1050SThomas Veerman	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
154357f1050SThomas Veerman	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
155357f1050SThomas Veerman	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
156357f1050SThomas Veerman	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
157357f1050SThomas Veerman	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
158357f1050SThomas Veerman	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
159*0a6a1f1dSLionel Sambuc	-apple | -axis | -knuth | -cray | -microblaze)
160357f1050SThomas Veerman		os=
161357f1050SThomas Veerman		basic_machine=$1
162357f1050SThomas Veerman		;;
16384d9c625SLionel Sambuc	-bluegene*)
16484d9c625SLionel Sambuc		os=-cnk
16584d9c625SLionel Sambuc		;;
166357f1050SThomas Veerman	-sim | -cisco | -oki | -wec | -winbond)
167357f1050SThomas Veerman		os=
168357f1050SThomas Veerman		basic_machine=$1
169357f1050SThomas Veerman		;;
170357f1050SThomas Veerman	-scout)
171357f1050SThomas Veerman		;;
172357f1050SThomas Veerman	-wrs)
173357f1050SThomas Veerman		os=-vxworks
174357f1050SThomas Veerman		basic_machine=$1
175357f1050SThomas Veerman		;;
176357f1050SThomas Veerman	-chorusos*)
177357f1050SThomas Veerman		os=-chorusos
178357f1050SThomas Veerman		basic_machine=$1
179357f1050SThomas Veerman		;;
180357f1050SThomas Veerman	-chorusrdb)
181357f1050SThomas Veerman		os=-chorusrdb
182357f1050SThomas Veerman		basic_machine=$1
183357f1050SThomas Veerman		;;
184357f1050SThomas Veerman	-hiux*)
185357f1050SThomas Veerman		os=-hiuxwe2
186357f1050SThomas Veerman		;;
18784d9c625SLionel Sambuc	-sco6)
18884d9c625SLionel Sambuc		os=-sco5v6
18984d9c625SLionel Sambuc		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
19084d9c625SLionel Sambuc		;;
191357f1050SThomas Veerman	-sco5)
192357f1050SThomas Veerman		os=-sco3.2v5
193357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194357f1050SThomas Veerman		;;
195357f1050SThomas Veerman	-sco4)
196357f1050SThomas Veerman		os=-sco3.2v4
197357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198357f1050SThomas Veerman		;;
199357f1050SThomas Veerman	-sco3.2.[4-9]*)
200357f1050SThomas Veerman		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
201357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202357f1050SThomas Veerman		;;
203357f1050SThomas Veerman	-sco3.2v[4-9]*)
204357f1050SThomas Veerman		# Don't forget version if it is 3.2v4 or newer.
205357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206357f1050SThomas Veerman		;;
20784d9c625SLionel Sambuc	-sco5v6*)
20884d9c625SLionel Sambuc		# Don't forget version if it is 3.2v4 or newer.
20984d9c625SLionel Sambuc		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
21084d9c625SLionel Sambuc		;;
211357f1050SThomas Veerman	-sco*)
212357f1050SThomas Veerman		os=-sco3.2v2
213357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214357f1050SThomas Veerman		;;
215357f1050SThomas Veerman	-udk*)
216357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
217357f1050SThomas Veerman		;;
218357f1050SThomas Veerman	-isc)
219357f1050SThomas Veerman		os=-isc2.2
220357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
221357f1050SThomas Veerman		;;
222357f1050SThomas Veerman	-clix*)
223357f1050SThomas Veerman		basic_machine=clipper-intergraph
224357f1050SThomas Veerman		;;
225357f1050SThomas Veerman	-isc*)
226357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
227357f1050SThomas Veerman		;;
228*0a6a1f1dSLionel Sambuc	-lynx*178)
229*0a6a1f1dSLionel Sambuc		os=-lynxos178
230*0a6a1f1dSLionel Sambuc		;;
231*0a6a1f1dSLionel Sambuc	-lynx*5)
232*0a6a1f1dSLionel Sambuc		os=-lynxos5
233*0a6a1f1dSLionel Sambuc		;;
234357f1050SThomas Veerman	-lynx*)
235357f1050SThomas Veerman		os=-lynxos
236357f1050SThomas Veerman		;;
237357f1050SThomas Veerman	-ptx*)
238357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
239357f1050SThomas Veerman		;;
240357f1050SThomas Veerman	-windowsnt*)
241357f1050SThomas Veerman		os=`echo $os | sed -e 's/windowsnt/winnt/'`
242357f1050SThomas Veerman		;;
243357f1050SThomas Veerman	-psos*)
244357f1050SThomas Veerman		os=-psos
245357f1050SThomas Veerman		;;
246357f1050SThomas Veerman	-mint | -mint[0-9]*)
247357f1050SThomas Veerman		basic_machine=m68k-atari
248357f1050SThomas Veerman		os=-mint
249357f1050SThomas Veerman		;;
250357f1050SThomas Veermanesac
251357f1050SThomas Veerman
252357f1050SThomas Veerman# Decode aliases for certain CPU-COMPANY combinations.
253357f1050SThomas Veermancase $basic_machine in
254357f1050SThomas Veerman	# Recognize the basic CPU types without company name.
255357f1050SThomas Veerman	# Some are omitted here because they have special meanings below.
256357f1050SThomas Veerman	1750a | 580 \
257357f1050SThomas Veerman	| a29k \
258*0a6a1f1dSLionel Sambuc	| aarch64 | aarch64_be \
259357f1050SThomas Veerman	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
260357f1050SThomas Veerman	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
261357f1050SThomas Veerman	| am33_2.0 \
26284d9c625SLionel Sambuc	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
263*0a6a1f1dSLionel Sambuc        | be32 | be64 \
264357f1050SThomas Veerman	| bfin \
265357f1050SThomas Veerman	| c4x | clipper \
266357f1050SThomas Veerman	| d10v | d30v | dlx | dsp16xx \
267*0a6a1f1dSLionel Sambuc	| epiphany \
26884d9c625SLionel Sambuc	| fido | fr30 | frv \
269357f1050SThomas Veerman	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
270*0a6a1f1dSLionel Sambuc	| hexagon \
271357f1050SThomas Veerman	| i370 | i860 | i960 | ia64 \
272357f1050SThomas Veerman	| ip2k | iq2000 \
273*0a6a1f1dSLionel Sambuc	| le32 | le64 \
27484d9c625SLionel Sambuc	| lm32 \
27584d9c625SLionel Sambuc	| m32c | m32r | m32rle | m68000 | m68k | m88k \
27684d9c625SLionel Sambuc	| maxq | mb | microblaze | mcore | mep | metag \
277357f1050SThomas Veerman	| mips | mipsbe | mipseb | mipsel | mipsle \
278357f1050SThomas Veerman	| mips16 \
279357f1050SThomas Veerman	| mips64 | mips64el \
28084d9c625SLionel Sambuc	| mips64octeon | mips64octeonel \
281357f1050SThomas Veerman	| mips64orion | mips64orionel \
28284d9c625SLionel Sambuc	| mips64r5900 | mips64r5900el \
28384d9c625SLionel Sambuc	| mips64vr | mips64vrel \
284357f1050SThomas Veerman	| mips64vr4100 | mips64vr4100el \
285357f1050SThomas Veerman	| mips64vr4300 | mips64vr4300el \
286357f1050SThomas Veerman	| mips64vr5000 | mips64vr5000el \
287357f1050SThomas Veerman	| mips64vr5900 | mips64vr5900el \
288357f1050SThomas Veerman	| mipsisa32 | mipsisa32el \
289357f1050SThomas Veerman	| mipsisa32r2 | mipsisa32r2el \
290357f1050SThomas Veerman	| mipsisa64 | mipsisa64el \
291357f1050SThomas Veerman	| mipsisa64r2 | mipsisa64r2el \
292357f1050SThomas Veerman	| mipsisa64sb1 | mipsisa64sb1el \
293357f1050SThomas Veerman	| mipsisa64sr71k | mipsisa64sr71kel \
294357f1050SThomas Veerman	| mipstx39 | mipstx39el \
295357f1050SThomas Veerman	| mn10200 | mn10300 \
29684d9c625SLionel Sambuc	| moxie \
29784d9c625SLionel Sambuc	| mt \
298357f1050SThomas Veerman	| msp430 \
299*0a6a1f1dSLionel Sambuc	| nds32 | nds32le | nds32be \
30084d9c625SLionel Sambuc	| nios | nios2 \
301357f1050SThomas Veerman	| ns16k | ns32k \
302*0a6a1f1dSLionel Sambuc	| open8 \
303357f1050SThomas Veerman	| or32 \
304357f1050SThomas Veerman	| pdp10 | pdp11 | pj | pjl \
305*0a6a1f1dSLionel Sambuc	| powerpc | powerpc64 | powerpc64le | powerpcle \
306357f1050SThomas Veerman	| pyramid \
307*0a6a1f1dSLionel Sambuc	| rl78 | rx \
30884d9c625SLionel Sambuc	| score \
30984d9c625SLionel Sambuc	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
310357f1050SThomas Veerman	| sh64 | sh64le \
31184d9c625SLionel Sambuc	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
31284d9c625SLionel Sambuc	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
313*0a6a1f1dSLionel Sambuc	| spu \
314*0a6a1f1dSLionel Sambuc	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
315*0a6a1f1dSLionel Sambuc	| ubicom32 \
316*0a6a1f1dSLionel Sambuc	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
317357f1050SThomas Veerman	| we32k \
318*0a6a1f1dSLionel Sambuc	| x86 | xc16x | xstormy16 | xtensa \
31984d9c625SLionel Sambuc	| z8k | z80)
320357f1050SThomas Veerman		basic_machine=$basic_machine-unknown
321357f1050SThomas Veerman		;;
322*0a6a1f1dSLionel Sambuc	c54x)
323*0a6a1f1dSLionel Sambuc		basic_machine=tic54x-unknown
324*0a6a1f1dSLionel Sambuc		;;
325*0a6a1f1dSLionel Sambuc	c55x)
326*0a6a1f1dSLionel Sambuc		basic_machine=tic55x-unknown
327*0a6a1f1dSLionel Sambuc		;;
328*0a6a1f1dSLionel Sambuc	c6x)
329*0a6a1f1dSLionel Sambuc		basic_machine=tic6x-unknown
330*0a6a1f1dSLionel Sambuc		;;
331*0a6a1f1dSLionel Sambuc	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
332357f1050SThomas Veerman		basic_machine=$basic_machine-unknown
333357f1050SThomas Veerman		os=-none
334357f1050SThomas Veerman		;;
335357f1050SThomas Veerman	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
336357f1050SThomas Veerman		;;
33784d9c625SLionel Sambuc	ms1)
33884d9c625SLionel Sambuc		basic_machine=mt-unknown
33984d9c625SLionel Sambuc		;;
340357f1050SThomas Veerman
341*0a6a1f1dSLionel Sambuc	strongarm | thumb | xscale)
342*0a6a1f1dSLionel Sambuc		basic_machine=arm-unknown
343*0a6a1f1dSLionel Sambuc		;;
344*0a6a1f1dSLionel Sambuc	xgate)
345*0a6a1f1dSLionel Sambuc		basic_machine=$basic_machine-unknown
346*0a6a1f1dSLionel Sambuc		os=-none
347*0a6a1f1dSLionel Sambuc		;;
348*0a6a1f1dSLionel Sambuc	xscaleeb)
349*0a6a1f1dSLionel Sambuc		basic_machine=armeb-unknown
350*0a6a1f1dSLionel Sambuc		;;
351*0a6a1f1dSLionel Sambuc
352*0a6a1f1dSLionel Sambuc	xscaleel)
353*0a6a1f1dSLionel Sambuc		basic_machine=armel-unknown
354*0a6a1f1dSLionel Sambuc		;;
355*0a6a1f1dSLionel Sambuc
356357f1050SThomas Veerman	# We use `pc' rather than `unknown'
357357f1050SThomas Veerman	# because (1) that's what they normally are, and
358357f1050SThomas Veerman	# (2) the word "unknown" tends to confuse beginning users.
359357f1050SThomas Veerman	i*86 | x86_64)
360357f1050SThomas Veerman	  basic_machine=$basic_machine-pc
361357f1050SThomas Veerman	  ;;
362357f1050SThomas Veerman	# Object if more than one company name word.
363357f1050SThomas Veerman	*-*-*)
364357f1050SThomas Veerman		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
365357f1050SThomas Veerman		exit 1
366357f1050SThomas Veerman		;;
367357f1050SThomas Veerman	# Recognize the basic CPU types with company name.
368357f1050SThomas Veerman	580-* \
369357f1050SThomas Veerman	| a29k-* \
370*0a6a1f1dSLionel Sambuc	| aarch64-* | aarch64_be-* \
371357f1050SThomas Veerman	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
372357f1050SThomas Veerman	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
373357f1050SThomas Veerman	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
374357f1050SThomas Veerman	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
37584d9c625SLionel Sambuc	| avr-* | avr32-* \
376*0a6a1f1dSLionel Sambuc	| be32-* | be64-* \
377357f1050SThomas Veerman	| bfin-* | bs2000-* \
378*0a6a1f1dSLionel Sambuc	| c[123]* | c30-* | [cjt]90-* | c4x-* \
379357f1050SThomas Veerman	| clipper-* | craynv-* | cydra-* \
380357f1050SThomas Veerman	| d10v-* | d30v-* | dlx-* \
381357f1050SThomas Veerman	| elxsi-* \
38284d9c625SLionel Sambuc	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
383357f1050SThomas Veerman	| h8300-* | h8500-* \
384357f1050SThomas Veerman	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
385*0a6a1f1dSLionel Sambuc	| hexagon-* \
386357f1050SThomas Veerman	| i*86-* | i860-* | i960-* | ia64-* \
387357f1050SThomas Veerman	| ip2k-* | iq2000-* \
388*0a6a1f1dSLionel Sambuc	| le32-* | le64-* \
38984d9c625SLionel Sambuc	| lm32-* \
39084d9c625SLionel Sambuc	| m32c-* | m32r-* | m32rle-* \
391357f1050SThomas Veerman	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
392*0a6a1f1dSLionel Sambuc	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
393357f1050SThomas Veerman	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
394357f1050SThomas Veerman	| mips16-* \
395357f1050SThomas Veerman	| mips64-* | mips64el-* \
39684d9c625SLionel Sambuc	| mips64octeon-* | mips64octeonel-* \
397357f1050SThomas Veerman	| mips64orion-* | mips64orionel-* \
39884d9c625SLionel Sambuc	| mips64r5900-* | mips64r5900el-* \
39984d9c625SLionel Sambuc	| mips64vr-* | mips64vrel-* \
400357f1050SThomas Veerman	| mips64vr4100-* | mips64vr4100el-* \
401357f1050SThomas Veerman	| mips64vr4300-* | mips64vr4300el-* \
402357f1050SThomas Veerman	| mips64vr5000-* | mips64vr5000el-* \
403357f1050SThomas Veerman	| mips64vr5900-* | mips64vr5900el-* \
404357f1050SThomas Veerman	| mipsisa32-* | mipsisa32el-* \
405357f1050SThomas Veerman	| mipsisa32r2-* | mipsisa32r2el-* \
406357f1050SThomas Veerman	| mipsisa64-* | mipsisa64el-* \
407357f1050SThomas Veerman	| mipsisa64r2-* | mipsisa64r2el-* \
408357f1050SThomas Veerman	| mipsisa64sb1-* | mipsisa64sb1el-* \
409357f1050SThomas Veerman	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
410357f1050SThomas Veerman	| mipstx39-* | mipstx39el-* \
411357f1050SThomas Veerman	| mmix-* \
41284d9c625SLionel Sambuc	| mt-* \
413357f1050SThomas Veerman	| msp430-* \
414*0a6a1f1dSLionel Sambuc	| nds32-* | nds32le-* | nds32be-* \
41584d9c625SLionel Sambuc	| nios-* | nios2-* \
416357f1050SThomas Veerman	| none-* | np1-* | ns16k-* | ns32k-* \
417*0a6a1f1dSLionel Sambuc	| open8-* \
418357f1050SThomas Veerman	| orion-* \
419357f1050SThomas Veerman	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
420*0a6a1f1dSLionel Sambuc	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
421357f1050SThomas Veerman	| pyramid-* \
422*0a6a1f1dSLionel Sambuc	| rl78-* | romp-* | rs6000-* | rx-* \
42384d9c625SLionel Sambuc	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
424357f1050SThomas Veerman	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
42584d9c625SLionel Sambuc	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
426357f1050SThomas Veerman	| sparclite-* \
427*0a6a1f1dSLionel Sambuc	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
428*0a6a1f1dSLionel Sambuc	| tahoe-* \
429*0a6a1f1dSLionel Sambuc	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
430*0a6a1f1dSLionel Sambuc	| tile*-* \
431357f1050SThomas Veerman	| tron-* \
432*0a6a1f1dSLionel Sambuc	| ubicom32-* \
433*0a6a1f1dSLionel Sambuc	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
434*0a6a1f1dSLionel Sambuc	| vax-* \
435357f1050SThomas Veerman	| we32k-* \
436*0a6a1f1dSLionel Sambuc	| x86-* | x86_64-* | xc16x-* | xps100-* \
43784d9c625SLionel Sambuc	| xstormy16-* | xtensa*-* \
438357f1050SThomas Veerman	| ymp-* \
43984d9c625SLionel Sambuc	| z8k-* | z80-*)
440357f1050SThomas Veerman		;;
44184d9c625SLionel Sambuc	# Recognize the basic CPU types without company name, with glob match.
44284d9c625SLionel Sambuc	xtensa*)
44384d9c625SLionel Sambuc		basic_machine=$basic_machine-unknown
444357f1050SThomas Veerman		;;
445357f1050SThomas Veerman	# Recognize the various machine names and aliases which stand
446357f1050SThomas Veerman	# for a CPU type and a company and sometimes even an OS.
447357f1050SThomas Veerman	386bsd)
448357f1050SThomas Veerman		basic_machine=i386-unknown
449357f1050SThomas Veerman		os=-bsd
450357f1050SThomas Veerman		;;
451357f1050SThomas Veerman	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
452357f1050SThomas Veerman		basic_machine=m68000-att
453357f1050SThomas Veerman		;;
454357f1050SThomas Veerman	3b*)
455357f1050SThomas Veerman		basic_machine=we32k-att
456357f1050SThomas Veerman		;;
457357f1050SThomas Veerman	a29khif)
458357f1050SThomas Veerman		basic_machine=a29k-amd
459357f1050SThomas Veerman		os=-udi
460357f1050SThomas Veerman		;;
461357f1050SThomas Veerman	abacus)
462357f1050SThomas Veerman		basic_machine=abacus-unknown
463357f1050SThomas Veerman		;;
464357f1050SThomas Veerman	adobe68k)
465357f1050SThomas Veerman		basic_machine=m68010-adobe
466357f1050SThomas Veerman		os=-scout
467357f1050SThomas Veerman		;;
468357f1050SThomas Veerman	alliant | fx80)
469357f1050SThomas Veerman		basic_machine=fx80-alliant
470357f1050SThomas Veerman		;;
471357f1050SThomas Veerman	altos | altos3068)
472357f1050SThomas Veerman		basic_machine=m68k-altos
473357f1050SThomas Veerman		;;
474357f1050SThomas Veerman	am29k)
475357f1050SThomas Veerman		basic_machine=a29k-none
476357f1050SThomas Veerman		os=-bsd
477357f1050SThomas Veerman		;;
478357f1050SThomas Veerman	amd64)
479357f1050SThomas Veerman		basic_machine=x86_64-pc
480357f1050SThomas Veerman		;;
481357f1050SThomas Veerman	amd64-*)
482357f1050SThomas Veerman		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
483357f1050SThomas Veerman		;;
484357f1050SThomas Veerman	amdahl)
485357f1050SThomas Veerman		basic_machine=580-amdahl
486357f1050SThomas Veerman		os=-sysv
487357f1050SThomas Veerman		;;
488357f1050SThomas Veerman	amiga | amiga-*)
489357f1050SThomas Veerman		basic_machine=m68k-unknown
490357f1050SThomas Veerman		;;
491357f1050SThomas Veerman	amigaos | amigados)
492357f1050SThomas Veerman		basic_machine=m68k-unknown
493357f1050SThomas Veerman		os=-amigaos
494357f1050SThomas Veerman		;;
495357f1050SThomas Veerman	amigaunix | amix)
496357f1050SThomas Veerman		basic_machine=m68k-unknown
497357f1050SThomas Veerman		os=-sysv4
498357f1050SThomas Veerman		;;
499357f1050SThomas Veerman	apollo68)
500357f1050SThomas Veerman		basic_machine=m68k-apollo
501357f1050SThomas Veerman		os=-sysv
502357f1050SThomas Veerman		;;
503357f1050SThomas Veerman	apollo68bsd)
504357f1050SThomas Veerman		basic_machine=m68k-apollo
505357f1050SThomas Veerman		os=-bsd
506357f1050SThomas Veerman		;;
50784d9c625SLionel Sambuc	aros)
50884d9c625SLionel Sambuc		basic_machine=i386-pc
50984d9c625SLionel Sambuc		os=-aros
51084d9c625SLionel Sambuc		;;
511357f1050SThomas Veerman	aux)
512357f1050SThomas Veerman		basic_machine=m68k-apple
513357f1050SThomas Veerman		os=-aux
514357f1050SThomas Veerman		;;
515357f1050SThomas Veerman	balance)
516357f1050SThomas Veerman		basic_machine=ns32k-sequent
517357f1050SThomas Veerman		os=-dynix
518357f1050SThomas Veerman		;;
51984d9c625SLionel Sambuc	blackfin)
52084d9c625SLionel Sambuc		basic_machine=bfin-unknown
52184d9c625SLionel Sambuc		os=-linux
52284d9c625SLionel Sambuc		;;
52384d9c625SLionel Sambuc	blackfin-*)
52484d9c625SLionel Sambuc		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
52584d9c625SLionel Sambuc		os=-linux
52684d9c625SLionel Sambuc		;;
52784d9c625SLionel Sambuc	bluegene*)
52884d9c625SLionel Sambuc		basic_machine=powerpc-ibm
52984d9c625SLionel Sambuc		os=-cnk
53084d9c625SLionel Sambuc		;;
531*0a6a1f1dSLionel Sambuc	c54x-*)
532*0a6a1f1dSLionel Sambuc		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
533*0a6a1f1dSLionel Sambuc		;;
534*0a6a1f1dSLionel Sambuc	c55x-*)
535*0a6a1f1dSLionel Sambuc		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
536*0a6a1f1dSLionel Sambuc		;;
537*0a6a1f1dSLionel Sambuc	c6x-*)
538*0a6a1f1dSLionel Sambuc		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
539*0a6a1f1dSLionel Sambuc		;;
540357f1050SThomas Veerman	c90)
541357f1050SThomas Veerman		basic_machine=c90-cray
542357f1050SThomas Veerman		os=-unicos
543357f1050SThomas Veerman		;;
54484d9c625SLionel Sambuc	cegcc)
54584d9c625SLionel Sambuc		basic_machine=arm-unknown
54684d9c625SLionel Sambuc		os=-cegcc
54784d9c625SLionel Sambuc		;;
548357f1050SThomas Veerman	convex-c1)
549357f1050SThomas Veerman		basic_machine=c1-convex
550357f1050SThomas Veerman		os=-bsd
551357f1050SThomas Veerman		;;
552357f1050SThomas Veerman	convex-c2)
553357f1050SThomas Veerman		basic_machine=c2-convex
554357f1050SThomas Veerman		os=-bsd
555357f1050SThomas Veerman		;;
556357f1050SThomas Veerman	convex-c32)
557357f1050SThomas Veerman		basic_machine=c32-convex
558357f1050SThomas Veerman		os=-bsd
559357f1050SThomas Veerman		;;
560357f1050SThomas Veerman	convex-c34)
561357f1050SThomas Veerman		basic_machine=c34-convex
562357f1050SThomas Veerman		os=-bsd
563357f1050SThomas Veerman		;;
564357f1050SThomas Veerman	convex-c38)
565357f1050SThomas Veerman		basic_machine=c38-convex
566357f1050SThomas Veerman		os=-bsd
567357f1050SThomas Veerman		;;
568357f1050SThomas Veerman	cray | j90)
569357f1050SThomas Veerman		basic_machine=j90-cray
570357f1050SThomas Veerman		os=-unicos
571357f1050SThomas Veerman		;;
572357f1050SThomas Veerman	craynv)
573357f1050SThomas Veerman		basic_machine=craynv-cray
574357f1050SThomas Veerman		os=-unicosmp
575357f1050SThomas Veerman		;;
576*0a6a1f1dSLionel Sambuc	cr16 | cr16-*)
57784d9c625SLionel Sambuc		basic_machine=cr16-unknown
578357f1050SThomas Veerman		os=-elf
579357f1050SThomas Veerman		;;
580357f1050SThomas Veerman	crds | unos)
581357f1050SThomas Veerman		basic_machine=m68k-crds
582357f1050SThomas Veerman		;;
583357f1050SThomas Veerman	crisv32 | crisv32-* | etraxfs*)
584357f1050SThomas Veerman		basic_machine=crisv32-axis
585357f1050SThomas Veerman		;;
586357f1050SThomas Veerman	cris | cris-* | etrax*)
587357f1050SThomas Veerman		basic_machine=cris-axis
588357f1050SThomas Veerman		;;
589357f1050SThomas Veerman	crx)
590357f1050SThomas Veerman		basic_machine=crx-unknown
591357f1050SThomas Veerman		os=-elf
592357f1050SThomas Veerman		;;
593357f1050SThomas Veerman	da30 | da30-*)
594357f1050SThomas Veerman		basic_machine=m68k-da30
595357f1050SThomas Veerman		;;
596357f1050SThomas Veerman	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
597357f1050SThomas Veerman		basic_machine=mips-dec
598357f1050SThomas Veerman		;;
599357f1050SThomas Veerman	decsystem10* | dec10*)
600357f1050SThomas Veerman		basic_machine=pdp10-dec
601357f1050SThomas Veerman		os=-tops10
602357f1050SThomas Veerman		;;
603357f1050SThomas Veerman	decsystem20* | dec20*)
604357f1050SThomas Veerman		basic_machine=pdp10-dec
605357f1050SThomas Veerman		os=-tops20
606357f1050SThomas Veerman		;;
607357f1050SThomas Veerman	delta | 3300 | motorola-3300 | motorola-delta \
608357f1050SThomas Veerman	      | 3300-motorola | delta-motorola)
609357f1050SThomas Veerman		basic_machine=m68k-motorola
610357f1050SThomas Veerman		;;
611357f1050SThomas Veerman	delta88)
612357f1050SThomas Veerman		basic_machine=m88k-motorola
613357f1050SThomas Veerman		os=-sysv3
614357f1050SThomas Veerman		;;
61584d9c625SLionel Sambuc	dicos)
61684d9c625SLionel Sambuc		basic_machine=i686-pc
61784d9c625SLionel Sambuc		os=-dicos
61884d9c625SLionel Sambuc		;;
619357f1050SThomas Veerman	djgpp)
620357f1050SThomas Veerman		basic_machine=i586-pc
621357f1050SThomas Veerman		os=-msdosdjgpp
622357f1050SThomas Veerman		;;
623357f1050SThomas Veerman	dpx20 | dpx20-*)
624357f1050SThomas Veerman		basic_machine=rs6000-bull
625357f1050SThomas Veerman		os=-bosx
626357f1050SThomas Veerman		;;
627357f1050SThomas Veerman	dpx2* | dpx2*-bull)
628357f1050SThomas Veerman		basic_machine=m68k-bull
629357f1050SThomas Veerman		os=-sysv3
630357f1050SThomas Veerman		;;
631357f1050SThomas Veerman	ebmon29k)
632357f1050SThomas Veerman		basic_machine=a29k-amd
633357f1050SThomas Veerman		os=-ebmon
634357f1050SThomas Veerman		;;
635357f1050SThomas Veerman	elxsi)
636357f1050SThomas Veerman		basic_machine=elxsi-elxsi
637357f1050SThomas Veerman		os=-bsd
638357f1050SThomas Veerman		;;
639357f1050SThomas Veerman	encore | umax | mmax)
640357f1050SThomas Veerman		basic_machine=ns32k-encore
641357f1050SThomas Veerman		;;
642357f1050SThomas Veerman	es1800 | OSE68k | ose68k | ose | OSE)
643357f1050SThomas Veerman		basic_machine=m68k-ericsson
644357f1050SThomas Veerman		os=-ose
645357f1050SThomas Veerman		;;
646357f1050SThomas Veerman	fx2800)
647357f1050SThomas Veerman		basic_machine=i860-alliant
648357f1050SThomas Veerman		;;
649357f1050SThomas Veerman	genix)
650357f1050SThomas Veerman		basic_machine=ns32k-ns
651357f1050SThomas Veerman		;;
652357f1050SThomas Veerman	gmicro)
653357f1050SThomas Veerman		basic_machine=tron-gmicro
654357f1050SThomas Veerman		os=-sysv
655357f1050SThomas Veerman		;;
656357f1050SThomas Veerman	go32)
657357f1050SThomas Veerman		basic_machine=i386-pc
658357f1050SThomas Veerman		os=-go32
659357f1050SThomas Veerman		;;
660357f1050SThomas Veerman	h3050r* | hiux*)
661357f1050SThomas Veerman		basic_machine=hppa1.1-hitachi
662357f1050SThomas Veerman		os=-hiuxwe2
663357f1050SThomas Veerman		;;
664357f1050SThomas Veerman	h8300hms)
665357f1050SThomas Veerman		basic_machine=h8300-hitachi
666357f1050SThomas Veerman		os=-hms
667357f1050SThomas Veerman		;;
668357f1050SThomas Veerman	h8300xray)
669357f1050SThomas Veerman		basic_machine=h8300-hitachi
670357f1050SThomas Veerman		os=-xray
671357f1050SThomas Veerman		;;
672357f1050SThomas Veerman	h8500hms)
673357f1050SThomas Veerman		basic_machine=h8500-hitachi
674357f1050SThomas Veerman		os=-hms
675357f1050SThomas Veerman		;;
676357f1050SThomas Veerman	harris)
677357f1050SThomas Veerman		basic_machine=m88k-harris
678357f1050SThomas Veerman		os=-sysv3
679357f1050SThomas Veerman		;;
680357f1050SThomas Veerman	hp300-*)
681357f1050SThomas Veerman		basic_machine=m68k-hp
682357f1050SThomas Veerman		;;
683357f1050SThomas Veerman	hp300bsd)
684357f1050SThomas Veerman		basic_machine=m68k-hp
685357f1050SThomas Veerman		os=-bsd
686357f1050SThomas Veerman		;;
687357f1050SThomas Veerman	hp300hpux)
688357f1050SThomas Veerman		basic_machine=m68k-hp
689357f1050SThomas Veerman		os=-hpux
690357f1050SThomas Veerman		;;
691357f1050SThomas Veerman	hp3k9[0-9][0-9] | hp9[0-9][0-9])
692357f1050SThomas Veerman		basic_machine=hppa1.0-hp
693357f1050SThomas Veerman		;;
694357f1050SThomas Veerman	hp9k2[0-9][0-9] | hp9k31[0-9])
695357f1050SThomas Veerman		basic_machine=m68000-hp
696357f1050SThomas Veerman		;;
697357f1050SThomas Veerman	hp9k3[2-9][0-9])
698357f1050SThomas Veerman		basic_machine=m68k-hp
699357f1050SThomas Veerman		;;
700357f1050SThomas Veerman	hp9k6[0-9][0-9] | hp6[0-9][0-9])
701357f1050SThomas Veerman		basic_machine=hppa1.0-hp
702357f1050SThomas Veerman		;;
703357f1050SThomas Veerman	hp9k7[0-79][0-9] | hp7[0-79][0-9])
704357f1050SThomas Veerman		basic_machine=hppa1.1-hp
705357f1050SThomas Veerman		;;
706357f1050SThomas Veerman	hp9k78[0-9] | hp78[0-9])
707357f1050SThomas Veerman		# FIXME: really hppa2.0-hp
708357f1050SThomas Veerman		basic_machine=hppa1.1-hp
709357f1050SThomas Veerman		;;
710357f1050SThomas Veerman	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
711357f1050SThomas Veerman		# FIXME: really hppa2.0-hp
712357f1050SThomas Veerman		basic_machine=hppa1.1-hp
713357f1050SThomas Veerman		;;
714357f1050SThomas Veerman	hp9k8[0-9][13679] | hp8[0-9][13679])
715357f1050SThomas Veerman		basic_machine=hppa1.1-hp
716357f1050SThomas Veerman		;;
717357f1050SThomas Veerman	hp9k8[0-9][0-9] | hp8[0-9][0-9])
718357f1050SThomas Veerman		basic_machine=hppa1.0-hp
719357f1050SThomas Veerman		;;
720357f1050SThomas Veerman	hppa-next)
721357f1050SThomas Veerman		os=-nextstep3
722357f1050SThomas Veerman		;;
723357f1050SThomas Veerman	hppaosf)
724357f1050SThomas Veerman		basic_machine=hppa1.1-hp
725357f1050SThomas Veerman		os=-osf
726357f1050SThomas Veerman		;;
727357f1050SThomas Veerman	hppro)
728357f1050SThomas Veerman		basic_machine=hppa1.1-hp
729357f1050SThomas Veerman		os=-proelf
730357f1050SThomas Veerman		;;
731357f1050SThomas Veerman	i370-ibm* | ibm*)
732357f1050SThomas Veerman		basic_machine=i370-ibm
733357f1050SThomas Veerman		;;
734357f1050SThomas Veerman	i*86v32)
735357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
736357f1050SThomas Veerman		os=-sysv32
737357f1050SThomas Veerman		;;
738357f1050SThomas Veerman	i*86v4*)
739357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
740357f1050SThomas Veerman		os=-sysv4
741357f1050SThomas Veerman		;;
742357f1050SThomas Veerman	i*86v)
743357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
744357f1050SThomas Veerman		os=-sysv
745357f1050SThomas Veerman		;;
746357f1050SThomas Veerman	i*86sol2)
747357f1050SThomas Veerman		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
748357f1050SThomas Veerman		os=-solaris2
749357f1050SThomas Veerman		;;
750357f1050SThomas Veerman	i386mach)
751357f1050SThomas Veerman		basic_machine=i386-mach
752357f1050SThomas Veerman		os=-mach
753357f1050SThomas Veerman		;;
754357f1050SThomas Veerman	i386-vsta | vsta)
755357f1050SThomas Veerman		basic_machine=i386-unknown
756357f1050SThomas Veerman		os=-vsta
757357f1050SThomas Veerman		;;
758357f1050SThomas Veerman	iris | iris4d)
759357f1050SThomas Veerman		basic_machine=mips-sgi
760357f1050SThomas Veerman		case $os in
761357f1050SThomas Veerman		    -irix*)
762357f1050SThomas Veerman			;;
763357f1050SThomas Veerman		    *)
764357f1050SThomas Veerman			os=-irix4
765357f1050SThomas Veerman			;;
766357f1050SThomas Veerman		esac
767357f1050SThomas Veerman		;;
768357f1050SThomas Veerman	isi68 | isi)
769357f1050SThomas Veerman		basic_machine=m68k-isi
770357f1050SThomas Veerman		os=-sysv
771357f1050SThomas Veerman		;;
77284d9c625SLionel Sambuc	m68knommu)
77384d9c625SLionel Sambuc		basic_machine=m68k-unknown
77484d9c625SLionel Sambuc		os=-linux
77584d9c625SLionel Sambuc		;;
77684d9c625SLionel Sambuc	m68knommu-*)
77784d9c625SLionel Sambuc		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
77884d9c625SLionel Sambuc		os=-linux
77984d9c625SLionel Sambuc		;;
780357f1050SThomas Veerman	m88k-omron*)
781357f1050SThomas Veerman		basic_machine=m88k-omron
782357f1050SThomas Veerman		;;
783357f1050SThomas Veerman	magnum | m3230)
784357f1050SThomas Veerman		basic_machine=mips-mips
785357f1050SThomas Veerman		os=-sysv
786357f1050SThomas Veerman		;;
787357f1050SThomas Veerman	merlin)
788357f1050SThomas Veerman		basic_machine=ns32k-utek
789357f1050SThomas Veerman		os=-sysv
790357f1050SThomas Veerman		;;
791*0a6a1f1dSLionel Sambuc	microblaze)
792*0a6a1f1dSLionel Sambuc		basic_machine=microblaze-xilinx
793*0a6a1f1dSLionel Sambuc		;;
794357f1050SThomas Veerman	mingw32)
795357f1050SThomas Veerman		basic_machine=i386-pc
796357f1050SThomas Veerman		os=-mingw32
797357f1050SThomas Veerman		;;
79884d9c625SLionel Sambuc	mingw32ce)
79984d9c625SLionel Sambuc		basic_machine=arm-unknown
80084d9c625SLionel Sambuc		os=-mingw32ce
80184d9c625SLionel Sambuc		;;
802357f1050SThomas Veerman	miniframe)
803357f1050SThomas Veerman		basic_machine=m68000-convergent
804357f1050SThomas Veerman		;;
805357f1050SThomas Veerman	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
806357f1050SThomas Veerman		basic_machine=m68k-atari
807357f1050SThomas Veerman		os=-mint
808357f1050SThomas Veerman		;;
809357f1050SThomas Veerman	mips3*-*)
810357f1050SThomas Veerman		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
811357f1050SThomas Veerman		;;
812357f1050SThomas Veerman	mips3*)
813357f1050SThomas Veerman		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
814357f1050SThomas Veerman		;;
815357f1050SThomas Veerman	monitor)
816357f1050SThomas Veerman		basic_machine=m68k-rom68k
817357f1050SThomas Veerman		os=-coff
818357f1050SThomas Veerman		;;
819357f1050SThomas Veerman	morphos)
820357f1050SThomas Veerman		basic_machine=powerpc-unknown
821357f1050SThomas Veerman		os=-morphos
822357f1050SThomas Veerman		;;
823357f1050SThomas Veerman	msdos)
824357f1050SThomas Veerman		basic_machine=i386-pc
825357f1050SThomas Veerman		os=-msdos
826357f1050SThomas Veerman		;;
82784d9c625SLionel Sambuc	ms1-*)
82884d9c625SLionel Sambuc		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
82984d9c625SLionel Sambuc		;;
830*0a6a1f1dSLionel Sambuc	msys)
831*0a6a1f1dSLionel Sambuc		basic_machine=i386-pc
832*0a6a1f1dSLionel Sambuc		os=-msys
833*0a6a1f1dSLionel Sambuc		;;
834357f1050SThomas Veerman	mvs)
835357f1050SThomas Veerman		basic_machine=i370-ibm
836357f1050SThomas Veerman		os=-mvs
837357f1050SThomas Veerman		;;
838*0a6a1f1dSLionel Sambuc	nacl)
839*0a6a1f1dSLionel Sambuc		basic_machine=le32-unknown
840*0a6a1f1dSLionel Sambuc		os=-nacl
841*0a6a1f1dSLionel Sambuc		;;
842357f1050SThomas Veerman	ncr3000)
843357f1050SThomas Veerman		basic_machine=i486-ncr
844357f1050SThomas Veerman		os=-sysv4
845357f1050SThomas Veerman		;;
846357f1050SThomas Veerman	netbsd386)
847357f1050SThomas Veerman		basic_machine=i386-unknown
848357f1050SThomas Veerman		os=-netbsd
849357f1050SThomas Veerman		;;
850357f1050SThomas Veerman	netwinder)
851357f1050SThomas Veerman		basic_machine=armv4l-rebel
852357f1050SThomas Veerman		os=-linux
853357f1050SThomas Veerman		;;
854357f1050SThomas Veerman	news | news700 | news800 | news900)
855357f1050SThomas Veerman		basic_machine=m68k-sony
856357f1050SThomas Veerman		os=-newsos
857357f1050SThomas Veerman		;;
858357f1050SThomas Veerman	news1000)
859357f1050SThomas Veerman		basic_machine=m68030-sony
860357f1050SThomas Veerman		os=-newsos
861357f1050SThomas Veerman		;;
862357f1050SThomas Veerman	news-3600 | risc-news)
863357f1050SThomas Veerman		basic_machine=mips-sony
864357f1050SThomas Veerman		os=-newsos
865357f1050SThomas Veerman		;;
866357f1050SThomas Veerman	necv70)
867357f1050SThomas Veerman		basic_machine=v70-nec
868357f1050SThomas Veerman		os=-sysv
869357f1050SThomas Veerman		;;
870357f1050SThomas Veerman	next | m*-next )
871357f1050SThomas Veerman		basic_machine=m68k-next
872357f1050SThomas Veerman		case $os in
873357f1050SThomas Veerman		    -nextstep* )
874357f1050SThomas Veerman			;;
875357f1050SThomas Veerman		    -ns2*)
876357f1050SThomas Veerman		      os=-nextstep2
877357f1050SThomas Veerman			;;
878357f1050SThomas Veerman		    *)
879357f1050SThomas Veerman		      os=-nextstep3
880357f1050SThomas Veerman			;;
881357f1050SThomas Veerman		esac
882357f1050SThomas Veerman		;;
883357f1050SThomas Veerman	nh3000)
884357f1050SThomas Veerman		basic_machine=m68k-harris
885357f1050SThomas Veerman		os=-cxux
886357f1050SThomas Veerman		;;
887357f1050SThomas Veerman	nh[45]000)
888357f1050SThomas Veerman		basic_machine=m88k-harris
889357f1050SThomas Veerman		os=-cxux
890357f1050SThomas Veerman		;;
891357f1050SThomas Veerman	nindy960)
892357f1050SThomas Veerman		basic_machine=i960-intel
893357f1050SThomas Veerman		os=-nindy
894357f1050SThomas Veerman		;;
895357f1050SThomas Veerman	mon960)
896357f1050SThomas Veerman		basic_machine=i960-intel
897357f1050SThomas Veerman		os=-mon960
898357f1050SThomas Veerman		;;
899357f1050SThomas Veerman	nonstopux)
900357f1050SThomas Veerman		basic_machine=mips-compaq
901357f1050SThomas Veerman		os=-nonstopux
902357f1050SThomas Veerman		;;
903357f1050SThomas Veerman	np1)
904357f1050SThomas Veerman		basic_machine=np1-gould
905357f1050SThomas Veerman		;;
906*0a6a1f1dSLionel Sambuc	neo-tandem)
907*0a6a1f1dSLionel Sambuc		basic_machine=neo-tandem
908*0a6a1f1dSLionel Sambuc		;;
909*0a6a1f1dSLionel Sambuc	nse-tandem)
910*0a6a1f1dSLionel Sambuc		basic_machine=nse-tandem
911*0a6a1f1dSLionel Sambuc		;;
912357f1050SThomas Veerman	nsr-tandem)
913357f1050SThomas Veerman		basic_machine=nsr-tandem
914357f1050SThomas Veerman		;;
915357f1050SThomas Veerman	op50n-* | op60c-*)
916357f1050SThomas Veerman		basic_machine=hppa1.1-oki
917357f1050SThomas Veerman		os=-proelf
918357f1050SThomas Veerman		;;
919357f1050SThomas Veerman	openrisc | openrisc-*)
920357f1050SThomas Veerman		basic_machine=or32-unknown
921357f1050SThomas Veerman		;;
922357f1050SThomas Veerman	os400)
923357f1050SThomas Veerman		basic_machine=powerpc-ibm
924357f1050SThomas Veerman		os=-os400
925357f1050SThomas Veerman		;;
926357f1050SThomas Veerman	OSE68000 | ose68000)
927357f1050SThomas Veerman		basic_machine=m68000-ericsson
928357f1050SThomas Veerman		os=-ose
929357f1050SThomas Veerman		;;
930357f1050SThomas Veerman	os68k)
931357f1050SThomas Veerman		basic_machine=m68k-none
932357f1050SThomas Veerman		os=-os68k
933357f1050SThomas Veerman		;;
934357f1050SThomas Veerman	pa-hitachi)
935357f1050SThomas Veerman		basic_machine=hppa1.1-hitachi
936357f1050SThomas Veerman		os=-hiuxwe2
937357f1050SThomas Veerman		;;
938357f1050SThomas Veerman	paragon)
939357f1050SThomas Veerman		basic_machine=i860-intel
940357f1050SThomas Veerman		os=-osf
941357f1050SThomas Veerman		;;
94284d9c625SLionel Sambuc	parisc)
94384d9c625SLionel Sambuc		basic_machine=hppa-unknown
94484d9c625SLionel Sambuc		os=-linux
94584d9c625SLionel Sambuc		;;
94684d9c625SLionel Sambuc	parisc-*)
94784d9c625SLionel Sambuc		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
94884d9c625SLionel Sambuc		os=-linux
94984d9c625SLionel Sambuc		;;
950357f1050SThomas Veerman	pbd)
951357f1050SThomas Veerman		basic_machine=sparc-tti
952357f1050SThomas Veerman		;;
953357f1050SThomas Veerman	pbb)
954357f1050SThomas Veerman		basic_machine=m68k-tti
955357f1050SThomas Veerman		;;
956357f1050SThomas Veerman	pc532 | pc532-*)
957357f1050SThomas Veerman		basic_machine=ns32k-pc532
958357f1050SThomas Veerman		;;
95984d9c625SLionel Sambuc	pc98)
96084d9c625SLionel Sambuc		basic_machine=i386-pc
96184d9c625SLionel Sambuc		;;
96284d9c625SLionel Sambuc	pc98-*)
96384d9c625SLionel Sambuc		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
96484d9c625SLionel Sambuc		;;
965357f1050SThomas Veerman	pentium | p5 | k5 | k6 | nexgen | viac3)
966357f1050SThomas Veerman		basic_machine=i586-pc
967357f1050SThomas Veerman		;;
968357f1050SThomas Veerman	pentiumpro | p6 | 6x86 | athlon | athlon_*)
969357f1050SThomas Veerman		basic_machine=i686-pc
970357f1050SThomas Veerman		;;
971357f1050SThomas Veerman	pentiumii | pentium2 | pentiumiii | pentium3)
972357f1050SThomas Veerman		basic_machine=i686-pc
973357f1050SThomas Veerman		;;
974357f1050SThomas Veerman	pentium4)
975357f1050SThomas Veerman		basic_machine=i786-pc
976357f1050SThomas Veerman		;;
977357f1050SThomas Veerman	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
978357f1050SThomas Veerman		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
979357f1050SThomas Veerman		;;
980357f1050SThomas Veerman	pentiumpro-* | p6-* | 6x86-* | athlon-*)
981357f1050SThomas Veerman		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
982357f1050SThomas Veerman		;;
983357f1050SThomas Veerman	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
984357f1050SThomas Veerman		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
985357f1050SThomas Veerman		;;
986357f1050SThomas Veerman	pentium4-*)
987357f1050SThomas Veerman		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
988357f1050SThomas Veerman		;;
989357f1050SThomas Veerman	pn)
990357f1050SThomas Veerman		basic_machine=pn-gould
991357f1050SThomas Veerman		;;
992357f1050SThomas Veerman	power)	basic_machine=power-ibm
993357f1050SThomas Veerman		;;
994*0a6a1f1dSLionel Sambuc	ppc | ppcbe)	basic_machine=powerpc-unknown
995357f1050SThomas Veerman		;;
996*0a6a1f1dSLionel Sambuc	ppc-* | ppcbe-*)
997*0a6a1f1dSLionel Sambuc		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
998357f1050SThomas Veerman		;;
999357f1050SThomas Veerman	ppcle | powerpclittle | ppc-le | powerpc-little)
1000357f1050SThomas Veerman		basic_machine=powerpcle-unknown
1001357f1050SThomas Veerman		;;
1002357f1050SThomas Veerman	ppcle-* | powerpclittle-*)
1003357f1050SThomas Veerman		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1004357f1050SThomas Veerman		;;
1005357f1050SThomas Veerman	ppc64)	basic_machine=powerpc64-unknown
1006357f1050SThomas Veerman		;;
1007357f1050SThomas Veerman	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1008357f1050SThomas Veerman		;;
1009357f1050SThomas Veerman	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1010357f1050SThomas Veerman		basic_machine=powerpc64le-unknown
1011357f1050SThomas Veerman		;;
1012357f1050SThomas Veerman	ppc64le-* | powerpc64little-*)
1013357f1050SThomas Veerman		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1014357f1050SThomas Veerman		;;
1015357f1050SThomas Veerman	ps2)
1016357f1050SThomas Veerman		basic_machine=i386-ibm
1017357f1050SThomas Veerman		;;
1018357f1050SThomas Veerman	pw32)
1019357f1050SThomas Veerman		basic_machine=i586-unknown
1020357f1050SThomas Veerman		os=-pw32
1021357f1050SThomas Veerman		;;
102284d9c625SLionel Sambuc	rdos)
102384d9c625SLionel Sambuc		basic_machine=i386-pc
102484d9c625SLionel Sambuc		os=-rdos
102584d9c625SLionel Sambuc		;;
1026357f1050SThomas Veerman	rom68k)
1027357f1050SThomas Veerman		basic_machine=m68k-rom68k
1028357f1050SThomas Veerman		os=-coff
1029357f1050SThomas Veerman		;;
1030357f1050SThomas Veerman	rm[46]00)
1031357f1050SThomas Veerman		basic_machine=mips-siemens
1032357f1050SThomas Veerman		;;
1033357f1050SThomas Veerman	rtpc | rtpc-*)
1034357f1050SThomas Veerman		basic_machine=romp-ibm
1035357f1050SThomas Veerman		;;
1036357f1050SThomas Veerman	s390 | s390-*)
1037357f1050SThomas Veerman		basic_machine=s390-ibm
1038357f1050SThomas Veerman		;;
1039357f1050SThomas Veerman	s390x | s390x-*)
1040357f1050SThomas Veerman		basic_machine=s390x-ibm
1041357f1050SThomas Veerman		;;
1042357f1050SThomas Veerman	sa29200)
1043357f1050SThomas Veerman		basic_machine=a29k-amd
1044357f1050SThomas Veerman		os=-udi
1045357f1050SThomas Veerman		;;
1046357f1050SThomas Veerman	sb1)
1047357f1050SThomas Veerman		basic_machine=mipsisa64sb1-unknown
1048357f1050SThomas Veerman		;;
1049357f1050SThomas Veerman	sb1el)
1050357f1050SThomas Veerman		basic_machine=mipsisa64sb1el-unknown
1051357f1050SThomas Veerman		;;
105284d9c625SLionel Sambuc	sde)
105384d9c625SLionel Sambuc		basic_machine=mipsisa32-sde
105484d9c625SLionel Sambuc		os=-elf
105584d9c625SLionel Sambuc		;;
1056357f1050SThomas Veerman	sei)
1057357f1050SThomas Veerman		basic_machine=mips-sei
1058357f1050SThomas Veerman		os=-seiux
1059357f1050SThomas Veerman		;;
1060357f1050SThomas Veerman	sequent)
1061357f1050SThomas Veerman		basic_machine=i386-sequent
1062357f1050SThomas Veerman		;;
1063357f1050SThomas Veerman	sh)
1064357f1050SThomas Veerman		basic_machine=sh-hitachi
1065357f1050SThomas Veerman		os=-hms
1066357f1050SThomas Veerman		;;
106784d9c625SLionel Sambuc	sh5el)
106884d9c625SLionel Sambuc		basic_machine=sh5le-unknown
106984d9c625SLionel Sambuc		;;
1070357f1050SThomas Veerman	sh64)
1071357f1050SThomas Veerman		basic_machine=sh64-unknown
1072357f1050SThomas Veerman		;;
1073357f1050SThomas Veerman	sparclite-wrs | simso-wrs)
1074357f1050SThomas Veerman		basic_machine=sparclite-wrs
1075357f1050SThomas Veerman		os=-vxworks
1076357f1050SThomas Veerman		;;
1077357f1050SThomas Veerman	sps7)
1078357f1050SThomas Veerman		basic_machine=m68k-bull
1079357f1050SThomas Veerman		os=-sysv2
1080357f1050SThomas Veerman		;;
1081357f1050SThomas Veerman	spur)
1082357f1050SThomas Veerman		basic_machine=spur-unknown
1083357f1050SThomas Veerman		;;
1084357f1050SThomas Veerman	st2000)
1085357f1050SThomas Veerman		basic_machine=m68k-tandem
1086357f1050SThomas Veerman		;;
1087357f1050SThomas Veerman	stratus)
1088357f1050SThomas Veerman		basic_machine=i860-stratus
1089357f1050SThomas Veerman		os=-sysv4
1090357f1050SThomas Veerman		;;
1091*0a6a1f1dSLionel Sambuc	strongarm-* | thumb-*)
1092*0a6a1f1dSLionel Sambuc		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1093*0a6a1f1dSLionel Sambuc		;;
1094357f1050SThomas Veerman	sun2)
1095357f1050SThomas Veerman		basic_machine=m68000-sun
1096357f1050SThomas Veerman		;;
1097357f1050SThomas Veerman	sun2os3)
1098357f1050SThomas Veerman		basic_machine=m68000-sun
1099357f1050SThomas Veerman		os=-sunos3
1100357f1050SThomas Veerman		;;
1101357f1050SThomas Veerman	sun2os4)
1102357f1050SThomas Veerman		basic_machine=m68000-sun
1103357f1050SThomas Veerman		os=-sunos4
1104357f1050SThomas Veerman		;;
1105357f1050SThomas Veerman	sun3os3)
1106357f1050SThomas Veerman		basic_machine=m68k-sun
1107357f1050SThomas Veerman		os=-sunos3
1108357f1050SThomas Veerman		;;
1109357f1050SThomas Veerman	sun3os4)
1110357f1050SThomas Veerman		basic_machine=m68k-sun
1111357f1050SThomas Veerman		os=-sunos4
1112357f1050SThomas Veerman		;;
1113357f1050SThomas Veerman	sun4os3)
1114357f1050SThomas Veerman		basic_machine=sparc-sun
1115357f1050SThomas Veerman		os=-sunos3
1116357f1050SThomas Veerman		;;
1117357f1050SThomas Veerman	sun4os4)
1118357f1050SThomas Veerman		basic_machine=sparc-sun
1119357f1050SThomas Veerman		os=-sunos4
1120357f1050SThomas Veerman		;;
1121357f1050SThomas Veerman	sun4sol2)
1122357f1050SThomas Veerman		basic_machine=sparc-sun
1123357f1050SThomas Veerman		os=-solaris2
1124357f1050SThomas Veerman		;;
1125357f1050SThomas Veerman	sun3 | sun3-*)
1126357f1050SThomas Veerman		basic_machine=m68k-sun
1127357f1050SThomas Veerman		;;
1128357f1050SThomas Veerman	sun4)
1129357f1050SThomas Veerman		basic_machine=sparc-sun
1130357f1050SThomas Veerman		;;
1131357f1050SThomas Veerman	sun386 | sun386i | roadrunner)
1132357f1050SThomas Veerman		basic_machine=i386-sun
1133357f1050SThomas Veerman		;;
1134357f1050SThomas Veerman	sv1)
1135357f1050SThomas Veerman		basic_machine=sv1-cray
1136357f1050SThomas Veerman		os=-unicos
1137357f1050SThomas Veerman		;;
1138357f1050SThomas Veerman	symmetry)
1139357f1050SThomas Veerman		basic_machine=i386-sequent
1140357f1050SThomas Veerman		os=-dynix
1141357f1050SThomas Veerman		;;
1142357f1050SThomas Veerman	t3e)
1143357f1050SThomas Veerman		basic_machine=alphaev5-cray
1144357f1050SThomas Veerman		os=-unicos
1145357f1050SThomas Veerman		;;
1146357f1050SThomas Veerman	t90)
1147357f1050SThomas Veerman		basic_machine=t90-cray
1148357f1050SThomas Veerman		os=-unicos
1149357f1050SThomas Veerman		;;
115084d9c625SLionel Sambuc	tile*)
1151*0a6a1f1dSLionel Sambuc		basic_machine=$basic_machine-unknown
115284d9c625SLionel Sambuc		os=-linux-gnu
115384d9c625SLionel Sambuc		;;
1154357f1050SThomas Veerman	tx39)
1155357f1050SThomas Veerman		basic_machine=mipstx39-unknown
1156357f1050SThomas Veerman		;;
1157357f1050SThomas Veerman	tx39el)
1158357f1050SThomas Veerman		basic_machine=mipstx39el-unknown
1159357f1050SThomas Veerman		;;
1160357f1050SThomas Veerman	toad1)
1161357f1050SThomas Veerman		basic_machine=pdp10-xkl
1162357f1050SThomas Veerman		os=-tops20
1163357f1050SThomas Veerman		;;
1164357f1050SThomas Veerman	tower | tower-32)
1165357f1050SThomas Veerman		basic_machine=m68k-ncr
1166357f1050SThomas Veerman		;;
1167357f1050SThomas Veerman	tpf)
1168357f1050SThomas Veerman		basic_machine=s390x-ibm
1169357f1050SThomas Veerman		os=-tpf
1170357f1050SThomas Veerman		;;
1171357f1050SThomas Veerman	udi29k)
1172357f1050SThomas Veerman		basic_machine=a29k-amd
1173357f1050SThomas Veerman		os=-udi
1174357f1050SThomas Veerman		;;
1175357f1050SThomas Veerman	ultra3)
1176357f1050SThomas Veerman		basic_machine=a29k-nyu
1177357f1050SThomas Veerman		os=-sym1
1178357f1050SThomas Veerman		;;
1179357f1050SThomas Veerman	v810 | necv810)
1180357f1050SThomas Veerman		basic_machine=v810-nec
1181357f1050SThomas Veerman		os=-none
1182357f1050SThomas Veerman		;;
1183357f1050SThomas Veerman	vaxv)
1184357f1050SThomas Veerman		basic_machine=vax-dec
1185357f1050SThomas Veerman		os=-sysv
1186357f1050SThomas Veerman		;;
1187357f1050SThomas Veerman	vms)
1188357f1050SThomas Veerman		basic_machine=vax-dec
1189357f1050SThomas Veerman		os=-vms
1190357f1050SThomas Veerman		;;
1191357f1050SThomas Veerman	vpp*|vx|vx-*)
1192357f1050SThomas Veerman		basic_machine=f301-fujitsu
1193357f1050SThomas Veerman		;;
1194357f1050SThomas Veerman	vxworks960)
1195357f1050SThomas Veerman		basic_machine=i960-wrs
1196357f1050SThomas Veerman		os=-vxworks
1197357f1050SThomas Veerman		;;
1198357f1050SThomas Veerman	vxworks68)
1199357f1050SThomas Veerman		basic_machine=m68k-wrs
1200357f1050SThomas Veerman		os=-vxworks
1201357f1050SThomas Veerman		;;
1202357f1050SThomas Veerman	vxworks29k)
1203357f1050SThomas Veerman		basic_machine=a29k-wrs
1204357f1050SThomas Veerman		os=-vxworks
1205357f1050SThomas Veerman		;;
1206357f1050SThomas Veerman	w65*)
1207357f1050SThomas Veerman		basic_machine=w65-wdc
1208357f1050SThomas Veerman		os=-none
1209357f1050SThomas Veerman		;;
1210357f1050SThomas Veerman	w89k-*)
1211357f1050SThomas Veerman		basic_machine=hppa1.1-winbond
1212357f1050SThomas Veerman		os=-proelf
1213357f1050SThomas Veerman		;;
1214357f1050SThomas Veerman	xbox)
1215357f1050SThomas Veerman		basic_machine=i686-pc
1216357f1050SThomas Veerman		os=-mingw32
1217357f1050SThomas Veerman		;;
1218357f1050SThomas Veerman	xps | xps100)
1219357f1050SThomas Veerman		basic_machine=xps100-honeywell
1220357f1050SThomas Veerman		;;
1221*0a6a1f1dSLionel Sambuc	xscale-* | xscalee[bl]-*)
1222*0a6a1f1dSLionel Sambuc		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1223*0a6a1f1dSLionel Sambuc		;;
1224357f1050SThomas Veerman	ymp)
1225357f1050SThomas Veerman		basic_machine=ymp-cray
1226357f1050SThomas Veerman		os=-unicos
1227357f1050SThomas Veerman		;;
1228357f1050SThomas Veerman	z8k-*-coff)
1229357f1050SThomas Veerman		basic_machine=z8k-unknown
1230357f1050SThomas Veerman		os=-sim
1231357f1050SThomas Veerman		;;
123284d9c625SLionel Sambuc	z80-*-coff)
123384d9c625SLionel Sambuc		basic_machine=z80-unknown
123484d9c625SLionel Sambuc		os=-sim
123584d9c625SLionel Sambuc		;;
1236357f1050SThomas Veerman	none)
1237357f1050SThomas Veerman		basic_machine=none-none
1238357f1050SThomas Veerman		os=-none
1239357f1050SThomas Veerman		;;
1240357f1050SThomas Veerman
1241357f1050SThomas Veerman# Here we handle the default manufacturer of certain CPU types.  It is in
1242357f1050SThomas Veerman# some cases the only manufacturer, in others, it is the most popular.
1243357f1050SThomas Veerman	w89k)
1244357f1050SThomas Veerman		basic_machine=hppa1.1-winbond
1245357f1050SThomas Veerman		;;
1246357f1050SThomas Veerman	op50n)
1247357f1050SThomas Veerman		basic_machine=hppa1.1-oki
1248357f1050SThomas Veerman		;;
1249357f1050SThomas Veerman	op60c)
1250357f1050SThomas Veerman		basic_machine=hppa1.1-oki
1251357f1050SThomas Veerman		;;
1252357f1050SThomas Veerman	romp)
1253357f1050SThomas Veerman		basic_machine=romp-ibm
1254357f1050SThomas Veerman		;;
1255357f1050SThomas Veerman	mmix)
1256357f1050SThomas Veerman		basic_machine=mmix-knuth
1257357f1050SThomas Veerman		;;
1258357f1050SThomas Veerman	rs6000)
1259357f1050SThomas Veerman		basic_machine=rs6000-ibm
1260357f1050SThomas Veerman		;;
1261357f1050SThomas Veerman	vax)
1262357f1050SThomas Veerman		basic_machine=vax-dec
1263357f1050SThomas Veerman		;;
1264357f1050SThomas Veerman	pdp10)
1265357f1050SThomas Veerman		# there are many clones, so DEC is not a safe bet
1266357f1050SThomas Veerman		basic_machine=pdp10-unknown
1267357f1050SThomas Veerman		;;
1268357f1050SThomas Veerman	pdp11)
1269357f1050SThomas Veerman		basic_machine=pdp11-dec
1270357f1050SThomas Veerman		;;
1271357f1050SThomas Veerman	we32k)
1272357f1050SThomas Veerman		basic_machine=we32k-att
1273357f1050SThomas Veerman		;;
127484d9c625SLionel Sambuc	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1275357f1050SThomas Veerman		basic_machine=sh-unknown
1276357f1050SThomas Veerman		;;
127784d9c625SLionel Sambuc	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1278357f1050SThomas Veerman		basic_machine=sparc-sun
1279357f1050SThomas Veerman		;;
1280357f1050SThomas Veerman	cydra)
1281357f1050SThomas Veerman		basic_machine=cydra-cydrome
1282357f1050SThomas Veerman		;;
1283357f1050SThomas Veerman	orion)
1284357f1050SThomas Veerman		basic_machine=orion-highlevel
1285357f1050SThomas Veerman		;;
1286357f1050SThomas Veerman	orion105)
1287357f1050SThomas Veerman		basic_machine=clipper-highlevel
1288357f1050SThomas Veerman		;;
1289357f1050SThomas Veerman	mac | mpw | mac-mpw)
1290357f1050SThomas Veerman		basic_machine=m68k-apple
1291357f1050SThomas Veerman		;;
1292357f1050SThomas Veerman	pmac | pmac-mpw)
1293357f1050SThomas Veerman		basic_machine=powerpc-apple
1294357f1050SThomas Veerman		;;
1295357f1050SThomas Veerman	*-unknown)
1296357f1050SThomas Veerman		# Make sure to match an already-canonicalized machine name.
1297357f1050SThomas Veerman		;;
1298357f1050SThomas Veerman	*)
1299357f1050SThomas Veerman		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1300357f1050SThomas Veerman		exit 1
1301357f1050SThomas Veerman		;;
1302357f1050SThomas Veermanesac
1303357f1050SThomas Veerman
1304357f1050SThomas Veerman# Here we canonicalize certain aliases for manufacturers.
1305357f1050SThomas Veermancase $basic_machine in
1306357f1050SThomas Veerman	*-digital*)
1307357f1050SThomas Veerman		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1308357f1050SThomas Veerman		;;
1309357f1050SThomas Veerman	*-commodore*)
1310357f1050SThomas Veerman		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1311357f1050SThomas Veerman		;;
1312357f1050SThomas Veerman	*)
1313357f1050SThomas Veerman		;;
1314357f1050SThomas Veermanesac
1315357f1050SThomas Veerman
1316357f1050SThomas Veerman# Decode manufacturer-specific aliases for certain operating systems.
1317357f1050SThomas Veerman
1318357f1050SThomas Veermanif [ x"$os" != x"" ]
1319357f1050SThomas Veermanthen
1320357f1050SThomas Veermancase $os in
1321357f1050SThomas Veerman	# First match some system type aliases
1322357f1050SThomas Veerman	# that might get confused with valid system types.
1323357f1050SThomas Veerman	# -solaris* is a basic system type, with this one exception.
1324*0a6a1f1dSLionel Sambuc	-auroraux)
1325*0a6a1f1dSLionel Sambuc		os=-auroraux
1326*0a6a1f1dSLionel Sambuc		;;
1327357f1050SThomas Veerman	-solaris1 | -solaris1.*)
1328357f1050SThomas Veerman		os=`echo $os | sed -e 's|solaris1|sunos4|'`
1329357f1050SThomas Veerman		;;
1330357f1050SThomas Veerman	-solaris)
1331357f1050SThomas Veerman		os=-solaris2
1332357f1050SThomas Veerman		;;
1333357f1050SThomas Veerman	-svr4*)
1334357f1050SThomas Veerman		os=-sysv4
1335357f1050SThomas Veerman		;;
1336357f1050SThomas Veerman	-unixware*)
1337357f1050SThomas Veerman		os=-sysv4.2uw
1338357f1050SThomas Veerman		;;
1339357f1050SThomas Veerman	-gnu/linux*)
1340357f1050SThomas Veerman		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1341357f1050SThomas Veerman		;;
1342357f1050SThomas Veerman	# First accept the basic system types.
1343357f1050SThomas Veerman	# The portable systems comes first.
1344357f1050SThomas Veerman	# Each alternative MUST END IN A *, to match a version number.
1345357f1050SThomas Veerman	# -sysv* is not here because it comes later, after sysvr4.
1346357f1050SThomas Veerman	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
134784d9c625SLionel Sambuc	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1348*0a6a1f1dSLionel Sambuc	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1349*0a6a1f1dSLionel Sambuc	      | -sym* | -kopensolaris* \
1350357f1050SThomas Veerman	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
135184d9c625SLionel Sambuc	      | -aos* | -aros* \
1352357f1050SThomas Veerman	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1353357f1050SThomas Veerman	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
135484d9c625SLionel Sambuc	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
135584d9c625SLionel Sambuc	      | -openbsd* | -solidbsd* \
1356357f1050SThomas Veerman	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1357357f1050SThomas Veerman	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1358357f1050SThomas Veerman	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1359357f1050SThomas Veerman	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
136084d9c625SLionel Sambuc	      | -chorusos* | -chorusrdb* | -cegcc* \
1361*0a6a1f1dSLionel Sambuc	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1362*0a6a1f1dSLionel Sambuc	      | -mingw32* | -linux-gnu* | -linux-android* \
1363*0a6a1f1dSLionel Sambuc	      | -linux-newlib* | -linux-uclibc* \
136484d9c625SLionel Sambuc	      | -uxpv* | -beos* | -mpeix* | -udk* \
1365357f1050SThomas Veerman	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1366357f1050SThomas Veerman	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1367357f1050SThomas Veerman	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1368357f1050SThomas Veerman	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1369357f1050SThomas Veerman	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1370357f1050SThomas Veerman	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1371*0a6a1f1dSLionel Sambuc	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1372357f1050SThomas Veerman	# Remember, each alternative MUST END IN *, to match a version number.
1373357f1050SThomas Veerman		;;
1374357f1050SThomas Veerman	-qnx*)
1375357f1050SThomas Veerman		case $basic_machine in
1376357f1050SThomas Veerman		    x86-* | i*86-*)
1377357f1050SThomas Veerman			;;
1378357f1050SThomas Veerman		    *)
1379357f1050SThomas Veerman			os=-nto$os
1380357f1050SThomas Veerman			;;
1381357f1050SThomas Veerman		esac
1382357f1050SThomas Veerman		;;
1383357f1050SThomas Veerman	-nto-qnx*)
1384357f1050SThomas Veerman		;;
1385357f1050SThomas Veerman	-nto*)
1386357f1050SThomas Veerman		os=`echo $os | sed -e 's|nto|nto-qnx|'`
1387357f1050SThomas Veerman		;;
1388357f1050SThomas Veerman	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1389357f1050SThomas Veerman	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1390357f1050SThomas Veerman	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1391357f1050SThomas Veerman		;;
1392357f1050SThomas Veerman	-mac*)
1393357f1050SThomas Veerman		os=`echo $os | sed -e 's|mac|macos|'`
1394357f1050SThomas Veerman		;;
1395357f1050SThomas Veerman	-linux-dietlibc)
1396357f1050SThomas Veerman		os=-linux-dietlibc
1397357f1050SThomas Veerman		;;
1398357f1050SThomas Veerman	-linux*)
1399357f1050SThomas Veerman		os=`echo $os | sed -e 's|linux|linux-gnu|'`
1400357f1050SThomas Veerman		;;
1401357f1050SThomas Veerman	-sunos5*)
1402357f1050SThomas Veerman		os=`echo $os | sed -e 's|sunos5|solaris2|'`
1403357f1050SThomas Veerman		;;
1404357f1050SThomas Veerman	-sunos6*)
1405357f1050SThomas Veerman		os=`echo $os | sed -e 's|sunos6|solaris3|'`
1406357f1050SThomas Veerman		;;
1407357f1050SThomas Veerman	-opened*)
1408357f1050SThomas Veerman		os=-openedition
1409357f1050SThomas Veerman		;;
1410357f1050SThomas Veerman	-os400*)
1411357f1050SThomas Veerman		os=-os400
1412357f1050SThomas Veerman		;;
1413357f1050SThomas Veerman	-wince*)
1414357f1050SThomas Veerman		os=-wince
1415357f1050SThomas Veerman		;;
1416357f1050SThomas Veerman	-osfrose*)
1417357f1050SThomas Veerman		os=-osfrose
1418357f1050SThomas Veerman		;;
1419357f1050SThomas Veerman	-osf*)
1420357f1050SThomas Veerman		os=-osf
1421357f1050SThomas Veerman		;;
1422357f1050SThomas Veerman	-utek*)
1423357f1050SThomas Veerman		os=-bsd
1424357f1050SThomas Veerman		;;
1425357f1050SThomas Veerman	-dynix*)
1426357f1050SThomas Veerman		os=-bsd
1427357f1050SThomas Veerman		;;
1428357f1050SThomas Veerman	-acis*)
1429357f1050SThomas Veerman		os=-aos
1430357f1050SThomas Veerman		;;
1431357f1050SThomas Veerman	-atheos*)
1432357f1050SThomas Veerman		os=-atheos
1433357f1050SThomas Veerman		;;
1434357f1050SThomas Veerman	-syllable*)
1435357f1050SThomas Veerman		os=-syllable
1436357f1050SThomas Veerman		;;
1437357f1050SThomas Veerman	-386bsd)
1438357f1050SThomas Veerman		os=-bsd
1439357f1050SThomas Veerman		;;
1440357f1050SThomas Veerman	-ctix* | -uts*)
1441357f1050SThomas Veerman		os=-sysv
1442357f1050SThomas Veerman		;;
1443357f1050SThomas Veerman	-nova*)
1444357f1050SThomas Veerman		os=-rtmk-nova
1445357f1050SThomas Veerman		;;
1446357f1050SThomas Veerman	-ns2 )
1447357f1050SThomas Veerman		os=-nextstep2
1448357f1050SThomas Veerman		;;
1449357f1050SThomas Veerman	-nsk*)
1450357f1050SThomas Veerman		os=-nsk
1451357f1050SThomas Veerman		;;
1452357f1050SThomas Veerman	# Preserve the version number of sinix5.
1453357f1050SThomas Veerman	-sinix5.*)
1454357f1050SThomas Veerman		os=`echo $os | sed -e 's|sinix|sysv|'`
1455357f1050SThomas Veerman		;;
1456357f1050SThomas Veerman	-sinix*)
1457357f1050SThomas Veerman		os=-sysv4
1458357f1050SThomas Veerman		;;
1459357f1050SThomas Veerman	-tpf*)
1460357f1050SThomas Veerman		os=-tpf
1461357f1050SThomas Veerman		;;
1462357f1050SThomas Veerman	-triton*)
1463357f1050SThomas Veerman		os=-sysv3
1464357f1050SThomas Veerman		;;
1465357f1050SThomas Veerman	-oss*)
1466357f1050SThomas Veerman		os=-sysv3
1467357f1050SThomas Veerman		;;
1468357f1050SThomas Veerman	-svr4)
1469357f1050SThomas Veerman		os=-sysv4
1470357f1050SThomas Veerman		;;
1471357f1050SThomas Veerman	-svr3)
1472357f1050SThomas Veerman		os=-sysv3
1473357f1050SThomas Veerman		;;
1474357f1050SThomas Veerman	-sysvr4)
1475357f1050SThomas Veerman		os=-sysv4
1476357f1050SThomas Veerman		;;
1477357f1050SThomas Veerman	# This must come after -sysvr4.
1478357f1050SThomas Veerman	-sysv*)
1479357f1050SThomas Veerman		;;
1480357f1050SThomas Veerman	-ose*)
1481357f1050SThomas Veerman		os=-ose
1482357f1050SThomas Veerman		;;
1483357f1050SThomas Veerman	-es1800*)
1484357f1050SThomas Veerman		os=-ose
1485357f1050SThomas Veerman		;;
1486357f1050SThomas Veerman	-xenix)
1487357f1050SThomas Veerman		os=-xenix
1488357f1050SThomas Veerman		;;
1489357f1050SThomas Veerman	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1490357f1050SThomas Veerman		os=-mint
1491357f1050SThomas Veerman		;;
1492357f1050SThomas Veerman	-aros*)
1493357f1050SThomas Veerman		os=-aros
1494357f1050SThomas Veerman		;;
1495357f1050SThomas Veerman	-kaos*)
1496357f1050SThomas Veerman		os=-kaos
1497357f1050SThomas Veerman		;;
1498357f1050SThomas Veerman	-zvmoe)
1499357f1050SThomas Veerman		os=-zvmoe
1500357f1050SThomas Veerman		;;
150184d9c625SLionel Sambuc	-dicos*)
150284d9c625SLionel Sambuc		os=-dicos
150384d9c625SLionel Sambuc		;;
1504*0a6a1f1dSLionel Sambuc	-nacl*)
1505*0a6a1f1dSLionel Sambuc		;;
1506357f1050SThomas Veerman	-none)
1507357f1050SThomas Veerman		;;
1508357f1050SThomas Veerman	*)
1509357f1050SThomas Veerman		# Get rid of the `-' at the beginning of $os.
1510357f1050SThomas Veerman		os=`echo $os | sed 's/[^-]*-//'`
1511357f1050SThomas Veerman		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1512357f1050SThomas Veerman		exit 1
1513357f1050SThomas Veerman		;;
1514357f1050SThomas Veermanesac
1515357f1050SThomas Veermanelse
1516357f1050SThomas Veerman
1517357f1050SThomas Veerman# Here we handle the default operating systems that come with various machines.
1518357f1050SThomas Veerman# The value should be what the vendor currently ships out the door with their
1519357f1050SThomas Veerman# machine or put another way, the most popular os provided with the machine.
1520357f1050SThomas Veerman
1521357f1050SThomas Veerman# Note that if you're going to try to match "-MANUFACTURER" here (say,
1522357f1050SThomas Veerman# "-sun"), then you have to tell the case statement up towards the top
1523357f1050SThomas Veerman# that MANUFACTURER isn't an operating system.  Otherwise, code above
1524357f1050SThomas Veerman# will signal an error saying that MANUFACTURER isn't an operating
1525357f1050SThomas Veerman# system, and we'll never get to this point.
1526357f1050SThomas Veerman
1527357f1050SThomas Veermancase $basic_machine in
152884d9c625SLionel Sambuc	score-*)
152984d9c625SLionel Sambuc		os=-elf
153084d9c625SLionel Sambuc		;;
153184d9c625SLionel Sambuc	spu-*)
153284d9c625SLionel Sambuc		os=-elf
153384d9c625SLionel Sambuc		;;
1534357f1050SThomas Veerman	*-acorn)
1535357f1050SThomas Veerman		os=-riscix1.2
1536357f1050SThomas Veerman		;;
1537357f1050SThomas Veerman	arm*-rebel)
1538357f1050SThomas Veerman		os=-linux
1539357f1050SThomas Veerman		;;
1540357f1050SThomas Veerman	arm*-semi)
1541357f1050SThomas Veerman		os=-aout
1542357f1050SThomas Veerman		;;
1543357f1050SThomas Veerman	c4x-* | tic4x-*)
1544357f1050SThomas Veerman		os=-coff
1545357f1050SThomas Veerman		;;
1546*0a6a1f1dSLionel Sambuc	hexagon-*)
1547*0a6a1f1dSLionel Sambuc		os=-elf
1548*0a6a1f1dSLionel Sambuc		;;
1549*0a6a1f1dSLionel Sambuc	tic54x-*)
1550*0a6a1f1dSLionel Sambuc		os=-coff
1551*0a6a1f1dSLionel Sambuc		;;
1552*0a6a1f1dSLionel Sambuc	tic55x-*)
1553*0a6a1f1dSLionel Sambuc		os=-coff
1554*0a6a1f1dSLionel Sambuc		;;
1555*0a6a1f1dSLionel Sambuc	tic6x-*)
1556*0a6a1f1dSLionel Sambuc		os=-coff
1557*0a6a1f1dSLionel Sambuc		;;
1558357f1050SThomas Veerman	# This must come before the *-dec entry.
1559357f1050SThomas Veerman	pdp10-*)
1560357f1050SThomas Veerman		os=-tops20
1561357f1050SThomas Veerman		;;
1562357f1050SThomas Veerman	pdp11-*)
1563357f1050SThomas Veerman		os=-none
1564357f1050SThomas Veerman		;;
1565357f1050SThomas Veerman	*-dec | vax-*)
1566357f1050SThomas Veerman		os=-ultrix4.2
1567357f1050SThomas Veerman		;;
1568357f1050SThomas Veerman	m68*-apollo)
1569357f1050SThomas Veerman		os=-domain
1570357f1050SThomas Veerman		;;
1571357f1050SThomas Veerman	i386-sun)
1572357f1050SThomas Veerman		os=-sunos4.0.2
1573357f1050SThomas Veerman		;;
1574357f1050SThomas Veerman	m68000-sun)
1575357f1050SThomas Veerman		os=-sunos3
1576357f1050SThomas Veerman		;;
1577357f1050SThomas Veerman	m68*-cisco)
1578357f1050SThomas Veerman		os=-aout
1579357f1050SThomas Veerman		;;
158084d9c625SLionel Sambuc	mep-*)
158184d9c625SLionel Sambuc		os=-elf
158284d9c625SLionel Sambuc		;;
1583357f1050SThomas Veerman	mips*-cisco)
1584357f1050SThomas Veerman		os=-elf
1585357f1050SThomas Veerman		;;
1586357f1050SThomas Veerman	mips*-*)
1587357f1050SThomas Veerman		os=-elf
1588357f1050SThomas Veerman		;;
1589357f1050SThomas Veerman	or32-*)
1590357f1050SThomas Veerman		os=-coff
1591357f1050SThomas Veerman		;;
1592357f1050SThomas Veerman	*-tti)	# must be before sparc entry or we get the wrong os.
1593357f1050SThomas Veerman		os=-sysv3
1594357f1050SThomas Veerman		;;
1595357f1050SThomas Veerman	sparc-* | *-sun)
1596357f1050SThomas Veerman		os=-sunos4.1.1
1597357f1050SThomas Veerman		;;
1598357f1050SThomas Veerman	*-be)
1599357f1050SThomas Veerman		os=-beos
1600357f1050SThomas Veerman		;;
1601357f1050SThomas Veerman	*-haiku)
1602357f1050SThomas Veerman		os=-haiku
1603357f1050SThomas Veerman		;;
1604357f1050SThomas Veerman	*-ibm)
1605357f1050SThomas Veerman		os=-aix
1606357f1050SThomas Veerman		;;
1607357f1050SThomas Veerman	*-knuth)
1608357f1050SThomas Veerman		os=-mmixware
1609357f1050SThomas Veerman		;;
1610357f1050SThomas Veerman	*-wec)
1611357f1050SThomas Veerman		os=-proelf
1612357f1050SThomas Veerman		;;
1613357f1050SThomas Veerman	*-winbond)
1614357f1050SThomas Veerman		os=-proelf
1615357f1050SThomas Veerman		;;
1616357f1050SThomas Veerman	*-oki)
1617357f1050SThomas Veerman		os=-proelf
1618357f1050SThomas Veerman		;;
1619357f1050SThomas Veerman	*-hp)
1620357f1050SThomas Veerman		os=-hpux
1621357f1050SThomas Veerman		;;
1622357f1050SThomas Veerman	*-hitachi)
1623357f1050SThomas Veerman		os=-hiux
1624357f1050SThomas Veerman		;;
1625357f1050SThomas Veerman	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1626357f1050SThomas Veerman		os=-sysv
1627357f1050SThomas Veerman		;;
1628357f1050SThomas Veerman	*-cbm)
1629357f1050SThomas Veerman		os=-amigaos
1630357f1050SThomas Veerman		;;
1631357f1050SThomas Veerman	*-dg)
1632357f1050SThomas Veerman		os=-dgux
1633357f1050SThomas Veerman		;;
1634357f1050SThomas Veerman	*-dolphin)
1635357f1050SThomas Veerman		os=-sysv3
1636357f1050SThomas Veerman		;;
1637357f1050SThomas Veerman	m68k-ccur)
1638357f1050SThomas Veerman		os=-rtu
1639357f1050SThomas Veerman		;;
1640357f1050SThomas Veerman	m88k-omron*)
1641357f1050SThomas Veerman		os=-luna
1642357f1050SThomas Veerman		;;
1643357f1050SThomas Veerman	*-next )
1644357f1050SThomas Veerman		os=-nextstep
1645357f1050SThomas Veerman		;;
1646357f1050SThomas Veerman	*-sequent)
1647357f1050SThomas Veerman		os=-ptx
1648357f1050SThomas Veerman		;;
1649357f1050SThomas Veerman	*-crds)
1650357f1050SThomas Veerman		os=-unos
1651357f1050SThomas Veerman		;;
1652357f1050SThomas Veerman	*-ns)
1653357f1050SThomas Veerman		os=-genix
1654357f1050SThomas Veerman		;;
1655357f1050SThomas Veerman	i370-*)
1656357f1050SThomas Veerman		os=-mvs
1657357f1050SThomas Veerman		;;
1658357f1050SThomas Veerman	*-next)
1659357f1050SThomas Veerman		os=-nextstep3
1660357f1050SThomas Veerman		;;
1661357f1050SThomas Veerman	*-gould)
1662357f1050SThomas Veerman		os=-sysv
1663357f1050SThomas Veerman		;;
1664357f1050SThomas Veerman	*-highlevel)
1665357f1050SThomas Veerman		os=-bsd
1666357f1050SThomas Veerman		;;
1667357f1050SThomas Veerman	*-encore)
1668357f1050SThomas Veerman		os=-bsd
1669357f1050SThomas Veerman		;;
1670357f1050SThomas Veerman	*-sgi)
1671357f1050SThomas Veerman		os=-irix
1672357f1050SThomas Veerman		;;
1673357f1050SThomas Veerman	*-siemens)
1674357f1050SThomas Veerman		os=-sysv4
1675357f1050SThomas Veerman		;;
1676357f1050SThomas Veerman	*-masscomp)
1677357f1050SThomas Veerman		os=-rtu
1678357f1050SThomas Veerman		;;
1679357f1050SThomas Veerman	f30[01]-fujitsu | f700-fujitsu)
1680357f1050SThomas Veerman		os=-uxpv
1681357f1050SThomas Veerman		;;
1682357f1050SThomas Veerman	*-rom68k)
1683357f1050SThomas Veerman		os=-coff
1684357f1050SThomas Veerman		;;
1685357f1050SThomas Veerman	*-*bug)
1686357f1050SThomas Veerman		os=-coff
1687357f1050SThomas Veerman		;;
1688357f1050SThomas Veerman	*-apple)
1689357f1050SThomas Veerman		os=-macos
1690357f1050SThomas Veerman		;;
1691357f1050SThomas Veerman	*-atari*)
1692357f1050SThomas Veerman		os=-mint
1693357f1050SThomas Veerman		;;
1694357f1050SThomas Veerman	*)
1695357f1050SThomas Veerman		os=-none
1696357f1050SThomas Veerman		;;
1697357f1050SThomas Veermanesac
1698357f1050SThomas Veermanfi
1699357f1050SThomas Veerman
1700357f1050SThomas Veerman# Here we handle the case where we know the os, and the CPU type, but not the
1701357f1050SThomas Veerman# manufacturer.  We pick the logical manufacturer.
1702357f1050SThomas Veermanvendor=unknown
1703357f1050SThomas Veermancase $basic_machine in
1704357f1050SThomas Veerman	*-unknown)
1705357f1050SThomas Veerman		case $os in
1706357f1050SThomas Veerman			-riscix*)
1707357f1050SThomas Veerman				vendor=acorn
1708357f1050SThomas Veerman				;;
1709357f1050SThomas Veerman			-sunos*)
1710357f1050SThomas Veerman				vendor=sun
1711357f1050SThomas Veerman				;;
171284d9c625SLionel Sambuc			-cnk*|-aix*)
1713357f1050SThomas Veerman				vendor=ibm
1714357f1050SThomas Veerman				;;
1715357f1050SThomas Veerman			-beos*)
1716357f1050SThomas Veerman				vendor=be
1717357f1050SThomas Veerman				;;
1718357f1050SThomas Veerman			-hpux*)
1719357f1050SThomas Veerman				vendor=hp
1720357f1050SThomas Veerman				;;
1721357f1050SThomas Veerman			-mpeix*)
1722357f1050SThomas Veerman				vendor=hp
1723357f1050SThomas Veerman				;;
1724357f1050SThomas Veerman			-hiux*)
1725357f1050SThomas Veerman				vendor=hitachi
1726357f1050SThomas Veerman				;;
1727357f1050SThomas Veerman			-unos*)
1728357f1050SThomas Veerman				vendor=crds
1729357f1050SThomas Veerman				;;
1730357f1050SThomas Veerman			-dgux*)
1731357f1050SThomas Veerman				vendor=dg
1732357f1050SThomas Veerman				;;
1733357f1050SThomas Veerman			-luna*)
1734357f1050SThomas Veerman				vendor=omron
1735357f1050SThomas Veerman				;;
1736357f1050SThomas Veerman			-genix*)
1737357f1050SThomas Veerman				vendor=ns
1738357f1050SThomas Veerman				;;
1739357f1050SThomas Veerman			-mvs* | -opened*)
1740357f1050SThomas Veerman				vendor=ibm
1741357f1050SThomas Veerman				;;
1742357f1050SThomas Veerman			-os400*)
1743357f1050SThomas Veerman				vendor=ibm
1744357f1050SThomas Veerman				;;
1745357f1050SThomas Veerman			-ptx*)
1746357f1050SThomas Veerman				vendor=sequent
1747357f1050SThomas Veerman				;;
1748357f1050SThomas Veerman			-tpf*)
1749357f1050SThomas Veerman				vendor=ibm
1750357f1050SThomas Veerman				;;
1751357f1050SThomas Veerman			-vxsim* | -vxworks* | -windiss*)
1752357f1050SThomas Veerman				vendor=wrs
1753357f1050SThomas Veerman				;;
1754357f1050SThomas Veerman			-aux*)
1755357f1050SThomas Veerman				vendor=apple
1756357f1050SThomas Veerman				;;
1757357f1050SThomas Veerman			-hms*)
1758357f1050SThomas Veerman				vendor=hitachi
1759357f1050SThomas Veerman				;;
1760357f1050SThomas Veerman			-mpw* | -macos*)
1761357f1050SThomas Veerman				vendor=apple
1762357f1050SThomas Veerman				;;
1763357f1050SThomas Veerman			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1764357f1050SThomas Veerman				vendor=atari
1765357f1050SThomas Veerman				;;
1766357f1050SThomas Veerman			-vos*)
1767357f1050SThomas Veerman				vendor=stratus
1768357f1050SThomas Veerman				;;
1769357f1050SThomas Veerman		esac
1770357f1050SThomas Veerman		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1771357f1050SThomas Veerman		;;
1772357f1050SThomas Veermanesac
1773357f1050SThomas Veerman
1774357f1050SThomas Veermanecho $basic_machine$os
1775357f1050SThomas Veermanexit
1776357f1050SThomas Veerman
1777357f1050SThomas Veerman# Local variables:
1778357f1050SThomas Veerman# eval: (add-hook 'write-file-hooks 'time-stamp)
1779357f1050SThomas Veerman# time-stamp-start: "timestamp='"
1780357f1050SThomas Veerman# time-stamp-format: "%:y-%02m-%02d"
1781357f1050SThomas Veerman# time-stamp-end: "'"
1782357f1050SThomas Veerman# End:
1783