[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v20 1/7] net/vmnet: add vmnet dependency and customizable option
From: |
Vladislav Yaroshchuk |
Subject: |
[PATCH v20 1/7] net/vmnet: add vmnet dependency and customizable option |
Date: |
Wed, 16 Mar 2022 02:07:35 +0300 |
vmnet.framework dependency is added with 'vmnet' option
to enable or disable it. Default value is 'auto'.
used vmnet features are available since macOS 11.0,
but new backend can be built and work properly with
subset of them on 10.15 too.
Signed-off-by: Vladislav Yaroshchuk <Vladislav.Yaroshchuk@jetbrains.com>
---
meson.build | 16 +++++++++++++++-
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 1 +
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 2d6601467f..806f3869f9 100644
--- a/meson.build
+++ b/meson.build
@@ -522,6 +522,18 @@ if cocoa.found() and get_option('gtk').enabled()
error('Cocoa and GTK+ cannot be enabled at the same time')
endif
+vmnet = dependency('appleframeworks', modules: 'vmnet', required:
get_option('vmnet'))
+if vmnet.found() and not cc.has_header_symbol('vmnet/vmnet.h',
+ 'VMNET_BRIDGED_MODE',
+ dependencies: vmnet)
+ vmnet = not_found
+ if get_option('vmnet').enabled()
+ error('vmnet.framework API is outdated')
+ else
+ warning('vmnet.framework API is outdated, disabling')
+ endif
+endif
+
seccomp = not_found
if not get_option('seccomp').auto() or have_system or have_tools
seccomp = dependency('libseccomp', version: '>=2.3.0',
@@ -1550,6 +1562,7 @@ config_host_data.set('CONFIG_SNAPPY', snappy.found())
config_host_data.set('CONFIG_TPM', have_tpm)
config_host_data.set('CONFIG_USB_LIBUSB', libusb.found())
config_host_data.set('CONFIG_VDE', vde.found())
+config_host_data.set('CONFIG_VMNET', vmnet.found())
config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER',
have_vhost_user_blk_server)
config_host_data.set('CONFIG_VNC', vnc.found())
config_host_data.set('CONFIG_VNC_JPEG', jpeg.found())
@@ -3588,7 +3601,8 @@ summary(summary_info, bool_yn: true, section: 'Crypto')
# Libraries
summary_info = {}
if targetos == 'darwin'
- summary_info += {'Cocoa support': cocoa}
+ summary_info += {'Cocoa support': cocoa}
+ summary_info += {'vmnet.framework support': vmnet}
endif
summary_info += {'SDL support': sdl}
summary_info += {'SDL image support': sdl_image}
diff --git a/meson_options.txt b/meson_options.txt
index 52b11cead4..d2c0b6b412 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -175,6 +175,8 @@ option('netmap', type : 'feature', value : 'auto',
description: 'netmap network backend support')
option('vde', type : 'feature', value : 'auto',
description: 'vde network backend support')
+option('vmnet', type : 'feature', value : 'auto',
+ description: 'vmnet.framework network backend support')
option('virglrenderer', type : 'feature', value : 'auto',
description: 'virgl rendering support')
option('vnc', type : 'feature', value : 'auto',
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 9ee684ef03..30946f3798 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -116,6 +116,7 @@ meson_options_help() {
printf "%s\n" ' usb-redir libusbredir support'
printf "%s\n" ' vde vde network backend support'
printf "%s\n" ' vdi vdi image format support'
+ printf "%s\n" ' vmnet vmnet.framework network backend support'
printf "%s\n" ' vhost-user-blk-server'
printf "%s\n" ' build vhost-user-blk server'
printf "%s\n" ' virglrenderer virgl rendering support'
--
2.34.1.vfs.0.0
- [PATCH v20 0/7] Add vmnet.framework based network backend, Vladislav Yaroshchuk, 2022/03/15
- [PATCH v20 3/7] net/vmnet: implement shared mode (vmnet-shared), Vladislav Yaroshchuk, 2022/03/15
- [PATCH v20 4/7] net/vmnet: implement host mode (vmnet-host), Vladislav Yaroshchuk, 2022/03/15
- [PATCH v20 5/7] net/vmnet: implement bridged mode (vmnet-bridged), Vladislav Yaroshchuk, 2022/03/15
- [PATCH v20 6/7] net/vmnet: update qemu-options.hx, Vladislav Yaroshchuk, 2022/03/15
- [PATCH v20 7/7] net/vmnet: update hmp-commands.hx, Vladislav Yaroshchuk, 2022/03/15