mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
applied patch from Andrew W. Nosenko to expose if zlib support was
* configure.in parser.c xmllint.c include/libxml/parser.h include/libxml/xmlversion.h.in: applied patch from Andrew W. Nosenko to expose if zlib support was compiled in, in the header, in the feature API and in the xmllint --version output. Daniel
This commit is contained in:
parent
77aad34c94
commit
75acfeea32
@ -1,3 +1,10 @@
|
|||||||
|
Thu Jul 13 08:32:21 CEST 2006 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* configure.in parser.c xmllint.c include/libxml/parser.h
|
||||||
|
include/libxml/xmlversion.h.in: applied patch from Andrew W. Nosenko
|
||||||
|
to expose if zlib support was compiled in, in the header, in the
|
||||||
|
feature API and in the xmllint --version output.
|
||||||
|
|
||||||
Thu Jul 13 08:24:14 CEST 2006 Daniel Veillard <daniel@veillard.com>
|
Thu Jul 13 08:24:14 CEST 2006 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* SAX2.c: refactor to use normal warnings for entities problem
|
* SAX2.c: refactor to use normal warnings for entities problem
|
||||||
|
@ -325,12 +325,14 @@ echo Checking zlib
|
|||||||
|
|
||||||
dnl Checks for zlib library.
|
dnl Checks for zlib library.
|
||||||
|
|
||||||
|
WITH_ZLIB=0
|
||||||
if test "$with_zlib" = "no"; then
|
if test "$with_zlib" = "no"; then
|
||||||
echo "Disabling compression support"
|
echo "Disabling compression support"
|
||||||
else
|
else
|
||||||
AC_CHECK_HEADERS(zlib.h,
|
AC_CHECK_HEADERS(zlib.h,
|
||||||
AC_CHECK_LIB(z, gzread,[
|
AC_CHECK_LIB(z, gzread,[
|
||||||
AC_DEFINE([HAVE_LIBZ], [], [Have compression library])
|
AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
|
||||||
|
WITH_ZLIB=1
|
||||||
if test "x${Z_DIR}" != "x"; then
|
if test "x${Z_DIR}" != "x"; then
|
||||||
Z_CFLAGS="-I${Z_DIR}/include"
|
Z_CFLAGS="-I${Z_DIR}/include"
|
||||||
Z_LIBS="-L${Z_DIR}/lib -lz"
|
Z_LIBS="-L${Z_DIR}/lib -lz"
|
||||||
@ -346,6 +348,7 @@ fi
|
|||||||
|
|
||||||
AC_SUBST(Z_CFLAGS)
|
AC_SUBST(Z_CFLAGS)
|
||||||
AC_SUBST(Z_LIBS)
|
AC_SUBST(Z_LIBS)
|
||||||
|
AC_SUBST(WITH_ZLIB)
|
||||||
|
|
||||||
CPPFLAGS=${_cppflags}
|
CPPFLAGS=${_cppflags}
|
||||||
LDFLAGS=${_ldflags}
|
LDFLAGS=${_ldflags}
|
||||||
|
@ -1206,6 +1206,7 @@ typedef enum {
|
|||||||
XML_WITH_DEBUG = 28,
|
XML_WITH_DEBUG = 28,
|
||||||
XML_WITH_DEBUG_MEM = 29,
|
XML_WITH_DEBUG_MEM = 29,
|
||||||
XML_WITH_DEBUG_RUN = 30,
|
XML_WITH_DEBUG_RUN = 30,
|
||||||
|
XML_WITH_ZLIB = 31,
|
||||||
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
|
XML_WITH_NONE = 99999 /* just to be sure of allocation size */
|
||||||
} xmlFeature;
|
} xmlFeature;
|
||||||
|
|
||||||
|
@ -372,6 +372,15 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
|||||||
#define LIBXML_MODULE_EXTENSION "@MODULE_EXTENSION@"
|
#define LIBXML_MODULE_EXTENSION "@MODULE_EXTENSION@"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LIBXML_ZLIB_ENABLED:
|
||||||
|
*
|
||||||
|
* Whether the Zlib support is compiled in
|
||||||
|
*/
|
||||||
|
#if @WITH_ZLIB@
|
||||||
|
#define LIBXML_ZLIB_ENABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ATTRIBUTE_UNUSED:
|
* ATTRIBUTE_UNUSED:
|
||||||
*
|
*
|
||||||
|
6
parser.c
6
parser.c
@ -807,6 +807,12 @@ xmlHasFeature(xmlFeature feature)
|
|||||||
#else
|
#else
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
|
case XML_WITH_ZLIB:
|
||||||
|
#ifdef LIBXML_ZLIB_ENABLED
|
||||||
|
return(1);
|
||||||
|
#else
|
||||||
|
return(0);
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2752,6 +2752,7 @@ static void showVersion(const char *name) {
|
|||||||
if (xmlHasFeature(XML_WITH_DEBUG)) fprintf(stderr, "Debug ");
|
if (xmlHasFeature(XML_WITH_DEBUG)) fprintf(stderr, "Debug ");
|
||||||
if (xmlHasFeature(XML_WITH_DEBUG_MEM)) fprintf(stderr, "MemDebug ");
|
if (xmlHasFeature(XML_WITH_DEBUG_MEM)) fprintf(stderr, "MemDebug ");
|
||||||
if (xmlHasFeature(XML_WITH_DEBUG_RUN)) fprintf(stderr, "RunDebug ");
|
if (xmlHasFeature(XML_WITH_DEBUG_RUN)) fprintf(stderr, "RunDebug ");
|
||||||
|
if (xmlHasFeature(XML_WITH_ZLIB)) fprintf(stderr, "Zlib ");
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user