Deleted Added
sdiff udiff text old ( 249141 ) new ( 276605 )
full compact
1#! /bin/sh
2# Attempt to guess a canonical system name.
3# Copyright 1992-2013 Free Software Foundation, Inc.
4
5timestamp='2013-06-10'
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
9# the Free Software Foundation; either version 3 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful, but
13# WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15# General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, see <http://www.gnu.org/licenses/>.
19#
20# As a special exception to the GNU General Public License, if you
21# distribute this file as part of a program that contains a
22# configuration script generated by Autoconf, you may include it under
23# the same distribution terms that you use for the rest of that
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.
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.
33
34
35me=`echo "$0" | sed -e 's,.*/,,'`
36
37usage="\
38Usage: $0 [OPTION]
39
40Output the configuration name of the system \`$me' is run on.
41
42Operation modes:
43 -h, --help print this help, then exit
44 -t, --time-stamp print date of last modification, then exit
45 -v, --version print version number, then exit
46
47Report bugs and patches to <config-patches@gnu.org>."
48
49version="\
50GNU config.guess ($timestamp)
51
52Originally written by Per Bothner.
53Copyright 1992-2013 Free Software Foundation, Inc.
54
55This is free software; see the source for copying conditions. There is NO
56warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
57
58help="
59Try \`$me --help' for more information."
60
61# Parse command line

--- 65 unchanged lines hidden (view full) ---

127 PATH=$PATH:/.attbin ; export PATH
128fi
129
130UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
131UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
132UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
133UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
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'`
153 ;;
154esac
155
156# Note: order is significant - the case branches are not exclusive.
157
158case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
159 *:NetBSD:*:*)
160 # NetBSD (nbsd) targets should (where applicable) match one or
161 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
162 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
163 # switched to ELF, *-*-netbsd* would select the old

--- 46 unchanged lines hidden (view full) ---

210 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
211 ;;
212 esac
213 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
214 # contains redundant information, the shorter form:
215 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
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}
221 exit ;;
222 *:OpenBSD:*:*)
223 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
224 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
225 exit ;;
226 *:ekkoBSD:*:*)
227 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
228 exit ;;
229 *:SolidBSD:*:*)

--- 86 unchanged lines hidden (view full) ---

316 echo s390-ibm-zvmoe
317 exit ;;
318 *:OS400:*:*)
319 echo powerpc-ibm-os400
320 exit ;;
321 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
322 echo arm-acorn-riscix${UNAME_RELEASE}
323 exit ;;
324 arm*:riscos:*:*|arm*:RISCOS:*:*)
325 echo arm-unknown-riscos
326 exit ;;
327 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
328 echo hppa1.1-hitachi-hiuxmpp
329 exit ;;
330 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
331 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
332 if test "`(/bin/universe) 2>/dev/null`" = att ; then

--- 482 unchanged lines hidden (view full) ---

815 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
816 *)
817 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
818 esac
819 exit ;;
820 i*:CYGWIN*:*)
821 echo ${UNAME_MACHINE}-pc-cygwin
822 exit ;;
823 *:MINGW64*:*)
824 echo ${UNAME_MACHINE}-pc-mingw64
825 exit ;;
826 *:MINGW*:*)
827 echo ${UNAME_MACHINE}-pc-mingw32
828 exit ;;
829 i*:MSYS*:*)
830 echo ${UNAME_MACHINE}-pc-msys
831 exit ;;
832 i*:windows32*:*)
833 # uname -m includes "-pc" on this system.

--- 35 unchanged lines hidden (view full) ---

869 p*:CYGWIN*:*)
870 echo powerpcle-unknown-cygwin
871 exit ;;
872 prep*:SunOS:5.*:*)
873 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
874 exit ;;
875 *:GNU:*:*)
876 # the GNU system
877 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
878 exit ;;
879 *:GNU/*:*:*)
880 # other systems with GNU libc and userland
881 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
882 exit ;;
883 i*86: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}
892 exit ;;
893 alpha:Linux:*:*)
894 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
895 EV5) UNAME_MACHINE=alphaev5 ;;
896 EV56) UNAME_MACHINE=alphaev56 ;;
897 PCA56) UNAME_MACHINE=alphapca56 ;;
898 PCA57) UNAME_MACHINE=alphapca56 ;;
899 EV6) UNAME_MACHINE=alphaev6 ;;
900 EV67) UNAME_MACHINE=alphaev67 ;;
901 EV68*) UNAME_MACHINE=alphaev68 ;;
902 esac
903 objdump --private-headers /bin/sh | grep -q ld.so.1
904 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
905 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
906 exit ;;
907 arc:Linux:*:* | arceb:Linux:*:*)
908 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
909 exit ;;
910 arm*:Linux:*:*)
911 eval $set_cc_for_build
912 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
913 | grep -q __ARM_EABI__
914 then
915 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
916 else
917 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
918 | grep -q __ARM_PCS_VFP
919 then
920 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
921 else
922 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
923 fi
924 fi
925 exit ;;
926 avr32*:Linux:*:*)
927 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
928 exit ;;
929 cris:Linux:*:*)
930 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
931 exit ;;
932 crisv32:Linux:*:*)
933 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
934 exit ;;
935 frv:Linux:*:*)
936 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
937 exit ;;
938 hexagon:Linux:*:*)
939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
940 exit ;;
941 i*86:Linux:*:*)
942 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
943 exit ;;
944 ia64:Linux:*:*)
945 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
946 exit ;;
947 m32r*:Linux:*:*)
948 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
949 exit ;;
950 m68*:Linux:*:*)
951 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
952 exit ;;
953 mips:Linux:*:* | mips64:Linux:*:*)
954 eval $set_cc_for_build
955 sed 's/^ //' << EOF >$dummy.c
956 #undef CPU
957 #undef ${UNAME_MACHINE}
958 #undef ${UNAME_MACHINE}el
959 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
960 CPU=${UNAME_MACHINE}el
961 #else
962 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
963 CPU=${UNAME_MACHINE}
964 #else
965 CPU=
966 #endif
967 #endif
968EOF
969 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
970 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
971 ;;
972 or1k:Linux:*:*)
973 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
974 exit ;;
975 or32:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
977 exit ;;
978 padre:Linux:*:*)
979 echo sparc-unknown-linux-${LIBC}
980 exit ;;
981 parisc64:Linux:*:* | hppa64:Linux:*:*)
982 echo hppa64-unknown-linux-${LIBC}
983 exit ;;
984 parisc:Linux:*:* | hppa:Linux:*:*)
985 # Look for CPU level
986 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
987 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
988 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
989 *) echo hppa-unknown-linux-${LIBC} ;;
990 esac
991 exit ;;
992 ppc64:Linux:*:*)
993 echo powerpc64-unknown-linux-${LIBC}
994 exit ;;
995 ppc:Linux:*:*)
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}
1003 exit ;;
1004 s390:Linux:*:* | s390x:Linux:*:*)
1005 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1006 exit ;;
1007 sh64*:Linux:*:*)
1008 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1009 exit ;;
1010 sh*:Linux:*:*)
1011 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1012 exit ;;
1013 sparc:Linux:*:* | sparc64:Linux:*:*)
1014 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1015 exit ;;
1016 tile*:Linux:*:*)
1017 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1018 exit ;;
1019 vax:Linux:*:*)
1020 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1021 exit ;;
1022 x86_64:Linux:*:*)
1023 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1024 exit ;;
1025 xtensa*:Linux:*:*)
1026 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1027 exit ;;
1028 i*86:DYNIX/ptx:4*:*)
1029 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1030 # earlier versions are messed up and put the nodename in both
1031 # sysname and nodename.
1032 echo i386-sequent-sysv4
1033 exit ;;
1034 i*86:UNIX_SV:4.2MP:2.*)

--- 187 unchanged lines hidden (view full) ---

1222 echo powerpc-apple-beos
1223 exit ;;
1224 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1225 echo i586-pc-beos
1226 exit ;;
1227 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1228 echo i586-pc-haiku
1229 exit ;;
1230 x86_64:Haiku:*:*)
1231 echo x86_64-unknown-haiku
1232 exit ;;
1233 SX-4:SUPER-UX:*:*)
1234 echo sx4-nec-superux${UNAME_RELEASE}
1235 exit ;;
1236 SX-5:SUPER-UX:*:*)
1237 echo sx5-nec-superux${UNAME_RELEASE}
1238 exit ;;
1239 SX-6:SUPER-UX:*:*)
1240 echo sx6-nec-superux${UNAME_RELEASE}

--- 10 unchanged lines hidden (view full) ---

1251 Power*:Rhapsody:*:*)
1252 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1253 exit ;;
1254 *:Rhapsody:*:*)
1255 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1256 exit ;;
1257 *:Darwin:*:*)
1258 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1259 eval $set_cc_for_build
1260 if test "$UNAME_PROCESSOR" = unknown ; then
1261 UNAME_PROCESSOR=powerpc
1262 fi
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
1267 then
1268 case $UNAME_PROCESSOR in
1269 i386) UNAME_PROCESSOR=x86_64 ;;
1270 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1271 esac
1272 fi
1273 fi
1274 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1275 exit ;;
1276 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1277 UNAME_PROCESSOR=`uname -p`
1278 if test "$UNAME_PROCESSOR" = "x86"; then
1279 UNAME_PROCESSOR=i386
1280 UNAME_MACHINE=pc
1281 fi

--- 74 unchanged lines hidden (view full) ---

1356 i*86:AROS:*:*)
1357 echo ${UNAME_MACHINE}-pc-aros
1358 exit ;;
1359 x86_64:VMkernel:*:*)
1360 echo ${UNAME_MACHINE}-unknown-esx
1361 exit ;;
1362esac
1363
1364eval $set_cc_for_build
1365cat >$dummy.c <<EOF
1366#ifdef _SEQUENT_
1367# include <sys/types.h>
1368# include <sys/utsname.h>
1369#endif
1370main ()
1371{

--- 187 unchanged lines hidden ---