]> xenbits.xensource.com Git - libvirt.git/commitdiff
configure: tweak logic flow of virtport check
authorJustin Clift <jclift@redhat.com>
Wed, 29 Sep 2010 14:14:07 +0000 (00:14 +1000)
committerJustin Clift <jclift@redhat.com>
Wed, 29 Sep 2010 14:42:07 +0000 (00:42 +1000)
This fixes a small logic bug, where passing --without-macvtap
on the configure line, or otherwise indicating a lack of
support for macvtap, causes configure to bail.

configure.ac

index ee6f9b180b4f52a851be34f3bab6960ce637eab8..6c4e828621363c26aa754b5896599b37b12e2266 100644 (file)
@@ -2083,10 +2083,21 @@ AC_ARG_WITH([virtualport],
   [with_virtualport=${withval}],
   [with_virtualport=check])
 
-if test "$with_virtualport" != "no"; then
+dnl Warn the user and error out if they requested virtualport support with configure
+dnl options, but the required macvtap support isn't available
+
+if test "$with_virtualport" = "yes"; then
     if test "$with_macvtap" = "no"; then
         AC_MSG_ERROR([--with-virtualport requires --with-macvtap])
     fi
+fi
+
+dnl virtualport checks
+
+if test "$with_macvtap" != "yes"; then
+    with_virtualport=no
+fi
+if test "$with_virtualport" != "no"; then
     AC_MSG_CHECKING([whether to compile with virtual port support])
     AC_TRY_COMPILE([ #include <sys/socket.h>
                      #include <linux/rtnetlink.h> ],