diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 3e436c4b92..3a9a14aa42 100644 --- a/configure.in +++ b/configure.in @@ -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) |