[webkit-gtk] [PATCH] Fix clang version checking in configure

Jeremy Huddleston Sequoia jeremyhu at macports.org
Sun Nov 10 17:49:13 PST 2013


The logic to verify >= clang-3.2 is incorrect:
  1) It does not correctly check Apple clang versions
  2) It forces minor version >= 2 even when major version > 3 (eg 4.0 will fail)

Patch included.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-check.patch
Type: application/octet-stream
Size: 1131 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20131110/eb3024e7/attachment.obj>
-------------- next part --------------


--- Source/autotools/CheckSystemAndBasicDependencies.m4.orig	2013-11-10 17:44:57.000000000 -0800
+++ Source/autotools/CheckSystemAndBasicDependencies.m4	2013-11-10 17:45:57.000000000 -0800
@@ -87,7 +87,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #endif
 ])], [c_compiler="gcc"], [])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-#if !(defined(__clang__) && __clang_major__ >= 3 && __clang_minor__ >= 2)
+#if !(defined(__clang__) && (__apple_build_version__ >= 4250024 || (!defined(__apple_build_version__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 2)))))
 #error Not a supported Clang compiler
 #endif
 ])], [c_compiler="clang"], [])
@@ -106,7 +106,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #endif
 ])], [cxx_compiler="g++"], [])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-#if !(defined(__clang__) && __clang_major__ >= 3 && __clang_minor__ >= 2)
+#if !(defined(__clang__) && (__apple_build_version__ >= 4250024 || (!defined(__apple_build_version__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 2)))))
 #error Not a supported Clang++ compiler
 #endif
 ])], [cxx_compiler="clang++"], [])

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20131110/eb3024e7/attachment.p7s>


More information about the webkit-gtk mailing list