From nobody Sat Feb 7 05:52: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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650470642524839.361806212763; Wed, 20 Apr 2022 09:04:02 -0700 (PDT) Received: from localhost ([::1]:41230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nhCoD-0006rM-AJ for importer@patchew.org; Wed, 20 Apr 2022 12:04:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhCLn-0001Wt-M9 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:41 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:51981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhCLl-0000yM-Tu for qemu-devel@nongnu.org; Wed, 20 Apr 2022 11:34:39 -0400 Received: by mail-wm1-x335.google.com with SMTP id q20so1466956wmq.1 for ; Wed, 20 Apr 2022 08:34:37 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n68-20020a1c2747000000b0038e6b4d5395sm130401wmn.16.2022.04.20.08.34.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 08:34:35 -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=+pFdnHYez6FG1+gMSjss9lN947m4DK6aL4zlGZJr2IQ=; b=TRoN63vDouHBE7beZF2ptjickn8aGuVh8P2WSwajLltVt9cr5qW9oJBQLOPBFrPfte UXdiq7N0f8ro/Rr67gqKX8+fAm6Yl8UxsG0Ng5n3vDvPv9lb0nkP3h3OR3esk62LUIrM E2OY6gvuET7RNKXeigRQmN7X9E8Isy5ZVFx1kZjswcbnh6YHk0fwJI/Sq6AlJvJvm3Da QU3dX1nnrl7IoSELlZkp8SAQXkjXK4N8IYs3C3YzfymMvnPANqI1If2dsdFnXIGCt0Ve 95s/4fazoIAPDOdg6hy/gpZa4QOalH4OxOq+xP16mQSuqSUuVt6YjX0Za3GcqXvEz7fH X7kA== 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=+pFdnHYez6FG1+gMSjss9lN947m4DK6aL4zlGZJr2IQ=; b=kOSwN1feKvWSTSoA8sq5YTuZkArEGetTrAlmRusTCdMIf+ESjj65YbTaFZ4+VQinJi gV7TrVPD0ehg8/xXw6+AF1u/gZ9b3r2vidpZoqXZTQCzvruF8Apk9hqA4CgLuVJrhbWs iLZs67n0MxjtTfq8vgm96tfJvfbxy5+88IwxLcGyRI0BlOgPVa/+1JND3eyzJYDrnQlz m7/Ih6QvqQ63agBjXOWsVq4TF1XiKFXVxvKP1FHO4EYxgomkaEtOwPW5hqKwRq6ZPwuL djbRwvex7uvJJUiJmPLHrxhZt6q03C7T3MNGNidu2MWGXq+eJGiYMVQDTNvlX15TXrx1 p2Hg== X-Gm-Message-State: AOAM533GSuR1yis1tQmwwr4gUgE9d3LyVfbefmhfuUvP1PWhwv0jBPmo Ao3mNBm97hbVvJx0nOmjs0rBEBuP6tP/Ag== X-Google-Smtp-Source: ABdhPJxwcDJw0Yha+YUr4ft7CKb6cMuQ+ajfjxt1XQzSabHlhaTcWjnnP2WxLnpYHx1+vm37WOFqVQ== X-Received: by 2002:a1c:a301:0:b0:392:9bc5:203c with SMTP id m1-20020a1ca301000000b003929bc5203cmr4317811wme.67.1650468876251; Wed, 20 Apr 2022 08:34:36 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 18/34] configure: switch string options to automatic parsing Date: Wed, 20 Apr 2022 17:33:51 +0200 Message-Id: <20220420153407.73926-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220420153407.73926-1-pbonzini@redhat.com> References: <20220420153407.73926-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::335; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x335.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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: 1650470643541100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 24 +----------------------- scripts/meson-buildoptions.py | 5 +---- scripts/meson-buildoptions.sh | 9 +++++++++ 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/configure b/configure index 87ceb33917..8f34f2a061 100755 --- a/configure +++ b/configure @@ -231,12 +231,10 @@ fi =20 # default parameters cpu=3D"" -iasl=3D"iasl" interp_prefix=3D"/usr/gnemul/qemu-%M" static=3D"no" cross_compile=3D"no" cross_prefix=3D"" -audio_drv_list=3D"default" block_drv_rw_whitelist=3D"" block_drv_ro_whitelist=3D"" host_cc=3D"cc" @@ -312,7 +310,6 @@ linux_user=3D"" bsd_user=3D"" pkgversion=3D"" pie=3D"" -trace_file=3D"trace" coroutine=3D"" tls_priority=3D"NORMAL" plugins=3D"$default_feature" @@ -713,8 +710,6 @@ for opt do ;; --cxx=3D*) ;; - --iasl=3D*) iasl=3D"$optarg" - ;; --objcc=3D*) objcc=3D"$optarg" ;; --make=3D*) make=3D"$optarg" @@ -723,8 +718,6 @@ for opt do ;; --python=3D*) python=3D"$optarg" ; explicit_python=3Dyes ;; - --sphinx-build=3D*) sphinx_build=3D"$optarg" - ;; --skip-meson) skip_meson=3Dyes ;; --meson=3D*) meson=3D"$optarg" @@ -765,8 +758,6 @@ for opt do error_exit "Can't mix --target-list-exclude with --= target-list" fi ;; - --with-trace-file=3D*) trace_file=3D"$optarg" - ;; --with-default-devices) default_devices=3D"true" ;; --without-default-devices) default_devices=3D"false" @@ -825,8 +816,6 @@ for opt do # configure to be used by RPM and similar macros that set # lots of directory switches by default. ;; - --audio-drv-list=3D*) audio_drv_list=3D"$optarg" - ;; --block-drv-rw-whitelist=3D*|--block-drv-whitelist=3D*) block_drv_rw_whi= telist=3D$(echo "$optarg" | sed -e 's/,/ /g') ;; --block-drv-ro-whitelist=3D*) block_drv_ro_whitelist=3D$(echo "$optarg" = | sed -e 's/,/ /g') @@ -1000,12 +989,7 @@ for opt do --enable-jemalloc) meson_option_parse --enable-malloc=3Djemalloc jemalloc ;; # everything else has the same name in configure and meson - --enable-* | --disable-*) meson_option_parse "$opt" "$optarg" - ;; - *) - echo "ERROR: unknown option $opt" - echo "Try '$0 --help' for more information" - exit 1 + --*) meson_option_parse "$opt" "$optarg" ;; esac done @@ -1128,7 +1112,6 @@ $(echo Available targets: $default_target_list | \ Advanced options (experts only): --cross-prefix=3DPREFIX use PREFIX for compile tools, PREFIX can be b= lank [$cross_prefix] --cc=3DCC use C compiler CC [$cc] - --iasl=3DIASL use ACPI compiler IASL [$iasl] --host-cc=3DCC use C compiler CC [$host_cc] for code run at build time --cxx=3DCXX use C++ compiler CXX [$cxx] @@ -1141,7 +1124,6 @@ Advanced options (experts only): --cross-cc-cflags-ARCH=3D use compiler flags when building ARCH guest t= ests --make=3DMAKE use specified make [$make] --python=3DPYTHON use specified python [$python] - --sphinx-build=3DSPHINX use specified sphinx-build [$sphinx_build] --meson=3DMESON use specified meson [$meson] --ninja=3DNINJA use specified ninja [$ninja] --smbd=3DSMBD use specified smbd [$smbd] @@ -2484,15 +2466,11 @@ if test "$skip_meson" =3D no; then --sysconfdir "$sysconfdir" \ --localedir "$localedir" \ --localstatedir "$local_statedir" \ - -Daudio_drv_list=3D$audio_drv_list \ -Ddefault_devices=3D$default_devices \ -Ddocdir=3D"$docdir" \ - -Diasl=3D"$iasl" \ -Dqemu_firmwarepath=3D"$firmwarepath" \ -Dqemu_suffix=3D"$qemu_suffix" \ -Dsmbd=3D"$smbd" \ - -Dsphinx_build=3D"$sphinx_build" \ - -Dtrace_file=3D"$trace_file" \ -Doptimization=3D$(if test "$debug" =3D yes; then echo 0; else ech= o 2; fi) \ -Ddebug=3D$(if test "$debug_info" =3D yes; then echo true; else ec= ho false; fi) \ -Dwerror=3D$(if test "$werror" =3D yes; then echo true; else echo = false; fi) \ diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 4af8d6e732..3e540e8bb3 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -26,21 +26,18 @@ import sys =20 SKIP_OPTIONS =3D { - "audio_drv_list", "default_devices", "docdir", "fuzzing_engine", - "iasl", "qemu_firmwarepath", "qemu_suffix", "smbd", - "sphinx_build", - "trace_file", } =20 OPTION_NAMES =3D { "malloc": "enable-malloc", "trace_backends": "enable-trace-backends", + "trace_file": "with-trace-file", } =20 BUILTIN_OPTIONS =3D { diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 5a06b7915c..63f2f1abcf 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -1,5 +1,7 @@ # This file is generated by meson-buildoptions.py, do not edit! meson_options_help() { + printf "%s\n" ' --audio-drv-list=3DCHOICES Set audio driver list [defau= lt] (choices:' + printf "%s\n" ' alsa/coreaudio/default/dsound/= jack/oss/pa/sdl)' printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --enable-block-drv-whitelist-in-tools' @@ -32,6 +34,9 @@ meson_options_help() { printf "%s\n" ' --enable-trace-backends=3DCHOICES' printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' + printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' + printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' + printf "%s\n" ' --with-trace-file=3DVALUE Trace file prefix for simple= backend [trace]' printf "%s\n" '' printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' printf "%s\n" 'disabled with --disable-FEATURE, default is enabled if av= ailable' @@ -147,6 +152,7 @@ _meson_option_parse() { --disable-alsa) printf "%s" -Dalsa=3Ddisabled ;; --enable-attr) printf "%s" -Dattr=3Denabled ;; --disable-attr) printf "%s" -Dattr=3Ddisabled ;; + --audio-drv-list=3D*) quote_sh "-Daudio_drv_list=3D$2" ;; --enable-auth-pam) printf "%s" -Dauth_pam=3Denabled ;; --disable-auth-pam) printf "%s" -Dauth_pam=3Ddisabled ;; --enable-avx2) printf "%s" -Davx2=3Denabled ;; @@ -229,6 +235,7 @@ _meson_option_parse() { --disable-hax) printf "%s" -Dhax=3Ddisabled ;; --enable-hvf) printf "%s" -Dhvf=3Denabled ;; --disable-hvf) printf "%s" -Dhvf=3Ddisabled ;; + --iasl=3D*) quote_sh "-Diasl=3D$2" ;; --enable-iconv) printf "%s" -Diconv=3Denabled ;; --disable-iconv) printf "%s" -Diconv=3Ddisabled ;; --enable-install-blobs) printf "%s" -Dinstall_blobs=3Dtrue ;; @@ -331,6 +338,7 @@ _meson_option_parse() { --disable-snappy) printf "%s" -Dsnappy=3Ddisabled ;; --enable-sparse) printf "%s" -Dsparse=3Denabled ;; --disable-sparse) printf "%s" -Dsparse=3Ddisabled ;; + --sphinx-build=3D*) quote_sh "-Dsphinx_build=3D$2" ;; --enable-spice) printf "%s" -Dspice=3Denabled ;; --disable-spice) printf "%s" -Dspice=3Ddisabled ;; --enable-spice-protocol) printf "%s" -Dspice_protocol=3Denabled ;; @@ -346,6 +354,7 @@ _meson_option_parse() { --enable-tpm) printf "%s" -Dtpm=3Denabled ;; --disable-tpm) printf "%s" -Dtpm=3Ddisabled ;; --enable-trace-backends=3D*) quote_sh "-Dtrace_backends=3D$2" ;; + --with-trace-file=3D*) quote_sh "-Dtrace_file=3D$2" ;; --enable-u2f) printf "%s" -Du2f=3Denabled ;; --disable-u2f) printf "%s" -Du2f=3Ddisabled ;; --enable-usb-redir) printf "%s" -Dusb_redir=3Denabled ;; --=20 2.35.1