[PATCH 14/89] m4/virt-libxml: use only pkg-config to check for libxml2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <phrdina@xxxxxxxxxx>
---
 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 8bb092f610..a683f75e69 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" != "xyes" ; 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])
-- 
2.11.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux