From: Adrian Negreanu Date: Thu, 14 Nov 2013 14:06:23 +0000 (+0200) Subject: msm: check libxml/{xmlreader,tree}.h X-Git-Tag: tizen/4.11.0.1.tizen20140530~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca0c3b49cb899185c2ff3d6c19616db26ae1ef34;p=tools%2Flibrpm-tizen.git msm: check libxml/{xmlreader,tree}.h 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 --- diff --git a/configure.ac b/configure.ac index c455e88a1..e97f727f0 100644 --- a/configure.ac +++ b/configure.ac @@ -688,6 +688,16 @@ AS_IF([test "$with_msm" = yes],[ ],[ 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],[],[ diff --git a/packaging/rpm.spec b/packaging/rpm.spec index a9995c31e..b214488cf 100644 --- a/packaging/rpm.spec +++ b/packaging/rpm.spec @@ -29,7 +29,7 @@ BuildRequires: xz-devel BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(nss) BuildRequires: uthash-devel -BuildRequires: libxml2-devel +BuildRequires: pkgconfig(libxml-2.0) BuildRequires: libattr-devel BuildRequires: pkgconfig(libsmack) diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 5fd7662f1..8002d9c40 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -26,8 +26,9 @@ plugins_LTLIBRARIES += sepolicy.la 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