| 1 |
|
#! /bin/sh |
| 2 |
|
# Attempt to guess a canonical system name. |
| 3 |
< |
# Copyright 1992-2013 Free Software Foundation, Inc. |
| 3 |
> |
# Copyright 1992-2014 Free Software Foundation, Inc. |
| 4 |
|
|
| 5 |
< |
timestamp='2013-11-29' |
| 5 |
> |
timestamp='2014-11-04' |
| 6 |
|
|
| 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 |
| 24 |
|
# program. This Exception is an additional permission under section 7 |
| 25 |
|
# of the GNU General Public License, version 3 ("GPLv3"). |
| 26 |
|
# |
| 27 |
< |
# Originally written by Per Bothner. |
| 27 |
> |
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. |
| 28 |
|
# |
| 29 |
|
# You can get the latest version of this script from: |
| 30 |
|
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD |
| 31 |
|
# |
| 32 |
< |
# Please send patches with a ChangeLog entry to config-patches@gnu.org. |
| 32 |
> |
# Please send patches to <config-patches@gnu.org>. |
| 33 |
|
|
| 34 |
|
|
| 35 |
|
me=`echo "$0" | sed -e 's,.*/,,'` |
| 50 |
|
GNU config.guess ($timestamp) |
| 51 |
|
|
| 52 |
|
Originally written by Per Bothner. |
| 53 |
< |
Copyright 1992-2013 Free Software Foundation, Inc. |
| 53 |
> |
Copyright 1992-2014 Free Software Foundation, Inc. |
| 54 |
|
|
| 55 |
|
This is free software; see the source for copying conditions. There is NO |
| 56 |
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
| 149 |
|
LIBC=gnu |
| 150 |
|
#endif |
| 151 |
|
EOF |
| 152 |
< |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` |
| 152 |
> |
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` |
| 153 |
|
;; |
| 154 |
|
esac |
| 155 |
|
|
| 579 |
|
else |
| 580 |
|
IBM_ARCH=powerpc |
| 581 |
|
fi |
| 582 |
< |
if [ -x /usr/bin/oslevel ] ; then |
| 583 |
< |
IBM_REV=`/usr/bin/oslevel` |
| 582 |
> |
if [ -x /usr/bin/lslpp ] ; then |
| 583 |
> |
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | |
| 584 |
> |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` |
| 585 |
|
else |
| 586 |
|
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} |
| 587 |
|
fi |
| 827 |
|
*:MINGW*:*) |
| 828 |
|
echo ${UNAME_MACHINE}-pc-mingw32 |
| 829 |
|
exit ;; |
| 830 |
< |
i*:MSYS*:*) |
| 830 |
> |
*:MSYS*:*) |
| 831 |
|
echo ${UNAME_MACHINE}-pc-msys |
| 832 |
|
exit ;; |
| 833 |
|
i*:windows32*:*) |
| 970 |
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` |
| 971 |
|
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } |
| 972 |
|
;; |
| 973 |
< |
or1k:Linux:*:*) |
| 974 |
< |
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 973 |
> |
openrisc*:Linux:*:*) |
| 974 |
> |
echo or1k-unknown-linux-${LIBC} |
| 975 |
|
exit ;; |
| 976 |
< |
or32:Linux:*:*) |
| 976 |
> |
or32:Linux:*:* | or1k*:Linux:*:*) |
| 977 |
|
echo ${UNAME_MACHINE}-unknown-linux-${LIBC} |
| 978 |
|
exit ;; |
| 979 |
|
padre:Linux:*:*) |
| 1372 |
|
exit ;; |
| 1373 |
|
esac |
| 1374 |
|
|
| 1374 |
– |
eval $set_cc_for_build |
| 1375 |
– |
cat >$dummy.c <<EOF |
| 1376 |
– |
#ifdef _SEQUENT_ |
| 1377 |
– |
# include <sys/types.h> |
| 1378 |
– |
# include <sys/utsname.h> |
| 1379 |
– |
#endif |
| 1380 |
– |
main () |
| 1381 |
– |
{ |
| 1382 |
– |
#if defined (sony) |
| 1383 |
– |
#if defined (MIPSEB) |
| 1384 |
– |
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, |
| 1385 |
– |
I don't know.... */ |
| 1386 |
– |
printf ("mips-sony-bsd\n"); exit (0); |
| 1387 |
– |
#else |
| 1388 |
– |
#include <sys/param.h> |
| 1389 |
– |
printf ("m68k-sony-newsos%s\n", |
| 1390 |
– |
#ifdef NEWSOS4 |
| 1391 |
– |
"4" |
| 1392 |
– |
#else |
| 1393 |
– |
"" |
| 1394 |
– |
#endif |
| 1395 |
– |
); exit (0); |
| 1396 |
– |
#endif |
| 1397 |
– |
#endif |
| 1398 |
– |
|
| 1399 |
– |
#if defined (__arm) && defined (__acorn) && defined (__unix) |
| 1400 |
– |
printf ("arm-acorn-riscix\n"); exit (0); |
| 1401 |
– |
#endif |
| 1402 |
– |
|
| 1403 |
– |
#if defined (hp300) && !defined (hpux) |
| 1404 |
– |
printf ("m68k-hp-bsd\n"); exit (0); |
| 1405 |
– |
#endif |
| 1406 |
– |
|
| 1407 |
– |
#if defined (NeXT) |
| 1408 |
– |
#if !defined (__ARCHITECTURE__) |
| 1409 |
– |
#define __ARCHITECTURE__ "m68k" |
| 1410 |
– |
#endif |
| 1411 |
– |
int version; |
| 1412 |
– |
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; |
| 1413 |
– |
if (version < 4) |
| 1414 |
– |
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); |
| 1415 |
– |
else |
| 1416 |
– |
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); |
| 1417 |
– |
exit (0); |
| 1418 |
– |
#endif |
| 1419 |
– |
|
| 1420 |
– |
#if defined (MULTIMAX) || defined (n16) |
| 1421 |
– |
#if defined (UMAXV) |
| 1422 |
– |
printf ("ns32k-encore-sysv\n"); exit (0); |
| 1423 |
– |
#else |
| 1424 |
– |
#if defined (CMU) |
| 1425 |
– |
printf ("ns32k-encore-mach\n"); exit (0); |
| 1426 |
– |
#else |
| 1427 |
– |
printf ("ns32k-encore-bsd\n"); exit (0); |
| 1428 |
– |
#endif |
| 1429 |
– |
#endif |
| 1430 |
– |
#endif |
| 1431 |
– |
|
| 1432 |
– |
#if defined (__386BSD__) |
| 1433 |
– |
printf ("i386-pc-bsd\n"); exit (0); |
| 1434 |
– |
#endif |
| 1435 |
– |
|
| 1436 |
– |
#if defined (sequent) |
| 1437 |
– |
#if defined (i386) |
| 1438 |
– |
printf ("i386-sequent-dynix\n"); exit (0); |
| 1439 |
– |
#endif |
| 1440 |
– |
#if defined (ns32000) |
| 1441 |
– |
printf ("ns32k-sequent-dynix\n"); exit (0); |
| 1442 |
– |
#endif |
| 1443 |
– |
#endif |
| 1444 |
– |
|
| 1445 |
– |
#if defined (_SEQUENT_) |
| 1446 |
– |
struct utsname un; |
| 1447 |
– |
|
| 1448 |
– |
uname(&un); |
| 1449 |
– |
|
| 1450 |
– |
if (strncmp(un.version, "V2", 2) == 0) { |
| 1451 |
– |
printf ("i386-sequent-ptx2\n"); exit (0); |
| 1452 |
– |
} |
| 1453 |
– |
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ |
| 1454 |
– |
printf ("i386-sequent-ptx1\n"); exit (0); |
| 1455 |
– |
} |
| 1456 |
– |
printf ("i386-sequent-ptx\n"); exit (0); |
| 1457 |
– |
|
| 1458 |
– |
#endif |
| 1459 |
– |
|
| 1460 |
– |
#if defined (vax) |
| 1461 |
– |
# if !defined (ultrix) |
| 1462 |
– |
# include <sys/param.h> |
| 1463 |
– |
# if defined (BSD) |
| 1464 |
– |
# if BSD == 43 |
| 1465 |
– |
printf ("vax-dec-bsd4.3\n"); exit (0); |
| 1466 |
– |
# else |
| 1467 |
– |
# if BSD == 199006 |
| 1468 |
– |
printf ("vax-dec-bsd4.3reno\n"); exit (0); |
| 1469 |
– |
# else |
| 1470 |
– |
printf ("vax-dec-bsd\n"); exit (0); |
| 1471 |
– |
# endif |
| 1472 |
– |
# endif |
| 1473 |
– |
# else |
| 1474 |
– |
printf ("vax-dec-bsd\n"); exit (0); |
| 1475 |
– |
# endif |
| 1476 |
– |
# else |
| 1477 |
– |
printf ("vax-dec-ultrix\n"); exit (0); |
| 1478 |
– |
# endif |
| 1479 |
– |
#endif |
| 1480 |
– |
|
| 1481 |
– |
#if defined (alliant) && defined (i860) |
| 1482 |
– |
printf ("i860-alliant-bsd\n"); exit (0); |
| 1483 |
– |
#endif |
| 1484 |
– |
|
| 1485 |
– |
exit (1); |
| 1486 |
– |
} |
| 1487 |
– |
EOF |
| 1488 |
– |
|
| 1489 |
– |
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && |
| 1490 |
– |
{ echo "$SYSTEM_NAME"; exit; } |
| 1491 |
– |
|
| 1492 |
– |
# Apollos put the system type in the environment. |
| 1493 |
– |
|
| 1494 |
– |
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } |
| 1495 |
– |
|
| 1496 |
– |
# Convex versions that predate uname can use getsysinfo(1) |
| 1497 |
– |
|
| 1498 |
– |
if [ -x /usr/convex/getsysinfo ] |
| 1499 |
– |
then |
| 1500 |
– |
case `getsysinfo -f cpu_type` in |
| 1501 |
– |
c1*) |
| 1502 |
– |
echo c1-convex-bsd |
| 1503 |
– |
exit ;; |
| 1504 |
– |
c2*) |
| 1505 |
– |
if getsysinfo -f scalar_acc |
| 1506 |
– |
then echo c32-convex-bsd |
| 1507 |
– |
else echo c2-convex-bsd |
| 1508 |
– |
fi |
| 1509 |
– |
exit ;; |
| 1510 |
– |
c34*) |
| 1511 |
– |
echo c34-convex-bsd |
| 1512 |
– |
exit ;; |
| 1513 |
– |
c38*) |
| 1514 |
– |
echo c38-convex-bsd |
| 1515 |
– |
exit ;; |
| 1516 |
– |
c4*) |
| 1517 |
– |
echo c4-convex-bsd |
| 1518 |
– |
exit ;; |
| 1519 |
– |
esac |
| 1520 |
– |
fi |
| 1521 |
– |
|
| 1375 |
|
cat >&2 <<EOF |
| 1376 |
|
$0: unable to guess system type |
| 1377 |
|
|