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