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-2014 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
# along with this program; if not, write to the Free Software
25
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
18
# along with this program; if not, see <http://www.gnu.org/licenses/>.
28
20
# As a special exception to the GNU General Public License, if you
29
21
# distribute this file as part of a program that contains a
30
22
# configuration script generated by Autoconf, you may include it under
31
# the same distribution terms that you use for the rest of that program.
34
# Please send patches to <config-patches@gnu.org>. Submit a context
35
# 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 with a ChangeLog entry to config-patches@gnu.org.
37
30
# Configuration subroutine to validate and canonicalize a configuration type.
38
31
# Supply the specified configuration type as an argument.
76
69
GNU config.sub ($timestamp)
78
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
79
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
80
Free Software Foundation, Inc.
71
Copyright 1992-2014 Free Software Foundation, Inc.
82
73
This is free software; see the source for copying conditions. There is NO
83
74
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
125
116
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
126
117
case $maybe_os in
127
118
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
128
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
119
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
129
120
knetbsd*-gnu* | netbsd*-gnu* | \
130
121
kopensolaris*-gnu* | \
131
122
storm-chaos* | os2-emx* | rtmk-nova*)
133
124
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
128
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
136
131
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
137
132
if [ $basic_machine != $1 ]
278
283
| mips64vr5900 | mips64vr5900el \
279
284
| mipsisa32 | mipsisa32el \
280
285
| mipsisa32r2 | mipsisa32r2el \
286
| mipsisa32r6 | mipsisa32r6el \
281
287
| mipsisa64 | mipsisa64el \
282
288
| mipsisa64r2 | mipsisa64r2el \
289
| mipsisa64r6 | mipsisa64r6el \
283
290
| mipsisa64sb1 | mipsisa64sb1el \
284
291
| mipsisa64sr71k | mipsisa64sr71kel \
292
| mipsr5900 | mipsr5900el \
285
293
| mipstx39 | mipstx39el \
286
294
| mn10200 | mn10300 \
290
298
| nds32 | nds32le | nds32be \
299
| nios | nios2 | nios2eb | nios2el \
292
300
| ns16k | ns32k \
301
| open8 | or1k | or1knd | or32 \
295
302
| pdp10 | pdp11 | pj | pjl \
296
303
| powerpc | powerpc64 | powerpc64le | powerpcle \
355
365
# Recognize the basic CPU types with company name.
368
| aarch64-* | aarch64_be-* \
358
369
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
359
370
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
360
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
371
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
361
372
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
362
373
| avr-* | avr32-* \
363
374
| be32-* | be64-* \
364
375
| bfin-* | bs2000-* \
365
376
| c[123]* | c30-* | [cjt]90-* | c4x-* \
366
| clipper-* | craynv-* | cydra-* \
377
| c8051-* | clipper-* | craynv-* | cydra-* \
367
378
| d10v-* | d30v-* | dlx-* \
369
380
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
373
384
| i*86-* | i860-* | i960-* | ia64-* \
374
385
| ip2k-* | iq2000-* \
375
387
| le32-* | le64-* \
377
389
| m32c-* | m32r-* | m32rle-* \
378
390
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
379
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
391
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
392
| microblaze-* | microblazeel-* \
380
393
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
382
395
| mips64-* | mips64el-* \
390
403
| mips64vr5900-* | mips64vr5900el-* \
391
404
| mipsisa32-* | mipsisa32el-* \
392
405
| mipsisa32r2-* | mipsisa32r2el-* \
406
| mipsisa32r6-* | mipsisa32r6el-* \
393
407
| mipsisa64-* | mipsisa64el-* \
394
408
| mipsisa64r2-* | mipsisa64r2el-* \
409
| mipsisa64r6-* | mipsisa64r6el-* \
395
410
| mipsisa64sb1-* | mipsisa64sb1el-* \
396
411
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
412
| mipsr5900-* | mipsr5900el-* \
397
413
| mipstx39-* | mipstx39el-* \
401
417
| nds32-* | nds32le-* | nds32be-* \
418
| nios-* | nios2-* | nios2eb-* | nios2el-* \
403
419
| none-* | np1-* | ns16k-* | ns32k-* \
406
423
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
407
424
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
1333
1362
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1334
1363
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1335
1364
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1336
| -sym* | -kopensolaris* \
1365
| -sym* | -kopensolaris* | -plan9* \
1337
1366
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1338
1367
| -aos* | -aros* \
1339
1368
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1340
1369
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1341
1370
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1342
| -openbsd* | -solidbsd* \
1371
| -bitrig* | -openbsd* | -solidbsd* \
1343
1372
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1344
1373
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1345
1374
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1346
1375
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1347
1376
| -chorusos* | -chorusrdb* | -cegcc* \
1348
1377
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1349
| -mingw32* | -linux-gnu* | -linux-android* \
1350
| -linux-newlib* | -linux-uclibc* \
1351
| -uxpv* | -beos* | -mpeix* | -udk* \
1378
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1379
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
1380
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1352
1381
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1353
1382
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1354
1383
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1355
1384
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1356
1385
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1357
1386
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1358
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1387
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
1359
1388
# Remember, each alternative MUST END IN *, to match a version number.