From 891e565c8de5c9fde8000884e13bc54163f4dd4c Mon Sep 17 00:00:00 2001 From: jehan Date: Mon, 18 Jan 2010 14:22:16 +0100 Subject: [PATCH] -add enable-ssl configure option to ortp --- linphone/oRTP/configure.ac | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/linphone/oRTP/configure.ac b/linphone/oRTP/configure.ac index db9d8c465..addc9ca25 100644 --- a/linphone/oRTP/configure.ac +++ b/linphone/oRTP/configure.ac @@ -269,10 +269,24 @@ if test $GCC = yes && test $wall_werror = yes; then CFLAGS="$CFLAGS -Werror " fi -AC_CHECK_HEADERS(openssl/hmac.h openssl/md5.h) +AC_ARG_ENABLE(ssl-hmac, + [ --enable-ssl-hmac=[yes/no] enables use of ssl/hmac for stun], + [case "${enableval}" in + yes) ssl_hmac_enabled=yes;; + no) ssl_hmac_enabled=no;; + *) AC_MSG_ERROR("Bad value for --enable-ssl-hmac");; + esac], + [ssl_hmac_enabled=yes]) + +if test "$ssl_hmac_enabled" = "yes" ; then + AC_CHECK_HEADERS(openssl/hmac.h openssl/md5.h) + AC_CHECK_LIB(ssl,SSL_CTX_new,[SSL_LIBS="-lssl"]) + AC_CHECK_LIB(crypto,MD5,[SSL_LIBS="$SSL_LIBS -lcrypto"]) +fi + + + -AC_CHECK_LIB(ssl,SSL_CTX_new,[SSL_LIBS="-lssl"]) -AC_CHECK_LIB(crypto,MD5,[SSL_LIBS="$SSL_LIBS -lcrypto"]) AC_SUBST(SSL_LIBS)