Newer
Older
else
osptk_cflags=""
osptk_ldflags=""
fi
# check for the header
osptk_saved_cppflags="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${osptk_cflags}"
ac_fn_c_check_header_mongrel "$LINENO" "osp/osp.h" "ac_cv_header_osp_osp_h" "$ac_includes_default"
if test "x$ac_cv_header_osp_osp_h" = xyes; then :
osptk_header_found=yes
osptk_header_found=no
CPPFLAGS="${osptk_saved_cppflags}"
# check for the library
if test "${osptk_header_found}" = "yes"; then
osptk_extralibs="-lssl -lcrypto"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSPPInit in -losptk" >&5
$as_echo_n "checking for OSPPInit in -losptk... " >&6; }
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-losptk ${osptk_ldflags} ${osptk_extralibs} $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 OSPPInit ();
int
main ()
{
return OSPPInit ();
;
return 0;
}
_ACEOF
ac_cv_lib_osptk_OSPPInit=yes
else
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_osptk_OSPPInit" >&5
$as_echo "$ac_cv_lib_osptk_OSPPInit" >&6; }
if test "x$ac_cv_lib_osptk_OSPPInit" = xyes; then :
osptk_library_found=yes
else
osptk_library_found=no
fi
# check OSP Toolkit version
if test "${osptk_library_found}" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if OSP Toolkit version is compatible with app_osplookup" >&5
$as_echo_n "checking if OSP Toolkit version is compatible with app_osplookup... " >&6; }
osptk_saved_cppflags="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${osptk_cflags}"
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run test program while cross compiling
See \`config.log' for more details" "$LINENO" 5; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <osp/osp.h>
int main(void) {
int ver = OSP_CLIENT_TOOLKIT_VERSION_MAJOR * 10000 + OSP_CLIENT_TOOLKIT_VERSION_MINOR * 100 + OSP_CLIENT_TOOLKIT_VERSION_BUGFIX;
int req = 4 * 10000 + 0 * 100 + 0;
return (ver < req) ? 1 : 0;
}
_ACEOF
osptk_compatible=yes
else
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
CPPFLAGS="${osptk_saved_cppflags}"
if test "${osptk_compatible}" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
PBX_OSPTK=1
OSPTK_INCLUDE="${osptk_cflags}"
OSPTK_LIB="${osptk_ldflags} -losptk ${osptk_extralibs}"
cat >>confdefs.h <<_ACEOF
#define HAVE_OSPTK 1
_ACEOF
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
fi
fi
fi
fi
if test "x${PBX_SRTP}" != "x1" -a "${USE_SRTP}" != "no"; then
pbxlibdir=""
# if --with-SRTP=DIR has been specified, use it.
if test "x${SRTP_DIR}" != "x"; then
if test -d ${SRTP_DIR}/lib; then
pbxlibdir="-L${SRTP_DIR}/lib"
else
pbxlibdir="-L${SRTP_DIR}"
fi
fi
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_init in -lsrtp2" >&5
$as_echo_n "checking for srtp_init in -lsrtp2... " >&6; }
if ${ac_cv_lib_srtp2_srtp_init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsrtp2 ${pbxlibdir} $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
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_srtp2_srtp_init=yes
ac_cv_lib_srtp2_srtp_init=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_srtp2_srtp_init" >&5
$as_echo "$ac_cv_lib_srtp2_srtp_init" >&6; }
if test "x$ac_cv_lib_srtp2_srtp_init" = xyes; then :
AST_SRTP_FOUND=yes
else
AST_SRTP_FOUND=no
fi
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_SRTP_FOUND}" = "yes"; then
SRTP_LIB="${pbxlibdir} -lsrtp2 "
# if --with-SRTP=DIR has been specified, use it.
if test "x${SRTP_DIR}" != "x"; then
SRTP_INCLUDE="-I${SRTP_DIR}/include"
fi
SRTP_INCLUDE="${SRTP_INCLUDE} "
# check for the header
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${SRTP_INCLUDE}"
ac_fn_c_check_header_mongrel "$LINENO" "srtp2/srtp.h" "ac_cv_header_srtp2_srtp_h" "$ac_includes_default"
if test "x$ac_cv_header_srtp2_srtp_h" = xyes; then :
SRTP_HEADER_FOUND=1
else
SRTP_HEADER_FOUND=0
fi
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${SRTP_HEADER_FOUND}" = "x0" ; then
SRTP_LIB=""
SRTP_INCLUDE=""
else
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
PBX_SRTP=1
cat >>confdefs.h <<_ACEOF
#define HAVE_SRTP 1
_ACEOF
cat >>confdefs.h <<_ACEOF
#define HAVE_SRTP_VERSION 2
_ACEOF
fi
fi
fi
if test "x${PBX_SRTP}" = "x1"; then
ast_ext_lib_check_shared_saved_libs="${LIBS}"
ast_ext_lib_check_shared_saved_ldflags="${LDFLAGS}"
ast_ext_lib_check_shared_saved_cflags="${CFLAGS}"
LIBS="${LIBS} ${SRTP_LIB} "
LDFLAGS="${LDFLAGS} -shared -fPIC"
CFLAGS="${CFLAGS} ${SRTP_INCLUDE} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ability of -lsrtp2 to be linked in a shared object" >&5
$as_echo_n "checking for the ability of -lsrtp2 to be linked in a shared object... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <srtp2/srtp.h>
int
main ()
{
srtp_init();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***" >&5
$as_echo "$as_me: WARNING: ***" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libsrtp2 could not be linked as a shared object." >&5
$as_echo "$as_me: WARNING: *** libsrtp2 could not be linked as a shared object." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Try compiling libsrtp2 manually. Configure libsrtp2" >&5
$as_echo "$as_me: WARNING: *** Try compiling libsrtp2 manually. Configure libsrtp2" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** with ./configure --prefix=/usr replacing /usr with" >&5
$as_echo "$as_me: WARNING: *** with ./configure --prefix=/usr replacing /usr with" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** the prefix of your choice, and then make with" >&5
$as_echo "$as_me: WARNING: *** the prefix of your choice, and then make with" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** 'make libsrtp2.so'" >&5
$as_echo "$as_me: WARNING: *** 'make libsrtp2.so'" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***" >&5
$as_echo "$as_me: WARNING: ***" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** After re-installing libsrtp2, re-run the Asterisk" >&5
$as_echo "$as_me: WARNING: *** After re-installing libsrtp2, re-run the Asterisk" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** configure script." >&5
$as_echo "$as_me: WARNING: *** configure script." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***" >&5
$as_echo "$as_me: WARNING: ***" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** If you do not need SRTP support re-run configure" >&5
$as_echo "$as_me: WARNING: *** If you do not need SRTP support re-run configure" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** with the --without-srtp option." >&5
$as_echo "$as_me: WARNING: *** with the --without-srtp option." >&2;}
exit 1
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS="${ast_ext_lib_check_shared_saved_cflags}"
LDFLAGS="${ast_ext_lib_check_shared_saved_ldflags}"
LIBS="${ast_ext_lib_check_shared_saved_libs}"
fi
if test "x$PBX_SRTP" = x1;
then
if test "x${PBX_SRTP_256}" != "x1" -a "${USE_SRTP_256}" != "no"; then
pbxlibdir=""
# if --with-SRTP_256=DIR has been specified, use it.
if test "x${SRTP_256_DIR}" != "x"; then
if test -d ${SRTP_256_DIR}/lib; then
pbxlibdir="-L${SRTP_256_DIR}/lib"
else
pbxlibdir="-L${SRTP_256_DIR}"
fi
fi
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80 in -lsrtp2" >&5
$as_echo_n "checking for srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80 in -lsrtp2... " >&6; }
if ${ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsrtp2 ${pbxlibdir} $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 srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80 ();
return srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80 ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80=yes
ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80=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_srtp2_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80" >&5
$as_echo "$ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80" >&6; }
if test "x$ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80" = xyes; then :
AST_SRTP_256_FOUND=yes
else
AST_SRTP_256_FOUND=no
fi
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_SRTP_256_FOUND}" = "yes"; then
SRTP_256_LIB="${pbxlibdir} -lsrtp2 "
# if --with-SRTP_256=DIR has been specified, use it.
if test "x${SRTP_256_DIR}" != "x"; then
SRTP_256_INCLUDE="-I${SRTP_256_DIR}/include"
fi
SRTP_256_INCLUDE="${SRTP_256_INCLUDE} "
# no header, assume found
SRTP_256_HEADER_FOUND="1"
if test "x${SRTP_256_HEADER_FOUND}" = "x0" ; then
SRTP_256_LIB=""
SRTP_256_INCLUDE=""
else
PBX_SRTP_256=1
cat >>confdefs.h <<_ACEOF
#define HAVE_SRTP_256 1
_ACEOF
fi
fi
fi
if test "x${PBX_SRTP_192}" != "x1" -a "${USE_SRTP_192}" != "no"; then
pbxlibdir=""
# if --with-SRTP_192=DIR has been specified, use it.
if test "x${SRTP_192_DIR}" != "x"; then
if test -d ${SRTP_192_DIR}/lib; then
pbxlibdir="-L${SRTP_192_DIR}/lib"
else
pbxlibdir="-L${SRTP_192_DIR}"
fi
fi
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80 in -lsrtp2" >&5
$as_echo_n "checking for srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80 in -lsrtp2... " >&6; }
if ${ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsrtp2 ${pbxlibdir} $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 srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80 ();
int
main ()
{
return srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80 ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80=yes
ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80=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_srtp2_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80" >&5
$as_echo "$ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80" >&6; }
if test "x$ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80" = xyes; then :
AST_SRTP_192_FOUND=yes
else
AST_SRTP_192_FOUND=no
fi
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_SRTP_192_FOUND}" = "yes"; then
SRTP_192_LIB="${pbxlibdir} -lsrtp2 "
# if --with-SRTP_192=DIR has been specified, use it.
if test "x${SRTP_192_DIR}" != "x"; then
SRTP_192_INCLUDE="-I${SRTP_192_DIR}/include"
fi
SRTP_192_INCLUDE="${SRTP_192_INCLUDE} "
# no header, assume found
SRTP_192_HEADER_FOUND="1"
if test "x${SRTP_192_HEADER_FOUND}" = "x0" ; then
SRTP_192_LIB=""
SRTP_192_INCLUDE=""
else
PBX_SRTP_192=1
cat >>confdefs.h <<_ACEOF
#define HAVE_SRTP_192 1
_ACEOF
fi
fi
fi
if test "x${PBX_SRTP_GCM}" != "x1" -a "${USE_SRTP_GCM}" != "no"; then
pbxlibdir=""
# if --with-SRTP_GCM=DIR has been specified, use it.
if test "x${SRTP_GCM_DIR}" != "x"; then
if test -d ${SRTP_GCM_DIR}/lib; then
pbxlibdir="-L${SRTP_GCM_DIR}/lib"
else
pbxlibdir="-L${SRTP_GCM_DIR}"
fi
fi
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_crypto_policy_set_aes_gcm_128_8_auth in -lsrtp2" >&5
$as_echo_n "checking for srtp_crypto_policy_set_aes_gcm_128_8_auth in -lsrtp2... " >&6; }
if ${ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_gcm_128_8_auth+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsrtp2 ${pbxlibdir} $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 srtp_crypto_policy_set_aes_gcm_128_8_auth ();
return srtp_crypto_policy_set_aes_gcm_128_8_auth ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_gcm_128_8_auth=yes
ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_gcm_128_8_auth=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_srtp2_srtp_crypto_policy_set_aes_gcm_128_8_auth" >&5
$as_echo "$ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_gcm_128_8_auth" >&6; }
if test "x$ac_cv_lib_srtp2_srtp_crypto_policy_set_aes_gcm_128_8_auth" = xyes; then :
AST_SRTP_GCM_FOUND=yes
else
AST_SRTP_GCM_FOUND=no
fi
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_SRTP_GCM_FOUND}" = "yes"; then
SRTP_GCM_LIB="${pbxlibdir} -lsrtp2 "
# if --with-SRTP_GCM=DIR has been specified, use it.
if test "x${SRTP_GCM_DIR}" != "x"; then
SRTP_GCM_INCLUDE="-I${SRTP_GCM_DIR}/include"
fi
SRTP_GCM_INCLUDE="${SRTP_GCM_INCLUDE} "
# no header, assume found
SRTP_GCM_HEADER_FOUND="1"
if test "x${SRTP_GCM_HEADER_FOUND}" = "x0" ; then
SRTP_GCM_LIB=""
SRTP_GCM_INCLUDE=""
else
31545
31546
31547
31548
31549
31550
31551
31552
31553
31554
31555
31556
31557
31558
31559
31560
31561
31562
31563
31564
31565
PBX_SRTP_GCM=1
cat >>confdefs.h <<_ACEOF
#define HAVE_SRTP_GCM 1
_ACEOF
fi
fi
fi
if test "x${PBX_SRTP_SHUTDOWN}" != "x1" -a "${USE_SRTP_SHUTDOWN}" != "no"; then
pbxlibdir=""
# if --with-SRTP_SHUTDOWN=DIR has been specified, use it.
if test "x${SRTP_SHUTDOWN_DIR}" != "x"; then
if test -d ${SRTP_SHUTDOWN_DIR}/lib; then
pbxlibdir="-L${SRTP_SHUTDOWN_DIR}/lib"
else
pbxlibdir="-L${SRTP_SHUTDOWN_DIR}"
fi
fi
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_shutdown in -lsrtp2" >&5
$as_echo_n "checking for srtp_shutdown in -lsrtp2... " >&6; }
if ${ac_cv_lib_srtp2_srtp_shutdown+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsrtp2 ${pbxlibdir} $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
return srtp_shutdown ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_srtp2_srtp_shutdown=yes
ac_cv_lib_srtp2_srtp_shutdown=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_srtp2_srtp_shutdown" >&5
$as_echo "$ac_cv_lib_srtp2_srtp_shutdown" >&6; }
if test "x$ac_cv_lib_srtp2_srtp_shutdown" = xyes; then :
AST_SRTP_SHUTDOWN_FOUND=yes
else
AST_SRTP_SHUTDOWN_FOUND=no
fi
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_SRTP_SHUTDOWN_FOUND}" = "yes"; then
SRTP_SHUTDOWN_LIB="${pbxlibdir} -lsrtp2 "
# if --with-SRTP_SHUTDOWN=DIR has been specified, use it.
if test "x${SRTP_SHUTDOWN_DIR}" != "x"; then
SRTP_SHUTDOWN_INCLUDE="-I${SRTP_SHUTDOWN_DIR}/include"
fi
SRTP_SHUTDOWN_INCLUDE="${SRTP_SHUTDOWN_INCLUDE} "
# check for the header
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${SRTP_SHUTDOWN_INCLUDE}"
ac_fn_c_check_header_mongrel "$LINENO" "srtp2/srtp.h" "ac_cv_header_srtp2_srtp_h" "$ac_includes_default"
if test "x$ac_cv_header_srtp2_srtp_h" = xyes; then :
SRTP_SHUTDOWN_HEADER_FOUND=1
else
SRTP_SHUTDOWN_HEADER_FOUND=0
fi
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${SRTP_SHUTDOWN_HEADER_FOUND}" = "x0" ; then
SRTP_SHUTDOWN_LIB=""
SRTP_SHUTDOWN_INCLUDE=""
else
PBX_SRTP_SHUTDOWN=1
cat >>confdefs.h <<_ACEOF
#define HAVE_SRTP_SHUTDOWN 1
_ACEOF
fi
fi
fi
31652
31653
31654
31655
31656
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666
31667
31668
31669
31670
31671
31672
31673
31674
31675
31676
31677
31678
31679
31680
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693
31694
31695
31696
31697
31698
31699
31700
31701
31702
31703
31704
31705
31706
31707
31708
31709
31710
31711
31712
31713
31714
31715
31716
31717
31718
31719
31720
31721
31722
31723
31724
31725
31726
31727
31728
31729
31730
31731
31732
31733
31734
31735
31736
31737
31738
31739
31740
31741
31742
31743
31744
31745
31746
31747
if test "x${PBX_SRTP_GET_VERSION}" != "x1" -a "${USE_SRTP_GET_VERSION}" != "no"; then
pbxlibdir=""
# if --with-SRTP_GET_VERSION=DIR has been specified, use it.
if test "x${SRTP_GET_VERSION_DIR}" != "x"; then
if test -d ${SRTP_GET_VERSION_DIR}/lib; then
pbxlibdir="-L${SRTP_GET_VERSION_DIR}/lib"
else
pbxlibdir="-L${SRTP_GET_VERSION_DIR}"
fi
fi
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_get_version_string in -lsrtp2" >&5
$as_echo_n "checking for srtp_get_version_string in -lsrtp2... " >&6; }
if ${ac_cv_lib_srtp2_srtp_get_version_string+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsrtp2 ${pbxlibdir} $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 srtp_get_version_string ();
int
main ()
{
return srtp_get_version_string ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_srtp2_srtp_get_version_string=yes
else
ac_cv_lib_srtp2_srtp_get_version_string=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_srtp2_srtp_get_version_string" >&5
$as_echo "$ac_cv_lib_srtp2_srtp_get_version_string" >&6; }
if test "x$ac_cv_lib_srtp2_srtp_get_version_string" = xyes; then :
AST_SRTP_GET_VERSION_FOUND=yes
else
AST_SRTP_GET_VERSION_FOUND=no
fi
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_SRTP_GET_VERSION_FOUND}" = "yes"; then
SRTP_GET_VERSION_LIB="${pbxlibdir} -lsrtp2 "
# if --with-SRTP_GET_VERSION=DIR has been specified, use it.
if test "x${SRTP_GET_VERSION_DIR}" != "x"; then
SRTP_GET_VERSION_INCLUDE="-I${SRTP_GET_VERSION_DIR}/include"
fi
SRTP_GET_VERSION_INCLUDE="${SRTP_GET_VERSION_INCLUDE} "
# check for the header
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${SRTP_GET_VERSION_INCLUDE}"
ac_fn_c_check_header_mongrel "$LINENO" "srtp2/srtp.h" "ac_cv_header_srtp2_srtp_h" "$ac_includes_default"
if test "x$ac_cv_header_srtp2_srtp_h" = xyes; then :
SRTP_GET_VERSION_HEADER_FOUND=1
else
SRTP_GET_VERSION_HEADER_FOUND=0
fi
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${SRTP_GET_VERSION_HEADER_FOUND}" = "x0" ; then
SRTP_GET_VERSION_LIB=""
SRTP_GET_VERSION_INCLUDE=""
else
PBX_SRTP_GET_VERSION=1
cat >>confdefs.h <<_ACEOF
#define HAVE_SRTP_GET_VERSION 1
_ACEOF
fi
fi
fi
# libsrtp2 removed support for PRNG, so we require OpenSSL
if test "x$PBX_OPENSSL" != x1;
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***" >&5
$as_echo "$as_me: WARNING: ***" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** OpenSSL required when using libsrtp2, checking for libsrtp instead." >&5
$as_echo "$as_me: WARNING: *** OpenSSL required when using libsrtp2, checking for libsrtp instead." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***" >&5
$as_echo "$as_me: WARNING: ***" >&2;}
PBX_SRTP=0
fi
fi
if test "x$PBX_SRTP" != x1;
then
if test "x${PBX_SRTP}" != "x1" -a "${USE_SRTP}" != "no"; then
pbxlibdir=""
# if --with-SRTP=DIR has been specified, use it.
if test "x${SRTP_DIR}" != "x"; then
if test -d ${SRTP_DIR}/lib; then
pbxlibdir="-L${SRTP_DIR}/lib"
pbxlibdir="-L${SRTP_DIR}"
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_init in -lsrtp" >&5
$as_echo_n "checking for srtp_init in -lsrtp... " >&6; }
if ${ac_cv_lib_srtp_srtp_init+:} false; then :
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsrtp ${pbxlibdir} $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
;
return 0;
}
_ACEOF
ac_cv_lib_srtp_srtp_init=yes
ac_cv_lib_srtp_srtp_init=no
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_srtp_srtp_init" >&5
$as_echo "$ac_cv_lib_srtp_srtp_init" >&6; }
if test "x$ac_cv_lib_srtp_srtp_init" = xyes; then :
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_SRTP_FOUND}" = "yes"; then
SRTP_LIB="${pbxlibdir} -lsrtp "
# if --with-SRTP=DIR has been specified, use it.
if test "x${SRTP_DIR}" != "x"; then
SRTP_INCLUDE="-I${SRTP_DIR}/include"
fi
SRTP_INCLUDE="${SRTP_INCLUDE} "
# check for the header
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${SRTP_INCLUDE}"
ac_fn_c_check_header_mongrel "$LINENO" "srtp/srtp.h" "ac_cv_header_srtp_srtp_h" "$ac_includes_default"
if test "x$ac_cv_header_srtp_srtp_h" = xyes; then :
SRTP_HEADER_FOUND=1
else
SRTP_HEADER_FOUND=0
fi
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${SRTP_HEADER_FOUND}" = "x0" ; then
SRTP_LIB=""
SRTP_INCLUDE=""
else
PBX_SRTP=1
cat >>confdefs.h <<_ACEOF
#define HAVE_SRTP 1
_ACEOF
cat >>confdefs.h <<_ACEOF
#define HAVE_SRTP_VERSION 1
_ACEOF
fi
fi
fi
if test "x${PBX_SRTP}" = "x1"; then
ast_ext_lib_check_shared_saved_libs="${LIBS}"
ast_ext_lib_check_shared_saved_ldflags="${LDFLAGS}"
ast_ext_lib_check_shared_saved_cflags="${CFLAGS}"
LIBS="${LIBS} ${SRTP_LIB} "
LDFLAGS="${LDFLAGS} -shared -fPIC"
CFLAGS="${CFLAGS} ${SRTP_INCLUDE} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ability of -lsrtp to be linked in a shared object" >&5
$as_echo_n "checking for the ability of -lsrtp to be linked in a shared object... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
srtp_init();
;
return 0;
}
_ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***" >&5
$as_echo "$as_me: WARNING: ***" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libsrtp could not be linked as a shared object." >&5
$as_echo "$as_me: WARNING: *** libsrtp could not be linked as a shared object." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Try compiling libsrtp manually. Configure libsrtp" >&5
$as_echo "$as_me: WARNING: *** Try compiling libsrtp manually. Configure libsrtp" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** with ./configure CFLAGS=-fPIC --prefix=/usr" >&5
$as_echo "$as_me: WARNING: *** with ./configure CFLAGS=-fPIC --prefix=/usr" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** replacing /usr with the prefix of your choice." >&5
$as_echo "$as_me: WARNING: *** replacing /usr with the prefix of your choice." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** After re-installing libsrtp, re-run the Asterisk" >&5
$as_echo "$as_me: WARNING: *** After re-installing libsrtp, re-run the Asterisk" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** configure script." >&5
$as_echo "$as_me: WARNING: *** configure script." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***" >&5
$as_echo "$as_me: WARNING: ***" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** If you do not need SRTP support re-run configure" >&5
$as_echo "$as_me: WARNING: *** If you do not need SRTP support re-run configure" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** with the --without-srtp option." >&5
$as_echo "$as_me: WARNING: *** with the --without-srtp option." >&2;}
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS="${ast_ext_lib_check_shared_saved_cflags}"
LDFLAGS="${ast_ext_lib_check_shared_saved_ldflags}"
LIBS="${ast_ext_lib_check_shared_saved_libs}"
if test "x$PBX_SRTP" = x1;
then
if test "x${PBX_SRTP_256}" != "x1" -a "${USE_SRTP_256}" != "no"; then
pbxlibdir=""
# if --with-SRTP_256=DIR has been specified, use it.
if test "x${SRTP_256_DIR}" != "x"; then
if test -d ${SRTP_256_DIR}/lib; then
pbxlibdir="-L${SRTP_256_DIR}/lib"
else
pbxlibdir="-L${SRTP_256_DIR}"
fi
fi
ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypto_policy_set_aes_cm_256_hmac_sha1_80 in -lsrtp" >&5
$as_echo_n "checking for crypto_policy_set_aes_cm_256_hmac_sha1_80 in -lsrtp... " >&6; }
if ${ac_cv_lib_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsrtp ${pbxlibdir} $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 crypto_policy_set_aes_cm_256_hmac_sha1_80 ();
return crypto_policy_set_aes_cm_256_hmac_sha1_80 ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80=yes
ac_cv_lib_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80=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_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80" >&5
$as_echo "$ac_cv_lib_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80" >&6; }
if test "x$ac_cv_lib_srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80" = xyes; then :
AST_SRTP_256_FOUND=yes
else
AST_SRTP_256_FOUND=no
fi
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
# now check for the header.
if test "${AST_SRTP_256_FOUND}" = "yes"; then
SRTP_256_LIB="${pbxlibdir} -lsrtp "
# if --with-SRTP_256=DIR has been specified, use it.
if test "x${SRTP_256_DIR}" != "x"; then
SRTP_256_INCLUDE="-I${SRTP_256_DIR}/include"
fi
SRTP_256_INCLUDE="${SRTP_256_INCLUDE} "