msmconfig.c:29:25: fatal error: libxml/tree.h: No such file or directory
msmmanifest.c:37:30: fatal error: libxml/xmlreader.h: No such file or directory
Bug-Id: https://bugs.tizen.org/jira/browse/PTREL-397
Change-Id: If287d79f343ca6f6f4be9392f09e17387305fb8a
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
],[
AC_MSG_ERROR([--with-msm given, but sys/capability.h not found])
])
+
+ PKG_CHECK_MODULES(
+ [LIBXML2],
+ [libxml-2.0 >= 2.0],
+ [AC_DEFINE(WITH_LIBXML2, 1, [Build with libxml2 support])],
+ [AC_MSG_ERROR([--with-msm given, but libxml2 not found])]
+ )
+ AC_SUBST(LIBXML2_CFLAGS)
+ AC_SUBST(LIBXML2_LIBS)
+
AC_CHECK_HEADER([attr/xattr.h],[
save_LIBS="$LIBS"
AC_CHECK_LIB([attr],[setxattr],[],[
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(nss)
BuildRequires: uthash-devel
-BuildRequires: libxml2-devel
+BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: libattr-devel
BuildRequires: pkgconfig(libsmack)
endif
if MSM
+AM_CPPFLAGS += @LIBXML2_CFLAGS@
msm_la_SOURCES = plugin.h msm.h msm-plugin.c msmconfig.c msmmatch.c msmxattr.c msmmanifest.c
-msm_la_LIBADD = $(top_builddir)/lib/librpm.la $(top_builddir)/rpmio/librpmio.la @WITH_MSM_LIB@
+msm_la_LIBADD = $(top_builddir)/lib/librpm.la $(top_builddir)/rpmio/librpmio.la @WITH_MSM_LIB@ @LIBXML2_LIBS@
plugins_LTLIBRARIES += msm.la
endif