Mercurial > hg > xemacs-beta
comparison config.sub @ 410:de805c49cfc1 r21-2-35
Import from CVS: tag r21-2-35
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:19:21 +0200 |
parents | 74fd4e045ea6 |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
409:301b9ebbdf3b | 410:de805c49cfc1 |
---|---|
1 #! /bin/sh | 1 #! /bin/sh |
2 # Configuration validation subroutine script, version 1.1. | 2 # Configuration validation subroutine script, version 1.1. |
3 # Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. | 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 |
4 # Free Software Foundation, Inc. | |
5 | |
6 version='2000-05-31' | |
7 | |
4 # This file is (in principle) common to ALL GNU software. | 8 # This file is (in principle) common to ALL GNU software. |
5 # The presence of a machine in this file suggests that SOME GNU software | 9 # 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. | 10 # can handle that machine. It does not imply ALL GNU software can. |
7 # | 11 # |
8 # This file is free software; you can redistribute it and/or modify | 12 # This file is free software; you can redistribute it and/or modify |
23 # As a special exception to the GNU General Public License, if you | 27 # As a special exception to the GNU General Public License, if you |
24 # distribute this file as part of a program that contains a | 28 # distribute this file as part of a program that contains a |
25 # configuration script generated by Autoconf, you may include it under | 29 # configuration script generated by Autoconf, you may include it under |
26 # the same distribution terms that you use for the rest of that program. | 30 # the same distribution terms that you use for the rest of that program. |
27 | 31 |
32 # Written by Per Bothner <bothner@cygnus.com>. | |
33 # Please send patches to <config-patches@gnu.org>. | |
34 # | |
28 # Configuration subroutine to validate and canonicalize a configuration type. | 35 # Configuration subroutine to validate and canonicalize a configuration type. |
29 # Supply the specified configuration type as an argument. | 36 # 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. | 37 # 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. | 38 # Otherwise, we print the canonical config type on stdout and succeed. |
32 | 39 |
43 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | 50 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM |
44 # or in some cases, the newer four-part form: | 51 # or in some cases, the newer four-part form: |
45 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | 52 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
46 # It is wrong to echo any other type of specification. | 53 # It is wrong to echo any other type of specification. |
47 | 54 |
48 if [ x$1 = x ] | 55 me=`echo "$0" | sed -e 's,.*/,,'` |
49 then | 56 |
50 echo Configuration name missing. 1>&2 | 57 usage="\ |
51 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 | 58 Usage: $0 [OPTION] CPU-MFR-OPSYS |
52 echo "or $0 ALIAS" 1>&2 | 59 $0 [OPTION] ALIAS |
53 echo where ALIAS is a recognized configuration type. 1>&2 | 60 |
54 exit 1 | 61 Canonicalize a configuration name. |
55 fi | 62 |
56 | 63 Operation modes: |
57 # First pass through any local machine types. | 64 -h, --help print this help, then exit |
58 case $1 in | 65 -V, --version print version number, then exit" |
59 *local*) | 66 |
60 echo $1 | 67 help=" |
61 exit 0 | 68 Try \`$me --help' for more information." |
62 ;; | 69 |
63 *) | 70 # Parse command line |
64 ;; | 71 while test $# -gt 0 ; do |
72 case "$1" in | |
73 --version | --vers* | -V ) | |
74 echo "$version" ; exit 0 ;; | |
75 --help | --h* | -h ) | |
76 echo "$usage"; exit 0 ;; | |
77 -- ) # Stop option processing | |
78 shift; break ;; | |
79 - ) # Use stdin as input. | |
80 break ;; | |
81 -* ) | |
82 exec >&2 | |
83 echo "$me: invalid option $1" | |
84 echo "$help" | |
85 exit 1 ;; | |
86 | |
87 *local*) | |
88 # First pass through any local machine types. | |
89 echo $1 | |
90 exit 0;; | |
91 | |
92 * ) | |
93 break ;; | |
94 esac | |
95 done | |
96 | |
97 case $# in | |
98 0) echo "$me: missing argument$help" >&2 | |
99 exit 1;; | |
100 1) ;; | |
101 *) echo "$me: too many arguments$help" >&2 | |
102 exit 1;; | |
65 esac | 103 esac |
66 | 104 |
67 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | 105 # 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. | 106 # Here we must recognize all the valid KERNEL-OS combinations. |
69 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | 107 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
70 case $maybe_os in | 108 case $maybe_os in |
71 linux-gnu*) | 109 nto-qnx* | linux-gnu*) |
72 os=-$maybe_os | 110 os=-$maybe_os |
73 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | 111 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` |
74 ;; | 112 ;; |
75 *) | 113 *) |
76 basic_machine=`echo $1 | sed 's/-[^-]*$//'` | 114 basic_machine=`echo $1 | sed 's/-[^-]*$//'` |
167 # Recognize the basic CPU types without company name. | 205 # Recognize the basic CPU types without company name. |
168 # Some are omitted here because they have special meanings below. | 206 # Some are omitted here because they have special meanings below. |
169 tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | 207 tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ |
170 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 208 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ |
171 | 580 | i960 | h8300 \ | 209 | 580 | i960 | h8300 \ |
210 | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ | |
172 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | 211 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ |
173 | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ | 212 | hppa64 \ |
213 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | |
214 | alphaev6[78] \ | |
174 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ | 215 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ |
175 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | 216 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ |
176 | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | 217 | mips64orion | mips64orionel | mipstx39 | mipstx39el \ |
177 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | 218 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ |
178 | mips64vr5000 | miprs64vr5000el | mcore \ | 219 | mips64vr5000 | miprs64vr5000el | mcore \ |
179 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ | 220 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ |
180 | thumb | d10v | fr30) | 221 | thumb | d10v | fr30 | avr) |
181 basic_machine=$basic_machine-unknown | 222 basic_machine=$basic_machine-unknown |
182 ;; | 223 ;; |
183 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) | 224 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) |
184 ;; | 225 ;; |
185 | 226 |
199 vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | 240 vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ |
200 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | 241 | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ |
201 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | 242 | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ |
202 | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | 243 | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ |
203 | xmp-* | ymp-* \ | 244 | xmp-* | ymp-* \ |
204 | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ | 245 | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ |
205 | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \ | 246 | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ |
247 | hppa2.0n-* | hppa64-* \ | |
248 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | |
249 | alphaev6[78]-* \ | |
206 | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | 250 | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ |
207 | clipper-* | orion-* \ | 251 | clipper-* | orion-* \ |
208 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | 252 | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ |
209 | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | 253 | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ |
210 | mips64el-* | mips64orion-* | mips64orionel-* \ | 254 | mips64el-* | mips64orion-* | mips64orionel-* \ |
211 | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | 255 | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ |
212 | mipstx39-* | mipstx39el-* | mcore-* \ | 256 | mipstx39-* | mipstx39el-* | mcore-* \ |
213 | f301-* | armv*-* | t3e-* \ | 257 | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ |
214 | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ | 258 | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ |
215 | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* ) | 259 | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ |
260 | bs2000-*) | |
216 ;; | 261 ;; |
217 # Recognize the various machine names and aliases which stand | 262 # Recognize the various machine names and aliases which stand |
218 # for a CPU type and a company and sometimes even an OS. | 263 # for a CPU type and a company and sometimes even an OS. |
219 386bsd) | 264 386bsd) |
220 basic_machine=i386-unknown | 265 basic_machine=i386-unknown |
461 os=-go32 | 506 os=-go32 |
462 ;; | 507 ;; |
463 i386-mingw32 | mingw32) | 508 i386-mingw32 | mingw32) |
464 basic_machine=i386-unknown | 509 basic_machine=i386-unknown |
465 os=-mingw32 | 510 os=-mingw32 |
466 ;; | |
467 i386-qnx | qnx) | |
468 basic_machine=i386-qnx | |
469 ;; | 511 ;; |
470 iris | iris4d) | 512 iris | iris4d) |
471 basic_machine=mips-sgi | 513 basic_machine=mips-sgi |
472 case $os in | 514 case $os in |
473 -irix*) | 515 -irix*) |
510 mips3*-*) | 552 mips3*-*) |
511 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | 553 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` |
512 ;; | 554 ;; |
513 mips3*) | 555 mips3*) |
514 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | 556 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown |
557 ;; | |
558 mmix*) | |
559 basic_machine=mmix-knuth | |
560 os=-mmixware | |
515 ;; | 561 ;; |
516 monitor) | 562 monitor) |
517 basic_machine=m68k-rom68k | 563 basic_machine=m68k-rom68k |
518 os=-coff | 564 os=-coff |
519 ;; | 565 ;; |
583 os=-mon960 | 629 os=-mon960 |
584 ;; | 630 ;; |
585 np1) | 631 np1) |
586 basic_machine=np1-gould | 632 basic_machine=np1-gould |
587 ;; | 633 ;; |
634 nsr-tandem) | |
635 basic_machine=nsr-tandem | |
636 ;; | |
588 op50n-* | op60c-*) | 637 op50n-* | op60c-*) |
589 basic_machine=hppa1.1-oki | 638 basic_machine=hppa1.1-oki |
590 os=-proelf | 639 os=-proelf |
591 ;; | 640 ;; |
592 OSE68000 | ose68000) | 641 OSE68000 | ose68000) |
615 basic_machine=ns32k-pc532 | 664 basic_machine=ns32k-pc532 |
616 ;; | 665 ;; |
617 pentium | p5 | k5 | k6 | nexen) | 666 pentium | p5 | k5 | k6 | nexen) |
618 basic_machine=i586-pc | 667 basic_machine=i586-pc |
619 ;; | 668 ;; |
620 pentiumpro | p6 | 6x86) | 669 pentiumpro | p6 | 6x86 | athlon) |
621 basic_machine=i686-pc | 670 basic_machine=i686-pc |
622 ;; | 671 ;; |
623 pentiumii | pentium2) | 672 pentiumii | pentium2) |
624 basic_machine=i786-pc | 673 basic_machine=i786-pc |
625 ;; | 674 ;; |
626 pentium-* | p5-* | k5-* | k6-* | nexen-*) | 675 pentium-* | p5-* | k5-* | k6-* | nexen-*) |
627 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` | 676 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` |
628 ;; | 677 ;; |
629 pentiumpro-* | p6-* | 6x86-*) | 678 pentiumpro-* | p6-* | 6x86-* | athlon-*) |
630 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | 679 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` |
631 ;; | 680 ;; |
632 pentiumii-* | pentium2-*) | 681 pentiumii-* | pentium2-*) |
633 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` | 682 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` |
634 ;; | 683 ;; |
726 sun4) | 775 sun4) |
727 basic_machine=sparc-sun | 776 basic_machine=sparc-sun |
728 ;; | 777 ;; |
729 sun386 | sun386i | roadrunner) | 778 sun386 | sun386i | roadrunner) |
730 basic_machine=i386-sun | 779 basic_machine=i386-sun |
780 ;; | |
781 sv1) | |
782 basic_machine=sv1-cray | |
783 os=-unicos | |
731 ;; | 784 ;; |
732 symmetry) | 785 symmetry) |
733 basic_machine=i386-sequent | 786 basic_machine=i386-sequent |
734 os=-dynix | 787 os=-dynix |
735 ;; | 788 ;; |
916 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | 969 | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ |
917 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | 970 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ |
918 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | 971 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ |
919 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | 972 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
920 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | 973 | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ |
921 | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*) | 974 | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ |
975 | -openstep* | -oskit*) | |
922 # Remember, each alternative MUST END IN *, to match a version number. | 976 # Remember, each alternative MUST END IN *, to match a version number. |
977 ;; | |
978 -qnx*) | |
979 case $basic_machine in | |
980 x86-* | i[34567]86-*) | |
981 ;; | |
982 *) | |
983 os=-nto$os | |
984 ;; | |
985 esac | |
986 ;; | |
987 -nto*) | |
988 os=-nto-qnx | |
923 ;; | 989 ;; |
924 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | 990 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ |
925 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | 991 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ |
926 | -macos* | -mpw* | -magic* | -mon960* | -lnews*) | 992 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) |
927 ;; | 993 ;; |
928 -mac*) | 994 -mac*) |
929 os=`echo $os | sed -e 's|mac|macos|'` | 995 os=`echo $os | sed -e 's|mac|macos|'` |
930 ;; | 996 ;; |
931 -linux*) | 997 -linux*) |
938 os=`echo $os | sed -e 's|sunos6|solaris3|'` | 1004 os=`echo $os | sed -e 's|sunos6|solaris3|'` |
939 ;; | 1005 ;; |
940 -opened*) | 1006 -opened*) |
941 os=-openedition | 1007 os=-openedition |
942 ;; | 1008 ;; |
1009 -wince*) | |
1010 os=-wince | |
1011 ;; | |
943 -osfrose*) | 1012 -osfrose*) |
944 os=-osfrose | 1013 os=-osfrose |
945 ;; | 1014 ;; |
946 -osf*) | 1015 -osf*) |
947 os=-osf | 1016 os=-osf |
961 -ctix* | -uts*) | 1030 -ctix* | -uts*) |
962 os=-sysv | 1031 os=-sysv |
963 ;; | 1032 ;; |
964 -ns2 ) | 1033 -ns2 ) |
965 os=-nextstep2 | 1034 os=-nextstep2 |
1035 ;; | |
1036 -nsk) | |
1037 os=-nsk | |
966 ;; | 1038 ;; |
967 # Preserve the version number of sinix5. | 1039 # Preserve the version number of sinix5. |
968 -sinix5.*) | 1040 -sinix5.*) |
969 os=`echo $os | sed -e 's|sinix|sysv|'` | 1041 os=`echo $os | sed -e 's|sinix|sysv|'` |
970 ;; | 1042 ;; |
974 -triton*) | 1046 -triton*) |
975 os=-sysv3 | 1047 os=-sysv3 |
976 ;; | 1048 ;; |
977 -oss*) | 1049 -oss*) |
978 os=-sysv3 | 1050 os=-sysv3 |
979 ;; | |
980 -qnx) | |
981 os=-qnx4 | |
982 ;; | 1051 ;; |
983 -svr4) | 1052 -svr4) |
984 os=-sysv4 | 1053 os=-sysv4 |
985 ;; | 1054 ;; |
986 -svr3) | 1055 -svr3) |
1228 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | 1297 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` |
1229 ;; | 1298 ;; |
1230 esac | 1299 esac |
1231 | 1300 |
1232 echo $basic_machine$os | 1301 echo $basic_machine$os |
1302 exit 0 | |
1303 | |
1304 # Local variables: | |
1305 # eval: (add-hook 'write-file-hooks 'time-stamp) | |
1306 # time-stamp-start: "version='" | |
1307 # time-stamp-format: "%:y-%02m-%02d" | |
1308 # time-stamp-end: "'" | |
1309 # End: |