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