]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Tweak XDR check
authorAndrea Bolognani <abologna@redhat.com>
Wed, 26 May 2021 13:13:42 +0000 (15:13 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 1 Jun 2021 12:30:39 +0000 (14:30 +0200)
Keep all the platform-specific code in one place.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
meson.build

index 50df9a2e729a8645adf36e3f077c86fdcc13a0d6..f81271598c7371d7b36895dd0447677ce3fdc215 100644 (file)
@@ -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)