From 1ae18b02965f1c3c6f7a1bcf0b7ed1f0a81af5e6 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 24 Oct 2017 11:14:14 +0300 Subject: meson: don't assume xmlrpc-c-config is there xmlrpc is an optional dependency. If pkg-config can't find it, don't assume xmlrpc-c-config will be there either. Make xmlrpc-c-config optional too. Fixes error: Meson encountered an error in file meson.build, line 73, column 1: Program or command 'xmlrpc-c-config' not foundor not executable Fixes: 892abc602a8a ("meson: Add fallback for xmlrpc discovery") Cc: Arkadiusz Hiler Signed-off-by: Jani Nikula Reviewed-by: Arkadiusz Hiler --- meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index ac991c2f..fb81c4db 100644 --- a/meson.build +++ b/meson.build @@ -69,9 +69,10 @@ xmlrpc = dependency('xmlrpc', required : false) xmlrpc_util = dependency('xmlrpc_util', required : false) xmlrpc_client = dependency('xmlrpc_client', required : false) -if not xmlrpc.found() - libs_cmd = run_command('xmlrpc-c-config', 'client', '--libs') - cflags_cmd = run_command('xmlrpc-c-config', 'client', '--cflags') +xmlrpc_cmd = find_program('xmlrpc-c-config', required : false) +if not xmlrpc.found() and xmlrpc_cmd.found() + libs_cmd = run_command(xmlrpc_cmd, 'client', '--libs') + cflags_cmd = run_command(xmlrpc_cmd, 'client', '--cflags') if libs_cmd.returncode() == 0 and cflags_cmd.returncode() == 0 xmlrpc = declare_dependency(compile_args: cflags_cmd.stdout().strip().split(), -- cgit v1.2.3