]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
libxml: Detect installed libxml2 versions which don't define xmlFree().
authorBruno Haible <bruno@clisp.org>
Sat, 4 Jun 2011 00:59:06 +0000 (02:59 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 7 Jun 2011 21:39:49 +0000 (23:39 +0200)
gnulib-local/ChangeLog
gnulib-local/m4/libxml.m4

index 08eca81614b94a9e5698787bb45f26646ffc21f5..1abdeabfe06d2fcfcda4e863e51da94bcf0e6ea5 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-03  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        Copyright: Use LGPL 2.1 instead of LGPL 2.0.
index 7f76fd0c1eb2513364682770f7293dbfb308dabc..97a944f960377a9bbaf243310d58f3c024d67575 100644 (file)
@@ -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 <libxml/xmlversion.h>],
-        [xmlCheckVersion (0);],
+      AC_TRY_LINK([[#include <libxml/xmlversion.h>
+                    #include <libxml/xmlmemory.h>
+                  ]],
+        [[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 <libxml/xmlversion.h>],
-          [xmlCheckVersion (0);],
+        AC_TRY_LINK([[#include <libxml/xmlversion.h>
+                      #include <libxml/xmlmemory.h>
+                    ]],
+          [[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 <libxml/xmlversion.h>],
-              [xmlCheckVersion (0);],
+            AC_TRY_LINK([[#include <libxml/xmlversion.h>
+                          #include <libxml/xmlmemory.h>
+                        ]],
+              [[xmlCheckVersion (0); xmlFree ((void *) 0);]],
               [gl_cv_libxml=yes
                gl_cv_LIBXML="$LIBXML2 $LIBICONV"
                gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV"