Ooops - fixed typo in previous delta
[official-gcc.git] / config.sub
blob406b4454dc13202d042691770bc300882e40c169
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 # Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
4 # This file is (in principle) common to ALL GNU software.
5 # The presence of a machine in this file suggests that SOME GNU software
6 # can handle that machine. It does not imply ALL GNU software can.
8 # This file is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330,
21 # Boston, MA 02111-1307, USA.
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
28 # Configuration subroutine to validate and canonicalize a configuration type.
29 # Supply the specified configuration type as an argument.
30 # If it is invalid, we print an error message on stderr and exit with code 1.
31 # Otherwise, we print the canonical config type on stdout and succeed.
33 # This file is supposed to be the same for all GNU packages
34 # and recognize all the CPU types, system types and aliases
35 # that are meaningful with *any* GNU software.
36 # Each package is responsible for reporting which valid configurations
37 # it does not support. The user should be able to distinguish
38 # a failure to support a valid configuration from a meaningless
39 # configuration.
41 # The goal of this file is to map all the various variations of a given
42 # machine specification into a single specification in the form:
43 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
44 # or in some cases, the newer four-part form:
45 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
46 # It is wrong to echo any other type of specification.
48 if [ x$1 = x ]
49 then
50 echo Configuration name missing. 1>&2
51 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
52 echo "or $0 ALIAS" 1>&2
53 echo where ALIAS is a recognized configuration type. 1>&2
54 exit 1
57 # First pass through any local machine types.
58 case $1 in
59 *local*)
60 echo $1
61 exit 0
65 esac
67 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
68 # Here we must recognize all the valid KERNEL-OS combinations.
69 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
70 case $maybe_os in
71 linux-gnu*)
72 os=-$maybe_os
73 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
76 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
77 if [ $basic_machine != $1 ]
78 then os=`echo $1 | sed 's/.*-/-/'`
79 else os=; fi
81 esac
83 ### Let's recognize common machines as not being operating systems so
84 ### that things like config.sub decstation-3100 work. We also
85 ### recognize some manufacturers as not being operating systems, so we
86 ### can provide default operating systems below.
87 case $os in
88 -sun*os*)
89 # Prevent following clause from handling this invalid input.
91 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
92 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
93 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
94 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
95 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
96 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
97 -apple)
98 os=
99 basic_machine=$1
101 -sim | -cisco | -oki | -wec | -winbond ) # CYGNUS LOCAL
103 basic_machine=$1
105 -scout) # CYGNUS LOCAL
107 -wrs) # CYGNUS LOCAL
108 os=vxworks
109 basic_machine=$1
111 -hiux*)
112 os=-hiuxwe2
114 -sco5)
115 os=-sco3.2v5
116 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
118 -sco4)
119 os=-sco3.2v4
120 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
122 -sco3.2.[4-9]*)
123 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
124 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
126 -sco3.2v[4-9]*)
127 # Don't forget version if it is 3.2v4 or newer.
128 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
130 -sco*)
131 os=-sco3.2v2
132 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
134 -isc)
135 os=-isc2.2
136 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
138 -clix*)
139 basic_machine=clipper-intergraph
141 -isc*)
142 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
144 -lynx*)
145 os=-lynxos
147 -ptx*)
148 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
150 -windowsnt*)
151 os=`echo $os | sed -e 's/windowsnt/winnt/'`
153 -psos*)
154 os=-psos
156 esac
158 # Decode aliases for certain CPU-COMPANY combinations.
159 case $basic_machine in
160 # Recognize the basic CPU types without company name.
161 # Some are omitted here because they have special meanings below.
162 tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
163 | arme[lb] | pyramid | mn10200 | mn10300 \
164 | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
165 | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
166 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
167 | 1750a | dsp16xx | pdp11 \
168 | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
169 | mipstx39 | mipstx39el \
170 | sparc | sparclet | sparclite | sparc64 | v850)
171 basic_machine=$basic_machine-unknown
173 m88110 | m680[01234]0 | m683?2 | m68360 | z8k | v70 | h8500 | w65) # CYGNUS LOCAL
174 basic_machine=$basic_machine-unknown
176 mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith/vr4300
177 basic_machine=$basic_machine-unknown
179 mips64vr4100 | mips64vr4100el) # CYGNUS LOCAL jsmith/vr4100
180 basic_machine=$basic_machine-unknown
182 mips64vr5000 | mips64vr5000el) # CYGNUS LOCAL ian/vr5000
183 basic_machine=$basic_machine-unknown
185 mips16) # CYGNUS LOCAL krk/mips16
186 basic_machine=$basic_machine-unknown
188 d10v) # CYGNUS LOCAL meissner/d10v
189 basic_machine=$basic_machine-unknown
191 # We use `pc' rather than `unknown'
192 # because (1) that's what they normally are, and
193 # (2) the word "unknown" tends to confuse beginning users.
194 i[3456]86)
195 basic_machine=$basic_machine-pc
197 # Object if more than one company name word.
198 *-*-*)
199 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
200 exit 1
202 # Recognize the basic CPU types with company name.
203 vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
204 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
205 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
206 | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
207 | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
208 | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
209 | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
210 | xps100-* | clipper-* | orion-* \
211 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
212 | sparc64-* | mips64-* | mipsel-* \
213 | mips64el-* | mips64orion-* | mips64orionel-* \
214 | mipstx39-* | mipstx39el-* \
215 | f301-*)
217 m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # CYGNUS LOCAL
219 mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith/vr4300
221 mips64vr4100-* | mips64vr4100el-*) # CYGNUS LOCAL jsmith/vr4100
223 mips16-*) # CYGNUS LOCAL krk/mips16
225 # Recognize the various machine names and aliases which stand
226 # for a CPU type and a company and sometimes even an OS.
227 386bsd) # CYGNUS LOCAL
228 basic_machine=i386-unknown
229 os=-bsd
231 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
232 basic_machine=m68000-att
234 3b*)
235 basic_machine=we32k-att
237 a29khif) # CYGNUS LOCAL
238 basic_machine=a29k-amd
239 os=-udi
241 adobe68k) # CYGNUS LOCAL
242 basic_machine=m68010-adobe
243 os=-scout
245 alliant | fx80)
246 basic_machine=fx80-alliant
248 altos | altos3068)
249 basic_machine=m68k-altos
251 am29k)
252 basic_machine=a29k-none
253 os=-bsd
255 amdahl)
256 basic_machine=580-amdahl
257 os=-sysv
259 amiga | amiga-*)
260 basic_machine=m68k-cbm
262 amigaos | amigados)
263 basic_machine=m68k-cbm
264 os=-amigaos
266 amigaunix | amix)
267 basic_machine=m68k-cbm
268 os=-sysv4
270 apollo68)
271 basic_machine=m68k-apollo
272 os=-sysv
274 apollo68bsd) # CYGNUS LOCAL
275 basic_machine=m68k-apollo
276 os=-bsd
278 aux)
279 basic_machine=m68k-apple
280 os=-aux
282 balance)
283 basic_machine=ns32k-sequent
284 os=-dynix
286 convex-c1)
287 basic_machine=c1-convex
288 os=-bsd
290 convex-c2)
291 basic_machine=c2-convex
292 os=-bsd
294 convex-c32)
295 basic_machine=c32-convex
296 os=-bsd
298 convex-c34)
299 basic_machine=c34-convex
300 os=-bsd
302 convex-c38)
303 basic_machine=c38-convex
304 os=-bsd
306 cray | ymp)
307 basic_machine=ymp-cray
308 os=-unicos
310 cray2)
311 basic_machine=cray2-cray
312 os=-unicos
314 [ctj]90-cray)
315 basic_machine=c90-cray
316 os=-unicos
318 crds | unos)
319 basic_machine=m68k-crds
321 da30 | da30-*)
322 basic_machine=m68k-da30
324 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
325 basic_machine=mips-dec
327 delta | 3300 | motorola-3300 | motorola-delta \
328 | 3300-motorola | delta-motorola)
329 basic_machine=m68k-motorola
331 delta88)
332 basic_machine=m88k-motorola
333 os=-sysv3
335 dpx20 | dpx20-*)
336 basic_machine=rs6000-bull
337 os=-bosx
339 dpx2* | dpx2*-bull)
340 basic_machine=m68k-bull
341 os=-sysv3
343 ebmon29k)
344 basic_machine=a29k-amd
345 os=-ebmon
347 elxsi)
348 basic_machine=elxsi-elxsi
349 os=-bsd
351 encore | umax | mmax)
352 basic_machine=ns32k-encore
354 es1800 | OSE68k | ose68k | ose | OSE) # CYGNUS LOCAL
355 basic_machine=m68k-ericsson
356 os=-ose
358 fx2800)
359 basic_machine=i860-alliant
361 genix)
362 basic_machine=ns32k-ns
364 gmicro)
365 basic_machine=tron-gmicro
366 os=-sysv
368 h3050r* | hiux*)
369 basic_machine=hppa1.1-hitachi
370 os=-hiuxwe2
372 h8300hms)
373 basic_machine=h8300-hitachi
374 os=-hms
376 h8300xray) # CYGNUS LOCAL
377 basic_machine=h8300-hitachi
378 os=-xray
380 h8500hms) # CYGNUS LOCAL
381 basic_machine=h8500-hitachi
382 os=-hms
384 harris)
385 basic_machine=m88k-harris
386 os=-sysv3
388 hp300-*)
389 basic_machine=m68k-hp
391 hp300bsd)
392 basic_machine=m68k-hp
393 os=-bsd
395 hp300hpux)
396 basic_machine=m68k-hp
397 os=-hpux
399 w89k-*) # CYGNUS LOCAL
400 basic_machine=hppa1.1-winbond
401 os=-proelf
403 op50n-*) # CYGNUS LOCAL
404 basic_machine=hppa1.1-oki
405 os=-proelf
407 op60c-*) # CYGNUS LOCAL
408 basic_machine=hppa1.1-oki
409 os=-proelf
411 hppro) # CYGNUS LOCAL
412 basic_machine=hppa1.1-hp
413 os=-proelf
415 hp9k2[0-9][0-9] | hp9k31[0-9])
416 basic_machine=m68000-hp
418 hp9k3[2-9][0-9])
419 basic_machine=m68k-hp
421 hp9k6[0-9][0-9] | hp6[0-9][0-9] )
422 basic_machine=hppa1.0-hp
424 hp9k7[0-79][0-9] | hp7[0-79][0-9] )
425 basic_machine=hppa1.1-hp
427 hp9k78[0-9] | hp78[0-9] )
428 # FIXME: really hppa2.0-hp
429 basic_machine=hppa1.1-hp
431 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
432 hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
433 # FIXME: really hppa2.0-hp
434 basic_machine=hppa1.1-hp
436 hp9k8[0-9][13679] | hp8[0-9][13679] )
437 basic_machine=hppa1.1-hp
439 hp9k8[0-9][0-9] | hp8[0-9][0-9])
440 basic_machine=hppa1.0-hp
442 hppa-next)
443 os=-nextstep3
445 hppaosf) # CYGNUS LOCAL
446 basic_machine=hppa1.1-hp
447 os=-osf
449 i370-ibm* | ibm*)
450 basic_machine=i370-ibm
451 os=-mvs
453 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
454 i[3456]86v32)
455 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
456 os=-sysv32
458 i[3456]86v4*)
459 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
460 os=-sysv4
462 i[3456]86v)
463 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
464 os=-sysv
466 i[3456]86sol2)
467 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
468 os=-solaris2
470 i386mach) # CYGNUS LOCAL
471 basic_machine=i386-mach
472 os=-mach
474 i386-vsta | vsta) # CYGNUS LOCAL
475 basic_machine=i386-unknown
476 os=-vsta
478 i386-go32 | go32) # CYGNUS LOCAL
479 basic_machine=i386-unknown
480 os=-go32
482 i386-mingw32 | mingw32)
483 basic_machine=i386-unknown
484 os=-mingw32
486 iris | iris4d)
487 basic_machine=mips-sgi
488 case $os in
489 -irix*)
492 os=-irix4
494 esac
496 isi68 | isi)
497 basic_machine=m68k-isi
498 os=-sysv
500 m88k-omron*)
501 basic_machine=m88k-omron
503 magnum | m3230)
504 basic_machine=mips-mips
505 os=-sysv
507 merlin)
508 basic_machine=ns32k-utek
509 os=-sysv
511 miniframe)
512 basic_machine=m68000-convergent
514 mipsel*-linux*)
515 basic_machine=mipsel-unknown
516 os=-linux-gnu
518 mips*-linux*)
519 basic_machine=mips-unknown
520 os=-linux-gnu
522 mips3*-*)
523 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
525 mips3*)
526 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
528 monitor) # CYGNUS LOCAL
529 basic_machine=m68k-rom68k
530 os=-coff
532 msdos) # CYGNUS LOCAL
533 basic_machine=i386-unknown
534 os=-msdos
536 ncr3000)
537 basic_machine=i486-ncr
538 os=-sysv4
540 netbsd386)
541 basic_machine=i386-unknown # CYGNUS LOCAL
542 os=-netbsd
544 news | news700 | news800 | news900)
545 basic_machine=m68k-sony
546 os=-newsos
548 news1000)
549 basic_machine=m68030-sony
550 os=-newsos
552 news-3600 | risc-news)
553 basic_machine=mips-sony
554 os=-newsos
556 necv70) # CYGNUS LOCAL
557 basic_machine=v70-nec
558 os=-sysv
560 next | m*-next )
561 basic_machine=m68k-next
562 case $os in
563 -nextstep* )
565 -ns2*)
566 os=-nextstep2
569 os=-nextstep3
571 esac
573 nh3000)
574 basic_machine=m68k-harris
575 os=-cxux
577 nh[45]000)
578 basic_machine=m88k-harris
579 os=-cxux
581 nindy960)
582 basic_machine=i960-intel
583 os=-nindy
585 mon960) # CYGNUS LOCAL
586 basic_machine=i960-intel
587 os=-mon960
589 np1)
590 basic_machine=np1-gould
592 OSE68000 | ose68000) # CYGNUS LOCAL
593 basic_machine=m68000-ericsson
594 os=-ose
596 os68k) # CYGNUS LOCAL
597 basic_machine=m68k-none
598 os=-os68k
600 pa-hitachi)
601 basic_machine=hppa1.1-hitachi
602 os=-hiuxwe2
604 paragon)
605 basic_machine=i860-intel
606 os=-osf
608 pbd)
609 basic_machine=sparc-tti
611 pbb)
612 basic_machine=m68k-tti
614 pc532 | pc532-*)
615 basic_machine=ns32k-pc532
617 pentium | p5)
618 basic_machine=i586-intel
620 pentiumpro | p6)
621 basic_machine=i686-intel
623 pentium-* | p5-*)
624 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
626 pentiumpro-* | p6-*)
627 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
630 # We don't have specific support for AMD's K5 yet, so just call it a Pentium
631 basic_machine=i586-amd
633 nexen)
634 # We don't have specific support for Nexgen yet, so just call it a Pentium
635 basic_machine=i586-nexgen
638 basic_machine=pn-gould
640 power) basic_machine=rs6000-ibm
642 ppc) basic_machine=powerpc-unknown
644 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
646 ppcle | powerpclittle | ppc-le | powerpc-little)
647 basic_machine=powerpcle-unknown
649 ppcle-* | powerpclittle-*)
650 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
652 ps2)
653 basic_machine=i386-ibm
655 rom68k) # CYGNUS LOCAL
656 basic_machine=m68k-rom68k
657 os=-coff
659 rm[46]00)
660 basic_machine=mips-siemens
662 rtpc | rtpc-*)
663 basic_machine=romp-ibm
665 sa29200) # CYGNUS LOCAL
666 basic_machine=a29k-amd
667 os=-udi
669 sequent)
670 basic_machine=i386-sequent
673 basic_machine=sh-hitachi
674 os=-hms
676 sparclite-wrs) # CYGNUS LOCAL
677 basic_machine=sparclite-wrs
678 os=-vxworks
680 sps7)
681 basic_machine=m68k-bull
682 os=-sysv2
684 spur)
685 basic_machine=spur-unknown
687 st2000) # CYGNUS LOCAL
688 basic_machine=m68k-tandem
690 stratus) # CYGNUS LOCAL
691 basic_machine=i860-stratus
692 os=-sysv4
694 sun2)
695 basic_machine=m68000-sun
697 sun2os3)
698 basic_machine=m68000-sun
699 os=-sunos3
701 sun2os4)
702 basic_machine=m68000-sun
703 os=-sunos4
705 sun3os3)
706 basic_machine=m68k-sun
707 os=-sunos3
709 sun3os4)
710 basic_machine=m68k-sun
711 os=-sunos4
713 sun4os3)
714 basic_machine=sparc-sun
715 os=-sunos3
717 sun4os4)
718 basic_machine=sparc-sun
719 os=-sunos4
721 sun4sol2)
722 basic_machine=sparc-sun
723 os=-solaris2
725 sun3 | sun3-*)
726 basic_machine=m68k-sun
728 sun4)
729 basic_machine=sparc-sun
731 sun386 | sun386i | roadrunner)
732 basic_machine=i386-sun
734 symmetry)
735 basic_machine=i386-sequent
736 os=-dynix
738 tx39)
739 basic_machine=mipstx39-unknown
741 tx39el)
742 basic_machine=mipstx39el-unknown
744 tower | tower-32)
745 basic_machine=m68k-ncr
747 udi29k)
748 basic_machine=a29k-amd
749 os=-udi
751 ultra3)
752 basic_machine=a29k-nyu
753 os=-sym1
755 v810 | necv810) # CYGNUS LOCAL
756 basic_machine=v810-nec
757 os=-none
759 vaxv)
760 basic_machine=vax-dec
761 os=-sysv
763 vms)
764 basic_machine=vax-dec
765 os=-vms
767 vpp*|vx|vx-*)
768 basic_machine=f301-fujitsu
770 vxworks960)
771 basic_machine=i960-wrs
772 os=-vxworks
774 vxworks68)
775 basic_machine=m68k-wrs
776 os=-vxworks
778 vxworks29k)
779 basic_machine=a29k-wrs
780 os=-vxworks
782 w65*) # CYGNUS LOCAL
783 basic_machine=w65-wdc
784 os=-none
786 xmp)
787 basic_machine=xmp-cray
788 os=-unicos
790 xps | xps100)
791 basic_machine=xps100-honeywell
793 z8k-*-coff) # CYGNUS LOCAL
794 basic_machine=z8k-unknown
795 os=-sim
797 none)
798 basic_machine=none-none
799 os=-none
802 # Here we handle the default manufacturer of certain CPU types. It is in
803 # some cases the only manufacturer, in others, it is the most popular.
804 w89k) # CYGNUS LOCAL
805 basic_machine=hppa1.1-winbond
807 op50n) # CYGNUS LOCAL
808 basic_machine=hppa1.1-oki
810 op60c) # CYGNUS LOCAL
811 basic_machine=hppa1.1-oki
813 mips)
814 if [ x$os = x-linux-gnu ]; then
815 basic_machine=mips-unknown
816 else
817 basic_machine=mips-mips
820 romp)
821 basic_machine=romp-ibm
823 rs6000)
824 basic_machine=rs6000-ibm
826 vax)
827 basic_machine=vax-dec
829 pdp11)
830 basic_machine=pdp11-dec
832 we32k)
833 basic_machine=we32k-att
835 sparc)
836 basic_machine=sparc-sun
838 cydra)
839 basic_machine=cydra-cydrome
841 orion)
842 basic_machine=orion-highlevel
844 orion105)
845 basic_machine=clipper-highlevel
847 mac | mpw | mac-mpw) # CYGNUS LOCAL
848 basic_machine=m68k-apple
850 pmac | pmac-mpw) # CYGNUS LOCAL
851 basic_machine=powerpc-apple
854 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
855 exit 1
857 esac
859 # Here we canonicalize certain aliases for manufacturers.
860 case $basic_machine in
861 *-digital*)
862 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
864 *-commodore*)
865 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
869 esac
871 # Decode manufacturer-specific aliases for certain operating systems.
873 if [ x"$os" != x"" ]
874 then
875 case $os in
876 # First match some system type aliases
877 # that might get confused with valid system types.
878 # -solaris* is a basic system type, with this one exception.
879 -solaris1 | -solaris1.*)
880 os=`echo $os | sed -e 's|solaris1|sunos4|'`
882 -solaris)
883 os=-solaris2
885 -unixware* | svr4*)
886 os=-sysv4
888 -gnu/linux*)
889 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
891 # First accept the basic system types.
892 # The portable systems comes first.
893 # Each alternative MUST END IN A *, to match a version number.
894 # -sysv* is not here because it comes later, after sysvr4.
895 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
896 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
897 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
898 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
899 | -aos* \
900 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
901 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
902 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
903 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
904 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
905 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
906 | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
907 | -mingw32* | -linux-gnu* | -uxpv*)
908 # Remember, each alternative MUST END IN *, to match a version number.
910 # CYGNUS LOCAL
911 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
912 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
913 | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
915 -mac*)
916 os=`echo $os | sed -e 's|mac|macos|'`
918 # END CYGNUS LOCAL
919 -linux*)
920 os=`echo $os | sed -e 's|linux|linux-gnu|'`
922 -sunos5*)
923 os=`echo $os | sed -e 's|sunos5|solaris2|'`
925 -sunos6*)
926 os=`echo $os | sed -e 's|sunos6|solaris3|'`
928 -osfrose*)
929 os=-osfrose
931 -osf*)
932 os=-osf
934 -utek*)
935 os=-bsd
937 -dynix*)
938 os=-bsd
940 -acis*)
941 os=-aos
943 -386bsd) # CYGNUS LOCAL
944 os=-bsd
946 -ctix* | -uts*)
947 os=-sysv
949 -ns2 )
950 os=-nextstep2
952 # Preserve the version number of sinix5.
953 -sinix5.*)
954 os=`echo $os | sed -e 's|sinix|sysv|'`
956 -sinix*)
957 os=-sysv4
959 -triton*)
960 os=-sysv3
962 -oss*)
963 os=-sysv3
965 -svr4)
966 os=-sysv4
968 -svr3)
969 os=-sysv3
971 -sysvr4)
972 os=-sysv4
974 # This must come after -sysvr4.
975 -sysv*)
977 -ose*) # CYGNUS LOCAL
978 os=-ose
980 -es1800*) # CYGNUS LOCAL
981 os=-ose
983 -xenix)
984 os=-xenix
986 -none)
989 # Get rid of the `-' at the beginning of $os.
990 os=`echo $os | sed 's/[^-]*-//'`
991 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
992 exit 1
994 esac
995 else
997 # Here we handle the default operating systems that come with various machines.
998 # The value should be what the vendor currently ships out the door with their
999 # machine or put another way, the most popular os provided with the machine.
1001 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1002 # "-sun"), then you have to tell the case statement up towards the top
1003 # that MANUFACTURER isn't an operating system. Otherwise, code above
1004 # will signal an error saying that MANUFACTURER isn't an operating
1005 # system, and we'll never get to this point.
1007 case $basic_machine in
1008 *-acorn)
1009 os=-riscix1.2
1011 arm*-semi)
1012 os=-aout
1014 pdp11-*)
1015 os=-none
1017 *-dec | vax-*)
1018 os=-ultrix4.2
1020 m68*-apollo)
1021 os=-domain
1023 i386-sun)
1024 os=-sunos4.0.2
1026 m68000-sun)
1027 os=-sunos3
1028 # This also exists in the configure program, but was not the
1029 # default.
1030 # os=-sunos4
1032 m68*-cisco) # CYGNUS LOCAL
1033 os=-aout
1035 mips*-cisco) # CYGNUS LOCAL
1036 os=-elf
1038 mips*-*) # CYGNUS LOCAL
1039 os=-elf
1041 *-tti) # must be before sparc entry or we get the wrong os.
1042 os=-sysv3
1044 sparc-* | *-sun)
1045 os=-sunos4.1.1
1047 *-be) # CYGNUS LOCAL
1048 os=-beos
1050 *-ibm)
1051 os=-aix
1053 *-wec) # CYGNUS LOCAL
1054 os=-proelf
1056 *-winbond) # CYGNUS LOCAL
1057 os=-proelf
1059 *-oki) # CYGNUS LOCAL
1060 os=-proelf
1062 *-hp)
1063 os=-hpux
1065 *-hitachi)
1066 os=-hiux
1068 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1069 os=-sysv
1071 *-cbm)
1072 os=-amigaos
1074 *-dg)
1075 os=-dgux
1077 *-dolphin)
1078 os=-sysv3
1080 m68k-ccur)
1081 os=-rtu
1083 m88k-omron*)
1084 os=-luna
1086 *-next )
1087 os=-nextstep
1089 *-sequent)
1090 os=-ptx
1092 *-crds)
1093 os=-unos
1095 *-ns)
1096 os=-genix
1098 i370-*)
1099 os=-mvs
1101 *-next)
1102 os=-nextstep3
1104 *-gould)
1105 os=-sysv
1107 *-highlevel)
1108 os=-bsd
1110 *-encore)
1111 os=-bsd
1113 *-sgi)
1114 os=-irix
1116 *-siemens)
1117 os=-sysv4
1119 *-masscomp)
1120 os=-rtu
1122 f301-fujitsu)
1123 os=-uxpv
1125 *-rom68k) # CYGNUS LOCAL
1126 os=-coff
1128 *-*bug) # CYGNUS LOCAL
1129 os=-coff
1131 *-apple) # CYGNUS LOCAL
1132 os=-macos
1135 os=-none
1137 esac
1140 # Here we handle the case where we know the os, and the CPU type, but not the
1141 # manufacturer. We pick the logical manufacturer.
1142 vendor=unknown
1143 case $basic_machine in
1144 *-unknown)
1145 case $os in
1146 -riscix*)
1147 vendor=acorn
1149 -sunos*)
1150 vendor=sun
1152 -aix*)
1153 vendor=ibm
1155 -beos*) # CYGNUS LOCAL
1156 vendor=be
1158 -hpux*)
1159 vendor=hp
1161 -hiux*)
1162 vendor=hitachi
1164 -unos*)
1165 vendor=crds
1167 -dgux*)
1168 vendor=dg
1170 -luna*)
1171 vendor=omron
1173 -genix*)
1174 vendor=ns
1176 -mvs*)
1177 vendor=ibm
1179 -ptx*)
1180 vendor=sequent
1182 -vxsim* | -vxworks*)
1183 vendor=wrs
1185 -aux*)
1186 vendor=apple
1188 -hms*) # CYGNUS LOCAL
1189 vendor=hitachi
1191 -mpw* | -macos*) # CYGNUS LOCAL
1192 vendor=apple
1194 esac
1195 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1197 esac
1199 echo $basic_machine$os