ruby-changes:20601
From: mrkn <ko1@a...>
Date: Sun, 24 Jul 2011 00:45:00 +0900 (JST)
Subject: [ruby-changes:20601] mrkn:r32649 (ruby_1_9_3): * configure.in: change the default compiler to gcc-4.2 if target os
mrkn 2011-07-24 00:44:48 +0900 (Sun, 24 Jul 2011) New Revision: 32649 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32649 Log: * configure.in: change the default compiler to gcc-4.2 if target os is OS X 10.7 (Lion). Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/configure.in Index: ruby_1_9_3/configure.in =================================================================== --- ruby_1_9_3/configure.in (revision 32648) +++ ruby_1_9_3/configure.in (revision 32649) @@ -86,6 +86,11 @@ 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 @@ 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 @@ 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-} "], Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 32648) +++ ruby_1_9_3/ChangeLog (revision 32649) @@ -1,3 +1,8 @@ +Sun Jul 24 00:42:00 2011 Kenta Murata <mrkn@m...> + + * configure.in: change the default compiler to gcc-4.2 if target os + is OS X 10.7 (Lion). + Sun Jul 24 00:19:13 2011 KOSAKI Motohiro <kosaki.motohiro@g...> * configure.in: changed default optflags to -O0 if the compiler is -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/