The R Project SVN R

Rev

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

Rev 26749 Rev 28188
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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4
#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5
 
5
 
6
timestamp='2003-10-03'
6
timestamp='2004-01-20'
7
 
7
 
8
# This file is free software; you can redistribute it and/or modify it
8
# This file is free software; you can redistribute it and/or modify it
9
# under the terms of the GNU General Public License as published by
9
# under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 2 of the License, or
10
# the Free Software Foundation; either version 2 of the License, or
11
# (at your option) any later version.
11
# (at your option) any later version.
Line 219... Line 219...
219
	echo m88k-unknown-openbsd${UNAME_RELEASE}
219
	echo m88k-unknown-openbsd${UNAME_RELEASE}
220
	exit 0 ;;
220
	exit 0 ;;
221
    mvmeppc:OpenBSD:*:*)
221
    mvmeppc:OpenBSD:*:*)
222
	echo powerpc-unknown-openbsd${UNAME_RELEASE}
222
	echo powerpc-unknown-openbsd${UNAME_RELEASE}
223
	exit 0 ;;
223
	exit 0 ;;
-
 
224
    pegasos:OpenBSD:*:*)
-
 
225
	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-
 
226
	exit 0 ;;
224
    pmax:OpenBSD:*:*)
227
    pmax:OpenBSD:*:*)
225
	echo mipsel-unknown-openbsd${UNAME_RELEASE}
228
	echo mipsel-unknown-openbsd${UNAME_RELEASE}
226
	exit 0 ;;
229
	exit 0 ;;
227
    sgi:OpenBSD:*:*)
230
    sgi:OpenBSD:*:*)
228
	echo mipseb-unknown-openbsd${UNAME_RELEASE}
231
	echo mipseb-unknown-openbsd${UNAME_RELEASE}
Line 305... Line 308...
305
	echo ${UNAME_MACHINE}-unknown-morphos
308
	echo ${UNAME_MACHINE}-unknown-morphos
306
	exit 0 ;;
309
	exit 0 ;;
307
    *:OS/390:*:*)
310
    *:OS/390:*:*)
308
	echo i370-ibm-openedition
311
	echo i370-ibm-openedition
309
	exit 0 ;;
312
	exit 0 ;;
-
 
313
    *:OS400:*:*)
-
 
314
        echo powerpc-ibm-os400
-
 
315
	exit 0 ;;
310
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
316
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
311
	echo arm-acorn-riscix${UNAME_RELEASE}
317
	echo arm-acorn-riscix${UNAME_RELEASE}
312
	exit 0;;
318
	exit 0;;
313
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
319
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
314
	echo hppa1.1-hitachi-hiuxmpp
320
	echo hppa1.1-hitachi-hiuxmpp
Line 740... Line 746...
740
	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
746
	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
741
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
747
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
742
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
748
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
743
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
749
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
744
        exit 0 ;;
750
        exit 0 ;;
-
 
751
    5000:UNIX_System_V:4.*:*)
-
 
752
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-
 
753
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-
 
754
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-
 
755
	exit 0 ;;
745
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
756
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
746
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
757
	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
747
	exit 0 ;;
758
	exit 0 ;;
748
    sparc*:BSD/OS:*:*)
759
    sparc*:BSD/OS:*:*)
749
	echo sparc-unknown-bsdi${UNAME_RELEASE}
760
	echo sparc-unknown-bsdi${UNAME_RELEASE}
750
	exit 0 ;;
761
	exit 0 ;;
751
    *:BSD/OS:*:*)
762
    *:BSD/OS:*:*)
752
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
763
	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
753
	exit 0 ;;
764
	exit 0 ;;
754
    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
765
    *:FreeBSD:*:*)
755
	# Determine whether the default compiler uses glibc.
766
	# Determine whether the default compiler uses glibc.
756
	eval $set_cc_for_build
767
	eval $set_cc_for_build
757
	sed 's/^	//' << EOF >$dummy.c
768
	sed 's/^	//' << EOF >$dummy.c
758
	#include <features.h>
769
	#include <features.h>
759
	#if __GLIBC__ >= 2
770
	#if __GLIBC__ >= 2
Line 761... Line 772...
761
	#else
772
	#else
762
	LIBC=
773
	LIBC=
763
	#endif
774
	#endif
764
EOF
775
EOF
765
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
776
	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
766
	# GNU/FreeBSD systems have a "k" prefix to indicate we are using
777
	# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
767
	# FreeBSD's kernel, but not the complete OS.
778
	# FreeBSD's kernel, but not the complete OS.
768
	case ${LIBC} in gnu) kernel_only='k' ;; esac
779
	case ${LIBC} in gnu) kernel_only='k' ;; esac
769
	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
780
	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
770
	exit 0 ;;
781
	exit 0 ;;
771
    i*:CYGWIN*:*)
782
    i*:CYGWIN*:*)
Line 797... Line 808...
797
	exit 0 ;;
808
	exit 0 ;;
798
    prep*:SunOS:5.*:*)
809
    prep*:SunOS:5.*:*)
799
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
810
	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
800
	exit 0 ;;
811
	exit 0 ;;
801
    *:GNU:*:*)
812
    *:GNU:*:*)
-
 
813
	# the GNU system
802
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
814
	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
803
	exit 0 ;;
815
	exit 0 ;;
-
 
816
    *:GNU/*:*:*)
-
 
817
	# other systems with GNU libc and userland
-
 
818
	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-
 
819
	exit 0 ;;
804
    i*86:Minix:*:*)
820
    i*86:Minix:*:*)
805
	echo ${UNAME_MACHINE}-pc-minix
821
	echo ${UNAME_MACHINE}-pc-minix
806
	exit 0 ;;
822
	exit 0 ;;
807
    arm*:Linux:*:*)
823
    arm*:Linux:*:*)
808
	echo ${UNAME_MACHINE}-unknown-linux-gnu
824
	echo ${UNAME_MACHINE}-unknown-linux-gnu
Line 979... Line 995...
979
	echo ${UNAME_MACHINE}-unknown-stop
995
	echo ${UNAME_MACHINE}-unknown-stop
980
	exit 0 ;;
996
	exit 0 ;;
981
    i*86:atheos:*:*)
997
    i*86:atheos:*:*)
982
	echo ${UNAME_MACHINE}-unknown-atheos
998
	echo ${UNAME_MACHINE}-unknown-atheos
983
	exit 0 ;;
999
	exit 0 ;;
-
 
1000
	i*86:syllable:*:*)
-
 
1001
	echo ${UNAME_MACHINE}-pc-syllable
-
 
1002
	exit 0 ;;
984
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1003
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
985
	echo i386-unknown-lynxos${UNAME_RELEASE}
1004
	echo i386-unknown-lynxos${UNAME_RELEASE}
986
	exit 0 ;;
1005
	exit 0 ;;
987
    i*86:*DOS:*:*)
1006
    i*86:*DOS:*:*)
988
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
1007
	echo ${UNAME_MACHINE}-pc-msdosdjgpp
Line 1050... Line 1069...
1050
    M680?0:D-NIX:5.3:*)
1069
    M680?0:D-NIX:5.3:*)
1051
	echo m68k-diab-dnix
1070
	echo m68k-diab-dnix
1052
	exit 0 ;;
1071
	exit 0 ;;
1053
    M68*:*:R3V[567]*:*)
1072
    M68*:*:R3V[567]*:*)
1054
	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1073
	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1055
    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
1074
    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
1056
	OS_REL=''
1075
	OS_REL=''
1057
	test -r /etc/.relid \
1076
	test -r /etc/.relid \
1058
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1077
	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1059
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1078
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1060
	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
1079
	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
Line 1165... Line 1184...
1165
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1184
	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1166
	exit 0 ;;
1185
	exit 0 ;;
1167
    *:QNX:*:4*)
1186
    *:QNX:*:4*)
1168
	echo i386-pc-qnx
1187
	echo i386-pc-qnx
1169
	exit 0 ;;
1188
	exit 0 ;;
1170
    NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
1189
    NSR-?:NONSTOP_KERNEL:*:*)
1171
	echo nsr-tandem-nsk${UNAME_RELEASE}
1190
	echo nsr-tandem-nsk${UNAME_RELEASE}
1172
	exit 0 ;;
1191
	exit 0 ;;
1173
    *:NonStop-UX:*:*)
1192
    *:NonStop-UX:*:*)
1174
	echo mips-compaq-nonstopux
1193
	echo mips-compaq-nonstopux
1175
	exit 0 ;;
1194
	exit 0 ;;
Line 1209... Line 1228...
1209
	echo pdp10-unknown-its
1228
	echo pdp10-unknown-its
1210
	exit 0 ;;
1229
	exit 0 ;;
1211
    SEI:*:*:SEIUX)
1230
    SEI:*:*:SEIUX)
1212
        echo mips-sei-seiux${UNAME_RELEASE}
1231
        echo mips-sei-seiux${UNAME_RELEASE}
1213
	exit 0 ;;
1232
	exit 0 ;;
-
 
1233
    *:DragonFly:*:*)
-
 
1234
	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-
 
1235
	exit 0 ;;
1214
esac
1236
esac
1215
 
1237
 
1216
#echo '(No uname command or uname output not recognized.)' 1>&2
1238
#echo '(No uname command or uname output not recognized.)' 1>&2
1217
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1239
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1218
 
1240