From cc883e1c0c681c408c7d8767da0a02129329bf9e Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Wed, 26 May 2021 15:13:42 +0200 Subject: [PATCH] meson: Tweak XDR check Keep all the platform-specific code in one place. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 50df9a2e72..f81271598c 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)