2
2
# Configuration validation subroutine script.
3
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
# 2011 Free Software Foundation, Inc.
8
9
# This file is (in principle) common to ALL GNU software.
9
10
# The presence of a machine in this file suggests that SOME GNU software
22
23
# You should have received a copy of the GNU General Public License
23
24
# 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.
25
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
27
28
# As a special exception to the GNU General Public License, if you
28
29
# distribute this file as part of a program that contains a
29
30
# configuration script generated by Autoconf, you may include it under
30
31
# the same distribution terms that you use for the rest of that program.
32
34
# Please send patches to <config-patches@gnu.org>. Submit a context
33
# diff and a properly formatted ChangeLog entry.
35
# diff and a properly formatted GNU ChangeLog entry.
35
37
# Configuration subroutine to validate and canonicalize a configuration type.
36
38
# Supply the specified configuration type as an argument.
37
39
# If it is invalid, we print an error message on stderr and exit with code 1.
38
40
# Otherwise, we print the canonical config type on stdout and succeed.
42
# You can get the latest version of this script from:
43
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
40
45
# This file is supposed to be the same for all GNU packages
41
46
# and recognize all the CPU types, system types and aliases
42
47
# that are meaningful with *any* GNU software.
71
76
GNU config.sub ($timestamp)
73
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
74
Free Software Foundation, Inc.
78
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
79
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
80
Software Foundation, Inc.
76
82
This is free software; see the source for copying conditions. There is NO
77
83
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
83
89
while test $# -gt 0 ; do
85
91
--time-stamp | --time* | -t )
86
echo "$timestamp" ; exit 0 ;;
92
echo "$timestamp" ; exit ;;
88
echo "$version" ; exit 0 ;;
94
echo "$version" ; exit ;;
89
95
--help | --h* | -h )
90
echo "$usage"; exit 0 ;;
96
echo "$usage"; exit ;;
91
97
-- ) # Stop option processing
93
99
- ) # Use stdin as input.
118
124
# Here we must recognize all the valid KERNEL-OS combinations.
119
125
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
120
126
case $maybe_os in
121
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
122
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
127
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
128
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
129
knetbsd*-gnu* | netbsd*-gnu* | \
130
kopensolaris*-gnu* | \
131
storm-chaos* | os2-emx* | rtmk-nova*)
124
133
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
145
154
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
146
155
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
147
156
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
157
-apple | -axis | -knuth | -cray | -microblaze)
152
164
-sim | -cisco | -oki | -wec | -winbond)
186
202
# Don't forget version if it is 3.2v4 or newer.
187
203
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206
# Don't forget version if it is 3.2v4 or newer.
207
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191
211
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
230
250
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
231
251
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
233
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
253
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
234
256
| c4x | clipper \
235
257
| d10v | d30v | dlx | dsp16xx \
258
| fido | fr30 | frv \
237
259
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
238
260
| i370 | i860 | i960 | ia64 \
239
261
| ip2k | iq2000 \
240
| m32r | m32rle | m68000 | m68k | m88k | mcore \
264
| m32c | m32r | m32rle | m68000 | m68k | m88k \
265
| maxq | mb | microblaze | mcore | mep | metag \
241
266
| mips | mipsbe | mipseb | mipsel | mipsle \
243
268
| mips64 | mips64el \
269
| mips64octeon | mips64octeonel \
270
| mips64orion | mips64orionel \
271
| mips64r5900 | mips64r5900el \
244
272
| mips64vr | mips64vrel \
245
| mips64orion | mips64orionel \
246
273
| mips64vr4100 | mips64vr4100el \
247
274
| mips64vr4300 | mips64vr4300el \
248
275
| mips64vr5000 | mips64vr5000el \
276
| mips64vr5900 | mips64vr5900el \
249
277
| mipsisa32 | mipsisa32el \
250
278
| mipsisa32r2 | mipsisa32r2el \
251
279
| mipsisa64 | mipsisa64el \
254
282
| mipsisa64sr71k | mipsisa64sr71kel \
255
283
| mipstx39 | mipstx39el \
256
284
| mn10200 | mn10300 \
288
| nds32 | nds32le | nds32be \
258
290
| ns16k | ns32k \
260
293
| pdp10 | pdp11 | pj | pjl \
261
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
294
| powerpc | powerpc64 | powerpc64le | powerpcle \
263
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
298
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
264
299
| sh64 | sh64le \
265
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
267
| tahoe | thumb | tic4x | tic80 | tron \
300
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
301
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
303
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
305
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
270
| x86 | xscale | xstormy16 | xtensa \
307
| x86 | xc16x | xstormy16 | xtensa \
272
309
basic_machine=$basic_machine-unknown
274
m6811 | m68hc11 | m6812 | m68hc12)
312
basic_machine=tic54x-unknown
315
basic_machine=tic55x-unknown
318
basic_machine=tic6x-unknown
320
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
275
321
# Motorola 68HC11/12.
276
322
basic_machine=$basic_machine-unknown
279
325
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
328
basic_machine=mt-unknown
331
strongarm | thumb | xscale)
332
basic_machine=arm-unknown
336
basic_machine=armeb-unknown
340
basic_machine=armel-unknown
282
343
# We use `pc' rather than `unknown'
283
344
# because (1) that's what they normally are, and
297
358
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
298
359
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
299
360
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
302
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
303
| clipper-* | cydra-* \
363
| bfin-* | bs2000-* \
364
| c[123]* | c30-* | [cjt]90-* | c4x-* \
365
| clipper-* | craynv-* | cydra-* \
304
366
| d10v-* | d30v-* | dlx-* \
306
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
368
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
307
369
| h8300-* | h8500-* \
308
370
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
309
371
| i*86-* | i860-* | i960-* | ia64-* \
310
372
| ip2k-* | iq2000-* \
311
| m32r-* | m32rle-* \
375
| m32c-* | m32r-* | m32rle-* \
312
376
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
313
| m88110-* | m88k-* | mcore-* \
377
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
314
378
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
316
380
| mips64-* | mips64el-* \
381
| mips64octeon-* | mips64octeonel-* \
382
| mips64orion-* | mips64orionel-* \
383
| mips64r5900-* | mips64r5900el-* \
317
384
| mips64vr-* | mips64vrel-* \
318
| mips64orion-* | mips64orionel-* \
319
385
| mips64vr4100-* | mips64vr4100el-* \
320
386
| mips64vr4300-* | mips64vr4300el-* \
321
387
| mips64vr5000-* | mips64vr5000el-* \
388
| mips64vr5900-* | mips64vr5900el-* \
322
389
| mipsisa32-* | mipsisa32el-* \
323
390
| mipsisa32r2-* | mipsisa32r2el-* \
324
391
| mipsisa64-* | mipsisa64el-* \
326
393
| mipsisa64sb1-* | mipsisa64sb1el-* \
327
394
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
328
395
| mipstx39-* | mipstx39el-* \
330
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
399
| nds32-* | nds32le-* | nds32be-* \
401
| none-* | np1-* | ns16k-* | ns32k-* \
332
404
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
333
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
405
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
335
| romp-* | rs6000-* \
336
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
407
| romp-* | rs6000-* | rx-* \
408
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
337
409
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
338
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
339
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
340
| tahoe-* | thumb-* \
410
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
412
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
341
414
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
343
| v850-* | v850e-* | vax-* \
418
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
345
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
421
| x86-* | x86_64-* | xc16x-* | xps100-* \
422
| xstormy16-* | xtensa*-* \
426
# Recognize the basic CPU types without company name, with glob match.
428
basic_machine=$basic_machine-unknown
350
430
# Recognize the various machine names and aliases which stand
351
431
# for a CPU type and a company and sometimes even an OS.
417
501
basic_machine=ns32k-sequent
505
basic_machine=bfin-unknown
509
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
513
basic_machine=powerpc-ibm
517
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
520
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
523
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
421
526
basic_machine=c90-cray
530
basic_machine=arm-unknown
425
534
basic_machine=c1-convex
445
554
basic_machine=j90-cray
449
basic_machine=cr16c-unknown
558
basic_machine=craynv-cray
562
basic_machine=cr16-unknown
453
566
basic_machine=m68k-crds
568
crisv32 | crisv32-* | etraxfs*)
569
basic_machine=crisv32-axis
455
571
cris | cris-* | etrax*)
456
572
basic_machine=cris-axis
817
974
power) basic_machine=power-ibm
819
ppc) basic_machine=powerpc-unknown
976
ppc | ppcbe) basic_machine=powerpc-unknown
821
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
979
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
823
981
ppcle | powerpclittle | ppc-le | powerpc-little)
824
982
basic_machine=powerpcle-unknown
957
1129
basic_machine=t90-cray
961
basic_machine=tic54x-unknown
965
basic_machine=tic55x-unknown
969
basic_machine=tic6x-unknown
1133
basic_machine=$basic_machine-unknown
973
1137
basic_machine=mipstx39-unknown
1076
1254
basic_machine=we32k-att
1078
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
1256
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1079
1257
basic_machine=sh-unknown
1082
basic_machine=sh64-unknown
1084
sparc | sparcv8 | sparcv9 | sparcv9b)
1259
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1085
1260
basic_machine=sparc-sun
1125
1300
if [ x"$os" != x"" ]
1128
# First match some system type aliases
1129
# that might get confused with valid system types.
1303
# First match some system type aliases
1304
# that might get confused with valid system types.
1130
1305
# -solaris* is a basic system type, with this one exception.
1131
1309
-solaris1 | -solaris1.*)
1132
1310
os=`echo $os | sed -e 's|solaris1|sunos4|'`
1148
1326
# Each alternative MUST END IN A *, to match a version number.
1149
1327
# -sysv* is not here because it comes later, after sysvr4.
1150
1328
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1151
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1152
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1329
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1330
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1331
| -sym* | -kopensolaris* \
1153
1332
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1155
1334
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1156
1335
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1157
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1336
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1337
| -openbsd* | -solidbsd* \
1158
1338
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1159
1339
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1160
1340
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1161
1341
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1162
| -chorusos* | -chorusrdb* \
1342
| -chorusos* | -chorusrdb* | -cegcc* \
1163
1343
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1164
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
1344
| -mingw32* | -linux-gnu* | -linux-android* \
1345
| -linux-newlib* | -linux-uclibc* \
1346
| -uxpv* | -beos* | -mpeix* | -udk* \
1165
1347
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1166
1348
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1167
1349
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1168
1350
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1169
1351
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1170
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
1352
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1353
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1171
1354
# Remember, each alternative MUST END IN *, to match a version number.
1185
1368
os=`echo $os | sed -e 's|nto|nto-qnx|'`
1187
1370
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1188
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1371
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1189
1372
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)