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: I63d1cdf6edb125d75872d6dae38f8602fc043431
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/Makefile.am b/Makefile.am
index 467db44..9583fac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,6 +26,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
+
 AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
 AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
 AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)