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