dbd36391e9bbb660f8c8360f90bb6f8f64a3e549
[deliverable/binutils-gdb.git] / config.sub
1 #!/bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 # Copyright (C) 1991, 1992, 1993 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.
7
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.
12
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.
17
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., 675 Mass Ave, Cambridge, MA 02139, USA.
21
22
23 # Configuration subroutine to validate and canonicalize a configuration type.
24 # Supply the specified configuration type as an argument.
25 # If it is invalid, we print an error message on stderr and exit with code 1.
26 # Otherwise, we print the canonical config type on stdout and succeed.
27
28 # This file is supposed to be the same for all GNU packages
29 # and recognize all the CPU types, system types and aliases
30 # that are meaningful with *any* GNU software.
31 # Each package is responsible for reporting which valid configurations
32 # it does not support. The user should be able to distinguish
33 # a failure to support a valid configuration from a meaningless
34 # configuration.
35
36 # The goal of this file is to map all the various variations of a given
37 # machine specification into a single specification in the form:
38 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
39 # It is wrong to echo any other type of specification.
40
41 if [ x$1 = x ]
42 then
43 echo Configuration name missing. 1>&2
44 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
45 echo "or $0 ALIAS" 1>&2
46 echo where ALIAS is a recognized configuration type. 1>&2
47 exit 1
48 fi
49
50 # First pass through any local machine types.
51 case $1 in
52 *local*)
53 echo $1
54 exit 0
55 ;;
56 *)
57 ;;
58 esac
59
60 # Separate what the user gave into CPU-COMPANY and OS (if any).
61 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
62 if [ $basic_machine != $1 ]
63 then os=`echo $1 | sed 's/.*-/-/'`
64 else os=; fi
65
66 ### Let's recognize common machines as not being operating systems so
67 ### that things like config.sub decstation-3100 work. We also
68 ### recognize some manufacturers as not being operating systems, so we
69 ### can provide default operating systems below.
70 case $os in
71 -sun*os*)
72 # Prevent following clause from handling this invalid input.
73 ;;
74 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
75 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
76 -unicom* | -ibm* | -next* | -hp | -isi* | -apollo | -altos* | \
77 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
78 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
79 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
80 -sim | -cisco) # CYGNUS LOCAL
81 os=
82 basic_machine=$1
83 ;;
84 -scout) # CYGNUS LOCAL
85 ;;
86 -wrs) # CYGNUS LOCAL
87 os=vxworks
88 basic_machine=$1
89 ;;
90 -unixware) # CYGNUS LOCAL
91 os=-sysv4
92 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
93 ;;
94 -hiux*)
95 os=-hiuxwe2
96 ;;
97 -sco4)
98 os=-sco3.2v4
99 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
100 ;;
101 -sco3.2.[4-9]*)
102 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
103 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
104 ;;
105 -sco3.2v[4-9]*)
106 # Don't forget version if it is 3.2v4 or newer.
107 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
108 ;;
109 -sco*)
110 os=-sco3.2v2
111 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
112 ;;
113 -isc)
114 os=-isc2.2
115 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
116 ;;
117 -clix*)
118 basic_machine=clipper-intergraph
119 ;;
120 -isc*)
121 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
122 ;;
123 -lynx*)
124 os=-lynxos
125 ;;
126 -os9k)
127 os=-os9k
128 ;;
129 -os9)
130 os=-os9
131 ;;
132 esac
133
134 # Decode aliases for certain CPU-COMPANY combinations.
135 case $basic_machine in
136 # Recognize the basic CPU types without company name.
137 # Some are omitted here because they have special meanings below.
138 tahoe | i[34]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
139 | tron | a29k | 580 | i960 | hppa1.0 | hppa1.1 \
140 | alpha | we32k | ns16k | clipper | sparclite | i370 \
141 | powerpc \
142 | h8300 | h8300h | sh \
143 | m88110 | sparc | m680[01234]0 | m683?2 | z8k | v70 \
144 | h8500 | mips64 | mipsel | mips64el) # CYGNUS LOCAL
145 basic_machine=$basic_machine-unknown
146 ;;
147 # Object if more than one company name word.
148 *-*-*)
149 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
150 exit 1
151 ;;
152 # Recognize the basic CPU types with company name.
153 vax-* | tahoe-* | i[34]86-* | i860-* | m68k-* | m68000-* | m88k-* \
154 | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
155 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
156 | none-* | 580-* | cray2-* | i960-* | xmp-* | ymp-* \
157 | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
158 | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
159 | powerpc \
160 | h8300-* | h8300h-* | sh-* \
161 | m88110-* | m680[01234]0-* | m683?2-* | z8k-* | h8500-* \
162 | mips64-* | mipsel-* | mips64el-*) # CYGNUS LOCAL
163 ;;
164 # Recognize the various machine names and aliases which stand
165 # for a CPU type and a company and sometimes even an OS.
166 sparc64) # CYGNUS LOCAL
167 basic_machine=sparc64-sun
168 os=-elf
169 ;;
170 sparc64-*) # CYGNUS LOCAL
171 ;;
172
173 mips3-*) # CYGNUS LOCAL
174 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
175 ;;
176 mips3) # CYGNUS LOCAL
177 basic_machine=mips64-unknown
178 ;;
179 dpx20 | dpx20-*) # CYGNUS LOCAL
180 basic_machine=rs6000-bull
181 os=-bosx
182 ;;
183 unixware) # CYGNUS LOCAL
184 os=-sysv4
185 basic_machine=i386-unknown
186 ;;
187 vaxv)
188 basic_machine=vax-dec
189 os=-sysv
190 ;;
191 vms)
192 basic_machine=vax-dec
193 os=-vms
194 ;;
195 i370-ibm* | ibm*)
196 basic_machine=i370-ibm
197 os=-mvs
198 ;;
199 i386mach) # CYGNUS LOCAL
200 basic_machine=i386-mach
201 os=-mach
202 ;;
203 i[34]86v32)
204 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
205 os=-sysv32
206 ;;
207 i[34]86v4*)
208 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
209 os=-sysv4
210 ;;
211 i[34]86v)
212 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
213 os=-sysv
214 ;;
215 i[34]86sol2)
216 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
217 os=-solaris2
218 ;;
219 vsta | i386-vsta) # CYGNUS LOCAL
220 basic_machine=i386-unknown
221 os=-vsta
222 ;;
223 go32 | i386-go32) # CYGNUS LOCAL
224 basic_machine=i386-unknown
225 os=-go32
226 ;;
227 i386-linux* | linux) # CYGNUS LOCAL
228 basic_machine=i386-unknown
229 os=-linux
230 ;;
231 i386-linux*coff | linuxcoff) # CYGNUS LOCAL
232 basic_machine=i386-unknown
233 os=-linuxcoff
234 ;;
235 i386-linux*elf | linuxelf) # CYGNUS LOCAL
236 basic_machine=i386-unknown
237 os=-linuxelf
238 ;;
239 386bsd) # CYGNUS LOCAL
240 basic_machine=i386-unknown
241 os=-bsd
242 ;;
243 netbsd386)
244 basic_machine=i386-unknown # CYGNUS LOCAL
245 os=-netbsd
246 ;;
247 spur)
248 basic_machine=spur-unknown
249 ;;
250 paragon)
251 basic_machine=i860-intel
252 os=-osf
253 ;;
254 alliant | fx80)
255 basic_machine=fx80-alliant
256 ;;
257 convex-c1)
258 basic_machine=c1-convex
259 os=-bsd
260 ;;
261 convex-c2)
262 basic_machine=c2-convex
263 os=-bsd
264 ;;
265 convex-c32)
266 basic_machine=c32-convex
267 os=-bsd
268 ;;
269 convex-c34)
270 basic_machine=c34-convex
271 os=-bsd
272 ;;
273 convex-c38)
274 basic_machine=c38-convex
275 os=-bsd
276 ;;
277 m88k-omron*)
278 basic_machine=m88k-omron
279 ;;
280 merlin)
281 basic_machine=ns32k-utek
282 os=-sysv
283 ;;
284 crds | unos)
285 basic_machine=m68k-crds
286 ;;
287 elxsi)
288 basic_machine=elxsi-elxsi
289 os=-bsd
290 ;;
291 encore | umax | mmax)
292 basic_machine=ns32k-encore
293 ;;
294 genix)
295 basic_machine=ns32k-ns
296 ;;
297 iris | iris4d | \
298 iris3 | iris4) # CYGNUS LOCAL
299 basic_machine=mips-sgi
300 case $os in
301 -irix*)
302 ;;
303 *)
304 os=-irix4
305 ;;
306 esac
307 ;;
308 news | news700 | news800 | news900)
309 basic_machine=m68k-sony
310 os=-newsos
311 ;;
312 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
313 basic_machine=m68000-att
314 ;;
315 3b*)
316 basic_machine=we32k-att
317 ;;
318 delta | 3300 | motorola-3300 | motorola-delta \
319 | 3300-motorola | delta-motorola)
320 basic_machine=m68k-motorola
321 ;;
322 balance)
323 basic_machine=ns32k-sequent
324 os=-dynix
325 ;;
326 pc532)
327 basic_machine=ns32k-pc532
328 ;;
329 symmetry)
330 basic_machine=i386-sequent
331 os=-dynix
332 ;;
333 sun2)
334 basic_machine=m68000-sun
335 ;;
336 sun2os3)
337 basic_machine=m68000-sun
338 os=-sunos3
339 ;;
340 sun2os4)
341 basic_machine=m68000-sun
342 os=-sunos4
343 ;;
344 sun3os3)
345 basic_machine=m68k-sun
346 os=-sunos3
347 ;;
348 sun3os4)
349 basic_machine=m68k-sun
350 os=-sunos4
351 ;;
352 sun4os3)
353 basic_machine=sparc-sun
354 os=-sunos3
355 ;;
356 sun4os4)
357 basic_machine=sparc-sun
358 os=-sunos4
359 ;;
360 sun4sol2) # CYGNUS LOCAL
361 basic_machine=sparc-sun
362 os=-solaris2
363 ;;
364 z8ksim) # CYGNUS LOCAL
365 basic_machine=z8k-zilog
366 os=-sim
367 ;;
368 sun3)
369 basic_machine=m68k-sun
370 ;;
371 sun4)
372 basic_machine=sparc-sun
373 ;;
374 msdos) # CYGNUS LOCAL
375 basic_machine=i386-unknown
376 os=-msdos
377 ;;
378 pbd)
379 basic_machine=sparc-tti
380 ;;
381 pbb)
382 basic_machine=m68k-tti
383 ;;
384 sun386 | sun386i | roadrunner)
385 basic_machine=i386-sun
386 ;;
387 ps2)
388 basic_machine=i386-ibm
389 ;;
390 fx2800)
391 basic_machine=i860-alliant
392 ;;
393 next)
394 basic_machine=m68k-next
395 os=-bsd
396 ;;
397 amiga)
398 basic_machine=m68k-cbm
399 ;;
400 amigados)
401 basic_machine=m68k-cbm
402 os=-amigados
403 ;;
404 amigaunix | amix)
405 basic_machine=m68k-cbm
406 os=-sysv4
407 ;;
408 hp9k3[2-9][0-9])
409 basic_machine=m68k-hp
410 ;;
411 hp9k31[0-9] | hp9k2[0-9][0-9])
412 basic_machine=m68000-hp
413 ;;
414 hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
415 basic_machine=hppa1.1-hp
416 ;;
417 hp9k8[0-9][0-9] | hp8[0-9][0-9])
418 basic_machine=hppa1.0-hp
419 ;;
420 h3050r* | hppahitachi)
421 basic_machine=hppa1.1-hitachi
422 ;;
423 isi68 | isi)
424 basic_machine=m68k-isi
425 os=-sysv
426 ;;
427 apollo68)
428 basic_machine=m68k-apollo
429 os=-sysv
430 ;;
431 apollo68bsd) # CYGNUS LOCAL
432 basic_machine=m68k-apollo
433 os=-bsd
434 ;;
435 altos | altos3068)
436 basic_machine=m68k-altos
437 ;;
438 miniframe)
439 basic_machine=m68010-convergent
440 ;;
441 tower | tower-32)
442 basic_machine=m68k-ncr
443 ;;
444 news-3600 | risc-news)
445 basic_machine=mips-sony
446 os=-newsos
447 ;;
448 st2000) # CYGNUS LOCAL
449 basic_machine=m68k-tandem
450 ;;
451 m6*bug) # CYGNUS LOCAL
452 basic_machine=m68k-bug
453 os=-coff
454 ;;
455 rom68k) # CYGNUS LOCAL
456 basic_machine=m68k-rom68k
457 os=-coff
458 ;;
459 monitor) # CYGNUS LOCAL
460 basic_machine=m68k-rom68k
461 os=-coff
462 ;;
463 decstation | decstation-3100 | pmax | pmin | dec3100 | decstatn)
464 basic_machine=mips-dec
465 ;;
466 magnum | m3230)
467 basic_machine=mips-mips
468 os=-sysv
469 ;;
470 gmicro)
471 basic_machine=tron-gmicro
472 os=-sysv
473 ;;
474 rtpc | rtpc-*)
475 basic_machine=romp-ibm
476 ;;
477 am29k)
478 basic_machine=a29k-none
479 os=-bsd
480 ;;
481 amdahl)
482 basic_machine=580-amdahl
483 os=-sysv
484 ;;
485 stratus) # CYGNUS LOCAL
486 basic_machine=i860-stratus
487 os=-sysv4
488 ;;
489 cray | ymp)
490 basic_machine=ymp-cray
491 os=-unicos
492 ;;
493 cray2)
494 basic_machine=cray2-cray
495 os=-unicos
496 ;;
497 xmp)
498 basic_machine=xmp-cray
499 os=-unicos
500 ;;
501 delta88)
502 basic_machine=m88k-motorola
503 os=-sysv3
504 ;;
505 dpx2* | dpx2*-bull)
506 basic_machine=m68k-bull
507 os=-sysv3
508 ;;
509 ebmon29k)
510 basic_machine=a29k-amd
511 os=-ebmon
512 ;;
513 h8300hms) # CYGNUS LOCAL
514 basic_machine=h8300-hitachi
515 os=-hms
516 ;;
517 sh*) # CYGNUS LOCAL
518 basic_machine=sh-hitachi
519 os=-hms
520 ;;
521
522 h8500hms) # CYGNUS LOCAL
523 basic_machine=h8500-hitachi
524 os=-hms
525 ;;
526 h8300xray) # CYGNUS LOCAL
527 basic_machine=h8300-hitachi
528 os=-xray
529 ;;
530 h8300hds)
531 basic_machine=h8300-hitachi
532 os=-hds
533 ;;
534 udi29k) # CYGNUS LOCAL
535 basic_machine=a29k-amd
536 os=-udi
537 ;;
538 a29khif) # CYGNUS LOCAL
539 basic_machine=a29k-amd
540 os=-udi
541 ;;
542 sa29200) # CYGNUS LOCAL
543 basic_machine=a29k-amd
544 os=-udi
545 ;;
546 harris)
547 basic_machine=m88k-harris
548 os=-sysv3
549 ;;
550 hp300bsd)
551 basic_machine=m68k-hp
552 os=-bsd
553 ;;
554 hp300hpux)
555 basic_machine=m68k-hp
556 os=-hpux
557 ;;
558 hppaosf)
559 basic_machine=hppa1.1-hp
560 os=-osf
561 ;;
562 ncr3000)
563 basic_machine=i486-ncr
564 os=-sysv4
565 ;;
566 necv70) # CYGNUS LOCAL
567 basic_machine=v70-nec
568 os=-sysv
569 ;;
570 news1000)
571 basic_machine=m68030-sony
572 os=-newsos
573 ;;
574 nindy960)
575 basic_machine=i960-intel
576 os=-nindy
577 ;;
578 pn)
579 basic_machine=pn-gould
580 ;;
581 np1)
582 basic_machine=np1-gould
583 ;;
584 ultra3)
585 basic_machine=a29k-nyu
586 os=-sym1
587 ;;
588 vxworks960)
589 basic_machine=i960-wrs
590 os=-vxworks
591 ;;
592 vxworks68)
593 basic_machine=m68k-wrs
594 os=-vxworks
595 ;;
596 es1800 | OSE68k | ose68k | ose | OSE) # CYGNUS LOCAL
597 basic_machine=m68k-ericsson
598 os=-ose
599 ;;
600 OSE68000 | ose68000) # CYGNUS LOCAL
601 basic_machine=m68000-ericsson
602 os=-ose
603 ;;
604 os68k) # CYGNUS LOCAL
605 basic_machine=m68k-none
606 os=-os68k
607 ;;
608 sparclite-wrs) # CYGNUS LOCAL
609 basic_machine=sparclite-wrs
610 os=-vxworks
611 ;;
612 sparcfrw) # CYGNUS LOCAL
613 basic_machine=sparcfrw-sun
614 os=-sunos4
615 ;;
616 sparcfrwcompat) # CYGNUS LOCAL
617 basic_machine=sparcfrwcompat-sun
618 os=-sunos4
619 ;;
620 sparclitefrw) # CYGNUS LOCAL
621 basic_machine=sparclitefrw-fujitsu
622 ;;
623 sparclitefrwcompat) # CYGNUS LOCAL
624 basic_machine=sparclitefrwcompat-fujitsu
625 ;;
626 adobe68k) # CYGNUS LOCAL
627 basic_machine=m68010-adobe
628 os=-scout
629 ;;
630
631 xps | xps100)
632 basic_machine=xps100-honeywell
633 ;;
634 none)
635 basic_machine=none-none
636 os=-none
637 ;;
638
639 # Here we handle the default manufacturer of certain CPU types. It is in
640 # some cases the only manufacturer, in others, it is the most popular.
641 mips)
642 basic_machine=mips-mips
643 ;;
644 romp)
645 basic_machine=romp-ibm
646 ;;
647 rs6000)
648 basic_machine=rs6000-ibm
649 ;;
650 vax)
651 basic_machine=vax-dec
652 ;;
653 we32k)
654 basic_machine=we32k-att
655 ;;
656 sparc)
657 basic_machine=sparc-sun
658 ;;
659 cydra)
660 basic_machine=cydra-cydrome
661 ;;
662 orion)
663 basic_machine=orion-highlevel
664 ;;
665 orion105)
666 basic_machine=clipper-highlevel
667 ;;
668 ## start-sanitize-mpw
669 mac) # CYGNUS LOCAL
670 basic_machine=m68k-apple
671 ;;
672 mpw) # CYGNUS LOCAL
673 basic_machine=m68k-apple
674 ;;
675 ## end-sanitize-mpw
676 *)
677 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
678 exit 1
679 ;;
680 esac
681
682 # Here we canonicalize certain aliases for manufacturers.
683 case $basic_machine in
684 *-digital*)
685 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
686 ;;
687 *-commodore*)
688 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
689 ;;
690 *)
691 ;;
692 esac
693
694 # Decode manufacturer-specific aliases for certain operating systems.
695
696 if [ x"$os" != x"" ]
697 then
698 case $os in
699 # -solaris* is a basic system type, with this one exception.
700 -solaris1 | -solaris1.*)
701 os=`echo $os | sed -e 's|solaris1|sunos4|'`
702 ;;
703 -solaris)
704 os=-solaris2
705 ;;
706 # First accept the basic system types.
707 # The portable systems comes first.
708 # Each alternative must end in a *, to match a version number.
709 # -sysv* is not here because it comes later, after sysvr4.
710 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
711 | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* | -hpux* \
712 | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
713 | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
714 | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
715 | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
716 | -hiux* | -386bsd* | -netbsd* | -riscix* | -lynxos* \
717 | -go32 | -vsta | -sim | -es1800* | -udi | -hms* | -xray | -hds* \
718 | -os68k* | -none* | -v88r* | -aout* | -coff | -elf* | -bosx* \
719 | -abug | -ecoff* | -netware* | -os9* )
720 # The last three lines above are CYGNUS LOCAL
721 ;;
722 -sunos5*)
723 os=`echo $os | sed -e 's|sunos5|solaris2|'`
724 ;;
725 -sunos6*)
726 os=`echo $os | sed -e 's|sunos6|solaris3|'`
727 ;;
728 -osfrose*)
729 os=-osfrose
730 ;;
731 -osf*)
732 os=-osf
733 ;;
734 -utek*)
735 os=-bsd
736 ;;
737 -dynix*)
738 os=-bsd
739 ;;
740 -acis*)
741 os=-aos
742 ;;
743 -386bsd) # CYGNUS LOCAL
744 os=-bsd
745 ;;
746 -ctix* | -uts*)
747 os=-sysv
748 ;;
749 -triton*)
750 os=-sysv3
751 ;;
752 -oss*)
753 os=-sysv3
754 ;;
755 -svr4)
756 os=-sysv4
757 ;;
758 -unixware)
759 os=-sysv4
760 ;;
761 -svr3)
762 os=-sysv3
763 ;;
764 -sysvr4)
765 os=-sysv4
766 ;;
767 # This must come after -sysvr4.
768 -sysv*)
769 ;;
770 -ose*) # CYGNUS LOCAL
771 os=-ose
772 ;;
773 -es1800*) # CYGNUS LOCAL
774 os=-ose
775 ;;
776 -xenix)
777 os=-xenix
778 ;;
779 -none)
780 ;;
781 *)
782 # Get rid of the `-' at the beginning of $os.
783 os=`echo $1 | sed 's/[^-]*-//'`
784 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
785 exit 1
786 ;;
787 esac
788 else
789
790 # Here we handle the default operating systems that come with various machines.
791 # The value should be what the vendor currently ships out the door with their
792 # machine or put another way, the most popular os provided with the machine.
793
794 # Note that if you're going to try to match "-MANUFACTURER" here (say,
795 # "-sun"), then you have to tell the case statement up towards the top
796 # that MANUFACTURER isn't an operating system. Otherwise, code above
797 # will signal an error saying that MANUFACTURER isn't an operating
798 # system, and we'll never get to this point.
799
800 case $basic_machine in
801 *-acorn)
802 os=-riscix1.2
803 ;;
804 *-dec | vax-*)
805 os=-ultrix4.2
806 ;;
807 i386-sun)
808 os=-sunos4.0.2
809 ;;
810 m68000-sun)
811 os=-sunos3
812 # This also exists in the configure program, but was not the
813 # default.
814 # os=-sunos4
815 ;;
816 m68*-cisco)
817 os=-aout
818 ;;
819 mips*-cisco)
820 os=-elf
821 ;;
822 *-tti) # must be before sparc entry or we get the wrong os.
823 os=-sysv3
824 ;;
825 sparc-* | *-sun)
826 os=-sunos4.1.1
827 ;;
828 *-ibm)
829 os=-aix
830 ;;
831 *-hp)
832 os=-hpux
833 ;;
834 *-hitachi)
835 os=-hiux
836 ;;
837 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
838 os=-sysv
839 ;;
840 *-cbm)
841 os=-amigados
842 ;;
843 *-dg)
844 os=-dgux
845 ;;
846 *-dolphin)
847 os=-sysv3
848 ;;
849 m88k-omron*)
850 os=-luna
851 ;;
852 *-sequent)
853 os=-bsd
854 ;;
855 *-crds)
856 os=-unos
857 ;;
858 *-ns)
859 os=-genix
860 ;;
861 i370-*)
862 os=-mvs
863 ;;
864 *-next)
865 os=-bsd
866 ;;
867 i[34]86-*)
868 os=-sco3.2v2
869 ;;
870 *-gould)
871 os=-sysv
872 ;;
873 *-highlevel)
874 os=-bsd
875 ;;
876 *-encore)
877 os=-bsd
878 ;;
879 *-sgi)
880 os=-irix
881 ;;
882 *-masscomp)
883 os=-rtu
884 ;;
885 *-rom68k) # CYGNUS LOCAL
886 os=-coff
887 ;;
888 *-*bug) # CYGNUS LOCAL
889 os=-coff
890 ;;
891 ## start-sanitize-mpw
892 *-apple) # CYGNUS LOCAL
893 os=-mpw
894 ;;
895 ## end-sanitize-mpw
896 *)
897 os=-none
898 ;;
899 esac
900 fi
901
902 # Here we handle the case where we know the os, and the CPU type, but not the
903 # manufacturer. We pick the logical manufacturer.
904 vendor=unknown
905 case $basic_machine in
906 *-unknown)
907 case $os in
908 -riscix*)
909 vendor=acorn
910 ;;
911 -sunos*)
912 vendor=sun
913 ;;
914 -bosx*) # CYGNUS LOCAL
915 vendor=bull
916 ;;
917 -lynxos*)
918 vendor=lynx
919 ;;
920 -aix*)
921 vendor=ibm
922 ;;
923 -hpux*)
924 vendor=hp
925 ;;
926 -hiux*)
927 vendor=hitachi
928 ;;
929 -unos*)
930 vendor=crds
931 ;;
932 -dgux*)
933 vendor=dg
934 ;;
935 -luna*)
936 vendor=omron
937 ;;
938 -genix*)
939 vendor=ns
940 ;;
941 -mvs*)
942 vendor=ibm
943 ;;
944 -vxworks*)
945 vendor=wrs # CYGNUS LOCAL
946 ;;
947 -hms*) # CYGNUS LOCAL
948 vendor=hitachi
949 ;;
950 ## start-sanitize-mpw
951 -mpw*) # CYGNUS LOCAL
952 vendor=apple
953 ;;
954 ## end-sanitize-mpw
955 esac
956 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
957 ;;
958 esac
959
960 echo $basic_machine$os
This page took 0.061911 seconds and 4 git commands to generate.