2
2
# Attempt to guess a canonical system name.
3
# Copyright 1992-2013 Free Software Foundation, Inc.
3
# Copyright 1992-2014 Free Software Foundation, Inc.
7
7
# This file is free software; you can redistribute it and/or modify it
8
8
# under the terms of the GNU General Public License as published by
50
50
GNU config.guess ($timestamp)
52
52
Originally written by Per Bothner.
53
Copyright 1992-2013 Free Software Foundation, Inc.
53
Copyright 1992-2014 Free Software Foundation, Inc.
55
55
This is free software; see the source for copying conditions. There is NO
56
56
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
969
969
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
970
970
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
973
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
973
echo or1k-unknown-linux-${LIBC}
975
or32:Linux:*:* | or1k*:Linux:*:*)
976
976
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1260
1260
if test "$UNAME_PROCESSOR" = unknown ; then
1261
1261
UNAME_PROCESSOR=powerpc
1263
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1264
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1265
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1266
grep IS_64BIT_ARCH >/dev/null
1268
case $UNAME_PROCESSOR in
1269
i386) UNAME_PROCESSOR=x86_64 ;;
1270
powerpc) UNAME_PROCESSOR=powerpc64 ;;
1263
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1264
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1265
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1266
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1267
grep IS_64BIT_ARCH >/dev/null
1269
case $UNAME_PROCESSOR in
1270
i386) UNAME_PROCESSOR=x86_64 ;;
1271
powerpc) UNAME_PROCESSOR=powerpc64 ;;
1275
elif test "$UNAME_PROCESSOR" = i386 ; then
1276
# Avoid executing cc on OS X 10.9, as it ships with a stub
1277
# that puts up a graphical alert prompting to install
1278
# developer tools. Any system running Mac OS X 10.7 or
1279
# later (Darwin 11 and later) is required to have a 64-bit
1280
# processor. This is not true of the ARM version of Darwin
1281
# that Apple uses in portable devices.
1282
UNAME_PROCESSOR=x86_64
1274
1284
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1364
eval $set_cc_for_build
1367
# include <sys/types.h>
1368
# include <sys/utsname.h>
1373
#if defined (MIPSEB)
1374
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1376
printf ("mips-sony-bsd\n"); exit (0);
1378
#include <sys/param.h>
1379
printf ("m68k-sony-newsos%s\n",
1389
#if defined (__arm) && defined (__acorn) && defined (__unix)
1390
printf ("arm-acorn-riscix\n"); exit (0);
1393
#if defined (hp300) && !defined (hpux)
1394
printf ("m68k-hp-bsd\n"); exit (0);
1398
#if !defined (__ARCHITECTURE__)
1399
#define __ARCHITECTURE__ "m68k"
1402
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1404
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1406
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1410
#if defined (MULTIMAX) || defined (n16)
1412
printf ("ns32k-encore-sysv\n"); exit (0);
1415
printf ("ns32k-encore-mach\n"); exit (0);
1417
printf ("ns32k-encore-bsd\n"); exit (0);
1422
#if defined (__386BSD__)
1423
printf ("i386-pc-bsd\n"); exit (0);
1426
#if defined (sequent)
1428
printf ("i386-sequent-dynix\n"); exit (0);
1430
#if defined (ns32000)
1431
printf ("ns32k-sequent-dynix\n"); exit (0);
1435
#if defined (_SEQUENT_)
1440
if (strncmp(un.version, "V2", 2) == 0) {
1441
printf ("i386-sequent-ptx2\n"); exit (0);
1443
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1444
printf ("i386-sequent-ptx1\n"); exit (0);
1446
printf ("i386-sequent-ptx\n"); exit (0);
1451
# if !defined (ultrix)
1452
# include <sys/param.h>
1455
printf ("vax-dec-bsd4.3\n"); exit (0);
1458
printf ("vax-dec-bsd4.3reno\n"); exit (0);
1460
printf ("vax-dec-bsd\n"); exit (0);
1464
printf ("vax-dec-bsd\n"); exit (0);
1467
printf ("vax-dec-ultrix\n"); exit (0);
1471
#if defined (alliant) && defined (i860)
1472
printf ("i860-alliant-bsd\n"); exit (0);
1479
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1480
{ echo "$SYSTEM_NAME"; exit; }
1482
# Apollos put the system type in the environment.
1484
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1486
# Convex versions that predate uname can use getsysinfo(1)
1488
if [ -x /usr/convex/getsysinfo ]
1490
case `getsysinfo -f cpu_type` in
1495
if getsysinfo -f scalar_acc
1496
then echo c32-convex-bsd
1497
else echo c2-convex-bsd
1513
1375
$0: unable to guess system type