From 51370f0eedb1c8167ab2c340d2a53f0d9f02509c Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Thu, 23 May 2013 12:03:04 +0200 Subject: src: add support for XML parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds capabilities for parsing a XML table/chain/rule. Some comments: * The XML data is case sensitive (so asd != ASD != asd) * All exported functions receive XML and return an object (table|chain|rule). * To compile the lib with XML parsing support, run './configure --with-xml-parsing' * XML parsing is done with libmxml (http://minixml.org). XML parsing depends on this external lib, this dependency is optional at compile time. NOTE: expr/target and expr/match binary data are exported. [ Fixed to compile without --with-xml-parsing --pablo ] Signed-off-by: Arturo Borrero González --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 01c170a..0eec5bd 100644 --- a/configure.ac +++ b/configure.ac @@ -14,6 +14,10 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl Dependencies PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.0]) +AC_ARG_WITH([xml-parsing], AS_HELP_STRING([--with-xml-parsing], [XML parsing support])) +AS_IF([test "x$with_xml_parsing" = "xyes"], [ + PKG_CHECK_MODULES([LIBXML], [mxml >= 2.6]) +]) AC_PROG_CC AM_PROG_CC_C_O @@ -26,6 +30,9 @@ case "$host" in esac regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT" +AS_IF([test "x$with_xml_parsing" = "xyes"], [ + regular_CPPFLAGS="$regular_CPPFLAGS -DXML_PARSING" +]) regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ -Wmissing-prototypes -Wshadow -Wstrict-prototypes \ -Wformat=2 -pipe" -- cgit v1.2.3