]> xenbits.xensource.com Git - libvirt.git/commitdiff
meson: Improve network driver enablement logic
authorAndrea Bolognani <abologna@redhat.com>
Fri, 3 Dec 2021 13:06:54 +0000 (14:06 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 6 Dec 2021 10:13:51 +0000 (11:13 +0100)
The Homebrew package explicitly enables this driver despite us
disabling it by default on macOS, so it must be functional to
at least some extent and certainly can't be causing any build
failures.

Additionally, if the user has explicitly asked for the network
driver to be enabled but libvirtd is disabled for whatever
reason, we should error out instead of silently disabling the
network driver.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
meson.build

index ba2f0d21dedd84192e871c928e4dfdc83981319b..cea8bbfa0cc389d2995454575814a4422672aa55 100644 (file)
@@ -1645,10 +1645,10 @@ if not get_option('driver_ch').disabled() and host_machine.system() == 'linux' a
   endif
 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'
+if not get_option('driver_network').disabled() and conf.has('WITH_LIBVIRTD')
   conf.set('WITH_NETWORK', 1)
+elif get_option('driver_network').enabled()
+  error('libvirtd must be enabled to build the network driver')
 endif
 
 if udev_dep.found() and conf.has('WITH_LIBVIRTD')