mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
res_rtp_asterisk: Instead of ./configure use OPENSSL_NO_SRTP.
Previously, Asterisk used its script ./configure, to test whether OpenSSL was built with no-srtp (or was simply too old). However, the header file <openssl/opensslconf.h> is the preferred way to detect the local configuration of OpenSSL. As a positive side-effect the script ./configure does not interleave the detection of the Open Settlement Protocol Toolkit (OSPTK) with the detection of individual features of OpenSSL anymore. Change-Id: I3c77c7b00b2ffa2e935632097fa057b9fdf480c0
This commit is contained in:
96
configure
vendored
96
configure
vendored
@@ -30763,102 +30763,6 @@ $as_echo "no" >&6; }
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "x${PBX_OPENSSL_SRTP}" != "x1" -a "${USE_OPENSSL_SRTP}" != "no"; then
|
||||
pbxlibdir=""
|
||||
# if --with-OPENSSL_SRTP=DIR has been specified, use it.
|
||||
if test "x${OPENSSL_SRTP_DIR}" != "x"; then
|
||||
if test -d ${OPENSSL_SRTP_DIR}/lib; then
|
||||
pbxlibdir="-L${OPENSSL_SRTP_DIR}/lib"
|
||||
else
|
||||
pbxlibdir="-L${OPENSSL_SRTP_DIR}"
|
||||
fi
|
||||
fi
|
||||
|
||||
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="${CFLAGS} "
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_tlsext_use_srtp in -lssl" >&5
|
||||
$as_echo_n "checking for SSL_CTX_set_tlsext_use_srtp in -lssl... " >&6; }
|
||||
if ${ac_cv_lib_ssl_SSL_CTX_set_tlsext_use_srtp+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lssl ${pbxlibdir} -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 SSL_CTX_set_tlsext_use_srtp ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return SSL_CTX_set_tlsext_use_srtp ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_ssl_SSL_CTX_set_tlsext_use_srtp=yes
|
||||
else
|
||||
ac_cv_lib_ssl_SSL_CTX_set_tlsext_use_srtp=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_ssl_SSL_CTX_set_tlsext_use_srtp" >&5
|
||||
$as_echo "$ac_cv_lib_ssl_SSL_CTX_set_tlsext_use_srtp" >&6; }
|
||||
if test "x$ac_cv_lib_ssl_SSL_CTX_set_tlsext_use_srtp" = xyes; then :
|
||||
AST_OPENSSL_SRTP_FOUND=yes
|
||||
else
|
||||
AST_OPENSSL_SRTP_FOUND=no
|
||||
fi
|
||||
|
||||
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
|
||||
|
||||
|
||||
# now check for the header.
|
||||
if test "${AST_OPENSSL_SRTP_FOUND}" = "yes"; then
|
||||
OPENSSL_SRTP_LIB="${pbxlibdir} -lssl -lcrypto"
|
||||
# if --with-OPENSSL_SRTP=DIR has been specified, use it.
|
||||
if test "x${OPENSSL_SRTP_DIR}" != "x"; then
|
||||
OPENSSL_SRTP_INCLUDE="-I${OPENSSL_SRTP_DIR}/include"
|
||||
fi
|
||||
OPENSSL_SRTP_INCLUDE="${OPENSSL_SRTP_INCLUDE} "
|
||||
|
||||
# check for the header
|
||||
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
|
||||
CPPFLAGS="${CPPFLAGS} ${OPENSSL_SRTP_INCLUDE}"
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
|
||||
OPENSSL_SRTP_HEADER_FOUND=1
|
||||
else
|
||||
OPENSSL_SRTP_HEADER_FOUND=0
|
||||
fi
|
||||
|
||||
|
||||
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
|
||||
|
||||
if test "x${OPENSSL_SRTP_HEADER_FOUND}" = "x0" ; then
|
||||
OPENSSL_SRTP_LIB=""
|
||||
OPENSSL_SRTP_INCLUDE=""
|
||||
else
|
||||
|
||||
PBX_OPENSSL_SRTP=1
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_OPENSSL_SRTP 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user