1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

configure.in: clang check

* configure.in: check clang version by predefined macro values.
  [Bug #8192]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-04-01 05:22:57 +00:00
parent 92f59c6d79
commit 90e8a9b4bd
2 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Mon Apr 1 14:22:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in: check clang version by predefined macro values.
[Bug #8192]
Mon Apr 1 12:05:15 2013 Tanaka Akira <akr@fsij.org>
* numeric.c (check_uint): Take the 1st argument as unsigned long,

View file

@ -396,9 +396,12 @@ AS_CASE(["$host_os:$build_os"],
# 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)