From nobody Tue Feb 10 10:03:55 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1623152096; cv=none; d=zohomail.com; s=zohoarc; b=GrHb0ZhZsmQkYW1CEj1GhIlun3ngm1TiAIbKwDndzwrVMHQ/gqEf4IqWIBeABXC+Uu/IbYdegI2QfJYTYZYKwNtqXKAHo9vSSlgVDmPfUd/YOPsB6zse/dIe33fKQ2wUSTY9UHkZiiJxFJ74wzlsyYmd++yCL/kCSOf8+ymwGRw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623152096; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=x9Fn8aGSUN1MXpHE+pv+qJcB/2aEHuqSvmuUZb8Mu0g=; b=hkirhpPKYSwxxvQcJa0TLWsC591rP4wyVxTqahVVFfsUwvf6frFS/+QrfiynbyHnHc9iMRlHlC4PTBJfKrbl3wOvKnoVB+e7cZp/Y7TKUq8NvZr3tMzdl7zqxrlaZwv+GCj8elfJhfoegWWjjr/961LatGGzqZPMw/QLYZPYEOE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623152096140768.449169134394; Tue, 8 Jun 2021 04:34:56 -0700 (PDT) Received: from localhost ([::1]:40154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqa0T-0006Nu-P6 for importer@patchew.org; Tue, 08 Jun 2021 07:34:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqZpF-0006cy-CV for qemu-devel@nongnu.org; Tue, 08 Jun 2021 07:23:17 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:42721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqZpD-00081J-EK for qemu-devel@nongnu.org; Tue, 08 Jun 2021 07:23:16 -0400 Received: by mail-wr1-x432.google.com with SMTP id c5so21119024wrq.9 for ; Tue, 08 Jun 2021 04:23:14 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id i9sm15388621wrn.54.2021.06.08.04.23.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 04:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x9Fn8aGSUN1MXpHE+pv+qJcB/2aEHuqSvmuUZb8Mu0g=; b=iaXHm1dI9McIFrWTMHlk7alsajwKopdOxeB8xR31ON7VtoZYZifHFJ5OYrONzZ/vjU IdRU2pvzGClthwCNszXUYkxsxkzXFecmcEJuKJidDTGClU2NNY+6JHwOy0WqsygnD3FL xPCTGkJPXlCa19NLqz6UcUlBIySvsows6ig8PCTk6i2YLnUJKM6mukGOwXWiXLR4tHmJ +9MXr2pU+kub64nQge0DivGkK4JArzbZVvRJAZJmtrNd/v/M1J4ZyrRoZZfKiP746MH1 Knl0XxIq2ITN+GWBmcozTCRQph1X1IceEeX2tiMmQxiDAlpiuAOJu0BYUwmPqkHmrM8r qPeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=x9Fn8aGSUN1MXpHE+pv+qJcB/2aEHuqSvmuUZb8Mu0g=; b=CK2QM8YZIMSbDv3Ep9bbqvbpvDCjnCydcBE5GRacgLoncBLaU3kTXsDP3wVN1zk5gy zFaNAkJdkKAdBrJoNEwmCoBz5nqu/imaKcT8JrhIfcHx+3d/qilAJ8HBDdV6Gq7CyqpS WULTEG605MKCgW4PLMpG1sDUZo2z1YwsXo0gAVWHjlwup6tWADbSMhyGI0vrm3tDcEYA oSYyDlBhyNZwC+Mm8i9q53TwhrqhehOwfD0N71ucgIqPaQ+QNaAsSYDiTgSBq22szVtv SvU1LD3qlLcqfRsvOzg/gnJIYUXjeQXhYlvtxyXOiRWO42+ndV7rg2jvvgnoyYdgnizp iyAA== X-Gm-Message-State: AOAM532G2Zz9Sjg9f95UGBqjJJfrC7shzkqqO0GzMY022dS4V7MMH6Cy iurRPT5nc3Rm5Y2pb42EwKgkrw1czh1zsA== X-Google-Smtp-Source: ABdhPJxaOI6sk0j5NagF9P/5H41LAupHvzBm+kNRqaMueo5DbWe/tvyFwrGJGSh79JAnqmByBTqdPQ== X-Received: by 2002:adf:e3cf:: with SMTP id k15mr21672466wrm.403.1623151393808; Tue, 08 Jun 2021 04:23:13 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 12/26] configure, meson: convert libpmem detection to meson Date: Tue, 8 Jun 2021 13:22:47 +0200 Message-Id: <20210608112301.402434-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210608112301.402434-1-pbonzini@redhat.com> References: <20210608112301.402434-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 --- configure | 24 ++++-------------------- meson.build | 8 ++++---- meson_options.txt | 2 ++ 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/configure b/configure index bd675f2254..8389a6f73f 100755 --- a/configure +++ b/configure @@ -427,7 +427,7 @@ qed=3D${default_feature:-yes} parallels=3D${default_feature:-yes} libxml2=3D"$default_feature" debug_mutex=3D"no" -libpmem=3D"$default_feature" +libpmem=3D"auto" default_devices=3D"true" plugins=3D"no" fuzzing=3D"no" @@ -1504,9 +1504,9 @@ for opt do ;; --disable-debug-mutex) debug_mutex=3Dno ;; - --enable-libpmem) libpmem=3Dyes + --enable-libpmem) libpmem=3Ddisabled ;; - --disable-libpmem) libpmem=3Dno + --disable-libpmem) libpmem=3Denabled ;; --enable-xkbcommon) xkbcommon=3D"enabled" ;; @@ -4934,22 +4934,6 @@ EOF fi fi =20 -########################################## -# check for libpmem - -if test "$libpmem" !=3D "no"; then - if $pkg_config --exists "libpmem"; then - libpmem=3D"yes" - libpmem_libs=3D$($pkg_config --libs libpmem) - libpmem_cflags=3D$($pkg_config --cflags libpmem) - else - if test "$libpmem" =3D "yes" ; then - feature_not_found "libpmem" "Install nvml or pmdk" - fi - libpmem=3D"no" - fi -fi - ########################################## # check for slirp =20 @@ -6086,7 +6070,7 @@ if test "$skip_meson" =3D no; then -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ -Dlibnfs=3D$libnfs -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev= =3D$libudev\ -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse \ - -Dlibdaxctl=3D$libdaxctl \ + -Dlibdaxctl=3D$libdaxctl -Dlibpmem=3D$libpmem \ -Dgnutls=3D$gnutls -Dnettle=3D$nettle -Dgcrypt=3D$gcrypt -Dauth_pa= m=3D$auth_pam \ -Dzstd=3D$zstd -Dseccomp=3D$seccomp -Dvirtfs=3D$virtfs -Dcap_ng=3D= $cap_ng \ -Dattr=3D$attr -Ddefault_devices=3D$default_devices -Dvirglrendere= r=3D$virglrenderer \ diff --git a/meson.build b/meson.build index f1ece39736..8563443865 100644 --- a/meson.build +++ b/meson.build @@ -1011,9 +1011,9 @@ if not get_option('libusb').auto() or have_system endif =20 libpmem =3D not_found -if 'CONFIG_LIBPMEM' in config_host - libpmem =3D declare_dependency(compile_args: config_host['LIBPMEM_CFLAGS= '].split(), - link_args: config_host['LIBPMEM_LIBS'].spli= t()) +if not get_option('libpmem').auto() or have_system + libpmem =3D dependency('libpmem', required: get_option('libpmem'), + method: 'pkg-config', kwargs: static_kwargs) endif libdaxctl =3D not_found if not get_option('libdaxctl').auto() or have_system @@ -2836,7 +2836,7 @@ summary_info +=3D {'zstd support': zstd.found()} summary_info +=3D {'NUMA host support': config_host.has_key('CONFIG_NUMA')} summary_info +=3D {'libxml2': config_host.has_key('CONFIG_LIBXML= 2')} summary_info +=3D {'capstone': capstone_opt =3D=3D 'disabled' ? f= alse : capstone_opt} -summary_info +=3D {'libpmem support': config_host.has_key('CONFIG_LIBPME= M')} +summary_info +=3D {'libpmem support': libpmem.found()} summary_info +=3D {'libdaxctl support': libdaxctl.found()} summary_info +=3D {'libudev': libudev.found()} summary_info +=3D {'FUSE lseek': fuse_lseek.found()} diff --git a/meson_options.txt b/meson_options.txt index 46180000fd..b23174d0a1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -86,6 +86,8 @@ option('gcrypt', type : 'feature', value : 'auto', description: 'libgcrypt cryptography support') option('libdaxctl', type : 'feature', value : 'auto', description: 'libdaxctl support') +option('libpmem', type : 'feature', value : 'auto', + description: 'libpmem support') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') option('libusb', type : 'feature', value : 'auto', --=20 2.31.1