mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-09-10 21:44:14 +03:00
- parser.c: applied fixes from Christian Glahn bug report #53391
Daniel
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
Thu Apr 26 22:53:03 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* libxml.m4: yet another patch from Toshio Kuratomi
|
||||||
|
|
||||||
Thu Apr 26 21:27:43 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Thu Apr 26 21:27:43 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* libxml.m4 libxml2-spec.in: new patches from Toshio Kuratomi
|
* libxml.m4 libxml2-spec.in: new patches from Toshio Kuratomi
|
||||||
|
38
libxml.m4
38
libxml.m4
@@ -32,7 +32,7 @@ AC_ARG_ENABLE(xmltest,
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_PATH_PROG(XML_CONFIG, xml-config, no)
|
AC_PATH_PROG(XML_CONFIG, xml-config, no)
|
||||||
min_xml_version=ifelse([$1], ,2.0.0,[$1])
|
min_xml_version=ifelse([$1], ,1.0.0,[$1])
|
||||||
AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
|
AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
|
||||||
no_xml=""
|
no_xml=""
|
||||||
if test "$XML_CONFIG" = "no" ; then
|
if test "$XML_CONFIG" = "no" ; then
|
||||||
@@ -59,7 +59,7 @@ dnl
|
|||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <xmlversion.h>
|
#include <libxml/tree.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
@@ -67,6 +67,7 @@ main()
|
|||||||
int xml_major_version, xml_minor_version, xml_micro_version;
|
int xml_major_version, xml_minor_version, xml_micro_version;
|
||||||
int major, minor, micro;
|
int major, minor, micro;
|
||||||
char *tmp_version;
|
char *tmp_version;
|
||||||
|
int tmp_int_version;
|
||||||
|
|
||||||
system("touch conf.xmltest");
|
system("touch conf.xmltest");
|
||||||
|
|
||||||
@@ -80,17 +81,24 @@ main()
|
|||||||
free(tmp_version);
|
free(tmp_version);
|
||||||
|
|
||||||
/* Capture the version information from the header files */
|
/* Capture the version information from the header files */
|
||||||
tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
|
tmp_int_version = LIBXML_VERSION_NUMBER;
|
||||||
if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
|
xml_major_version=tmp_int_version / 10000;
|
||||||
printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
|
xml_minor_version=(tmp_int_version - xml_major_version * 10000) / 100;
|
||||||
exit(1);
|
xml_micro_version=(tmp_int_version - xml_minor_version * 100 - xml_major_version * 10000);
|
||||||
}
|
|
||||||
free(tmp_version);
|
|
||||||
|
|
||||||
/* Compare xml-config output to the libxml headers */
|
/* Compare xml-config output to the libxml headers */
|
||||||
if ((xml_major_version != $xml_config_major_version) ||
|
if ((xml_major_version != $xml_config_major_version) ||
|
||||||
(xml_minor_version != $xml_config_minor_version) ||
|
(xml_minor_version != $xml_config_minor_version)
|
||||||
(xml_micro_version != $xml_config_micro_version))
|
#if 0
|
||||||
|
||
|
||||||
|
/* The last released version of libxml-1.x has an incorrect micro version in
|
||||||
|
* the header file so neither the includes nor the library will match the
|
||||||
|
* micro_version to the output of xml-config
|
||||||
|
*/
|
||||||
|
(xml_micro_version != $xml_config_micro_version)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
|
||||||
{
|
{
|
||||||
printf("*** libxml header files (version %d.%d.%d) do not match\n",
|
printf("*** libxml header files (version %d.%d.%d) do not match\n",
|
||||||
xml_major_version, xml_minor_version, xml_micro_version);
|
xml_major_version, xml_minor_version, xml_micro_version);
|
||||||
@@ -105,10 +113,10 @@ main()
|
|||||||
LIBXML_TEST_VERSION;
|
LIBXML_TEST_VERSION;
|
||||||
|
|
||||||
/* Test that the library is greater than our minimum version */
|
/* Test that the library is greater than our minimum version */
|
||||||
if ((xml_major_version > major) ||
|
if (($xml_config_major_version > major) ||
|
||||||
((xml_major_version == major) && (xml_minor_version > minor)) ||
|
(($xml_config_major_version == major) && ($xml_config_minor_version > minor)) ||
|
||||||
((xml_major_version == major) && (xml_minor_version == minor) &&
|
(($xml_config_major_version == major) && ($xml_config_minor_version == minor) &&
|
||||||
(xml_micro_version >= micro)))
|
($xml_config_micro_version >= micro)))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -154,7 +162,7 @@ main()
|
|||||||
CFLAGS="$CFLAGS $XML_CFLAGS"
|
CFLAGS="$CFLAGS $XML_CFLAGS"
|
||||||
LIBS="$LIBS $XML_LIBS"
|
LIBS="$LIBS $XML_LIBS"
|
||||||
AC_TRY_LINK([
|
AC_TRY_LINK([
|
||||||
#include <xmlversion.h>
|
#include <libxml/tree.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
], [ LIBXML_TEST_VERSION; return 0;],
|
], [ LIBXML_TEST_VERSION; return 0;],
|
||||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||||
|
Reference in New Issue
Block a user