[PATCH 25/89] m4/virt-libpcap: error out if asked for libpcap but it was not found

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 m4/virt-libpcap.m4 | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/m4/virt-libpcap.m4 b/m4/virt-libpcap.m4
index 9cf47e66ab..1175c195bc 100644
--- a/m4/virt-libpcap.m4
+++ b/m4/virt-libpcap.m4
@@ -26,7 +26,6 @@ AC_DEFUN([LIBVIRT_CHECK_LIBPCAP], [
   LIBPCAP_CONFIG="pcap-config"
   LIBPCAP_CFLAGS=""
   LIBPCAP_LIBS=""
-  LIBPCAP_FOUND="no"
 
   if test "x$with_libpcap" != "xno"; then
     case $with_libpcap in
@@ -36,21 +35,22 @@ AC_DEFUN([LIBVIRT_CHECK_LIBPCAP], [
     AS_IF([test "x$LIBPCAP_CONFIG" != "x"], [
       AC_MSG_CHECKING(libpcap $LIBPCAP_CONFIG >= $LIBPCAP_REQUIRED )
       if ! $LIBPCAP_CONFIG --libs > /dev/null 2>&1 ; then
+        if test "x$with_libpcap" != "xcheck"; then
+          AC_MSG_ERROR([You must install libpcap >= $LIBPCAP_REQUIRED to compile libvirt])
+        fi
         AC_MSG_RESULT(no)
+        with_libpcap="no"
       else
         LIBPCAP_LIBS="`$LIBPCAP_CONFIG --libs`"
         LIBPCAP_CFLAGS="`$LIBPCAP_CONFIG --cflags`"
-        LIBPCAP_FOUND="yes"
+        with_libpcap="yes"
         AC_MSG_RESULT(yes)
       fi
     ])
   fi
 
-  if test "x$LIBPCAP_FOUND" = "xyes"; then
+  if test "x$with_libpcap" = "xyes"; then
     AC_DEFINE_UNQUOTED([HAVE_LIBPCAP], 1, [whether libpcap can be used])
-    with_libpcap="yes"
-  else
-    with_libpcap="no"
   fi
 
   AC_SUBST([LIBPCAP_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