autotools: Fix for autoconf-archive 2019.01.19
The code coverage macros from the archive changed in a backward
incompatible way. This adds a workaround to autodetect either version
and do the right thing.
Change-Id: I4258fab8811f07760ebd73e8ac55c8493370e19b
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/Makefile.am b/Makefile.am
index c4335da..7473e23 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,6 +29,14 @@
CODE_COVERAGE_GENHTML_OPTIONS += --prefix $(abs_srcdir) --prefix $(abs_builddir)
export CODE_COVERAGE_GENHTML_OPTIONS
+if AUTOCONF_CODE_COVERAGE_2019_01_06
+include $(top_srcdir)/aminclude_static.am
+clean-local: code-coverage-clean
+distclean-local: code-coverage-dist-clean
+else
+@CODE_COVERAGE_RULES@
+endif
+
export AM_CPPFLAGS = -I$(abs_builddir)/src -I$(abs_srcdir)/src \
$(CODE_COVERAGE_CPPFLAGS)
export AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)