ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/config.guess
(Generate patch)

Comparing rxvt-unicode/config.guess (file contents):
Revision 1.5 by sf-exg, Tue May 31 18:41:03 2011 UTC vs.
Revision 1.8 by sf-exg, Fri May 23 22:30:35 2014 UTC

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,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5# 2011 Free Software Foundation, Inc. 3# Copyright 1992-2014 Free Software Foundation, Inc.
6 4
7timestamp='2011-05-11' 5timestamp='2014-03-23'
8 6
9# 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
10# 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
11# the Free Software Foundation; either version 2 of the License, or 9# the Free Software Foundation; either version 3 of the License, or
12# (at your option) any later version. 10# (at your option) any later version.
13# 11#
14# This program is distributed in the hope that it will be useful, but 12# This program is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of 13# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# General Public License for more details. 15# General Public License for more details.
18# 16#
19# You should have received a copy of the GNU General Public License 17# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software 18# along with this program; if not, see <http://www.gnu.org/licenses/>.
21# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22# 02110-1301, USA.
23# 19#
24# As a special exception to the GNU General Public License, if you 20# As a special exception to the GNU General Public License, if you
25# distribute this file as part of a program that contains a 21# distribute this file as part of a program that contains a
26# configuration script generated by Autoconf, you may include it under 22# configuration script generated by Autoconf, you may include it under
27# the same distribution terms that you use for the rest of that program. 23# the same distribution terms that you use for the rest of that
28 24# program. This Exception is an additional permission under section 7
29 25# of the GNU General Public License, version 3 ("GPLv3").
30# Originally written by Per Bothner. Please send patches (context
31# diff format) to <config-patches@gnu.org> and include a ChangeLog
32# entry.
33# 26#
34# This script attempts to guess a canonical system name similar to 27# Originally written by Per Bothner.
35# config.sub. If it succeeds, it prints the system name on stdout, and
36# exits with 0. Otherwise, it exits with 1.
37# 28#
38# You can get the latest version of this script from: 29# You can get the latest version of this script from:
39# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 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.
33
40 34
41me=`echo "$0" | sed -e 's,.*/,,'` 35me=`echo "$0" | sed -e 's,.*/,,'`
42 36
43usage="\ 37usage="\
44Usage: $0 [OPTION] 38Usage: $0 [OPTION]
54 48
55version="\ 49version="\
56GNU config.guess ($timestamp) 50GNU config.guess ($timestamp)
57 51
58Originally written by Per Bothner. 52Originally written by Per Bothner.
59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 53Copyright 1992-2014 Free Software Foundation, Inc.
602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
61Software Foundation, Inc.
62 54
63This is free software; see the source for copying conditions. There is NO 55This is free software; see the source for copying conditions. There is NO
64warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 56warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
65 57
66help=" 58help="
138UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 130UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
139UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 131UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
140UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 132UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
141UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 133UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
142 134
135case "${UNAME_SYSTEM}" in
136Linux|GNU|GNU/*)
137 # If the system lacks a compiler, then just pick glibc.
138 # We could probably try harder.
139 LIBC=gnu
140
141 eval $set_cc_for_build
142 cat <<-EOF > $dummy.c
143 #include <features.h>
144 #if defined(__UCLIBC__)
145 LIBC=uclibc
146 #elif defined(__dietlibc__)
147 LIBC=dietlibc
148 #else
149 LIBC=gnu
150 #endif
151 EOF
152 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
153 ;;
154esac
155
143# Note: order is significant - the case branches are not exclusive. 156# Note: order is significant - the case branches are not exclusive.
144 157
145case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 158case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
146 *:NetBSD:*:*) 159 *:NetBSD:*:*)
147 # NetBSD (nbsd) targets should (where applicable) match one or 160 # NetBSD (nbsd) targets should (where applicable) match one or
148 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 161 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
149 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 162 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
150 # switched to ELF, *-*-netbsd* would select the old 163 # switched to ELF, *-*-netbsd* would select the old
151 # object file format. This provides both forward 164 # object file format. This provides both forward
152 # compatibility and a consistent mechanism for selecting the 165 # compatibility and a consistent mechanism for selecting the
153 # object file format. 166 # object file format.
199 esac 212 esac
200 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 213 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
201 # contains redundant information, the shorter form: 214 # contains redundant information, the shorter form:
202 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 215 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
203 echo "${machine}-${os}${release}" 216 echo "${machine}-${os}${release}"
217 exit ;;
218 *:Bitrig:*:*)
219 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
220 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
204 exit ;; 221 exit ;;
205 *:OpenBSD:*:*) 222 *:OpenBSD:*:*)
206 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 223 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
207 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 224 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
208 exit ;; 225 exit ;;
302 echo powerpc-ibm-os400 319 echo powerpc-ibm-os400
303 exit ;; 320 exit ;;
304 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 321 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
305 echo arm-acorn-riscix${UNAME_RELEASE} 322 echo arm-acorn-riscix${UNAME_RELEASE}
306 exit ;; 323 exit ;;
307 arm:riscos:*:*|arm:RISCOS:*:*) 324 arm*:riscos:*:*|arm*:RISCOS:*:*)
308 echo arm-unknown-riscos 325 echo arm-unknown-riscos
309 exit ;; 326 exit ;;
310 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 327 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
311 echo hppa1.1-hitachi-hiuxmpp 328 echo hppa1.1-hitachi-hiuxmpp
312 exit ;; 329 exit ;;
790 exit ;; 807 exit ;;
791 *:BSD/OS:*:*) 808 *:BSD/OS:*:*)
792 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 809 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
793 exit ;; 810 exit ;;
794 *:FreeBSD:*:*) 811 *:FreeBSD:*:*)
812 UNAME_PROCESSOR=`/usr/bin/uname -p`
795 case ${UNAME_MACHINE} in 813 case ${UNAME_PROCESSOR} in
796 pc98)
797 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798 amd64) 814 amd64)
799 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 815 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
800 *) 816 *)
801 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 817 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
802 esac 818 esac
803 exit ;; 819 exit ;;
804 i*:CYGWIN*:*) 820 i*:CYGWIN*:*)
805 echo ${UNAME_MACHINE}-pc-cygwin 821 echo ${UNAME_MACHINE}-pc-cygwin
806 exit ;; 822 exit ;;
823 *:MINGW64*:*)
824 echo ${UNAME_MACHINE}-pc-mingw64
825 exit ;;
807 *:MINGW*:*) 826 *:MINGW*:*)
808 echo ${UNAME_MACHINE}-pc-mingw32 827 echo ${UNAME_MACHINE}-pc-mingw32
828 exit ;;
829 *:MSYS*:*)
830 echo ${UNAME_MACHINE}-pc-msys
809 exit ;; 831 exit ;;
810 i*:windows32*:*) 832 i*:windows32*:*)
811 # uname -m includes "-pc" on this system. 833 # uname -m includes "-pc" on this system.
812 echo ${UNAME_MACHINE}-mingw32 834 echo ${UNAME_MACHINE}-mingw32
813 exit ;; 835 exit ;;
850 prep*:SunOS:5.*:*) 872 prep*:SunOS:5.*:*)
851 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 873 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
852 exit ;; 874 exit ;;
853 *:GNU:*:*) 875 *:GNU:*:*)
854 # the GNU system 876 # the GNU system
855 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 877 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
856 exit ;; 878 exit ;;
857 *:GNU/*:*:*) 879 *:GNU/*:*:*)
858 # other systems with GNU libc and userland 880 # other systems with GNU libc and userland
859 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 881 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
860 exit ;; 882 exit ;;
861 i*86:Minix:*:*) 883 i*86:Minix:*:*)
862 echo ${UNAME_MACHINE}-pc-minix 884 echo ${UNAME_MACHINE}-pc-minix
885 exit ;;
886 aarch64:Linux:*:*)
887 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
888 exit ;;
889 aarch64_be:Linux:*:*)
890 UNAME_MACHINE=aarch64_be
891 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
863 exit ;; 892 exit ;;
864 alpha:Linux:*:*) 893 alpha:Linux:*:*)
865 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 894 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
866 EV5) UNAME_MACHINE=alphaev5 ;; 895 EV5) UNAME_MACHINE=alphaev5 ;;
867 EV56) UNAME_MACHINE=alphaev56 ;; 896 EV56) UNAME_MACHINE=alphaev56 ;;
870 EV6) UNAME_MACHINE=alphaev6 ;; 899 EV6) UNAME_MACHINE=alphaev6 ;;
871 EV67) UNAME_MACHINE=alphaev67 ;; 900 EV67) UNAME_MACHINE=alphaev67 ;;
872 EV68*) UNAME_MACHINE=alphaev68 ;; 901 EV68*) UNAME_MACHINE=alphaev68 ;;
873 esac 902 esac
874 objdump --private-headers /bin/sh | grep -q ld.so.1 903 objdump --private-headers /bin/sh | grep -q ld.so.1
875 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 904 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
876 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 905 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
906 exit ;;
907 arc:Linux:*:* | arceb:Linux:*:*)
908 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
877 exit ;; 909 exit ;;
878 arm*:Linux:*:*) 910 arm*:Linux:*:*)
879 eval $set_cc_for_build 911 eval $set_cc_for_build
880 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 912 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
881 | grep -q __ARM_EABI__ 913 | grep -q __ARM_EABI__
882 then 914 then
883 echo ${UNAME_MACHINE}-unknown-linux-gnu 915 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
884 else 916 else
885 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 917 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
886 | grep -q __ARM_PCS_VFP 918 | grep -q __ARM_PCS_VFP
887 then 919 then
888 echo ${UNAME_MACHINE}-unknown-linux-gnueabi 920 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
889 else 921 else
890 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf 922 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
891 fi 923 fi
892 fi 924 fi
893 exit ;; 925 exit ;;
894 avr32*:Linux:*:*) 926 avr32*:Linux:*:*)
895 echo ${UNAME_MACHINE}-unknown-linux-gnu 927 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
896 exit ;; 928 exit ;;
897 cris:Linux:*:*) 929 cris:Linux:*:*)
898 echo cris-axis-linux-gnu 930 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
899 exit ;; 931 exit ;;
900 crisv32:Linux:*:*) 932 crisv32:Linux:*:*)
901 echo crisv32-axis-linux-gnu 933 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
902 exit ;; 934 exit ;;
903 frv:Linux:*:*) 935 frv:Linux:*:*)
904 echo frv-unknown-linux-gnu 936 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
937 exit ;;
938 hexagon:Linux:*:*)
939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
905 exit ;; 940 exit ;;
906 i*86:Linux:*:*) 941 i*86:Linux:*:*)
907 LIBC=gnu
908 eval $set_cc_for_build
909 sed 's/^ //' << EOF >$dummy.c
910 #ifdef __dietlibc__
911 LIBC=dietlibc
912 #endif
913EOF
914 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
915 echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 942 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
916 exit ;; 943 exit ;;
917 ia64:Linux:*:*) 944 ia64:Linux:*:*)
918 echo ${UNAME_MACHINE}-unknown-linux-gnu 945 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
919 exit ;; 946 exit ;;
920 m32r*:Linux:*:*) 947 m32r*:Linux:*:*)
921 echo ${UNAME_MACHINE}-unknown-linux-gnu 948 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
922 exit ;; 949 exit ;;
923 m68*:Linux:*:*) 950 m68*:Linux:*:*)
924 echo ${UNAME_MACHINE}-unknown-linux-gnu 951 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
925 exit ;; 952 exit ;;
926 mips:Linux:*:* | mips64:Linux:*:*) 953 mips:Linux:*:* | mips64:Linux:*:*)
927 eval $set_cc_for_build 954 eval $set_cc_for_build
928 sed 's/^ //' << EOF >$dummy.c 955 sed 's/^ //' << EOF >$dummy.c
929 #undef CPU 956 #undef CPU
938 CPU= 965 CPU=
939 #endif 966 #endif
940 #endif 967 #endif
941EOF 968EOF
942 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 969 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
943 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 970 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
944 ;; 971 ;;
945 or32:Linux:*:*) 972 openrisc*:Linux:*:*)
946 echo or32-unknown-linux-gnu 973 echo or1k-unknown-linux-${LIBC}
974 exit ;;
975 or32:Linux:*:* | or1k*:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
947 exit ;; 977 exit ;;
948 padre:Linux:*:*) 978 padre:Linux:*:*)
949 echo sparc-unknown-linux-gnu 979 echo sparc-unknown-linux-${LIBC}
950 exit ;; 980 exit ;;
951 parisc64:Linux:*:* | hppa64:Linux:*:*) 981 parisc64:Linux:*:* | hppa64:Linux:*:*)
952 echo hppa64-unknown-linux-gnu 982 echo hppa64-unknown-linux-${LIBC}
953 exit ;; 983 exit ;;
954 parisc:Linux:*:* | hppa:Linux:*:*) 984 parisc:Linux:*:* | hppa:Linux:*:*)
955 # Look for CPU level 985 # Look for CPU level
956 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 986 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
957 PA7*) echo hppa1.1-unknown-linux-gnu ;; 987 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
958 PA8*) echo hppa2.0-unknown-linux-gnu ;; 988 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
959 *) echo hppa-unknown-linux-gnu ;; 989 *) echo hppa-unknown-linux-${LIBC} ;;
960 esac 990 esac
961 exit ;; 991 exit ;;
962 ppc64:Linux:*:*) 992 ppc64:Linux:*:*)
963 echo powerpc64-unknown-linux-gnu 993 echo powerpc64-unknown-linux-${LIBC}
964 exit ;; 994 exit ;;
965 ppc:Linux:*:*) 995 ppc:Linux:*:*)
966 echo powerpc-unknown-linux-gnu 996 echo powerpc-unknown-linux-${LIBC}
997 exit ;;
998 ppc64le:Linux:*:*)
999 echo powerpc64le-unknown-linux-${LIBC}
1000 exit ;;
1001 ppcle:Linux:*:*)
1002 echo powerpcle-unknown-linux-${LIBC}
967 exit ;; 1003 exit ;;
968 s390:Linux:*:* | s390x:Linux:*:*) 1004 s390:Linux:*:* | s390x:Linux:*:*)
969 echo ${UNAME_MACHINE}-ibm-linux 1005 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
970 exit ;; 1006 exit ;;
971 sh64*:Linux:*:*) 1007 sh64*:Linux:*:*)
972 echo ${UNAME_MACHINE}-unknown-linux-gnu 1008 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
973 exit ;; 1009 exit ;;
974 sh*:Linux:*:*) 1010 sh*:Linux:*:*)
975 echo ${UNAME_MACHINE}-unknown-linux-gnu 1011 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
976 exit ;; 1012 exit ;;
977 sparc:Linux:*:* | sparc64:Linux:*:*) 1013 sparc:Linux:*:* | sparc64:Linux:*:*)
978 echo ${UNAME_MACHINE}-unknown-linux-gnu 1014 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
979 exit ;; 1015 exit ;;
980 tile*:Linux:*:*) 1016 tile*:Linux:*:*)
981 echo ${UNAME_MACHINE}-unknown-linux-gnu 1017 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
982 exit ;; 1018 exit ;;
983 vax:Linux:*:*) 1019 vax:Linux:*:*)
984 echo ${UNAME_MACHINE}-dec-linux-gnu 1020 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
985 exit ;; 1021 exit ;;
986 x86_64:Linux:*:*) 1022 x86_64:Linux:*:*)
987 echo x86_64-unknown-linux-gnu 1023 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
988 exit ;; 1024 exit ;;
989 xtensa*:Linux:*:*) 1025 xtensa*:Linux:*:*)
990 echo ${UNAME_MACHINE}-unknown-linux-gnu 1026 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
991 exit ;; 1027 exit ;;
992 i*86:DYNIX/ptx:4*:*) 1028 i*86:DYNIX/ptx:4*:*)
993 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1029 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
994 # earlier versions are messed up and put the nodename in both 1030 # earlier versions are messed up and put the nodename in both
995 # sysname and nodename. 1031 # sysname and nodename.
1189 echo i586-pc-beos 1225 echo i586-pc-beos
1190 exit ;; 1226 exit ;;
1191 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1227 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1192 echo i586-pc-haiku 1228 echo i586-pc-haiku
1193 exit ;; 1229 exit ;;
1230 x86_64:Haiku:*:*)
1231 echo x86_64-unknown-haiku
1232 exit ;;
1194 SX-4:SUPER-UX:*:*) 1233 SX-4:SUPER-UX:*:*)
1195 echo sx4-nec-superux${UNAME_RELEASE} 1234 echo sx4-nec-superux${UNAME_RELEASE}
1196 exit ;; 1235 exit ;;
1197 SX-5:SUPER-UX:*:*) 1236 SX-5:SUPER-UX:*:*)
1198 echo sx5-nec-superux${UNAME_RELEASE} 1237 echo sx5-nec-superux${UNAME_RELEASE}
1215 *:Rhapsody:*:*) 1254 *:Rhapsody:*:*)
1216 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1255 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1217 exit ;; 1256 exit ;;
1218 *:Darwin:*:*) 1257 *:Darwin:*:*)
1219 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1258 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1220 case $UNAME_PROCESSOR in
1221 i386)
1222 eval $set_cc_for_build 1259 eval $set_cc_for_build
1260 if test "$UNAME_PROCESSOR" = unknown ; then
1261 UNAME_PROCESSOR=powerpc
1262 fi
1263 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1223 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1264 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1224 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1265 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1225 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1266 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1226 grep IS_64BIT_ARCH >/dev/null 1267 grep IS_64BIT_ARCH >/dev/null
1227 then 1268 then
1269 case $UNAME_PROCESSOR in
1270 i386) UNAME_PROCESSOR=x86_64 ;;
1271 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1272 esac
1273 fi
1274 fi
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.
1228 UNAME_PROCESSOR="x86_64" 1282 UNAME_PROCESSOR=x86_64
1229 fi 1283 fi
1230 fi ;;
1231 unknown) UNAME_PROCESSOR=powerpc ;;
1232 esac
1233 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1284 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1234 exit ;; 1285 exit ;;
1235 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1286 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1236 UNAME_PROCESSOR=`uname -p` 1287 UNAME_PROCESSOR=`uname -p`
1237 if test "$UNAME_PROCESSOR" = "x86"; then 1288 if test "$UNAME_PROCESSOR" = "x86"; then
1244 echo i386-pc-qnx 1295 echo i386-pc-qnx
1245 exit ;; 1296 exit ;;
1246 NEO-?:NONSTOP_KERNEL:*:*) 1297 NEO-?:NONSTOP_KERNEL:*:*)
1247 echo neo-tandem-nsk${UNAME_RELEASE} 1298 echo neo-tandem-nsk${UNAME_RELEASE}
1248 exit ;; 1299 exit ;;
1249 NSE-?:NONSTOP_KERNEL:*:*) 1300 NSE-*:NONSTOP_KERNEL:*:*)
1250 echo nse-tandem-nsk${UNAME_RELEASE} 1301 echo nse-tandem-nsk${UNAME_RELEASE}
1251 exit ;; 1302 exit ;;
1252 NSR-?:NONSTOP_KERNEL:*:*) 1303 NSR-?:NONSTOP_KERNEL:*:*)
1253 echo nsr-tandem-nsk${UNAME_RELEASE} 1304 echo nsr-tandem-nsk${UNAME_RELEASE}
1254 exit ;; 1305 exit ;;
1313 echo ${UNAME_MACHINE}-pc-rdos 1364 echo ${UNAME_MACHINE}-pc-rdos
1314 exit ;; 1365 exit ;;
1315 i*86:AROS:*:*) 1366 i*86:AROS:*:*)
1316 echo ${UNAME_MACHINE}-pc-aros 1367 echo ${UNAME_MACHINE}-pc-aros
1317 exit ;; 1368 exit ;;
1369 x86_64:VMkernel:*:*)
1370 echo ${UNAME_MACHINE}-unknown-esx
1371 exit ;;
1318esac 1372esac
1319
1320#echo '(No uname command or uname output not recognized.)' 1>&2
1321#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1322
1323eval $set_cc_for_build
1324cat >$dummy.c <<EOF
1325#ifdef _SEQUENT_
1326# include <sys/types.h>
1327# include <sys/utsname.h>
1328#endif
1329main ()
1330{
1331#if defined (sony)
1332#if defined (MIPSEB)
1333 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1334 I don't know.... */
1335 printf ("mips-sony-bsd\n"); exit (0);
1336#else
1337#include <sys/param.h>
1338 printf ("m68k-sony-newsos%s\n",
1339#ifdef NEWSOS4
1340 "4"
1341#else
1342 ""
1343#endif
1344 ); exit (0);
1345#endif
1346#endif
1347
1348#if defined (__arm) && defined (__acorn) && defined (__unix)
1349 printf ("arm-acorn-riscix\n"); exit (0);
1350#endif
1351
1352#if defined (hp300) && !defined (hpux)
1353 printf ("m68k-hp-bsd\n"); exit (0);
1354#endif
1355
1356#if defined (NeXT)
1357#if !defined (__ARCHITECTURE__)
1358#define __ARCHITECTURE__ "m68k"
1359#endif
1360 int version;
1361 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1362 if (version < 4)
1363 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1364 else
1365 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1366 exit (0);
1367#endif
1368
1369#if defined (MULTIMAX) || defined (n16)
1370#if defined (UMAXV)
1371 printf ("ns32k-encore-sysv\n"); exit (0);
1372#else
1373#if defined (CMU)
1374 printf ("ns32k-encore-mach\n"); exit (0);
1375#else
1376 printf ("ns32k-encore-bsd\n"); exit (0);
1377#endif
1378#endif
1379#endif
1380
1381#if defined (__386BSD__)
1382 printf ("i386-pc-bsd\n"); exit (0);
1383#endif
1384
1385#if defined (sequent)
1386#if defined (i386)
1387 printf ("i386-sequent-dynix\n"); exit (0);
1388#endif
1389#if defined (ns32000)
1390 printf ("ns32k-sequent-dynix\n"); exit (0);
1391#endif
1392#endif
1393
1394#if defined (_SEQUENT_)
1395 struct utsname un;
1396
1397 uname(&un);
1398
1399 if (strncmp(un.version, "V2", 2) == 0) {
1400 printf ("i386-sequent-ptx2\n"); exit (0);
1401 }
1402 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1403 printf ("i386-sequent-ptx1\n"); exit (0);
1404 }
1405 printf ("i386-sequent-ptx\n"); exit (0);
1406
1407#endif
1408
1409#if defined (vax)
1410# if !defined (ultrix)
1411# include <sys/param.h>
1412# if defined (BSD)
1413# if BSD == 43
1414 printf ("vax-dec-bsd4.3\n"); exit (0);
1415# else
1416# if BSD == 199006
1417 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1418# else
1419 printf ("vax-dec-bsd\n"); exit (0);
1420# endif
1421# endif
1422# else
1423 printf ("vax-dec-bsd\n"); exit (0);
1424# endif
1425# else
1426 printf ("vax-dec-ultrix\n"); exit (0);
1427# endif
1428#endif
1429
1430#if defined (alliant) && defined (i860)
1431 printf ("i860-alliant-bsd\n"); exit (0);
1432#endif
1433
1434 exit (1);
1435}
1436EOF
1437
1438$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1439 { echo "$SYSTEM_NAME"; exit; }
1440
1441# Apollos put the system type in the environment.
1442
1443test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1444
1445# Convex versions that predate uname can use getsysinfo(1)
1446
1447if [ -x /usr/convex/getsysinfo ]
1448then
1449 case `getsysinfo -f cpu_type` in
1450 c1*)
1451 echo c1-convex-bsd
1452 exit ;;
1453 c2*)
1454 if getsysinfo -f scalar_acc
1455 then echo c32-convex-bsd
1456 else echo c2-convex-bsd
1457 fi
1458 exit ;;
1459 c34*)
1460 echo c34-convex-bsd
1461 exit ;;
1462 c38*)
1463 echo c38-convex-bsd
1464 exit ;;
1465 c4*)
1466 echo c4-convex-bsd
1467 exit ;;
1468 esac
1469fi
1470 1373
1471cat >&2 <<EOF 1374cat >&2 <<EOF
1472$0: unable to guess system type 1375$0: unable to guess system type
1473 1376
1474This script, last modified $timestamp, has failed to recognize 1377This script, last modified $timestamp, has failed to recognize

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines