From 5aa35524799114bae811469407337f1d0c219202 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 15 Mar 2009 18:06:37 +0200 Subject: [PATCH] Require libxml2 < 2.7 Thread initialization has changed in 2.7, such that VLC and Qt4 cannot both use libxml2. While this maximum version requirement is bound to frustrate Linux/BSD users, we cannot fix this within VLC. Falling back to xtag is not quite as bad as crashing. --- configure.ac | 4 ++-- modules/misc/xml/libxml.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d502f2c16a..1d8c127797 100644 --- a/configure.ac +++ b/configure.ac @@ -4311,13 +4311,13 @@ dnl AC_ARG_ENABLE(libxml2, [ --enable-libxml2 libxml2 support (default enabled)]) AS_IF([test "${enable_libxml2}" != "no"], [ - PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.5], [ + PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.5 libxml-2.0 < 2.7], [ VLC_ADD_CPPFLAGS([xml],[${XML2_CFLAGS}]) VLC_ADD_LIBS([xml],[${XML2_LIBS}]) VLC_ADD_PLUGIN([xml]) ], [ AS_IF([test "x${enable_xml2}" != "x"], [ - AC_MSG_ERROR([Could not find libxml2]) + AC_MSG_ERROR([Could not find libxml version 2.5 or 2.6]) ]) ]) ]) diff --git a/modules/misc/xml/libxml.c b/modules/misc/xml/libxml.c index 28a6696d3a..09c200e80e 100644 --- a/modules/misc/xml/libxml.c +++ b/modules/misc/xml/libxml.c @@ -35,6 +35,10 @@ #include #include +#if !defined (LIBXML_VERSION) || (LIBXML_VERSION > 20700) +# error Stale config.cache detected. Erase it and re-run configure. +#endif + /***************************************************************************** * Module descriptor *****************************************************************************/ -- 2.39.2