aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-12-21 12:38:27 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2022-02-21 10:35:53 +0100
commit0d04c4c9de3f260eb65f832983655d1a1206cc15 (patch)
tree02b3251defa7bbbc0d66861699ed105c69d69e00 /meson.build
parent488a8c73fbd72cbf4387ff3150271fe414b0dd4a (diff)
configure, meson: move TPM check to meson
The check is simply for a POSIX system. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 7 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index f8b83f64db..02137be91e 100644
--- a/meson.build
+++ b/meson.build
@@ -276,6 +276,10 @@ multiprocess_allowed = get_option('multiprocess') \
.require(targetos == 'linux', error_message: 'Multiprocess QEMU is supported only on Linux') \
.allowed()
+have_tpm = get_option('tpm') \
+ .require(targetos != 'windows', error_message: 'TPM emulation only available on POSIX systems') \
+ .allowed()
+
# Target-specific libraries and flags
libm = cc.find_library('m', required: false)
threads = dependency('threads')
@@ -1492,6 +1496,7 @@ config_host_data.set('CONFIG_SDL', sdl.found())
config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
config_host_data.set('CONFIG_SECCOMP', seccomp.found())
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_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server)
@@ -1942,7 +1947,7 @@ endif
have_ivshmem = config_host_data.get('CONFIG_EVENTFD')
host_kconfig = \
(get_option('fuzzing') ? ['CONFIG_FUZZ=y'] : []) + \
- ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=y'] : []) + \
+ (have_tpm ? ['CONFIG_TPM=y'] : []) + \
(spice.found() ? ['CONFIG_SPICE=y'] : []) + \
(have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
('CONFIG_OPENGL' in config_host ? ['CONFIG_OPENGL=y'] : []) + \
@@ -3556,7 +3561,7 @@ if targetos == 'windows'
endif
summary_info += {'seccomp support': seccomp}
summary_info += {'GlusterFS support': glusterfs}
-summary_info += {'TPM support': config_host.has_key('CONFIG_TPM')}
+summary_info += {'TPM support': have_tpm}
summary_info += {'libssh support': libssh}
summary_info += {'lzo support': lzo}
summary_info += {'snappy support': snappy}