diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2017-01-23 05:18:21 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2017-01-23 05:18:21 +0000 |
commit | 19ffc925477f06d8296dfcc1cbd1aac7783446b2 (patch) | |
tree | 2c0e5e78b34d1436181e4ccbe2f17b758609bf9e /aconfigure | |
parent | f6d78bf855f2d564f9e383508908631a4668e2af (diff) |
Re #1932: Updated configure script for AES-GCM support detection.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5540 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'aconfigure')
-rwxr-xr-x | aconfigure | 40 |
1 files changed, 39 insertions, 1 deletions
@@ -7901,7 +7901,6 @@ $as_echo "OpenSSL library found, SSL support enabled" >&6; } # support, to enable cryptos such as AES GCM. # EVP_CIPHER_CTX is now opaque in OpenSSL 1.1.0, libsrtp 1.5.4 uses it as a transparent type. - # AC_CHECK_LIB(crypto,EVP_aes_128_gcm,[ac_ssl_has_aes_gcm=1]) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <openssl/evp.h> @@ -7914,8 +7913,47 @@ EVP_CIPHER_CTX ctx;EVP_aes_128_gcm(); } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_aes_128_gcm in -lcrypto" >&5 +$as_echo_n "checking for EVP_aes_128_gcm in -lcrypto... " >&6; } +if ${ac_cv_lib_crypto_EVP_aes_128_gcm+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char EVP_aes_128_gcm (); +int +main () +{ +return EVP_aes_128_gcm (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_crypto_EVP_aes_128_gcm=yes +else + ac_cv_lib_crypto_EVP_aes_128_gcm=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_aes_128_gcm" >&5 +$as_echo "$ac_cv_lib_crypto_EVP_aes_128_gcm" >&6; } +if test "x$ac_cv_lib_crypto_EVP_aes_128_gcm" = xyes; then : ac_ssl_has_aes_gcm=1 fi + +fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$ac_ssl_has_aes_gcm" = "x1"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL has AES GCM support, SRTP will use OpenSSL" >&5 |