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