From nobody Tue Feb 10 00:59:43 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633613183574834.3805290354999; Thu, 7 Oct 2021 06:26:23 -0700 (PDT) Received: from localhost ([::1]:43662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYTPi-0001zy-Ii for importer@patchew.org; Thu, 07 Oct 2021 09:26:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT8d-0005UY-HG for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:44 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:38705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYT8Z-0007nK-3I for qemu-devel@nongnu.org; Thu, 07 Oct 2021 09:08:43 -0400 Received: by mail-ed1-x52b.google.com with SMTP id dj4so22953070edb.5 for ; Thu, 07 Oct 2021 06:08:38 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o12sm791254edw.84.2021.10.07.06.08.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 06:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MWSGbwJ0q8s4flUFRXXK07L6Y49/dx9Mo1oHwdH0klU=; b=SDCu1G+YNkrV9qfDvh2SvQeYZORKoaScPVS72ndLfz8X2eOj3BKMDLULkIUsytTPwD ssXFzyvwweNthLVSj/5QRyBtNdFiZ1wtz6NU2si0zXv8Jjqa4TNc1ARZxhqPS1ScBhhH XASste0fq8oHxvIWFDW+8M1cfF7LMsPP5cR1FnbS2HAwCtYizpSxwIeNHTKp1q/nr50E ZbFukt5ULhJ/g0EJP2IjvLpD5kHoYJZOAM6ZO5ENrYaYSX8+ps7Krr8qPry8FedwlFUA /aENWWhUZjqAkx2S4Tl6eXZAgfZTJOjkb4/3BbGdpdgPKWHpKd0JcihR/cyxxorMDqb9 J3fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MWSGbwJ0q8s4flUFRXXK07L6Y49/dx9Mo1oHwdH0klU=; b=aYgO5TqExKUpKn7GaUww/ieBAooJSZWCF9t9aT/oRSa6NcLY/ZDrMed0gE0YDnL1TM enqbpmmf1Q1Gx8EcyeDiEsbNBzyKkTdsN1qdSUUloOlTUCnz5yFI7BdBWW2MTxD6QX8C r3NzxzYA7Je0C1hszM68FQKns4sCI7GlnN49sP6w+EPpyE2N50V82pt641SzU/4KPEEC doAKMVYvcwKyU2YJDadqQAWTr0ewdkM6XK7YrguqEnjbiegKVM36FsZ78HWtytmJ6JOr 5D7LI/hMku0I4SGVPjAhqGUyK/Mkf8RTn4zOf8DCppFCX1u3KVqwEMNfwaq525SsJjRa 7LCA== X-Gm-Message-State: AOAM531fkb1F2kDA60HZR7yH2ddhPmyE+AK/mLVUPmnFzgGjImN2UGdl dZS2ufqmTlUzBDiWzVy+Y6fwaMorMvg= X-Google-Smtp-Source: ABdhPJx8NyyCnkVjoEdlVBna05npsYM+uGdqwhh7Yv9gY/Koa0FHS/LnFFWZN6ffpEYVtt0OpCUtGQ== X-Received: by 2002:a17:907:110b:: with SMTP id qu11mr5474444ejb.380.1633612117701; Thu, 07 Oct 2021 06:08:37 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 16/24] configure, meson: move vde detection to meson Date: Thu, 7 Oct 2021 15:08:21 +0200 Message-Id: <20211007130829.632254-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211007130630.632028-1-pbonzini@redhat.com> References: <20211007130630.632028-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::52b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52b.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.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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) X-ZM-MESSAGEID: 1633613184677100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 35 ++++------------------------------- meson.build | 26 +++++++++++++++++++++++--- meson_options.txt | 2 ++ net/meson.build | 2 +- 4 files changed, 30 insertions(+), 35 deletions(-) diff --git a/configure b/configure index 86bc4b52d7..a2b1d54be8 100755 --- a/configure +++ b/configure @@ -301,7 +301,7 @@ libudev=3D"auto" mpath=3D"auto" vnc=3D"auto" sparse=3D"auto" -vde=3D"$default_feature" +vde=3D"auto" vnc_sasl=3D"auto" vnc_jpeg=3D"auto" vnc_png=3D"auto" @@ -1022,9 +1022,9 @@ for opt do ;; --enable-slirp=3Dsystem) slirp=3D"system" ;; - --disable-vde) vde=3D"no" + --disable-vde) vde=3D"disabled" ;; - --enable-vde) vde=3D"yes" + --enable-vde) vde=3D"enabled" ;; --disable-netmap) netmap=3D"no" ;; @@ -2901,30 +2901,6 @@ EOF fi fi =20 -########################################## -# vde libraries probe -if test "$vde" !=3D "no" ; then - vde_libs=3D"-lvdeplug" - cat > $TMPC << EOF -#include -int main(void) -{ - struct vde_open_args a =3D {0, 0, 0}; - char s[] =3D ""; - vde_open(s, s, &a); - return 0; -} -EOF - if compile_prog "" "$vde_libs" ; then - vde=3Dyes - else - if test "$vde" =3D "yes" ; then - feature_not_found "vde" "Install vde (Virtual Distributed Ethernet) = devel" - fi - vde=3Dno - fi -fi - ########################################## # netmap support probe # Apart from looking for netmap headers, we make sure that the host API ve= rsion @@ -4197,10 +4173,6 @@ if test "$slirp_smbd" =3D "yes" ; then echo "CONFIG_SLIRP_SMBD=3Dy" >> $config_host_mak echo "CONFIG_SMBD_COMMAND=3D\"$smbd\"" >> $config_host_mak fi -if test "$vde" =3D "yes" ; then - echo "CONFIG_VDE=3Dy" >> $config_host_mak - echo "VDE_LIBS=3D$vde_libs" >> $config_host_mak -fi if test "$netmap" =3D "yes" ; then echo "CONFIG_NETMAP=3Dy" >> $config_host_mak fi @@ -4750,6 +4722,7 @@ if test "$skip_meson" =3D no; then -Dalsa=3D$alsa -Dcoreaudio=3D$coreaudio -Ddsound=3D$dsound -Djack= =3D$jack -Doss=3D$oss \ -Dpa=3D$pa -Daudio_drv_list=3D$audio_drv_list -Dtcg_interpreter=3D= $tcg_interpreter \ -Dtrace_backends=3D$trace_backends -Dtrace_file=3D$trace_file -Dli= nux_aio=3D$linux_aio \ + -Dvde=3D$vde \ $cross_arg \ "$PWD" "$source_path" =20 diff --git a/meson.build b/meson.build index 0be11e5e08..46d8798a19 100644 --- a/meson.build +++ b/meson.build @@ -502,9 +502,28 @@ else xkbcommon =3D dependency('xkbcommon', required: get_option('xkbcommon'), method: 'pkg-config', kwargs: static_kwargs) endif + vde =3D not_found -if config_host.has_key('CONFIG_VDE') - vde =3D declare_dependency(link_args: config_host['VDE_LIBS'].split()) +if not get_option('vde').auto() or have_system or have_tools + vde =3D cc.find_library('vdeplug', has_headers: ['libvdeplug.h'], + required: get_option('vde'), + kwargs: static_kwargs) +endif +if vde.found() and not cc.links(''' + #include + int main(void) + { + struct vde_open_args a =3D {0, 0, 0}; + char s[] =3D ""; + vde_open(s, s, &a); + return 0; + }''', dependencies: vde) + vde =3D not_found + if get_option('cap_ng').enabled() + error('could not link libvdeplug') + else + warning('could not link libvdeplug, disabling') + endif endif =20 pulse =3D not_found @@ -1443,6 +1462,7 @@ config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.fo= und()) config_host_data.set('CONFIG_SECCOMP', seccomp.found()) config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_USB_LIBUSB', libusb.found()) +config_host_data.set('CONFIG_VDE', vde.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_s= erver) config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) @@ -3295,7 +3315,7 @@ if targetos =3D=3D 'linux' endif summary_info +=3D {'JACK support': jack} summary_info +=3D {'brlapi support': brlapi} -summary_info +=3D {'vde support': config_host.has_key('CONFIG_VDE')} +summary_info +=3D {'vde support': vde} summary_info +=3D {'netmap support': config_host.has_key('CONFIG_NETMAP= ')} summary_info +=3D {'Linux AIO support': libaio} summary_info +=3D {'Linux io_uring support': linux_io_uring} diff --git a/meson_options.txt b/meson_options.txt index 904e15d54c..7d0fa1c7f4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -129,6 +129,8 @@ option('u2f', type : 'feature', value : 'auto', description: 'U2F emulation support') option('usb_redir', type : 'feature', value : 'auto', description: 'libusbredir support') +option('vde', type : 'feature', value : 'auto', + description: 'vde network backend support') option('virglrenderer', type : 'feature', value : 'auto', description: 'virgl rendering support') option('vnc', type : 'feature', value : 'auto', diff --git a/net/meson.build b/net/meson.build index 1076b0a7ab..491144a697 100644 --- a/net/meson.build +++ b/net/meson.build @@ -20,7 +20,7 @@ softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter= -replay.c')) =20 softmmu_ss.add(when: 'CONFIG_L2TPV3', if_true: files('l2tpv3.c')) softmmu_ss.add(when: slirp, if_true: files('slirp.c')) -softmmu_ss.add(when: ['CONFIG_VDE', vde], if_true: files('vde.c')) +softmmu_ss.add(when: vde, if_true: files('vde.c')) softmmu_ss.add(when: 'CONFIG_NETMAP', if_true: files('netmap.c')) vhost_user_ss =3D ss.source_set() vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'= ), if_false: files('vhost-user-stub.c')) --=20 2.31.1