configure: check for AEAD function declarations, instead of linkage
PATCH 1/1 configure: check for AEAD function declarations, instead of linkage
One might want to run ./configure before building the crypto library. To correctly check from AEAD support in that case, check for the function declaration, rather than trying to link to it.
--- configure.ac | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
configure.ac +10 -10
@@ -867,10 +867,11 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then fi have_crypto_aead_modes="yes" - AC_CHECK_FUNCS( + AC_CHECK_DECLS( [EVP_aes_256_gcm], , - [have_crypto_aead_modes="no"; break] + [have_crypto_aead_modes="no"; break], + [[ #include <openssl/evp.h> ]] ) CFLAGS="${saved_CFLAGS}"
@@ -947,14 +948,13 @@ elif test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "mbedtls"; th fi fi - have_crypto_aead_modes="yes" - AC_CHECK_FUNCS( - [ \ - mbedtls_cipher_write_tag \ - mbedtls_cipher_check_tag \ - ], - , - [have_crypto_aead_modes="no"; break] + # Check mbed TLS AEAD support + have_crypto_aead_modes="no" + AC_CHECK_DECLS( + [ mbedtls_cipher_write_tag, mbedtls_cipher_check_tag ], + [ have_crypto_aead_modes="yes"], + [], + [[ #include <mbedtls/cipher.h> ]] ) CFLAGS="${saved_CFLAGS}"
Signature · 1 line
2.7.4
Hi,
Quoted 3 lines · Steffan Karger
One might want to run ./configure before building the crypto library. To correctly check from AEAD support in that case, check for the function declaration, rather than trying to link to it.
Semi-Feature-NAK - I'm not convinced by the need to have this (your setup is a bit unusual in that respect).
OTOH: if someone who understands Autoconf better than I do tells me that "checking for the headers" is the "better" approach here than "trying to link" I'm not going to block this.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...