1382ff0afSmrg#! /bin/sh
2382ff0afSmrg# Configuration validation subroutine script.
3382ff0afSmrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4382ff0afSmrg#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5382ff0afSmrg
6382ff0afSmrgtimestamp='2003-06-18'
7382ff0afSmrg
8382ff0afSmrg# This file is (in principle) common to ALL GNU software.
9382ff0afSmrg# The presence of a machine in this file suggests that SOME GNU software
10382ff0afSmrg# can handle that machine.  It does not imply ALL GNU software can.
11382ff0afSmrg#
12382ff0afSmrg# This file is free software; you can redistribute it and/or modify
13382ff0afSmrg# it under the terms of the GNU General Public License as published by
14382ff0afSmrg# the Free Software Foundation; either version 2 of the License, or
15382ff0afSmrg# (at your option) any later version.
16382ff0afSmrg#
17382ff0afSmrg# This program is distributed in the hope that it will be useful,
18382ff0afSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
19382ff0afSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20382ff0afSmrg# GNU General Public License for more details.
21382ff0afSmrg#
22382ff0afSmrg# You should have received a copy of the GNU General Public License
23382ff0afSmrg# along with this program; if not, write to the Free Software
24382ff0afSmrg# Foundation, Inc., 59 Temple Place - Suite 330,
25382ff0afSmrg# Boston, MA 02111-1307, USA.
26382ff0afSmrg
27382ff0afSmrg# As a special exception to the GNU General Public License, if you
28382ff0afSmrg# distribute this file as part of a program that contains a
29382ff0afSmrg# configuration script generated by Autoconf, you may include it under
30382ff0afSmrg# the same distribution terms that you use for the rest of that program.
31382ff0afSmrg
32382ff0afSmrg# Please send patches to <config-patches@gnu.org>.  Submit a context
33382ff0afSmrg# diff and a properly formatted ChangeLog entry.
34382ff0afSmrg#
35382ff0afSmrg# Configuration subroutine to validate and canonicalize a configuration type.
36382ff0afSmrg# Supply the specified configuration type as an argument.
37382ff0afSmrg# If it is invalid, we print an error message on stderr and exit with code 1.
38382ff0afSmrg# Otherwise, we print the canonical config type on stdout and succeed.
39382ff0afSmrg
40382ff0afSmrg# This file is supposed to be the same for all GNU packages
41382ff0afSmrg# and recognize all the CPU types, system types and aliases
42382ff0afSmrg# that are meaningful with *any* GNU software.
43382ff0afSmrg# Each package is responsible for reporting which valid configurations
44382ff0afSmrg# it does not support.  The user should be able to distinguish
45382ff0afSmrg# a failure to support a valid configuration from a meaningless
46382ff0afSmrg# configuration.
47382ff0afSmrg
48382ff0afSmrg# The goal of this file is to map all the various variations of a given
49382ff0afSmrg# machine specification into a single specification in the form:
50382ff0afSmrg#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
51382ff0afSmrg# or in some cases, the newer four-part form:
52382ff0afSmrg#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
53382ff0afSmrg# It is wrong to echo any other type of specification.
54382ff0afSmrg
55382ff0afSmrgme=`echo "$0" | sed -e 's,.*/,,'`
56382ff0afSmrg
57382ff0afSmrgusage="\
58382ff0afSmrgUsage: $0 [OPTION] CPU-MFR-OPSYS
59382ff0afSmrg       $0 [OPTION] ALIAS
60382ff0afSmrg
61382ff0afSmrgCanonicalize a configuration name.
62382ff0afSmrg
63382ff0afSmrgOperation modes:
64382ff0afSmrg  -h, --help         print this help, then exit
65382ff0afSmrg  -t, --time-stamp   print date of last modification, then exit
66382ff0afSmrg  -v, --version      print version number, then exit
67382ff0afSmrg
68382ff0afSmrgReport bugs and patches to <config-patches@gnu.org>."
69382ff0afSmrg
70382ff0afSmrgversion="\
71382ff0afSmrgGNU config.sub ($timestamp)
72382ff0afSmrg
73382ff0afSmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
74382ff0afSmrgFree Software Foundation, Inc.
75382ff0afSmrg
76382ff0afSmrgThis is free software; see the source for copying conditions.  There is NO
77382ff0afSmrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
78382ff0afSmrg
79382ff0afSmrghelp="
80382ff0afSmrgTry \`$me --help' for more information."
81382ff0afSmrg
82382ff0afSmrg# Parse command line
83382ff0afSmrgwhile test $# -gt 0 ; do
84382ff0afSmrg  case $1 in
85382ff0afSmrg    --time-stamp | --time* | -t )
86382ff0afSmrg       echo "$timestamp" ; exit 0 ;;
87382ff0afSmrg    --version | -v )
88382ff0afSmrg       echo "$version" ; exit 0 ;;
89382ff0afSmrg    --help | --h* | -h )
90382ff0afSmrg       echo "$usage"; exit 0 ;;
91382ff0afSmrg    -- )     # Stop option processing
92382ff0afSmrg       shift; break ;;
93382ff0afSmrg    - )	# Use stdin as input.
94382ff0afSmrg       break ;;
95382ff0afSmrg    -* )
96382ff0afSmrg       echo "$me: invalid option $1$help"
97382ff0afSmrg       exit 1 ;;
98382ff0afSmrg
99382ff0afSmrg    *local*)
100382ff0afSmrg       # First pass through any local machine types.
101382ff0afSmrg       echo $1
102382ff0afSmrg       exit 0;;
103382ff0afSmrg
104382ff0afSmrg    * )
105382ff0afSmrg       break ;;
106382ff0afSmrg  esac
107382ff0afSmrgdone
108382ff0afSmrg
109382ff0afSmrgcase $# in
110382ff0afSmrg 0) echo "$me: missing argument$help" >&2
111382ff0afSmrg    exit 1;;
112382ff0afSmrg 1) ;;
113382ff0afSmrg *) echo "$me: too many arguments$help" >&2
114382ff0afSmrg    exit 1;;
115382ff0afSmrgesac
116382ff0afSmrg
117382ff0afSmrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
118382ff0afSmrg# Here we must recognize all the valid KERNEL-OS combinations.
119382ff0afSmrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
120382ff0afSmrgcase $maybe_os in
121382ff0afSmrg  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
122382ff0afSmrg    os=-$maybe_os
123382ff0afSmrg    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
124382ff0afSmrg    ;;
125382ff0afSmrg  *)
126382ff0afSmrg    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
127382ff0afSmrg    if [ $basic_machine != $1 ]
128382ff0afSmrg    then os=`echo $1 | sed 's/.*-/-/'`
129382ff0afSmrg    else os=; fi
130382ff0afSmrg    ;;
131382ff0afSmrgesac
132382ff0afSmrg
133382ff0afSmrg### Let's recognize common machines as not being operating systems so
134382ff0afSmrg### that things like config.sub decstation-3100 work.  We also
135382ff0afSmrg### recognize some manufacturers as not being operating systems, so we
136382ff0afSmrg### can provide default operating systems below.
137382ff0afSmrgcase $os in
138382ff0afSmrg	-sun*os*)
139382ff0afSmrg		# Prevent following clause from handling this invalid input.
140382ff0afSmrg		;;
141382ff0afSmrg	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
142382ff0afSmrg	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
143382ff0afSmrg	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
144382ff0afSmrg	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
145382ff0afSmrg	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
146382ff0afSmrg	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
147382ff0afSmrg	-apple | -axis)
148382ff0afSmrg		os=
149382ff0afSmrg		basic_machine=$1
150382ff0afSmrg		;;
151382ff0afSmrg	-sim | -cisco | -oki | -wec | -winbond)
152382ff0afSmrg		os=
153382ff0afSmrg		basic_machine=$1
154382ff0afSmrg		;;
155382ff0afSmrg	-scout)
156382ff0afSmrg		;;
157382ff0afSmrg	-wrs)
158382ff0afSmrg		os=-vxworks
159382ff0afSmrg		basic_machine=$1
160382ff0afSmrg		;;
161382ff0afSmrg	-chorusos*)
162382ff0afSmrg		os=-chorusos
163382ff0afSmrg		basic_machine=$1
164382ff0afSmrg		;;
165382ff0afSmrg 	-chorusrdb)
166382ff0afSmrg 		os=-chorusrdb
167382ff0afSmrg		basic_machine=$1
168382ff0afSmrg 		;;
169382ff0afSmrg	-hiux*)
170382ff0afSmrg		os=-hiuxwe2
171382ff0afSmrg		;;
172382ff0afSmrg	-sco5)
173382ff0afSmrg		os=-sco3.2v5
174382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
175382ff0afSmrg		;;
176382ff0afSmrg	-sco4)
177382ff0afSmrg		os=-sco3.2v4
178382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
179382ff0afSmrg		;;
180382ff0afSmrg	-sco3.2.[4-9]*)
181382ff0afSmrg		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
182382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183382ff0afSmrg		;;
184382ff0afSmrg	-sco3.2v[4-9]*)
185382ff0afSmrg		# Don't forget version if it is 3.2v4 or newer.
186382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187382ff0afSmrg		;;
188382ff0afSmrg	-sco*)
189382ff0afSmrg		os=-sco3.2v2
190382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191382ff0afSmrg		;;
192382ff0afSmrg	-udk*)
193382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194382ff0afSmrg		;;
195382ff0afSmrg	-isc)
196382ff0afSmrg		os=-isc2.2
197382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198382ff0afSmrg		;;
199382ff0afSmrg	-clix*)
200382ff0afSmrg		basic_machine=clipper-intergraph
201382ff0afSmrg		;;
202382ff0afSmrg	-isc*)
203382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
204382ff0afSmrg		;;
205382ff0afSmrg	-lynx*)
206382ff0afSmrg		os=-lynxos
207382ff0afSmrg		;;
208382ff0afSmrg	-ptx*)
209382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
210382ff0afSmrg		;;
211382ff0afSmrg	-windowsnt*)
212382ff0afSmrg		os=`echo $os | sed -e 's/windowsnt/winnt/'`
213382ff0afSmrg		;;
214382ff0afSmrg	-psos*)
215382ff0afSmrg		os=-psos
216382ff0afSmrg		;;
217382ff0afSmrg	-mint | -mint[0-9]*)
218382ff0afSmrg		basic_machine=m68k-atari
219382ff0afSmrg		os=-mint
220382ff0afSmrg		;;
221382ff0afSmrgesac
222382ff0afSmrg
223382ff0afSmrg# Decode aliases for certain CPU-COMPANY combinations.
224382ff0afSmrgcase $basic_machine in
225382ff0afSmrg	# Recognize the basic CPU types without company name.
226382ff0afSmrg	# Some are omitted here because they have special meanings below.
227382ff0afSmrg	1750a | 580 \
228382ff0afSmrg	| a29k \
229382ff0afSmrg	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
230382ff0afSmrg	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
231382ff0afSmrg	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
232382ff0afSmrg	| c4x | clipper \
233382ff0afSmrg	| d10v | d30v | dlx | dsp16xx \
234382ff0afSmrg	| fr30 | frv \
235382ff0afSmrg	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
236382ff0afSmrg	| i370 | i860 | i960 | ia64 \
237382ff0afSmrg	| ip2k \
238382ff0afSmrg	| m32r | m68000 | m68k | m88k | mcore \
239382ff0afSmrg	| mips | mipsbe | mipseb | mipsel | mipsle \
240382ff0afSmrg	| mips16 \
241382ff0afSmrg	| mips64 | mips64el \
242382ff0afSmrg	| mips64vr | mips64vrel \
243382ff0afSmrg	| mips64orion | mips64orionel \
244382ff0afSmrg	| mips64vr4100 | mips64vr4100el \
245382ff0afSmrg	| mips64vr4300 | mips64vr4300el \
246382ff0afSmrg	| mips64vr5000 | mips64vr5000el \
247382ff0afSmrg	| mipsisa32 | mipsisa32el \
248382ff0afSmrg	| mipsisa32r2 | mipsisa32r2el \
249382ff0afSmrg	| mipsisa64 | mipsisa64el \
250382ff0afSmrg	| mipsisa64sb1 | mipsisa64sb1el \
251382ff0afSmrg	| mipsisa64sr71k | mipsisa64sr71kel \
252382ff0afSmrg	| mipstx39 | mipstx39el \
253382ff0afSmrg	| mn10200 | mn10300 \
254382ff0afSmrg	| msp430 \
255382ff0afSmrg	| ns16k | ns32k \
256382ff0afSmrg	| openrisc | or32 \
257382ff0afSmrg	| pdp10 | pdp11 | pj | pjl \
258382ff0afSmrg	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
259382ff0afSmrg	| pyramid \
260382ff0afSmrg	| s390 | s390x \
261382ff0afSmrg	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
262382ff0afSmrg	| sh64 | sh64le \
263382ff0afSmrg	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
264382ff0afSmrg	| strongarm \
265382ff0afSmrg	| tahoe | thumb | tic4x | tic80 | tron \
266382ff0afSmrg	| v850 | v850e \
267382ff0afSmrg	| we32k \
268382ff0afSmrg	| x86 | xscale | xstormy16 | xtensa \
269382ff0afSmrg	| z8k)
270382ff0afSmrg		basic_machine=$basic_machine-unknown
271382ff0afSmrg		;;
272382ff0afSmrg	m6811 | m68hc11 | m6812 | m68hc12)
273382ff0afSmrg		# Motorola 68HC11/12.
274382ff0afSmrg		basic_machine=$basic_machine-unknown
275382ff0afSmrg		os=-none
276382ff0afSmrg		;;
277382ff0afSmrg	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
278382ff0afSmrg		;;
279382ff0afSmrg
280382ff0afSmrg	# We use `pc' rather than `unknown'
281382ff0afSmrg	# because (1) that's what they normally are, and
282382ff0afSmrg	# (2) the word "unknown" tends to confuse beginning users.
283382ff0afSmrg	i*86 | x86_64)
284382ff0afSmrg	  basic_machine=$basic_machine-pc
285382ff0afSmrg	  ;;
286382ff0afSmrg	# Object if more than one company name word.
287382ff0afSmrg	*-*-*)
288382ff0afSmrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
289382ff0afSmrg		exit 1
290382ff0afSmrg		;;
291382ff0afSmrg	# Recognize the basic CPU types with company name.
292382ff0afSmrg	580-* \
293382ff0afSmrg	| a29k-* \
294382ff0afSmrg	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
295382ff0afSmrg	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
296382ff0afSmrg	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
297382ff0afSmrg	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
298382ff0afSmrg	| avr-* \
299382ff0afSmrg	| bs2000-* \
300382ff0afSmrg	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
301382ff0afSmrg	| clipper-* | cydra-* \
302382ff0afSmrg	| d10v-* | d30v-* | dlx-* \
303382ff0afSmrg	| elxsi-* \
304382ff0afSmrg	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
305382ff0afSmrg	| h8300-* | h8500-* \
306382ff0afSmrg	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
307382ff0afSmrg	| i*86-* | i860-* | i960-* | ia64-* \
308382ff0afSmrg	| ip2k-* \
309382ff0afSmrg	| m32r-* \
310382ff0afSmrg	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
311382ff0afSmrg	| m88110-* | m88k-* | mcore-* \
312382ff0afSmrg	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
313382ff0afSmrg	| mips16-* \
314382ff0afSmrg	| mips64-* | mips64el-* \
315382ff0afSmrg	| mips64vr-* | mips64vrel-* \
316382ff0afSmrg	| mips64orion-* | mips64orionel-* \
317382ff0afSmrg	| mips64vr4100-* | mips64vr4100el-* \
318382ff0afSmrg	| mips64vr4300-* | mips64vr4300el-* \
319382ff0afSmrg	| mips64vr5000-* | mips64vr5000el-* \
320382ff0afSmrg	| mipsisa32-* | mipsisa32el-* \
321382ff0afSmrg	| mipsisa32r2-* | mipsisa32r2el-* \
322382ff0afSmrg	| mipsisa64-* | mipsisa64el-* \
323382ff0afSmrg	| mipsisa64sb1-* | mipsisa64sb1el-* \
324382ff0afSmrg	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
325382ff0afSmrg	| mipstx39-* | mipstx39el-* \
326382ff0afSmrg	| msp430-* \
327382ff0afSmrg	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
328382ff0afSmrg	| orion-* \
329382ff0afSmrg	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
330382ff0afSmrg	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
331382ff0afSmrg	| pyramid-* \
332382ff0afSmrg	| romp-* | rs6000-* \
333382ff0afSmrg	| s390-* | s390x-* \
334382ff0afSmrg	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
335382ff0afSmrg	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
336382ff0afSmrg	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
337382ff0afSmrg	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
338382ff0afSmrg	| tahoe-* | thumb-* \
339382ff0afSmrg	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
340382ff0afSmrg	| tron-* \
341382ff0afSmrg	| v850-* | v850e-* | vax-* \
342382ff0afSmrg	| we32k-* \
343382ff0afSmrg	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
344382ff0afSmrg	| xtensa-* \
345382ff0afSmrg	| ymp-* \
346382ff0afSmrg	| z8k-*)
347382ff0afSmrg		;;
348382ff0afSmrg	# Recognize the various machine names and aliases which stand
349382ff0afSmrg	# for a CPU type and a company and sometimes even an OS.
350382ff0afSmrg	386bsd)
351382ff0afSmrg		basic_machine=i386-unknown
352382ff0afSmrg		os=-bsd
353382ff0afSmrg		;;
354382ff0afSmrg	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
355382ff0afSmrg		basic_machine=m68000-att
356382ff0afSmrg		;;
357382ff0afSmrg	3b*)
358382ff0afSmrg		basic_machine=we32k-att
359382ff0afSmrg		;;
360382ff0afSmrg	a29khif)
361382ff0afSmrg		basic_machine=a29k-amd
362382ff0afSmrg		os=-udi
363382ff0afSmrg		;;
364382ff0afSmrg	adobe68k)
365382ff0afSmrg		basic_machine=m68010-adobe
366382ff0afSmrg		os=-scout
367382ff0afSmrg		;;
368382ff0afSmrg	alliant | fx80)
369382ff0afSmrg		basic_machine=fx80-alliant
370382ff0afSmrg		;;
371382ff0afSmrg	altos | altos3068)
372382ff0afSmrg		basic_machine=m68k-altos
373382ff0afSmrg		;;
374382ff0afSmrg	am29k)
375382ff0afSmrg		basic_machine=a29k-none
376382ff0afSmrg		os=-bsd
377382ff0afSmrg		;;
378382ff0afSmrg	amd64)
379382ff0afSmrg		basic_machine=x86_64-pc
380382ff0afSmrg		;;
381382ff0afSmrg	amdahl)
382382ff0afSmrg		basic_machine=580-amdahl
383382ff0afSmrg		os=-sysv
384382ff0afSmrg		;;
385382ff0afSmrg	amiga | amiga-*)
386382ff0afSmrg		basic_machine=m68k-unknown
387382ff0afSmrg		;;
388382ff0afSmrg	amigaos | amigados)
389382ff0afSmrg		basic_machine=m68k-unknown
390382ff0afSmrg		os=-amigaos
391382ff0afSmrg		;;
392382ff0afSmrg	amigaunix | amix)
393382ff0afSmrg		basic_machine=m68k-unknown
394382ff0afSmrg		os=-sysv4
395382ff0afSmrg		;;
396382ff0afSmrg	apollo68)
397382ff0afSmrg		basic_machine=m68k-apollo
398382ff0afSmrg		os=-sysv
399382ff0afSmrg		;;
400382ff0afSmrg	apollo68bsd)
401382ff0afSmrg		basic_machine=m68k-apollo
402382ff0afSmrg		os=-bsd
403382ff0afSmrg		;;
404382ff0afSmrg	aux)
405382ff0afSmrg		basic_machine=m68k-apple
406382ff0afSmrg		os=-aux
407382ff0afSmrg		;;
408382ff0afSmrg	balance)
409382ff0afSmrg		basic_machine=ns32k-sequent
410382ff0afSmrg		os=-dynix
411382ff0afSmrg		;;
412382ff0afSmrg	c90)
413382ff0afSmrg		basic_machine=c90-cray
414382ff0afSmrg		os=-unicos
415382ff0afSmrg		;;
416382ff0afSmrg	convex-c1)
417382ff0afSmrg		basic_machine=c1-convex
418382ff0afSmrg		os=-bsd
419382ff0afSmrg		;;
420382ff0afSmrg	convex-c2)
421382ff0afSmrg		basic_machine=c2-convex
422382ff0afSmrg		os=-bsd
423382ff0afSmrg		;;
424382ff0afSmrg	convex-c32)
425382ff0afSmrg		basic_machine=c32-convex
426382ff0afSmrg		os=-bsd
427382ff0afSmrg		;;
428382ff0afSmrg	convex-c34)
429382ff0afSmrg		basic_machine=c34-convex
430382ff0afSmrg		os=-bsd
431382ff0afSmrg		;;
432382ff0afSmrg	convex-c38)
433382ff0afSmrg		basic_machine=c38-convex
434382ff0afSmrg		os=-bsd
435382ff0afSmrg		;;
436382ff0afSmrg	cray | j90)
437382ff0afSmrg		basic_machine=j90-cray
438382ff0afSmrg		os=-unicos
439382ff0afSmrg		;;
440382ff0afSmrg	crds | unos)
441382ff0afSmrg		basic_machine=m68k-crds
442382ff0afSmrg		;;
443382ff0afSmrg	cris | cris-* | etrax*)
444382ff0afSmrg		basic_machine=cris-axis
445382ff0afSmrg		;;
446382ff0afSmrg	da30 | da30-*)
447382ff0afSmrg		basic_machine=m68k-da30
448382ff0afSmrg		;;
449382ff0afSmrg	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
450382ff0afSmrg		basic_machine=mips-dec
451382ff0afSmrg		;;
452382ff0afSmrg	decsystem10* | dec10*)
453382ff0afSmrg		basic_machine=pdp10-dec
454382ff0afSmrg		os=-tops10
455382ff0afSmrg		;;
456382ff0afSmrg	decsystem20* | dec20*)
457382ff0afSmrg		basic_machine=pdp10-dec
458382ff0afSmrg		os=-tops20
459382ff0afSmrg		;;
460382ff0afSmrg	delta | 3300 | motorola-3300 | motorola-delta \
461382ff0afSmrg	      | 3300-motorola | delta-motorola)
462382ff0afSmrg		basic_machine=m68k-motorola
463382ff0afSmrg		;;
464382ff0afSmrg	delta88)
465382ff0afSmrg		basic_machine=m88k-motorola
466382ff0afSmrg		os=-sysv3
467382ff0afSmrg		;;
468382ff0afSmrg	dpx20 | dpx20-*)
469382ff0afSmrg		basic_machine=rs6000-bull
470382ff0afSmrg		os=-bosx
471382ff0afSmrg		;;
472382ff0afSmrg	dpx2* | dpx2*-bull)
473382ff0afSmrg		basic_machine=m68k-bull
474382ff0afSmrg		os=-sysv3
475382ff0afSmrg		;;
476382ff0afSmrg	ebmon29k)
477382ff0afSmrg		basic_machine=a29k-amd
478382ff0afSmrg		os=-ebmon
479382ff0afSmrg		;;
480382ff0afSmrg	elxsi)
481382ff0afSmrg		basic_machine=elxsi-elxsi
482382ff0afSmrg		os=-bsd
483382ff0afSmrg		;;
484382ff0afSmrg	encore | umax | mmax)
485382ff0afSmrg		basic_machine=ns32k-encore
486382ff0afSmrg		;;
487382ff0afSmrg	es1800 | OSE68k | ose68k | ose | OSE)
488382ff0afSmrg		basic_machine=m68k-ericsson
489382ff0afSmrg		os=-ose
490382ff0afSmrg		;;
491382ff0afSmrg	fx2800)
492382ff0afSmrg		basic_machine=i860-alliant
493382ff0afSmrg		;;
494382ff0afSmrg	genix)
495382ff0afSmrg		basic_machine=ns32k-ns
496382ff0afSmrg		;;
497382ff0afSmrg	gmicro)
498382ff0afSmrg		basic_machine=tron-gmicro
499382ff0afSmrg		os=-sysv
500382ff0afSmrg		;;
501382ff0afSmrg	go32)
502382ff0afSmrg		basic_machine=i386-pc
503382ff0afSmrg		os=-go32
504382ff0afSmrg		;;
505382ff0afSmrg	h3050r* | hiux*)
506382ff0afSmrg		basic_machine=hppa1.1-hitachi
507382ff0afSmrg		os=-hiuxwe2
508382ff0afSmrg		;;
509382ff0afSmrg	h8300hms)
510382ff0afSmrg		basic_machine=h8300-hitachi
511382ff0afSmrg		os=-hms
512382ff0afSmrg		;;
513382ff0afSmrg	h8300xray)
514382ff0afSmrg		basic_machine=h8300-hitachi
515382ff0afSmrg		os=-xray
516382ff0afSmrg		;;
517382ff0afSmrg	h8500hms)
518382ff0afSmrg		basic_machine=h8500-hitachi
519382ff0afSmrg		os=-hms
520382ff0afSmrg		;;
521382ff0afSmrg	harris)
522382ff0afSmrg		basic_machine=m88k-harris
523382ff0afSmrg		os=-sysv3
524382ff0afSmrg		;;
525382ff0afSmrg	hp300-*)
526382ff0afSmrg		basic_machine=m68k-hp
527382ff0afSmrg		;;
528382ff0afSmrg	hp300bsd)
529382ff0afSmrg		basic_machine=m68k-hp
530382ff0afSmrg		os=-bsd
531382ff0afSmrg		;;
532382ff0afSmrg	hp300hpux)
533382ff0afSmrg		basic_machine=m68k-hp
534382ff0afSmrg		os=-hpux
535382ff0afSmrg		;;
536382ff0afSmrg	hp3k9[0-9][0-9] | hp9[0-9][0-9])
537382ff0afSmrg		basic_machine=hppa1.0-hp
538382ff0afSmrg		;;
539382ff0afSmrg	hp9k2[0-9][0-9] | hp9k31[0-9])
540382ff0afSmrg		basic_machine=m68000-hp
541382ff0afSmrg		;;
542382ff0afSmrg	hp9k3[2-9][0-9])
543382ff0afSmrg		basic_machine=m68k-hp
544382ff0afSmrg		;;
545382ff0afSmrg	hp9k6[0-9][0-9] | hp6[0-9][0-9])
546382ff0afSmrg		basic_machine=hppa1.0-hp
547382ff0afSmrg		;;
548382ff0afSmrg	hp9k7[0-79][0-9] | hp7[0-79][0-9])
549382ff0afSmrg		basic_machine=hppa1.1-hp
550382ff0afSmrg		;;
551382ff0afSmrg	hp9k78[0-9] | hp78[0-9])
552382ff0afSmrg		# FIXME: really hppa2.0-hp
553382ff0afSmrg		basic_machine=hppa1.1-hp
554382ff0afSmrg		;;
555382ff0afSmrg	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
556382ff0afSmrg		# FIXME: really hppa2.0-hp
557382ff0afSmrg		basic_machine=hppa1.1-hp
558382ff0afSmrg		;;
559382ff0afSmrg	hp9k8[0-9][13679] | hp8[0-9][13679])
560382ff0afSmrg		basic_machine=hppa1.1-hp
561382ff0afSmrg		;;
562382ff0afSmrg	hp9k8[0-9][0-9] | hp8[0-9][0-9])
563382ff0afSmrg		basic_machine=hppa1.0-hp
564382ff0afSmrg		;;
565382ff0afSmrg	hppa-next)
566382ff0afSmrg		os=-nextstep3
567382ff0afSmrg		;;
568382ff0afSmrg	hppaosf)
569382ff0afSmrg		basic_machine=hppa1.1-hp
570382ff0afSmrg		os=-osf
571382ff0afSmrg		;;
572382ff0afSmrg	hppro)
573382ff0afSmrg		basic_machine=hppa1.1-hp
574382ff0afSmrg		os=-proelf
575382ff0afSmrg		;;
576382ff0afSmrg	i370-ibm* | ibm*)
577382ff0afSmrg		basic_machine=i370-ibm
578382ff0afSmrg		;;
579382ff0afSmrg# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
580382ff0afSmrg	i*86v32)
581382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
582382ff0afSmrg		os=-sysv32
583382ff0afSmrg		;;
584382ff0afSmrg	i*86v4*)
585382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
586382ff0afSmrg		os=-sysv4
587382ff0afSmrg		;;
588382ff0afSmrg	i*86v)
589382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
590382ff0afSmrg		os=-sysv
591382ff0afSmrg		;;
592382ff0afSmrg	i*86sol2)
593382ff0afSmrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
594382ff0afSmrg		os=-solaris2
595382ff0afSmrg		;;
596382ff0afSmrg	i386mach)
597382ff0afSmrg		basic_machine=i386-mach
598382ff0afSmrg		os=-mach
599382ff0afSmrg		;;
600382ff0afSmrg	i386-vsta | vsta)
601382ff0afSmrg		basic_machine=i386-unknown
602382ff0afSmrg		os=-vsta
603382ff0afSmrg		;;
604382ff0afSmrg	iris | iris4d)
605382ff0afSmrg		basic_machine=mips-sgi
606382ff0afSmrg		case $os in
607382ff0afSmrg		    -irix*)
608382ff0afSmrg			;;
609382ff0afSmrg		    *)
610382ff0afSmrg			os=-irix4
611382ff0afSmrg			;;
612382ff0afSmrg		esac
613382ff0afSmrg		;;
614382ff0afSmrg	isi68 | isi)
615382ff0afSmrg		basic_machine=m68k-isi
616382ff0afSmrg		os=-sysv
617382ff0afSmrg		;;
618382ff0afSmrg	m88k-omron*)
619382ff0afSmrg		basic_machine=m88k-omron
620382ff0afSmrg		;;
621382ff0afSmrg	magnum | m3230)
622382ff0afSmrg		basic_machine=mips-mips
623382ff0afSmrg		os=-sysv
624382ff0afSmrg		;;
625382ff0afSmrg	merlin)
626382ff0afSmrg		basic_machine=ns32k-utek
627382ff0afSmrg		os=-sysv
628382ff0afSmrg		;;
629382ff0afSmrg	mingw32)
630382ff0afSmrg		basic_machine=i386-pc
631382ff0afSmrg		os=-mingw32
632382ff0afSmrg		;;
633382ff0afSmrg	miniframe)
634382ff0afSmrg		basic_machine=m68000-convergent
635382ff0afSmrg		;;
636382ff0afSmrg	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
637382ff0afSmrg		basic_machine=m68k-atari
638382ff0afSmrg		os=-mint
639382ff0afSmrg		;;
640382ff0afSmrg	mips3*-*)
641382ff0afSmrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
642382ff0afSmrg		;;
643382ff0afSmrg	mips3*)
644382ff0afSmrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
645382ff0afSmrg		;;
646382ff0afSmrg	mmix*)
647382ff0afSmrg		basic_machine=mmix-knuth
648382ff0afSmrg		os=-mmixware
649382ff0afSmrg		;;
650382ff0afSmrg	monitor)
651382ff0afSmrg		basic_machine=m68k-rom68k
652382ff0afSmrg		os=-coff
653382ff0afSmrg		;;
654382ff0afSmrg	morphos)
655382ff0afSmrg		basic_machine=powerpc-unknown
656382ff0afSmrg		os=-morphos
657382ff0afSmrg		;;
658382ff0afSmrg	msdos)
659382ff0afSmrg		basic_machine=i386-pc
660382ff0afSmrg		os=-msdos
661382ff0afSmrg		;;
662382ff0afSmrg	mvs)
663382ff0afSmrg		basic_machine=i370-ibm
664382ff0afSmrg		os=-mvs
665382ff0afSmrg		;;
666382ff0afSmrg	ncr3000)
667382ff0afSmrg		basic_machine=i486-ncr
668382ff0afSmrg		os=-sysv4
669382ff0afSmrg		;;
670382ff0afSmrg	netbsd386)
671382ff0afSmrg		basic_machine=i386-unknown
672382ff0afSmrg		os=-netbsd
673382ff0afSmrg		;;
674382ff0afSmrg	netwinder)
675382ff0afSmrg		basic_machine=armv4l-rebel
676382ff0afSmrg		os=-linux
677382ff0afSmrg		;;
678382ff0afSmrg	news | news700 | news800 | news900)
679382ff0afSmrg		basic_machine=m68k-sony
680382ff0afSmrg		os=-newsos
681382ff0afSmrg		;;
682382ff0afSmrg	news1000)
683382ff0afSmrg		basic_machine=m68030-sony
684382ff0afSmrg		os=-newsos
685382ff0afSmrg		;;
686382ff0afSmrg	news-3600 | risc-news)
687382ff0afSmrg		basic_machine=mips-sony
688382ff0afSmrg		os=-newsos
689382ff0afSmrg		;;
690382ff0afSmrg	necv70)
691382ff0afSmrg		basic_machine=v70-nec
692382ff0afSmrg		os=-sysv
693382ff0afSmrg		;;
694382ff0afSmrg	next | m*-next )
695382ff0afSmrg		basic_machine=m68k-next
696382ff0afSmrg		case $os in
697382ff0afSmrg		    -nextstep* )
698382ff0afSmrg			;;
699382ff0afSmrg		    -ns2*)
700382ff0afSmrg		      os=-nextstep2
701382ff0afSmrg			;;
702382ff0afSmrg		    *)
703382ff0afSmrg		      os=-nextstep3
704382ff0afSmrg			;;
705382ff0afSmrg		esac
706382ff0afSmrg		;;
707382ff0afSmrg	nh3000)
708382ff0afSmrg		basic_machine=m68k-harris
709382ff0afSmrg		os=-cxux
710382ff0afSmrg		;;
711382ff0afSmrg	nh[45]000)
712382ff0afSmrg		basic_machine=m88k-harris
713382ff0afSmrg		os=-cxux
714382ff0afSmrg		;;
715382ff0afSmrg	nindy960)
716382ff0afSmrg		basic_machine=i960-intel
717382ff0afSmrg		os=-nindy
718382ff0afSmrg		;;
719382ff0afSmrg	mon960)
720382ff0afSmrg		basic_machine=i960-intel
721382ff0afSmrg		os=-mon960
722382ff0afSmrg		;;
723382ff0afSmrg	nonstopux)
724382ff0afSmrg		basic_machine=mips-compaq
725382ff0afSmrg		os=-nonstopux
726382ff0afSmrg		;;
727382ff0afSmrg	np1)
728382ff0afSmrg		basic_machine=np1-gould
729382ff0afSmrg		;;
730382ff0afSmrg	nv1)
731382ff0afSmrg		basic_machine=nv1-cray
732382ff0afSmrg		os=-unicosmp
733382ff0afSmrg		;;
734382ff0afSmrg	nsr-tandem)
735382ff0afSmrg		basic_machine=nsr-tandem
736382ff0afSmrg		;;
737382ff0afSmrg	op50n-* | op60c-*)
738382ff0afSmrg		basic_machine=hppa1.1-oki
739382ff0afSmrg		os=-proelf
740382ff0afSmrg		;;
741382ff0afSmrg	or32 | or32-*)
742382ff0afSmrg		basic_machine=or32-unknown
743382ff0afSmrg		os=-coff
744382ff0afSmrg		;;
745382ff0afSmrg	OSE68000 | ose68000)
746382ff0afSmrg		basic_machine=m68000-ericsson
747382ff0afSmrg		os=-ose
748382ff0afSmrg		;;
749382ff0afSmrg	os68k)
750382ff0afSmrg		basic_machine=m68k-none
751382ff0afSmrg		os=-os68k
752382ff0afSmrg		;;
753382ff0afSmrg	pa-hitachi)
754382ff0afSmrg		basic_machine=hppa1.1-hitachi
755382ff0afSmrg		os=-hiuxwe2
756382ff0afSmrg		;;
757382ff0afSmrg	paragon)
758382ff0afSmrg		basic_machine=i860-intel
759382ff0afSmrg		os=-osf
760382ff0afSmrg		;;
761382ff0afSmrg	pbd)
762382ff0afSmrg		basic_machine=sparc-tti
763382ff0afSmrg		;;
764382ff0afSmrg	pbb)
765382ff0afSmrg		basic_machine=m68k-tti
766382ff0afSmrg		;;
767382ff0afSmrg	pc532 | pc532-*)
768382ff0afSmrg		basic_machine=ns32k-pc532
769382ff0afSmrg		;;
770382ff0afSmrg	pentium | p5 | k5 | k6 | nexgen | viac3)
771382ff0afSmrg		basic_machine=i586-pc
772382ff0afSmrg		;;
773382ff0afSmrg	pentiumpro | p6 | 6x86 | athlon | athlon_*)
774382ff0afSmrg		basic_machine=i686-pc
775382ff0afSmrg		;;
776382ff0afSmrg	pentiumii | pentium2 | pentiumiii | pentium3)
777382ff0afSmrg		basic_machine=i686-pc
778382ff0afSmrg		;;
779382ff0afSmrg	pentium4)
780382ff0afSmrg		basic_machine=i786-pc
781382ff0afSmrg		;;
782382ff0afSmrg	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
783382ff0afSmrg		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
784382ff0afSmrg		;;
785382ff0afSmrg	pentiumpro-* | p6-* | 6x86-* | athlon-*)
786382ff0afSmrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
787382ff0afSmrg		;;
788382ff0afSmrg	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
789382ff0afSmrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
790382ff0afSmrg		;;
791382ff0afSmrg	pentium4-*)
792382ff0afSmrg		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
793382ff0afSmrg		;;
794382ff0afSmrg	pn)
795382ff0afSmrg		basic_machine=pn-gould
796382ff0afSmrg		;;
797382ff0afSmrg	power)	basic_machine=power-ibm
798382ff0afSmrg		;;
799382ff0afSmrg	ppc)	basic_machine=powerpc-unknown
800382ff0afSmrg		;;
801382ff0afSmrg	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
802382ff0afSmrg		;;
803382ff0afSmrg	ppcle | powerpclittle | ppc-le | powerpc-little)
804382ff0afSmrg		basic_machine=powerpcle-unknown
805382ff0afSmrg		;;
806382ff0afSmrg	ppcle-* | powerpclittle-*)
807382ff0afSmrg		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
808382ff0afSmrg		;;
809382ff0afSmrg	ppc64)	basic_machine=powerpc64-unknown
810382ff0afSmrg		;;
811382ff0afSmrg	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
812382ff0afSmrg		;;
813382ff0afSmrg	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
814382ff0afSmrg		basic_machine=powerpc64le-unknown
815382ff0afSmrg		;;
816382ff0afSmrg	ppc64le-* | powerpc64little-*)
817382ff0afSmrg		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
818382ff0afSmrg		;;
819382ff0afSmrg	ps2)
820382ff0afSmrg		basic_machine=i386-ibm
821382ff0afSmrg		;;
822382ff0afSmrg	pw32)
823382ff0afSmrg		basic_machine=i586-unknown
824382ff0afSmrg		os=-pw32
825382ff0afSmrg		;;
826382ff0afSmrg	rom68k)
827382ff0afSmrg		basic_machine=m68k-rom68k
828382ff0afSmrg		os=-coff
829382ff0afSmrg		;;
830382ff0afSmrg	rm[46]00)
831382ff0afSmrg		basic_machine=mips-siemens
832382ff0afSmrg		;;
833382ff0afSmrg	rtpc | rtpc-*)
834382ff0afSmrg		basic_machine=romp-ibm
835382ff0afSmrg		;;
836382ff0afSmrg	sa29200)
837382ff0afSmrg		basic_machine=a29k-amd
838382ff0afSmrg		os=-udi
839382ff0afSmrg		;;
840382ff0afSmrg	sb1)
841382ff0afSmrg		basic_machine=mipsisa64sb1-unknown
842382ff0afSmrg		;;
843382ff0afSmrg	sb1el)
844382ff0afSmrg		basic_machine=mipsisa64sb1el-unknown
845382ff0afSmrg		;;
846382ff0afSmrg	sei)
847382ff0afSmrg		basic_machine=mips-sei
848382ff0afSmrg		os=-seiux
849382ff0afSmrg		;;
850382ff0afSmrg	sequent)
851382ff0afSmrg		basic_machine=i386-sequent
852382ff0afSmrg		;;
853382ff0afSmrg	sh)
854382ff0afSmrg		basic_machine=sh-hitachi
855382ff0afSmrg		os=-hms
856382ff0afSmrg		;;
857382ff0afSmrg	sh64)
858382ff0afSmrg		basic_machine=sh64-unknown
859382ff0afSmrg		;;
860382ff0afSmrg	sparclite-wrs | simso-wrs)
861382ff0afSmrg		basic_machine=sparclite-wrs
862382ff0afSmrg		os=-vxworks
863382ff0afSmrg		;;
864382ff0afSmrg	sps7)
865382ff0afSmrg		basic_machine=m68k-bull
866382ff0afSmrg		os=-sysv2
867382ff0afSmrg		;;
868382ff0afSmrg	spur)
869382ff0afSmrg		basic_machine=spur-unknown
870382ff0afSmrg		;;
871382ff0afSmrg	st2000)
872382ff0afSmrg		basic_machine=m68k-tandem
873382ff0afSmrg		;;
874382ff0afSmrg	stratus)
875382ff0afSmrg		basic_machine=i860-stratus
876382ff0afSmrg		os=-sysv4
877382ff0afSmrg		;;
878382ff0afSmrg	sun2)
879382ff0afSmrg		basic_machine=m68000-sun
880382ff0afSmrg		;;
881382ff0afSmrg	sun2os3)
882382ff0afSmrg		basic_machine=m68000-sun
883382ff0afSmrg		os=-sunos3
884382ff0afSmrg		;;
885382ff0afSmrg	sun2os4)
886382ff0afSmrg		basic_machine=m68000-sun
887382ff0afSmrg		os=-sunos4
888382ff0afSmrg		;;
889382ff0afSmrg	sun3os3)
890382ff0afSmrg		basic_machine=m68k-sun
891382ff0afSmrg		os=-sunos3
892382ff0afSmrg		;;
893382ff0afSmrg	sun3os4)
894382ff0afSmrg		basic_machine=m68k-sun
895382ff0afSmrg		os=-sunos4
896382ff0afSmrg		;;
897382ff0afSmrg	sun4os3)
898382ff0afSmrg		basic_machine=sparc-sun
899382ff0afSmrg		os=-sunos3
900382ff0afSmrg		;;
901382ff0afSmrg	sun4os4)
902382ff0afSmrg		basic_machine=sparc-sun
903382ff0afSmrg		os=-sunos4
904382ff0afSmrg		;;
905382ff0afSmrg	sun4sol2)
906382ff0afSmrg		basic_machine=sparc-sun
907382ff0afSmrg		os=-solaris2
908382ff0afSmrg		;;
909382ff0afSmrg	sun3 | sun3-*)
910382ff0afSmrg		basic_machine=m68k-sun
911382ff0afSmrg		;;
912382ff0afSmrg	sun4)
913382ff0afSmrg		basic_machine=sparc-sun
914382ff0afSmrg		;;
915382ff0afSmrg	sun386 | sun386i | roadrunner)
916382ff0afSmrg		basic_machine=i386-sun
917382ff0afSmrg		;;
918382ff0afSmrg	sv1)
919382ff0afSmrg		basic_machine=sv1-cray
920382ff0afSmrg		os=-unicos
921382ff0afSmrg		;;
922382ff0afSmrg	symmetry)
923382ff0afSmrg		basic_machine=i386-sequent
924382ff0afSmrg		os=-dynix
925382ff0afSmrg		;;
926382ff0afSmrg	t3e)
927382ff0afSmrg		basic_machine=alphaev5-cray
928382ff0afSmrg		os=-unicos
929382ff0afSmrg		;;
930382ff0afSmrg	t90)
931382ff0afSmrg		basic_machine=t90-cray
932382ff0afSmrg		os=-unicos
933382ff0afSmrg		;;
934382ff0afSmrg	tic54x | c54x*)
935382ff0afSmrg		basic_machine=tic54x-unknown
936382ff0afSmrg		os=-coff
937382ff0afSmrg		;;
938382ff0afSmrg	tic55x | c55x*)
939382ff0afSmrg		basic_machine=tic55x-unknown
940382ff0afSmrg		os=-coff
941382ff0afSmrg		;;
942382ff0afSmrg	tic6x | c6x*)
943382ff0afSmrg		basic_machine=tic6x-unknown
944382ff0afSmrg		os=-coff
945382ff0afSmrg		;;
946382ff0afSmrg	tx39)
947382ff0afSmrg		basic_machine=mipstx39-unknown
948382ff0afSmrg		;;
949382ff0afSmrg	tx39el)
950382ff0afSmrg		basic_machine=mipstx39el-unknown
951382ff0afSmrg		;;
952382ff0afSmrg	toad1)
953382ff0afSmrg		basic_machine=pdp10-xkl
954382ff0afSmrg		os=-tops20
955382ff0afSmrg		;;
956382ff0afSmrg	tower | tower-32)
957382ff0afSmrg		basic_machine=m68k-ncr
958382ff0afSmrg		;;
959382ff0afSmrg	udi29k)
960382ff0afSmrg		basic_machine=a29k-amd
961382ff0afSmrg		os=-udi
962382ff0afSmrg		;;
963382ff0afSmrg	ultra3)
964382ff0afSmrg		basic_machine=a29k-nyu
965382ff0afSmrg		os=-sym1
966382ff0afSmrg		;;
967382ff0afSmrg	v810 | necv810)
968382ff0afSmrg		basic_machine=v810-nec
969382ff0afSmrg		os=-none
970382ff0afSmrg		;;
971382ff0afSmrg	vaxv)
972382ff0afSmrg		basic_machine=vax-dec
973382ff0afSmrg		os=-sysv
974382ff0afSmrg		;;
975382ff0afSmrg	vms)
976382ff0afSmrg		basic_machine=vax-dec
977382ff0afSmrg		os=-vms
978382ff0afSmrg		;;
979382ff0afSmrg	vpp*|vx|vx-*)
980382ff0afSmrg		basic_machine=f301-fujitsu
981382ff0afSmrg		;;
982382ff0afSmrg	vxworks960)
983382ff0afSmrg		basic_machine=i960-wrs
984382ff0afSmrg		os=-vxworks
985382ff0afSmrg		;;
986382ff0afSmrg	vxworks68)
987382ff0afSmrg		basic_machine=m68k-wrs
988382ff0afSmrg		os=-vxworks
989382ff0afSmrg		;;
990382ff0afSmrg	vxworks29k)
991382ff0afSmrg		basic_machine=a29k-wrs
992382ff0afSmrg		os=-vxworks
993382ff0afSmrg		;;
994382ff0afSmrg	w65*)
995382ff0afSmrg		basic_machine=w65-wdc
996382ff0afSmrg		os=-none
997382ff0afSmrg		;;
998382ff0afSmrg	w89k-*)
999382ff0afSmrg		basic_machine=hppa1.1-winbond
1000382ff0afSmrg		os=-proelf
1001382ff0afSmrg		;;
1002382ff0afSmrg	xps | xps100)
1003382ff0afSmrg		basic_machine=xps100-honeywell
1004382ff0afSmrg		;;
1005382ff0afSmrg	ymp)
1006382ff0afSmrg		basic_machine=ymp-cray
1007382ff0afSmrg		os=-unicos
1008382ff0afSmrg		;;
1009382ff0afSmrg	z8k-*-coff)
1010382ff0afSmrg		basic_machine=z8k-unknown
1011382ff0afSmrg		os=-sim
1012382ff0afSmrg		;;
1013382ff0afSmrg	none)
1014382ff0afSmrg		basic_machine=none-none
1015382ff0afSmrg		os=-none
1016382ff0afSmrg		;;
1017382ff0afSmrg
1018382ff0afSmrg# Here we handle the default manufacturer of certain CPU types.  It is in
1019382ff0afSmrg# some cases the only manufacturer, in others, it is the most popular.
1020382ff0afSmrg	w89k)
1021382ff0afSmrg		basic_machine=hppa1.1-winbond
1022382ff0afSmrg		;;
1023382ff0afSmrg	op50n)
1024382ff0afSmrg		basic_machine=hppa1.1-oki
1025382ff0afSmrg		;;
1026382ff0afSmrg	op60c)
1027382ff0afSmrg		basic_machine=hppa1.1-oki
1028382ff0afSmrg		;;
1029382ff0afSmrg	romp)
1030382ff0afSmrg		basic_machine=romp-ibm
1031382ff0afSmrg		;;
1032382ff0afSmrg	rs6000)
1033382ff0afSmrg		basic_machine=rs6000-ibm
1034382ff0afSmrg		;;
1035382ff0afSmrg	vax)
1036382ff0afSmrg		basic_machine=vax-dec
1037382ff0afSmrg		;;
1038382ff0afSmrg	pdp10)
1039382ff0afSmrg		# there are many clones, so DEC is not a safe bet
1040382ff0afSmrg		basic_machine=pdp10-unknown
1041382ff0afSmrg		;;
1042382ff0afSmrg	pdp11)
1043382ff0afSmrg		basic_machine=pdp11-dec
1044382ff0afSmrg		;;
1045382ff0afSmrg	we32k)
1046382ff0afSmrg		basic_machine=we32k-att
1047382ff0afSmrg		;;
1048382ff0afSmrg	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
1049382ff0afSmrg		basic_machine=sh-unknown
1050382ff0afSmrg		;;
1051382ff0afSmrg	sh64)
1052382ff0afSmrg		basic_machine=sh64-unknown
1053382ff0afSmrg		;;
1054382ff0afSmrg	sparc | sparcv8 | sparcv9 | sparcv9b)
1055382ff0afSmrg		basic_machine=sparc-sun
1056382ff0afSmrg		;;
1057382ff0afSmrg	cydra)
1058382ff0afSmrg		basic_machine=cydra-cydrome
1059382ff0afSmrg		;;
1060382ff0afSmrg	orion)
1061382ff0afSmrg		basic_machine=orion-highlevel
1062382ff0afSmrg		;;
1063382ff0afSmrg	orion105)
1064382ff0afSmrg		basic_machine=clipper-highlevel
1065382ff0afSmrg		;;
1066382ff0afSmrg	mac | mpw | mac-mpw)
1067382ff0afSmrg		basic_machine=m68k-apple
1068382ff0afSmrg		;;
1069382ff0afSmrg	pmac | pmac-mpw)
1070382ff0afSmrg		basic_machine=powerpc-apple
1071382ff0afSmrg		;;
1072382ff0afSmrg	*-unknown)
1073382ff0afSmrg		# Make sure to match an already-canonicalized machine name.
1074382ff0afSmrg		;;
1075382ff0afSmrg	*)
1076382ff0afSmrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1077382ff0afSmrg		exit 1
1078382ff0afSmrg		;;
1079382ff0afSmrgesac
1080382ff0afSmrg
1081382ff0afSmrg# Here we canonicalize certain aliases for manufacturers.
1082382ff0afSmrgcase $basic_machine in
1083382ff0afSmrg	*-digital*)
1084382ff0afSmrg		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1085382ff0afSmrg		;;
1086382ff0afSmrg	*-commodore*)
1087382ff0afSmrg		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1088382ff0afSmrg		;;
1089382ff0afSmrg	*)
1090382ff0afSmrg		;;
1091382ff0afSmrgesac
1092382ff0afSmrg
1093382ff0afSmrg# Decode manufacturer-specific aliases for certain operating systems.
1094382ff0afSmrg
1095382ff0afSmrgif [ x"$os" != x"" ]
1096382ff0afSmrgthen
1097382ff0afSmrgcase $os in
1098382ff0afSmrg        # First match some system type aliases
1099382ff0afSmrg        # that might get confused with valid system types.
1100382ff0afSmrg	# -solaris* is a basic system type, with this one exception.
1101382ff0afSmrg	-solaris1 | -solaris1.*)
1102382ff0afSmrg		os=`echo $os | sed -e 's|solaris1|sunos4|'`
1103382ff0afSmrg		;;
1104382ff0afSmrg	-solaris)
1105382ff0afSmrg		os=-solaris2
1106382ff0afSmrg		;;
1107382ff0afSmrg	-svr4*)
1108382ff0afSmrg		os=-sysv4
1109382ff0afSmrg		;;
1110382ff0afSmrg	-unixware*)
1111382ff0afSmrg		os=-sysv4.2uw
1112382ff0afSmrg		;;
1113382ff0afSmrg	-gnu/linux*)
1114382ff0afSmrg		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1115382ff0afSmrg		;;
1116382ff0afSmrg	# First accept the basic system types.
1117382ff0afSmrg	# The portable systems comes first.
1118382ff0afSmrg	# Each alternative MUST END IN A *, to match a version number.
1119382ff0afSmrg	# -sysv* is not here because it comes later, after sysvr4.
1120382ff0afSmrg	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1121382ff0afSmrg	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1122382ff0afSmrg	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1123382ff0afSmrg	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1124382ff0afSmrg	      | -aos* \
1125382ff0afSmrg	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1126382ff0afSmrg	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1127382ff0afSmrg	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
1128382ff0afSmrg	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1129382ff0afSmrg	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1130382ff0afSmrg	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1131382ff0afSmrg	      | -chorusos* | -chorusrdb* \
1132382ff0afSmrg	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1133382ff0afSmrg	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
1134382ff0afSmrg	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1135382ff0afSmrg	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1136382ff0afSmrg	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1137382ff0afSmrg	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1138382ff0afSmrg	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1139382ff0afSmrg	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
1140382ff0afSmrg	# Remember, each alternative MUST END IN *, to match a version number.
1141382ff0afSmrg		;;
1142382ff0afSmrg	-qnx*)
1143382ff0afSmrg		case $basic_machine in
1144382ff0afSmrg		    x86-* | i*86-*)
1145382ff0afSmrg			;;
1146382ff0afSmrg		    *)
1147382ff0afSmrg			os=-nto$os
1148382ff0afSmrg			;;
1149382ff0afSmrg		esac
1150382ff0afSmrg		;;
1151382ff0afSmrg	-nto-qnx*)
1152382ff0afSmrg		;;
1153382ff0afSmrg	-nto*)
1154382ff0afSmrg		os=`echo $os | sed -e 's|nto|nto-qnx|'`
1155382ff0afSmrg		;;
1156382ff0afSmrg	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1157382ff0afSmrg	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1158382ff0afSmrg	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1159382ff0afSmrg		;;
1160382ff0afSmrg	-mac*)
1161382ff0afSmrg		os=`echo $os | sed -e 's|mac|macos|'`
1162382ff0afSmrg		;;
1163382ff0afSmrg	-linux*)
1164382ff0afSmrg		os=`echo $os | sed -e 's|linux|linux-gnu|'`
1165382ff0afSmrg		;;
1166382ff0afSmrg	-sunos5*)
1167382ff0afSmrg		os=`echo $os | sed -e 's|sunos5|solaris2|'`
1168382ff0afSmrg		;;
1169382ff0afSmrg	-sunos6*)
1170382ff0afSmrg		os=`echo $os | sed -e 's|sunos6|solaris3|'`
1171382ff0afSmrg		;;
1172382ff0afSmrg	-opened*)
1173382ff0afSmrg		os=-openedition
1174382ff0afSmrg		;;
1175382ff0afSmrg	-wince*)
1176382ff0afSmrg		os=-wince
1177382ff0afSmrg		;;
1178382ff0afSmrg	-osfrose*)
1179382ff0afSmrg		os=-osfrose
1180382ff0afSmrg		;;
1181382ff0afSmrg	-osf*)
1182382ff0afSmrg		os=-osf
1183382ff0afSmrg		;;
1184382ff0afSmrg	-utek*)
1185382ff0afSmrg		os=-bsd
1186382ff0afSmrg		;;
1187382ff0afSmrg	-dynix*)
1188382ff0afSmrg		os=-bsd
1189382ff0afSmrg		;;
1190382ff0afSmrg	-acis*)
1191382ff0afSmrg		os=-aos
1192382ff0afSmrg		;;
1193382ff0afSmrg	-atheos*)
1194382ff0afSmrg		os=-atheos
1195382ff0afSmrg		;;
1196382ff0afSmrg	-386bsd)
1197382ff0afSmrg		os=-bsd
1198382ff0afSmrg		;;
1199382ff0afSmrg	-ctix* | -uts*)
1200382ff0afSmrg		os=-sysv
1201382ff0afSmrg		;;
1202382ff0afSmrg	-nova*)
1203382ff0afSmrg		os=-rtmk-nova
1204382ff0afSmrg		;;
1205382ff0afSmrg	-ns2 )
1206382ff0afSmrg		os=-nextstep2
1207382ff0afSmrg		;;
1208382ff0afSmrg	-nsk*)
1209382ff0afSmrg		os=-nsk
1210382ff0afSmrg		;;
1211382ff0afSmrg	# Preserve the version number of sinix5.
1212382ff0afSmrg	-sinix5.*)
1213382ff0afSmrg		os=`echo $os | sed -e 's|sinix|sysv|'`
1214382ff0afSmrg		;;
1215382ff0afSmrg	-sinix*)
1216382ff0afSmrg		os=-sysv4
1217382ff0afSmrg		;;
1218382ff0afSmrg	-triton*)
1219382ff0afSmrg		os=-sysv3
1220382ff0afSmrg		;;
1221382ff0afSmrg	-oss*)
1222382ff0afSmrg		os=-sysv3
1223382ff0afSmrg		;;
1224382ff0afSmrg	-svr4)
1225382ff0afSmrg		os=-sysv4
1226382ff0afSmrg		;;
1227382ff0afSmrg	-svr3)
1228382ff0afSmrg		os=-sysv3
1229382ff0afSmrg		;;
1230382ff0afSmrg	-sysvr4)
1231382ff0afSmrg		os=-sysv4
1232382ff0afSmrg		;;
1233382ff0afSmrg	# This must come after -sysvr4.
1234382ff0afSmrg	-sysv*)
1235382ff0afSmrg		;;
1236382ff0afSmrg	-ose*)
1237382ff0afSmrg		os=-ose
1238382ff0afSmrg		;;
1239382ff0afSmrg	-es1800*)
1240382ff0afSmrg		os=-ose
1241382ff0afSmrg		;;
1242382ff0afSmrg	-xenix)
1243382ff0afSmrg		os=-xenix
1244382ff0afSmrg		;;
1245382ff0afSmrg	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1246382ff0afSmrg		os=-mint
1247382ff0afSmrg		;;
1248382ff0afSmrg	-aros*)
1249382ff0afSmrg		os=-aros
1250382ff0afSmrg		;;
1251382ff0afSmrg	-kaos*)
1252382ff0afSmrg		os=-kaos
1253382ff0afSmrg		;;
1254382ff0afSmrg	-none)
1255382ff0afSmrg		;;
1256382ff0afSmrg	*)
1257382ff0afSmrg		# Get rid of the `-' at the beginning of $os.
1258382ff0afSmrg		os=`echo $os | sed 's/[^-]*-//'`
1259382ff0afSmrg		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1260382ff0afSmrg		exit 1
1261382ff0afSmrg		;;
1262382ff0afSmrgesac
1263382ff0afSmrgelse
1264382ff0afSmrg
1265382ff0afSmrg# Here we handle the default operating systems that come with various machines.
1266382ff0afSmrg# The value should be what the vendor currently ships out the door with their
1267382ff0afSmrg# machine or put another way, the most popular os provided with the machine.
1268382ff0afSmrg
1269382ff0afSmrg# Note that if you're going to try to match "-MANUFACTURER" here (say,
1270382ff0afSmrg# "-sun"), then you have to tell the case statement up towards the top
1271382ff0afSmrg# that MANUFACTURER isn't an operating system.  Otherwise, code above
1272382ff0afSmrg# will signal an error saying that MANUFACTURER isn't an operating
1273382ff0afSmrg# system, and we'll never get to this point.
1274382ff0afSmrg
1275382ff0afSmrgcase $basic_machine in
1276382ff0afSmrg	*-acorn)
1277382ff0afSmrg		os=-riscix1.2
1278382ff0afSmrg		;;
1279382ff0afSmrg	arm*-rebel)
1280382ff0afSmrg		os=-linux
1281382ff0afSmrg		;;
1282382ff0afSmrg	arm*-semi)
1283382ff0afSmrg		os=-aout
1284382ff0afSmrg		;;
1285382ff0afSmrg	c4x-* | tic4x-*)
1286382ff0afSmrg		os=-coff
1287382ff0afSmrg		;;
1288382ff0afSmrg	# This must come before the *-dec entry.
1289382ff0afSmrg	pdp10-*)
1290382ff0afSmrg		os=-tops20
1291382ff0afSmrg		;;
1292382ff0afSmrg	pdp11-*)
1293382ff0afSmrg		os=-none
1294382ff0afSmrg		;;
1295382ff0afSmrg	*-dec | vax-*)
1296382ff0afSmrg		os=-ultrix4.2
1297382ff0afSmrg		;;
1298382ff0afSmrg	m68*-apollo)
1299382ff0afSmrg		os=-domain
1300382ff0afSmrg		;;
1301382ff0afSmrg	i386-sun)
1302382ff0afSmrg		os=-sunos4.0.2
1303382ff0afSmrg		;;
1304382ff0afSmrg	m68000-sun)
1305382ff0afSmrg		os=-sunos3
1306382ff0afSmrg		# This also exists in the configure program, but was not the
1307382ff0afSmrg		# default.
1308382ff0afSmrg		# os=-sunos4
1309382ff0afSmrg		;;
1310382ff0afSmrg	m68*-cisco)
1311382ff0afSmrg		os=-aout
1312382ff0afSmrg		;;
1313382ff0afSmrg	mips*-cisco)
1314382ff0afSmrg		os=-elf
1315382ff0afSmrg		;;
1316382ff0afSmrg	mips*-*)
1317382ff0afSmrg		os=-elf
1318382ff0afSmrg		;;
1319382ff0afSmrg	or32-*)
1320382ff0afSmrg		os=-coff
1321382ff0afSmrg		;;
1322382ff0afSmrg	*-tti)	# must be before sparc entry or we get the wrong os.
1323382ff0afSmrg		os=-sysv3
1324382ff0afSmrg		;;
1325382ff0afSmrg	sparc-* | *-sun)
1326382ff0afSmrg		os=-sunos4.1.1
1327382ff0afSmrg		;;
1328382ff0afSmrg	*-be)
1329382ff0afSmrg		os=-beos
1330382ff0afSmrg		;;
1331382ff0afSmrg	*-ibm)
1332382ff0afSmrg		os=-aix
1333382ff0afSmrg		;;
1334382ff0afSmrg	*-wec)
1335382ff0afSmrg		os=-proelf
1336382ff0afSmrg		;;
1337382ff0afSmrg	*-winbond)
1338382ff0afSmrg		os=-proelf
1339382ff0afSmrg		;;
1340382ff0afSmrg	*-oki)
1341382ff0afSmrg		os=-proelf
1342382ff0afSmrg		;;
1343382ff0afSmrg	*-hp)
1344382ff0afSmrg		os=-hpux
1345382ff0afSmrg		;;
1346382ff0afSmrg	*-hitachi)
1347382ff0afSmrg		os=-hiux
1348382ff0afSmrg		;;
1349382ff0afSmrg	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1350382ff0afSmrg		os=-sysv
1351382ff0afSmrg		;;
1352382ff0afSmrg	*-cbm)
1353382ff0afSmrg		os=-amigaos
1354382ff0afSmrg		;;
1355382ff0afSmrg	*-dg)
1356382ff0afSmrg		os=-dgux
1357382ff0afSmrg		;;
1358382ff0afSmrg	*-dolphin)
1359382ff0afSmrg		os=-sysv3
1360382ff0afSmrg		;;
1361382ff0afSmrg	m68k-ccur)
1362382ff0afSmrg		os=-rtu
1363382ff0afSmrg		;;
1364382ff0afSmrg	m88k-omron*)
1365382ff0afSmrg		os=-luna
1366382ff0afSmrg		;;
1367382ff0afSmrg	*-next )
1368382ff0afSmrg		os=-nextstep
1369382ff0afSmrg		;;
1370382ff0afSmrg	*-sequent)
1371382ff0afSmrg		os=-ptx
1372382ff0afSmrg		;;
1373382ff0afSmrg	*-crds)
1374382ff0afSmrg		os=-unos
1375382ff0afSmrg		;;
1376382ff0afSmrg	*-ns)
1377382ff0afSmrg		os=-genix
1378382ff0afSmrg		;;
1379382ff0afSmrg	i370-*)
1380382ff0afSmrg		os=-mvs
1381382ff0afSmrg		;;
1382382ff0afSmrg	*-next)
1383382ff0afSmrg		os=-nextstep3
1384382ff0afSmrg		;;
1385382ff0afSmrg	*-gould)
1386382ff0afSmrg		os=-sysv
1387382ff0afSmrg		;;
1388382ff0afSmrg	*-highlevel)
1389382ff0afSmrg		os=-bsd
1390382ff0afSmrg		;;
1391382ff0afSmrg	*-encore)
1392382ff0afSmrg		os=-bsd
1393382ff0afSmrg		;;
1394382ff0afSmrg	*-sgi)
1395382ff0afSmrg		os=-irix
1396382ff0afSmrg		;;
1397382ff0afSmrg	*-siemens)
1398382ff0afSmrg		os=-sysv4
1399382ff0afSmrg		;;
1400382ff0afSmrg	*-masscomp)
1401382ff0afSmrg		os=-rtu
1402382ff0afSmrg		;;
1403382ff0afSmrg	f30[01]-fujitsu | f700-fujitsu)
1404382ff0afSmrg		os=-uxpv
1405382ff0afSmrg		;;
1406382ff0afSmrg	*-rom68k)
1407382ff0afSmrg		os=-coff
1408382ff0afSmrg		;;
1409382ff0afSmrg	*-*bug)
1410382ff0afSmrg		os=-coff
1411382ff0afSmrg		;;
1412382ff0afSmrg	*-apple)
1413382ff0afSmrg		os=-macos
1414382ff0afSmrg		;;
1415382ff0afSmrg	*-atari*)
1416382ff0afSmrg		os=-mint
1417382ff0afSmrg		;;
1418382ff0afSmrg	*)
1419382ff0afSmrg		os=-none
1420382ff0afSmrg		;;
1421382ff0afSmrgesac
1422382ff0afSmrgfi
1423382ff0afSmrg
1424382ff0afSmrg# Here we handle the case where we know the os, and the CPU type, but not the
1425382ff0afSmrg# manufacturer.  We pick the logical manufacturer.
1426382ff0afSmrgvendor=unknown
1427382ff0afSmrgcase $basic_machine in
1428382ff0afSmrg	*-unknown)
1429382ff0afSmrg		case $os in
1430382ff0afSmrg			-riscix*)
1431382ff0afSmrg				vendor=acorn
1432382ff0afSmrg				;;
1433382ff0afSmrg			-sunos*)
1434382ff0afSmrg				vendor=sun
1435382ff0afSmrg				;;
1436382ff0afSmrg			-aix*)
1437382ff0afSmrg				vendor=ibm
1438382ff0afSmrg				;;
1439382ff0afSmrg			-beos*)
1440382ff0afSmrg				vendor=be
1441382ff0afSmrg				;;
1442382ff0afSmrg			-hpux*)
1443382ff0afSmrg				vendor=hp
1444382ff0afSmrg				;;
1445382ff0afSmrg			-mpeix*)
1446382ff0afSmrg				vendor=hp
1447382ff0afSmrg				;;
1448382ff0afSmrg			-hiux*)
1449382ff0afSmrg				vendor=hitachi
1450382ff0afSmrg				;;
1451382ff0afSmrg			-unos*)
1452382ff0afSmrg				vendor=crds
1453382ff0afSmrg				;;
1454382ff0afSmrg			-dgux*)
1455382ff0afSmrg				vendor=dg
1456382ff0afSmrg				;;
1457382ff0afSmrg			-luna*)
1458382ff0afSmrg				vendor=omron
1459382ff0afSmrg				;;
1460382ff0afSmrg			-genix*)
1461382ff0afSmrg				vendor=ns
1462382ff0afSmrg				;;
1463382ff0afSmrg			-mvs* | -opened*)
1464382ff0afSmrg				vendor=ibm
1465382ff0afSmrg				;;
1466382ff0afSmrg			-ptx*)
1467382ff0afSmrg				vendor=sequent
1468382ff0afSmrg				;;
1469382ff0afSmrg			-vxsim* | -vxworks* | -windiss*)
1470382ff0afSmrg				vendor=wrs
1471382ff0afSmrg				;;
1472382ff0afSmrg			-aux*)
1473382ff0afSmrg				vendor=apple
1474382ff0afSmrg				;;
1475382ff0afSmrg			-hms*)
1476382ff0afSmrg				vendor=hitachi
1477382ff0afSmrg				;;
1478382ff0afSmrg			-mpw* | -macos*)
1479382ff0afSmrg				vendor=apple
1480382ff0afSmrg				;;
1481382ff0afSmrg			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1482382ff0afSmrg				vendor=atari
1483382ff0afSmrg				;;
1484382ff0afSmrg			-vos*)
1485382ff0afSmrg				vendor=stratus
1486382ff0afSmrg				;;
1487382ff0afSmrg		esac
1488382ff0afSmrg		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1489382ff0afSmrg		;;
1490382ff0afSmrgesac
1491382ff0afSmrg
1492382ff0afSmrgecho $basic_machine$os
1493382ff0afSmrgexit 0
1494382ff0afSmrg
1495382ff0afSmrg# Local variables:
1496382ff0afSmrg# eval: (add-hook 'write-file-hooks 'time-stamp)
1497382ff0afSmrg# time-stamp-start: "timestamp='"
1498382ff0afSmrg# time-stamp-format: "%:y-%02m-%02d"
1499382ff0afSmrg# time-stamp-end: "'"
1500382ff0afSmrg# End:
1501