msm: check libxml/{xmlreader,tree}.h 00/12400/2
authorAdrian Negreanu <adrian.m.negreanu@intel.com>
Thu, 14 Nov 2013 14:06:23 +0000 (16:06 +0200)
committerAdrian Negreanu <adrian.m.negreanu@intel.com>
Fri, 15 Nov 2013 13:13:32 +0000 (15:13 +0200)
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>
configure.ac
packaging/rpm.spec
plugins/Makefile.am

index c455e88..e97f727 100644 (file)
@@ -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],[],[
index a9995c3..b214488 100644 (file)
@@ -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)
 
index 5fd7662..8002d9c 100644 (file)
@@ -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