diff options
author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2017-10-17 15:05:41 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2017-10-18 12:45:50 +0300 |
commit | 892abc602a8ae7434636b18891ea6bd47385f729 (patch) | |
tree | a378ce4ccaabd631f8bf9dd1dd060a739a666d04 | |
parent | e66027ceef6266ef72fc7485567f518d2ce48817 (diff) |
meson: Add fallback for xmlrpc discovery
Since Debian-likes (including Ubuntu) ship xmlrpc packages predating the
pkg-config era, we need to use xmlrpc-c-config to do the discovery.
Also this patch adds HAVE_CHAMELIUM flag to config.h to get rid of
"implicit declaration of function" warnings in case of meson build.
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
-rw-r--r-- | meson.build | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 310174a5..ac991c2f 100644 --- a/meson.build +++ b/meson.build @@ -69,9 +69,22 @@ 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') + + if libs_cmd.returncode() == 0 and cflags_cmd.returncode() == 0 + xmlrpc = declare_dependency(compile_args: cflags_cmd.stdout().strip().split(), + link_args : libs_cmd.stdout().strip().split()) + xmlrpc_util = declare_dependency() + xmlrpc_client = declare_dependency() + endif +endif + if pixman.found() and xmlrpc.found() and xmlrpc_util.found() and xmlrpc_client.found() chamelium = declare_dependency(dependencies : [ pixman, xmlrpc, xmlrpc_util, xmlrpc_client]) + config.set('HAVE_CHAMELIUM', 1) else chamelium = dependency('', required: false) endif |