The R Project SVN R

Rev

Rev 76338 | Rev 79807 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 76338 Rev 77299
Line 1... Line 1...
1
#! /bin/sh
1
#! /bin/sh
2
# Attempt to guess a canonical system name.
2
# Attempt to guess a canonical system name.
3
#   Copyright 1992-2019 Free Software Foundation, Inc.
3
#   Copyright 1992-2019 Free Software Foundation, Inc.
4
 
4
 
5
timestamp='2019-03-04'
5
timestamp='2019-09-10'
6
 
6
 
7
# This file is free software; you can redistribute it and/or modify it
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
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
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
10
# (at your option) any later version.
Line 260... Line 260...
260
	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
260
	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
261
	exit ;;
261
	exit ;;
262
    *:SolidBSD:*:*)
262
    *:SolidBSD:*:*)
263
	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
263
	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
264
	exit ;;
264
	exit ;;
-
 
265
    *:OS108:*:*)
-
 
266
	echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
-
 
267
	exit ;;
265
    macppc:MirBSD:*:*)
268
    macppc:MirBSD:*:*)
266
	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
269
	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
267
	exit ;;
270
	exit ;;
268
    *:MirBSD:*:*)
271
    *:MirBSD:*:*)
269
	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
272
	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
270
	exit ;;
273
	exit ;;
271
    *:Sortix:*:*)
274
    *:Sortix:*:*)
272
	echo "$UNAME_MACHINE"-unknown-sortix
275
	echo "$UNAME_MACHINE"-unknown-sortix
273
	exit ;;
276
	exit ;;
-
 
277
    *:Twizzler:*:*)
-
 
278
	echo "$UNAME_MACHINE"-unknown-twizzler
-
 
279
	exit ;;
274
    *:Redox:*:*)
280
    *:Redox:*:*)
275
	echo "$UNAME_MACHINE"-unknown-redox
281
	echo "$UNAME_MACHINE"-unknown-redox
276
	exit ;;
282
	exit ;;
277
    mips:OSF1:*.*)
283
    mips:OSF1:*.*)
278
        echo mips-dec-osf1
284
	echo mips-dec-osf1
279
        exit ;;
285
	exit ;;
280
    alpha:OSF1:*:*)
286
    alpha:OSF1:*:*)
281
	case $UNAME_RELEASE in
287
	case $UNAME_RELEASE in
282
	*4.0)
288
	*4.0)
283
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
289
		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
284
		;;
290
		;;
Line 1323... Line 1329...
1323
	exit ;;
1329
	exit ;;
1324
    *:Rhapsody:*:*)
1330
    *:Rhapsody:*:*)
1325
	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1331
	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
1326
	exit ;;
1332
	exit ;;
1327
    *:Darwin:*:*)
1333
    *:Darwin:*:*)
1328
	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1334
	UNAME_PROCESSOR=`uname -p`
1329
	set_cc_for_build
1335
	case $UNAME_PROCESSOR in
1330
	if test "$UNAME_PROCESSOR" = unknown ; then
1336
	    unknown) UNAME_PROCESSOR=powerpc ;;
-
 
1337
	esac
-
 
1338
	if command -v xcode-select > /dev/null 2> /dev/null && \
-
 
1339
		! xcode-select --print-path > /dev/null 2> /dev/null ; then
-
 
1340
	    # Avoid executing cc if there is no toolchain installed as
-
 
1341
	    # cc will be a stub that puts up a graphical alert
-
 
1342
	    # prompting the user to install developer tools.
1331
	    UNAME_PROCESSOR=powerpc
1343
	    CC_FOR_BUILD=no_compiler_found
-
 
1344
	else
-
 
1345
	    set_cc_for_build
1332
	fi
1346
	fi
1333
	if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
-
 
1334
	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1347
	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1335
		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1348
	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1336
		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1349
		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1337
		       grep IS_64BIT_ARCH >/dev/null
1350
		   grep IS_64BIT_ARCH >/dev/null
1338
		then
1351
	    then
1339
		    case $UNAME_PROCESSOR in
1352
		case $UNAME_PROCESSOR in
1340
			i386) UNAME_PROCESSOR=x86_64 ;;
1353
		    i386) UNAME_PROCESSOR=x86_64 ;;
1341
			powerpc) UNAME_PROCESSOR=powerpc64 ;;
1354
		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
1342
		    esac
1355
		esac
1343
		fi
1356
	    fi
1344
		# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1357
	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1345
		if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1358
	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1346
		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1359
		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1347
		       grep IS_PPC >/dev/null
1360
		   grep IS_PPC >/dev/null
1348
		then
1361
	    then
1349
		    UNAME_PROCESSOR=powerpc
1362
		UNAME_PROCESSOR=powerpc
1350
		fi
-
 
1351
	    fi
1363
	    fi
1352
	elif test "$UNAME_PROCESSOR" = i386 ; then
1364
	elif test "$UNAME_PROCESSOR" = i386 ; then
1353
	    # Avoid executing cc on OS X 10.9, as it ships with a stub
-
 
1354
	    # that puts up a graphical alert prompting to install
-
 
1355
	    # developer tools.  Any system running Mac OS X 10.7 or
-
 
1356
	    # later (Darwin 11 and later) is required to have a 64-bit
-
 
1357
	    # processor. This is not true of the ARM version of Darwin
-
 
1358
	    # that Apple uses in portable devices.
1365
	    # uname -m returns i386 or x86_64
1359
	    UNAME_PROCESSOR=x86_64
1366
	    UNAME_PROCESSOR=$UNAME_MACHINE
1360
	fi
1367
	fi
1361
	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1368
	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
1362
	exit ;;
1369
	exit ;;
1363
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1370
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1364
	UNAME_PROCESSOR=`uname -p`
1371
	UNAME_PROCESSOR=`uname -p`
Line 1466... Line 1473...
1466
cat > "$dummy.c" <<EOF
1473
cat > "$dummy.c" <<EOF
1467
#ifdef _SEQUENT_
1474
#ifdef _SEQUENT_
1468
#include <sys/types.h>
1475
#include <sys/types.h>
1469
#include <sys/utsname.h>
1476
#include <sys/utsname.h>
1470
#endif
1477
#endif
-
 
1478
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
-
 
1479
#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
-
 
1480
#include <signal.h>
-
 
1481
#if defined(_SIZE_T_) || defined(SIGLOST)
-
 
1482
#include <sys/utsname.h>
-
 
1483
#endif
-
 
1484
#endif
-
 
1485
#endif
1471
main ()
1486
main ()
1472
{
1487
{
1473
#if defined (sony)
1488
#if defined (sony)
1474
#if defined (MIPSEB)
1489
#if defined (MIPSEB)
1475
  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
1490
  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
Line 1553... Line 1568...
1553
#endif
1568
#endif
1554
#else
1569
#else
1555
  printf ("vax-dec-bsd\n"); exit (0);
1570
  printf ("vax-dec-bsd\n"); exit (0);
1556
#endif
1571
#endif
1557
#else
1572
#else
-
 
1573
#if defined(_SIZE_T_) || defined(SIGLOST)
-
 
1574
  struct utsname un;
-
 
1575
  uname (&un);
-
 
1576
  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
-
 
1577
#else
1558
  printf ("vax-dec-ultrix\n"); exit (0);
1578
  printf ("vax-dec-ultrix\n"); exit (0);
1559
#endif
1579
#endif
1560
#endif
1580
#endif
-
 
1581
#endif
1561
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1582
#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1562
#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1583
#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1563
#include <signal.h>
-
 
1564
#if defined(_SIZE_T_) /* >= ULTRIX4 */
1584
#if defined(_SIZE_T_) || defined(SIGLOST)
-
 
1585
  struct utsname *un;
-
 
1586
  uname (&un);
1565
  printf ("mips-dec-ultrix4\n"); exit (0);
1587
  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
1566
#else
1588
#else
1567
#if defined(ULTRIX3) || defined(ultrix3) || defined(SIGLOST)
-
 
1568
  printf ("mips-dec-ultrix3\n"); exit (0);
1589
  printf ("mips-dec-ultrix\n"); exit (0);
1569
#endif
-
 
1570
#endif
1590
#endif
1571
#endif
1591
#endif
1572
#endif
1592
#endif
1573
 
1593
 
1574
#if defined (alliant) && defined (i860)
1594
#if defined (alliant) && defined (i860)