Daily bump.
[official-gcc.git] / config.sub
blobd617719acd707ed94883f5054b6ff8e9000b5a5c
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 # Copyright (C) 1991, 92-97, 1998, 1999, 2000 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 mmix*)
519 basic_machine=mmix-knuth
520 os=-mmixware
522 monitor)
523 basic_machine=m68k-rom68k
524 os=-coff
526 msdos)
527 basic_machine=i386-unknown
528 os=-msdos
530 mvs)
531 basic_machine=i370-ibm
532 os=-mvs
534 ncr3000)
535 basic_machine=i486-ncr
536 os=-sysv4
538 netbsd386)
539 basic_machine=i386-unknown
540 os=-netbsd
542 netwinder)
543 basic_machine=armv4l-rebel
544 os=-linux
546 news | news700 | news800 | news900)
547 basic_machine=m68k-sony
548 os=-newsos
550 news1000)
551 basic_machine=m68030-sony
552 os=-newsos
554 news-3600 | risc-news)
555 basic_machine=mips-sony
556 os=-newsos
558 necv70)
559 basic_machine=v70-nec
560 os=-sysv
562 next | m*-next )
563 basic_machine=m68k-next
564 case $os in
565 -nextstep* )
567 -ns2*)
568 os=-nextstep2
571 os=-nextstep3
573 esac
575 nh3000)
576 basic_machine=m68k-harris
577 os=-cxux
579 nh[45]000)
580 basic_machine=m88k-harris
581 os=-cxux
583 nindy960)
584 basic_machine=i960-intel
585 os=-nindy
587 mon960)
588 basic_machine=i960-intel
589 os=-mon960
591 np1)
592 basic_machine=np1-gould
594 op50n-* | op60c-*)
595 basic_machine=hppa1.1-oki
596 os=-proelf
598 OSE68000 | ose68000)
599 basic_machine=m68000-ericsson
600 os=-ose
602 os68k)
603 basic_machine=m68k-none
604 os=-os68k
606 pa-hitachi)
607 basic_machine=hppa1.1-hitachi
608 os=-hiuxwe2
610 paragon)
611 basic_machine=i860-intel
612 os=-osf
614 pbd)
615 basic_machine=sparc-tti
617 pbb)
618 basic_machine=m68k-tti
620 pc532 | pc532-*)
621 basic_machine=ns32k-pc532
623 pentium | p5 | k5 | k6 | nexen)
624 basic_machine=i586-pc
626 pentiumpro | p6 | 6x86)
627 basic_machine=i686-pc
629 pentiumii | pentium2)
630 basic_machine=i786-pc
632 pentium-* | p5-* | k5-* | k6-* | nexen-*)
633 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
635 pentiumpro-* | p6-* | 6x86-*)
636 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
638 pentiumii-* | pentium2-*)
639 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
642 basic_machine=pn-gould
644 power) basic_machine=rs6000-ibm
646 ppc) basic_machine=powerpc-unknown
648 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
650 ppcle | powerpclittle | ppc-le | powerpc-little)
651 basic_machine=powerpcle-unknown
653 ppcle-* | powerpclittle-*)
654 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
656 ps2)
657 basic_machine=i386-ibm
659 rom68k)
660 basic_machine=m68k-rom68k
661 os=-coff
663 rm[46]00)
664 basic_machine=mips-siemens
666 rtpc | rtpc-*)
667 basic_machine=romp-ibm
669 sa29200)
670 basic_machine=a29k-amd
671 os=-udi
673 sequent)
674 basic_machine=i386-sequent
677 basic_machine=sh-hitachi
678 os=-hms
680 sparclite-wrs)
681 basic_machine=sparclite-wrs
682 os=-vxworks
684 sps7)
685 basic_machine=m68k-bull
686 os=-sysv2
688 spur)
689 basic_machine=spur-unknown
691 st2000)
692 basic_machine=m68k-tandem
694 stratus)
695 basic_machine=i860-stratus
696 os=-sysv4
698 sun2)
699 basic_machine=m68000-sun
701 sun2os3)
702 basic_machine=m68000-sun
703 os=-sunos3
705 sun2os4)
706 basic_machine=m68000-sun
707 os=-sunos4
709 sun3os3)
710 basic_machine=m68k-sun
711 os=-sunos3
713 sun3os4)
714 basic_machine=m68k-sun
715 os=-sunos4
717 sun4os3)
718 basic_machine=sparc-sun
719 os=-sunos3
721 sun4os4)
722 basic_machine=sparc-sun
723 os=-sunos4
725 sun4sol2)
726 basic_machine=sparc-sun
727 os=-solaris2
729 sun3 | sun3-*)
730 basic_machine=m68k-sun
732 sun4)
733 basic_machine=sparc-sun
735 sun386 | sun386i | roadrunner)
736 basic_machine=i386-sun
738 symmetry)
739 basic_machine=i386-sequent
740 os=-dynix
742 t3e)
743 basic_machine=t3e-cray
744 os=-unicos
746 tx39)
747 basic_machine=mipstx39-unknown
749 tx39el)
750 basic_machine=mipstx39el-unknown
752 tower | tower-32)
753 basic_machine=m68k-ncr
755 udi29k)
756 basic_machine=a29k-amd
757 os=-udi
759 ultra3)
760 basic_machine=a29k-nyu
761 os=-sym1
763 v810 | necv810)
764 basic_machine=v810-nec
765 os=-none
767 vaxv)
768 basic_machine=vax-dec
769 os=-sysv
771 vms)
772 basic_machine=vax-dec
773 os=-vms
775 vpp*|vx|vx-*)
776 basic_machine=f301-fujitsu
778 vxworks960)
779 basic_machine=i960-wrs
780 os=-vxworks
782 vxworks68)
783 basic_machine=m68k-wrs
784 os=-vxworks
786 vxworks29k)
787 basic_machine=a29k-wrs
788 os=-vxworks
790 w65*)
791 basic_machine=w65-wdc
792 os=-none
794 w89k-*)
795 basic_machine=hppa1.1-winbond
796 os=-proelf
798 xmp)
799 basic_machine=xmp-cray
800 os=-unicos
802 xps | xps100)
803 basic_machine=xps100-honeywell
805 z8k-*-coff)
806 basic_machine=z8k-unknown
807 os=-sim
809 none)
810 basic_machine=none-none
811 os=-none
814 # Here we handle the default manufacturer of certain CPU types. It is in
815 # some cases the only manufacturer, in others, it is the most popular.
816 w89k)
817 basic_machine=hppa1.1-winbond
819 op50n)
820 basic_machine=hppa1.1-oki
822 op60c)
823 basic_machine=hppa1.1-oki
825 mips)
826 if [ x$os = x-linux-gnu ]; then
827 basic_machine=mips-unknown
828 else
829 basic_machine=mips-mips
832 romp)
833 basic_machine=romp-ibm
835 rs6000)
836 basic_machine=rs6000-ibm
838 vax)
839 basic_machine=vax-dec
841 pdp11)
842 basic_machine=pdp11-dec
844 we32k)
845 basic_machine=we32k-att
847 sparc | sparcv9)
848 basic_machine=sparc-sun
850 cydra)
851 basic_machine=cydra-cydrome
853 orion)
854 basic_machine=orion-highlevel
856 orion105)
857 basic_machine=clipper-highlevel
859 mac | mpw | mac-mpw)
860 basic_machine=m68k-apple
862 pmac | pmac-mpw)
863 basic_machine=powerpc-apple
865 c4x*)
866 basic_machine=c4x-none
867 os=-coff
870 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
871 exit 1
873 esac
875 # Here we canonicalize certain aliases for manufacturers.
876 case $basic_machine in
877 *-digital*)
878 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
880 *-commodore*)
881 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
885 esac
887 # Decode manufacturer-specific aliases for certain operating systems.
889 if [ x"$os" != x"" ]
890 then
891 case $os in
892 # First match some system type aliases
893 # that might get confused with valid system types.
894 # -solaris* is a basic system type, with this one exception.
895 -solaris1 | -solaris1.*)
896 os=`echo $os | sed -e 's|solaris1|sunos4|'`
898 -solaris)
899 os=-solaris2
901 -svr4*)
902 os=-sysv4
904 -unixware*)
905 os=-sysv4.2uw
907 -gnu/linux*)
908 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
910 # First accept the basic system types.
911 # The portable systems comes first.
912 # Each alternative MUST END IN A *, to match a version number.
913 # -sysv* is not here because it comes later, after sysvr4.
914 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
915 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
916 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
917 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
918 | -aos* \
919 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
920 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
921 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
922 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
923 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
924 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
925 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
926 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
927 | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
928 # Remember, each alternative MUST END IN *, to match a version number.
930 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
931 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
932 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
934 -mac*)
935 os=`echo $os | sed -e 's|mac|macos|'`
937 -linux*)
938 os=`echo $os | sed -e 's|linux|linux-gnu|'`
940 -sunos5*)
941 os=`echo $os | sed -e 's|sunos5|solaris2|'`
943 -sunos6*)
944 os=`echo $os | sed -e 's|sunos6|solaris3|'`
946 -opened*)
947 os=-openedition
949 -osfrose*)
950 os=-osfrose
952 -osf*)
953 os=-osf
955 -utek*)
956 os=-bsd
958 -dynix*)
959 os=-bsd
961 -acis*)
962 os=-aos
964 -386bsd)
965 os=-bsd
967 -ctix* | -uts*)
968 os=-sysv
970 -ns2 )
971 os=-nextstep2
973 # Preserve the version number of sinix5.
974 -sinix5.*)
975 os=`echo $os | sed -e 's|sinix|sysv|'`
977 -sinix*)
978 os=-sysv4
980 -triton*)
981 os=-sysv3
983 -oss*)
984 os=-sysv3
986 -qnx)
987 os=-qnx4
989 -svr4)
990 os=-sysv4
992 -svr3)
993 os=-sysv3
995 -sysvr4)
996 os=-sysv4
998 # This must come after -sysvr4.
999 -sysv*)
1001 -ose*)
1002 os=-ose
1004 -es1800*)
1005 os=-ose
1007 -xenix)
1008 os=-xenix
1010 -*mint | -*MiNT)
1011 os=-mint
1013 -none)
1016 # Get rid of the `-' at the beginning of $os.
1017 os=`echo $os | sed 's/[^-]*-//'`
1018 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1019 exit 1
1021 esac
1022 else
1024 # Here we handle the default operating systems that come with various machines.
1025 # The value should be what the vendor currently ships out the door with their
1026 # machine or put another way, the most popular os provided with the machine.
1028 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1029 # "-sun"), then you have to tell the case statement up towards the top
1030 # that MANUFACTURER isn't an operating system. Otherwise, code above
1031 # will signal an error saying that MANUFACTURER isn't an operating
1032 # system, and we'll never get to this point.
1034 case $basic_machine in
1035 *-acorn)
1036 os=-riscix1.2
1038 arm*-rebel)
1039 os=-linux
1041 arm*-semi)
1042 os=-aout
1044 pdp11-*)
1045 os=-none
1047 *-dec | vax-*)
1048 os=-ultrix4.2
1050 m68*-apollo)
1051 os=-domain
1053 i386-sun)
1054 os=-sunos4.0.2
1056 m68000-sun)
1057 os=-sunos3
1058 # This also exists in the configure program, but was not the
1059 # default.
1060 # os=-sunos4
1062 m68*-cisco)
1063 os=-aout
1065 mips*-cisco)
1066 os=-elf
1068 mips*-*)
1069 os=-elf
1071 *-tti) # must be before sparc entry or we get the wrong os.
1072 os=-sysv3
1074 sparc-* | *-sun)
1075 os=-sunos4.1.1
1077 *-be)
1078 os=-beos
1080 *-ibm)
1081 os=-aix
1083 *-wec)
1084 os=-proelf
1086 *-winbond)
1087 os=-proelf
1089 *-oki)
1090 os=-proelf
1092 *-hp)
1093 os=-hpux
1095 *-hitachi)
1096 os=-hiux
1098 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1099 os=-sysv
1101 *-cbm)
1102 os=-amigaos
1104 *-dg)
1105 os=-dgux
1107 *-dolphin)
1108 os=-sysv3
1110 m68k-ccur)
1111 os=-rtu
1113 m88k-omron*)
1114 os=-luna
1116 *-next )
1117 os=-nextstep
1119 *-sequent)
1120 os=-ptx
1122 *-crds)
1123 os=-unos
1125 *-ns)
1126 os=-genix
1128 i370-*)
1129 os=-mvs
1131 *-next)
1132 os=-nextstep3
1134 *-gould)
1135 os=-sysv
1137 *-highlevel)
1138 os=-bsd
1140 *-encore)
1141 os=-bsd
1143 *-sgi)
1144 os=-irix
1146 *-siemens)
1147 os=-sysv4
1149 *-masscomp)
1150 os=-rtu
1152 f301-fujitsu)
1153 os=-uxpv
1155 *-rom68k)
1156 os=-coff
1158 *-*bug)
1159 os=-coff
1161 *-apple)
1162 os=-macos
1164 *-atari*)
1165 os=-mint
1168 os=-none
1170 esac
1173 # Here we handle the case where we know the os, and the CPU type, but not the
1174 # manufacturer. We pick the logical manufacturer.
1175 vendor=unknown
1176 case $basic_machine in
1177 *-unknown)
1178 case $os in
1179 -riscix*)
1180 vendor=acorn
1182 -sunos*)
1183 vendor=sun
1185 -aix*)
1186 vendor=ibm
1188 -beos*)
1189 vendor=be
1191 -hpux*)
1192 vendor=hp
1194 -mpeix*)
1195 vendor=hp
1197 -hiux*)
1198 vendor=hitachi
1200 -unos*)
1201 vendor=crds
1203 -dgux*)
1204 vendor=dg
1206 -luna*)
1207 vendor=omron
1209 -genix*)
1210 vendor=ns
1212 -mvs* | -opened*)
1213 vendor=ibm
1215 -ptx*)
1216 vendor=sequent
1218 -vxsim* | -vxworks*)
1219 vendor=wrs
1221 -aux*)
1222 vendor=apple
1224 -hms*)
1225 vendor=hitachi
1227 -mpw* | -macos*)
1228 vendor=apple
1230 -*mint | -*MiNT)
1231 vendor=atari
1233 esac
1234 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1236 esac
1238 echo $basic_machine$os