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