From 478d5d2f62923aa0438d4ac38e3d59c954d4591e Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 20 Apr 2023 21:27:36 -0400 Subject: [meson] check FORCE_{WOLFSSL,MBEDTLS}_CRYPTO check FORCE_WOLFSSL_CRYPTO and FORCE_MBEDTLS_CRYPTO when choosing cryptolib todo: should also apply to lighttpd autoconf, CMake, SCONS builds --- src/meson.build | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/meson.build b/src/meson.build index db59f0f5..e56fcf8c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -360,15 +360,19 @@ if get_option('with_mbedtls') libmbedtls = [ compiler.find_library('mbedtls') ] libmbedx509 = [ compiler.find_library('mbedx509') ] libmbedcrypto = [ compiler.find_library('mbedcrypto') ] - libcrypto = [ compiler.find_library('mbedcrypto') ] + if compiler.get_define('FORCE_WOLFSSL_CRYPTO') == '' + libcrypto = [ compiler.find_library('mbedcrypto') ] + endif conf_data.set('HAVE_LIBMBEDCRYPTO', true) endif if get_option('with_nettle') # manual search: # header: nettle/nettle-types.h # function: nettle_md5_init (-lnettle) - libcrypto = [ dependency('nettle') ] - conf_data.set('HAVE_NETTLE_NETTLE_TYPES_H', true) + if compiler.get_define('FORCE_WOLFSSL_CRYPTO') == '' and compiler.get_define('FORCE_MBEDTLS_CRYPTO') == '' + libcrypto = [ dependency('nettle') ] + conf_data.set('HAVE_NETTLE_NETTLE_TYPES_H', true) + endif endif if get_option('with_gnutls') # manual search: -- cgit v1.2.1