Ignore:
Timestamp:
Sep 22, 2017 2:42:22 AM (7 years ago)
Author:
ming
Message:

Re #1993: With the update of bundled libSRTP to 2.1, external SRTP needs to be of version 2.x as well. This changeset will allow external SRTP users the option to continue using their current version 1.x.

  • Also add autodetection of external SRTP version via the configure script.

Thanks to Alexander Traud for the report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure.ac

    r5630 r5656  
    567567dnl # Use external SRTP installation 
    568568AC_SUBST(ac_external_srtp,0) 
     569AC_SUBST(ac_external_srtp_lib) 
    569570AC_ARG_WITH(external-srtp, 
    570571    AS_HELP_STRING([--with-external-srtp], 
     
    574575                # Test SRTP installation 
    575576                AC_MSG_CHECKING([if external SRTP devkit is installed]) 
    576                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <srtp/srtp.h> 
     577                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <srtp2/srtp.h> 
    577578                                                     ]], 
    578579                                                  [srtp_init();])], 
    579                                   [AC_MSG_RESULT(yes!!) 
     580                                  [AC_MSG_RESULT(yes: version 2.x) 
     581                                   ac_external_srtp="2" 
     582                                   ac_external_srtp_lib="srtp2" 
     583                                   ], 
     584                                  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <srtp/srtp.h> 
     585                                                     ]], 
     586                                                  [srtp_init();])], 
     587                                  [AC_MSG_RESULT(yes: version 1.x) 
    580588                                   ac_external_srtp="1" 
     589                                   ac_external_srtp_lib="srtp" 
    581590                                   ], 
    582                                   [AC_MSG_ERROR([Unable to use SRTP. If SRTP development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])]) 
     591                                  [AC_MSG_ERROR([Unable to use SRTP. If SRTP development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])])]) 
    583592        fi 
    584593    ] 
     
    586595 
    587596dnl # For external SRTP, check availability of srtp_deinit() or srtp_shutdown() 
    588 if test "x$ac_external_srtp" = "x1"; then 
     597if test "x$ac_external_srtp" != "x0"; then 
    589598        AC_SUBST(ac_srtp_deinit_present,0) 
    590599        AC_SUBST(ac_srtp_shutdown_present,0) 
    591         AC_CHECK_LIB(srtp,srtp_deinit,[ac_srtp_deinit_present=1]) 
     600        AC_CHECK_LIB($ac_external_srtp_lib,srtp_deinit,[ac_srtp_deinit_present=1]) 
    592601        if test "x$ac_srtp_deinit_present" != "x1"; then 
    593                 AC_CHECK_LIB(srtp,srtp_shutdown,[ac_srtp_shutdown_present=1]) 
     602                AC_CHECK_LIB($ac_external_srtp_lib,srtp_shutdown,[ac_srtp_shutdown_present=1]) 
    594603        fi 
    595604fi 
Note: See TracChangeset for help on using the changeset viewer.