From 54c56aa93e157eb11afca68b7daf2c30ab08699f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 4 Oct 2016 14:37:57 -0400 Subject: [PATCH] Build: Replace use of deprecated AM_PATH_XML2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- configure.ac | 4 +++- src/common/config/Makefile.am | 4 ++-- tests/regression/tools/mi/Makefile.am | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 358bcb610..a41d396ff 100644 --- a/configure.ac +++ b/configure.ac @@ -320,7 +320,9 @@ PKG_CHECK_MODULES([POPT], [popt], ] ) -AM_PATH_XML2(2.7.6, true, AC_MSG_ERROR(No supported version of libxml2 found.)) +PKG_CHECK_MODULES([libxml2], [libxml-2.0 >= 2.7.6]) +AC_SUBST([XML_CFLAGS]) +AC_SUBST([XML_LIBS]) # Check for libuuid PKG_CHECK_MODULES([UUID], [uuid], diff --git a/src/common/config/Makefile.am b/src/common/config/Makefile.am index 6e33d5b60..afc83f26f 100644 --- a/src/common/config/Makefile.am +++ b/src/common/config/Makefile.am @@ -4,8 +4,8 @@ noinst_LTLIBRARIES = libconfig.la libconfig_la_SOURCES = ini.c ini.h session-config.c session-config.h \ config-session-abi.h config-internal.h -libconfig_la_CPPFLAGS = $(XML_CPPFLAGS) $(AM_CPPFLAGS) -libconfig_la_LIBADD = $(XML_LIBS) +libconfig_la_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS) +libconfig_la_LIBADD = ${libxml2_LIBS} xmldir = $(datadir)/xml/lttng dist_xml_DATA = session.xsd diff --git a/tests/regression/tools/mi/Makefile.am b/tests/regression/tools/mi/Makefile.am index f5d5e2130..f26efe0d0 100644 --- a/tests/regression/tools/mi/Makefile.am +++ b/tests/regression/tools/mi/Makefile.am @@ -2,12 +2,12 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src noinst_PROGRAMS = validate_xml extract_xml validate_xml_SOURCES = validate_xml.c -validate_xml_CPPFLAGS = $(XML_CPPFLAGS) $(AM_CPPFLAGS) -validate_xml_LDADD = $(XML_LIBS) +validate_xml_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS) +validate_xml_LDADD = $(libxml2_LIBS) extract_xml_SOURCES = extract_xml.c -extract_xml_CPPFLAGS = $(XML_CPPFLAGS) $(AM_CPPFLAGS) -extract_xml_LDADD = $(XML_LIBS) +extract_xml_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS) +extract_xml_LDADD = $(libxml2_LIBS) noinst_SCRIPTS = test_mi EXTRA_DIST = test_mi -- 2.34.1