qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PATCH 3/3] configure: Get help text from meson_options.txt
Date: Sun, 29 Aug 2021 19:32:10 +0200	[thread overview]
Message-ID: <20210829173210.39562-4-thuth@redhat.com> (raw)
In-Reply-To: <20210829173210.39562-1-thuth@redhat.com>

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 <thuth@redhat.com>
---
 configure | 89 ++++++++++++++++---------------------------------------
 1 file changed, 25 insertions(+), 64 deletions(-)

diff --git a/configure b/configure
index cb125c3f84..8446b7b3ea 100755
--- a/configure
+++ b/configure
@@ -1549,7 +1549,6 @@ Advanced options (experts only):
                            Default:trace-<pid>
   --disable-slirp          disable SLIRP userspace network connectivity
   --enable-tcg-interpreter enable TCI (TCG with bytecode interpreter, experimental and slow)
-  --enable-malloc-trim     enable libc malloc_trim() for memory optimization
   --oss-lib                path to OSS library
   --cpu=CPU                Build for host CPU [$cpu]
   --with-coroutine=BACKEND 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 >= 3.7 and requires coroutine backend ucontext.
   cfi             Enable Control-Flow Integrity for indirect function calls.
@@ -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 line that
                   triggered the error is written to stderr. After the error,
                   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,35 @@ 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=*) in slirp networking
-
-NOTE: The object files are built at the place where configure is launched
 EOF
+
+current_feature=""
+current_desc=""
+while read word1 word2 ; do
+   case "$word1" in
+   option*)
+       if echo "$word2" | grep -q "type[ ]*: 'feature'"; then
+           current_feature=$(echo $word1 | sed -e "s/option('//" -e "s/',.*$//")
+       else
+           current_feature=""
+       fi
+   ;;
+   description:)
+       if [ -n "$current_feature" ]; then
+           printf "  %-15s %s\n" "$current_feature" \
+                  "$(echo "$word2" | sed -e "s/^'//" -e "s/'.*$//")"
+           current_feature=""
+       fi
+   ;;
+   esac
+done < $source_path/meson_options.txt | sort
+
+echo
+echo "NOTE: The object files are built at the place where configure is launched"
+
 exit 0
 fi
 
-- 
2.27.0



  parent reply	other threads:[~2021-08-29 17:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-29 17:32 [PATCH 0/3] Use meson_options.txt in the configure script Thomas Huth
2021-08-29 17:32 ` [PATCH 1/3] configure: Add the possibility to read options from meson_options.txt Thomas Huth
2021-08-30 14:47   ` Eric Blake
2021-08-29 17:32 ` [PATCH 2/3] configure: Remove options that can be handled via meson_options.txt instead Thomas Huth
2021-08-30 15:06   ` Eric Blake
2021-08-30 15:33     ` Richard Henderson
2021-08-30 16:33     ` Thomas Huth
2021-08-29 17:32 ` Thomas Huth [this message]
2021-08-30 15:30   ` [PATCH 3/3] configure: Get help text from meson_options.txt Eric Blake
2021-08-30 16:48     ` Thomas Huth
2021-08-29 21:22 ` [PATCH 0/3] Use meson_options.txt in the configure script Marc-André Lureau
2021-08-30  5:11   ` Thomas Huth
2021-08-30  9:12     ` Philippe Mathieu-Daudé
2021-08-30  9:21       ` Peter Maydell
2021-08-31 12:49     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210829173210.39562-4-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).