From nobody Mon Feb 9 10:29:52 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1630657146; cv=none; d=zohomail.com; s=zohoarc; b=IUIaAEHEgO0MT7YHnhtvI4eEsq/Ptqb1rM+/5ItS1kIv2b8aSEQB7ArgyDlyust5ZT8kRXgza5AHYPql7fH3k52WCV7NFRXUFmEAk59Dwe+BgMdAt/iRWcrEqR+wyA81we8jsQw1SFos5Jj/sl51bWr9Y+NCrCsNN1kJ0qnT07s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630657146; h=Content-Type:Content-Transfer-Encoding:Cc: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=yIsC2uzMGuS8SOATBGCWosoZF/UQGvCdYSMl43uOw9A=; b=A6K8HR+ov8Ig+R+tp0L/j2Qpq5pd+J5w7gRfoIEqL2j/zfdGOztPulJNJ+3KiCD18nNdj58wGEiHfEtgnIlyP9iWpf/AosqGDUq/DN6Whh1r3l5px+zq2+gadhad38cTvHhZd0e/G+VLZXKkKuzYHtuoJzS67DaTKcVxOqqPXx8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630657146499981.6683991787249; Fri, 3 Sep 2021 01:19:06 -0700 (PDT) Received: from localhost ([::1]:52224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM4Ph-0002mU-D9 for importer@patchew.org; Fri, 03 Sep 2021 04:19:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM4L5-0002ha-9X for qemu-devel@nongnu.org; Fri, 03 Sep 2021 04:14:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43251) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM4L3-0005Rc-EF for qemu-devel@nongnu.org; Fri, 03 Sep 2021 04:14:19 -0400 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-340-McccNNDRM1WLBdGodDZgjg-1; Fri, 03 Sep 2021 04:14:15 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1EC82835DE1 for ; Fri, 3 Sep 2021 08:14:15 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id D61725FC23; Fri, 3 Sep 2021 08:14:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630656856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yIsC2uzMGuS8SOATBGCWosoZF/UQGvCdYSMl43uOw9A=; b=IuY3brMszGzEGJblikvAABc+0xf3Ws0QM3mmhJNJdmhI1BHFTXJdd5gvGjm41bTNVzdyy3 9gVUL0mJm76bxfXurBBEG/9/8ArShZBu24rKc1aGXLUD2UmLM06ltmCyz6bn1hwRm2E+Ki Snn6gaHwGKtEttgpCDHjinq4ieU8iQY= X-MC-Unique: McccNNDRM1WLBdGodDZgjg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Paolo Bonzini Subject: [PATCH v2 4/5] configure: Get help text from meson_options.txt Date: Fri, 3 Sep 2021 10:13:57 +0200 Message-Id: <20210903081358.956267-5-thuth@redhat.com> In-Reply-To: <20210903081358.956267-1-thuth@redhat.com> References: <20210903081358.956267-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Eric Blake Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1630657148451100001 Content-Type: text/plain; charset="utf-8" It's cumbersome to maintain the option help texts twice, once in the "configure" script and once in meson_options.txt. So let's add some logic to the configure script to read most of the help texts from meson_options.txt. Signed-off-by: Thomas Huth Reviewed-by: Eric Blake --- configure | 95 ++++++++++++++++++------------------------------------- 1 file changed, 31 insertions(+), 64 deletions(-) diff --git a/configure b/configure index 5a3c6ae2ba..a92d11a491 100755 --- a/configure +++ b/configure @@ -1549,7 +1549,6 @@ Advanced options (experts only): Default:trace- --disable-slirp disable SLIRP userspace network connectivity --enable-tcg-interpreter enable TCI (TCG with bytecode interpreter, expe= rimental and slow) - --enable-malloc-trim enable libc malloc_trim() for memory optimizati= on --oss-lib path to OSS library --cpu=3DCPU Build for host CPU [$cpu] --with-coroutine=3DBACKEND coroutine backend. Supported options: @@ -1576,16 +1575,13 @@ disabled with --disable-FEATURE, default is enabled= if available user supported user emulation targets linux-user all linux usermode emulation targets bsd-user all BSD usermode emulation targets - docs build documentation guest-agent build the QEMU Guest Agent - guest-agent-msi build guest agent Windows MSI installation package pie Position Independent Executables modules modules support (non-Windows) module-upgrades try to load modules from alternate paths for upgrades debug-tcg TCG debugging (default is disabled) debug-info debugging information lto Enable Link-Time Optimization. - sparse sparse checker safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. cfi Enable Control-Flow Integrity for indirect function call= s. @@ -1595,85 +1591,33 @@ disabled with --disable-FEATURE, default is enabled= if available cfi-debug In case of a cfi violation, a message containing the lin= e that triggered the error is written to stderr. After the erro= r, QEMU is still terminated with SIGILL - gnutls GNUTLS cryptography support - nettle nettle cryptography support - gcrypt libgcrypt cryptography support - auth-pam PAM access control - sdl SDL UI - sdl-image SDL Image support for icons - gtk gtk UI - vte vte support for the gtk UI - curses curses UI - iconv font glyph conversion support - vnc VNC UI support - vnc-sasl SASL encryption for VNC server - vnc-jpeg JPEG lossy compression for VNC server - vnc-png PNG compression for VNC server - cocoa Cocoa UI (Mac OS X only) - virtfs VirtFS - virtiofsd build virtiofs daemon (virtiofsd) - libudev Use libudev to enumerate host devices - mpath Multipath persistent reservation passthrough - xen xen backend driver support - xen-pci-passthrough PCI passthrough support for Xen - brlapi BrlAPI (Braile) - curl curl connectivity membarrier membarrier system call (for Linux 4.14+ or Windows) fdt fdt device tree - kvm KVM acceleration support - hax HAX acceleration support - hvf Hypervisor.framework acceleration support - nvmm NVMM acceleration support - whpx Windows Hypervisor Platform acceleration support rdma Enable RDMA-based migration pvrdma Enable PVRDMA support vde support for vde network netmap support for netmap network linux-aio Linux AIO support - linux-io-uring Linux io_uring support - cap-ng libcap-ng support - attr attr and xattr support vhost-net vhost-net kernel acceleration support vhost-vsock virtio sockets device support vhost-scsi vhost-scsi kernel target support vhost-crypto vhost-user-crypto backend support vhost-kernel vhost kernel backend support vhost-user vhost-user backend support - vhost-user-blk-server vhost-user-blk server support vhost-vdpa vhost-vdpa kernel backend support - bpf BPF kernel support spice spice spice-protocol spice-protocol - rbd rados block device (rbd) - libiscsi iscsi support - libnfs nfs support - smartcard smartcard support (libcacard) - u2f U2F support (u2f-emu) - libusb libusb (for usb passthrough) live-block-migration Block migration in the main migration stream - usb-redir usb network redirection support - lzo support of lzo compression library - snappy support of snappy compression library - bzip2 support of bzip2 compression library - (for reading bzip2-compressed dmg images) - lzfse support of lzfse compression library - (for reading lzfse-compressed dmg images) - zstd support for zstd compression library - (for migration compression and qcow2 cluster compression) - seccomp seccomp support coroutine-pool coroutine freelist (better performance) - glusterfs GlusterFS backend tpm TPM support libssh ssh block device support numa libnuma support - libxml2 for Parallels image format tcmalloc tcmalloc support jemalloc jemalloc support avx2 AVX2 optimization support avx512f AVX512F optimization support replication replication support opengl opengl support - virglrenderer virgl rendering support xfsctl xfsctl support qom-cast-debug cast debugging support tools build qemu-io, qemu-nbd and qemu-img tools @@ -1688,18 +1632,41 @@ disabled with --disable-FEATURE, default is enabled= if available crypto-afalg Linux AF_ALG crypto backend driver capstone capstone disassembler support debug-mutex mutex debugging support - libpmem libpmem support - xkbcommon xkbcommon support rng-none dummy RNG, avoid using /dev/(u)random and getrandom() - libdaxctl libdaxctl support - fuse FUSE block device export - fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports - multiprocess Out of process device emulation support gio libgio support slirp-smbd use smbd (at path --smbd=3D*) in slirp networking - -NOTE: The object files are built at the place where configure is launched EOF + +# Read remaining options and help text from meson_options.txt: +current_feature=3D"" +while read first rest ; do + case "$first" in + option*) + case "$rest" in + *type*:*"'feature'"*) + current_feature=3D${first%\'*} + current_feature=3D${current_feature#*\'} + ;; + *) + current_feature=3D"" + ;; + esac + ;; + description:) + if [ -n "$current_feature" ]; then + rest=3D${rest%\'*} + printf " %-15s %s\n" "$current_feature" "${rest#\'}" + fi + ;; + *) + current_feature=3D"" + ;; + esac +done < "$source_path/meson_options.txt" | sort + +echo +echo "NOTE: The object files are built at the place where configure is lau= nched" + exit 0 fi =20 --=20 2.27.0