werror=""
+. $source_path/scripts/meson-buildoptions.sh
+
+meson_options=
+meson_option_parse() {
+ meson_options="$meson_options $(_meson_option_parse "$@")"
+ if test $? -eq 1; then
+ echo "ERROR: unknown option $1"
+ echo "Try '$0 --help' for more information"
+ exit 1
+ fi
+}
+
for opt do
optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)')
case "$opt" in
;;
--disable-slirp-smbd) slirp_smbd=no
;;
+ --enable-* | --disable-*) meson_option_parse "$opt" "$optarg"
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
enable plugins via shared library loading
--disable-containers don't use containers for cross-building
--gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin]
-
-Optional features, enabled with --enable-FEATURE and
-disabled with --disable-FEATURE, default is enabled if available
-(unless built with --without-default-features):
-
+EOF
+ meson_options_help
+cat << EOF
system all system emulation targets
user supported user emulation targets
linux-user all linux usermode emulation targets
mv $cross config-meson.cross
rm -rf meson-private meson-info meson-logs
- NINJA=$ninja $meson setup \
+ run_meson() {
+ NINJA=$ninja $meson setup \
--prefix "$prefix" \
--libdir "$libdir" \
--libexecdir "$libexecdir" \
-Dpa=$pa -Daudio_drv_list=$audio_drv_list -Dtcg_interpreter=$tcg_interpreter \
-Dtrace_backends=$trace_backends -Dtrace_file=$trace_file -Dlinux_aio=$linux_aio \
-Dnetmap=$netmap -Dvde=$vde \
- $cross_arg \
- "$PWD" "$source_path"
-
+ "$@" $cross_arg "$PWD" "$source_path"
+ }
+ eval run_meson $meson_options
if test "$?" -ne 0 ; then
error_exit "meson setup failed"
fi