From 46ccbea870c9e2a66a42a8b9933efba380604a52 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Mon, 19 Dec 2016 15:16:05 +0100 Subject: [PATCH] m4/virt-libxml: use only pkg-config to check for libxml2 Pkg-config file libxml-2.0.pc was introduced in libxml2-2.2.4 and we require at least 2.6.0 so the crazy xml2-config check can be dropped. Signed-off-by: Pavel Hrdina --- m4/virt-libxml.m4 | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/m4/virt-libxml.m4 b/m4/virt-libxml.m4 index 3e1c04f167..6d3ae9a14e 100644 --- a/m4/virt-libxml.m4 +++ b/m4/virt-libxml.m4 @@ -23,7 +23,6 @@ AC_DEFUN([LIBVIRT_ARG_LIBXML], [ AC_DEFUN([LIBVIRT_CHECK_LIBXML], [ LIBXML_REQUIRED="2.6.0" - LIBXML_CONFIG="xml2-config" LIBXML_CFLAGS="" LIBXML_LIBS="" LIBXML_FOUND="no" @@ -35,24 +34,7 @@ AC_DEFUN([LIBVIRT_CHECK_LIBXML], [ PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED, [LIBXML_FOUND=yes], [LIBXML_FOUND=no]) fi if test "$LIBXML_FOUND" = "no" ; then - if test "x$with_libxml" != "xcheck" ; then - LIBXML_CONFIG=$with_libxml/bin/$LIBXML_CONFIG - fi - AC_MSG_CHECKING(libxml2 $LIBXML_CONFIG >= $LIBXML_REQUIRED ) - if ! $LIBXML_CONFIG --version > /dev/null 2>&1 ; then - AC_MSG_ERROR([Could not find libxml2 anywhere (see config.log for details).]) - fi - vers=`$LIBXML_CONFIG --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` - minvers=`echo $LIBXML_REQUIRED | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` - if test "$vers" -ge "$minvers" ; then - LIBXML_LIBS="`$LIBXML_CONFIG --libs`" - LIBXML_CFLAGS="`$LIBXML_CONFIG --cflags`" - LIBXML_FOUND="yes" - AC_MSG_RESULT(yes) - else - AC_MSG_ERROR( - [You need at least libxml2 $LIBXML_REQUIRED for this version of libvirt]) - fi + AC_MSG_ERROR([libxml2 >= $LIBXML_REQUIRED is required for libvirt]) fi AC_SUBST([LIBXML_CFLAGS])