Merged from emacs@sv.gnu.org. Last-minute emacsclient rewrites be damned!
[bpt/emacs.git] / config.sub
CommitLineData
c3e2153c 1#! /bin/sh
4e405419
PE
2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
667f78d7 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
40583571 5
667f78d7 6timestamp='2006-04-20'
40583571 7
955e036a
RS
8# This file is (in principle) common to ALL GNU software.
9# The presence of a machine in this file suggests that SOME GNU software
6d686a8d 10# can handle that machine. It does not imply ALL GNU software can.
764954ef
DM
11#
12# This file is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
c9ac21eb
PE
24# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25# 02110-1301, USA.
26#
764954ef
DM
27# As a special exception to the GNU General Public License, if you
28# distribute this file as part of a program that contains a
29# configuration script generated by Autoconf, you may include it under
30# the same distribution terms that you use for the rest of that program.
fb955dfa 31
c9ac21eb 32
4e405419
PE
33# Please send patches to <config-patches@gnu.org>. Submit a context
34# diff and a properly formatted ChangeLog entry.
3a27fa96 35#
fb955dfa
RS
36# Configuration subroutine to validate and canonicalize a configuration type.
37# Supply the specified configuration type as an argument.
38# If it is invalid, we print an error message on stderr and exit with code 1.
39# Otherwise, we print the canonical config type on stdout and succeed.
40
41# This file is supposed to be the same for all GNU packages
42# and recognize all the CPU types, system types and aliases
43# that are meaningful with *any* GNU software.
44# Each package is responsible for reporting which valid configurations
45# it does not support. The user should be able to distinguish
46# a failure to support a valid configuration from a meaningless
47# configuration.
48
49# The goal of this file is to map all the various variations of a given
50# machine specification into a single specification in the form:
51# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
39110bdb
RK
52# or in some cases, the newer four-part form:
53# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
efc3fd67 54# It is wrong to echo any other type of specification.
fb955dfa 55
40583571 56me=`echo "$0" | sed -e 's,.*/,,'`
051d1419 57
40583571
DL
58usage="\
59Usage: $0 [OPTION] CPU-MFR-OPSYS
60 $0 [OPTION] ALIAS
61
62Canonicalize a configuration name.
63
64Operation modes:
4e405419
PE
65 -h, --help print this help, then exit
66 -t, --time-stamp print date of last modification, then exit
67 -v, --version print version number, then exit
68
69Report bugs and patches to <config-patches@gnu.org>."
70
71version="\
72GNU config.sub ($timestamp)
73
c9ac21eb 74Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
4e405419
PE
75Free Software Foundation, Inc.
76
77This is free software; see the source for copying conditions. There is NO
78warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
40583571
DL
79
80help="
81Try \`$me --help' for more information."
82
83# Parse command line
84while test $# -gt 0 ; do
4e405419
PE
85 case $1 in
86 --time-stamp | --time* | -t )
c9ac21eb 87 echo "$timestamp" ; exit ;;
4e405419 88 --version | -v )
c9ac21eb 89 echo "$version" ; exit ;;
40583571 90 --help | --h* | -h )
c9ac21eb 91 echo "$usage"; exit ;;
40583571
DL
92 -- ) # Stop option processing
93 shift; break ;;
94 - ) # Use stdin as input.
95 break ;;
96 -* )
4e405419 97 echo "$me: invalid option $1$help"
40583571
DL
98 exit 1 ;;
99
100 *local*)
101 # First pass through any local machine types.
102 echo $1
c9ac21eb 103 exit ;;
40583571
DL
104
105 * )
106 break ;;
107 esac
108done
109
110case $# in
111 0) echo "$me: missing argument$help" >&2
112 exit 1;;
113 1) ;;
114 *) echo "$me: too many arguments$help" >&2
115 exit 1;;
fb955dfa
RS
116esac
117
39110bdb
RK
118# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
119# Here we must recognize all the valid KERNEL-OS combinations.
120maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121case $maybe_os in
88ec8c53
AS
122 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
123 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
124 storm-chaos* | os2-emx* | rtmk-nova*)
39110bdb
RK
125 os=-$maybe_os
126 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
127 ;;
128 *)
129 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
130 if [ $basic_machine != $1 ]
131 then os=`echo $1 | sed 's/.*-/-/'`
132 else os=; fi
133 ;;
134esac
fb955dfa 135
efc3fd67
JB
136### Let's recognize common machines as not being operating systems so
137### that things like config.sub decstation-3100 work. We also
138### recognize some manufacturers as not being operating systems, so we
139### can provide default operating systems below.
fb955dfa 140case $os in
1f532861
RS
141 -sun*os*)
142 # Prevent following clause from handling this invalid input.
143 ;;
fb955dfa
RS
144 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
145 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
a975e06d 146 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
867c43c4 147 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
fb955dfa 148 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
7f154406 149 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
c9ac21eb 150 -apple | -axis | -knuth | -cray)
fb955dfa
RS
151 os=
152 basic_machine=$1
153 ;;
e3d1469c
BE
154 -sim | -cisco | -oki | -wec | -winbond)
155 os=
156 basic_machine=$1
157 ;;
158 -scout)
159 ;;
160 -wrs)
3a27fa96 161 os=-vxworks
e3d1469c
BE
162 basic_machine=$1
163 ;;
4e405419
PE
164 -chorusos*)
165 os=-chorusos
166 basic_machine=$1
167 ;;
168 -chorusrdb)
169 os=-chorusrdb
170 basic_machine=$1
171 ;;
9e976cfa 172 -hiux*)
d699cb47 173 os=-hiuxwe2
9e976cfa 174 ;;
88ec8c53
AS
175 -sco6)
176 os=-sco5v6
177 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
178 ;;
c83704f3 179 -sco5)
e3d1469c 180 os=-sco3.2v5
39110bdb 181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
c83704f3 182 ;;
d05b1883
RS
183 -sco4)
184 os=-sco3.2v4
39110bdb 185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
d05b1883
RS
186 ;;
187 -sco3.2.[4-9]*)
188 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
39110bdb 189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
d05b1883 190 ;;
cf7a78db
RS
191 -sco3.2v[4-9]*)
192 # Don't forget version if it is 3.2v4 or newer.
39110bdb 193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
cf7a78db 194 ;;
88ec8c53
AS
195 -sco5v6*)
196 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198 ;;
fb955dfa 199 -sco*)
f9f15513 200 os=-sco3.2v2
39110bdb 201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
fb955dfa 202 ;;
e3d1469c
BE
203 -udk*)
204 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
205 ;;
efc3fd67
JB
206 -isc)
207 os=-isc2.2
39110bdb 208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
efc3fd67 209 ;;
de025efd
RS
210 -clix*)
211 basic_machine=clipper-intergraph
212 ;;
fb955dfa 213 -isc*)
39110bdb 214 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
fb955dfa 215 ;;
bfda6e4f 216 -lynx*)
4c934a4d
JW
217 os=-lynxos
218 ;;
b7f0280f
RK
219 -ptx*)
220 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
221 ;;
faa4bf12
RK
222 -windowsnt*)
223 os=`echo $os | sed -e 's/windowsnt/winnt/'`
224 ;;
805132d6
RK
225 -psos*)
226 os=-psos
227 ;;
3a27fa96
GM
228 -mint | -mint[0-9]*)
229 basic_machine=m68k-atari
230 os=-mint
231 ;;
fb955dfa
RS
232esac
233
234# Decode aliases for certain CPU-COMPANY combinations.
235case $basic_machine in
665eef22 236 # Recognize the basic CPU types without company name.
fb955dfa 237 # Some are omitted here because they have special meanings below.
4e405419
PE
238 1750a | 580 \
239 | a29k \
240 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
241 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
c9ac21eb 242 | am33_2.0 \
4e405419 243 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
c9ac21eb
PE
244 | bfin \
245 | c4x | clipper \
8c95f450
JB
246 | d10v | d30v | dlx | dsp16xx \
247 | fr30 | frv \
4e405419
PE
248 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
249 | i370 | i860 | i960 | ia64 \
c9ac21eb 250 | ip2k | iq2000 \
88ec8c53 251 | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
8c95f450
JB
252 | mips | mipsbe | mipseb | mipsel | mipsle \
253 | mips16 \
254 | mips64 | mips64el \
255 | mips64vr | mips64vrel \
256 | mips64orion | mips64orionel \
257 | mips64vr4100 | mips64vr4100el \
258 | mips64vr4300 | mips64vr4300el \
259 | mips64vr5000 | mips64vr5000el \
c9ac21eb 260 | mips64vr5900 | mips64vr5900el \
8c95f450 261 | mipsisa32 | mipsisa32el \
c9ac21eb 262 | mipsisa32r2 | mipsisa32r2el \
8c95f450 263 | mipsisa64 | mipsisa64el \
c9ac21eb 264 | mipsisa64r2 | mipsisa64r2el \
8c95f450
JB
265 | mipsisa64sb1 | mipsisa64sb1el \
266 | mipsisa64sr71k | mipsisa64sr71kel \
267 | mipstx39 | mipstx39el \
4e405419 268 | mn10200 | mn10300 \
88ec8c53 269 | mt \
c9ac21eb 270 | msp430 \
4e405419 271 | ns16k | ns32k \
c9ac21eb 272 | or32 \
4e405419
PE
273 | pdp10 | pdp11 | pj | pjl \
274 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
275 | pyramid \
c9ac21eb 276 | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
8c95f450 277 | sh64 | sh64le \
c9ac21eb
PE
278 | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
279 | sparcv8 | sparcv9 | sparcv9b \
4e405419 280 | strongarm \
c9ac21eb 281 | tahoe | thumb | tic4x | tic80 | tron \
4e405419
PE
282 | v850 | v850e \
283 | we32k \
c9ac21eb 284 | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
4e405419 285 | z8k)
40583571
DL
286 basic_machine=$basic_machine-unknown
287 ;;
c9ac21eb
PE
288 m32c)
289 basic_machine=$basic_machine-unknown
290 ;;
40583571
DL
291 m6811 | m68hc11 | m6812 | m68hc12)
292 # Motorola 68HC11/12.
fb955dfa 293 basic_machine=$basic_machine-unknown
40583571 294 os=-none
fb955dfa 295 ;;
4e405419 296 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
e3d1469c 297 ;;
88ec8c53
AS
298 ms1)
299 basic_machine=mt-unknown
300 ;;
e3d1469c 301
39110bdb
RK
302 # We use `pc' rather than `unknown'
303 # because (1) that's what they normally are, and
304 # (2) the word "unknown" tends to confuse beginning users.
4e405419 305 i*86 | x86_64)
39110bdb
RK
306 basic_machine=$basic_machine-pc
307 ;;
1f532861
RS
308 # Object if more than one company name word.
309 *-*-*)
310 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
311 exit 1
312 ;;
665eef22 313 # Recognize the basic CPU types with company name.
4e405419
PE
314 580-* \
315 | a29k-* \
316 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
317 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
318 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
319 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
320 | avr-* \
c9ac21eb
PE
321 | bfin-* | bs2000-* \
322 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
323 | clipper-* | craynv-* | cydra-* \
8c95f450 324 | d10v-* | d30v-* | dlx-* \
4e405419 325 | elxsi-* \
8c95f450 326 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
4e405419
PE
327 | h8300-* | h8500-* \
328 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
329 | i*86-* | i860-* | i960-* | ia64-* \
c9ac21eb
PE
330 | ip2k-* | iq2000-* \
331 | m32r-* | m32rle-* \
4e405419 332 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
c9ac21eb 333 | m88110-* | m88k-* | maxq-* | mcore-* \
8c95f450
JB
334 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
335 | mips16-* \
336 | mips64-* | mips64el-* \
337 | mips64vr-* | mips64vrel-* \
338 | mips64orion-* | mips64orionel-* \
339 | mips64vr4100-* | mips64vr4100el-* \
340 | mips64vr4300-* | mips64vr4300el-* \
341 | mips64vr5000-* | mips64vr5000el-* \
c9ac21eb 342 | mips64vr5900-* | mips64vr5900el-* \
8c95f450 343 | mipsisa32-* | mipsisa32el-* \
c9ac21eb 344 | mipsisa32r2-* | mipsisa32r2el-* \
8c95f450 345 | mipsisa64-* | mipsisa64el-* \
c9ac21eb 346 | mipsisa64r2-* | mipsisa64r2el-* \
8c95f450
JB
347 | mipsisa64sb1-* | mipsisa64sb1el-* \
348 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
c9ac21eb
PE
349 | mipstx39-* | mipstx39el-* \
350 | mmix-* \
88ec8c53 351 | mt-* \
c9ac21eb 352 | msp430-* \
4e405419
PE
353 | none-* | np1-* | ns16k-* | ns32k-* \
354 | orion-* \
355 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
356 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
357 | pyramid-* \
358 | romp-* | rs6000-* \
c9ac21eb 359 | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
8c95f450 360 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
c9ac21eb
PE
361 | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
362 | sparclite-* \
363 | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
364 | tahoe-* | thumb-* \
365 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
366 | tron-* \
4e405419
PE
367 | v850-* | v850e-* | vax-* \
368 | we32k-* \
c9ac21eb
PE
369 | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
370 | xstormy16-* | xtensa-* \
4e405419
PE
371 | ymp-* \
372 | z8k-*)
fb955dfa 373 ;;
c9ac21eb
PE
374 m32c-*)
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 ;;
c9ac21eb
PE
913 sei)
914 basic_machine=mips-sei
915 os=-seiux
916 ;;
b7f0280f
RK
917 sequent)
918 basic_machine=i386-sequent
919 ;;
e65767df
RS
920 sh)
921 basic_machine=sh-hitachi
922 os=-hms
ac1e607f 923 ;;
c9ac21eb
PE
924 sh64)
925 basic_machine=sh64-unknown
926 ;;
4e405419 927 sparclite-wrs | simso-wrs)
e3d1469c
BE
928 basic_machine=sparclite-wrs
929 os=-vxworks
930 ;;
ac1e607f
JB
931 sps7)
932 basic_machine=m68k-bull
933 os=-sysv2
fb955dfa 934 ;;
e65767df
RS
935 spur)
936 basic_machine=spur-unknown
fb955dfa 937 ;;
e3d1469c
BE
938 st2000)
939 basic_machine=m68k-tandem
940 ;;
941 stratus)
942 basic_machine=i860-stratus
943 os=-sysv4
944 ;;
e65767df
RS
945 sun2)
946 basic_machine=m68000-sun
d63887ad 947 ;;
e65767df
RS
948 sun2os3)
949 basic_machine=m68000-sun
950 os=-sunos3
fb955dfa 951 ;;
e65767df
RS
952 sun2os4)
953 basic_machine=m68000-sun
954 os=-sunos4
fb955dfa 955 ;;
e65767df
RS
956 sun3os3)
957 basic_machine=m68k-sun
958 os=-sunos3
fb955dfa 959 ;;
e65767df
RS
960 sun3os4)
961 basic_machine=m68k-sun
962 os=-sunos4
fb955dfa 963 ;;
e65767df
RS
964 sun4os3)
965 basic_machine=sparc-sun
966 os=-sunos3
fb955dfa 967 ;;
e65767df
RS
968 sun4os4)
969 basic_machine=sparc-sun
970 os=-sunos4
fb955dfa 971 ;;
fa2b2917
DE
972 sun4sol2)
973 basic_machine=sparc-sun
974 os=-solaris2
975 ;;
275cb364 976 sun3 | sun3-*)
e65767df 977 basic_machine=m68k-sun
fb955dfa 978 ;;
e65767df
RS
979 sun4)
980 basic_machine=sparc-sun
fb955dfa 981 ;;
e65767df
RS
982 sun386 | sun386i | roadrunner)
983 basic_machine=i386-sun
fb955dfa 984 ;;
8c95f450 985 sv1)
3a27fa96
GM
986 basic_machine=sv1-cray
987 os=-unicos
988 ;;
e65767df
RS
989 symmetry)
990 basic_machine=i386-sequent
991 os=-dynix
fb955dfa 992 ;;
e3d1469c 993 t3e)
4e405419
PE
994 basic_machine=alphaev5-cray
995 os=-unicos
996 ;;
997 t90)
998 basic_machine=t90-cray
e3d1469c
BE
999 os=-unicos
1000 ;;
40583571
DL
1001 tic54x | c54x*)
1002 basic_machine=tic54x-unknown
1003 os=-coff
1004 ;;
c9ac21eb
PE
1005 tic55x | c55x*)
1006 basic_machine=tic55x-unknown
1007 os=-coff
1008 ;;
1009 tic6x | c6x*)
1010 basic_machine=tic6x-unknown
1011 os=-coff
1012 ;;
ddee363a
JL
1013 tx39)
1014 basic_machine=mipstx39-unknown
1015 ;;
1016 tx39el)
1017 basic_machine=mipstx39el-unknown
1018 ;;
4e405419
PE
1019 toad1)
1020 basic_machine=pdp10-xkl
1021 os=-tops20
1022 ;;
e65767df
RS
1023 tower | tower-32)
1024 basic_machine=m68k-ncr
fb955dfa 1025 ;;
c9ac21eb
PE
1026 tpf)
1027 basic_machine=s390x-ibm
1028 os=-tpf
1029 ;;
051d1419
DE
1030 udi29k)
1031 basic_machine=a29k-amd
1032 os=-udi
1033 ;;
fb955dfa
RS
1034 ultra3)
1035 basic_machine=a29k-nyu
1036 os=-sym1
1037 ;;
e3d1469c
BE
1038 v810 | necv810)
1039 basic_machine=v810-nec
1040 os=-none
1041 ;;
e65767df
RS
1042 vaxv)
1043 basic_machine=vax-dec
1044 os=-sysv
1045 ;;
1046 vms)
1047 basic_machine=vax-dec
1048 os=-vms
1049 ;;
1b152a5d 1050 vpp*|vx|vx-*)
8c95f450
JB
1051 basic_machine=f301-fujitsu
1052 ;;
fb955dfa
RS
1053 vxworks960)
1054 basic_machine=i960-wrs
1055 os=-vxworks
1056 ;;
1057 vxworks68)
1058 basic_machine=m68k-wrs
1059 os=-vxworks
1060 ;;
0e2d2f37
DE
1061 vxworks29k)
1062 basic_machine=a29k-wrs
1063 os=-vxworks
1064 ;;
e3d1469c
BE
1065 w65*)
1066 basic_machine=w65-wdc
1067 os=-none
1068 ;;
1069 w89k-*)
1070 basic_machine=hppa1.1-winbond
1071 os=-proelf
1072 ;;
c9ac21eb
PE
1073 xbox)
1074 basic_machine=i686-pc
1075 os=-mingw32
1076 ;;
8c95f450 1077 xps | xps100)
efc3fd67
JB
1078 basic_machine=xps100-honeywell
1079 ;;
4e405419
PE
1080 ymp)
1081 basic_machine=ymp-cray
1082 os=-unicos
1083 ;;
e3d1469c
BE
1084 z8k-*-coff)
1085 basic_machine=z8k-unknown
1086 os=-sim
68f39654 1087 ;;
fb955dfa
RS
1088 none)
1089 basic_machine=none-none
1090 os=-none
1091 ;;
1092
1093# Here we handle the default manufacturer of certain CPU types. It is in
1094# some cases the only manufacturer, in others, it is the most popular.
e3d1469c
BE
1095 w89k)
1096 basic_machine=hppa1.1-winbond
1097 ;;
1098 op50n)
1099 basic_machine=hppa1.1-oki
1100 ;;
1101 op60c)
1102 basic_machine=hppa1.1-oki
1103 ;;
fb955dfa
RS
1104 romp)
1105 basic_machine=romp-ibm
1106 ;;
c9ac21eb
PE
1107 mmix)
1108 basic_machine=mmix-knuth
1109 ;;
fb955dfa
RS
1110 rs6000)
1111 basic_machine=rs6000-ibm
1112 ;;
1113 vax)
1114 basic_machine=vax-dec
1115 ;;
4e405419
PE
1116 pdp10)
1117 # there are many clones, so DEC is not a safe bet
1118 basic_machine=pdp10-unknown
1119 ;;
c157a899
RK
1120 pdp11)
1121 basic_machine=pdp11-dec
1122 ;;
3c9da312
RS
1123 we32k)
1124 basic_machine=we32k-att
1125 ;;
c9ac21eb 1126 sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
40583571
DL
1127 basic_machine=sh-unknown
1128 ;;
c9ac21eb 1129 sparc | sparcv8 | sparcv9 | sparcv9b)
fb955dfa
RS
1130 basic_machine=sparc-sun
1131 ;;
8c95f450 1132 cydra)
efc3fd67
JB
1133 basic_machine=cydra-cydrome
1134 ;;
1135 orion)
1136 basic_machine=orion-highlevel
1137 ;;
1138 orion105)
1139 basic_machine=clipper-highlevel
1140 ;;
e3d1469c
BE
1141 mac | mpw | mac-mpw)
1142 basic_machine=m68k-apple
1143 ;;
1144 pmac | pmac-mpw)
1145 basic_machine=powerpc-apple
1146 ;;
4e405419
PE
1147 *-unknown)
1148 # Make sure to match an already-canonicalized machine name.
1149 ;;
fb955dfa
RS
1150 *)
1151 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1152 exit 1
1153 ;;
1154esac
1155
1156# Here we canonicalize certain aliases for manufacturers.
1157case $basic_machine in
1158 *-digital*)
1159 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1160 ;;
1161 *-commodore*)
1162 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1163 ;;
1164 *)
1165 ;;
1166esac
1167
1168# Decode manufacturer-specific aliases for certain operating systems.
1169
51b3c82f 1170if [ x"$os" != x"" ]
fb955dfa
RS
1171then
1172case $os in
39110bdb
RK
1173 # First match some system type aliases
1174 # that might get confused with valid system types.
ca8efa98
RS
1175 # -solaris* is a basic system type, with this one exception.
1176 -solaris1 | -solaris1.*)
1177 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1178 ;;
f920529b
DE
1179 -solaris)
1180 os=-solaris2
1181 ;;
6d9cc10e 1182 -svr4*)
aa341c40
RK
1183 os=-sysv4
1184 ;;
6d9cc10e
RS
1185 -unixware*)
1186 os=-sysv4.2uw
1187 ;;
412239cc 1188 -gnu/linux*)
39110bdb 1189 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
412239cc 1190 ;;
fb955dfa
RS
1191 # First accept the basic system types.
1192 # The portable systems comes first.
56940d28 1193 # Each alternative MUST END IN A *, to match a version number.
74da8749 1194 # -sysv* is not here because it comes later, after sysvr4.
aab72f07 1195 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
40c3d4ae 1196 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
bacafaf1 1197 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
222ef66f 1198 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
576e9f39 1199 | -aos* \
dc04f89b
RK
1200 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1201 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
c9ac21eb
PE
1202 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1203 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1204 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
56940d28 1205 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
407d2741 1206 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
4e405419 1207 | -chorusos* | -chorusrdb* \
a9bc66c2 1208 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
88ec8c53
AS
1209 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1210 | -uxpv* | -beos* | -mpeix* | -udk* \
8c95f450 1211 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
4e405419
PE
1212 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1213 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1214 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
8c95f450 1215 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
c9ac21eb 1216 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
88ec8c53 1217 | -skyos* | -haiku* | -rdos*)
56940d28 1218 # Remember, each alternative MUST END IN *, to match a version number.
fb955dfa 1219 ;;
40583571
DL
1220 -qnx*)
1221 case $basic_machine in
4e405419 1222 x86-* | i*86-*)
40583571
DL
1223 ;;
1224 *)
1225 os=-nto$os
1226 ;;
1227 esac
1228 ;;
c9ac21eb
PE
1229 -nto-qnx*)
1230 ;;
40583571 1231 -nto*)
c9ac21eb 1232 os=`echo $os | sed -e 's|nto|nto-qnx|'`
40583571 1233 ;;
e3d1469c 1234 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
c9ac21eb 1235 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
3a27fa96 1236 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
e3d1469c
BE
1237 ;;
1238 -mac*)
1239 os=`echo $os | sed -e 's|mac|macos|'`
1240 ;;
c9ac21eb
PE
1241 -linux-dietlibc)
1242 os=-linux-dietlibc
1243 ;;
39110bdb
RK
1244 -linux*)
1245 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1246 ;;
ca8efa98
RS
1247 -sunos5*)
1248 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1249 ;;
1250 -sunos6*)
1251 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1252 ;;
3a27fa96
GM
1253 -opened*)
1254 os=-openedition
1255 ;;
c9ac21eb
PE
1256 -os400*)
1257 os=-os400
1258 ;;
3a27fa96
GM
1259 -wince*)
1260 os=-wince
1261 ;;
fb955dfa 1262 -osfrose*)
6d95ff37 1263 os=-osfrose
fb955dfa
RS
1264 ;;
1265 -osf*)
6d95ff37 1266 os=-osf
fb955dfa 1267 ;;
24616137
CH
1268 -utek*)
1269 os=-bsd
1270 ;;
fb955dfa
RS
1271 -dynix*)
1272 os=-bsd
1273 ;;
1274 -acis*)
1275 os=-aos
1276 ;;
4e405419
PE
1277 -atheos*)
1278 os=-atheos
1279 ;;
c9ac21eb
PE
1280 -syllable*)
1281 os=-syllable
1282 ;;
e3d1469c
BE
1283 -386bsd)
1284 os=-bsd
1285 ;;
fb955dfa
RS
1286 -ctix* | -uts*)
1287 os=-sysv
1288 ;;
4e405419
PE
1289 -nova*)
1290 os=-rtmk-nova
1291 ;;
9b30450e 1292 -ns2 )
8c95f450 1293 os=-nextstep2
9b30450e 1294 ;;
40583571
DL
1295 -nsk*)
1296 os=-nsk
1297 ;;
3e9430d9
RS
1298 # Preserve the version number of sinix5.
1299 -sinix5.*)
1300 os=`echo $os | sed -e 's|sinix|sysv|'`
1301 ;;
1302 -sinix*)
1303 os=-sysv4
1304 ;;
c9ac21eb
PE
1305 -tpf*)
1306 os=-tpf
1307 ;;
fb955dfa
RS
1308 -triton*)
1309 os=-sysv3
1310 ;;
1311 -oss*)
1312 os=-sysv3
1313 ;;
1314 -svr4)
1315 os=-sysv4
1316 ;;
74da8749
RS
1317 -svr3)
1318 os=-sysv3
1319 ;;
e294d0c3
RS
1320 -sysvr4)
1321 os=-sysv4
1322 ;;
74da8749
RS
1323 # This must come after -sysvr4.
1324 -sysv*)
fb955dfa 1325 ;;
e3d1469c
BE
1326 -ose*)
1327 os=-ose
1328 ;;
1329 -es1800*)
1330 os=-ose
1331 ;;
c809458b
JB
1332 -xenix)
1333 os=-xenix
1334 ;;
8c95f450
JB
1335 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1336 os=-mint
68f39654 1337 ;;
c9ac21eb
PE
1338 -aros*)
1339 os=-aros
1340 ;;
1341 -kaos*)
1342 os=-kaos
1343 ;;
1344 -zvmoe)
1345 os=-zvmoe
1346 ;;
955e036a
RS
1347 -none)
1348 ;;
fb955dfa
RS
1349 *)
1350 # Get rid of the `-' at the beginning of $os.
9f5aed1b 1351 os=`echo $os | sed 's/[^-]*-//'`
fb955dfa
RS
1352 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1353 exit 1
1354 ;;
1355esac
1356else
1357
1358# Here we handle the default operating systems that come with various machines.
1359# The value should be what the vendor currently ships out the door with their
1360# machine or put another way, the most popular os provided with the machine.
efc3fd67
JB
1361
1362# Note that if you're going to try to match "-MANUFACTURER" here (say,
1363# "-sun"), then you have to tell the case statement up towards the top
1364# that MANUFACTURER isn't an operating system. Otherwise, code above
1365# will signal an error saying that MANUFACTURER isn't an operating
1366# system, and we'll never get to this point.
1367
fb955dfa 1368case $basic_machine in
77ba1f30
ESB
1369 *-acorn)
1370 os=-riscix1.2
1371 ;;
3a27fa96 1372 arm*-rebel)
72e8143c
BE
1373 os=-linux
1374 ;;
5960289b
ESB
1375 arm*-semi)
1376 os=-aout
1377 ;;
c9ac21eb
PE
1378 c4x-* | tic4x-*)
1379 os=-coff
1380 ;;
4e405419
PE
1381 # This must come before the *-dec entry.
1382 pdp10-*)
1383 os=-tops20
1384 ;;
8c95f450 1385 pdp11-*)
c157a899
RK
1386 os=-none
1387 ;;
fb955dfa 1388 *-dec | vax-*)
60597872 1389 os=-ultrix4.2
fb955dfa 1390 ;;
a9f32bf3
RS
1391 m68*-apollo)
1392 os=-domain
1393 ;;
fb955dfa 1394 i386-sun)
60597872 1395 os=-sunos4.0.2
fb955dfa
RS
1396 ;;
1397 m68000-sun)
1398 os=-sunos3
1399 # This also exists in the configure program, but was not the
1400 # default.
1401 # os=-sunos4
1402 ;;
e3d1469c
BE
1403 m68*-cisco)
1404 os=-aout
1405 ;;
1406 mips*-cisco)
1407 os=-elf
1408 ;;
1409 mips*-*)
1410 os=-elf
1411 ;;
4e405419
PE
1412 or32-*)
1413 os=-coff
1414 ;;
fb955dfa
RS
1415 *-tti) # must be before sparc entry or we get the wrong os.
1416 os=-sysv3
1417 ;;
1418 sparc-* | *-sun)
60597872 1419 os=-sunos4.1.1
fb955dfa 1420 ;;
93eaded8
RS
1421 *-be)
1422 os=-beos
1423 ;;
c9ac21eb
PE
1424 *-haiku)
1425 os=-haiku
1426 ;;
fb955dfa
RS
1427 *-ibm)
1428 os=-aix
1429 ;;
c9ac21eb
PE
1430 *-knuth)
1431 os=-mmixware
1432 ;;
e3d1469c
BE
1433 *-wec)
1434 os=-proelf
1435 ;;
1436 *-winbond)
1437 os=-proelf
1438 ;;
1439 *-oki)
1440 os=-proelf
1441 ;;
fb955dfa
RS
1442 *-hp)
1443 os=-hpux
1444 ;;
9e976cfa
RK
1445 *-hitachi)
1446 os=-hiux
1447 ;;
efc3fd67 1448 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
fb955dfa
RS
1449 os=-sysv
1450 ;;
1451 *-cbm)
576e9f39 1452 os=-amigaos
fb955dfa
RS
1453 ;;
1454 *-dg)
1455 os=-dgux
1456 ;;
1457 *-dolphin)
1458 os=-sysv3
1459 ;;
1ee245eb
RS
1460 m68k-ccur)
1461 os=-rtu
1462 ;;
fb955dfa
RS
1463 m88k-omron*)
1464 os=-luna
1465 ;;
9b30450e
RS
1466 *-next )
1467 os=-nextstep
1468 ;;
9ac65684 1469 *-sequent)
b7f0280f 1470 os=-ptx
9ac65684 1471 ;;
fb955dfa
RS
1472 *-crds)
1473 os=-unos
1474 ;;
1475 *-ns)
1476 os=-genix
1477 ;;
f449890c
RS
1478 i370-*)
1479 os=-mvs
1480 ;;
88013905 1481 *-next)
a975e06d 1482 os=-nextstep3
88013905 1483 ;;
8c95f450 1484 *-gould)
efc3fd67
JB
1485 os=-sysv
1486 ;;
8c95f450 1487 *-highlevel)
efc3fd67
JB
1488 os=-bsd
1489 ;;
1490 *-encore)
1491 os=-bsd
1492 ;;
8c95f450 1493 *-sgi)
efc3fd67
JB
1494 os=-irix
1495 ;;
8c95f450 1496 *-siemens)
3e9430d9
RS
1497 os=-sysv4
1498 ;;
efc3fd67
JB
1499 *-masscomp)
1500 os=-rtu
1501 ;;
4e405419 1502 f30[01]-fujitsu | f700-fujitsu)
f440d049
DM
1503 os=-uxpv
1504 ;;
e3d1469c
BE
1505 *-rom68k)
1506 os=-coff
1507 ;;
1508 *-*bug)
1509 os=-coff
1510 ;;
1511 *-apple)
1512 os=-macos
1513 ;;
68f39654
BE
1514 *-atari*)
1515 os=-mint
1516 ;;
fb955dfa
RS
1517 *)
1518 os=-none
1519 ;;
1520esac
1521fi
1522
1523# Here we handle the case where we know the os, and the CPU type, but not the
1524# manufacturer. We pick the logical manufacturer.
1525vendor=unknown
1526case $basic_machine in
1527 *-unknown)
1528 case $os in
77ba1f30
ESB
1529 -riscix*)
1530 vendor=acorn
1531 ;;
fb955dfa
RS
1532 -sunos*)
1533 vendor=sun
1534 ;;
1535 -aix*)
1536 vendor=ibm
1537 ;;
e3d1469c
BE
1538 -beos*)
1539 vendor=be
fb955dfa 1540 ;;
e3d1469c 1541 -hpux*)
65cb17d5
ILT
1542 vendor=hp
1543 ;;
72e8143c
BE
1544 -mpeix*)
1545 vendor=hp
1546 ;;
9e976cfa
RK
1547 -hiux*)
1548 vendor=hitachi
1549 ;;
fb955dfa
RS
1550 -unos*)
1551 vendor=crds
1552 ;;
1553 -dgux*)
1554 vendor=dg
1555 ;;
1556 -luna*)
1557 vendor=omron
1558 ;;
1559 -genix*)
1560 vendor=ns
1561 ;;
3a27fa96 1562 -mvs* | -opened*)
f449890c
RS
1563 vendor=ibm
1564 ;;
c9ac21eb
PE
1565 -os400*)
1566 vendor=ibm
1567 ;;
b7f0280f
RK
1568 -ptx*)
1569 vendor=sequent
1570 ;;
c9ac21eb
PE
1571 -tpf*)
1572 vendor=ibm
1573 ;;
4e405419 1574 -vxsim* | -vxworks* | -windiss*)
602b4a3e
DE
1575 vendor=wrs
1576 ;;
7a694abe
ILT
1577 -aux*)
1578 vendor=apple
7f154406 1579 ;;
e3d1469c
BE
1580 -hms*)
1581 vendor=hitachi
1582 ;;
1583 -mpw* | -macos*)
1584 vendor=apple
1585 ;;
4e405419 1586 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
68f39654
BE
1587 vendor=atari
1588 ;;
4e405419
PE
1589 -vos*)
1590 vendor=stratus
1591 ;;
fb955dfa
RS
1592 esac
1593 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1594 ;;
1595esac
1596
1597echo $basic_machine$os
c9ac21eb 1598exit
40583571
DL
1599
1600# Local variables:
1601# eval: (add-hook 'write-file-hooks 'time-stamp)
4e405419 1602# time-stamp-start: "timestamp='"
40583571
DL
1603# time-stamp-format: "%:y-%02m-%02d"
1604# time-stamp-end: "'"
1605# End: