* configure.ac (STATIC_ANALYSIS): Define when run via clang's
scan-build or coverity-prevent's cov-build.
Use the CLANG_CC and COVERITY_BUILD_COMMAND envvars as witnesses.
test "x$srcdir" = x. && ! test -f COPYING &&
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
+AC_DEFINE_UNQUOTED([STATIC_ANALYSIS], [$t],
+ [Define to 1 when performing static analysis.])
+
AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
docs/schemas/Makefile \
gnulib/lib/Makefile \