I created a git repo out of\ a tarball, and I added all of the files. I simply just...
[Git-Me-Secret-Mario-Chromicles.git] / config.sub
blob848a7a51e9e3e1869fc0f346786d77c3d13fca09
1 #! /bin/sh
2 # Configuration validation subroutine script.
3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5 # Free Software Foundation, Inc.
7 timestamp='2009-02-03'
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.
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.
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.
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
25 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
26 # 02110-1301, USA.
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.
34 # Please send patches to <config-patches@gnu.org>. Submit a context
35 # diff and a properly formatted ChangeLog entry.
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.
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.
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.
57 me=`echo "$0" | sed -e 's,.*/,,'`
59 usage="\
60 Usage: $0 [OPTION] CPU-MFR-OPSYS
61 $0 [OPTION] ALIAS
63 Canonicalize a configuration name.
65 Operation 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
70 Report bugs and patches to <config-patches@gnu.org>."
72 version="\
73 GNU config.sub ($timestamp)
75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
76 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
78 This is free software; see the source for copying conditions. There is NO
79 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
81 help="
82 Try \`$me --help' for more information."
84 # Parse command line
85 while test $# -gt 0 ; do
86 case $1 in
87 --time-stamp | --time* | -t )
88 echo "$timestamp" ; exit ;;
89 --version | -v )
90 echo "$version" ; exit ;;
91 --help | --h* | -h )
92 echo "$usage"; exit ;;
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 ;;
101 *local*)
102 # First pass through any local machine types.
103 echo $1
104 exit ;;
107 break ;;
108 esac
109 done
111 case $# 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;;
117 esac
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.
121 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
122 case $maybe_os in
123 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
124 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
125 kopensolaris*-gnu* | \
126 storm-chaos* | os2-emx* | rtmk-nova*)
127 os=-$maybe_os
128 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
131 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
132 if [ $basic_machine != $1 ]
133 then os=`echo $1 | sed 's/.*-/-/'`
134 else os=; fi
136 esac
138 ### Let's recognize common machines as not being operating systems so
139 ### that things like config.sub decstation-3100 work. We also
140 ### recognize some manufacturers as not being operating systems, so we
141 ### can provide default operating systems below.
142 case $os in
143 -sun*os*)
144 # Prevent following clause from handling this invalid input.
146 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
147 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
148 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
149 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
150 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
151 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
152 -apple | -axis | -knuth | -cray)
154 basic_machine=$1
156 -sim | -cisco | -oki | -wec | -winbond)
158 basic_machine=$1
160 -scout)
162 -wrs)
163 os=-vxworks
164 basic_machine=$1
166 -chorusos*)
167 os=-chorusos
168 basic_machine=$1
170 -chorusrdb)
171 os=-chorusrdb
172 basic_machine=$1
174 -hiux*)
175 os=-hiuxwe2
177 -sco6)
178 os=-sco5v6
179 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
181 -sco5)
182 os=-sco3.2v5
183 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
185 -sco4)
186 os=-sco3.2v4
187 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
189 -sco3.2.[4-9]*)
190 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
191 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
193 -sco3.2v[4-9]*)
194 # Don't forget version if it is 3.2v4 or newer.
195 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
197 -sco5v6*)
198 # Don't forget version if it is 3.2v4 or newer.
199 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
201 -sco*)
202 os=-sco3.2v2
203 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
205 -udk*)
206 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
208 -isc)
209 os=-isc2.2
210 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
212 -clix*)
213 basic_machine=clipper-intergraph
215 -isc*)
216 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
218 -lynx*)
219 os=-lynxos
221 -ptx*)
222 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
224 -windowsnt*)
225 os=`echo $os | sed -e 's/windowsnt/winnt/'`
227 -psos*)
228 os=-psos
230 -mint | -mint[0-9]*)
231 basic_machine=m68k-atari
232 os=-mint
234 esac
236 # Decode aliases for certain CPU-COMPANY combinations.
237 case $basic_machine in
238 # Recognize the basic CPU types without company name.
239 # Some are omitted here because they have special meanings below.
240 1750a | 580 \
241 | a29k \
242 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
243 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
244 | am33_2.0 \
245 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
246 | bfin \
247 | c4x | clipper \
248 | d10v | d30v | dlx | dsp16xx | dvp \
249 | fido | fr30 | frv \
250 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
251 | i370 | i860 | i960 | ia64 \
252 | ip2k | iq2000 \
253 | lm32 \
254 | m32c | m32r | m32rle | m68000 | m68k | m88k \
255 | maxq | mb | microblaze | mcore | mep | metag \
256 | mips | mipsbe | mipseb | mipsel | mipsle \
257 | mips16 \
258 | mips64 | mips64el \
259 | mips64octeon | mips64octeonel \
260 | mips64orion | mips64orionel \
261 | mips64r5900 | mips64r5900el \
262 | mips64vr | mips64vrel \
263 | mips64vr4100 | mips64vr4100el \
264 | mips64vr4300 | mips64vr4300el \
265 | mips64vr5000 | mips64vr5000el \
266 | mips64vr5900 | mips64vr5900el \
267 | mipsisa32 | mipsisa32el \
268 | mipsisa32r2 | mipsisa32r2el \
269 | mipsisa64 | mipsisa64el \
270 | mipsisa64r2 | mipsisa64r2el \
271 | mipsisa64sb1 | mipsisa64sb1el \
272 | mipsisa64sr71k | mipsisa64sr71kel \
273 | mipstx39 | mipstx39el \
274 | mn10200 | mn10300 \
275 | mt \
276 | msp430 \
277 | nios | nios2 \
278 | ns16k | ns32k \
279 | or32 \
280 | pdp10 | pdp11 | pj | pjl \
281 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
282 | pyramid \
283 | score \
284 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
285 | sh64 | sh64le \
286 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
287 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
288 | spu | strongarm \
289 | tahoe | thumb | tic4x | tic80 | tron \
290 | v850 | v850e \
291 | we32k \
292 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
293 | z8k | z80)
294 basic_machine=$basic_machine-unknown
296 m6811 | m68hc11 | m6812 | m68hc12)
297 # Motorola 68HC11/12.
298 basic_machine=$basic_machine-unknown
299 os=-none
301 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
303 ms1)
304 basic_machine=mt-unknown
307 # We use `pc' rather than `unknown'
308 # because (1) that's what they normally are, and
309 # (2) the word "unknown" tends to confuse beginning users.
310 i*86 | x86_64)
311 basic_machine=$basic_machine-pc
313 # Object if more than one company name word.
314 *-*-*)
315 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
316 exit 1
318 # Recognize the basic CPU types with company name.
319 580-* \
320 | a29k-* \
321 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
322 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
323 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
324 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
325 | avr-* | avr32-* \
326 | bfin-* | bs2000-* \
327 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
328 | clipper-* | craynv-* | cydra-* \
329 | d10v-* | d30v-* | dlx-* \
330 | elxsi-* \
331 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
332 | h8300-* | h8500-* \
333 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
334 | i*86-* | i860-* | i960-* | ia64-* \
335 | ip2k-* | iq2000-* \
336 | lm32-* \
337 | m32c-* | m32r-* | m32rle-* \
338 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
339 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
340 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
341 | mips16-* \
342 | mips64-* | mips64el-* \
343 | mips64octeon-* | mips64octeonel-* \
344 | mips64orion-* | mips64orionel-* \
345 | mips64r5900-* | mips64r5900el-* \
346 | mips64vr-* | mips64vrel-* \
347 | mips64vr4100-* | mips64vr4100el-* \
348 | mips64vr4300-* | mips64vr4300el-* \
349 | mips64vr5000-* | mips64vr5000el-* \
350 | mips64vr5900-* | mips64vr5900el-* \
351 | mipsisa32-* | mipsisa32el-* \
352 | mipsisa32r2-* | mipsisa32r2el-* \
353 | mipsisa64-* | mipsisa64el-* \
354 | mipsisa64r2-* | mipsisa64r2el-* \
355 | mipsisa64sb1-* | mipsisa64sb1el-* \
356 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
357 | mipstx39-* | mipstx39el-* \
358 | mmix-* \
359 | mt-* \
360 | msp430-* \
361 | nios-* | nios2-* \
362 | none-* | np1-* | ns16k-* | ns32k-* \
363 | orion-* \
364 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
365 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
366 | pyramid-* \
367 | romp-* | rs6000-* \
368 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
369 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
370 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
371 | sparclite-* \
372 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
373 | tahoe-* | thumb-* \
374 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
375 | tron-* \
376 | v850-* | v850e-* | vax-* \
377 | we32k-* \
378 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
379 | xstormy16-* | xtensa*-* \
380 | ymp-* \
381 | z8k-* | z80-*)
383 # Recognize the basic CPU types without company name, with glob match.
384 xtensa*)
385 basic_machine=$basic_machine-unknown
387 # Recognize the various machine names and aliases which stand
388 # for a CPU type and a company and sometimes even an OS.
389 386bsd)
390 basic_machine=i386-unknown
391 os=-bsd
393 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
394 basic_machine=m68000-att
396 3b*)
397 basic_machine=we32k-att
399 a29khif)
400 basic_machine=a29k-amd
401 os=-udi
403 abacus)
404 basic_machine=abacus-unknown
406 adobe68k)
407 basic_machine=m68010-adobe
408 os=-scout
410 alliant | fx80)
411 basic_machine=fx80-alliant
413 altos | altos3068)
414 basic_machine=m68k-altos
416 am29k)
417 basic_machine=a29k-none
418 os=-bsd
420 amd64)
421 basic_machine=x86_64-pc
423 amd64-*)
424 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
426 amdahl)
427 basic_machine=580-amdahl
428 os=-sysv
430 amiga | amiga-*)
431 basic_machine=m68k-unknown
433 amigaos | amigados)
434 basic_machine=m68k-unknown
435 os=-amigaos
437 amigaunix | amix)
438 basic_machine=m68k-unknown
439 os=-sysv4
441 apollo68)
442 basic_machine=m68k-apollo
443 os=-sysv
445 apollo68bsd)
446 basic_machine=m68k-apollo
447 os=-bsd
449 aros)
450 basic_machine=i386-pc
451 os=-aros
453 aux)
454 basic_machine=m68k-apple
455 os=-aux
457 balance)
458 basic_machine=ns32k-sequent
459 os=-dynix
461 blackfin)
462 basic_machine=bfin-unknown
463 os=-linux
465 blackfin-*)
466 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
467 os=-linux
469 c90)
470 basic_machine=c90-cray
471 os=-unicos
473 cegcc)
474 basic_machine=arm-unknown
475 os=-cegcc
477 convex-c1)
478 basic_machine=c1-convex
479 os=-bsd
481 convex-c2)
482 basic_machine=c2-convex
483 os=-bsd
485 convex-c32)
486 basic_machine=c32-convex
487 os=-bsd
489 convex-c34)
490 basic_machine=c34-convex
491 os=-bsd
493 convex-c38)
494 basic_machine=c38-convex
495 os=-bsd
497 cray | j90)
498 basic_machine=j90-cray
499 os=-unicos
501 craynv)
502 basic_machine=craynv-cray
503 os=-unicosmp
505 cr16)
506 basic_machine=cr16-unknown
507 os=-elf
509 crds | unos)
510 basic_machine=m68k-crds
512 crisv32 | crisv32-* | etraxfs*)
513 basic_machine=crisv32-axis
515 cris | cris-* | etrax*)
516 basic_machine=cris-axis
518 crx)
519 basic_machine=crx-unknown
520 os=-elf
522 da30 | da30-*)
523 basic_machine=m68k-da30
525 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
526 basic_machine=mips-dec
528 decsystem10* | dec10*)
529 basic_machine=pdp10-dec
530 os=-tops10
532 decsystem20* | dec20*)
533 basic_machine=pdp10-dec
534 os=-tops20
536 delta | 3300 | motorola-3300 | motorola-delta \
537 | 3300-motorola | delta-motorola)
538 basic_machine=m68k-motorola
540 delta88)
541 basic_machine=m88k-motorola
542 os=-sysv3
544 dicos)
545 basic_machine=i686-pc
546 os=-dicos
548 djgpp)
549 basic_machine=i586-pc
550 os=-msdosdjgpp
552 dpx20 | dpx20-*)
553 basic_machine=rs6000-bull
554 os=-bosx
556 dpx2* | dpx2*-bull)
557 basic_machine=m68k-bull
558 os=-sysv3
560 ebmon29k)
561 basic_machine=a29k-amd
562 os=-ebmon
564 elxsi)
565 basic_machine=elxsi-elxsi
566 os=-bsd
568 encore | umax | mmax)
569 basic_machine=ns32k-encore
571 es1800 | OSE68k | ose68k | ose | OSE)
572 basic_machine=m68k-ericsson
573 os=-ose
575 fx2800)
576 basic_machine=i860-alliant
578 genix)
579 basic_machine=ns32k-ns
581 gmicro)
582 basic_machine=tron-gmicro
583 os=-sysv
585 go32)
586 basic_machine=i386-pc
587 os=-go32
589 h3050r* | hiux*)
590 basic_machine=hppa1.1-hitachi
591 os=-hiuxwe2
593 h8300hms)
594 basic_machine=h8300-hitachi
595 os=-hms
597 h8300xray)
598 basic_machine=h8300-hitachi
599 os=-xray
601 h8500hms)
602 basic_machine=h8500-hitachi
603 os=-hms
605 harris)
606 basic_machine=m88k-harris
607 os=-sysv3
609 hp300-*)
610 basic_machine=m68k-hp
612 hp300bsd)
613 basic_machine=m68k-hp
614 os=-bsd
616 hp300hpux)
617 basic_machine=m68k-hp
618 os=-hpux
620 hp3k9[0-9][0-9] | hp9[0-9][0-9])
621 basic_machine=hppa1.0-hp
623 hp9k2[0-9][0-9] | hp9k31[0-9])
624 basic_machine=m68000-hp
626 hp9k3[2-9][0-9])
627 basic_machine=m68k-hp
629 hp9k6[0-9][0-9] | hp6[0-9][0-9])
630 basic_machine=hppa1.0-hp
632 hp9k7[0-79][0-9] | hp7[0-79][0-9])
633 basic_machine=hppa1.1-hp
635 hp9k78[0-9] | hp78[0-9])
636 # FIXME: really hppa2.0-hp
637 basic_machine=hppa1.1-hp
639 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
640 # FIXME: really hppa2.0-hp
641 basic_machine=hppa1.1-hp
643 hp9k8[0-9][13679] | hp8[0-9][13679])
644 basic_machine=hppa1.1-hp
646 hp9k8[0-9][0-9] | hp8[0-9][0-9])
647 basic_machine=hppa1.0-hp
649 hppa-next)
650 os=-nextstep3
652 hppaosf)
653 basic_machine=hppa1.1-hp
654 os=-osf
656 hppro)
657 basic_machine=hppa1.1-hp
658 os=-proelf
660 i370-ibm* | ibm*)
661 basic_machine=i370-ibm
663 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
664 i*86v32)
665 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
666 os=-sysv32
668 i*86v4*)
669 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
670 os=-sysv4
672 i*86v)
673 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
674 os=-sysv
676 i*86sol2)
677 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
678 os=-solaris2
680 i386mach)
681 basic_machine=i386-mach
682 os=-mach
684 i386-vsta | vsta)
685 basic_machine=i386-unknown
686 os=-vsta
688 iris | iris4d)
689 basic_machine=mips-sgi
690 case $os in
691 -irix*)
694 os=-irix4
696 esac
698 isi68 | isi)
699 basic_machine=m68k-isi
700 os=-sysv
702 m68knommu)
703 basic_machine=m68k-unknown
704 os=-linux
706 m68knommu-*)
707 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
708 os=-linux
710 m88k-omron*)
711 basic_machine=m88k-omron
713 magnum | m3230)
714 basic_machine=mips-mips
715 os=-sysv
717 merlin)
718 basic_machine=ns32k-utek
719 os=-sysv
721 mingw32)
722 basic_machine=i386-pc
723 os=-mingw32
725 mingw32ce)
726 basic_machine=arm-unknown
727 os=-mingw32ce
729 miniframe)
730 basic_machine=m68000-convergent
732 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
733 basic_machine=m68k-atari
734 os=-mint
736 mipsEE* | ee | ps2)
737 basic_machine=mips64r5900el-scei
738 case $os in
739 -linux*)
742 os=-elf
744 esac
746 iop)
747 basic_machine=mipsel-scei
748 os=-irx
750 dvp)
751 basic_machine=dvp-scei
752 os=-elf
754 mips3*-*)
755 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
757 mips3*)
758 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
760 monitor)
761 basic_machine=m68k-rom68k
762 os=-coff
764 morphos)
765 basic_machine=powerpc-unknown
766 os=-morphos
768 msdos)
769 basic_machine=i386-pc
770 os=-msdos
772 ms1-*)
773 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
775 mvs)
776 basic_machine=i370-ibm
777 os=-mvs
779 ncr3000)
780 basic_machine=i486-ncr
781 os=-sysv4
783 netbsd386)
784 basic_machine=i386-unknown
785 os=-netbsd
787 netwinder)
788 basic_machine=armv4l-rebel
789 os=-linux
791 news | news700 | news800 | news900)
792 basic_machine=m68k-sony
793 os=-newsos
795 news1000)
796 basic_machine=m68030-sony
797 os=-newsos
799 news-3600 | risc-news)
800 basic_machine=mips-sony
801 os=-newsos
803 necv70)
804 basic_machine=v70-nec
805 os=-sysv
807 next | m*-next )
808 basic_machine=m68k-next
809 case $os in
810 -nextstep* )
812 -ns2*)
813 os=-nextstep2
816 os=-nextstep3
818 esac
820 nh3000)
821 basic_machine=m68k-harris
822 os=-cxux
824 nh[45]000)
825 basic_machine=m88k-harris
826 os=-cxux
828 nindy960)
829 basic_machine=i960-intel
830 os=-nindy
832 mon960)
833 basic_machine=i960-intel
834 os=-mon960
836 nonstopux)
837 basic_machine=mips-compaq
838 os=-nonstopux
840 np1)
841 basic_machine=np1-gould
843 nsr-tandem)
844 basic_machine=nsr-tandem
846 op50n-* | op60c-*)
847 basic_machine=hppa1.1-oki
848 os=-proelf
850 openrisc | openrisc-*)
851 basic_machine=or32-unknown
853 os400)
854 basic_machine=powerpc-ibm
855 os=-os400
857 OSE68000 | ose68000)
858 basic_machine=m68000-ericsson
859 os=-ose
861 os68k)
862 basic_machine=m68k-none
863 os=-os68k
865 pa-hitachi)
866 basic_machine=hppa1.1-hitachi
867 os=-hiuxwe2
869 paragon)
870 basic_machine=i860-intel
871 os=-osf
873 parisc)
874 basic_machine=hppa-unknown
875 os=-linux
877 parisc-*)
878 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
879 os=-linux
881 pbd)
882 basic_machine=sparc-tti
884 pbb)
885 basic_machine=m68k-tti
887 pc532 | pc532-*)
888 basic_machine=ns32k-pc532
890 pc98)
891 basic_machine=i386-pc
893 pc98-*)
894 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
896 pentium | p5 | k5 | k6 | nexgen | viac3)
897 basic_machine=i586-pc
899 pentiumpro | p6 | 6x86 | athlon | athlon_*)
900 basic_machine=i686-pc
902 pentiumii | pentium2 | pentiumiii | pentium3)
903 basic_machine=i686-pc
905 pentium4)
906 basic_machine=i786-pc
908 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
909 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
911 pentiumpro-* | p6-* | 6x86-* | athlon-*)
912 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
914 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
915 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
917 pentium4-*)
918 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
921 basic_machine=pn-gould
923 power) basic_machine=power-ibm
925 ppc) basic_machine=powerpc-unknown
927 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
929 ppcle | powerpclittle | ppc-le | powerpc-little)
930 basic_machine=powerpcle-unknown
932 ppcle-* | powerpclittle-*)
933 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
935 ppc64) basic_machine=powerpc64-unknown
937 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
939 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
940 basic_machine=powerpc64le-unknown
942 ppc64le-* | powerpc64little-*)
943 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
945 ps2)
946 basic_machine=i386-ibm
948 pw32)
949 basic_machine=i586-unknown
950 os=-pw32
952 rdos)
953 basic_machine=i386-pc
954 os=-rdos
956 rom68k)
957 basic_machine=m68k-rom68k
958 os=-coff
960 rm[46]00)
961 basic_machine=mips-siemens
963 rtpc | rtpc-*)
964 basic_machine=romp-ibm
966 s390 | s390-*)
967 basic_machine=s390-ibm
969 s390x | s390x-*)
970 basic_machine=s390x-ibm
972 sa29200)
973 basic_machine=a29k-amd
974 os=-udi
976 sb1)
977 basic_machine=mipsisa64sb1-unknown
979 sb1el)
980 basic_machine=mipsisa64sb1el-unknown
982 sde)
983 basic_machine=mipsisa32-sde
984 os=-elf
986 sei)
987 basic_machine=mips-sei
988 os=-seiux
990 sequent)
991 basic_machine=i386-sequent
994 basic_machine=sh-hitachi
995 os=-hms
997 sh5el)
998 basic_machine=sh5le-unknown
1000 sh64)
1001 basic_machine=sh64-unknown
1003 sparclite-wrs | simso-wrs)
1004 basic_machine=sparclite-wrs
1005 os=-vxworks
1007 sps7)
1008 basic_machine=m68k-bull
1009 os=-sysv2
1011 spur)
1012 basic_machine=spur-unknown
1014 st2000)
1015 basic_machine=m68k-tandem
1017 stratus)
1018 basic_machine=i860-stratus
1019 os=-sysv4
1021 sun2)
1022 basic_machine=m68000-sun
1024 sun2os3)
1025 basic_machine=m68000-sun
1026 os=-sunos3
1028 sun2os4)
1029 basic_machine=m68000-sun
1030 os=-sunos4
1032 sun3os3)
1033 basic_machine=m68k-sun
1034 os=-sunos3
1036 sun3os4)
1037 basic_machine=m68k-sun
1038 os=-sunos4
1040 sun4os3)
1041 basic_machine=sparc-sun
1042 os=-sunos3
1044 sun4os4)
1045 basic_machine=sparc-sun
1046 os=-sunos4
1048 sun4sol2)
1049 basic_machine=sparc-sun
1050 os=-solaris2
1052 sun3 | sun3-*)
1053 basic_machine=m68k-sun
1055 sun4)
1056 basic_machine=sparc-sun
1058 sun386 | sun386i | roadrunner)
1059 basic_machine=i386-sun
1061 sv1)
1062 basic_machine=sv1-cray
1063 os=-unicos
1065 symmetry)
1066 basic_machine=i386-sequent
1067 os=-dynix
1069 t3e)
1070 basic_machine=alphaev5-cray
1071 os=-unicos
1073 t90)
1074 basic_machine=t90-cray
1075 os=-unicos
1077 tic54x | c54x*)
1078 basic_machine=tic54x-unknown
1079 os=-coff
1081 tic55x | c55x*)
1082 basic_machine=tic55x-unknown
1083 os=-coff
1085 tic6x | c6x*)
1086 basic_machine=tic6x-unknown
1087 os=-coff
1089 tile*)
1090 basic_machine=tile-unknown
1091 os=-linux-gnu
1093 tx39)
1094 basic_machine=mipstx39-unknown
1096 tx39el)
1097 basic_machine=mipstx39el-unknown
1099 toad1)
1100 basic_machine=pdp10-xkl
1101 os=-tops20
1103 tower | tower-32)
1104 basic_machine=m68k-ncr
1106 tpf)
1107 basic_machine=s390x-ibm
1108 os=-tpf
1110 udi29k)
1111 basic_machine=a29k-amd
1112 os=-udi
1114 ultra3)
1115 basic_machine=a29k-nyu
1116 os=-sym1
1118 v810 | necv810)
1119 basic_machine=v810-nec
1120 os=-none
1122 vaxv)
1123 basic_machine=vax-dec
1124 os=-sysv
1126 vms)
1127 basic_machine=vax-dec
1128 os=-vms
1130 vpp*|vx|vx-*)
1131 basic_machine=f301-fujitsu
1133 vxworks960)
1134 basic_machine=i960-wrs
1135 os=-vxworks
1137 vxworks68)
1138 basic_machine=m68k-wrs
1139 os=-vxworks
1141 vxworks29k)
1142 basic_machine=a29k-wrs
1143 os=-vxworks
1145 w65*)
1146 basic_machine=w65-wdc
1147 os=-none
1149 w89k-*)
1150 basic_machine=hppa1.1-winbond
1151 os=-proelf
1153 xbox)
1154 basic_machine=i686-pc
1155 os=-mingw32
1157 xps | xps100)
1158 basic_machine=xps100-honeywell
1160 ymp)
1161 basic_machine=ymp-cray
1162 os=-unicos
1164 z8k-*-coff)
1165 basic_machine=z8k-unknown
1166 os=-sim
1168 z80-*-coff)
1169 basic_machine=z80-unknown
1170 os=-sim
1172 none)
1173 basic_machine=none-none
1174 os=-none
1177 # Here we handle the default manufacturer of certain CPU types. It is in
1178 # some cases the only manufacturer, in others, it is the most popular.
1179 w89k)
1180 basic_machine=hppa1.1-winbond
1182 op50n)
1183 basic_machine=hppa1.1-oki
1185 op60c)
1186 basic_machine=hppa1.1-oki
1188 romp)
1189 basic_machine=romp-ibm
1191 mmix)
1192 basic_machine=mmix-knuth
1194 rs6000)
1195 basic_machine=rs6000-ibm
1197 vax)
1198 basic_machine=vax-dec
1200 pdp10)
1201 # there are many clones, so DEC is not a safe bet
1202 basic_machine=pdp10-unknown
1204 pdp11)
1205 basic_machine=pdp11-dec
1207 we32k)
1208 basic_machine=we32k-att
1210 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1211 basic_machine=sh-unknown
1213 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1214 basic_machine=sparc-sun
1216 cydra)
1217 basic_machine=cydra-cydrome
1219 orion)
1220 basic_machine=orion-highlevel
1222 orion105)
1223 basic_machine=clipper-highlevel
1225 mac | mpw | mac-mpw)
1226 basic_machine=m68k-apple
1228 pmac | pmac-mpw)
1229 basic_machine=powerpc-apple
1231 *-unknown)
1232 # Make sure to match an already-canonicalized machine name.
1235 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1236 exit 1
1238 esac
1240 # Here we canonicalize certain aliases for manufacturers.
1241 case $basic_machine in
1242 *-digital*)
1243 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1245 *-commodore*)
1246 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1250 esac
1252 # Decode manufacturer-specific aliases for certain operating systems.
1254 if [ x"$os" != x"" ]
1255 then
1256 case $os in
1257 # First match some system type aliases
1258 # that might get confused with valid system types.
1259 # -solaris* is a basic system type, with this one exception.
1260 -solaris1 | -solaris1.*)
1261 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1263 -solaris)
1264 os=-solaris2
1266 -svr4*)
1267 os=-sysv4
1269 -unixware*)
1270 os=-sysv4.2uw
1272 -gnu/linux*)
1273 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1275 # First accept the basic system types.
1276 # The portable systems comes first.
1277 # Each alternative MUST END IN A *, to match a version number.
1278 # -sysv* is not here because it comes later, after sysvr4.
1279 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1280 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1281 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1282 | -kopensolaris* \
1283 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1284 | -aos* | -aros* \
1285 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1286 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1287 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1288 | -openbsd* | -solidbsd* \
1289 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1290 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1291 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1292 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1293 | -chorusos* | -chorusrdb* | -cegcc* \
1294 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1295 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1296 | -uxpv* | -beos* | -mpeix* | -udk* \
1297 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1298 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1299 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1300 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1301 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1302 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1303 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*)
1304 # Remember, each alternative MUST END IN *, to match a version number.
1306 -qnx*)
1307 case $basic_machine in
1308 x86-* | i*86-*)
1311 os=-nto$os
1313 esac
1315 -nto-qnx*)
1317 -nto*)
1318 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1320 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1321 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1322 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1324 -mac*)
1325 os=`echo $os | sed -e 's|mac|macos|'`
1327 -linux-dietlibc)
1328 os=-linux-dietlibc
1330 -linux*)
1331 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1333 -sunos5*)
1334 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1336 -sunos6*)
1337 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1339 -opened*)
1340 os=-openedition
1342 -os400*)
1343 os=-os400
1345 -wince*)
1346 os=-wince
1348 -osfrose*)
1349 os=-osfrose
1351 -osf*)
1352 os=-osf
1354 -utek*)
1355 os=-bsd
1357 -dynix*)
1358 os=-bsd
1360 -acis*)
1361 os=-aos
1363 -atheos*)
1364 os=-atheos
1366 -syllable*)
1367 os=-syllable
1369 -386bsd)
1370 os=-bsd
1372 -ctix* | -uts*)
1373 os=-sysv
1375 -nova*)
1376 os=-rtmk-nova
1378 -ns2 )
1379 os=-nextstep2
1381 -nsk*)
1382 os=-nsk
1384 # Preserve the version number of sinix5.
1385 -sinix5.*)
1386 os=`echo $os | sed -e 's|sinix|sysv|'`
1388 -sinix*)
1389 os=-sysv4
1391 -tpf*)
1392 os=-tpf
1394 -triton*)
1395 os=-sysv3
1397 -oss*)
1398 os=-sysv3
1400 -svr4)
1401 os=-sysv4
1403 -svr3)
1404 os=-sysv3
1406 -sysvr4)
1407 os=-sysv4
1409 # This must come after -sysvr4.
1410 -sysv*)
1412 -ose*)
1413 os=-ose
1415 -es1800*)
1416 os=-ose
1418 -xenix)
1419 os=-xenix
1421 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1422 os=-mint
1424 -aros*)
1425 os=-aros
1427 -kaos*)
1428 os=-kaos
1430 -zvmoe)
1431 os=-zvmoe
1433 -dicos*)
1434 os=-dicos
1436 -none)
1439 # Get rid of the `-' at the beginning of $os.
1440 os=`echo $os | sed 's/[^-]*-//'`
1441 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1442 exit 1
1444 esac
1445 else
1447 # Here we handle the default operating systems that come with various machines.
1448 # The value should be what the vendor currently ships out the door with their
1449 # machine or put another way, the most popular os provided with the machine.
1451 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1452 # "-sun"), then you have to tell the case statement up towards the top
1453 # that MANUFACTURER isn't an operating system. Otherwise, code above
1454 # will signal an error saying that MANUFACTURER isn't an operating
1455 # system, and we'll never get to this point.
1457 case $basic_machine in
1458 score-*)
1459 os=-elf
1461 spu-*)
1462 os=-elf
1464 *-acorn)
1465 os=-riscix1.2
1467 arm*-rebel)
1468 os=-linux
1470 arm*-semi)
1471 os=-aout
1473 c4x-* | tic4x-*)
1474 os=-coff
1476 # This must come before the *-dec entry.
1477 pdp10-*)
1478 os=-tops20
1480 pdp11-*)
1481 os=-none
1483 *-dec | vax-*)
1484 os=-ultrix4.2
1486 m68*-apollo)
1487 os=-domain
1489 i386-sun)
1490 os=-sunos4.0.2
1492 m68000-sun)
1493 os=-sunos3
1494 # This also exists in the configure program, but was not the
1495 # default.
1496 # os=-sunos4
1498 m68*-cisco)
1499 os=-aout
1501 mep-*)
1502 os=-elf
1504 mips*-cisco)
1505 os=-elf
1507 mips*-*)
1508 os=-elf
1510 or32-*)
1511 os=-coff
1513 *-tti) # must be before sparc entry or we get the wrong os.
1514 os=-sysv3
1516 sparc-* | *-sun)
1517 os=-sunos4.1.1
1519 *-be)
1520 os=-beos
1522 *-haiku)
1523 os=-haiku
1525 *-ibm)
1526 os=-aix
1528 *-knuth)
1529 os=-mmixware
1531 *-wec)
1532 os=-proelf
1534 *-winbond)
1535 os=-proelf
1537 *-oki)
1538 os=-proelf
1540 *-hp)
1541 os=-hpux
1543 *-hitachi)
1544 os=-hiux
1546 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1547 os=-sysv
1549 *-cbm)
1550 os=-amigaos
1552 *-dg)
1553 os=-dgux
1555 *-dolphin)
1556 os=-sysv3
1558 m68k-ccur)
1559 os=-rtu
1561 m88k-omron*)
1562 os=-luna
1564 *-next )
1565 os=-nextstep
1567 *-sequent)
1568 os=-ptx
1570 *-crds)
1571 os=-unos
1573 *-ns)
1574 os=-genix
1576 i370-*)
1577 os=-mvs
1579 *-next)
1580 os=-nextstep3
1582 *-gould)
1583 os=-sysv
1585 *-highlevel)
1586 os=-bsd
1588 *-encore)
1589 os=-bsd
1591 *-sgi)
1592 os=-irix
1594 *-siemens)
1595 os=-sysv4
1597 *-masscomp)
1598 os=-rtu
1600 f30[01]-fujitsu | f700-fujitsu)
1601 os=-uxpv
1603 *-rom68k)
1604 os=-coff
1606 *-*bug)
1607 os=-coff
1609 *-apple)
1610 os=-macos
1612 *-atari*)
1613 os=-mint
1616 os=-none
1618 esac
1621 # Here we handle the case where we know the os, and the CPU type, but not the
1622 # manufacturer. We pick the logical manufacturer.
1623 vendor=unknown
1624 case $basic_machine in
1625 *-unknown)
1626 case $os in
1627 -riscix*)
1628 vendor=acorn
1630 -sunos*)
1631 vendor=sun
1633 -aix*)
1634 vendor=ibm
1636 -beos*)
1637 vendor=be
1639 -hpux*)
1640 vendor=hp
1642 -mpeix*)
1643 vendor=hp
1645 -hiux*)
1646 vendor=hitachi
1648 -unos*)
1649 vendor=crds
1651 -dgux*)
1652 vendor=dg
1654 -luna*)
1655 vendor=omron
1657 -genix*)
1658 vendor=ns
1660 -mvs* | -opened*)
1661 vendor=ibm
1663 -os400*)
1664 vendor=ibm
1666 -ptx*)
1667 vendor=sequent
1669 -tpf*)
1670 vendor=ibm
1672 -vxsim* | -vxworks* | -windiss*)
1673 vendor=wrs
1675 -aux*)
1676 vendor=apple
1678 -hms*)
1679 vendor=hitachi
1681 -mpw* | -macos*)
1682 vendor=apple
1684 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1685 vendor=atari
1687 -vos*)
1688 vendor=stratus
1690 esac
1691 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1693 esac
1695 echo $basic_machine$os
1696 exit
1698 # Local variables:
1699 # eval: (add-hook 'write-file-hooks 'time-stamp)
1700 # time-stamp-start: "timestamp='"
1701 # time-stamp-format: "%:y-%02m-%02d"
1702 # time-stamp-end: "'"
1703 # End: