comparison config.guess @ 112145:663605a4c7f4

* config.guess, config.sub: Updated from master source.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 07 Jan 2011 11:39:48 -0800
parents ced73eea562f
children
comparison
equal deleted inserted replaced
112144:125330ad5eb6 112145:663605a4c7f4
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, 2004, 2005, 2006, 2007, 2008, 2009 4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5 # Free Software Foundation, Inc. 5 # Free Software Foundation, Inc.
6 6
7 timestamp='2009-09-18' 7 timestamp='2010-09-24'
8 8
9 # This file is free software; you can redistribute it and/or modify it 9 # 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 10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or 11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version. 12 # (at your option) any later version.
54 54
55 version="\ 55 version="\
56 GNU config.guess ($timestamp) 56 GNU config.guess ($timestamp)
57 57
58 Originally written by Per Bothner. 58 Originally written by Per Bothner.
59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
60 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 60 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
61 Software Foundation, Inc.
61 62
62 This is free software; see the source for copying conditions. There is NO 63 This is free software; see the source for copying conditions. There is NO
63 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 64 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
64 65
65 help=" 66 help="
89 if test $# != 0; then 90 if test $# != 0; then
90 echo "$me: too many arguments$help" >&2 91 echo "$me: too many arguments$help" >&2
91 exit 1 92 exit 1
92 fi 93 fi
93 94
94 trap 'exit 1' 1 2 15 95 trap 'exit 1' HUP INT TERM
95 96
96 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a 97 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
97 # compiler to aid in system detection is discouraged as it requires 98 # compiler to aid in system detection is discouraged as it requires
98 # temporary files to be created and, as you can see below, it is a 99 # temporary files to be created and, as you can see below, it is a
99 # headache to deal with in a portable fashion. 100 # headache to deal with in a portable fashion.
103 104
104 # Portable tmp directory creation inspired by the Autoconf team. 105 # Portable tmp directory creation inspired by the Autoconf team.
105 106
106 set_cc_for_build=' 107 set_cc_for_build='
107 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 108 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
108 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 109 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
109 : ${TMPDIR=/tmp} ; 110 : ${TMPDIR=/tmp} ;
110 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 111 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
111 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 112 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
112 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 113 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
113 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 114 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
331 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 332 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332 exit ;; 333 exit ;;
333 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 334 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
334 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 335 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit ;; 336 exit ;;
337 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
338 echo i386-pc-auroraux${UNAME_RELEASE}
339 exit ;;
336 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 340 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
337 eval $set_cc_for_build 341 eval $set_cc_for_build
338 SUN_ARCH="i386" 342 SUN_ARCH="i386"
339 # If there is a compiler, see if it is configured for 64-bit objects. 343 # If there is a compiler, see if it is configured for 64-bit objects.
340 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 344 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
546 echo rs6000-ibm-aix3.2.4 550 echo rs6000-ibm-aix3.2.4
547 else 551 else
548 echo rs6000-ibm-aix3.2 552 echo rs6000-ibm-aix3.2
549 fi 553 fi
550 exit ;; 554 exit ;;
551 *:AIX:*:[456]) 555 *:AIX:*:[4567])
552 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
553 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 557 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
554 IBM_ARCH=rs6000 558 IBM_ARCH=rs6000
555 else 559 else
556 IBM_ARCH=powerpc 560 IBM_ARCH=powerpc
805 echo ${UNAME_MACHINE}-mingw32 809 echo ${UNAME_MACHINE}-mingw32
806 exit ;; 810 exit ;;
807 i*:PW*:*) 811 i*:PW*:*)
808 echo ${UNAME_MACHINE}-pc-pw32 812 echo ${UNAME_MACHINE}-pc-pw32
809 exit ;; 813 exit ;;
810 *:Interix*:[3456]*) 814 *:Interix*:*)
811 case ${UNAME_MACHINE} in 815 case ${UNAME_MACHINE} in
812 x86) 816 x86)
813 echo i586-pc-interix${UNAME_RELEASE} 817 echo i586-pc-interix${UNAME_RELEASE}
814 exit ;; 818 exit ;;
815 EM64T | authenticamd | genuineintel) 819 authenticamd | genuineintel | EM64T)
816 echo x86_64-unknown-interix${UNAME_RELEASE} 820 echo x86_64-unknown-interix${UNAME_RELEASE}
817 exit ;; 821 exit ;;
818 IA64) 822 IA64)
819 echo ia64-unknown-interix${UNAME_RELEASE} 823 echo ia64-unknown-interix${UNAME_RELEASE}
820 exit ;; 824 exit ;;
889 exit ;; 893 exit ;;
890 frv:Linux:*:*) 894 frv:Linux:*:*)
891 echo frv-unknown-linux-gnu 895 echo frv-unknown-linux-gnu
892 exit ;; 896 exit ;;
893 i*86:Linux:*:*) 897 i*86:Linux:*:*)
894 echo ${UNAME_MACHINE}-pc-linux-gnu 898 LIBC=gnu
899 eval $set_cc_for_build
900 sed 's/^ //' << EOF >$dummy.c
901 #ifdef __dietlibc__
902 LIBC=dietlibc
903 #endif
904 EOF
905 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
906 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
895 exit ;; 907 exit ;;
896 ia64:Linux:*:*) 908 ia64:Linux:*:*)
897 echo ${UNAME_MACHINE}-unknown-linux-gnu 909 echo ${UNAME_MACHINE}-unknown-linux-gnu
898 exit ;; 910 exit ;;
899 m32r*:Linux:*:*) 911 m32r*:Linux:*:*)
916 #else 928 #else
917 CPU= 929 CPU=
918 #endif 930 #endif
919 #endif 931 #endif
920 EOF 932 EOF
921 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 933 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
922 /^CPU/{
923 s: ::g
924 p
925 }'`"
926 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 934 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
927 ;; 935 ;;
928 or32:Linux:*:*) 936 or32:Linux:*:*)
929 echo or32-unknown-linux-gnu 937 echo or32-unknown-linux-gnu
930 exit ;; 938 exit ;;
957 sh*:Linux:*:*) 965 sh*:Linux:*:*)
958 echo ${UNAME_MACHINE}-unknown-linux-gnu 966 echo ${UNAME_MACHINE}-unknown-linux-gnu
959 exit ;; 967 exit ;;
960 sparc:Linux:*:* | sparc64:Linux:*:*) 968 sparc:Linux:*:* | sparc64:Linux:*:*)
961 echo ${UNAME_MACHINE}-unknown-linux-gnu 969 echo ${UNAME_MACHINE}-unknown-linux-gnu
970 exit ;;
971 tile*:Linux:*:*)
972 echo ${UNAME_MACHINE}-tilera-linux-gnu
962 exit ;; 973 exit ;;
963 vax:Linux:*:*) 974 vax:Linux:*:*)
964 echo ${UNAME_MACHINE}-dec-linux-gnu 975 echo ${UNAME_MACHINE}-dec-linux-gnu
965 exit ;; 976 exit ;;
966 x86_64:Linux:*:*) 977 x86_64:Linux:*:*)
1221 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1232 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1222 exit ;; 1233 exit ;;
1223 *:QNX:*:4*) 1234 *:QNX:*:4*)
1224 echo i386-pc-qnx 1235 echo i386-pc-qnx
1225 exit ;; 1236 exit ;;
1237 NEO-?:NONSTOP_KERNEL:*:*)
1238 echo neo-tandem-nsk${UNAME_RELEASE}
1239 exit ;;
1226 NSE-?:NONSTOP_KERNEL:*:*) 1240 NSE-?:NONSTOP_KERNEL:*:*)
1227 echo nse-tandem-nsk${UNAME_RELEASE} 1241 echo nse-tandem-nsk${UNAME_RELEASE}
1228 exit ;; 1242 exit ;;
1229 NSR-?:NONSTOP_KERNEL:*:*) 1243 NSR-?:NONSTOP_KERNEL:*:*)
1230 echo nsr-tandem-nsk${UNAME_RELEASE} 1244 echo nsr-tandem-nsk${UNAME_RELEASE}