Default gumstix configuration changed
[gumsense-br.git] / package / gnuconfig / config.sub
blobf04e6a18d8c8aeddee002fe3682641f5012ab089
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 Free Software Foundation, Inc.
6 timestamp='2006-01-02'
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
10 # can handle that machine. It does not imply ALL GNU software can.
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.
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.
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
24 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25 # 02110-1301, USA.
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.
33 # Please send patches to <config-patches@gnu.org>. Submit a context
34 # diff and a properly formatted ChangeLog entry.
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.
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.
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
52 # or in some cases, the newer four-part form:
53 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
54 # It is wrong to echo any other type of specification.
56 me=`echo "$0" | sed -e 's,.*/,,'`
58 usage="\
59 Usage: $0 [OPTION] CPU-MFR-OPSYS
60 $0 [OPTION] ALIAS
62 Canonicalize a configuration name.
64 Operation modes:
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
69 Report bugs and patches to <config-patches@gnu.org>."
71 version="\
72 GNU config.sub ($timestamp)
74 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
75 Free Software Foundation, Inc.
77 This is free software; see the source for copying conditions. There is NO
78 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
80 help="
81 Try \`$me --help' for more information."
83 # Parse command line
84 while test $# -gt 0 ; do
85 case $1 in
86 --time-stamp | --time* | -t )
87 echo "$timestamp" ; exit ;;
88 --version | -v )
89 echo "$version" ; exit ;;
90 --help | --h* | -h )
91 echo "$usage"; exit ;;
92 -- ) # Stop option processing
93 shift; break ;;
94 - ) # Use stdin as input.
95 break ;;
96 -* )
97 echo "$me: invalid option $1$help"
98 exit 1 ;;
100 *local*)
101 # First pass through any local machine types.
102 echo $1
103 exit ;;
106 break ;;
107 esac
108 done
110 case $# 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;;
116 esac
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.
120 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121 case $maybe_os in
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*)
125 os=-$maybe_os
126 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
129 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
130 if [ $basic_machine != $1 ]
131 then os=`echo $1 | sed 's/.*-/-/'`
132 else os=; fi
134 esac
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.
140 case $os in
141 -sun*os*)
142 # Prevent following clause from handling this invalid input.
144 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
145 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
146 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
147 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
148 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
149 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
150 -apple | -axis | -knuth | -cray)
152 basic_machine=$1
154 -sim | -cisco | -oki | -wec | -winbond)
156 basic_machine=$1
158 -scout)
160 -wrs)
161 os=-vxworks
162 basic_machine=$1
164 -chorusos*)
165 os=-chorusos
166 basic_machine=$1
168 -chorusrdb)
169 os=-chorusrdb
170 basic_machine=$1
172 -hiux*)
173 os=-hiuxwe2
175 -sco6)
176 os=-sco5v6
177 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
179 -sco5)
180 os=-sco3.2v5
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183 -sco4)
184 os=-sco3.2v4
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187 -sco3.2.[4-9]*)
188 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191 -sco3.2v[4-9]*)
192 # Don't forget version if it is 3.2v4 or newer.
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
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/'`
199 -sco*)
200 os=-sco3.2v2
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 -udk*)
204 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 -isc)
207 os=-isc2.2
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
210 -clix*)
211 basic_machine=clipper-intergraph
213 -isc*)
214 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
216 -lynx*)
217 os=-lynxos
219 -ptx*)
220 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
222 -windowsnt*)
223 os=`echo $os | sed -e 's/windowsnt/winnt/'`
225 -psos*)
226 os=-psos
228 -mint | -mint[0-9]*)
229 basic_machine=m68k-atari
230 os=-mint
232 esac
234 # Decode aliases for certain CPU-COMPANY combinations.
235 case $basic_machine in
236 # Recognize the basic CPU types without company name.
237 # Some are omitted here because they have special meanings below.
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] \
242 | am33_2.0 \
243 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
244 | bfin \
245 | c4x | clipper \
246 | d10v | d30v | dlx | dsp16xx | dvp \
247 | fr30 | frv \
248 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
249 | i370 | i860 | i960 | ia64 \
250 | ip2k | iq2000 \
251 | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
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 \
260 | mips64vr5900 | mips64vr5900el \
261 | mipsisa32 | mipsisa32el \
262 | mipsisa32r2 | mipsisa32r2el \
263 | mipsisa64 | mipsisa64el \
264 | mipsisa64r2 | mipsisa64r2el \
265 | mipsisa64sb1 | mipsisa64sb1el \
266 | mipsisa64sr71k | mipsisa64sr71kel \
267 | mipstx39 | mipstx39el \
268 | mn10200 | mn10300 \
269 | mt \
270 | msp430 \
271 | ns16k | ns32k \
272 | or32 \
273 | pdp10 | pdp11 | pj | pjl \
274 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
275 | pyramid \
276 | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
277 | sh64 | sh64le \
278 | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
279 | sparcv8 | sparcv9 | sparcv9b \
280 | strongarm \
281 | tahoe | thumb | tic4x | tic80 | tron \
282 | v850 | v850e \
283 | we32k \
284 | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
285 | z8k)
286 basic_machine=$basic_machine-unknown
288 m32c)
289 basic_machine=$basic_machine-unknown
291 m6811 | m68hc11 | m6812 | m68hc12)
292 # Motorola 68HC11/12.
293 basic_machine=$basic_machine-unknown
294 os=-none
296 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
298 ms1)
299 basic_machine=mt-unknown
301 nios2 | nios2-* | nios2 | nios2-*)
302 basic_machine=nios2-altera
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.
308 i*86 | x86_64)
309 basic_machine=$basic_machine-pc
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
316 # Recognize the basic CPU types with company name.
317 580-* \
318 | a29k-* \
319 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
320 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
321 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
322 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
323 | avr-* \
324 | bfin-* | bs2000-* \
325 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
326 | clipper-* | craynv-* | cydra-* \
327 | d10v-* | d30v-* | dlx-* \
328 | elxsi-* \
329 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
330 | h8300-* | h8500-* \
331 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
332 | i*86-* | i860-* | i960-* | ia64-* \
333 | ip2k-* | iq2000-* \
334 | m32r-* | m32rle-* \
335 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
336 | m88110-* | m88k-* | maxq-* | mcore-* \
337 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
338 | mips16-* \
339 | mips64-* | mips64el-* \
340 | mips64vr-* | mips64vrel-* \
341 | mips64orion-* | mips64orionel-* \
342 | mips64vr4100-* | mips64vr4100el-* \
343 | mips64vr4300-* | mips64vr4300el-* \
344 | mips64vr5000-* | mips64vr5000el-* \
345 | mips64vr5900-* | mips64vr5900el-* \
346 | mipsisa32-* | mipsisa32el-* \
347 | mipsisa32r2-* | mipsisa32r2el-* \
348 | mipsisa64-* | mipsisa64el-* \
349 | mipsisa64r2-* | mipsisa64r2el-* \
350 | mipsisa64sb1-* | mipsisa64sb1el-* \
351 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
352 | mipstx39-* | mipstx39el-* \
353 | mmix-* \
354 | mt-* \
355 | msp430-* \
356 | none-* | np1-* | ns16k-* | ns32k-* \
357 | orion-* \
358 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
359 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
360 | pyramid-* \
361 | romp-* | rs6000-* \
362 | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
363 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
364 | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
365 | sparclite-* \
366 | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
367 | tahoe-* | thumb-* \
368 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
369 | tron-* \
370 | v850-* | v850e-* | vax-* \
371 | we32k-* \
372 | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
373 | xstormy16-* | xtensa-* \
374 | ymp-* \
375 | z8k-*)
377 m32c-*)
379 # Recognize the various machine names and aliases which stand
380 # for a CPU type and a company and sometimes even an OS.
381 386bsd)
382 basic_machine=i386-unknown
383 os=-bsd
385 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
386 basic_machine=m68000-att
388 3b*)
389 basic_machine=we32k-att
391 a29khif)
392 basic_machine=a29k-amd
393 os=-udi
395 abacus)
396 basic_machine=abacus-unknown
398 adobe68k)
399 basic_machine=m68010-adobe
400 os=-scout
402 alliant | fx80)
403 basic_machine=fx80-alliant
405 altos | altos3068)
406 basic_machine=m68k-altos
408 am29k)
409 basic_machine=a29k-none
410 os=-bsd
412 amd64)
413 basic_machine=x86_64-pc
415 amd64-*)
416 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
418 amdahl)
419 basic_machine=580-amdahl
420 os=-sysv
422 amiga | amiga-*)
423 basic_machine=m68k-unknown
425 amigaos | amigados)
426 basic_machine=m68k-unknown
427 os=-amigaos
429 amigaunix | amix)
430 basic_machine=m68k-unknown
431 os=-sysv4
433 apollo68)
434 basic_machine=m68k-apollo
435 os=-sysv
437 apollo68bsd)
438 basic_machine=m68k-apollo
439 os=-bsd
441 aux)
442 basic_machine=m68k-apple
443 os=-aux
445 balance)
446 basic_machine=ns32k-sequent
447 os=-dynix
449 c90)
450 basic_machine=c90-cray
451 os=-unicos
453 convex-c1)
454 basic_machine=c1-convex
455 os=-bsd
457 convex-c2)
458 basic_machine=c2-convex
459 os=-bsd
461 convex-c32)
462 basic_machine=c32-convex
463 os=-bsd
465 convex-c34)
466 basic_machine=c34-convex
467 os=-bsd
469 convex-c38)
470 basic_machine=c38-convex
471 os=-bsd
473 cray | j90)
474 basic_machine=j90-cray
475 os=-unicos
477 craynv)
478 basic_machine=craynv-cray
479 os=-unicosmp
481 cr16c)
482 basic_machine=cr16c-unknown
483 os=-elf
485 crds | unos)
486 basic_machine=m68k-crds
488 crisv32 | crisv32-* | etraxfs*)
489 basic_machine=crisv32-axis
491 cris | cris-* | etrax*)
492 basic_machine=cris-axis
494 crx)
495 basic_machine=crx-unknown
496 os=-elf
498 da30 | da30-*)
499 basic_machine=m68k-da30
501 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
502 basic_machine=mips-dec
504 decsystem10* | dec10*)
505 basic_machine=pdp10-dec
506 os=-tops10
508 decsystem20* | dec20*)
509 basic_machine=pdp10-dec
510 os=-tops20
512 delta | 3300 | motorola-3300 | motorola-delta \
513 | 3300-motorola | delta-motorola)
514 basic_machine=m68k-motorola
516 delta88)
517 basic_machine=m88k-motorola
518 os=-sysv3
520 djgpp)
521 basic_machine=i586-pc
522 os=-msdosdjgpp
524 dpx20 | dpx20-*)
525 basic_machine=rs6000-bull
526 os=-bosx
528 dpx2* | dpx2*-bull)
529 basic_machine=m68k-bull
530 os=-sysv3
532 ebmon29k)
533 basic_machine=a29k-amd
534 os=-ebmon
536 elxsi)
537 basic_machine=elxsi-elxsi
538 os=-bsd
540 encore | umax | mmax)
541 basic_machine=ns32k-encore
543 es1800 | OSE68k | ose68k | ose | OSE)
544 basic_machine=m68k-ericsson
545 os=-ose
547 fx2800)
548 basic_machine=i860-alliant
550 genix)
551 basic_machine=ns32k-ns
553 gmicro)
554 basic_machine=tron-gmicro
555 os=-sysv
557 go32)
558 basic_machine=i386-pc
559 os=-go32
561 h3050r* | hiux*)
562 basic_machine=hppa1.1-hitachi
563 os=-hiuxwe2
565 h8300hms)
566 basic_machine=h8300-hitachi
567 os=-hms
569 h8300xray)
570 basic_machine=h8300-hitachi
571 os=-xray
573 h8500hms)
574 basic_machine=h8500-hitachi
575 os=-hms
577 harris)
578 basic_machine=m88k-harris
579 os=-sysv3
581 hp300-*)
582 basic_machine=m68k-hp
584 hp300bsd)
585 basic_machine=m68k-hp
586 os=-bsd
588 hp300hpux)
589 basic_machine=m68k-hp
590 os=-hpux
592 hp3k9[0-9][0-9] | hp9[0-9][0-9])
593 basic_machine=hppa1.0-hp
595 hp9k2[0-9][0-9] | hp9k31[0-9])
596 basic_machine=m68000-hp
598 hp9k3[2-9][0-9])
599 basic_machine=m68k-hp
601 hp9k6[0-9][0-9] | hp6[0-9][0-9])
602 basic_machine=hppa1.0-hp
604 hp9k7[0-79][0-9] | hp7[0-79][0-9])
605 basic_machine=hppa1.1-hp
607 hp9k78[0-9] | hp78[0-9])
608 # FIXME: really hppa2.0-hp
609 basic_machine=hppa1.1-hp
611 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
612 # FIXME: really hppa2.0-hp
613 basic_machine=hppa1.1-hp
615 hp9k8[0-9][13679] | hp8[0-9][13679])
616 basic_machine=hppa1.1-hp
618 hp9k8[0-9][0-9] | hp8[0-9][0-9])
619 basic_machine=hppa1.0-hp
621 hppa-next)
622 os=-nextstep3
624 hppaosf)
625 basic_machine=hppa1.1-hp
626 os=-osf
628 hppro)
629 basic_machine=hppa1.1-hp
630 os=-proelf
632 i370-ibm* | ibm*)
633 basic_machine=i370-ibm
635 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
636 i*86v32)
637 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
638 os=-sysv32
640 i*86v4*)
641 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
642 os=-sysv4
644 i*86v)
645 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
646 os=-sysv
648 i*86sol2)
649 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
650 os=-solaris2
652 i386mach)
653 basic_machine=i386-mach
654 os=-mach
656 i386-vsta | vsta)
657 basic_machine=i386-unknown
658 os=-vsta
660 iris | iris4d)
661 basic_machine=mips-sgi
662 case $os in
663 -irix*)
666 os=-irix4
668 esac
670 isi68 | isi)
671 basic_machine=m68k-isi
672 os=-sysv
674 m88k-omron*)
675 basic_machine=m88k-omron
677 magnum | m3230)
678 basic_machine=mips-mips
679 os=-sysv
681 merlin)
682 basic_machine=ns32k-utek
683 os=-sysv
685 mingw32)
686 basic_machine=i386-pc
687 os=-mingw32
689 miniframe)
690 basic_machine=m68000-convergent
692 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
693 basic_machine=m68k-atari
694 os=-mint
696 mipsEE* | ee | ps2)
697 basic_machine=mips64r5900el-scei
698 case $os in
699 -linux*)
702 os=-elf
704 esac
706 iop)
707 basic_machine=mipsel-scei
708 os=-irx
710 dvp)
711 basic_machine=dvp-scei
712 os=-elf
714 mips3*-*)
715 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
717 mips3*)
718 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
720 monitor)
721 basic_machine=m68k-rom68k
722 os=-coff
724 morphos)
725 basic_machine=powerpc-unknown
726 os=-morphos
728 msdos)
729 basic_machine=i386-pc
730 os=-msdos
732 ms1-*)
733 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
735 mvs)
736 basic_machine=i370-ibm
737 os=-mvs
739 ncr3000)
740 basic_machine=i486-ncr
741 os=-sysv4
743 netbsd386)
744 basic_machine=i386-unknown
745 os=-netbsd
747 netwinder)
748 basic_machine=armv4l-rebel
749 os=-linux
751 news | news700 | news800 | news900)
752 basic_machine=m68k-sony
753 os=-newsos
755 news1000)
756 basic_machine=m68030-sony
757 os=-newsos
759 news-3600 | risc-news)
760 basic_machine=mips-sony
761 os=-newsos
763 necv70)
764 basic_machine=v70-nec
765 os=-sysv
767 next | m*-next )
768 basic_machine=m68k-next
769 case $os in
770 -nextstep* )
772 -ns2*)
773 os=-nextstep2
776 os=-nextstep3
778 esac
780 nh3000)
781 basic_machine=m68k-harris
782 os=-cxux
784 nh[45]000)
785 basic_machine=m88k-harris
786 os=-cxux
788 nindy960)
789 basic_machine=i960-intel
790 os=-nindy
792 mon960)
793 basic_machine=i960-intel
794 os=-mon960
796 nonstopux)
797 basic_machine=mips-compaq
798 os=-nonstopux
800 np1)
801 basic_machine=np1-gould
803 nsr-tandem)
804 basic_machine=nsr-tandem
806 op50n-* | op60c-*)
807 basic_machine=hppa1.1-oki
808 os=-proelf
810 openrisc | openrisc-*)
811 basic_machine=or32-unknown
813 os400)
814 basic_machine=powerpc-ibm
815 os=-os400
817 OSE68000 | ose68000)
818 basic_machine=m68000-ericsson
819 os=-ose
821 os68k)
822 basic_machine=m68k-none
823 os=-os68k
825 pa-hitachi)
826 basic_machine=hppa1.1-hitachi
827 os=-hiuxwe2
829 paragon)
830 basic_machine=i860-intel
831 os=-osf
833 pbd)
834 basic_machine=sparc-tti
836 pbb)
837 basic_machine=m68k-tti
839 pc532 | pc532-*)
840 basic_machine=ns32k-pc532
842 pc98)
843 basic_machine=i386-pc
845 pc98-*)
846 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
848 pentium | p5 | k5 | k6 | nexgen | viac3)
849 basic_machine=i586-pc
851 pentiumpro | p6 | 6x86 | athlon | athlon_*)
852 basic_machine=i686-pc
854 pentiumii | pentium2 | pentiumiii | pentium3)
855 basic_machine=i686-pc
857 pentium4)
858 basic_machine=i786-pc
860 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
861 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
863 pentiumpro-* | p6-* | 6x86-* | athlon-*)
864 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
866 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
867 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
869 pentium4-*)
870 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
873 basic_machine=pn-gould
875 power) basic_machine=power-ibm
877 ppc) basic_machine=powerpc-unknown
879 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
881 ppcle | powerpclittle | ppc-le | powerpc-little)
882 basic_machine=powerpcle-unknown
884 ppcle-* | powerpclittle-*)
885 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
887 ppc64) basic_machine=powerpc64-unknown
889 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
891 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
892 basic_machine=powerpc64le-unknown
894 ppc64le-* | powerpc64little-*)
895 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
897 ps2)
898 basic_machine=i386-ibm
900 pw32)
901 basic_machine=i586-unknown
902 os=-pw32
904 rdos)
905 basic_machine=i386-pc
906 os=-rdos
908 rom68k)
909 basic_machine=m68k-rom68k
910 os=-coff
912 rm[46]00)
913 basic_machine=mips-siemens
915 rtpc | rtpc-*)
916 basic_machine=romp-ibm
918 s390 | s390-*)
919 basic_machine=s390-ibm
921 s390x | s390x-*)
922 basic_machine=s390x-ibm
924 sa29200)
925 basic_machine=a29k-amd
926 os=-udi
928 sb1)
929 basic_machine=mipsisa64sb1-unknown
931 sb1el)
932 basic_machine=mipsisa64sb1el-unknown
934 sei)
935 basic_machine=mips-sei
936 os=-seiux
938 sequent)
939 basic_machine=i386-sequent
942 basic_machine=sh-hitachi
943 os=-hms
945 sh64)
946 basic_machine=sh64-unknown
948 sparclite-wrs | simso-wrs)
949 basic_machine=sparclite-wrs
950 os=-vxworks
952 sps7)
953 basic_machine=m68k-bull
954 os=-sysv2
956 spur)
957 basic_machine=spur-unknown
959 st2000)
960 basic_machine=m68k-tandem
962 stratus)
963 basic_machine=i860-stratus
964 os=-sysv4
966 sun2)
967 basic_machine=m68000-sun
969 sun2os3)
970 basic_machine=m68000-sun
971 os=-sunos3
973 sun2os4)
974 basic_machine=m68000-sun
975 os=-sunos4
977 sun3os3)
978 basic_machine=m68k-sun
979 os=-sunos3
981 sun3os4)
982 basic_machine=m68k-sun
983 os=-sunos4
985 sun4os3)
986 basic_machine=sparc-sun
987 os=-sunos3
989 sun4os4)
990 basic_machine=sparc-sun
991 os=-sunos4
993 sun4sol2)
994 basic_machine=sparc-sun
995 os=-solaris2
997 sun3 | sun3-*)
998 basic_machine=m68k-sun
1000 sun4)
1001 basic_machine=sparc-sun
1003 sun386 | sun386i | roadrunner)
1004 basic_machine=i386-sun
1006 sv1)
1007 basic_machine=sv1-cray
1008 os=-unicos
1010 symmetry)
1011 basic_machine=i386-sequent
1012 os=-dynix
1014 t3e)
1015 basic_machine=alphaev5-cray
1016 os=-unicos
1018 t90)
1019 basic_machine=t90-cray
1020 os=-unicos
1022 tic54x | c54x*)
1023 basic_machine=tic54x-unknown
1024 os=-coff
1026 tic55x | c55x*)
1027 basic_machine=tic55x-unknown
1028 os=-coff
1030 tic6x | c6x*)
1031 basic_machine=tic6x-unknown
1032 os=-coff
1034 tx39)
1035 basic_machine=mipstx39-unknown
1037 tx39el)
1038 basic_machine=mipstx39el-unknown
1040 toad1)
1041 basic_machine=pdp10-xkl
1042 os=-tops20
1044 tower | tower-32)
1045 basic_machine=m68k-ncr
1047 tpf)
1048 basic_machine=s390x-ibm
1049 os=-tpf
1051 udi29k)
1052 basic_machine=a29k-amd
1053 os=-udi
1055 ultra3)
1056 basic_machine=a29k-nyu
1057 os=-sym1
1059 v810 | necv810)
1060 basic_machine=v810-nec
1061 os=-none
1063 vaxv)
1064 basic_machine=vax-dec
1065 os=-sysv
1067 vms)
1068 basic_machine=vax-dec
1069 os=-vms
1071 vpp*|vx|vx-*)
1072 basic_machine=f301-fujitsu
1074 vxworks960)
1075 basic_machine=i960-wrs
1076 os=-vxworks
1078 vxworks68)
1079 basic_machine=m68k-wrs
1080 os=-vxworks
1082 vxworks29k)
1083 basic_machine=a29k-wrs
1084 os=-vxworks
1086 w65*)
1087 basic_machine=w65-wdc
1088 os=-none
1090 w89k-*)
1091 basic_machine=hppa1.1-winbond
1092 os=-proelf
1094 xbox)
1095 basic_machine=i686-pc
1096 os=-mingw32
1098 xps | xps100)
1099 basic_machine=xps100-honeywell
1101 ymp)
1102 basic_machine=ymp-cray
1103 os=-unicos
1105 z8k-*-coff)
1106 basic_machine=z8k-unknown
1107 os=-sim
1109 none)
1110 basic_machine=none-none
1111 os=-none
1114 # Here we handle the default manufacturer of certain CPU types. It is in
1115 # some cases the only manufacturer, in others, it is the most popular.
1116 w89k)
1117 basic_machine=hppa1.1-winbond
1119 op50n)
1120 basic_machine=hppa1.1-oki
1122 op60c)
1123 basic_machine=hppa1.1-oki
1125 romp)
1126 basic_machine=romp-ibm
1128 mmix)
1129 basic_machine=mmix-knuth
1131 rs6000)
1132 basic_machine=rs6000-ibm
1134 vax)
1135 basic_machine=vax-dec
1137 pdp10)
1138 # there are many clones, so DEC is not a safe bet
1139 basic_machine=pdp10-unknown
1141 pdp11)
1142 basic_machine=pdp11-dec
1144 we32k)
1145 basic_machine=we32k-att
1147 sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1148 basic_machine=sh-unknown
1150 sparc | sparcv8 | sparcv9 | sparcv9b)
1151 basic_machine=sparc-sun
1153 cydra)
1154 basic_machine=cydra-cydrome
1156 orion)
1157 basic_machine=orion-highlevel
1159 orion105)
1160 basic_machine=clipper-highlevel
1162 mac | mpw | mac-mpw)
1163 basic_machine=m68k-apple
1165 pmac | pmac-mpw)
1166 basic_machine=powerpc-apple
1168 *-unknown)
1169 # Make sure to match an already-canonicalized machine name.
1172 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1173 exit 1
1175 esac
1177 # Here we canonicalize certain aliases for manufacturers.
1178 case $basic_machine in
1179 *-digital*)
1180 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1182 *-commodore*)
1183 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1187 esac
1189 # Decode manufacturer-specific aliases for certain operating systems.
1191 if [ x"$os" != x"" ]
1192 then
1193 case $os in
1194 # First match some system type aliases
1195 # that might get confused with valid system types.
1196 # -solaris* is a basic system type, with this one exception.
1197 -solaris1 | -solaris1.*)
1198 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1200 -solaris)
1201 os=-solaris2
1203 -svr4*)
1204 os=-sysv4
1206 -unixware*)
1207 os=-sysv4.2uw
1209 -gnu/linux*)
1210 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1212 # First accept the basic system types.
1213 # The portable systems comes first.
1214 # Each alternative MUST END IN A *, to match a version number.
1215 # -sysv* is not here because it comes later, after sysvr4.
1216 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1217 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1218 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1219 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1220 | -aos* \
1221 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1222 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1223 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1224 | -openbsd* | -solidbsd* \
1225 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1226 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1227 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1228 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1229 | -chorusos* | -chorusrdb* \
1230 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1231 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1232 | -uxpv* | -beos* | -mpeix* | -udk* \
1233 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1234 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1235 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1236 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1237 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1238 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1239 | -skyos* | -haiku* | -rdos* | -irx*)
1240 # Remember, each alternative MUST END IN *, to match a version number.
1242 -qnx*)
1243 case $basic_machine in
1244 x86-* | i*86-*)
1247 os=-nto$os
1249 esac
1251 -nto-qnx*)
1253 -nto*)
1254 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1256 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1257 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1258 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1260 -mac*)
1261 os=`echo $os | sed -e 's|mac|macos|'`
1263 -linux-dietlibc)
1264 os=-linux-dietlibc
1266 -linux*)
1267 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1269 -sunos5*)
1270 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1272 -sunos6*)
1273 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1275 -opened*)
1276 os=-openedition
1278 -os400*)
1279 os=-os400
1281 -wince*)
1282 os=-wince
1284 -osfrose*)
1285 os=-osfrose
1287 -osf*)
1288 os=-osf
1290 -utek*)
1291 os=-bsd
1293 -dynix*)
1294 os=-bsd
1296 -acis*)
1297 os=-aos
1299 -atheos*)
1300 os=-atheos
1302 -syllable*)
1303 os=-syllable
1305 -386bsd)
1306 os=-bsd
1308 -ctix* | -uts*)
1309 os=-sysv
1311 -nova*)
1312 os=-rtmk-nova
1314 -ns2 )
1315 os=-nextstep2
1317 -nsk*)
1318 os=-nsk
1320 # Preserve the version number of sinix5.
1321 -sinix5.*)
1322 os=`echo $os | sed -e 's|sinix|sysv|'`
1324 -sinix*)
1325 os=-sysv4
1327 -tpf*)
1328 os=-tpf
1330 -triton*)
1331 os=-sysv3
1333 -oss*)
1334 os=-sysv3
1336 -svr4)
1337 os=-sysv4
1339 -svr3)
1340 os=-sysv3
1342 -sysvr4)
1343 os=-sysv4
1345 # This must come after -sysvr4.
1346 -sysv*)
1348 -ose*)
1349 os=-ose
1351 -es1800*)
1352 os=-ose
1354 -xenix)
1355 os=-xenix
1357 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1358 os=-mint
1360 -aros*)
1361 os=-aros
1363 -kaos*)
1364 os=-kaos
1366 -zvmoe)
1367 os=-zvmoe
1369 -none)
1372 # Get rid of the `-' at the beginning of $os.
1373 os=`echo $os | sed 's/[^-]*-//'`
1374 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1375 exit 1
1377 esac
1378 else
1380 # Here we handle the default operating systems that come with various machines.
1381 # The value should be what the vendor currently ships out the door with their
1382 # machine or put another way, the most popular os provided with the machine.
1384 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1385 # "-sun"), then you have to tell the case statement up towards the top
1386 # that MANUFACTURER isn't an operating system. Otherwise, code above
1387 # will signal an error saying that MANUFACTURER isn't an operating
1388 # system, and we'll never get to this point.
1390 case $basic_machine in
1391 *-acorn)
1392 os=-riscix1.2
1394 arm*-rebel)
1395 os=-linux
1397 arm*-semi)
1398 os=-aout
1400 c4x-* | tic4x-*)
1401 os=-coff
1403 # This must come before the *-dec entry.
1404 pdp10-*)
1405 os=-tops20
1407 pdp11-*)
1408 os=-none
1410 *-dec | vax-*)
1411 os=-ultrix4.2
1413 m68*-apollo)
1414 os=-domain
1416 i386-sun)
1417 os=-sunos4.0.2
1419 m68000-sun)
1420 os=-sunos3
1421 # This also exists in the configure program, but was not the
1422 # default.
1423 # os=-sunos4
1425 m68*-cisco)
1426 os=-aout
1428 mips*-cisco)
1429 os=-elf
1431 mips*-*)
1432 os=-elf
1434 or32-*)
1435 os=-coff
1437 *-tti) # must be before sparc entry or we get the wrong os.
1438 os=-sysv3
1440 sparc-* | *-sun)
1441 os=-sunos4.1.1
1443 *-be)
1444 os=-beos
1446 *-haiku)
1447 os=-haiku
1449 *-ibm)
1450 os=-aix
1452 *-knuth)
1453 os=-mmixware
1455 *-wec)
1456 os=-proelf
1458 *-winbond)
1459 os=-proelf
1461 *-oki)
1462 os=-proelf
1464 *-hp)
1465 os=-hpux
1467 *-hitachi)
1468 os=-hiux
1470 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1471 os=-sysv
1473 *-cbm)
1474 os=-amigaos
1476 *-dg)
1477 os=-dgux
1479 *-dolphin)
1480 os=-sysv3
1482 m68k-ccur)
1483 os=-rtu
1485 m88k-omron*)
1486 os=-luna
1488 *-next )
1489 os=-nextstep
1491 *-sequent)
1492 os=-ptx
1494 *-crds)
1495 os=-unos
1497 *-ns)
1498 os=-genix
1500 i370-*)
1501 os=-mvs
1503 *-next)
1504 os=-nextstep3
1506 *-gould)
1507 os=-sysv
1509 *-highlevel)
1510 os=-bsd
1512 *-encore)
1513 os=-bsd
1515 *-sgi)
1516 os=-irix
1518 *-siemens)
1519 os=-sysv4
1521 *-masscomp)
1522 os=-rtu
1524 f30[01]-fujitsu | f700-fujitsu)
1525 os=-uxpv
1527 *-rom68k)
1528 os=-coff
1530 *-*bug)
1531 os=-coff
1533 *-apple)
1534 os=-macos
1536 *-atari*)
1537 os=-mint
1540 os=-none
1542 esac
1545 # Here we handle the case where we know the os, and the CPU type, but not the
1546 # manufacturer. We pick the logical manufacturer.
1547 vendor=unknown
1548 case $basic_machine in
1549 *-unknown)
1550 case $os in
1551 -riscix*)
1552 vendor=acorn
1554 -sunos*)
1555 vendor=sun
1557 -aix*)
1558 vendor=ibm
1560 -beos*)
1561 vendor=be
1563 -hpux*)
1564 vendor=hp
1566 -mpeix*)
1567 vendor=hp
1569 -hiux*)
1570 vendor=hitachi
1572 -unos*)
1573 vendor=crds
1575 -dgux*)
1576 vendor=dg
1578 -luna*)
1579 vendor=omron
1581 -genix*)
1582 vendor=ns
1584 -mvs* | -opened*)
1585 vendor=ibm
1587 -os400*)
1588 vendor=ibm
1590 -ptx*)
1591 vendor=sequent
1593 -tpf*)
1594 vendor=ibm
1596 -vxsim* | -vxworks* | -windiss*)
1597 vendor=wrs
1599 -aux*)
1600 vendor=apple
1602 -hms*)
1603 vendor=hitachi
1605 -mpw* | -macos*)
1606 vendor=apple
1608 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1609 vendor=atari
1611 -vos*)
1612 vendor=stratus
1614 esac
1615 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1617 esac
1619 echo $basic_machine$os
1620 exit
1622 # Local variables:
1623 # eval: (add-hook 'write-file-hooks 'time-stamp)
1624 # time-stamp-start: "timestamp='"
1625 # time-stamp-format: "%:y-%02m-%02d"
1626 # time-stamp-end: "'"
1627 # End: