From: Daniel P. Berrangé Date: Fri, 13 Nov 2020 10:43:04 +0000 (+0000) Subject: meson: assume pkg-config support for yajl X-Git-Tag: v6.10.0-rc1~126 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7b42f332782844fa058ab553c846344f3e7b408c;p=thirdparty%2Flibvirt.git meson: assume pkg-config support for yajl Per the platform support rules, we no longer need to consider SLES 12 as a target, and so can now assume pkg-config support in yajl. Reviewed-by: Michal Privoznik Signed-off-by: Daniel P. Berrangé --- diff --git a/meson.build b/meson.build index cecaad199d..816cf97a19 100644 --- a/meson.build +++ b/meson.build @@ -1460,25 +1460,7 @@ else endif yajl_version = '2.0.3' -if not get_option('yajl').disabled() - yajl_dep = dependency('yajl', version: '>=' + yajl_version, required: false) - # 2.0.3 was the version where the pkg-config file was first added - # SLES 12 and openSUSE Leap 42.3 still use 2.0.1 - # TODO: delete this in July 2020 - 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 ') - if not has_func and get_option('yajl').enabled() - error('yajl >= @0@ was not found'.format(yajl_version)) - elif not has_func - yajl_dep = dependency('', required: false) - endif - endif - endif -else - yajl_dep = dependency('', required: false) -endif +yajl_dep = dependency('yajl', version: '>=' + yajl_version, required: get_option('yajl')) if yajl_dep.found() conf.set('WITH_YAJL', 1) endif