11#! /bin/sh
22# Attempt to guess a canonical system name.
3- # Copyright 1992-2016 Free Software Foundation, Inc.
3+ # Copyright 1992-2017 Free Software Foundation, Inc.
44
5- timestamp=' 2016-10-02 '
5+ timestamp=' 2017-05-27 '
66
77# This file is free software; you can redistribute it and/or modify it
88# under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
5050GNU config.guess ($timestamp )
5151
5252Originally written by Per Bothner.
53- Copyright 1992-2016 Free Software Foundation, Inc.
53+ Copyright 1992-2017 Free Software Foundation, Inc.
5454
5555This is free software; see the source for copying conditions. There is NO
5656warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -837,10 +837,11 @@ EOF
837837 UNAME_PROCESSOR=` /usr/bin/uname -p`
838838 case ${UNAME_PROCESSOR} in
839839 amd64)
840- echo x86_64-unknown-freebsd ` echo ${UNAME_RELEASE} | sed -e ' s/[-(].*// ' ` ;;
841- * )
842- echo ${ UNAME_PROCESSOR} -unknown-freebsd ` echo ${UNAME_RELEASE} | sed -e ' s/[-(].*// ' ` ;;
840+ UNAME_PROCESSOR= x86_64 ;;
841+ i386 )
842+ UNAME_PROCESSOR=i586 ;;
843843 esac
844+ echo ${UNAME_PROCESSOR} -unknown-freebsd` echo ${UNAME_RELEASE} | sed -e ' s/[-(].*//' `
844845 exit ;;
845846 i* :CYGWIN* :* )
846847 echo ${UNAME_MACHINE} -pc-cygwin
@@ -1303,14 +1304,21 @@ EOF
13031304 if test ` echo " $UNAME_RELEASE " | sed -e ' s/\..*//' ` -le 10 ; then
13041305 if [ " $CC_FOR_BUILD " != no_compiler_found ]; then
13051306 if (echo ' #ifdef __LP64__' ; echo IS_64BIT_ARCH; echo ' #endif' ) | \
1306- (CCOPTS=" " $CC_FOR_BUILD -E - 2> /dev/null) | \
1307- grep IS_64BIT_ARCH > /dev/null
1307+ (CCOPTS=" " $CC_FOR_BUILD -E - 2> /dev/null) | \
1308+ grep IS_64BIT_ARCH > /dev/null
13081309 then
13091310 case $UNAME_PROCESSOR in
13101311 i386) UNAME_PROCESSOR=x86_64 ;;
13111312 powerpc) UNAME_PROCESSOR=powerpc64 ;;
13121313 esac
13131314 fi
1315+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1316+ if (echo ' #ifdef __POWERPC__' ; echo IS_PPC; echo ' #endif' ) | \
1317+ (CCOPTS=" " $CC_FOR_BUILD -E - 2> /dev/null) | \
1318+ grep IS_PPC > /dev/null
1319+ then
1320+ UNAME_PROCESSOR=powerpc
1321+ fi
13141322 fi
13151323 elif test " $UNAME_PROCESSOR " = i386 ; then
13161324 # Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -1334,15 +1342,18 @@ EOF
13341342 * :QNX:* :4* )
13351343 echo i386-pc-qnx
13361344 exit ;;
1337- NEO-? :NONSTOP_KERNEL:* :* )
1345+ NEO-* :NONSTOP_KERNEL:* :* )
13381346 echo neo-tandem-nsk${UNAME_RELEASE}
13391347 exit ;;
13401348 NSE-* :NONSTOP_KERNEL:* :* )
13411349 echo nse-tandem-nsk${UNAME_RELEASE}
13421350 exit ;;
1343- NSR-? :NONSTOP_KERNEL:* :* )
1351+ NSR-* :NONSTOP_KERNEL:* :* )
13441352 echo nsr-tandem-nsk${UNAME_RELEASE}
13451353 exit ;;
1354+ NSX-* :NONSTOP_KERNEL:* :* )
1355+ echo nsx-tandem-nsk${UNAME_RELEASE}
1356+ exit ;;
13461357 * :NonStop-UX:* :* )
13471358 echo mips-compaq-nonstopux
13481359 exit ;;
0 commit comments