[libvirt PATCH 13/26] meson: Tweak XDR check

Andrea Bolognani abologna at redhat.com
Tue Jun 1 08:37:44 UTC 2021


Keep all the platform-specific code in one place.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 3ee8694886..14d6ce039f 100644
--- a/meson.build
+++ b/meson.build
@@ -1266,6 +1266,8 @@ if host_machine.system() == 'windows'
   xdr_dep = cc.find_library('portablexdr', required: false)
 elif host_machine.system() == 'linux'
   xdr_dep = dependency('libtirpc', required: false)
+elif host_machine.system() in [ 'freebsd', 'darwin' ]
+  xdr_dep = cc.find_library('c', required: false)
 else
   xdr_dep = declare_dependency()
 endif
@@ -1375,7 +1377,7 @@ endif
 # build driver options
 
 if get_option('driver_remote').enabled()
-  if not xdr_dep.found() and host_machine.system() not in [ 'freebsd', 'darwin' ]
+  if not xdr_dep.found()
     error('XDR is required for remote driver')
   endif
   conf.set('WITH_REMOTE', 1)
-- 
2.31.1




More information about the libvir-list mailing list