summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-11 12:38:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-11 12:38:15 +0000
commitbb5d74560903cf99ed05999ad20db5a149567695 (patch)
tree3f63c52a31856f359f21efeb6343edffa6c4ec5a
parenta2ea90d756aa64cda9851d9d16cc11a087cb953e (diff)
downloadruby-bb5d74560903cf99ed05999ad20db5a149567695.tar.gz
ruby-bb5d74560903cf99ed05999ad20db5a149567695.tar.xz
ruby-bb5d74560903cf99ed05999ad20db5a149567695.zip
* tool/config.{guess,sub}: better guess on darwin 10 .
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--configure.in23
2 files changed, 27 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fd1eb90c..0759cbb45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Sep 11 21:38:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * tool/config.{guess,sub}: better guess on darwin 10 .
+
Fri Sep 11 18:51:57 2009 NARUSE, Yui <naruse@ruby-lang.org>
* test/fileutils: use require_relative to require fileasserts.
diff --git a/configure.in b/configure.in
index 973256a14..98c08d7c4 100644
--- a/configure.in
+++ b/configure.in
@@ -202,6 +202,29 @@ if test ${target_archs+set}; then
CFLAGS="$CFLAGS ${ARCH_FLAG}"
LDFLAGS="${LDFLAGS+$LDFLAGS }${ARCH_FLAG}"
else
+ if test x"$target_alias" = x; then
+ case "$target_os" in
+ when(darwin*)
+ AC_MSG_CHECKING([for real target cpu])
+ target_cpu=`$CC -E - 2>/dev/null <<EOF |
+#ifdef __x86_64__
+"processor-name=x86_64"
+#endif
+#ifdef __i386__
+"processor-name=i386"
+#endif
+#ifdef __ppc__
+"processor-name=powerpc"
+#endif
+#ifdef __ppc64__
+"processor-name=powerpc64"
+#endif
+EOF
+ sed -n 's/^"processor-name=\(.*\)"/\1/p'`
+ AC_MSG_RESULT([$target_cpu])
+ ;;
+ esac
+ fi
target_archs="$target_cpu"
fi