From: Bruno Haible Date: Sat, 16 Aug 2008 13:52:26 +0000 (+0000) Subject: Recognize installed libxml2 version 2.6.x. X-Git-Tag: v0.18~375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50a9821d43912801ac3620eb27ad54964635dae9;p=thirdparty%2Fgettext.git Recognize installed libxml2 version 2.6.x. --- diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index 9bfead027..63b5d5255 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,3 +1,11 @@ +2008-08-16 Bruno Haible + + Recognize installed libxml2 version 2.6.x. + * m4/libxml.m4 (gl_LIBXML): Determine libxml2_include_dir by looking + for as well. + Reported by Steve Trotman + via . + 2008-05-18 Bruno Haible * modules/propername: Remove file, moved to gnulib. diff --git a/gnulib-local/m4/libxml.m4 b/gnulib-local/m4/libxml.m4 index 71d2abc6d..7f76fd0c1 100644 --- a/gnulib-local/m4/libxml.m4 +++ b/gnulib-local/m4/libxml.m4 @@ -1,5 +1,5 @@ -# libxml.m4 serial 4 (gettext-0.17) -dnl Copyright (C) 2006 Free Software Foundation, Inc. +# libxml.m4 serial 5 (gettext-0.18) +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, dnl with or without modifications, as long as this notice is preserved. @@ -56,17 +56,30 @@ AC_DEFUN([gl_LIBXML], ]) if test "$gl_cv_libxml" != yes; then dnl Often the include files are installed in /usr/include/libxml2. - AC_TRY_LINK([#include ], - [xmlCheckVersion (0);], - [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h]) - libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'` - if test -d "$libxml2_include_dir"; then - gl_cv_libxml=yes + dnl In libxml2-2.5, is self-contained. + dnl In libxml2-2.6, it includes which is + dnl self-contained. + libxml2_include_dir= + AC_TRY_CPP([#include ], + [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h]) + libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'` + ]) + if test -z "$libxml2_include_dir"; then + AC_TRY_CPP([#include ], + [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h]) + libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'` + ]) + 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);], + [gl_cv_libxml=yes gl_cv_LIBXML="$LIBXML2 $LIBICONV" gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" gl_cv_INCXML="-I$libxml2_include_dir" - fi - ]) + ]) + fi fi CPPFLAGS="$gl_save_CPPFLAGS" fi