ruby-changes:27978
From: nobu <ko1@a...>
Date: Mon, 1 Apr 2013 14:23:07 +0900 (JST)
Subject: [ruby-changes:27978] nobu:r40030 (trunk): configure.in: clang check
nobu 2013-04-01 14:22:57 +0900 (Mon, 01 Apr 2013) New Revision: 40030 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40030 Log: configure.in: clang check * configure.in: check clang version by predefined macro values. [Bug #8192] Modified files: trunk/ChangeLog trunk/configure.in Index: configure.in =================================================================== --- configure.in (revision 40029) +++ configure.in (revision 40030) @@ -396,9 +396,12 @@ AS_CASE(["$host_os:$build_os"], https://github.com/ruby/ruby/blob/trunk/configure.in#L396 # clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-23 exported) # Apple clang version 2.0 (tags/Apple/clang-137) (based on LLVM 2.9svn) # Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn) - if test "$CC" = "clang" && $CC --version | grep 'clang version @<:@12 @:>@\.' ; then - AC_MSG_ERROR([clang version 3.0 or later is required]) - fi + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3 + @%:@error premature clang + @%:@endif])], + [], + [AC_MSG_ERROR([clang version 3.0 or later is required])]) ]) if test x"${build}" != x"${host}"; then AC_CHECK_TOOL(CC, gcc) Index: ChangeLog =================================================================== --- ChangeLog (revision 40029) +++ ChangeLog (revision 40030) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Apr 1 14:22:52 2013 Nobuyoshi Nakada <nobu@r...> + + * configure.in: check clang version by predefined macro values. + [Bug #8192] + Mon Apr 1 12:05:15 2013 Tanaka Akira <akr@f...> * numeric.c (check_uint): Take the 1st argument as unsigned long, -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/