From: Eric Blake Date: Wed, 4 May 2011 23:18:42 +0000 (-0600) Subject: maint: detect clang 2.9 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2ffa8b341cc54abfa417f809ab7a858bb07a929a;p=libvirt.git maint: detect clang 2.9 In Fedora 15, with clang 2.8, 'scan-build env' shows: CCC_ANALYZER_ANALYSIS=-analyzer-check-objc-mem -analyzer-check-security-syntactic -analyzer-check-dead-stores -analyzer-check-objc-unused-ivars -analyzer-check-objc-methodsigs But in rawhide, with clang 2.9, the same variable is set but empty, implying the default set of analysis. We still want sa_assert defined in that case, to stop clang from hitting false positives. * configure.ac (STATIC_ANALYSIS): Detect clang even when the set of analyses is the default. --- diff --git a/configure.ac b/configure.ac index 7c68bcad36..314a5945cb 100644 --- a/configure.ac +++ b/configure.ac @@ -2297,7 +2297,7 @@ cp -f COPYING.LIB COPYING # Detect when running under the clang static analyzer's scan-build driver # or Coverity-prevent's cov-build. Define STATIC_ANALYSIS accordingly. -test -n "$CCC_ANALYZER_ANALYSIS$COVERITY_BUILD_COMMAND" && t=1 || t=0 +test -n "${CCC_ANALYZER_ANALYSIS+set}$COVERITY_BUILD_COMMAND" && t=1 || t=0 AC_DEFINE_UNQUOTED([STATIC_ANALYSIS], [$t], [Define to 1 when performing static analysis.])