From nobody Sat Nov 23 17:01:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1723672572816701.9890126200542; Wed, 14 Aug 2024 14:56:12 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id C59C11596; Wed, 14 Aug 2024 17:56:11 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E636212E6; Wed, 14 Aug 2024 17:43:32 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id BADCB13D4; Wed, 14 Aug 2024 17:43:28 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 47C05140A for ; Wed, 14 Aug 2024 17:43:14 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-482-XiC9TvuuNuyFxpG4oPS9iA-1; Wed, 14 Aug 2024 17:43:12 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4FBC01955F4A for ; Wed, 14 Aug 2024 21:43:11 +0000 (UTC) Received: from hjs.brq.redhat.com (unknown [10.43.3.187]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9FA741955E8C for ; Wed, 14 Aug 2024 21:43:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1723671794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PyuErt3riThffEgZyRn4o/nTaY66cHRlpJqMohvaSHA=; b=GdQajtFqV4bSSfdZn1ByaWP1zuWkgevSQgnYnFlhcNuUriCkR+dwh7Pi00aYPsaAIXjH4b 2zTY6+tTs9/r/pk4TqNt+G3Qt5ycCEHq/jQr1N4sLgwuBlZAZxgWeNGkwJ2Jt1vmj0XON5 YuDC1F3oQkpEoSqZKXBUZjSPD8otjn4= X-MC-Unique: XiC9TvuuNuyFxpG4oPS9iA-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: devel@lists.libvirt.org Subject: [libvirt PATCH 05/20] meson: add option for building with json-c Date: Wed, 14 Aug 2024 23:40:20 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2DNYAZXARZ7LPOG7XOJKGE545OMFDILR X-Message-ID-Hash: 2DNYAZXARZ7LPOG7XOJKGE545OMFDILR X-MailFrom: jtomko@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1723672575187116600 Content-Type: text/plain; charset="utf-8" Also disable it immediately for the mingw build because it's not available there. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa --- libvirt.spec.in | 1 + meson.build | 7 +++++++ meson_options.txt | 1 + 3 files changed, 9 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 29101e74fe..ad0f4f784f 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1441,6 +1441,7 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/libvirt.spec) -Dfuse=3Ddisabled \ -Dglusterfs=3Ddisabled \ -Dhost_validate=3Ddisabled \ + -Djson_c=3Ddisabled \ -Dlibiscsi=3Ddisabled \ -Dnbdkit=3Ddisabled \ -Dnbdkit_config_default=3Ddisabled \ diff --git a/meson.build b/meson.build index f31485c395..39d6d700d3 100644 --- a/meson.build +++ b/meson.build @@ -1018,6 +1018,12 @@ glusterfs_dep =3D dependency('glusterfs-api', versio= n: '>=3D' + glusterfs_version, r gnutls_version =3D '3.6.0' gnutls_dep =3D dependency('gnutls', version: '>=3D' + gnutls_version) =20 +json_c_version =3D '0.14' +json_c_dep =3D dependency('json-c', version: '>=3D' + json_c_version, requ= ired: get_option('json_c')) +if json_c_dep.found() + conf.set('WITH_JSON_C', 1) +endif + # Check for BSD kvm (kernel memory interface) if host_machine.system() =3D=3D 'freebsd' libkvm_dep =3D cc.find_library('kvm') @@ -2342,6 +2348,7 @@ libs_summary =3D { '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', descripti= on: '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: 'glusterf= s support') +option('json_c', type: 'feature', value: 'auto', description: 'JSON-C supp= ort') option('libiscsi', type: 'feature', value: 'auto', description: 'libiscsi = support') option('libnl', type: 'feature', value: 'auto', description: 'libnl suppor= t') option('libpcap', type: 'feature', value: 'auto', description: 'libpcap su= pport') --=20 2.45.2