]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: assume pkg-config support for yajl
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 13 Nov 2020 10:43:04 +0000 (10:43 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 17 Nov 2020 10:18:48 +0000 (10:18 +0000)
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 <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
meson.build

index cecaad199d4ce22e09ddd9693934cd652d3ad52c..816cf97a19dd5f5dc773db4f5643dc0dba4e85e1 100644 (file)
@@ -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 <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
-        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