--- config.guess.orig	2009-09-12 20:13:05.000000000 -0400
+++ config.guess	2009-09-12 20:14:07.000000000 -0400
@@ -1259,6 +1259,24 @@
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
 	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  sed 's/^                //' << EOF >$dummy.c
+		  #if defined(__LP64__)
+		  main()
+		  {
+		  }
+		  #endif
+EOF
+		  if test `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep -c main` = 1 ; then
+	              UNAME_PROCESSOR=x86_64
+		  fi
+		else
+		  if sysctl -a | grep -c hw.cpu64bit_capable>/dev/null 2>&1 ; then
+		    UNAME_PROCESSOR=x86_64
+		  fi
+	        fi ;;
 	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}

