]
)
-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 uuid in system libs
AC_CHECK_FUNCS([uuid_generate],
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
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