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