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