- We have no use for xmlreader without working libxml buffering of 2.5.9.
dnl Disable bug-replay(1) build if not met; --bug-pathname would be still OK.
PKG_CHECK_MODULES(LIBXML,libxml-2.0,[ have_libxml_buffering=false ])
])
+dnl We also condition 'HAVE_LIBXML_XMLREADER_H' by 'HAVE_LIBXML_BUFFERING'
+dnl as we have no use for xmlreader without working libxml buffering of 2.5.9.
AM_CONDITIONAL(HAVE_LIBXML_BUFFERING,$have_libxml_buffering)
+if $have_libxml_buffering;then
+ AC_DEFINE(HAVE_LIBXML_BUFFERING,,[libxml2 correctly reads textnodes by its xmlTextReader.])
+fi
AC_SUBST(LIBXML_CFLAGS)
AC_SUBST(LIBXML_LIBS)
#include <openssl/bn.h>
#include <openssl/crypto.h>
#include <libxml/tree.h>
-#include <libxml/xmlreader.h>
#include "captive/libxml.h"
#include <ctype.h>
+#ifdef HAVE_LIBXML_BUFFERING
+#include <libxml/xmlreader.h>
+#endif
/* CONFIG: */
return xml_media;
}
-
+#ifdef HAVE_LIBXML_BUFFERING
struct captive_giochannel_blind *captive_giochannel_blind_new_from_xml(xmlTextReader *xml_reader)
{
struct captive_giochannel_blind *r;
return r;
}
+#endif /* HAVE_LIBXML_BUFFERING */
#include <glib/giochannel.h>
#include <libxml/tree.h>
+#ifdef HAVE_LIBXML_BUFFERING
#include <libxml/xmlreader.h>
+#endif
G_BEGIN_DECLS
gboolean captive_giochannel_blind_get_size(GIOChannel *giochannel,guint64 *size_return);
GIOStatus captive_giochannel_blind_commit(GIOChannel *giochannel_blind);
xmlNode *captive_giochannel_blind_readreport_to_xml(xmlNode *xml_parent,GIOChannel *giochannel);
-struct captive_giochannel_blind *captive_giochannel_blind_new_from_xml(xmlTextReader *xml_reader);
void captive_giochannel_setup(GIOChannel *giochannel);
+#ifdef HAVE_LIBXML_BUFFERING
+struct captive_giochannel_blind *captive_giochannel_blind_new_from_xml(xmlTextReader *xml_reader);
+#endif
G_END_DECLS