AC_SUBST(MYGAL_LIBS)
+dnl ---------------------------------------------------------------------------
+dnl - Is XML_PARSE_HUGE available?
+dnl ---------------------------------------------------------------------------
+PKG_CHECK_MODULES(XML_PARSE_HUGE, libxml-2.0 >= 2.7.0,
+ HAVE_XML_PARSE_HUGE="-DHAVE_XML_PARSE_HUGE",
+ HAVE_XML_PARSE_HUGE="-UHAVE_XML_PARSE_HUGE")
+AC_SUBST(HAVE_XML_PARSE_HUGE)
+
+
dnl ---------------------------------------------------------------------------
dnl - Enable deprecation testing
dnl ---------------------------------------------------------------------------
-I$(LIB_BARCODE_DIR) \
-I$(LIB_IEC16022_DIR) \
$(GLABELS_CFLAGS) \
+ $(HAVE_XML_PARSE_HUGE) \
$(DISABLE_DEPRECATED_CFLAGS) \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
filename = g_filename_from_utf8 (utf8_filename, -1, NULL, NULL, NULL);
g_return_val_if_fail (filename, NULL);
+#ifndef HAVE_XML_PARSE_HUGE
doc = xmlParseFile (filename);
+#else
+ doc = xmlReadFile (filename, NULL, XML_PARSE_HUGE);
+#endif
if (!doc) {
g_message (_("xmlParseFile error"));
*status = XML_LABEL_ERROR_OPEN_PARSE;
gl_debug (DEBUG_XML, "START");
+#ifndef HAVE_XML_PARSE_HUGE
doc = xmlParseDoc ((xmlChar *) buffer);
+#else
+ doc = xmlReadDoc ((xmlChar *) buffer, NULL, NULL, XML_PARSE_HUGE);
+#endif
if (!doc) {
- g_message (_("xmlParseFile error"));
+ g_message (_("xmlParseDoc error"));
*status = XML_LABEL_ERROR_OPEN_PARSE;
return NULL;
}