From fcf0f235f4dd3e6ceb2149002834223b1c7e9f47 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 4 Jun 2011 02:59:06 +0200 Subject: libxml: Detect installed libxml2 versions which don't define xmlFree(). --- gnulib-local/ChangeLog | 5 +++++ gnulib-local/m4/libxml.m4 | 20 +++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index 08eca81..1abdeab 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,5 +1,10 @@ 2011-06-03 Bruno Haible + libxml: Detect installed libxml2 versions which don't define xmlFree(). + * m4/libxml.m4 (gl_LIBXML): Also try linking an xmlFree() invocation. + +2011-06-03 Bruno Haible + Copyright: Use LGPL 2.1 instead of LGPL 2.0. * lib/gettext.h: Update copyright header. * lib/hash.h: Likewise. diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4 index 7f76fd0..97a944f 100644 --- a/gnulib-local/m4/libxml.m4 +++ b/gnulib-local/m4/libxml.m4 @@ -1,4 +1,4 @@ -# libxml.m4 serial 5 (gettext-0.18) +# libxml.m4 serial 6 (gettext-0.18.2) dnl Copyright (C) 2006, 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -38,8 +38,10 @@ AC_DEFUN([gl_LIBXML], dnl one that built the library. AC_LIB_LINKFLAGS_BODY([xml2]) LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV" - AC_TRY_LINK([#include ], - [xmlCheckVersion (0);], + AC_TRY_LINK([[#include + #include + ]], + [[xmlCheckVersion (0); xmlFree ((void *) 0);]], [gl_cv_libxml=yes gl_cv_LIBXML="$LIBXML2 $LIBICONV" gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" @@ -47,8 +49,10 @@ AC_DEFUN([gl_LIBXML], if test "$gl_cv_libxml" != yes; then gl_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCXML2" - AC_TRY_LINK([#include ], - [xmlCheckVersion (0);], + AC_TRY_LINK([[#include + #include + ]], + [[xmlCheckVersion (0); xmlFree ((void *) 0);]], [gl_cv_libxml=yes gl_cv_LIBXML="$LIBXML2 $LIBICONV" gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" @@ -72,8 +76,10 @@ AC_DEFUN([gl_LIBXML], fi if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir" - AC_TRY_LINK([#include ], - [xmlCheckVersion (0);], + AC_TRY_LINK([[#include + #include + ]], + [[xmlCheckVersion (0); xmlFree ((void *) 0);]], [gl_cv_libxml=yes gl_cv_LIBXML="$LIBXML2 $LIBICONV" gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" -- cgit v1.1