1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-02-03 17:47:15 +03:00

meson: fix yajl detection

yajl_tree_parse is declared in yajl/yajl_tree.h
autoconf is more forgiving, the error did not trigger because
yajl_tree_parse is not actually used.

Fixes: 44b8df4cb4b3f0c143e0330f543812e6bcd5c9f0
Fixes: 88ab32a4e555f67dae3204fbc3bcf63d3da8ad2b
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Olaf Hering 2020-11-13 00:01:39 +01:00 committed by Andrea Bolognani
parent d2d23aa2a6
commit f76f6d1556

View File

@ -1468,7 +1468,7 @@ if not get_option('yajl').disabled()
if not yajl_dep.found()
yajl_dep = cc.find_library('yajl', required: get_option('yajl'))
if yajl_dep.found()
has_func = cc.has_function('yajl_tree_parse', dependencies: yajl_dep, prefix: '#include <yajl/yajl_common.h>')
has_func = cc.has_function('yajl_tree_parse', dependencies: yajl_dep, prefix: '#include <yajl/yajl_tree.h>')
if not has_func and get_option('yajl').enabled()
error('yajl >= @0@ was not found'.format(yajl_version))
elif not has_func