* configure.in: Add lots of stuff to noconfigdirs for
[binutils-gdb.git] / config.sub
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 # Copyright (C) 1991, 92, 93, 94, 95, 1996 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., 59 Temple Place - Suite 330,
21 # Boston, MA 02111-1307, USA.
22
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.
27
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.
32
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.
40
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 # It is wrong to echo any other type of specification.
45
46 if [ x$1 = x ]
47 then
48 echo Configuration name missing. 1>&2
49 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
50 echo "or $0 ALIAS" 1>&2
51 echo where ALIAS is a recognized configuration type. 1>&2
52 exit 1
53 fi
54
55 # First pass through any local machine types.
56 case $1 in
57 *local*)
58 echo $1
59 exit 0
60 ;;
61 *)
62 ;;
63 esac
64
65 # Separate what the user gave into CPU-COMPANY and OS (if any).
66 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
67 if [ $basic_machine != $1 ]
68 then os=`echo $1 | sed 's/.*-/-/'`
69 else os=; fi
70
71 ### Let's recognize common machines as not being operating systems so
72 ### that things like config.sub decstation-3100 work. We also
73 ### recognize some manufacturers as not being operating systems, so we
74 ### can provide default operating systems below.
75 case $os in
76 -sun*os*)
77 # Prevent following clause from handling this invalid input.
78 ;;
79 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
80 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
81 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
82 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
83 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
84 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
85 os=
86 basic_machine=$1
87 ;;
88 -sim | -cisco | -oki | -wec | -winbond ) # CYGNUS LOCAL
89 os=
90 basic_machine=$1
91 ;;
92 -apple*) # CYGNUS LOCAL
93 os=
94 basic_machine=$1
95 ;;
96 -scout) # CYGNUS LOCAL
97 ;;
98 -wrs) # CYGNUS LOCAL
99 os=vxworks
100 basic_machine=$1
101 ;;
102 -hiux*)
103 os=-hiuxwe2
104 ;;
105 -sco5)
106 os=sco3.2v5
107 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
108 ;;
109 -sco4)
110 os=-sco3.2v4
111 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
112 ;;
113 -sco3.2.[4-9]*)
114 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
115 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
116 ;;
117 -sco3.2v[4-9]*)
118 # Don't forget version if it is 3.2v4 or newer.
119 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
120 ;;
121 -sco*)
122 os=-sco3.2v2
123 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
124 ;;
125 -isc)
126 os=-isc2.2
127 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
128 ;;
129 -clix*)
130 basic_machine=clipper-intergraph
131 ;;
132 -isc*)
133 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
134 ;;
135 -lynx*)
136 os=-lynxos
137 ;;
138 -ptx*)
139 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
140 ;;
141 -windowsnt*)
142 os=`echo $os | sed -e 's/windowsnt/winnt/'`
143 ;;
144 -psos*)
145 os=-psos
146 ;;
147 esac
148
149 # Decode aliases for certain CPU-COMPANY combinations.
150 case $basic_machine in
151 # Recognize the basic CPU types without company name.
152 # Some are omitted here because they have special meanings below.
153 tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
154 | arme[lb] | pyramid \
155 | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
156 | alpha | we32k | ns16k | clipper | i370 | sh \
157 | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
158 | pdp11 | mips64el | mips64orion | mips64orionel \
159 | sparc | sparclet | sparclite | sparc64)
160 basic_machine=$basic_machine-unknown
161 ;;
162 m88110 | m680[01234]0 | m683?2 | m68360 | z8k | v70 | h8500 | w65) # CYGNUS LOCAL
163 basic_machine=$basic_machine-unknown
164 ;;
165 mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith/vr4300
166 basic_machine=$basic_machine-unknown
167 ;;
168 mips64vr4100 | mips64vr4100el) # CYGNUS LOCAL jsmith/vr4100
169 basic_machine=$basic_machine-unknown
170 ;;
171 mips64vr5000 | mips64vr5000el) # CYGNUS LOCAL ian/vr5000
172 basic_machine=$basic_machine-unknown
173 ;;
174 # start-sanitize-v850
175 v850) # CYGNUS LOCAL jtc/v850
176 basic_machine=$basic_machine-unknown
177 ;;
178 # end-sanitize-v850
179 # start-sanitize-d10v
180 d10v) # CYGNUS LOCAL meissner/d10v
181 basic_machine=$basic_machine-unknown
182 ;;
183 # end-sanitize-d10v
184 # start-sanitize-m32r
185 m32r)
186 basic_machine=$basic_machine-unknown
187 ;;
188 # end-sanitize-m32r
189 mn10x00)
190 basic_machine=$basic_machine-unknown
191 ;;
192 # Object if more than one company name word.
193 *-*-*)
194 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
195 exit 1
196 ;;
197 # Recognize the basic CPU types with company name.
198 vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
199 | sparc-* | ns32k-* | fx80-* | arm-* | arme[lb]-* | c[123]* \
200 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
201 | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
202 | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
203 | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
204 | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
205 | mips64el-* | mips64orion-* | mips64orionel-*)
206 ;;
207 m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-*) # CYGNUS LOCAL
208 ;;
209 mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith/vr4300
210 ;;
211 mips64vr4100-* | mips64vr4100el-*) # CYGNUS LOCAL jsmith/vr4100
212 ;;
213 # Recognize the various machine names and aliases which stand
214 # for a CPU type and a company and sometimes even an OS.
215 386bsd) # CYGNUS LOCAL
216 basic_machine=i386-unknown
217 os=-bsd
218 ;;
219 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
220 basic_machine=m68000-att
221 ;;
222 3b*)
223 basic_machine=we32k-att
224 ;;
225 a29khif) # CYGNUS LOCAL
226 basic_machine=a29k-amd
227 os=-udi
228 ;;
229 adobe68k) # CYGNUS LOCAL
230 basic_machine=m68010-adobe
231 os=-scout
232 ;;
233 alliant | fx80)
234 basic_machine=fx80-alliant
235 ;;
236 altos | altos3068)
237 basic_machine=m68k-altos
238 ;;
239 am29k)
240 basic_machine=a29k-none
241 os=-bsd
242 ;;
243 amdahl)
244 basic_machine=580-amdahl
245 os=-sysv
246 ;;
247 amiga | amiga-*)
248 basic_machine=m68k-cbm
249 ;;
250 amigados)
251 basic_machine=m68k-cbm
252 os=-amigados
253 ;;
254 amigaunix | amix)
255 basic_machine=m68k-cbm
256 os=-sysv4
257 ;;
258 apollo68)
259 basic_machine=m68k-apollo
260 os=-sysv
261 ;;
262 apollo68bsd) # CYGNUS LOCAL
263 basic_machine=m68k-apollo
264 os=-bsd
265 ;;
266 arm | armel | armeb)
267 basic_machine=arm-arm
268 os=-aout
269 ;;
270 # start-sanitize-arc
271 arc)
272 basic_machine=arc-unknown
273 ;;
274 arc-*)
275 ;;
276 # end-sanitize-arc
277 aux)
278 basic_machine=m68k-apple
279 os=-aux
280 ;;
281 balance)
282 basic_machine=ns32k-sequent
283 os=-dynix
284 ;;
285 convex-c1)
286 basic_machine=c1-convex
287 os=-bsd
288 ;;
289 convex-c2)
290 basic_machine=c2-convex
291 os=-bsd
292 ;;
293 convex-c32)
294 basic_machine=c32-convex
295 os=-bsd
296 ;;
297 convex-c34)
298 basic_machine=c34-convex
299 os=-bsd
300 ;;
301 convex-c38)
302 basic_machine=c38-convex
303 os=-bsd
304 ;;
305 cray | ymp)
306 basic_machine=ymp-cray
307 os=-unicos
308 ;;
309 cray2)
310 basic_machine=cray2-cray
311 os=-unicos
312 ;;
313 crds | unos)
314 basic_machine=m68k-crds
315 ;;
316 da30 | da30-*)
317 basic_machine=m68k-da30
318 ;;
319 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
320 basic_machine=mips-dec
321 ;;
322 delta | 3300 | motorola-3300 | motorola-delta \
323 | 3300-motorola | delta-motorola)
324 basic_machine=m68k-motorola
325 ;;
326 delta88)
327 basic_machine=m88k-motorola
328 os=-sysv3
329 ;;
330 dpx20 | dpx20-*)
331 basic_machine=rs6000-bull
332 os=-bosx
333 ;;
334 dpx2* | dpx2*-bull)
335 basic_machine=m68k-bull
336 os=-sysv3
337 ;;
338 ebmon29k)
339 basic_machine=a29k-amd
340 os=-ebmon
341 ;;
342 elxsi)
343 basic_machine=elxsi-elxsi
344 os=-bsd
345 ;;
346 encore | umax | mmax)
347 basic_machine=ns32k-encore
348 ;;
349 es1800 | OSE68k | ose68k | ose | OSE) # CYGNUS LOCAL
350 basic_machine=m68k-ericsson
351 os=-ose
352 ;;
353 fx2800)
354 basic_machine=i860-alliant
355 ;;
356 genix)
357 basic_machine=ns32k-ns
358 ;;
359 gmicro)
360 basic_machine=tron-gmicro
361 os=-sysv
362 ;;
363 h3050r* | hiux*)
364 basic_machine=hppa1.1-hitachi
365 os=-hiuxwe2
366 ;;
367 h8300hms)
368 basic_machine=h8300-hitachi
369 os=-hms
370 ;;
371 h8300xray) # CYGNUS LOCAL
372 basic_machine=h8300-hitachi
373 os=-xray
374 ;;
375 h8500hms) # CYGNUS LOCAL
376 basic_machine=h8500-hitachi
377 os=-hms
378 ;;
379 harris)
380 basic_machine=m88k-harris
381 os=-sysv3
382 ;;
383 hp300-*)
384 basic_machine=m68k-hp
385 ;;
386 hp300bsd)
387 basic_machine=m68k-hp
388 os=-bsd
389 ;;
390 hp300hpux)
391 basic_machine=m68k-hp
392 os=-hpux
393 ;;
394 w89k-*) # CYGNUS LOCAL
395 basic_machine=hppa1.1-winbond
396 os=-proelf
397 ;;
398 op50n-*) # CYGNUS LOCAL
399 basic_machine=hppa1.1-oki
400 os=-proelf
401 ;;
402 op60c-*) # CYGNUS LOCAL
403 basic_machine=hppa1.1-oki
404 os=-proelf
405 ;;
406 hppro) # CYGNUS LOCAL
407 basic_machine=hppa1.1-hp
408 os=-proelf
409 ;;
410 hp9k2[0-9][0-9] | hp9k31[0-9])
411 basic_machine=m68000-hp
412 ;;
413 hp9k3[2-9][0-9])
414 basic_machine=m68k-hp
415 ;;
416 hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
417 basic_machine=hppa1.1-hp
418 ;;
419 hp9k8[0-9][0-9] | hp8[0-9][0-9])
420 basic_machine=hppa1.0-hp
421 ;;
422 hppaosf) # CYGNUS LOCAL
423 basic_machine=hppa1.1-hp
424 os=-osf
425 ;;
426 i370-ibm* | ibm*)
427 basic_machine=i370-ibm
428 os=-mvs
429 ;;
430 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
431 i[3456]86v32)
432 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
433 os=-sysv32
434 ;;
435 i[3456]86v4*)
436 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
437 os=-sysv4
438 ;;
439 i[3456]86v)
440 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
441 os=-sysv
442 ;;
443 i[3456]86sol2)
444 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
445 os=-solaris2
446 ;;
447 i386mach) # CYGNUS LOCAL
448 basic_machine=i386-mach
449 os=-mach
450 ;;
451 i386-vsta | vsta) # CYGNUS LOCAL
452 basic_machine=i386-unknown
453 os=-vsta
454 ;;
455 i386-go32 | go32) # CYGNUS LOCAL
456 basic_machine=i386-unknown
457 os=-go32
458 ;;
459 iris | iris4d)
460 basic_machine=mips-sgi
461 case $os in
462 -irix*)
463 ;;
464 *)
465 os=-irix4
466 ;;
467 esac
468 ;;
469 isi68 | isi)
470 basic_machine=m68k-isi
471 os=-sysv
472 ;;
473 m88k-omron*)
474 basic_machine=m88k-omron
475 ;;
476 magnum | m3230)
477 basic_machine=mips-mips
478 os=-sysv
479 ;;
480 merlin)
481 basic_machine=ns32k-utek
482 os=-sysv
483 ;;
484 miniframe)
485 basic_machine=m68000-convergent
486 ;;
487 mips3*-*)
488 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
489 ;;
490 mips3*)
491 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
492 ;;
493 monitor) # CYGNUS LOCAL
494 basic_machine=m68k-rom68k
495 os=-coff
496 ;;
497 msdos) # CYGNUS LOCAL
498 basic_machine=i386-unknown
499 os=-msdos
500 ;;
501 ncr3000)
502 basic_machine=i486-ncr
503 os=-sysv4
504 ;;
505 netbsd386)
506 basic_machine=i386-unknown # CYGNUS LOCAL
507 os=-netbsd
508 ;;
509 news | news700 | news800 | news900)
510 basic_machine=m68k-sony
511 os=-newsos
512 ;;
513 news1000)
514 basic_machine=m68030-sony
515 os=-newsos
516 ;;
517 news-3600 | risc-news)
518 basic_machine=mips-sony
519 os=-newsos
520 ;;
521 necv70) # CYGNUS LOCAL
522 basic_machine=v70-nec
523 os=-sysv
524 ;;
525 next | m*-next )
526 basic_machine=m68k-next
527 case $os in
528 -nextstep* )
529 ;;
530 -ns2*)
531 os=-nextstep2
532 ;;
533 *)
534 os=-nextstep3
535 ;;
536 esac
537 ;;
538 nh3000)
539 basic_machine=m68k-harris
540 os=-cxux
541 ;;
542 nh[45]000)
543 basic_machine=m88k-harris
544 os=-cxux
545 ;;
546 nindy960)
547 basic_machine=i960-intel
548 os=-nindy
549 ;;
550 mon960)
551 basic_machine=i960-intel
552 os=-mon960
553 ;;
554 np1)
555 basic_machine=np1-gould
556 ;;
557 OSE68000 | ose68000) # CYGNUS LOCAL
558 basic_machine=m68000-ericsson
559 os=-ose
560 ;;
561 os68k) # CYGNUS LOCAL
562 basic_machine=m68k-none
563 os=-os68k
564 ;;
565 pa-hitachi)
566 basic_machine=hppa1.1-hitachi
567 os=-hiuxwe2
568 ;;
569 paragon)
570 basic_machine=i860-intel
571 os=-osf
572 ;;
573 pbd)
574 basic_machine=sparc-tti
575 ;;
576 pbb)
577 basic_machine=m68k-tti
578 ;;
579 pc532 | pc532-*)
580 basic_machine=ns32k-pc532
581 ;;
582 pentium | p5)
583 basic_machine=i586-intel
584 ;;
585 pentiumpro | p6)
586 basic_machine=i686-intel
587 ;;
588 pentium-* | p5-*)
589 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
590 ;;
591 pentiumpro-* | p6-*)
592 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
593 ;;
594 k5)
595 # We don't have specific support for AMD's K5 yet, so just call it a Pentium
596 basic_machine=i586-amd
597 ;;
598 nexen)
599 # We don't have specific support for Nexgen yet, so just call it a Pentium
600 basic_machine=i586-nexgen
601 ;;
602 pn)
603 basic_machine=pn-gould
604 ;;
605 power) basic_machine=rs6000-ibm
606 ;;
607 ppc) basic_machine=powerpc-unknown
608 ;;
609 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
610 ;;
611 ppcle | powerpclittle | ppc-le | powerpc-little)
612 basic_machine=powerpcle-unknown
613 ;;
614 ppcle-* | powerpclittle-*)
615 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
616 ;;
617 ps2)
618 basic_machine=i386-ibm
619 ;;
620 rom68k) # CYGNUS LOCAL
621 basic_machine=m68k-rom68k
622 os=-coff
623 ;;
624 rm[46]00)
625 basic_machine=mips-siemens
626 ;;
627 rtpc | rtpc-*)
628 basic_machine=romp-ibm
629 ;;
630 sa29200) # CYGNUS LOCAL
631 basic_machine=a29k-amd
632 os=-udi
633 ;;
634 sequent)
635 basic_machine=i386-sequent
636 ;;
637 sh)
638 basic_machine=sh-hitachi
639 os=-hms
640 ;;
641 sparclite-wrs) # CYGNUS LOCAL
642 basic_machine=sparclite-wrs
643 os=-vxworks
644 ;;
645 sps7)
646 basic_machine=m68k-bull
647 os=-sysv2
648 ;;
649 spur)
650 basic_machine=spur-unknown
651 ;;
652 st2000) # CYGNUS LOCAL
653 basic_machine=m68k-tandem
654 ;;
655 stratus) # CYGNUS LOCAL
656 basic_machine=i860-stratus
657 os=-sysv4
658 ;;
659 sun2)
660 basic_machine=m68000-sun
661 ;;
662 sun2os3)
663 basic_machine=m68000-sun
664 os=-sunos3
665 ;;
666 sun2os4)
667 basic_machine=m68000-sun
668 os=-sunos4
669 ;;
670 sun3os3)
671 basic_machine=m68k-sun
672 os=-sunos3
673 ;;
674 sun3os4)
675 basic_machine=m68k-sun
676 os=-sunos4
677 ;;
678 sun4os3)
679 basic_machine=sparc-sun
680 os=-sunos3
681 ;;
682 sun4os4)
683 basic_machine=sparc-sun
684 os=-sunos4
685 ;;
686 sun4sol2)
687 basic_machine=sparc-sun
688 os=-solaris2
689 ;;
690 sun3 | sun3-*)
691 basic_machine=m68k-sun
692 ;;
693 sun4)
694 basic_machine=sparc-sun
695 ;;
696 sun386 | sun386i | roadrunner)
697 basic_machine=i386-sun
698 ;;
699 symmetry)
700 basic_machine=i386-sequent
701 os=-dynix
702 ;;
703 tower | tower-32)
704 basic_machine=m68k-ncr
705 ;;
706 udi29k)
707 basic_machine=a29k-amd
708 os=-udi
709 ;;
710 ultra3)
711 basic_machine=a29k-nyu
712 os=-sym1
713 ;;
714 v810 | necv810) # CYGNUS LOCAL
715 basic_machine=v810-nec
716 os=-none
717 ;;
718 vaxv)
719 basic_machine=vax-dec
720 os=-sysv
721 ;;
722 vms)
723 basic_machine=vax-dec
724 os=-vms
725 ;;
726 vxworks960)
727 basic_machine=i960-wrs
728 os=-vxworks
729 ;;
730 vxworks68)
731 basic_machine=m68k-wrs
732 os=-vxworks
733 ;;
734 vxworks29k)
735 basic_machine=a29k-wrs
736 os=-vxworks
737 ;;
738 w65*) # CYGNUS LOCAL
739 basic_machine=w65-wdc
740 os=-none
741 ;;
742 xmp)
743 basic_machine=xmp-cray
744 os=-unicos
745 ;;
746 xps | xps100)
747 basic_machine=xps100-honeywell
748 ;;
749 z8k-*-coff) # CYGNUS LOCAL
750 basic_machine=z8k-unknown
751 os=-sim
752 ;;
753 none)
754 basic_machine=none-none
755 os=-none
756 ;;
757
758 # Here we handle the default manufacturer of certain CPU types. It is in
759 # some cases the only manufacturer, in others, it is the most popular.
760 w89k) # CYGNUS LOCAL
761 basic_machine=hppa1.1-winbond
762 ;;
763 op50n) # CYGNUS LOCAL
764 basic_machine=hppa1.1-oki
765 ;;
766 op60c) # CYGNUS LOCAL
767 basic_machine=hppa1.1-oki
768 ;;
769 mips)
770 basic_machine=mips-mips
771 ;;
772 romp)
773 basic_machine=romp-ibm
774 ;;
775 rs6000)
776 basic_machine=rs6000-ibm
777 ;;
778 vax)
779 basic_machine=vax-dec
780 ;;
781 pdp11)
782 basic_machine=pdp11-dec
783 ;;
784 we32k)
785 basic_machine=we32k-att
786 ;;
787 sparc)
788 basic_machine=sparc-sun
789 ;;
790 cydra)
791 basic_machine=cydra-cydrome
792 ;;
793 orion)
794 basic_machine=orion-highlevel
795 ;;
796 orion105)
797 basic_machine=clipper-highlevel
798 ;;
799 mac | mpw | mac-mpw) # CYGNUS LOCAL
800 basic_machine=m68k-apple
801 ;;
802 pmac | pmac-mpw) # CYGNUS LOCAL
803 basic_machine=powerpc-apple
804 ;;
805 *)
806 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
807 exit 1
808 ;;
809 esac
810
811 # Here we canonicalize certain aliases for manufacturers.
812 case $basic_machine in
813 *-digital*)
814 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
815 ;;
816 *-commodore*)
817 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
818 ;;
819 *)
820 ;;
821 esac
822
823 # Decode manufacturer-specific aliases for certain operating systems.
824
825 if [ x"$os" != x"" ]
826 then
827 case $os in
828 # -solaris* is a basic system type, with this one exception.
829 -solaris1 | -solaris1.*)
830 os=`echo $os | sed -e 's|solaris1|sunos4|'`
831 ;;
832 -solaris)
833 os=-solaris2
834 ;;
835 -unixware* | svr4*)
836 os=-sysv4
837 ;;
838 -gnu/linux*)
839 os=`echo $os | sed -e 's|gnu/linux|linux|'`
840 ;;
841 # First accept the basic system types.
842 # The portable systems comes first.
843 # Each alternative MUST END IN A *, to match a version number.
844 # -sysv* is not here because it comes later, after sysvr4.
845 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
846 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \
847 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
848 | -amigados* | -msdos* | -moss* | -newsos* | -unicos* | -aos* | -aof* \
849 | -nindy* | -mon960* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
850 | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
851 | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
852 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
853 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
854 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
855 | -cygwin32* | -pe* | -psos*)
856 # Remember, each alternative MUST END IN *, to match a version number.
857 ;;
858 # CYGNUS LOCAL
859 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
860 | -windows* | -osx | -abug | -netware* | -proelf | -os9* \
861 | -macos* | -mpw* | -magic* | -rtems*)
862 ;;
863 -mac*)
864 os=`echo $os | sed -e 's|mac|macos|'`
865 ;;
866 # END CYGNUS LOCAL
867 -sunos5*)
868 os=`echo $os | sed -e 's|sunos5|solaris2|'`
869 ;;
870 -sunos6*)
871 os=`echo $os | sed -e 's|sunos6|solaris3|'`
872 ;;
873 -osfrose*)
874 os=-osfrose
875 ;;
876 -osf*)
877 os=-osf
878 ;;
879 -utek*)
880 os=-bsd
881 ;;
882 -dynix*)
883 os=-bsd
884 ;;
885 -acis*)
886 os=-aos
887 ;;
888 -386bsd) # CYGNUS LOCAL
889 os=-bsd
890 ;;
891 -ctix* | -uts*)
892 os=-sysv
893 ;;
894 -ns2 )
895 os=-nextstep2
896 ;;
897 # Preserve the version number of sinix5.
898 -sinix5.*)
899 os=`echo $os | sed -e 's|sinix|sysv|'`
900 ;;
901 -sinix*)
902 os=-sysv4
903 ;;
904 -triton*)
905 os=-sysv3
906 ;;
907 -oss*)
908 os=-sysv3
909 ;;
910 -svr4)
911 os=-sysv4
912 ;;
913 -svr3)
914 os=-sysv3
915 ;;
916 -sysvr4)
917 os=-sysv4
918 ;;
919 # This must come after -sysvr4.
920 -sysv*)
921 ;;
922 -ose*) # CYGNUS LOCAL
923 os=-ose
924 ;;
925 -es1800*) # CYGNUS LOCAL
926 os=-ose
927 ;;
928 -xenix)
929 os=-xenix
930 ;;
931 -none)
932 ;;
933 *)
934 # Get rid of the `-' at the beginning of $os.
935 os=`echo $os | sed 's/[^-]*-//'`
936 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
937 exit 1
938 ;;
939 esac
940 else
941
942 # Here we handle the default operating systems that come with various machines.
943 # The value should be what the vendor currently ships out the door with their
944 # machine or put another way, the most popular os provided with the machine.
945
946 # Note that if you're going to try to match "-MANUFACTURER" here (say,
947 # "-sun"), then you have to tell the case statement up towards the top
948 # that MANUFACTURER isn't an operating system. Otherwise, code above
949 # will signal an error saying that MANUFACTURER isn't an operating
950 # system, and we'll never get to this point.
951
952 case $basic_machine in
953 *-acorn)
954 os=-riscix1.2
955 ;;
956 arm*-semi)
957 os=-aout
958 ;;
959 pdp11-*)
960 os=-none
961 ;;
962 *-dec | vax-*)
963 os=-ultrix4.2
964 ;;
965 m68*-apollo)
966 os=-domain
967 ;;
968 i386-sun)
969 os=-sunos4.0.2
970 ;;
971 m68000-sun)
972 os=-sunos3
973 # This also exists in the configure program, but was not the
974 # default.
975 # os=-sunos4
976 ;;
977 m68*-cisco) # CYGNUS LOCAL
978 os=-aout
979 ;;
980 mips*-cisco) # CYGNUS LOCAL
981 os=-elf
982 ;;
983 *-tti) # must be before sparc entry or we get the wrong os.
984 os=-sysv3
985 ;;
986 sparc-* | *-sun)
987 os=-sunos4.1.1
988 ;;
989 *-ibm)
990 os=-aix
991 ;;
992 *-wec) # CYGNUS LOCAL
993 os=-proelf
994 ;;
995 *-winbond) # CYGNUS LOCAL
996 os=-proelf
997 ;;
998 *-oki) # CYGNUS LOCAL
999 os=-proelf
1000 ;;
1001 *-hp)
1002 os=-hpux
1003 ;;
1004 *-hitachi)
1005 os=-hiux
1006 ;;
1007 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1008 os=-sysv
1009 ;;
1010 *-cbm)
1011 os=-amigados
1012 ;;
1013 *-dg)
1014 os=-dgux
1015 ;;
1016 *-dolphin)
1017 os=-sysv3
1018 ;;
1019 m68k-ccur)
1020 os=-rtu
1021 ;;
1022 m88k-omron*)
1023 os=-luna
1024 ;;
1025 *-next )
1026 os=-nextstep
1027 ;;
1028 *-sequent)
1029 os=-ptx
1030 ;;
1031 *-crds)
1032 os=-unos
1033 ;;
1034 *-ns)
1035 os=-genix
1036 ;;
1037 i370-*)
1038 os=-mvs
1039 ;;
1040 *-next)
1041 os=-nextstep3
1042 ;;
1043 *-gould)
1044 os=-sysv
1045 ;;
1046 *-highlevel)
1047 os=-bsd
1048 ;;
1049 *-encore)
1050 os=-bsd
1051 ;;
1052 *-sgi)
1053 os=-irix
1054 ;;
1055 *-siemens)
1056 os=-sysv4
1057 ;;
1058 *-masscomp)
1059 os=-rtu
1060 ;;
1061 *-rom68k) # CYGNUS LOCAL
1062 os=-coff
1063 ;;
1064 *-*bug) # CYGNUS LOCAL
1065 os=-coff
1066 ;;
1067 *-apple) # CYGNUS LOCAL
1068 os=-macos
1069 ;;
1070 *)
1071 os=-none
1072 ;;
1073 esac
1074 fi
1075
1076 # Here we handle the case where we know the os, and the CPU type, but not the
1077 # manufacturer. We pick the logical manufacturer.
1078 vendor=unknown
1079 case $basic_machine in
1080 *-unknown)
1081 case $os in
1082 -riscix*)
1083 vendor=acorn
1084 ;;
1085 -sunos*)
1086 vendor=sun
1087 ;;
1088 -bosx*) # CYGNUS LOCAL
1089 vendor=bull
1090 ;;
1091 -lynxos*)
1092 vendor=lynx
1093 ;;
1094 -aix*)
1095 vendor=ibm
1096 ;;
1097 -hpux*)
1098 vendor=hp
1099 ;;
1100 -hiux*)
1101 vendor=hitachi
1102 ;;
1103 -unos*)
1104 vendor=crds
1105 ;;
1106 -dgux*)
1107 vendor=dg
1108 ;;
1109 -luna*)
1110 vendor=omron
1111 ;;
1112 -genix*)
1113 vendor=ns
1114 ;;
1115 -mvs*)
1116 vendor=ibm
1117 ;;
1118 -ptx*)
1119 vendor=sequent
1120 ;;
1121 -vxworks*)
1122 vendor=wrs
1123 ;;
1124 -aux*)
1125 vendor=apple
1126 ;;
1127 -hms*) # CYGNUS LOCAL
1128 vendor=hitachi
1129 ;;
1130 -mpw* | -macos*) # CYGNUS LOCAL
1131 vendor=apple
1132 ;;
1133 esac
1134 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1135 ;;
1136 esac
1137
1138 echo $basic_machine$os