libarchive: add optional libxml2 support
authorPeter Korsgaard <jacmet@sunsite.dk>
Sun, 10 Jul 2011 17:52:52 +0000 (19:52 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 10 Jul 2011 18:15:54 +0000 (20:15 +0200)
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/libarchive/libarchive.mk

index 563c9d7bc070149963bdd5b69888257c969ad0fd..d53904768d233a333f34f74394e3e066b5aba853 100644 (file)
@@ -14,8 +14,14 @@ LIBARCHIVE_DEPENDENCIES = zlib
 endif
 
 LIBARCHIVE_CONF_OPT = \
-       --without-xml2 \
        $(if $(BR2_PACKAGE_LIBARCHIVE_BSDTAR),--enable-bsdtar,--disable-bsdtar) \
        $(if $(BR2_PACKAGE_LIBARCHIVE_BSDCPIO),--enable-bsdcpio,--disable-bsdcpio)
 
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+LIBARCHIVE_DEPENDENCIES += libxml2
+LIBARCHIVE_CONF_ENV += XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config
+else
+LIBARCHIVE_CONF_OPT += --without-xml2
+endif
+
 $(eval $(call AUTOTARGETS,package,libarchive))