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

Re: [libvirt] [PATCH] Rework configure logic for virtualport support

On 09/28/2010 11:01 AM, Stefan Berger wrote:
In this patch I am reworking the logic around detecting virtual port
support and requiring the libnl dependency.

- It requires --with-macvtap and displays an error in case of
--without-macvtap --with-virtualport.
- It tests for availability of certain data in include files and
displays an error in case the include file is not at the correct level
and --with-virtualport was chosen
- displays 'checking' messages for macvtap and virtualport support and
- libnl support is required when macvtap is found or requested; if libnl
is not there, please supply without-macvtap

Signed-off-by: Stefan Berger <stefanb us ibm com>

diff --git a/configure.ac b/configure.ac
index 6100610..d94b510 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2058,6 +2058,7 @@ AC_ARG_WITH([macvtap],

+AC_MSG_CHECKING([whether to compile with macvtap support])
if test "$with_macvtap" != "no" ; then
AC_TRY_COMPILE([ #include <sys/socket.h>
#include <linux/rtnetlink.h> ],
@@ -2075,19 +2076,31 @@ if test "$with_macvtap" != "no" ; then
AC_DEFINE_UNQUOTED([WITH_MACVTAP], $val, [whether macvtap support is
AM_CONDITIONAL([WITH_MACVTAP], [test "$with_macvtap" = "yes"])

This part's nice.

-AC_TRY_COMPILE([ #include <sys/socket.h>
- #include <linux/rtnetlink.h> ],
- [ int x = IFLA_PORT_MAX; ],
- [ with_virtualport=yes ],
- [ with_virtualport=no ])
-if test "$with_virtualport" = "yes"; then
- val=1
- val=0
+if test "$with_virtualport" != "no"; then

Hmm - here you use $with_virtualport without adding an AC_ARG_WITH([virtualport]), which means the user doesn't have an easy way to set this variable via ./configure --with-virtualport.

I think we need a v2 that adds the AC_ARG_WITH.

-if test "$with_macvtap" = "yes" || test "$with_virtualport" = "yes"; then
+if test "$with_macvtap" = "yes"; then

So virtualport doesn't require libnl. The rest of your logic looks okay, once we get the AC_ARG_WITH sorted out.

Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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