summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-23 15:44:48 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-23 15:44:48 +0000
commit608ac0b1cd0fbdfcd153bbd47b854a0271462829 (patch)
tree12331e05635dbc8af2bed1794a7f97591cbbd427 /configure.in
parent7e277e52b1d7fe296e0619a43516e5d1b23f2bfa (diff)
* configure.in: change the default compiler to gcc-4.2 if target os
is OS X 10.7 (Lion). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in22
1 files changed, 17 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index b90f689e8b..ecb3a36ca2 100644
--- a/configure.in
+++ b/configure.in
@@ -86,6 +86,11 @@ AC_SUBST(RUBY_RELEASE_DATE)
if test "$MAJOR" = "1"; then
AC_DEFINE(CANONICALIZATION_FOR_MATHN)
fi
+
+AC_CANONICAL_TARGET
+target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'`
+ac_install_sh='' # unusable for extension libraries.
+
dnl checks for alternative programs
AC_ARG_WITH(gcc,
AS_HELP_STRING([--without-gcc], [never use gcc]),
@@ -93,7 +98,18 @@ AC_ARG_WITH(gcc,
AS_CASE([$withval],
[no], [: ${CC=cc}],
[yes], [: ${CC=gcc}],
- [CC=$withval])])
+ [CC=$withval])
+ AS_CASE([$withval], [no|yes],
+ [with_gcc_specified=no],
+ [with_gcc_specified=yes])])
+AS_CASE(["$target_os"], [darwin11.*],
+ [if test -z "$CC"; then
+ CC=gcc-4.2
+ else
+ if test "x$with_gcc_specified" = "xno" && $CC -v 2>&1 | grep -i LLVM > /dev/null; then
+ CC=gcc-4.2
+ fi
+ fi])
dnl If the user switches compilers, we can't believe the cache
if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
then
@@ -110,10 +126,6 @@ RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"`
AC_SUBST(RUBY_BASE_NAME)
AC_SUBST(RUBYW_BASE_NAME)
-AC_CANONICAL_TARGET
-target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'`
-ac_install_sh='' # unusable for extension libraries.
-
AC_DEFUN([RUBY_APPEND_OPTION],
[# RUBY_APPEND_OPTION($1, $2)
AS_CASE([" [$]{$1-} "],