From nobody Mon Feb 9 09:32:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1591752420; cv=none; d=zohomail.com; s=zohoarc; b=AyXX6FycTs4o4hecji0XRn4HngC5DYxJj/qi7hCb8n4cbfdnAD2C4nhmJ4m1mRrX9ON4emYC1h1XiHrEPNkczkHxZiDDsQW4jp+4KqmphaILrKCEbJBiY7Wrv2wMGpUDL2gkYSahTneSEnsZGPKCTRXHfzfPsvyNdFBE36CnI4k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591752420; h=Content-Type:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=uAr6cRW2oN/6LKsqU305DfSt0KqvvzY4+K2y77ybqT0=; b=IZrShieND/g8RSfhRGeZRqvNBG1DEdv+re6zhB2UcZf/ok1aztuNG+ZYXzm1HA3Pwpw/FAZLxcy+n4sNdcq21nTwb8eqqzdA+1ZCfB6do53S8Lr3pZbtWFUnxAOuIvu42xGxeymUlscpmKxGnBaKkzX6vH9or0k300h9brx7DJg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1591752420965200.2350838281186; Tue, 9 Jun 2020 18:27:00 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-143-lnYOozy-OieJ_OmuzZxJsA-1; Tue, 09 Jun 2020 21:26:56 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6FBAE8014D9; Wed, 10 Jun 2020 01:26:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 533C37B912; Wed, 10 Jun 2020 01:26:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 25009180043E; Wed, 10 Jun 2020 01:26:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05A1QhBH027261 for ; Tue, 9 Jun 2020 21:26:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id E83AF10EE6E3; Wed, 10 Jun 2020 01:26:42 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E3D8510EE6D9 for ; Wed, 10 Jun 2020 01:26:40 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F2B34811768 for ; Wed, 10 Jun 2020 01:26:39 +0000 (UTC) Received: from mail-m24147.qiye.163.com (mail-m24147.qiye.163.com [220.194.24.147]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-415-o5Y1FZrMOXScueQDzRqwmg-1; Tue, 09 Jun 2020 21:26:36 -0400 Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp4 (Coremail) with SMTP id JedpCgCnxdh_NeBeVKS4Bw--.7295S4; Wed, 10 Jun 2020 09:21:13 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591752419; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:content-type:content-type: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uAr6cRW2oN/6LKsqU305DfSt0KqvvzY4+K2y77ybqT0=; b=VpxJzZbeOz09OrIwls0vvhZ3rHSkf7xIGI937QCsCp0thze+K2WinoHhoMvLI4P+aQTfxj YDnnPEJZgB/NCRtP4z7yDpKrI4nVnfcUvfNp3zwWGZzPXHdzvM83BU7vjwbFAnCSbDLSdS vPIKx9of4nBT5rU+Ppo+o480kL7BmHY= X-MC-Unique: lnYOozy-OieJ_OmuzZxJsA-1 X-MC-Unique: o5Y1FZrMOXScueQDzRqwmg-1 From: Shi Lei To: libvir-list@redhat.com Subject: [RFC 02/21] maint: Check libclang and its python3 binding Date: Wed, 10 Jun 2020 09:20:30 +0800 Message-Id: <20200610012049.10774-3-shi_lei@massclouds.com> In-Reply-To: <20200610012049.10774-1-shi_lei@massclouds.com> References: <20200610012049.10774-1-shi_lei@massclouds.com> X-CM-TRANSID: JedpCgCnxdh_NeBeVKS4Bw--.7295S4 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRvhFxUUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbiGQo-T1nkgmIUPQAAsX X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 2 X-Mimecast-Originator: redhat.com X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Make sure libclang and its python3 binding have been installed. Signed-off-by: Shi Lei --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index 6c8ac2f..747e52a 100644 --- a/configure.ac +++ b/configure.ac @@ -707,6 +707,18 @@ if test -z "$FLAKE8"; then AC_MSG_WARN(['flake8' binary is required to check python code style]) fi =20 +dnl Need libclang and its python3 binding to generate some functions +LIBCLANG_LINE=3D`ldconfig -p | grep libclang` +LIBCLANG_PATH=3D`expr "$LIBCLANG_LINE" : '.* =3D> \(.*\)$'` +if test -z "$LIBCLANG_PATH"; then + AC_MSG_ERROR([libclang is required by libvirt]) +fi +HAVE_PY3_CLANG=3D`python3 -c 'import clang.cindex;print("ok")' 2>/dev/null` +if test -z "$HAVE_PY3_CLANG"; then + AC_MSG_ERROR(['python3-clang' is required. Execute 'pip3 install clang= '.]) +fi +AC_SUBST(LIBCLANG_PATH) + dnl Python3 < 3.7 treats the C locale as 7-bit only. dnl We must force env vars so it treats it as UTF-8 dnl regardless of the user's locale. --=20 2.17.1