Signed-off-by: Mario Fleischmann <mario.fleischm...@lauterbach.com>
---
 docs/interop/mcd.rst          | 6 ++++++
 meson.build                   | 1 +
 meson_options.txt             | 3 +++
 scripts/meson-buildoptions.sh | 3 +++
 4 files changed, 13 insertions(+)

diff --git a/docs/interop/mcd.rst b/docs/interop/mcd.rst
index 9587cfb..2b21303 100644
--- a/docs/interop/mcd.rst
+++ b/docs/interop/mcd.rst
@@ -38,6 +38,12 @@ The resulting system can be visualized as follows::
     | qemu-system-*  |      | -machine |           | -cpu |
     +----------------+      +----------+           +------+
 
+To configure the build for MCD support:
+
+.. code::
+
+  ./configure --enable-mcd
+
 API Reference
 -------------
 
diff --git a/meson.build b/meson.build
index 8ae70db..ffb2130 100644
--- a/meson.build
+++ b/meson.build
@@ -2500,6 +2500,7 @@ config_host_data.set('CONFIG_LIBSSH', libssh.found())
 config_host_data.set('CONFIG_LINUX_AIO', libaio.found())
 config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found())
 config_host_data.set('CONFIG_LIBPMEM', libpmem.found())
+config_host_data.set('CONFIG_MCD', get_option('mcd').enabled())
 config_host_data.set('CONFIG_MODULES', enable_modules)
 config_host_data.set('CONFIG_NUMA', numa.found())
 if numa.found()
diff --git a/meson_options.txt b/meson_options.txt
index 59d973b..c6e8f90 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -384,3 +384,6 @@ option('rust', type: 'feature', value: 'disabled',
        description: 'Rust support')
 option('strict_rust_lints', type: 'boolean', value: false,
        description: 'Enable stricter set of Rust warnings')
+
+option('mcd', type: 'feature', value: 'disabled',
+       description: 'debug support over the MCD API')
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 3e8e008..8ee0fc2 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -152,6 +152,7 @@ meson_options_help() {
   printf "%s\n" '  lzfse           lzfse support for DMG images'
   printf "%s\n" '  lzo             lzo compression support'
   printf "%s\n" '  malloc-trim     enable libc malloc_trim() for memory 
optimization'
+  printf "%s\n" '  mcd             debug support over the MCD API'
   printf "%s\n" '  membarrier      membarrier system call (for Linux 4.14+ or 
Windows'
   printf "%s\n" '  modules         modules support (non Windows)'
   printf "%s\n" '  mpath           Multipath persistent reservation 
passthrough'
@@ -401,6 +402,8 @@ _meson_option_parse() {
     --enable-malloc-trim) printf "%s" -Dmalloc_trim=enabled ;;
     --disable-malloc-trim) printf "%s" -Dmalloc_trim=disabled ;;
     --mandir=*) quote_sh "-Dmandir=$2" ;;
+    --enable-mcd) printf "%s" -Dmcd=enabled ;;
+    --disable-mcd) printf "%s" -Dmcd=disabled ;;
     --enable-membarrier) printf "%s" -Dmembarrier=enabled ;;
     --disable-membarrier) printf "%s" -Dmembarrier=disabled ;;
     --enable-module-upgrades) printf "%s" -Dmodule_upgrades=true ;;
-- 
2.34.1


Reply via email to