gnus-user-agent, iswitchb-mode
[emacs.git] / config.sub
blob00b90f8841cf337ef3abbc6db36129572ae16200
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
4 # Free Software Foundation, Inc.
6 # This file is (in principle) common to ALL GNU software.
7 # The presence of a machine in this file suggests that SOME GNU software
8 # can handle that machine. It does not imply ALL GNU software can.
10 # This file is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2 of the License, or
13 # (at your option) any later version.
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330,
23 # Boston, MA 02111-1307, USA.
25 # As a special exception to the GNU General Public License, if you
26 # distribute this file as part of a program that contains a
27 # configuration script generated by Autoconf, you may include it under
28 # the same distribution terms that you use for the rest of that program.
30 # Written by Per Bothner <bothner@cygnus.com>.
31 # Please send patches to <config-patches@gnu.org>.
33 # Configuration subroutine to validate and canonicalize a configuration type.
34 # Supply the specified configuration type as an argument.
35 # If it is invalid, we print an error message on stderr and exit with code 1.
36 # Otherwise, we print the canonical config type on stdout and succeed.
38 # This file is supposed to be the same for all GNU packages
39 # and recognize all the CPU types, system types and aliases
40 # that are meaningful with *any* GNU software.
41 # Each package is responsible for reporting which valid configurations
42 # it does not support. The user should be able to distinguish
43 # a failure to support a valid configuration from a meaningless
44 # configuration.
46 # The goal of this file is to map all the various variations of a given
47 # machine specification into a single specification in the form:
48 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
49 # or in some cases, the newer four-part form:
50 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
51 # It is wrong to echo any other type of specification.
53 if [ x$1 = x ]
54 then
55 echo Configuration name missing. 1>&2
56 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
57 echo "or $0 ALIAS" 1>&2
58 echo where ALIAS is a recognized configuration type. 1>&2
59 exit 1
62 # First pass through any local machine types.
63 case $1 in
64 *local*)
65 echo $1
66 exit 0
70 esac
72 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
73 # Here we must recognize all the valid KERNEL-OS combinations.
74 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
75 case $maybe_os in
76 linux-gnu*)
77 os=-$maybe_os
78 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
81 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
82 if [ $basic_machine != $1 ]
83 then os=`echo $1 | sed 's/.*-/-/'`
84 else os=; fi
86 esac
88 ### Let's recognize common machines as not being operating systems so
89 ### that things like config.sub decstation-3100 work. We also
90 ### recognize some manufacturers as not being operating systems, so we
91 ### can provide default operating systems below.
92 case $os in
93 -sun*os*)
94 # Prevent following clause from handling this invalid input.
96 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
97 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
98 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
99 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
100 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
101 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
102 -apple)
104 basic_machine=$1
106 -sim | -cisco | -oki | -wec | -winbond)
108 basic_machine=$1
110 -scout)
112 -wrs)
113 os=-vxworks
114 basic_machine=$1
116 -hiux*)
117 os=-hiuxwe2
119 -sco5)
120 os=-sco3.2v5
121 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
123 -sco4)
124 os=-sco3.2v4
125 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
127 -sco3.2.[4-9]*)
128 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
129 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
131 -sco3.2v[4-9]*)
132 # Don't forget version if it is 3.2v4 or newer.
133 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
135 -sco*)
136 os=-sco3.2v2
137 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
139 -udk*)
140 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
142 -isc)
143 os=-isc2.2
144 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
146 -clix*)
147 basic_machine=clipper-intergraph
149 -isc*)
150 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
152 -lynx*)
153 os=-lynxos
155 -ptx*)
156 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
158 -windowsnt*)
159 os=`echo $os | sed -e 's/windowsnt/winnt/'`
161 -psos*)
162 os=-psos
164 -mint | -mint[0-9]*)
165 basic_machine=m68k-atari
166 os=-mint
168 esac
170 # Decode aliases for certain CPU-COMPANY combinations.
171 case $basic_machine in
172 # Recognize the basic CPU types without company name.
173 # Some are omitted here because they have special meanings below.
174 tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
175 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
176 | 580 | i960 | h8300 \
177 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
178 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
179 | alphaev6[78] \
180 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
181 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
182 | mips64orion | mips64orionel | mipstx39 | mipstx39el \
183 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
184 | mips64vr5000 | miprs64vr5000el | mcore \
185 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
186 | thumb | d10v | fr30 | avr)
187 basic_machine=$basic_machine-unknown
189 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
192 # We use `pc' rather than `unknown'
193 # because (1) that's what they normally are, and
194 # (2) the word "unknown" tends to confuse beginning users.
195 i[34567]86)
196 basic_machine=$basic_machine-pc
198 # Object if more than one company name word.
199 *-*-*)
200 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
201 exit 1
203 # Recognize the basic CPU types with company name.
204 # FIXME: clean up the formatting here.
205 vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
206 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
207 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
208 | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
209 | xmp-* | ymp-* \
210 | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
211 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
212 | alphaev6[78]-* \
213 | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
214 | clipper-* | orion-* \
215 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
216 | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
217 | mips64el-* | mips64orion-* | mips64orionel-* \
218 | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
219 | mipstx39-* | mipstx39el-* | mcore-* \
220 | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
221 | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
222 | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
224 # Recognize the various machine names and aliases which stand
225 # for a CPU type and a company and sometimes even an OS.
226 386bsd)
227 basic_machine=i386-unknown
228 os=-bsd
230 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
231 basic_machine=m68000-att
233 3b*)
234 basic_machine=we32k-att
236 a29khif)
237 basic_machine=a29k-amd
238 os=-udi
240 adobe68k)
241 basic_machine=m68010-adobe
242 os=-scout
244 alliant | fx80)
245 basic_machine=fx80-alliant
247 altos | altos3068)
248 basic_machine=m68k-altos
250 am29k)
251 basic_machine=a29k-none
252 os=-bsd
254 amdahl)
255 basic_machine=580-amdahl
256 os=-sysv
258 amiga | amiga-*)
259 basic_machine=m68k-cbm
261 amigaos | amigados)
262 basic_machine=m68k-cbm
263 os=-amigaos
265 amigaunix | amix)
266 basic_machine=m68k-cbm
267 os=-sysv4
269 apollo68)
270 basic_machine=m68k-apollo
271 os=-sysv
273 apollo68bsd)
274 basic_machine=m68k-apollo
275 os=-bsd
277 aux)
278 basic_machine=m68k-apple
279 os=-aux
281 balance)
282 basic_machine=ns32k-sequent
283 os=-dynix
285 convex-c1)
286 basic_machine=c1-convex
287 os=-bsd
289 convex-c2)
290 basic_machine=c2-convex
291 os=-bsd
293 convex-c32)
294 basic_machine=c32-convex
295 os=-bsd
297 convex-c34)
298 basic_machine=c34-convex
299 os=-bsd
301 convex-c38)
302 basic_machine=c38-convex
303 os=-bsd
305 cray | ymp)
306 basic_machine=ymp-cray
307 os=-unicos
309 cray2)
310 basic_machine=cray2-cray
311 os=-unicos
313 [ctj]90-cray)
314 basic_machine=c90-cray
315 os=-unicos
317 crds | unos)
318 basic_machine=m68k-crds
320 da30 | da30-*)
321 basic_machine=m68k-da30
323 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
324 basic_machine=mips-dec
326 delta | 3300 | motorola-3300 | motorola-delta \
327 | 3300-motorola | delta-motorola)
328 basic_machine=m68k-motorola
330 delta88)
331 basic_machine=m88k-motorola
332 os=-sysv3
334 dpx20 | dpx20-*)
335 basic_machine=rs6000-bull
336 os=-bosx
338 dpx2* | dpx2*-bull)
339 basic_machine=m68k-bull
340 os=-sysv3
342 ebmon29k)
343 basic_machine=a29k-amd
344 os=-ebmon
346 elxsi)
347 basic_machine=elxsi-elxsi
348 os=-bsd
350 encore | umax | mmax)
351 basic_machine=ns32k-encore
353 es1800 | OSE68k | ose68k | ose | OSE)
354 basic_machine=m68k-ericsson
355 os=-ose
357 fx2800)
358 basic_machine=i860-alliant
360 genix)
361 basic_machine=ns32k-ns
363 gmicro)
364 basic_machine=tron-gmicro
365 os=-sysv
367 h3050r* | hiux*)
368 basic_machine=hppa1.1-hitachi
369 os=-hiuxwe2
371 h8300hms)
372 basic_machine=h8300-hitachi
373 os=-hms
375 h8300xray)
376 basic_machine=h8300-hitachi
377 os=-xray
379 h8500hms)
380 basic_machine=h8500-hitachi
381 os=-hms
383 harris)
384 basic_machine=m88k-harris
385 os=-sysv3
387 hp300-*)
388 basic_machine=m68k-hp
390 hp300bsd)
391 basic_machine=m68k-hp
392 os=-bsd
394 hp300hpux)
395 basic_machine=m68k-hp
396 os=-hpux
398 hp3k9[0-9][0-9] | hp9[0-9][0-9])
399 basic_machine=hppa1.0-hp
401 hp9k2[0-9][0-9] | hp9k31[0-9])
402 basic_machine=m68000-hp
404 hp9k3[2-9][0-9])
405 basic_machine=m68k-hp
407 hp9k6[0-9][0-9] | hp6[0-9][0-9])
408 basic_machine=hppa1.0-hp
410 hp9k7[0-79][0-9] | hp7[0-79][0-9])
411 basic_machine=hppa1.1-hp
413 hp9k78[0-9] | hp78[0-9])
414 # FIXME: really hppa2.0-hp
415 basic_machine=hppa1.1-hp
417 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
418 # FIXME: really hppa2.0-hp
419 basic_machine=hppa1.1-hp
421 hp9k8[0-9][13679] | hp8[0-9][13679])
422 basic_machine=hppa1.1-hp
424 hp9k8[0-9][0-9] | hp8[0-9][0-9])
425 basic_machine=hppa1.0-hp
427 hppa-next)
428 os=-nextstep3
430 hppaosf)
431 basic_machine=hppa1.1-hp
432 os=-osf
434 hppro)
435 basic_machine=hppa1.1-hp
436 os=-proelf
438 i370-ibm* | ibm*)
439 basic_machine=i370-ibm
441 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
442 i[34567]86v32)
443 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
444 os=-sysv32
446 i[34567]86v4*)
447 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
448 os=-sysv4
450 i[34567]86v)
451 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
452 os=-sysv
454 i[34567]86sol2)
455 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
456 os=-solaris2
458 i386mach)
459 basic_machine=i386-mach
460 os=-mach
462 i386-vsta | vsta)
463 basic_machine=i386-unknown
464 os=-vsta
466 i386-go32 | go32)
467 basic_machine=i386-unknown
468 os=-go32
470 i386-mingw32 | mingw32)
471 basic_machine=i386-unknown
472 os=-mingw32
474 i386-qnx | qnx)
475 basic_machine=i386-qnx
477 iris | iris4d)
478 basic_machine=mips-sgi
479 case $os in
480 -irix*)
483 os=-irix4
485 esac
487 isi68 | isi)
488 basic_machine=m68k-isi
489 os=-sysv
491 m88k-omron*)
492 basic_machine=m88k-omron
494 magnum | m3230)
495 basic_machine=mips-mips
496 os=-sysv
498 merlin)
499 basic_machine=ns32k-utek
500 os=-sysv
502 miniframe)
503 basic_machine=m68000-convergent
505 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
506 basic_machine=m68k-atari
507 os=-mint
509 mipsel*-linux*)
510 basic_machine=mipsel-unknown
511 os=-linux-gnu
513 mips*-linux*)
514 basic_machine=mips-unknown
515 os=-linux-gnu
517 mips3*-*)
518 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
520 mips3*)
521 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
523 mmix*)
524 basic_machine=mmix-knuth
525 os=-mmixware
527 monitor)
528 basic_machine=m68k-rom68k
529 os=-coff
531 msdos)
532 basic_machine=i386-unknown
533 os=-msdos
535 mvs)
536 basic_machine=i370-ibm
537 os=-mvs
539 ncr3000)
540 basic_machine=i486-ncr
541 os=-sysv4
543 netbsd386)
544 basic_machine=i386-unknown
545 os=-netbsd
547 netwinder)
548 basic_machine=armv4l-rebel
549 os=-linux
551 news | news700 | news800 | news900)
552 basic_machine=m68k-sony
553 os=-newsos
555 news1000)
556 basic_machine=m68030-sony
557 os=-newsos
559 news-3600 | risc-news)
560 basic_machine=mips-sony
561 os=-newsos
563 necv70)
564 basic_machine=v70-nec
565 os=-sysv
567 next | m*-next )
568 basic_machine=m68k-next
569 case $os in
570 -nextstep* )
572 -ns2*)
573 os=-nextstep2
576 os=-nextstep3
578 esac
580 nh3000)
581 basic_machine=m68k-harris
582 os=-cxux
584 nh[45]000)
585 basic_machine=m88k-harris
586 os=-cxux
588 nindy960)
589 basic_machine=i960-intel
590 os=-nindy
592 mon960)
593 basic_machine=i960-intel
594 os=-mon960
596 np1)
597 basic_machine=np1-gould
599 op50n-* | op60c-*)
600 basic_machine=hppa1.1-oki
601 os=-proelf
603 OSE68000 | ose68000)
604 basic_machine=m68000-ericsson
605 os=-ose
607 os68k)
608 basic_machine=m68k-none
609 os=-os68k
611 pa-hitachi)
612 basic_machine=hppa1.1-hitachi
613 os=-hiuxwe2
615 paragon)
616 basic_machine=i860-intel
617 os=-osf
619 pbd)
620 basic_machine=sparc-tti
622 pbb)
623 basic_machine=m68k-tti
625 pc532 | pc532-*)
626 basic_machine=ns32k-pc532
628 pentium | p5 | k5 | k6 | nexen)
629 basic_machine=i586-pc
631 pentiumpro | p6 | 6x86)
632 basic_machine=i686-pc
634 pentiumii | pentium2)
635 basic_machine=i786-pc
637 pentium-* | p5-* | k5-* | k6-* | nexen-*)
638 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
640 pentiumpro-* | p6-* | 6x86-*)
641 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
643 pentiumii-* | pentium2-*)
644 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
647 basic_machine=pn-gould
649 power) basic_machine=rs6000-ibm
651 ppc) basic_machine=powerpc-unknown
653 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
655 ppcle | powerpclittle | ppc-le | powerpc-little)
656 basic_machine=powerpcle-unknown
658 ppcle-* | powerpclittle-*)
659 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
661 ps2)
662 basic_machine=i386-ibm
664 rom68k)
665 basic_machine=m68k-rom68k
666 os=-coff
668 rm[46]00)
669 basic_machine=mips-siemens
671 rtpc | rtpc-*)
672 basic_machine=romp-ibm
674 sa29200)
675 basic_machine=a29k-amd
676 os=-udi
678 sequent)
679 basic_machine=i386-sequent
682 basic_machine=sh-hitachi
683 os=-hms
685 sparclite-wrs)
686 basic_machine=sparclite-wrs
687 os=-vxworks
689 sps7)
690 basic_machine=m68k-bull
691 os=-sysv2
693 spur)
694 basic_machine=spur-unknown
696 st2000)
697 basic_machine=m68k-tandem
699 stratus)
700 basic_machine=i860-stratus
701 os=-sysv4
703 sun2)
704 basic_machine=m68000-sun
706 sun2os3)
707 basic_machine=m68000-sun
708 os=-sunos3
710 sun2os4)
711 basic_machine=m68000-sun
712 os=-sunos4
714 sun3os3)
715 basic_machine=m68k-sun
716 os=-sunos3
718 sun3os4)
719 basic_machine=m68k-sun
720 os=-sunos4
722 sun4os3)
723 basic_machine=sparc-sun
724 os=-sunos3
726 sun4os4)
727 basic_machine=sparc-sun
728 os=-sunos4
730 sun4sol2)
731 basic_machine=sparc-sun
732 os=-solaris2
734 sun3 | sun3-*)
735 basic_machine=m68k-sun
737 sun4)
738 basic_machine=sparc-sun
740 sun386 | sun386i | roadrunner)
741 basic_machine=i386-sun
743 sv1)
744 basic_machine=sv1-cray
745 os=-unicos
747 symmetry)
748 basic_machine=i386-sequent
749 os=-dynix
751 t3e)
752 basic_machine=t3e-cray
753 os=-unicos
755 tx39)
756 basic_machine=mipstx39-unknown
758 tx39el)
759 basic_machine=mipstx39el-unknown
761 tower | tower-32)
762 basic_machine=m68k-ncr
764 udi29k)
765 basic_machine=a29k-amd
766 os=-udi
768 ultra3)
769 basic_machine=a29k-nyu
770 os=-sym1
772 v810 | necv810)
773 basic_machine=v810-nec
774 os=-none
776 vaxv)
777 basic_machine=vax-dec
778 os=-sysv
780 vms)
781 basic_machine=vax-dec
782 os=-vms
784 vpp*|vx|vx-*)
785 basic_machine=f301-fujitsu
787 vxworks960)
788 basic_machine=i960-wrs
789 os=-vxworks
791 vxworks68)
792 basic_machine=m68k-wrs
793 os=-vxworks
795 vxworks29k)
796 basic_machine=a29k-wrs
797 os=-vxworks
799 w65*)
800 basic_machine=w65-wdc
801 os=-none
803 w89k-*)
804 basic_machine=hppa1.1-winbond
805 os=-proelf
807 xmp)
808 basic_machine=xmp-cray
809 os=-unicos
811 xps | xps100)
812 basic_machine=xps100-honeywell
814 z8k-*-coff)
815 basic_machine=z8k-unknown
816 os=-sim
818 none)
819 basic_machine=none-none
820 os=-none
823 # Here we handle the default manufacturer of certain CPU types. It is in
824 # some cases the only manufacturer, in others, it is the most popular.
825 w89k)
826 basic_machine=hppa1.1-winbond
828 op50n)
829 basic_machine=hppa1.1-oki
831 op60c)
832 basic_machine=hppa1.1-oki
834 mips)
835 if [ x$os = x-linux-gnu ]; then
836 basic_machine=mips-unknown
837 else
838 basic_machine=mips-mips
841 romp)
842 basic_machine=romp-ibm
844 rs6000)
845 basic_machine=rs6000-ibm
847 vax)
848 basic_machine=vax-dec
850 pdp11)
851 basic_machine=pdp11-dec
853 we32k)
854 basic_machine=we32k-att
856 sparc | sparcv9)
857 basic_machine=sparc-sun
859 cydra)
860 basic_machine=cydra-cydrome
862 orion)
863 basic_machine=orion-highlevel
865 orion105)
866 basic_machine=clipper-highlevel
868 mac | mpw | mac-mpw)
869 basic_machine=m68k-apple
871 pmac | pmac-mpw)
872 basic_machine=powerpc-apple
874 c4x*)
875 basic_machine=c4x-none
876 os=-coff
879 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
880 exit 1
882 esac
884 # Here we canonicalize certain aliases for manufacturers.
885 case $basic_machine in
886 *-digital*)
887 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
889 *-commodore*)
890 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
894 esac
896 # Decode manufacturer-specific aliases for certain operating systems.
898 if [ x"$os" != x"" ]
899 then
900 case $os in
901 # First match some system type aliases
902 # that might get confused with valid system types.
903 # -solaris* is a basic system type, with this one exception.
904 -solaris1 | -solaris1.*)
905 os=`echo $os | sed -e 's|solaris1|sunos4|'`
907 -solaris)
908 os=-solaris2
910 -svr4*)
911 os=-sysv4
913 -unixware*)
914 os=-sysv4.2uw
916 -gnu/linux*)
917 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
919 # First accept the basic system types.
920 # The portable systems comes first.
921 # Each alternative MUST END IN A *, to match a version number.
922 # -sysv* is not here because it comes later, after sysvr4.
923 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
924 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
925 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
926 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
927 | -aos* \
928 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
929 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
930 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
931 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
932 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
933 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
934 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
935 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
936 | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
937 # Remember, each alternative MUST END IN *, to match a version number.
939 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
940 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
941 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
943 -mac*)
944 os=`echo $os | sed -e 's|mac|macos|'`
946 -linux*)
947 os=`echo $os | sed -e 's|linux|linux-gnu|'`
949 -sunos5*)
950 os=`echo $os | sed -e 's|sunos5|solaris2|'`
952 -sunos6*)
953 os=`echo $os | sed -e 's|sunos6|solaris3|'`
955 -opened*)
956 os=-openedition
958 -wince*)
959 os=-wince
961 -osfrose*)
962 os=-osfrose
964 -osf*)
965 os=-osf
967 -utek*)
968 os=-bsd
970 -dynix*)
971 os=-bsd
973 -acis*)
974 os=-aos
976 -386bsd)
977 os=-bsd
979 -ctix* | -uts*)
980 os=-sysv
982 -ns2 )
983 os=-nextstep2
985 # Preserve the version number of sinix5.
986 -sinix5.*)
987 os=`echo $os | sed -e 's|sinix|sysv|'`
989 -sinix*)
990 os=-sysv4
992 -triton*)
993 os=-sysv3
995 -oss*)
996 os=-sysv3
998 -qnx)
999 os=-qnx4
1001 -svr4)
1002 os=-sysv4
1004 -svr3)
1005 os=-sysv3
1007 -sysvr4)
1008 os=-sysv4
1010 # This must come after -sysvr4.
1011 -sysv*)
1013 -ose*)
1014 os=-ose
1016 -es1800*)
1017 os=-ose
1019 -xenix)
1020 os=-xenix
1022 -*mint | -*MiNT)
1023 os=-mint
1025 -neutrino* | -nto*)
1026 os=-neutrino
1028 -none)
1031 # Get rid of the `-' at the beginning of $os.
1032 os=`echo $os | sed 's/[^-]*-//'`
1033 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1034 exit 1
1036 esac
1037 else
1039 # Here we handle the default operating systems that come with various machines.
1040 # The value should be what the vendor currently ships out the door with their
1041 # machine or put another way, the most popular os provided with the machine.
1043 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1044 # "-sun"), then you have to tell the case statement up towards the top
1045 # that MANUFACTURER isn't an operating system. Otherwise, code above
1046 # will signal an error saying that MANUFACTURER isn't an operating
1047 # system, and we'll never get to this point.
1049 case $basic_machine in
1050 *-acorn)
1051 os=-riscix1.2
1053 arm*-rebel)
1054 os=-linux
1056 arm*-semi)
1057 os=-aout
1059 pdp11-*)
1060 os=-none
1062 *-dec | vax-*)
1063 os=-ultrix4.2
1065 m68*-apollo)
1066 os=-domain
1068 i386-sun)
1069 os=-sunos4.0.2
1071 m68000-sun)
1072 os=-sunos3
1073 # This also exists in the configure program, but was not the
1074 # default.
1075 # os=-sunos4
1077 m68*-cisco)
1078 os=-aout
1080 mips*-cisco)
1081 os=-elf
1083 mips*-*)
1084 os=-elf
1086 *-tti) # must be before sparc entry or we get the wrong os.
1087 os=-sysv3
1089 sparc-* | *-sun)
1090 os=-sunos4.1.1
1092 *-be)
1093 os=-beos
1095 *-ibm)
1096 os=-aix
1098 *-wec)
1099 os=-proelf
1101 *-winbond)
1102 os=-proelf
1104 *-oki)
1105 os=-proelf
1107 *-hp)
1108 os=-hpux
1110 *-hitachi)
1111 os=-hiux
1113 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1114 os=-sysv
1116 *-cbm)
1117 os=-amigaos
1119 *-dg)
1120 os=-dgux
1122 *-dolphin)
1123 os=-sysv3
1125 m68k-ccur)
1126 os=-rtu
1128 m88k-omron*)
1129 os=-luna
1131 *-next )
1132 os=-nextstep
1134 *-sequent)
1135 os=-ptx
1137 *-crds)
1138 os=-unos
1140 *-ns)
1141 os=-genix
1143 i370-*)
1144 os=-mvs
1146 *-next)
1147 os=-nextstep3
1149 *-gould)
1150 os=-sysv
1152 *-highlevel)
1153 os=-bsd
1155 *-encore)
1156 os=-bsd
1158 *-sgi)
1159 os=-irix
1161 *-siemens)
1162 os=-sysv4
1164 *-masscomp)
1165 os=-rtu
1167 f301-fujitsu)
1168 os=-uxpv
1170 *-rom68k)
1171 os=-coff
1173 *-*bug)
1174 os=-coff
1176 *-apple)
1177 os=-macos
1179 *-atari*)
1180 os=-mint
1183 os=-none
1185 esac
1188 # Here we handle the case where we know the os, and the CPU type, but not the
1189 # manufacturer. We pick the logical manufacturer.
1190 vendor=unknown
1191 case $basic_machine in
1192 *-unknown)
1193 case $os in
1194 -riscix*)
1195 vendor=acorn
1197 -sunos*)
1198 vendor=sun
1200 -aix*)
1201 vendor=ibm
1203 -beos*)
1204 vendor=be
1206 -hpux*)
1207 vendor=hp
1209 -mpeix*)
1210 vendor=hp
1212 -hiux*)
1213 vendor=hitachi
1215 -unos*)
1216 vendor=crds
1218 -dgux*)
1219 vendor=dg
1221 -luna*)
1222 vendor=omron
1224 -genix*)
1225 vendor=ns
1227 -mvs* | -opened*)
1228 vendor=ibm
1230 -ptx*)
1231 vendor=sequent
1233 -vxsim* | -vxworks*)
1234 vendor=wrs
1236 -aux*)
1237 vendor=apple
1239 -hms*)
1240 vendor=hitachi
1242 -mpw* | -macos*)
1243 vendor=apple
1245 -*mint | -*MiNT)
1246 vendor=atari
1248 -neutrino* | -nto*)
1249 vendor=qnx
1251 esac
1252 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1254 esac
1256 echo $basic_machine$os