2
2
# Configuration validation subroutine script.
3
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
# 2011, 2012 Free Software Foundation, Inc.
9
# This file is (in principle) common to ALL GNU software.
10
# The presence of a machine in this file suggests that SOME GNU software
11
# can handle that machine. It does not imply ALL GNU software can.
13
# This file is free software; you can redistribute it and/or modify
14
# it under the terms of the GNU General Public License as published by
15
# the Free Software Foundation; either version 2 of the License, or
3
# Copyright 1992-2015 Free Software Foundation, Inc.
7
# This file is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
16
10
# (at your option) any later version.
18
# This program is distributed in the hope that it will be useful,
19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
# GNU General Public License for more details.
12
# This program is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
# General Public License for more details.
23
17
# You should have received a copy of the GNU General Public License
24
18
# along with this program; if not, see <http://www.gnu.org/licenses/>.
26
20
# As a special exception to the GNU General Public License, if you
27
21
# distribute this file as part of a program that contains a
28
22
# configuration script generated by Autoconf, you may include it under
29
# the same distribution terms that you use for the rest of that program.
32
# Please send patches to <config-patches@gnu.org>. Submit a context
33
# diff and a properly formatted GNU ChangeLog entry.
23
# the same distribution terms that you use for the rest of that
24
# program. This Exception is an additional permission under section 7
25
# of the GNU General Public License, version 3 ("GPLv3").
28
# Please send patches to <config-patches@gnu.org>.
35
30
# Configuration subroutine to validate and canonicalize a configuration type.
36
31
# Supply the specified configuration type as an argument.
74
69
GNU config.sub ($timestamp)
76
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
77
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
78
Free Software Foundation, Inc.
71
Copyright 1992-2015 Free Software Foundation, Inc.
80
73
This is free software; see the source for copying conditions. There is NO
81
74
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
123
116
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
124
117
case $maybe_os in
125
118
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
126
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
127
120
knetbsd*-gnu* | netbsd*-gnu* | \
128
121
kopensolaris*-gnu* | \
129
122
storm-chaos* | os2-emx* | rtmk-nova*)
156
149
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
157
150
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
158
151
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
159
-apple | -axis | -knuth | -cray | -microblaze)
152
-apple | -axis | -knuth | -cray | -microblaze*)
259
252
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
260
253
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
262
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
256
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
260
| c4x | c8051 | clipper \
266
261
| d10v | d30v | dlx | dsp16xx \
268
| fido | fr30 | frv \
263
| fido | fr30 | frv | ft32 \
269
264
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
271
266
| i370 | i860 | i960 | ia64 \
272
267
| ip2k | iq2000 \
275
271
| m32c | m32r | m32rle | m68000 | m68k | m88k \
276
| maxq | mb | microblaze | mcore | mep | metag \
272
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
277
273
| mips | mipsbe | mipseb | mipsel | mipsle \
279
275
| mips64 | mips64el \
287
283
| mips64vr5900 | mips64vr5900el \
288
284
| mipsisa32 | mipsisa32el \
289
285
| mipsisa32r2 | mipsisa32r2el \
286
| mipsisa32r6 | mipsisa32r6el \
290
287
| mipsisa64 | mipsisa64el \
291
288
| mipsisa64r2 | mipsisa64r2el \
289
| mipsisa64r6 | mipsisa64r6el \
292
290
| mipsisa64sb1 | mipsisa64sb1el \
293
291
| mipsisa64sr71k | mipsisa64sr71kel \
292
| mipsr5900 | mipsr5900el \
294
293
| mipstx39 | mipstx39el \
295
294
| mn10200 | mn10300 \
299
298
| nds32 | nds32le | nds32be \
299
| nios | nios2 | nios2eb | nios2el \
301
300
| ns16k | ns32k \
301
| open8 | or1k | or1knd | or32 \
304
302
| pdp10 | pdp11 | pj | pjl \
305
303
| powerpc | powerpc64 | powerpc64le | powerpcle \
305
| riscv32 | riscv64 \
309
308
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
329
329
basic_machine=tic6x-unknown
331
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
332
basic_machine=sparc-$basic_machine
334
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
332
335
basic_machine=$basic_machine-unknown
370
373
| aarch64-* | aarch64_be-* \
371
374
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
372
375
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
373
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
376
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
374
377
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
375
378
| avr-* | avr32-* \
376
379
| be32-* | be64-* \
377
380
| bfin-* | bs2000-* \
378
381
| c[123]* | c30-* | [cjt]90-* | c4x-* \
379
| clipper-* | craynv-* | cydra-* \
382
| c8051-* | clipper-* | craynv-* | cydra-* \
380
383
| d10v-* | d30v-* | dlx-* \
382
385
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
386
389
| i*86-* | i860-* | i960-* | ia64-* \
387
390
| ip2k-* | iq2000-* \
388
392
| le32-* | le64-* \
390
394
| m32c-* | m32r-* | m32rle-* \
391
395
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
392
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
396
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
397
| microblaze-* | microblazeel-* \
393
398
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
395
400
| mips64-* | mips64el-* \
403
408
| mips64vr5900-* | mips64vr5900el-* \
404
409
| mipsisa32-* | mipsisa32el-* \
405
410
| mipsisa32r2-* | mipsisa32r2el-* \
411
| mipsisa32r6-* | mipsisa32r6el-* \
406
412
| mipsisa64-* | mipsisa64el-* \
407
413
| mipsisa64r2-* | mipsisa64r2el-* \
414
| mipsisa64r6-* | mipsisa64r6el-* \
408
415
| mipsisa64sb1-* | mipsisa64sb1el-* \
409
416
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
417
| mipsr5900-* | mipsr5900el-* \
410
418
| mipstx39-* | mipstx39el-* \
414
422
| nds32-* | nds32le-* | nds32be-* \
423
| nios-* | nios2-* | nios2eb-* | nios2el-* \
416
424
| none-* | np1-* | ns16k-* | ns32k-* \
419
428
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
420
429
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
1005
1026
ppc64) basic_machine=powerpc64-unknown
1007
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1028
ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1009
1030
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
1010
1031
basic_machine=powerpc64le-unknown
1346
1371
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1347
1372
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1348
1373
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1349
| -sym* | -kopensolaris* \
1374
| -sym* | -kopensolaris* | -plan9* \
1350
1375
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1351
1376
| -aos* | -aros* \
1352
1377
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1353
1378
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1354
1379
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1355
| -openbsd* | -solidbsd* \
1380
| -bitrig* | -openbsd* | -solidbsd* \
1356
1381
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1357
1382
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1358
1383
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1359
1384
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1360
1385
| -chorusos* | -chorusrdb* | -cegcc* \
1361
1386
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1362
| -mingw32* | -linux-gnu* | -linux-android* \
1363
| -linux-newlib* | -linux-uclibc* \
1364
| -uxpv* | -beos* | -mpeix* | -udk* \
1387
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1388
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
1389
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1365
1390
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1366
1391
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1367
1392
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1368
1393
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1369
1394
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1370
1395
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1371
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1396
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1372
1397
# Remember, each alternative MUST END IN *, to match a version number.