evanphx (owner)

Revisions

gist: 180633 Download_button fork
public
Public Clone URL: git://gist.github.com/180633.git
Embed All Files: show embed
Text #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Index: autoconf/config.guess
===================================================================
--- autoconf/config.guess (revision 80590)
+++ autoconf/config.guess (working copy)
@@ -1178,7 +1178,19 @@
     *:Darwin:*:*)
  UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  case $UNAME_PROCESSOR in
- *86) UNAME_PROCESSOR=i686 ;;
+ *86)
+ UNAME_PROCESSOR=i686
+
+ # Check if we're actually on x86_64 and overwrite UNAME_PROCESSOR
+ case $UNAME_RELEASE in
+ 10.*)
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -dM -) | grep __LP64__ >/dev/null
+ then
+ UNAME_PROCESSOR=x86_64
+ fi
+ esac
+ ;;
  unknown) UNAME_PROCESSOR=powerpc ;;
  esac
  echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}