From b7c6eccfbe62f55901b189cb4cb64074498fb811 Mon Sep 17 00:00:00 2001 From: Clemens Lang Date: Thu, 11 Apr 2024 12:13:23 +0200 Subject: [PATCH] Fix softokn detection on macOS Loadable modules on macOS should use .so as extension, but both NSS softokn and OpenSSL providers do not follow this rule. Modify shlext accordingly so that NSS softokn can be found for the tests. Note that p11-kit correctly names its loadable modules with .so, so this variable should be used carefully as it may be incorrect depending on your use case. Signed-off-by: Clemens Lang --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index dac4ac24..105bdefc 100644 --- a/meson.build +++ b/meson.build @@ -52,6 +52,12 @@ libssl = dependency('libssl', version: '>= 3.0.7') host_system = host_machine.system() if host_system == 'windows' shlext = '.dll' +elif host_system == 'darwin' + # On macOS, loadable modules typically use .so as filename extension, but + # both NSS softokn and OpenSSL providers ignore this rule and use .dylib for + # loadable modules anyway. Note that p11-kit correctly uses .so, though, so + # be careful when using this variable, as it might not be correct on macOS. + shlext = '.dylib' else shlext = '.so' endif