mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-08 07:15:46 +00:00
configure: Make libnl optional unless macvtap is required
If macvtap is required then libnl has to be available, otherwise libnl is optional.
This commit is contained in:
parent
1b68d3f099
commit
20991b937b
12
configure.ac
12
configure.ac
@ -2371,13 +2371,19 @@ dnl netlink library
|
|||||||
|
|
||||||
LIBNL_CFLAGS=""
|
LIBNL_CFLAGS=""
|
||||||
LIBNL_LIBS=""
|
LIBNL_LIBS=""
|
||||||
|
have_libnl=no
|
||||||
|
|
||||||
if test "$with_macvtap" = "yes"; then
|
if test "$with_linux" = "yes"; then
|
||||||
PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [
|
PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [
|
||||||
|
have_libnl=yes
|
||||||
|
AC_DEFINE_UNQUOTED([HAVE_LIBNL], 1, [whether the netlink library is available])
|
||||||
], [
|
], [
|
||||||
AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support])
|
if test "$with_macvtap" = "yes"; then
|
||||||
|
AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support])
|
||||||
|
fi
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
|
AM_CONDITIONAL([HAVE_LIBNL], [test "$have_libnl" = "yes"])
|
||||||
|
|
||||||
AC_SUBST([LIBNL_CFLAGS])
|
AC_SUBST([LIBNL_CFLAGS])
|
||||||
AC_SUBST([LIBNL_LIBS])
|
AC_SUBST([LIBNL_LIBS])
|
||||||
@ -2574,7 +2580,7 @@ AC_MSG_NOTICE([ pcap: $LIBPCAP_CFLAGS $LIBPCAP_LIBS])
|
|||||||
else
|
else
|
||||||
AC_MSG_NOTICE([ pcap: no])
|
AC_MSG_NOTICE([ pcap: no])
|
||||||
fi
|
fi
|
||||||
if test "$with_macvtap" = "yes" ; then
|
if test "$have_libnl" = "yes" ; then
|
||||||
AC_MSG_NOTICE([ nl: $LIBNL_CFLAGS $LIBNL_LIBS])
|
AC_MSG_NOTICE([ nl: $LIBNL_CFLAGS $LIBNL_LIBS])
|
||||||
else
|
else
|
||||||
AC_MSG_NOTICE([ nl: no])
|
AC_MSG_NOTICE([ nl: no])
|
||||||
|
Loading…
Reference in New Issue
Block a user