Revision 3271 config.guess

View differences:

config.guess
1 1
#! /bin/sh
2 2
# Attempt to guess a canonical system name.
3 3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5
#   Inc.
4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
#   Free Software Foundation, Inc.
6 6

  
7
timestamp='2007-07-22'
7
timestamp='2009-06-10'
8 8

  
9 9
# This file is free software; you can redistribute it and/or modify it
10 10
# under the terms of the GNU General Public License as published by
......
56 56
GNU config.guess ($timestamp)
57 57

  
58 58
Originally written by Per Bothner.
59
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
60
Free Software Foundation, Inc.
59
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
60
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
61 61

  
62 62
This is free software; see the source for copying conditions.  There is NO
63 63
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......
170 170
	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171 171
		eval $set_cc_for_build
172 172
		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173
			| grep __ELF__ >/dev/null
173
			| grep -q __ELF__
174 174
		then
175 175
		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176 176
		    # Return netbsd for either.  FIX?
......
324 324
	case `/usr/bin/uname -p` in
325 325
	    sparc) echo sparc-icl-nx7; exit ;;
326 326
	esac ;;
327
    s390x:SunOS:*:*)
328
	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329
	exit ;;
327 330
    sun4H:SunOS:5.*:*)
328 331
	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329 332
	exit ;;
......
331 334
	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332 335
	exit ;;
333 336
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
334
	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
337
	eval $set_cc_for_build
338
	SUN_ARCH="i386"
339
	# 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.
341
	# This test works for both compilers.
342
	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
343
	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
344
		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
345
		grep IS_64BIT_ARCH >/dev/null
346
	    then
347
		SUN_ARCH="x86_64"
348
	    fi
349
	fi
350
	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 351
	exit ;;
336 352
    sun4*:SunOS:6*:*)
337 353
	# According to config.sub, this is the proper way to canonicalize
......
532 548
		echo rs6000-ibm-aix3.2
533 549
	fi
534 550
	exit ;;
535
    *:AIX:*:[45])
551
    *:AIX:*:[456])
536 552
	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
537 553
	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
538 554
		IBM_ARCH=rs6000
......
640 656
	    # => hppa64-hp-hpux11.23
641 657

  
642 658
	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
643
		grep __LP64__ >/dev/null
659
		grep -q __LP64__
644 660
	    then
645 661
		HP_ARCH="hppa2.0w"
646 662
	    else
......
796 812
	    x86)
797 813
		echo i586-pc-interix${UNAME_RELEASE}
798 814
		exit ;;
799
	    EM64T | authenticamd)
815
	    EM64T | authenticamd | genuineintel)
800 816
		echo x86_64-unknown-interix${UNAME_RELEASE}
801 817
		exit ;;
818
	    IA64)
819
		echo ia64-unknown-interix${UNAME_RELEASE}
820
		exit ;;
802 821
	esac ;;
803 822
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
804 823
	echo i${UNAME_MACHINE}-pc-mks
805 824
	exit ;;
825
    8664:Windows_NT:*)
826
	echo x86_64-pc-mks
827
	exit ;;
806 828
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
807 829
	# How do we know it's Interix rather than the generic POSIX subsystem?
808 830
	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
......
833 855
	echo ${UNAME_MACHINE}-pc-minix
834 856
	exit ;;
835 857
    arm*:Linux:*:*)
836
	echo ${UNAME_MACHINE}-unknown-linux-gnu
858
	eval $set_cc_for_build
859
	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
860
	    | grep -q __ARM_EABI__
861
	then
862
	    echo ${UNAME_MACHINE}-unknown-linux-gnu
863
	else
864
	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
865
	fi
837 866
	exit ;;
838 867
    avr32*:Linux:*:*)
839 868
	echo ${UNAME_MACHINE}-unknown-linux-gnu
......
856 885
    m68*:Linux:*:*)
857 886
	echo ${UNAME_MACHINE}-unknown-linux-gnu
858 887
	exit ;;
859
    mips:Linux:*:*)
888
    mips:Linux:*:* | mips64:Linux:*:*)
860 889
	eval $set_cc_for_build
861 890
	sed 's/^	//' << EOF >$dummy.c
862 891
	#undef CPU
863
	#undef mips
864
	#undef mipsel
892
	#undef ${UNAME_MACHINE}
893
	#undef ${UNAME_MACHINE}el
865 894
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
866
	CPU=mipsel
895
	CPU=${UNAME_MACHINE}el
867 896
	#else
868 897
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
869
	CPU=mips
898
	CPU=${UNAME_MACHINE}
870 899
	#else
871 900
	CPU=
872 901
	#endif
......
879 908
	    }'`"
880 909
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
881 910
	;;
882
    mips64:Linux:*:*)
883
	eval $set_cc_for_build
884
	sed 's/^	//' << EOF >$dummy.c
885
	#undef CPU
886
	#undef mips64
887
	#undef mips64el
888
	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
889
	CPU=mips64el
890
	#else
891
	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
892
	CPU=mips64
893
	#else
894
	CPU=
895
	#endif
896
	#endif
897
EOF
898
	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
899
	    /^CPU/{
900
		s: ::g
901
		p
902
	    }'`"
903
	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
904
	;;
905 911
    or32:Linux:*:*)
906 912
	echo or32-unknown-linux-gnu
907 913
	exit ;;
......
921 927
	  EV67)  UNAME_MACHINE=alphaev67 ;;
922 928
	  EV68*) UNAME_MACHINE=alphaev68 ;;
923 929
        esac
924
	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
930
	objdump --private-headers /bin/sh | grep -q ld.so.1
925 931
	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
926 932
	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
927 933
	exit ;;
934
    padre:Linux:*:*)
935
	echo sparc-unknown-linux-gnu
936
	exit ;;
928 937
    parisc:Linux:*:* | hppa:Linux:*:*)
929 938
	# Look for CPU level
930 939
	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
......
954 963
    x86_64:Linux:*:*)
955 964
	echo x86_64-unknown-linux-gnu
956 965
	exit ;;
957
    xtensa:Linux:*:*)
958
    	echo xtensa-unknown-linux-gnu
966
    xtensa*:Linux:*:*)
967
    	echo ${UNAME_MACHINE}-unknown-linux-gnu
959 968
	exit ;;
960 969
    i*86:Linux:*:*)
961 970
	# The BFD linker knows what the default object file format is, so
......
972 981
	  elf32-i386)
973 982
		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
974 983
		;;
975
	  a.out-i386-linux)
976
		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
977
		exit ;;
978
	  coff-i386)
979
		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
980
		exit ;;
981
	  "")
982
		# Either a pre-BFD a.out linker (linux-gnuoldld) or
983
		# one that does not give us useful --help.
984
		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
985
		exit ;;
986 984
	esac
987 985
	# Determine whether the default compiler is a.out or elf
988 986
	eval $set_cc_for_build
......
1048 1046
    i*86:syllable:*:*)
1049 1047
	echo ${UNAME_MACHINE}-pc-syllable
1050 1048
	exit ;;
1051
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1049
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1052 1050
	echo i386-unknown-lynxos${UNAME_RELEASE}
1053 1051
	exit ;;
1054 1052
    i*86:*DOS:*:*)
......
1092 1090
    pc:*:*:*)
1093 1091
	# Left here for compatibility:
1094 1092
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1095
        # the processor, so we play safe by assuming i386.
1096
	echo i386-pc-msdosdjgpp
1093
        # the processor, so we play safe by assuming i586.
1094
	# Note: whatever this is, it MUST be the same as what config.sub
1095
	# prints for the "djgpp" host, or else GDB configury will decide that
1096
	# this is a cross-build.
1097
	echo i586-pc-msdosdjgpp
1097 1098
        exit ;;
1098 1099
    Intel:Mach:3*:*)
1099 1100
	echo i386-pc-mach3
......
1131 1132
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1132 1133
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1133 1134
          && { echo i486-ncr-sysv4; exit; } ;;
1135
    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1136
	OS_REL='.3'
1137
	test -r /etc/.relid \
1138
	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1139
	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1140
	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1141
	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1142
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1143
	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1144
	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1134 1145
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1135 1146
	echo m68k-unknown-lynxos${UNAME_RELEASE}
1136 1147
	exit ;;
......
1143 1154
    rs6000:LynxOS:2.*:*)
1144 1155
	echo rs6000-unknown-lynxos${UNAME_RELEASE}
1145 1156
	exit ;;
1146
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1157
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1147 1158
	echo powerpc-unknown-lynxos${UNAME_RELEASE}
1148 1159
	exit ;;
1149 1160
    SM[BE]S:UNIX_SV:*:*)
......
1206 1217
    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
1207 1218
	echo i586-pc-beos
1208 1219
	exit ;;
1220
    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
1221
	echo i586-pc-haiku
1222
	exit ;;
1209 1223
    SX-4:SUPER-UX:*:*)
1210 1224
	echo sx4-nec-superux${UNAME_RELEASE}
1211 1225
	exit ;;
......
1314 1328
    i*86:rdos:*:*)
1315 1329
	echo ${UNAME_MACHINE}-pc-rdos
1316 1330
	exit ;;
1331
    i*86:AROS:*:*)
1332
	echo ${UNAME_MACHINE}-pc-aros
1333
	exit ;;
1317 1334
esac
1318 1335

  
1319 1336
#echo '(No uname command or uname output not recognized.)' 1>&2
......
1474 1491
the operating system you are using. It is advised that you
1475 1492
download the most up to date version of the config scripts from
1476 1493

  
1477
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1494
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1478 1495
and
1479
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1496
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1480 1497

  
1481 1498
If the version you run ($0) is already up to date, please
1482 1499
send the following data and any information you think might be

Also available in: Unified diff