aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-11-08 14:02:42 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2022-02-21 10:35:52 +0100
commit34b52615a09a061bc03bbc5aa35a998ba79d9f22 (patch)
tree2b3dda5c676c9be9dcf43f6a519cc7c65d9aa514 /meson.build
parentb87df9043ce44dd2de36a09846be2e398a827aad (diff)
configure, meson: move AF_ALG test to meson
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build16
1 files changed, 15 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 6dc38a7916..9e1acb98aa 100644
--- a/meson.build
+++ b/meson.build
@@ -1828,6 +1828,20 @@ config_host_data.set('CONFIG_MEMBARRIER', get_option('membarrier') \
.require(have_membarrier, error_message: 'membarrier system call not available') \
.allowed())
+have_afalg = get_option('crypto_afalg') \
+ .require(cc.compiles(gnu_source_prefix + '''
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <linux/if_alg.h>
+ int main(void) {
+ int sock;
+ sock = socket(AF_ALG, SOCK_SEQPACKET, 0);
+ return sock;
+ }
+ '''), error_message: 'AF_ALG requested but could not be detected').allowed()
+config_host_data.set('CONFIG_AF_ALG', have_afalg)
+
config_host_data.set('CONFIG_AF_VSOCK', cc.compiles(gnu_source_prefix + '''
#include <errno.h>
#include <sys/types.h>
@@ -3453,7 +3467,7 @@ summary_info += {'nettle': nettle}
if nettle.found()
summary_info += {' XTS': xts != 'private'}
endif
-summary_info += {'crypto afalg': config_host.has_key('CONFIG_AF_ALG')}
+summary_info += {'AF_ALG support': have_afalg}
summary_info += {'rng-none': config_host.has_key('CONFIG_RNG_NONE')}
summary_info += {'Linux keyring': config_host.has_key('CONFIG_SECRET_KEYRING')}
summary(summary_info, bool_yn: true, section: 'Crypto')