diff --git a/configure.ac b/configure.ac index 771242e39f..2740a9f4a5 100644 --- a/configure.ac +++ b/configure.ac @@ -97,10 +97,8 @@ dnl dnl Virtualization drivers check dnl -LIBVIRT_DRIVER_ARG_NETWORK LIBVIRT_DRIVER_ARG_INTERFACE -LIBVIRT_DRIVER_CHECK_NETWORK LIBVIRT_DRIVER_CHECK_INTERFACE @@ -285,7 +283,6 @@ AC_MSG_NOTICE([=====================]) AC_MSG_NOTICE([]) AC_MSG_NOTICE([Drivers]) AC_MSG_NOTICE([]) -LIBVIRT_DRIVER_RESULT_NETWORK LIBVIRT_DRIVER_RESULT_INTERFACE AC_MSG_NOTICE([]) AC_MSG_NOTICE([Storage Drivers]) diff --git a/m4/virt-driver-network.m4 b/m4/virt-driver-network.m4 deleted file mode 100644 index b98ce07c9c..0000000000 --- a/m4/virt-driver-network.m4 +++ /dev/null @@ -1,51 +0,0 @@ -dnl The network driver -dnl -dnl Copyright (C) 2016 Red Hat, Inc. -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library. If not, see -dnl . -dnl - -AC_DEFUN([LIBVIRT_DRIVER_ARG_NETWORK], [ - LIBVIRT_ARG_WITH([NETWORK], [with virtual network driver], [yes]) -]) - -AC_DEFUN([LIBVIRT_DRIVER_CHECK_NETWORK], [ - AC_REQUIRE([LIBVIRT_DRIVER_CHECK_LIBVIRTD]) - AC_REQUIRE([LIBVIRT_DRIVER_CHECK_QEMU]) - AC_REQUIRE([LIBVIRT_DRIVER_CHECK_LXC]) - - dnl there's no use compiling the network driver without the libvirt - dnl daemon, nor compiling it for macOS, where it breaks the compile - - if test "$with_libvirtd" = "no" || test "$with_macos" = "yes"; then - with_network=no - fi - - if test "$with_network" = "yes" ; then - AC_DEFINE_UNQUOTED([WITH_NETWORK], 1, [whether network driver is enabled]) - fi - AM_CONDITIONAL([WITH_NETWORK], [test "$with_network" = "yes"]) - - with_bridge=no - if test "$with_qemu:$with_lxc:$with_network" != "no:no:no"; then - with_bridge=yes - AC_DEFINE_UNQUOTED([WITH_BRIDGE], 1, [whether bridge code is needed]) - fi - AM_CONDITIONAL([WITH_BRIDGE], [test "$with_bridge" = "yes"]) -]) - -AC_DEFUN([LIBVIRT_DRIVER_RESULT_NETWORK], [ - LIBVIRT_RESULT([Network], [$with_network]) -]) diff --git a/meson.build b/meson.build index f85ce4e26d..fb6f0d5dd4 100644 --- a/meson.build +++ b/meson.build @@ -1701,6 +1701,12 @@ elif get_option('driver_lxc').enabled() error('linux and remote_driver are required for LXC') endif +# there's no use compiling the network driver without the libvirt +# daemon, nor compiling it for macOS, where it breaks the compile +if not get_option('driver_network').disabled() and conf.has('WITH_LIBVIRTD') and host_machine.system() != 'darwin' + conf.set('WITH_NETWORK', 1) +endif + if not get_option('driver_openvz').disabled() and host_machine.system() == 'linux' conf.set('WITH_OPENVZ', 1) elif get_option('driver_openvz').enabled() @@ -1854,6 +1860,10 @@ elif get_option('secdriver_selinux').enabled() error('You must install the libselinux development package in order to compile libvirt.') endif +if conf.has('WITH_QEMU') or conf.has('WITH_LXC') or conf.has('WITH_NETWORK') + conf.set('WITH_BRIDGE', 1) +endif + # define top include directory @@ -1886,6 +1896,7 @@ driver_summary = { 'Bhyve': conf.has('WITH_BHYVE'), 'Test': conf.has('WITH_TEST'), 'Remote': conf.has('WITH_REMOTE'), + 'Network': conf.has('WITH_NETWORK'), 'Libvirtd': conf.has('WITH_LIBVIRTD'), } summary(driver_summary, section: 'Drivers', bool_yn: true) diff --git a/meson_options.txt b/meson_options.txt index fcf3b263cc..6ef11e82dd 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -54,6 +54,7 @@ option('driver_hyperv', type: 'feature', value: 'auto', description: 'Hyper-V dr option('driver_libvirtd', type: 'feature', value: 'auto', description: 'libvirtd driver') option('driver_libxl', type: 'feature', value: 'auto', description: 'libxenlight driver') option('driver_lxc', type: 'feature', value: 'auto', description: 'Linux Container driver') +option('driver_network', type: 'feature', value: 'auto', description: 'virtual network driver') option('driver_openvz', type: 'feature', value: 'auto', description: 'OpenVZ driver') option('driver_qemu', type: 'feature', value: 'auto', description: 'QEMU/KVM driver') option('qemu_user', type: 'string', value: '', description: 'username to run QEMU system instance as')