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.
2
# Configuration validation subroutine script.
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
8
8
# This file is (in principle) common to ALL GNU software.
9
9
# The presence of a machine in this file suggests that SOME GNU software
22
22
# You should have received a copy of the GNU General Public License
23
23
# along with this program; if not, write to the Free Software
24
# Foundation, Inc., 59 Temple Place - Suite 330,
25
# Boston, MA 02111-1307, USA.
24
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
25
# Boston, MA 02110-1301, USA.
27
27
# As a special exception to the GNU General Public License, if you
28
28
# distribute this file as part of a program that contains a
29
29
# configuration script generated by Autoconf, you may include it under
30
30
# the same distribution terms that you use for the rest of that program.
32
# Please send patches to <config-patches@gnu.org>.
32
# Please send patches to <config-patches@gnu.org>. Submit a context
33
# diff and a properly formatted ChangeLog entry.
34
35
# Configuration subroutine to validate and canonicalize a configuration type.
35
36
# Supply the specified configuration type as an argument.
60
61
Canonicalize a configuration name.
63
-h, --help print this help, then exit
64
-V, --version print version number, then exit"
64
-h, --help print this help, then exit
65
-t, --time-stamp print date of last modification, then exit
66
-v, --version print version number, then exit
68
Report bugs and patches to <config-patches@gnu.org>."
71
GNU config.sub ($timestamp)
73
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
74
Free Software Foundation, Inc.
76
This is free software; see the source for copying conditions. There is NO
77
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
67
80
Try \`$me --help' for more information."
69
82
# Parse command line
70
83
while test $# -gt 0 ; do
72
--version | --vers* | -V )
85
--time-stamp | --time* | -t )
86
echo "$timestamp" ; exit 0 ;;
73
88
echo "$version" ; exit 0 ;;
74
89
--help | --h* | -h )
75
90
echo "$usage"; exit 0 ;;
211
225
case $basic_machine in
212
226
# Recognize the basic CPU types without company name.
213
227
# Some are omitted here because they have special meanings below.
214
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm | xscale \
215
| arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \
216
| 580 | i960 | h8300 \
217
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
218
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
220
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
222
| we32k | ns16k | clipper | i370 | sh | sh[34] \
223
| powerpc | powerpcle \
224
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
225
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
226
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
227
| mips64vr5000 | miprs64vr5000el | mcore \
228
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
229
| thumb | d10v | d30v | fr30 | avr)
230
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
231
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
233
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
236
| d10v | d30v | dlx | dsp16xx \
238
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
239
| i370 | i860 | i960 | ia64 \
241
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
242
| mips | mipsbe | mipseb | mipsel | mipsle \
244
| mips64 | mips64el \
245
| mips64vr | mips64vrel \
246
| mips64orion | mips64orionel \
247
| mips64vr4100 | mips64vr4100el \
248
| mips64vr4300 | mips64vr4300el \
249
| mips64vr5000 | mips64vr5000el \
250
| mipsisa32 | mipsisa32el \
251
| mipsisa32r2 | mipsisa32r2el \
252
| mipsisa64 | mipsisa64el \
253
| mipsisa64r2 | mipsisa64r2el \
254
| mipsisa64sb1 | mipsisa64sb1el \
255
| mipsisa64sr71k | mipsisa64sr71kel \
256
| mipstx39 | mipstx39el \
257
| mn10200 | mn10300 \
261
| pdp10 | pdp11 | pj | pjl \
262
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
264
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
266
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
267
| sparcv8 | sparcv9 | sparcv9b \
269
| tahoe | thumb | tic4x | tic80 | tron \
272
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
230
274
basic_machine=$basic_machine-unknown
232
276
m6811 | m68hc11 | m6812 | m68hc12)
251
295
# Recognize the basic CPU types with company name.
252
# FIXME: clean up the formatting here.
253
vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
254
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
255
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
256
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
258
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
259
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
260
| hppa2.0n-* | hppa64-* \
261
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
263
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
264
| clipper-* | orion-* \
265
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
266
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
267
| mips64el-* | mips64orion-* | mips64orionel-* \
268
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
269
| mipstx39-* | mipstx39el-* | mcore-* \
270
| f301-* | armv*-* | s390-* | s390x-* | sv1-* | t3e-* \
271
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
272
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
273
| bs2000-* | tic54x-* | c54x-* | x86_64-*)
298
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
299
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
300
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
301
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
303
| bfin-* | bs2000-* \
304
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
305
| clipper-* | craynv-* | cydra-* \
306
| d10v-* | d30v-* | dlx-* \
308
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
309
| h8300-* | h8500-* \
310
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
311
| i*86-* | i860-* | i960-* | ia64-* \
312
| ip2k-* | iq2000-* \
313
| m32r-* | m32rle-* \
314
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
315
| m88110-* | m88k-* | maxq-* | mcore-* \
316
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
318
| mips64-* | mips64el-* \
319
| mips64vr-* | mips64vrel-* \
320
| mips64orion-* | mips64orionel-* \
321
| mips64vr4100-* | mips64vr4100el-* \
322
| mips64vr4300-* | mips64vr4300el-* \
323
| mips64vr5000-* | mips64vr5000el-* \
324
| mipsisa32-* | mipsisa32el-* \
325
| mipsisa32r2-* | mipsisa32r2el-* \
326
| mipsisa64-* | mipsisa64el-* \
327
| mipsisa64r2-* | mipsisa64r2el-* \
328
| mipsisa64sb1-* | mipsisa64sb1el-* \
329
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
330
| mipstx39-* | mipstx39el-* \
333
| none-* | np1-* | ns16k-* | ns32k-* \
335
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
336
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
338
| romp-* | rs6000-* \
339
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
340
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
341
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
343
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
344
| tahoe-* | thumb-* \
345
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
347
| v850-* | v850e-* | vax-* \
349
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
350
| xstormy16-* | xtensa-* \
275
354
# Recognize the various machine names and aliases which stand
276
355
# for a CPU type and a company and sometimes even an OS.
681
792
basic_machine=m68k-tti
684
795
basic_machine=ns32k-pc532
686
pentium | p5 | k5 | k6 | nexen)
797
pentium | p5 | k5 | k6 | nexgen | viac3)
687
798
basic_machine=i586-pc
689
pentiumpro | p6 | 6x86 | athlon)
690
basic_machine=i686-pc
692
pentiumii | pentium2)
800
pentiumpro | p6 | 6x86 | athlon | athlon_*)
801
basic_machine=i686-pc
803
pentiumii | pentium2 | pentiumiii | pentium3)
804
basic_machine=i686-pc
693
807
basic_machine=i786-pc
695
pentium-* | p5-* | k5-* | k6-* | nexen-*)
809
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
696
810
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
698
812
pentiumpro-* | p6-* | 6x86-* | athlon-*)
699
813
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
701
pentiumii-* | pentium2-*)
815
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
816
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
702
819
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
705
822
basic_machine=pn-gould
707
power) basic_machine=rs6000-ibm
824
power) basic_machine=power-ibm
709
826
ppc) basic_machine=powerpc-unknown
711
828
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
713
830
ppcle | powerpclittle | ppc-le | powerpc-little)
714
831
basic_machine=powerpcle-unknown
716
833
ppcle-* | powerpclittle-*)
717
834
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
836
ppc64) basic_machine=powerpc64-unknown
838
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
840
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
841
basic_machine=powerpc64le-unknown
843
ppc64le-* | powerpc64little-*)
844
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
720
847
basic_machine=i386-ibm
850
basic_machine=i586-unknown
723
854
basic_machine=m68k-rom68k
894
1068
basic_machine=hppa1.1-oki
897
if [ x$os = x-linux-gnu ]; then
898
basic_machine=mips-unknown
900
basic_machine=mips-mips
904
1071
basic_machine=romp-ibm
1074
basic_machine=mmix-knuth
907
1077
basic_machine=rs6000-ibm
910
1080
basic_machine=vax-dec
1083
# there are many clones, so DEC is not a safe bet
1084
basic_machine=pdp10-unknown
913
1087
basic_machine=pdp11-dec
916
1090
basic_machine=we32k-att
1092
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
919
1093
basic_machine=sh-unknown
1096
basic_machine=sh64-unknown
1098
sparc | sparcv8 | sparcv9 | sparcv9b)
922
1099
basic_machine=sparc-sun
925
1102
basic_machine=cydra-cydrome
993
1169
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
994
1170
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
995
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
996
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1171
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1172
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1173
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
997
1174
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
998
1175
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
999
1176
| -chorusos* | -chorusrdb* \
1000
1177
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1001
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
1002
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
1003
| -openstep* | -oskit* | -conix* | -pw32* | -storm-chaos*)
1178
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
1179
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1180
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1181
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1182
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1183
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1184
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
1004
1185
# Remember, each alternative MUST END IN *, to match a version number.
1007
1188
case $basic_machine in
1008
x86-* | i[34567]86-*)
1199
os=`echo $os | sed -e 's|nto|nto-qnx|'`
1018
1201
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1019
1202
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \