This is v2 of a concept that was first posted last September. In the meanwhile more options have been added to Meson, so the effect of the change can hopefully be evaluated more accurately. At least, the amount of lines removed in the configure script is larger than the size of the script itself!
Regarding the code itself, the main change is that the script has been rewritten from Python to Perl. The reasons for this are detailed in the commit message. For the parsing of an option to be completely automatic, there must be no mentions of the corresponding variable in configure. Patches 1 to 6 clean up some of the stragglers to enable more automatic conversions. The only remaining options to be split between configure and Meson are capstone, git, slirp, default_devices, cfi and xen. Paolo Paolo Bonzini (8): build-system: clean up TCG/TCI configury cocoa: do not enable coreaudio automatically gtk: remove CONFIG_GTK_GL configure: move X11 detection to Meson configure: move GTK+ detection to Meson configure: move Cocoa incompatibility checks to Meson configure: quote command line arguments in config.status configure: automatically parse command line for meson -D options Makefile | 11 + configure | 459 ++------------- disas/meson.build | 2 - docs/devel/build-system.rst | 49 +- meson-buildoptions.json | 717 ++++++++++++++++++++++++ meson.build | 100 ++-- meson_options.txt | 13 +- scripts/configure-parse-buildoptions.pl | 205 +++++++ ui/gtk.c | 16 +- ui/meson.build | 9 +- 10 files changed, 1073 insertions(+), 508 deletions(-) create mode 100644 meson-buildoptions.json create mode 100755 scripts/configure-parse-buildoptions.pl -- 2.29.2