Remove extraneous comments
[official-gcc.git] / config.sub
blob79f1c68d777c1a01d2fe0e44a6b9bf3874a9eb11
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 # Copyright (C) 1991, 92-97, 1998, 1999 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)
103 basic_machine=$1
105 -scout)
107 -wrs)
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 -udk*)
135 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
137 -isc)
138 os=-isc2.2
139 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
141 -clix*)
142 basic_machine=clipper-intergraph
144 -isc*)
145 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
147 -lynx*)
148 os=-lynxos
150 -ptx*)
151 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
153 -windowsnt*)
154 os=`echo $os | sed -e 's/windowsnt/winnt/'`
156 -psos*)
157 os=-psos
159 -mint | -mint[0-9]*)
160 basic_machine=m68k-atari
161 os=-mint
163 esac
165 # Decode aliases for certain CPU-COMPANY combinations.
166 case $basic_machine in
167 # Recognize the basic CPU types without company name.
168 # Some are omitted here because they have special meanings below.
169 tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
170 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
171 | 580 | i960 | h8300 \
172 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
173 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
174 | alphaev6[78] \
175 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
176 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
177 | mips64orion | mips64orionel | mipstx39 | mipstx39el \
178 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
179 | mips64vr5000 | miprs64vr5000el | mcore \
180 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
181 | thumb | d10v | fr30)
182 basic_machine=$basic_machine-unknown
184 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
187 # We use `pc' rather than `unknown'
188 # because (1) that's what they normally are, and
189 # (2) the word "unknown" tends to confuse beginning users.
190 i[34567]86)
191 basic_machine=$basic_machine-pc
193 # Object if more than one company name word.
194 *-*-*)
195 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
196 exit 1
198 # Recognize the basic CPU types with company name.
199 # FIXME: clean up the formatting here.
200 vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
201 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
202 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
203 | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
204 | xmp-* | ymp-* \
205 | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
206 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
207 | alphaev6[78]-* \
208 | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
209 | clipper-* | orion-* \
210 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
211 | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
212 | mips64el-* | mips64orion-* | mips64orionel-* \
213 | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
214 | mipstx39-* | mipstx39el-* | mcore-* \
215 | f301-* | armv*-* | t3e-* \
216 | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
217 | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
219 # Recognize the various machine names and aliases which stand
220 # for a CPU type and a company and sometimes even an OS.
221 386bsd)
222 basic_machine=i386-unknown
223 os=-bsd
225 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
226 basic_machine=m68000-att
228 3b*)
229 basic_machine=we32k-att
231 a29khif)
232 basic_machine=a29k-amd
233 os=-udi
235 adobe68k)
236 basic_machine=m68010-adobe
237 os=-scout
239 alliant | fx80)
240 basic_machine=fx80-alliant
242 altos | altos3068)
243 basic_machine=m68k-altos
245 am29k)
246 basic_machine=a29k-none
247 os=-bsd
249 amdahl)
250 basic_machine=580-amdahl
251 os=-sysv
253 amiga | amiga-*)
254 basic_machine=m68k-cbm
256 amigaos | amigados)
257 basic_machine=m68k-cbm
258 os=-amigaos
260 amigaunix | amix)
261 basic_machine=m68k-cbm
262 os=-sysv4
264 apollo68)
265 basic_machine=m68k-apollo
266 os=-sysv
268 apollo68bsd)
269 basic_machine=m68k-apollo
270 os=-bsd
272 aux)
273 basic_machine=m68k-apple
274 os=-aux
276 balance)
277 basic_machine=ns32k-sequent
278 os=-dynix
280 convex-c1)
281 basic_machine=c1-convex
282 os=-bsd
284 convex-c2)
285 basic_machine=c2-convex
286 os=-bsd
288 convex-c32)
289 basic_machine=c32-convex
290 os=-bsd
292 convex-c34)
293 basic_machine=c34-convex
294 os=-bsd
296 convex-c38)
297 basic_machine=c38-convex
298 os=-bsd
300 cray | ymp)
301 basic_machine=ymp-cray
302 os=-unicos
304 cray2)
305 basic_machine=cray2-cray
306 os=-unicos
308 [ctj]90-cray)
309 basic_machine=c90-cray
310 os=-unicos
312 crds | unos)
313 basic_machine=m68k-crds
315 da30 | da30-*)
316 basic_machine=m68k-da30
318 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
319 basic_machine=mips-dec
321 delta | 3300 | motorola-3300 | motorola-delta \
322 | 3300-motorola | delta-motorola)
323 basic_machine=m68k-motorola
325 delta88)
326 basic_machine=m88k-motorola
327 os=-sysv3
329 dpx20 | dpx20-*)
330 basic_machine=rs6000-bull
331 os=-bosx
333 dpx2* | dpx2*-bull)
334 basic_machine=m68k-bull
335 os=-sysv3
337 ebmon29k)
338 basic_machine=a29k-amd
339 os=-ebmon
341 elxsi)
342 basic_machine=elxsi-elxsi
343 os=-bsd
345 encore | umax | mmax)
346 basic_machine=ns32k-encore
348 es1800 | OSE68k | ose68k | ose | OSE)
349 basic_machine=m68k-ericsson
350 os=-ose
352 fx2800)
353 basic_machine=i860-alliant
355 genix)
356 basic_machine=ns32k-ns
358 gmicro)
359 basic_machine=tron-gmicro
360 os=-sysv
362 h3050r* | hiux*)
363 basic_machine=hppa1.1-hitachi
364 os=-hiuxwe2
366 h8300hms)
367 basic_machine=h8300-hitachi
368 os=-hms
370 h8300xray)
371 basic_machine=h8300-hitachi
372 os=-xray
374 h8500hms)
375 basic_machine=h8500-hitachi
376 os=-hms
378 harris)
379 basic_machine=m88k-harris
380 os=-sysv3
382 hp300-*)
383 basic_machine=m68k-hp
385 hp300bsd)
386 basic_machine=m68k-hp
387 os=-bsd
389 hp300hpux)
390 basic_machine=m68k-hp
391 os=-hpux
393 hp3k9[0-9][0-9] | hp9[0-9][0-9])
394 basic_machine=hppa1.0-hp
396 hp9k2[0-9][0-9] | hp9k31[0-9])
397 basic_machine=m68000-hp
399 hp9k3[2-9][0-9])
400 basic_machine=m68k-hp
402 hp9k6[0-9][0-9] | hp6[0-9][0-9])
403 basic_machine=hppa1.0-hp
405 hp9k7[0-79][0-9] | hp7[0-79][0-9])
406 basic_machine=hppa1.1-hp
408 hp9k78[0-9] | hp78[0-9])
409 # FIXME: really hppa2.0-hp
410 basic_machine=hppa1.1-hp
412 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
413 # FIXME: really hppa2.0-hp
414 basic_machine=hppa1.1-hp
416 hp9k8[0-9][13679] | hp8[0-9][13679])
417 basic_machine=hppa1.1-hp
419 hp9k8[0-9][0-9] | hp8[0-9][0-9])
420 basic_machine=hppa1.0-hp
422 hppa-next)
423 os=-nextstep3
425 hppaosf)
426 basic_machine=hppa1.1-hp
427 os=-osf
429 hppro)
430 basic_machine=hppa1.1-hp
431 os=-proelf
433 i370-ibm* | ibm*)
434 basic_machine=i370-ibm
436 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
437 i[34567]86v32)
438 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
439 os=-sysv32
441 i[34567]86v4*)
442 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
443 os=-sysv4
445 i[34567]86v)
446 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
447 os=-sysv
449 i[34567]86sol2)
450 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
451 os=-solaris2
453 i386mach)
454 basic_machine=i386-mach
455 os=-mach
457 i386-vsta | vsta)
458 basic_machine=i386-unknown
459 os=-vsta
461 i386-go32 | go32)
462 basic_machine=i386-unknown
463 os=-go32
465 i386-mingw32 | mingw32)
466 basic_machine=i386-unknown
467 os=-mingw32
469 i386-qnx | qnx)
470 basic_machine=i386-qnx
472 iris | iris4d)
473 basic_machine=mips-sgi
474 case $os in
475 -irix*)
478 os=-irix4
480 esac
482 isi68 | isi)
483 basic_machine=m68k-isi
484 os=-sysv
486 m88k-omron*)
487 basic_machine=m88k-omron
489 magnum | m3230)
490 basic_machine=mips-mips
491 os=-sysv
493 merlin)
494 basic_machine=ns32k-utek
495 os=-sysv
497 miniframe)
498 basic_machine=m68000-convergent
500 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
501 basic_machine=m68k-atari
502 os=-mint
504 mipsel*-linux*)
505 basic_machine=mipsel-unknown
506 os=-linux-gnu
508 mips*-linux*)
509 basic_machine=mips-unknown
510 os=-linux-gnu
512 mips3*-*)
513 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
515 mips3*)
516 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
518 monitor)
519 basic_machine=m68k-rom68k
520 os=-coff
522 msdos)
523 basic_machine=i386-unknown
524 os=-msdos
526 mvs)
527 basic_machine=i370-ibm
528 os=-mvs
530 ncr3000)
531 basic_machine=i486-ncr
532 os=-sysv4
534 netbsd386)
535 basic_machine=i386-unknown
536 os=-netbsd
538 netwinder)
539 basic_machine=armv4l-rebel
540 os=-linux
542 news | news700 | news800 | news900)
543 basic_machine=m68k-sony
544 os=-newsos
546 news1000)
547 basic_machine=m68030-sony
548 os=-newsos
550 news-3600 | risc-news)
551 basic_machine=mips-sony
552 os=-newsos
554 necv70)
555 basic_machine=v70-nec
556 os=-sysv
558 next | m*-next )
559 basic_machine=m68k-next
560 case $os in
561 -nextstep* )
563 -ns2*)
564 os=-nextstep2
567 os=-nextstep3
569 esac
571 nh3000)
572 basic_machine=m68k-harris
573 os=-cxux
575 nh[45]000)
576 basic_machine=m88k-harris
577 os=-cxux
579 nindy960)
580 basic_machine=i960-intel
581 os=-nindy
583 mon960)
584 basic_machine=i960-intel
585 os=-mon960
587 np1)
588 basic_machine=np1-gould
590 op50n-* | op60c-*)
591 basic_machine=hppa1.1-oki
592 os=-proelf
594 OSE68000 | ose68000)
595 basic_machine=m68000-ericsson
596 os=-ose
598 os68k)
599 basic_machine=m68k-none
600 os=-os68k
602 pa-hitachi)
603 basic_machine=hppa1.1-hitachi
604 os=-hiuxwe2
606 paragon)
607 basic_machine=i860-intel
608 os=-osf
610 pbd)
611 basic_machine=sparc-tti
613 pbb)
614 basic_machine=m68k-tti
616 pc532 | pc532-*)
617 basic_machine=ns32k-pc532
619 pentium | p5 | k5 | k6 | nexen)
620 basic_machine=i586-pc
622 pentiumpro | p6 | 6x86)
623 basic_machine=i686-pc
625 pentiumii | pentium2)
626 basic_machine=i786-pc
628 pentium-* | p5-* | k5-* | k6-* | nexen-*)
629 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
631 pentiumpro-* | p6-* | 6x86-*)
632 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
634 pentiumii-* | pentium2-*)
635 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
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)
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)
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)
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)
688 basic_machine=m68k-tandem
690 stratus)
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 t3e)
739 basic_machine=t3e-cray
740 os=-unicos
742 tx39)
743 basic_machine=mipstx39-unknown
745 tx39el)
746 basic_machine=mipstx39el-unknown
748 tower | tower-32)
749 basic_machine=m68k-ncr
751 udi29k)
752 basic_machine=a29k-amd
753 os=-udi
755 ultra3)
756 basic_machine=a29k-nyu
757 os=-sym1
759 v810 | necv810)
760 basic_machine=v810-nec
761 os=-none
763 vaxv)
764 basic_machine=vax-dec
765 os=-sysv
767 vms)
768 basic_machine=vax-dec
769 os=-vms
771 vpp*|vx|vx-*)
772 basic_machine=f301-fujitsu
774 vxworks960)
775 basic_machine=i960-wrs
776 os=-vxworks
778 vxworks68)
779 basic_machine=m68k-wrs
780 os=-vxworks
782 vxworks29k)
783 basic_machine=a29k-wrs
784 os=-vxworks
786 w65*)
787 basic_machine=w65-wdc
788 os=-none
790 w89k-*)
791 basic_machine=hppa1.1-winbond
792 os=-proelf
794 xmp)
795 basic_machine=xmp-cray
796 os=-unicos
798 xps | xps100)
799 basic_machine=xps100-honeywell
801 z8k-*-coff)
802 basic_machine=z8k-unknown
803 os=-sim
805 none)
806 basic_machine=none-none
807 os=-none
810 # Here we handle the default manufacturer of certain CPU types. It is in
811 # some cases the only manufacturer, in others, it is the most popular.
812 w89k)
813 basic_machine=hppa1.1-winbond
815 op50n)
816 basic_machine=hppa1.1-oki
818 op60c)
819 basic_machine=hppa1.1-oki
821 mips)
822 if [ x$os = x-linux-gnu ]; then
823 basic_machine=mips-unknown
824 else
825 basic_machine=mips-mips
828 romp)
829 basic_machine=romp-ibm
831 rs6000)
832 basic_machine=rs6000-ibm
834 vax)
835 basic_machine=vax-dec
837 pdp11)
838 basic_machine=pdp11-dec
840 we32k)
841 basic_machine=we32k-att
843 sparc | sparcv9)
844 basic_machine=sparc-sun
846 cydra)
847 basic_machine=cydra-cydrome
849 orion)
850 basic_machine=orion-highlevel
852 orion105)
853 basic_machine=clipper-highlevel
855 mac | mpw | mac-mpw)
856 basic_machine=m68k-apple
858 pmac | pmac-mpw)
859 basic_machine=powerpc-apple
861 c4x*)
862 basic_machine=c4x-none
863 os=-coff
866 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
867 exit 1
869 esac
871 # Here we canonicalize certain aliases for manufacturers.
872 case $basic_machine in
873 *-digital*)
874 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
876 *-commodore*)
877 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
881 esac
883 # Decode manufacturer-specific aliases for certain operating systems.
885 if [ x"$os" != x"" ]
886 then
887 case $os in
888 # First match some system type aliases
889 # that might get confused with valid system types.
890 # -solaris* is a basic system type, with this one exception.
891 -solaris1 | -solaris1.*)
892 os=`echo $os | sed -e 's|solaris1|sunos4|'`
894 -solaris)
895 os=-solaris2
897 -svr4*)
898 os=-sysv4
900 -unixware*)
901 os=-sysv4.2uw
903 -gnu/linux*)
904 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
906 # First accept the basic system types.
907 # The portable systems comes first.
908 # Each alternative MUST END IN A *, to match a version number.
909 # -sysv* is not here because it comes later, after sysvr4.
910 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
911 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
912 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
913 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
914 | -aos* \
915 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
916 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
917 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
918 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
919 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
920 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
921 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
922 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
923 | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
924 # Remember, each alternative MUST END IN *, to match a version number.
926 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
927 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
928 | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
930 -mac*)
931 os=`echo $os | sed -e 's|mac|macos|'`
933 -linux*)
934 os=`echo $os | sed -e 's|linux|linux-gnu|'`
936 -sunos5*)
937 os=`echo $os | sed -e 's|sunos5|solaris2|'`
939 -sunos6*)
940 os=`echo $os | sed -e 's|sunos6|solaris3|'`
942 -opened*)
943 os=-openedition
945 -osfrose*)
946 os=-osfrose
948 -osf*)
949 os=-osf
951 -utek*)
952 os=-bsd
954 -dynix*)
955 os=-bsd
957 -acis*)
958 os=-aos
960 -386bsd)
961 os=-bsd
963 -ctix* | -uts*)
964 os=-sysv
966 -ns2 )
967 os=-nextstep2
969 # Preserve the version number of sinix5.
970 -sinix5.*)
971 os=`echo $os | sed -e 's|sinix|sysv|'`
973 -sinix*)
974 os=-sysv4
976 -triton*)
977 os=-sysv3
979 -oss*)
980 os=-sysv3
982 -qnx)
983 os=-qnx4
985 -svr4)
986 os=-sysv4
988 -svr3)
989 os=-sysv3
991 -sysvr4)
992 os=-sysv4
994 # This must come after -sysvr4.
995 -sysv*)
997 -ose*)
998 os=-ose
1000 -es1800*)
1001 os=-ose
1003 -xenix)
1004 os=-xenix
1006 -*mint | -*MiNT)
1007 os=-mint
1009 -none)
1012 # Get rid of the `-' at the beginning of $os.
1013 os=`echo $os | sed 's/[^-]*-//'`
1014 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1015 exit 1
1017 esac
1018 else
1020 # Here we handle the default operating systems that come with various machines.
1021 # The value should be what the vendor currently ships out the door with their
1022 # machine or put another way, the most popular os provided with the machine.
1024 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1025 # "-sun"), then you have to tell the case statement up towards the top
1026 # that MANUFACTURER isn't an operating system. Otherwise, code above
1027 # will signal an error saying that MANUFACTURER isn't an operating
1028 # system, and we'll never get to this point.
1030 case $basic_machine in
1031 *-acorn)
1032 os=-riscix1.2
1034 arm*-rebel)
1035 os=-linux
1037 arm*-semi)
1038 os=-aout
1040 pdp11-*)
1041 os=-none
1043 *-dec | vax-*)
1044 os=-ultrix4.2
1046 m68*-apollo)
1047 os=-domain
1049 i386-sun)
1050 os=-sunos4.0.2
1052 m68000-sun)
1053 os=-sunos3
1054 # This also exists in the configure program, but was not the
1055 # default.
1056 # os=-sunos4
1058 m68*-cisco)
1059 os=-aout
1061 mips*-cisco)
1062 os=-elf
1064 mips*-*)
1065 os=-elf
1067 *-tti) # must be before sparc entry or we get the wrong os.
1068 os=-sysv3
1070 sparc-* | *-sun)
1071 os=-sunos4.1.1
1073 *-be)
1074 os=-beos
1076 *-ibm)
1077 os=-aix
1079 *-wec)
1080 os=-proelf
1082 *-winbond)
1083 os=-proelf
1085 *-oki)
1086 os=-proelf
1088 *-hp)
1089 os=-hpux
1091 *-hitachi)
1092 os=-hiux
1094 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1095 os=-sysv
1097 *-cbm)
1098 os=-amigaos
1100 *-dg)
1101 os=-dgux
1103 *-dolphin)
1104 os=-sysv3
1106 m68k-ccur)
1107 os=-rtu
1109 m88k-omron*)
1110 os=-luna
1112 *-next )
1113 os=-nextstep
1115 *-sequent)
1116 os=-ptx
1118 *-crds)
1119 os=-unos
1121 *-ns)
1122 os=-genix
1124 i370-*)
1125 os=-mvs
1127 *-next)
1128 os=-nextstep3
1130 *-gould)
1131 os=-sysv
1133 *-highlevel)
1134 os=-bsd
1136 *-encore)
1137 os=-bsd
1139 *-sgi)
1140 os=-irix
1142 *-siemens)
1143 os=-sysv4
1145 *-masscomp)
1146 os=-rtu
1148 f301-fujitsu)
1149 os=-uxpv
1151 *-rom68k)
1152 os=-coff
1154 *-*bug)
1155 os=-coff
1157 *-apple)
1158 os=-macos
1160 *-atari*)
1161 os=-mint
1164 os=-none
1166 esac
1169 # Here we handle the case where we know the os, and the CPU type, but not the
1170 # manufacturer. We pick the logical manufacturer.
1171 vendor=unknown
1172 case $basic_machine in
1173 *-unknown)
1174 case $os in
1175 -riscix*)
1176 vendor=acorn
1178 -sunos*)
1179 vendor=sun
1181 -aix*)
1182 vendor=ibm
1184 -beos*)
1185 vendor=be
1187 -hpux*)
1188 vendor=hp
1190 -mpeix*)
1191 vendor=hp
1193 -hiux*)
1194 vendor=hitachi
1196 -unos*)
1197 vendor=crds
1199 -dgux*)
1200 vendor=dg
1202 -luna*)
1203 vendor=omron
1205 -genix*)
1206 vendor=ns
1208 -mvs* | -opened*)
1209 vendor=ibm
1211 -ptx*)
1212 vendor=sequent
1214 -vxsim* | -vxworks*)
1215 vendor=wrs
1217 -aux*)
1218 vendor=apple
1220 -hms*)
1221 vendor=hitachi
1223 -mpw* | -macos*)
1224 vendor=apple
1226 -*mint | -*MiNT)
1227 vendor=atari
1229 esac
1230 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1232 esac
1234 echo $basic_machine$os