Set $inhibit_glue.
[glibc.git] / config.sub
blobd52fbe0bd50d5f69b3204d83a416b6b3ef010551
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.
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.
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.
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.
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.
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.
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.
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 # It is wrong to echo any other type of specification.
46 if [ x$1 = x ]
47 then
48 echo Configuration name missing. 1>&2
49 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
50 echo "or $0 ALIAS" 1>&2
51 echo where ALIAS is a recognized configuration type. 1>&2
52 exit 1
55 # First pass through any local machine types.
56 case $1 in
57 *local*)
58 echo $1
59 exit 0
63 esac
65 # Separate what the user gave into CPU-COMPANY and OS (if any).
66 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
67 if [ $basic_machine != $1 ]
68 then os=`echo $1 | sed 's/.*-/-/'`
69 else os=; fi
71 ### Let's recognize common machines as not being operating systems so
72 ### that things like config.sub decstation-3100 work. We also
73 ### recognize some manufacturers as not being operating systems, so we
74 ### can provide default operating systems below.
75 case $os in
76 -sun*os*)
77 # Prevent following clause from handling this invalid input.
79 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
80 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
81 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
82 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
83 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
84 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
85 os=
86 basic_machine=$1
88 -hiux*)
89 os=-hiuxwe2
91 -sco5)
92 os=sco3.2v5
93 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
95 -sco4)
96 os=-sco3.2v4
97 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
99 -sco3.2.[4-9]*)
100 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
101 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
103 -sco3.2v[4-9]*)
104 # Don't forget version if it is 3.2v4 or newer.
105 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
107 -sco*)
108 os=-sco3.2v2
109 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
111 -isc)
112 os=-isc2.2
113 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
115 -clix*)
116 basic_machine=clipper-intergraph
118 -isc*)
119 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
121 -lynx*)
122 os=-lynxos
124 -ptx*)
125 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
127 -windowsnt*)
128 os=`echo $os | sed -e 's/windowsnt/winnt/'`
130 esac
132 # Decode aliases for certain CPU-COMPANY combinations.
133 case $basic_machine in
134 # Recognize the basic CPU types without company name.
135 # Some are omitted here because they have special meanings below.
136 tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
137 | arme[lb] | pyramid \
138 | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
139 | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
140 | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
141 | pdp11 | mips64el | mips64orion | mips64orionel \
142 | sparc)
143 basic_machine=$basic_machine-unknown
145 # Object if more than one company name word.
146 *-*-*)
147 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
148 exit 1
150 # Recognize the basic CPU types with company name.
151 vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
152 | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
153 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
154 | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
155 | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
156 | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
157 | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
158 | mips64el-* | mips64orion-* | mips64orionel-*)
160 # Recognize the various machine names and aliases which stand
161 # for a CPU type and a company and sometimes even an OS.
162 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
163 basic_machine=m68000-att
165 3b*)
166 basic_machine=we32k-att
168 alliant | fx80)
169 basic_machine=fx80-alliant
171 altos | altos3068)
172 basic_machine=m68k-altos
174 am29k)
175 basic_machine=a29k-none
176 os=-bsd
178 amdahl)
179 basic_machine=580-amdahl
180 os=-sysv
182 amiga | amiga-*)
183 basic_machine=m68k-cbm
185 amigados)
186 basic_machine=m68k-cbm
187 os=-amigados
189 amigaunix | amix)
190 basic_machine=m68k-cbm
191 os=-sysv4
193 apollo68)
194 basic_machine=m68k-apollo
195 os=-sysv
197 balance)
198 basic_machine=ns32k-sequent
199 os=-dynix
201 convex-c1)
202 basic_machine=c1-convex
203 os=-bsd
205 convex-c2)
206 basic_machine=c2-convex
207 os=-bsd
209 convex-c32)
210 basic_machine=c32-convex
211 os=-bsd
213 convex-c34)
214 basic_machine=c34-convex
215 os=-bsd
217 convex-c38)
218 basic_machine=c38-convex
219 os=-bsd
221 cray | ymp)
222 basic_machine=ymp-cray
223 os=-unicos
225 cray2)
226 basic_machine=cray2-cray
227 os=-unicos
229 crds | unos)
230 basic_machine=m68k-crds
232 da30 | da30-*)
233 basic_machine=m68k-da30
235 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
236 basic_machine=mips-dec
238 delta | 3300 | motorola-3300 | motorola-delta \
239 | 3300-motorola | delta-motorola)
240 basic_machine=m68k-motorola
242 delta88)
243 basic_machine=m88k-motorola
244 os=-sysv3
246 dpx20 | dpx20-*)
247 basic_machine=rs6000-bull
248 os=-bosx
250 dpx2* | dpx2*-bull)
251 basic_machine=m68k-bull
252 os=-sysv3
254 ebmon29k)
255 basic_machine=a29k-amd
256 os=-ebmon
258 elxsi)
259 basic_machine=elxsi-elxsi
260 os=-bsd
262 encore | umax | mmax)
263 basic_machine=ns32k-encore
265 fx2800)
266 basic_machine=i860-alliant
268 genix)
269 basic_machine=ns32k-ns
271 gmicro)
272 basic_machine=tron-gmicro
273 os=-sysv
275 h3050r* | hiux*)
276 basic_machine=hppa1.1-hitachi
277 os=-hiuxwe2
279 h8300hms)
280 basic_machine=h8300-hitachi
281 os=-hms
283 harris)
284 basic_machine=m88k-harris
285 os=-sysv3
287 hp300-*)
288 basic_machine=m68k-hp
290 hp300bsd)
291 basic_machine=m68k-hp
292 os=-bsd
294 hp300hpux)
295 basic_machine=m68k-hp
296 os=-hpux
298 hp9k2[0-9][0-9] | hp9k31[0-9])
299 basic_machine=m68000-hp
301 hp9k3[2-9][0-9])
302 basic_machine=m68k-hp
304 hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
305 basic_machine=hppa1.1-hp
307 hp9k8[0-9][0-9] | hp8[0-9][0-9])
308 basic_machine=hppa1.0-hp
310 i370-ibm* | ibm*)
311 basic_machine=i370-ibm
312 os=-mvs
314 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
315 i[3456]86v32)
316 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
317 os=-sysv32
319 i[3456]86v4*)
320 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
321 os=-sysv4
323 i[3456]86v)
324 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
325 os=-sysv
327 i[3456]86sol2)
328 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
329 os=-solaris2
331 iris | iris4d)
332 basic_machine=mips-sgi
333 case $os in
334 -irix*)
337 os=-irix4
339 esac
341 isi68 | isi)
342 basic_machine=m68k-isi
343 os=-sysv
345 m88k-omron*)
346 basic_machine=m88k-omron
348 magnum | m3230)
349 basic_machine=mips-mips
350 os=-sysv
352 merlin)
353 basic_machine=ns32k-utek
354 os=-sysv
356 miniframe)
357 basic_machine=m68000-convergent
359 mips3*-*)
360 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
362 mips3*)
363 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
365 ncr3000)
366 basic_machine=i486-ncr
367 os=-sysv4
369 news | news700 | news800 | news900)
370 basic_machine=m68k-sony
371 os=-newsos
373 news1000)
374 basic_machine=m68030-sony
375 os=-newsos
377 news-3600 | risc-news)
378 basic_machine=mips-sony
379 os=-newsos
381 next | m*-next )
382 basic_machine=m68k-next
383 case $os in
384 -nextstep* )
386 -ns2*)
387 os=-nextstep2
390 os=-nextstep3
392 esac
394 nh3000)
395 basic_machine=m68k-harris
396 os=-cxux
398 nh[45]000)
399 basic_machine=m88k-harris
400 os=-cxux
402 nindy960)
403 basic_machine=i960-intel
404 os=-nindy
406 np1)
407 basic_machine=np1-gould
409 pa-hitachi)
410 basic_machine=hppa1.1-hitachi
411 os=-hiuxwe2
413 paragon)
414 basic_machine=i860-intel
415 os=-osf
417 pbd)
418 basic_machine=sparc-tti
420 pbb)
421 basic_machine=m68k-tti
423 pc532 | pc532-*)
424 basic_machine=ns32k-pc532
426 pentium | p5)
427 basic_machine=i586-intel
429 pentiumpro | p6)
430 basic_machine=i686-intel
432 pentium-* | p5-*)
433 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
435 pentiumpro-* | p6-*)
436 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
439 # We don't have specific support for AMD's K5 yet, so just call it a Pentium
440 basic_machine=i586-amd
442 nexen)
443 # We don't have specific support for Nexgen yet, so just call it a Pentium
444 basic_machine=i586-nexgen
447 basic_machine=pn-gould
449 power) basic_machine=rs6000-ibm
451 ppc) basic_machine=powerpc-unknown
453 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
455 ppcle | powerpclittle | ppc-le | powerpc-little)
456 basic_machine=powerpcle-unknown
458 ppcle-* | powerpclittle-*)
459 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
461 ps2)
462 basic_machine=i386-ibm
464 rm[46]00)
465 basic_machine=mips-siemens
467 rtpc | rtpc-*)
468 basic_machine=romp-ibm
470 sequent)
471 basic_machine=i386-sequent
474 basic_machine=sh-hitachi
475 os=-hms
477 sps7)
478 basic_machine=m68k-bull
479 os=-sysv2
481 spur)
482 basic_machine=spur-unknown
484 sun2)
485 basic_machine=m68000-sun
487 sun2os3)
488 basic_machine=m68000-sun
489 os=-sunos3
491 sun2os4)
492 basic_machine=m68000-sun
493 os=-sunos4
495 sun3os3)
496 basic_machine=m68k-sun
497 os=-sunos3
499 sun3os4)
500 basic_machine=m68k-sun
501 os=-sunos4
503 sun4os3)
504 basic_machine=sparc-sun
505 os=-sunos3
507 sun4os4)
508 basic_machine=sparc-sun
509 os=-sunos4
511 sun4sol2)
512 basic_machine=sparc-sun
513 os=-solaris2
515 sun3 | sun3-*)
516 basic_machine=m68k-sun
518 sun4)
519 basic_machine=sparc-sun
521 sun386 | sun386i | roadrunner)
522 basic_machine=i386-sun
524 symmetry)
525 basic_machine=i386-sequent
526 os=-dynix
528 tower | tower-32)
529 basic_machine=m68k-ncr
531 udi29k)
532 basic_machine=a29k-amd
533 os=-udi
535 ultra3)
536 basic_machine=a29k-nyu
537 os=-sym1
539 vaxv)
540 basic_machine=vax-dec
541 os=-sysv
543 vms)
544 basic_machine=vax-dec
545 os=-vms
547 vxworks960)
548 basic_machine=i960-wrs
549 os=-vxworks
551 vxworks68)
552 basic_machine=m68k-wrs
553 os=-vxworks
555 vxworks29k)
556 basic_machine=a29k-wrs
557 os=-vxworks
559 xmp)
560 basic_machine=xmp-cray
561 os=-unicos
563 xps | xps100)
564 basic_machine=xps100-honeywell
566 none)
567 basic_machine=none-none
568 os=-none
571 # Here we handle the default manufacturer of certain CPU types. It is in
572 # some cases the only manufacturer, in others, it is the most popular.
573 mips)
574 basic_machine=mips-mips
576 romp)
577 basic_machine=romp-ibm
579 rs6000)
580 basic_machine=rs6000-ibm
582 vax)
583 basic_machine=vax-dec
585 pdp11)
586 basic_machine=pdp11-dec
588 we32k)
589 basic_machine=we32k-att
591 sparc)
592 basic_machine=sparc-sun
594 cydra)
595 basic_machine=cydra-cydrome
597 orion)
598 basic_machine=orion-highlevel
600 orion105)
601 basic_machine=clipper-highlevel
604 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
605 exit 1
607 esac
609 # Here we canonicalize certain aliases for manufacturers.
610 case $basic_machine in
611 *-digital*)
612 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
614 *-commodore*)
615 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
619 esac
621 # Decode manufacturer-specific aliases for certain operating systems.
623 if [ x"$os" != x"" ]
624 then
625 case $os in
626 # -solaris* is a basic system type, with this one exception.
627 -solaris1 | -solaris1.*)
628 os=`echo $os | sed -e 's|solaris1|sunos4|'`
630 -solaris)
631 os=-solaris2
633 -unixware* | svr4*)
634 os=-sysv4
636 -gnu/linux*)
637 os=`echo $os | sed -e 's|gnu/linux|linux|'`
639 # First accept the basic system types.
640 # The portable systems comes first.
641 # Each alternative MUST END IN A *, to match a version number.
642 # -sysv* is not here because it comes later, after sysvr4.
643 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
644 | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \
645 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
646 | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
647 | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
648 | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
649 | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
650 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
651 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
652 | -udi* | -eabi* | -lites* | -ieee* | -go32*)
653 # Remember, each alternative MUST END IN *, to match a version number.
655 -sunos5*)
656 os=`echo $os | sed -e 's|sunos5|solaris2|'`
658 -sunos6*)
659 os=`echo $os | sed -e 's|sunos6|solaris3|'`
661 -osfrose*)
662 os=-osfrose
664 -osf*)
665 os=-osf
667 -utek*)
668 os=-bsd
670 -dynix*)
671 os=-bsd
673 -acis*)
674 os=-aos
676 -ctix* | -uts*)
677 os=-sysv
679 -ns2 )
680 os=-nextstep2
682 # Preserve the version number of sinix5.
683 -sinix5.*)
684 os=`echo $os | sed -e 's|sinix|sysv|'`
686 -sinix*)
687 os=-sysv4
689 -triton*)
690 os=-sysv3
692 -oss*)
693 os=-sysv3
695 -svr4)
696 os=-sysv4
698 -svr3)
699 os=-sysv3
701 -sysvr4)
702 os=-sysv4
704 # This must come after -sysvr4.
705 -sysv*)
707 -xenix)
708 os=-xenix
710 -none)
713 # Get rid of the `-' at the beginning of $os.
714 os=`echo $os | sed 's/[^-]*-//'`
715 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
716 exit 1
718 esac
719 else
721 # Here we handle the default operating systems that come with various machines.
722 # The value should be what the vendor currently ships out the door with their
723 # machine or put another way, the most popular os provided with the machine.
725 # Note that if you're going to try to match "-MANUFACTURER" here (say,
726 # "-sun"), then you have to tell the case statement up towards the top
727 # that MANUFACTURER isn't an operating system. Otherwise, code above
728 # will signal an error saying that MANUFACTURER isn't an operating
729 # system, and we'll never get to this point.
731 case $basic_machine in
732 *-acorn)
733 os=-riscix1.2
735 arm*-semi)
736 os=-aout
738 pdp11-*)
739 os=-none
741 *-dec | vax-*)
742 os=-ultrix4.2
744 m68*-apollo)
745 os=-domain
747 i386-sun)
748 os=-sunos4.0.2
750 m68000-sun)
751 os=-sunos3
752 # This also exists in the configure program, but was not the
753 # default.
754 # os=-sunos4
756 *-tti) # must be before sparc entry or we get the wrong os.
757 os=-sysv3
759 sparc-* | *-sun)
760 os=-sunos4.1.1
762 *-ibm)
763 os=-aix
765 *-hp)
766 os=-hpux
768 *-hitachi)
769 os=-hiux
771 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
772 os=-sysv
774 *-cbm)
775 os=-amigados
777 *-dg)
778 os=-dgux
780 *-dolphin)
781 os=-sysv3
783 m68k-ccur)
784 os=-rtu
786 m88k-omron*)
787 os=-luna
789 *-next )
790 os=-nextstep
792 *-sequent)
793 os=-ptx
795 *-crds)
796 os=-unos
798 *-ns)
799 os=-genix
801 i370-*)
802 os=-mvs
804 *-next)
805 os=-nextstep3
807 *-gould)
808 os=-sysv
810 *-highlevel)
811 os=-bsd
813 *-encore)
814 os=-bsd
816 *-sgi)
817 os=-irix
819 *-siemens)
820 os=-sysv4
822 *-masscomp)
823 os=-rtu
826 os=-none
828 esac
831 # Here we handle the case where we know the os, and the CPU type, but not the
832 # manufacturer. We pick the logical manufacturer.
833 vendor=unknown
834 case $basic_machine in
835 *-unknown)
836 case $os in
837 -riscix*)
838 vendor=acorn
840 -sunos*)
841 vendor=sun
843 -lynxos*)
844 vendor=lynx
846 -aix*)
847 vendor=ibm
849 -hpux*)
850 vendor=hp
852 -hiux*)
853 vendor=hitachi
855 -unos*)
856 vendor=crds
858 -dgux*)
859 vendor=dg
861 -luna*)
862 vendor=omron
864 -genix*)
865 vendor=ns
867 -mvs*)
868 vendor=ibm
870 -ptx*)
871 vendor=sequent
873 -vxworks*)
874 vendor=wrs
876 esac
877 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
879 esac
881 echo $basic_machine$os