fix
[official-gcc.git] / config.sub
blob75a0a134e1fc3304d01458d14a905ab0402be2e7
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 thumb)
177 basic_machine=$basic_machine-unknown
179 mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith/vr4300
180 basic_machine=$basic_machine-unknown
182 mips64vr4100 | mips64vr4100el) # CYGNUS LOCAL jsmith/vr4100
183 basic_machine=$basic_machine-unknown
185 mips64vr5000 | mips64vr5000el) # CYGNUS LOCAL ian/vr5000
186 basic_machine=$basic_machine-unknown
188 mips16) # CYGNUS LOCAL krk/mips16
189 basic_machine=$basic_machine-unknown
191 d10v) # CYGNUS LOCAL meissner/d10v
192 basic_machine=$basic_machine-unknown
194 # We use `pc' rather than `unknown'
195 # because (1) that's what they normally are, and
196 # (2) the word "unknown" tends to confuse beginning users.
197 i[3456]86)
198 basic_machine=$basic_machine-pc
200 # Object if more than one company name word.
201 *-*-*)
202 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
203 exit 1
205 # Recognize the basic CPU types with company name.
206 vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
207 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
208 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
209 | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
210 | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
211 | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
212 | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
213 | xps100-* | clipper-* | orion-* \
214 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
215 | sparc64-* | mips64-* | mipsel-* \
216 | mips64el-* | mips64orion-* | mips64orionel-* \
217 | mipstx39-* | mipstx39el-* \
218 | f301-*)
220 m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # CYGNUS LOCAL
222 thumb-*)
224 mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith/vr4300
226 mips64vr4100-* | mips64vr4100el-*) # CYGNUS LOCAL jsmith/vr4100
228 mips16-*) # CYGNUS LOCAL krk/mips16
230 # Recognize the various machine names and aliases which stand
231 # for a CPU type and a company and sometimes even an OS.
232 386bsd) # CYGNUS LOCAL
233 basic_machine=i386-unknown
234 os=-bsd
236 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
237 basic_machine=m68000-att
239 3b*)
240 basic_machine=we32k-att
242 a29khif) # CYGNUS LOCAL
243 basic_machine=a29k-amd
244 os=-udi
246 adobe68k) # CYGNUS LOCAL
247 basic_machine=m68010-adobe
248 os=-scout
250 alliant | fx80)
251 basic_machine=fx80-alliant
253 altos | altos3068)
254 basic_machine=m68k-altos
256 am29k)
257 basic_machine=a29k-none
258 os=-bsd
260 amdahl)
261 basic_machine=580-amdahl
262 os=-sysv
264 amiga | amiga-*)
265 basic_machine=m68k-cbm
267 amigaos | amigados)
268 basic_machine=m68k-cbm
269 os=-amigaos
271 amigaunix | amix)
272 basic_machine=m68k-cbm
273 os=-sysv4
275 apollo68)
276 basic_machine=m68k-apollo
277 os=-sysv
279 apollo68bsd) # CYGNUS LOCAL
280 basic_machine=m68k-apollo
281 os=-bsd
283 aux)
284 basic_machine=m68k-apple
285 os=-aux
287 balance)
288 basic_machine=ns32k-sequent
289 os=-dynix
291 convex-c1)
292 basic_machine=c1-convex
293 os=-bsd
295 convex-c2)
296 basic_machine=c2-convex
297 os=-bsd
299 convex-c32)
300 basic_machine=c32-convex
301 os=-bsd
303 convex-c34)
304 basic_machine=c34-convex
305 os=-bsd
307 convex-c38)
308 basic_machine=c38-convex
309 os=-bsd
311 cray | ymp)
312 basic_machine=ymp-cray
313 os=-unicos
315 cray2)
316 basic_machine=cray2-cray
317 os=-unicos
319 [ctj]90-cray)
320 basic_machine=c90-cray
321 os=-unicos
323 crds | unos)
324 basic_machine=m68k-crds
326 da30 | da30-*)
327 basic_machine=m68k-da30
329 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
330 basic_machine=mips-dec
332 delta | 3300 | motorola-3300 | motorola-delta \
333 | 3300-motorola | delta-motorola)
334 basic_machine=m68k-motorola
336 delta88)
337 basic_machine=m88k-motorola
338 os=-sysv3
340 dpx20 | dpx20-*)
341 basic_machine=rs6000-bull
342 os=-bosx
344 dpx2* | dpx2*-bull)
345 basic_machine=m68k-bull
346 os=-sysv3
348 ebmon29k)
349 basic_machine=a29k-amd
350 os=-ebmon
352 elxsi)
353 basic_machine=elxsi-elxsi
354 os=-bsd
356 encore | umax | mmax)
357 basic_machine=ns32k-encore
359 es1800 | OSE68k | ose68k | ose | OSE) # CYGNUS LOCAL
360 basic_machine=m68k-ericsson
361 os=-ose
363 fx2800)
364 basic_machine=i860-alliant
366 genix)
367 basic_machine=ns32k-ns
369 gmicro)
370 basic_machine=tron-gmicro
371 os=-sysv
373 h3050r* | hiux*)
374 basic_machine=hppa1.1-hitachi
375 os=-hiuxwe2
377 h8300hms)
378 basic_machine=h8300-hitachi
379 os=-hms
381 h8300xray) # CYGNUS LOCAL
382 basic_machine=h8300-hitachi
383 os=-xray
385 h8500hms) # CYGNUS LOCAL
386 basic_machine=h8500-hitachi
387 os=-hms
389 harris)
390 basic_machine=m88k-harris
391 os=-sysv3
393 hp300-*)
394 basic_machine=m68k-hp
396 hp300bsd)
397 basic_machine=m68k-hp
398 os=-bsd
400 hp300hpux)
401 basic_machine=m68k-hp
402 os=-hpux
404 w89k-*) # CYGNUS LOCAL
405 basic_machine=hppa1.1-winbond
406 os=-proelf
408 op50n-*) # CYGNUS LOCAL
409 basic_machine=hppa1.1-oki
410 os=-proelf
412 op60c-*) # CYGNUS LOCAL
413 basic_machine=hppa1.1-oki
414 os=-proelf
416 hppro) # CYGNUS LOCAL
417 basic_machine=hppa1.1-hp
418 os=-proelf
420 hp9k2[0-9][0-9] | hp9k31[0-9])
421 basic_machine=m68000-hp
423 hp9k3[2-9][0-9])
424 basic_machine=m68k-hp
426 hp9k6[0-9][0-9] | hp6[0-9][0-9] )
427 basic_machine=hppa1.0-hp
429 hp9k7[0-79][0-9] | hp7[0-79][0-9] )
430 basic_machine=hppa1.1-hp
432 hp9k78[0-9] | hp78[0-9] )
433 # FIXME: really hppa2.0-hp
434 basic_machine=hppa1.1-hp
436 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
437 hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
438 # FIXME: really hppa2.0-hp
439 basic_machine=hppa1.1-hp
441 hp9k8[0-9][13679] | hp8[0-9][13679] )
442 basic_machine=hppa1.1-hp
444 hp9k8[0-9][0-9] | hp8[0-9][0-9])
445 basic_machine=hppa1.0-hp
447 hppa-next)
448 os=-nextstep3
450 hppaosf) # CYGNUS LOCAL
451 basic_machine=hppa1.1-hp
452 os=-osf
454 i370-ibm* | ibm*)
455 basic_machine=i370-ibm
456 os=-mvs
458 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
459 i[3456]86v32)
460 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
461 os=-sysv32
463 i[3456]86v4*)
464 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
465 os=-sysv4
467 i[3456]86v)
468 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
469 os=-sysv
471 i[3456]86sol2)
472 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
473 os=-solaris2
475 i386mach) # CYGNUS LOCAL
476 basic_machine=i386-mach
477 os=-mach
479 i386-vsta | vsta) # CYGNUS LOCAL
480 basic_machine=i386-unknown
481 os=-vsta
483 i386-go32 | go32) # CYGNUS LOCAL
484 basic_machine=i386-unknown
485 os=-go32
487 i386-mingw32 | mingw32)
488 basic_machine=i386-unknown
489 os=-mingw32
491 iris | iris4d)
492 basic_machine=mips-sgi
493 case $os in
494 -irix*)
497 os=-irix4
499 esac
501 isi68 | isi)
502 basic_machine=m68k-isi
503 os=-sysv
505 m88k-omron*)
506 basic_machine=m88k-omron
508 magnum | m3230)
509 basic_machine=mips-mips
510 os=-sysv
512 merlin)
513 basic_machine=ns32k-utek
514 os=-sysv
516 miniframe)
517 basic_machine=m68000-convergent
519 mipsel*-linux*)
520 basic_machine=mipsel-unknown
521 os=-linux-gnu
523 mips*-linux*)
524 basic_machine=mips-unknown
525 os=-linux-gnu
527 mips3*-*)
528 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
530 mips3*)
531 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
533 monitor) # CYGNUS LOCAL
534 basic_machine=m68k-rom68k
535 os=-coff
537 msdos) # CYGNUS LOCAL
538 basic_machine=i386-unknown
539 os=-msdos
541 ncr3000)
542 basic_machine=i486-ncr
543 os=-sysv4
545 netbsd386)
546 basic_machine=i386-unknown # CYGNUS LOCAL
547 os=-netbsd
549 news | news700 | news800 | news900)
550 basic_machine=m68k-sony
551 os=-newsos
553 news1000)
554 basic_machine=m68030-sony
555 os=-newsos
557 news-3600 | risc-news)
558 basic_machine=mips-sony
559 os=-newsos
561 necv70) # CYGNUS LOCAL
562 basic_machine=v70-nec
563 os=-sysv
565 next | m*-next )
566 basic_machine=m68k-next
567 case $os in
568 -nextstep* )
570 -ns2*)
571 os=-nextstep2
574 os=-nextstep3
576 esac
578 nh3000)
579 basic_machine=m68k-harris
580 os=-cxux
582 nh[45]000)
583 basic_machine=m88k-harris
584 os=-cxux
586 nindy960)
587 basic_machine=i960-intel
588 os=-nindy
590 mon960) # CYGNUS LOCAL
591 basic_machine=i960-intel
592 os=-mon960
594 np1)
595 basic_machine=np1-gould
597 OSE68000 | ose68000) # CYGNUS LOCAL
598 basic_machine=m68000-ericsson
599 os=-ose
601 os68k) # CYGNUS LOCAL
602 basic_machine=m68k-none
603 os=-os68k
605 pa-hitachi)
606 basic_machine=hppa1.1-hitachi
607 os=-hiuxwe2
609 paragon)
610 basic_machine=i860-intel
611 os=-osf
613 pbd)
614 basic_machine=sparc-tti
616 pbb)
617 basic_machine=m68k-tti
619 pc532 | pc532-*)
620 basic_machine=ns32k-pc532
622 pentium | p5)
623 basic_machine=i586-intel
625 pentiumpro | p6)
626 basic_machine=i686-intel
628 pentium-* | p5-*)
629 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
631 pentiumpro-* | p6-*)
632 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
635 # We don't have specific support for AMD's K5 yet, so just call it a Pentium
636 basic_machine=i586-amd
638 nexen)
639 # We don't have specific support for Nexgen yet, so just call it a Pentium
640 basic_machine=i586-nexgen
643 basic_machine=pn-gould
645 power) basic_machine=rs6000-ibm
647 ppc) basic_machine=powerpc-unknown
649 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
651 ppcle | powerpclittle | ppc-le | powerpc-little)
652 basic_machine=powerpcle-unknown
654 ppcle-* | powerpclittle-*)
655 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
657 ps2)
658 basic_machine=i386-ibm
660 rom68k) # CYGNUS LOCAL
661 basic_machine=m68k-rom68k
662 os=-coff
664 rm[46]00)
665 basic_machine=mips-siemens
667 rtpc | rtpc-*)
668 basic_machine=romp-ibm
670 sa29200) # CYGNUS LOCAL
671 basic_machine=a29k-amd
672 os=-udi
674 sequent)
675 basic_machine=i386-sequent
678 basic_machine=sh-hitachi
679 os=-hms
681 sparclite-wrs) # CYGNUS LOCAL
682 basic_machine=sparclite-wrs
683 os=-vxworks
685 sps7)
686 basic_machine=m68k-bull
687 os=-sysv2
689 spur)
690 basic_machine=spur-unknown
692 st2000) # CYGNUS LOCAL
693 basic_machine=m68k-tandem
695 stratus) # CYGNUS LOCAL
696 basic_machine=i860-stratus
697 os=-sysv4
699 sun2)
700 basic_machine=m68000-sun
702 sun2os3)
703 basic_machine=m68000-sun
704 os=-sunos3
706 sun2os4)
707 basic_machine=m68000-sun
708 os=-sunos4
710 sun3os3)
711 basic_machine=m68k-sun
712 os=-sunos3
714 sun3os4)
715 basic_machine=m68k-sun
716 os=-sunos4
718 sun4os3)
719 basic_machine=sparc-sun
720 os=-sunos3
722 sun4os4)
723 basic_machine=sparc-sun
724 os=-sunos4
726 sun4sol2)
727 basic_machine=sparc-sun
728 os=-solaris2
730 sun3 | sun3-*)
731 basic_machine=m68k-sun
733 sun4)
734 basic_machine=sparc-sun
736 sun386 | sun386i | roadrunner)
737 basic_machine=i386-sun
739 symmetry)
740 basic_machine=i386-sequent
741 os=-dynix
743 tx39)
744 basic_machine=mipstx39-unknown
746 tx39el)
747 basic_machine=mipstx39el-unknown
749 tower | tower-32)
750 basic_machine=m68k-ncr
752 udi29k)
753 basic_machine=a29k-amd
754 os=-udi
756 ultra3)
757 basic_machine=a29k-nyu
758 os=-sym1
760 v810 | necv810) # CYGNUS LOCAL
761 basic_machine=v810-nec
762 os=-none
764 vaxv)
765 basic_machine=vax-dec
766 os=-sysv
768 vms)
769 basic_machine=vax-dec
770 os=-vms
772 vpp*|vx|vx-*)
773 basic_machine=f301-fujitsu
775 vxworks960)
776 basic_machine=i960-wrs
777 os=-vxworks
779 vxworks68)
780 basic_machine=m68k-wrs
781 os=-vxworks
783 vxworks29k)
784 basic_machine=a29k-wrs
785 os=-vxworks
787 w65*) # CYGNUS LOCAL
788 basic_machine=w65-wdc
789 os=-none
791 xmp)
792 basic_machine=xmp-cray
793 os=-unicos
795 xps | xps100)
796 basic_machine=xps100-honeywell
798 z8k-*-coff) # CYGNUS LOCAL
799 basic_machine=z8k-unknown
800 os=-sim
802 none)
803 basic_machine=none-none
804 os=-none
807 # Here we handle the default manufacturer of certain CPU types. It is in
808 # some cases the only manufacturer, in others, it is the most popular.
809 w89k) # CYGNUS LOCAL
810 basic_machine=hppa1.1-winbond
812 op50n) # CYGNUS LOCAL
813 basic_machine=hppa1.1-oki
815 op60c) # CYGNUS LOCAL
816 basic_machine=hppa1.1-oki
818 mips)
819 if [ x$os = x-linux-gnu ]; then
820 basic_machine=mips-unknown
821 else
822 basic_machine=mips-mips
825 romp)
826 basic_machine=romp-ibm
828 rs6000)
829 basic_machine=rs6000-ibm
831 vax)
832 basic_machine=vax-dec
834 pdp11)
835 basic_machine=pdp11-dec
837 we32k)
838 basic_machine=we32k-att
840 sparc)
841 basic_machine=sparc-sun
843 cydra)
844 basic_machine=cydra-cydrome
846 orion)
847 basic_machine=orion-highlevel
849 orion105)
850 basic_machine=clipper-highlevel
852 mac | mpw | mac-mpw) # CYGNUS LOCAL
853 basic_machine=m68k-apple
855 pmac | pmac-mpw) # CYGNUS LOCAL
856 basic_machine=powerpc-apple
859 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
860 exit 1
862 esac
864 # Here we canonicalize certain aliases for manufacturers.
865 case $basic_machine in
866 *-digital*)
867 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
869 *-commodore*)
870 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
874 esac
876 # Decode manufacturer-specific aliases for certain operating systems.
878 if [ x"$os" != x"" ]
879 then
880 case $os in
881 # First match some system type aliases
882 # that might get confused with valid system types.
883 # -solaris* is a basic system type, with this one exception.
884 -solaris1 | -solaris1.*)
885 os=`echo $os | sed -e 's|solaris1|sunos4|'`
887 -solaris)
888 os=-solaris2
890 -unixware* | svr4*)
891 os=-sysv4
893 -gnu/linux*)
894 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
896 # First accept the basic system types.
897 # The portable systems comes first.
898 # Each alternative MUST END IN A *, to match a version number.
899 # -sysv* is not here because it comes later, after sysvr4.
900 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
901 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
902 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
903 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
904 | -aos* \
905 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
906 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
907 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
908 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
909 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
910 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
911 | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
912 | -mingw32* | -linux-gnu* | -uxpv*)
913 # Remember, each alternative MUST END IN *, to match a version number.
915 # CYGNUS LOCAL
916 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
917 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
918 | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
920 -mac*)
921 os=`echo $os | sed -e 's|mac|macos|'`
923 # END CYGNUS LOCAL
924 -linux*)
925 os=`echo $os | sed -e 's|linux|linux-gnu|'`
927 -sunos5*)
928 os=`echo $os | sed -e 's|sunos5|solaris2|'`
930 -sunos6*)
931 os=`echo $os | sed -e 's|sunos6|solaris3|'`
933 -osfrose*)
934 os=-osfrose
936 -osf*)
937 os=-osf
939 -utek*)
940 os=-bsd
942 -dynix*)
943 os=-bsd
945 -acis*)
946 os=-aos
948 -386bsd) # CYGNUS LOCAL
949 os=-bsd
951 -ctix* | -uts*)
952 os=-sysv
954 -ns2 )
955 os=-nextstep2
957 # Preserve the version number of sinix5.
958 -sinix5.*)
959 os=`echo $os | sed -e 's|sinix|sysv|'`
961 -sinix*)
962 os=-sysv4
964 -triton*)
965 os=-sysv3
967 -oss*)
968 os=-sysv3
970 -svr4)
971 os=-sysv4
973 -svr3)
974 os=-sysv3
976 -sysvr4)
977 os=-sysv4
979 # This must come after -sysvr4.
980 -sysv*)
982 -ose*) # CYGNUS LOCAL
983 os=-ose
985 -es1800*) # CYGNUS LOCAL
986 os=-ose
988 -xenix)
989 os=-xenix
991 -none)
994 # Get rid of the `-' at the beginning of $os.
995 os=`echo $os | sed 's/[^-]*-//'`
996 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
997 exit 1
999 esac
1000 else
1002 # Here we handle the default operating systems that come with various machines.
1003 # The value should be what the vendor currently ships out the door with their
1004 # machine or put another way, the most popular os provided with the machine.
1006 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1007 # "-sun"), then you have to tell the case statement up towards the top
1008 # that MANUFACTURER isn't an operating system. Otherwise, code above
1009 # will signal an error saying that MANUFACTURER isn't an operating
1010 # system, and we'll never get to this point.
1012 case $basic_machine in
1013 *-acorn)
1014 os=-riscix1.2
1016 arm*-semi)
1017 os=-aout
1019 pdp11-*)
1020 os=-none
1022 *-dec | vax-*)
1023 os=-ultrix4.2
1025 m68*-apollo)
1026 os=-domain
1028 i386-sun)
1029 os=-sunos4.0.2
1031 m68000-sun)
1032 os=-sunos3
1033 # This also exists in the configure program, but was not the
1034 # default.
1035 # os=-sunos4
1037 m68*-cisco) # CYGNUS LOCAL
1038 os=-aout
1040 mips*-cisco) # CYGNUS LOCAL
1041 os=-elf
1043 mips*-*) # CYGNUS LOCAL
1044 os=-elf
1046 *-tti) # must be before sparc entry or we get the wrong os.
1047 os=-sysv3
1049 sparc-* | *-sun)
1050 os=-sunos4.1.1
1052 *-be) # CYGNUS LOCAL
1053 os=-beos
1055 *-ibm)
1056 os=-aix
1058 *-wec) # CYGNUS LOCAL
1059 os=-proelf
1061 *-winbond) # CYGNUS LOCAL
1062 os=-proelf
1064 *-oki) # CYGNUS LOCAL
1065 os=-proelf
1067 *-hp)
1068 os=-hpux
1070 *-hitachi)
1071 os=-hiux
1073 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1074 os=-sysv
1076 *-cbm)
1077 os=-amigaos
1079 *-dg)
1080 os=-dgux
1082 *-dolphin)
1083 os=-sysv3
1085 m68k-ccur)
1086 os=-rtu
1088 m88k-omron*)
1089 os=-luna
1091 *-next )
1092 os=-nextstep
1094 *-sequent)
1095 os=-ptx
1097 *-crds)
1098 os=-unos
1100 *-ns)
1101 os=-genix
1103 i370-*)
1104 os=-mvs
1106 *-next)
1107 os=-nextstep3
1109 *-gould)
1110 os=-sysv
1112 *-highlevel)
1113 os=-bsd
1115 *-encore)
1116 os=-bsd
1118 *-sgi)
1119 os=-irix
1121 *-siemens)
1122 os=-sysv4
1124 *-masscomp)
1125 os=-rtu
1127 f301-fujitsu)
1128 os=-uxpv
1130 *-rom68k) # CYGNUS LOCAL
1131 os=-coff
1133 *-*bug) # CYGNUS LOCAL
1134 os=-coff
1136 *-apple) # CYGNUS LOCAL
1137 os=-macos
1140 os=-none
1142 esac
1145 # Here we handle the case where we know the os, and the CPU type, but not the
1146 # manufacturer. We pick the logical manufacturer.
1147 vendor=unknown
1148 case $basic_machine in
1149 *-unknown)
1150 case $os in
1151 -riscix*)
1152 vendor=acorn
1154 -sunos*)
1155 vendor=sun
1157 -aix*)
1158 vendor=ibm
1160 -beos*) # CYGNUS LOCAL
1161 vendor=be
1163 -hpux*)
1164 vendor=hp
1166 -hiux*)
1167 vendor=hitachi
1169 -unos*)
1170 vendor=crds
1172 -dgux*)
1173 vendor=dg
1175 -luna*)
1176 vendor=omron
1178 -genix*)
1179 vendor=ns
1181 -mvs*)
1182 vendor=ibm
1184 -ptx*)
1185 vendor=sequent
1187 -vxsim* | -vxworks*)
1188 vendor=wrs
1190 -aux*)
1191 vendor=apple
1193 -hms*) # CYGNUS LOCAL
1194 vendor=hitachi
1196 -mpw* | -macos*) # CYGNUS LOCAL
1197 vendor=apple
1199 esac
1200 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1202 esac
1204 echo $basic_machine$os