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: 44b8df4cb4
Fixes: 88ab32a4e5
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