configure: quote -D options that are passed through to meson
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 May 2024 10:48:22 +0000 (12:48 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 May 2024 13:45:14 +0000 (15:45 +0200)
Ensure that they go through unmodified, instead of removing one layer
of quoting.

-D is a pretty specialized option and most options that can have spaces
do not need it (for example, c_args is covered by --extra-cflags).
Therefore it's unlikely that this causes actual trouble.  However,
a somewhat realistic failure case would be with -Dpkg_config_path
and a pkg-config directory that contains spaces.

Cc: qemu-stable@nongnu.org
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
configure

index 1dca3d94c0473144aeff10df59f3a7a804472eca..330664786dc20d5fcdfaa293f99791aff200816f 100755 (executable)
--- a/configure
+++ b/configure
@@ -762,7 +762,7 @@ for opt do
   --*) meson_option_parse "$opt" "$optarg"
   ;;
   # Pass through -Dxxxx options to meson
-  -D*) meson_options="$meson_options $opt"
+  -D*) meson_option_add "$opt"
   ;;
   esac
 done