]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
libnftnl: add JSON and XML parsing support
authorYegor Yefremov <yegorslists@googlemail.com>
Thu, 23 Jan 2014 14:00:02 +0000 (15:00 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 27 Jan 2014 21:11:38 +0000 (22:11 +0100)
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/libnftnl/Config.in
package/libnftnl/libnftnl.mk

index 66d051339d8aec297ed520fccc9f79b94903bc5a..75ca51910fbc04bbceaf37fe5425af4b8a16e4cd 100644 (file)
@@ -13,6 +13,22 @@ config BR2_PACKAGE_LIBNFTNL
 
          http://netfilter.org/projects/libnftnl/index.html
 
+if BR2_PACKAGE_LIBNFTNL
+
+config BR2_PACKAGE_LIBNFTNL_JSON
+       bool "enable JSON support"
+       select BR2_PACKAGE_JANSSON
+       help
+         Enable JSON parsing support
+
+config BR2_PACKAGE_LIBNFTNL_XML
+       bool "enable XML support"
+       select BR2_PACKAGE_MXML
+       help
+         Enable XML parsing support
+
+endif
+
 comment "libnftnl needs a toolchain w/ threads, IPv6, largefile"
        depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INET_IPV6 || \
                !BR2_LARGEFILE
index 5eba0aa8003a7b94eff91d057bb30270bc04eb8c..0aecf1244b29ae6e9022456aee7ddc3f1db8e420 100644 (file)
@@ -12,4 +12,18 @@ LIBNFTNL_LICENSE_FILES = COPYING
 LIBNFTNL_INSTALL_STAGING = YES
 LIBNFTNL_DEPENDENCIES = host-pkgconf libmnl
 
+ifeq ($(BR2_PACKAGE_LIBNFTNL_JSON),y)
+LIBNFTNL_CONF_OPT += --with-json-parsing
+LIBNFTNL_DEPENDENCIES += jansson
+else
+LIBNFTNL_CONF_OPT += --without-json-parsing
+endif
+
+ifeq ($(BR2_PACKAGE_LIBNFTNL_XML),y)
+LIBNFTNL_CONF_OPT += --with-xml-parsing
+LIBNFTNL_DEPENDENCIES += mxml
+else
+LIBNFTNL_CONF_OPT += --without-xml-parsing
+endif
+
 $(eval $(autotools-package))