From nobody Tue Nov 18 09:20:15 2025 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=1608573002; cv=none; d=zohomail.com; s=zohoarc; b=ZtNpHj65PfXoTdVIk3CA95YGC6ipKRkbDEEPVFTC5u+dnG2Ej5J5O8wArkhWBS5CMWTxfBOmPdYFjh6ywXwRAuR5qJpR/RiQqhBRifDsTTu/P0cWw/mz6SA+w8b7FaqgU9TJzU2SQGyYmv0G/mMnnCdPsSp7JW4bCPLUL5ZnHTo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608573002; 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=S4JzR2yr+0oCeHu8Tpy2fW0hmDHgTGenqGpT5qkUnxc=; b=iKs31mKjKHlYzK2y2uIzCt8smMj3inX9fAcW8IHXpzSNJbYzeduAxqQQRaGL1hDdLXraD/75cgsCstwr64CXJ+sYiK5+BPP8cYy3v65+NjpEp/ZS7PvAnfiQz7NqiU4IMU7kLzCuz/HZBPlzGgv7y49Hg/0dioDfSjVU/vbUtiE= 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 1608573002263420.6729236205207; Mon, 21 Dec 2020 09:50:02 -0800 (PST) Received: from localhost ([::1]:56098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krNF2-0002IA-HI for importer@patchew.org; Mon, 21 Dec 2020 10:36:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRL-000513-Eh for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:35 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:37026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRE-0007sI-3w for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:34 -0500 Received: by mail-wm1-x331.google.com with SMTP id q75so11189640wme.2 for ; Mon, 21 Dec 2020 06:45:27 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:26 -0800 (PST) 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=S4JzR2yr+0oCeHu8Tpy2fW0hmDHgTGenqGpT5qkUnxc=; b=e0THxxveWRmhxNHqxBAnnA2gkwzSqN5qRriw6kiqQ7l/ZR1RNtzektVifbwNWoMuFm LIE242Y+OarvIj4n/9EXLtzBFfupBFAhdLHFV+W5m33rezkEJKXwN0tnhXkFF3WMhFxc KtyPtuKyWmdXafbD2Jojgt6T1jlmUAmvOq8bfHreITmPl74ImojtZIGY7UhWyt7nd3rB phl0VE5A+nT/DAXXA17IaadAZOH4Ww2RLst2NwwAWn7/c28qdWHYfVS57fELLLzL6pTi eJMoTnkt5ZlTL572Pz6K+FVeXZjmCJQYGBYiPE59JKt4xD3cL317mDQEGWn3xOWJvpzC J80g== 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=S4JzR2yr+0oCeHu8Tpy2fW0hmDHgTGenqGpT5qkUnxc=; b=RN8HhPb4Q7oxjSZw+8xWIgYRCGt3y5LLXmri9+JAbGZuaFo3urJeLBWwFPREF9jadJ pLKrIBGcKhr3q2x3LtpnM7y+b8bd5HcJTaYfiP2hCVqu3rwawmQcuIaLrK9jaDY8u4CB FJMGhhZpbeO4ZQSe4ROuhiA/u/yvIlSfcaNrkwHKI/kiB47cv9LrT7b3hhXMh1HU7la7 hj08UTA0Ae76uW01ewpNl9AzUsIAbD5+4aqLObZhoMUBKnnMiDuX7DHLvnRzTZodTbzp Wo9tNHw/S+qrURnMQWtqCLl54iFIbE48Y7oXm/ubAtuYD/6w480muUCFMaLqCwkoLaaB y6Iw== X-Gm-Message-State: AOAM5337TZNG2af+kfKJvbI5BU11XTRZN08sj4rBPn4+qnqhIWKte0zZ 5a6s9MBv/y/pgobbsGBMQT+7fvulcms= X-Google-Smtp-Source: ABdhPJx3Qb1H0vU8hwhVauqrxHcpcc8xuCMgcFta2jyzo+3B2wcNQhrgWoXH7k1fYEnHpWTdHtZFhg== X-Received: by 2002:a1c:55ca:: with SMTP id j193mr17035861wmb.87.1608561926566; Mon, 21 Dec 2020 06:45:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 42/55] libnfs: convert to meson Date: Mon, 21 Dec 2020 15:44:34 +0100 Message-Id: <20201221144447.26161-43-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-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::331; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x331.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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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 --- configure | 27 ++++----------------------- meson.build | 9 ++++++--- meson_options.txt | 2 ++ 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/configure b/configure index 30084af631..9b38368427 100755 --- a/configure +++ b/configure @@ -406,7 +406,7 @@ vss_win32_sdk=3D"$default_feature" win_sdk=3D"no" want_tools=3D"$default_feature" libiscsi=3D"auto" -libnfs=3D"$default_feature" +libnfs=3D"auto" coroutine=3D"" coroutine_pool=3D"$default_feature" debug_stack_usage=3D"no" @@ -1142,9 +1142,9 @@ for opt do ;; --enable-libiscsi) libiscsi=3D"enabled" ;; - --disable-libnfs) libnfs=3D"no" + --disable-libnfs) libnfs=3D"disabled" ;; - --enable-libnfs) libnfs=3D"yes" + --enable-libnfs) libnfs=3D"enabled" ;; --enable-profiler) profiler=3D"yes" ;; @@ -5559,20 +5559,6 @@ if test "$have_ubsan" =3D "yes"; then QEMU_LDFLAGS=3D"-fsanitize=3Dundefined $QEMU_LDFLAGS" fi =20 -########################################## -# Do we have libnfs -if test "$libnfs" !=3D "no" ; then - if $pkg_config --atleast-version=3D1.9.3 libnfs; then - libnfs=3D"yes" - libnfs_libs=3D$($pkg_config --libs libnfs) - else - if test "$libnfs" =3D "yes" ; then - feature_not_found "libnfs" "Install libnfs devel >=3D 1.9.3" - fi - libnfs=3D"no" - fi -fi - ########################################## =20 # Exclude --warn-common with TSan to suppress warnings from the TSan libra= ries. @@ -6214,11 +6200,6 @@ if test "$zstd" =3D "yes" ; then echo "ZSTD_LIBS=3D$zstd_libs" >> $config_host_mak fi =20 -if test "$libnfs" =3D "yes" ; then - echo "CONFIG_LIBNFS=3Dy" >> $config_host_mak - echo "LIBNFS_LIBS=3D$libnfs_libs" >> $config_host_mak -fi - if test "$seccomp" =3D "yes"; then echo "CONFIG_SECCOMP=3Dy" >> $config_host_mak echo "SECCOMP_CFLAGS=3D$seccomp_cflags" >> $config_host_mak @@ -6780,7 +6761,7 @@ NINJA=3D$ninja $meson setup \ -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon -Du2f=3D$u2f -Dvirti= ofsd=3D$virtiofsd \ -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt -Dbrlapi=3D$b= rlapi \ -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ - -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev=3D$libudev\ + -Dlibnfs=3D$libnfs -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev= =3D$libudev\ -Ddocs=3D$docs -Dsphinx_build=3D$sphinx_build -Dinstall_blobs=3D$b= lobs \ -Dvhost_user_blk_server=3D$vhost_user_blk_server \ -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek \ diff --git a/meson.build b/meson.build index d1cbea169c..9ed3ee31f9 100644 --- a/meson.build +++ b/meson.build @@ -319,8 +319,10 @@ if 'CONFIG_LIBXML2' in config_host link_args: config_host['LIBXML2_LIBS'].spli= t()) endif libnfs =3D not_found -if 'CONFIG_LIBNFS' in config_host - libnfs =3D declare_dependency(link_args: config_host['LIBNFS_LIBS'].spli= t()) +if not get_option('libnfs').auto() or have_block + libnfs =3D dependency('libnfs', version: '>=3D1.9.3', + required: get_option('libnfs'), + method: 'pkg-config', static: enable_static) endif libattr =3D not_found if 'CONFIG_ATTR' in config_host @@ -930,6 +932,7 @@ if glusterfs.found() config_host_data.set('CONFIG_GLUSTERFS_IOCB_HAS_STAT', glusterfs_iocb_ha= s_stat) endif config_host_data.set('CONFIG_LIBISCSI', libiscsi.found()) +config_host_data.set('CONFIG_LIBNFS', libnfs.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_s= erver) @@ -2289,7 +2292,7 @@ summary_info +=3D {'usb net redir': config_host.h= as_key('CONFIG_USB_REDIR')} summary_info +=3D {'OpenGL support': config_host.has_key('CONFIG_OPENGL= ')} summary_info +=3D {'OpenGL dmabufs': config_host.has_key('CONFIG_OPENGL= _DMABUF')} summary_info +=3D {'libiscsi support': libiscsi.found()} -summary_info +=3D {'libnfs support': config_host.has_key('CONFIG_LIBNFS= ')} +summary_info +=3D {'libnfs support': libnfs.found()} summary_info +=3D {'build guest agent': config_host.has_key('CONFIG_GUEST_= AGENT')} if targetos =3D=3D 'windows' if 'WIN_SDK' in config_host diff --git a/meson_options.txt b/meson_options.txt index b562d4f1a6..4535bc4dc2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -52,6 +52,8 @@ option('glusterfs', type : 'feature', value : 'auto', description: 'Glusterfs block device driver') option('libiscsi', type : 'feature', value : 'auto', description: 'libiscsi userspace initiator') +option('libnfs', type : 'feature', value : 'auto', + description: 'libnfs block device driver') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') option('iconv', type : 'feature', value : 'auto', --=20 2.29.2