Also disable it immediately for the mingw build because it's not available there. Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- libvirt.spec.in | 2 ++ meson.build | 8 ++++++++ meson_options.txt | 1 + 3 files changed, 11 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 86af13a861..2bc4aa98d4 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1369,6 +1369,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dapparmor_profiles=disabled \ -Dsecdriver_apparmor=disabled \ -Dudev=enabled \ + -Djson_c=disabled \ -Dyajl=enabled \ %{?arg_sanlock} \ -Dlibpcap=enabled \ @@ -1441,6 +1442,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dfuse=disabled \ -Dglusterfs=disabled \ -Dhost_validate=disabled \ + -Djson_c=disabled \ -Dlibiscsi=disabled \ -Dnbdkit=disabled \ -Dnbdkit_config_default=disabled \ diff --git a/meson.build b/meson.build index 0c7ae1b68b..855df79e62 100644 --- a/meson.build +++ b/meson.build @@ -1018,6 +1018,13 @@ glusterfs_dep = dependency('glusterfs-api', version: '>=' + glusterfs_version, r gnutls_version = '3.6.0' gnutls_dep = dependency('gnutls', version: '>=' + gnutls_version) +json_c_version = '0.14' +json_c_dep = dependency('json-c', version: '>=' + json_c_version, required: get_option('json_c')) +if json_c_dep.found() + conf.set('WITH_JSON_C', 1) + conf.set('WITH_JSON', 1) +endif + # Check for BSD kvm (kernel memory interface) if host_machine.system() == 'freebsd' libkvm_dep = cc.find_library('kvm') @@ -2343,6 +2350,7 @@ libs_summary = { 'dlopen': dlopen_dep.found(), 'fuse': fuse_dep.found(), 'glusterfs': glusterfs_dep.found(), + 'json-c': json_c_dep.found(), 'libiscsi': libiscsi_dep.found(), 'libkvm': libkvm_dep.found(), 'libnbd': libnbd_dep.found(), diff --git a/meson_options.txt b/meson_options.txt index 2d440c63d8..9b1610fcfe 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -28,6 +28,7 @@ option('capng', type: 'feature', value: 'auto', description: 'cap-ng support') option('curl', type: 'feature', value: 'auto', description: 'curl support') option('fuse', type: 'feature', value: 'auto', description: 'fuse support') option('glusterfs', type: 'feature', value: 'auto', description: 'glusterfs support') +option('json_c', type: 'feature', value: 'auto', description: 'JSON-C support') option('libiscsi', type: 'feature', value: 'auto', description: 'libiscsi support') option('libnl', type: 'feature', value: 'auto', description: 'libnl support') option('libpcap', type: 'feature', value: 'auto', description: 'libpcap support') -- 2.46.0