# HG changeset patch # User Martti Rannanjärvi # Date 1512033350 -7200 # Node ID c7aa2518697363f2be695f12a3ea2749f6b378e3 # Parent aa3c9a064b17386abe10bcd303ebc4ca20a2a186 configure.ac: Add SSL_CTX_set_min_proto_version detection diff -r aa3c9a064b17 -r c7aa25186973 configure.ac --- a/configure.ac Mon Feb 19 14:51:41 2018 +0200 +++ b/configure.ac Thu Nov 30 11:15:50 2017 +0200 @@ -1771,6 +1771,25 @@ AC_DEFINE(HAVE_SSL_NEW_MEM_FUNCS,, [Define if CRYPTO_set_mem_functions has new style parameters]) fi + # SSL_CTX_set_min_proto_version is also a macro so AC_CHECK_LIB fails here. + AC_CACHE_CHECK([whether SSL_CTX_set_min_proto_version exists],i_cv_have_ssl_ctx_set_min_proto_version,[ + old_LIBS=$LIBS + LIBS="$LIBS -lssl" + AC_TRY_LINK([ + #include + ], [ + SSL_CTX_set_min_proto_version((void*)0, 0); + ], [ + i_cv_have_ssl_ctx_set_min_proto_version=yes + ], [ + i_cv_have_ssl_ctx_set_min_proto_version=no + ]) + LIBS=$old_LIBS + ]) + if test $i_cv_have_ssl_ctx_set_min_proto_version = yes; then + AC_DEFINE(HAVE_SSL_CTX_SET_MIN_PROTO_VERSION,, [Define if you have SSL_CTX_set_min_proto_version]) + fi + AC_CHECK_LIB(ssl, ERR_remove_thread_state, [ AC_DEFINE(HAVE_OPENSSL_ERR_REMOVE_THREAD_STATE,, [Define if you have ERR_remove_thread_state]) ],, $SSL_LIBS)