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

    r5630 r5656  
    691691ac_srtp_shutdown_present 
    692692ac_srtp_deinit_present 
     693ac_external_srtp_lib 
    693694ac_external_srtp 
    694695ac_external_gsm 
     
    758759oldincludedir 
    759760includedir 
    760 runstatedir 
    761761localstatedir 
    762762sharedstatedir 
     
    883883sharedstatedir='${prefix}/com' 
    884884localstatedir='${prefix}/var' 
    885 runstatedir='${localstatedir}/run' 
    886885includedir='${prefix}/include' 
    887886oldincludedir='/usr/include' 
     
    11361135    silent=yes ;; 
    11371136 
    1138   -runstatedir | --runstatedir | --runstatedi | --runstated \ 
    1139   | --runstate | --runstat | --runsta | --runst | --runs \ 
    1140   | --run | --ru | --r) 
    1141     ac_prev=runstatedir ;; 
    1142   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ 
    1143   | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ 
    1144   | --run=* | --ru=* | --r=*) 
    1145     runstatedir=$ac_optarg ;; 
    1146  
    11471137  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 
    11481138    ac_prev=sbindir ;; 
     
    12821272                datadir sysconfdir sharedstatedir localstatedir includedir \ 
    12831273                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 
    1284                 libdir localedir mandir runstatedir 
     1274                libdir localedir mandir 
    12851275do 
    12861276  eval ac_val=\$$ac_var 
     
    14351425  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com] 
    14361426  --localstatedir=DIR     modifiable single-machine data [PREFIX/var] 
    1437   --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run] 
    14381427  --libdir=DIR            object code libraries [EPREFIX/lib] 
    14391428  --includedir=DIR        C header files [PREFIX/include] 
     
    60105999 
    60116000 
     6001 
    60126002# Check whether --with-external-srtp was given. 
    60136003if test "${with_external_srtp+set}" = set; then : 
     
    60196009                cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
    60206010/* end confdefs.h.  */ 
    6021 #include <srtp/srtp.h> 
     6011#include <srtp2/srtp.h> 
    60226012 
    60236013int 
     
    60306020_ACEOF 
    60316021if ac_fn_c_try_compile "$LINENO"; then : 
    6032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 
    6033 $as_echo "yes!!" >&6; } 
     6022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: version 2.x" >&5 
     6023$as_echo "yes: version 2.x" >&6; } 
     6024                                   ac_external_srtp="2" 
     6025                                   ac_external_srtp_lib="srtp2" 
     6026 
     6027else 
     6028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     6029/* end confdefs.h.  */ 
     6030#include <srtp/srtp.h> 
     6031 
     6032int 
     6033main () 
     6034{ 
     6035srtp_init(); 
     6036  ; 
     6037  return 0; 
     6038} 
     6039_ACEOF 
     6040if ac_fn_c_try_compile "$LINENO"; then : 
     6041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: version 1.x" >&5 
     6042$as_echo "yes: version 1.x" >&6; } 
    60346043                                   ac_external_srtp="1" 
     6044                                   ac_external_srtp_lib="srtp" 
    60356045 
    60366046else 
    60376047  as_fn_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" "$LINENO" 5 
     6048fi 
     6049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 
    60386050fi 
    60396051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 
     
    60446056 
    60456057 
    6046 if test "x$ac_external_srtp" = "x1"; then 
     6058if test "x$ac_external_srtp" != "x0"; then 
    60476059        ac_srtp_deinit_present=0 
    60486060 
    60496061        ac_srtp_shutdown_present=0 
    60506062 
    6051         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_deinit in -lsrtp" >&5 
    6052 $as_echo_n "checking for srtp_deinit in -lsrtp... " >&6; } 
    6053 if ${ac_cv_lib_srtp_srtp_deinit+:} false; then : 
     6063        as_ac_Lib=`$as_echo "ac_cv_lib_$ac_external_srtp_lib''_srtp_deinit" | $as_tr_sh` 
     6064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_deinit in -l$ac_external_srtp_lib" >&5 
     6065$as_echo_n "checking for srtp_deinit in -l$ac_external_srtp_lib... " >&6; } 
     6066if eval \${$as_ac_Lib+:} false; then : 
    60546067  $as_echo_n "(cached) " >&6 
    60556068else 
    60566069  ac_check_lib_save_LIBS=$LIBS 
    6057 LIBS="-lsrtp  $LIBS" 
     6070LIBS="-l$ac_external_srtp_lib  $LIBS" 
    60586071cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
    60596072/* end confdefs.h.  */ 
     
    60756088_ACEOF 
    60766089if ac_fn_c_try_link "$LINENO"; then : 
    6077   ac_cv_lib_srtp_srtp_deinit=yes 
    6078 else 
    6079   ac_cv_lib_srtp_srtp_deinit=no 
     6090  eval "$as_ac_Lib=yes" 
     6091else 
     6092  eval "$as_ac_Lib=no" 
    60806093fi 
    60816094rm -f core conftest.err conftest.$ac_objext \ 
     
    60836096LIBS=$ac_check_lib_save_LIBS 
    60846097fi 
    6085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_srtp_srtp_deinit" >&5 
    6086 $as_echo "$ac_cv_lib_srtp_srtp_deinit" >&6; } 
    6087 if test "x$ac_cv_lib_srtp_srtp_deinit" = xyes; then : 
     6098eval ac_res=\$$as_ac_Lib 
     6099               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 
     6100$as_echo "$ac_res" >&6; } 
     6101if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : 
    60886102  ac_srtp_deinit_present=1 
    60896103fi 
    60906104 
    60916105        if test "x$ac_srtp_deinit_present" != "x1"; then 
    6092                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_shutdown in -lsrtp" >&5 
    6093 $as_echo_n "checking for srtp_shutdown in -lsrtp... " >&6; } 
    6094 if ${ac_cv_lib_srtp_srtp_shutdown+:} false; then : 
     6106                as_ac_Lib=`$as_echo "ac_cv_lib_$ac_external_srtp_lib''_srtp_shutdown" | $as_tr_sh` 
     6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for srtp_shutdown in -l$ac_external_srtp_lib" >&5 
     6108$as_echo_n "checking for srtp_shutdown in -l$ac_external_srtp_lib... " >&6; } 
     6109if eval \${$as_ac_Lib+:} false; then : 
    60956110  $as_echo_n "(cached) " >&6 
    60966111else 
    60976112  ac_check_lib_save_LIBS=$LIBS 
    6098 LIBS="-lsrtp  $LIBS" 
     6113LIBS="-l$ac_external_srtp_lib  $LIBS" 
    60996114cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
    61006115/* end confdefs.h.  */ 
     
    61166131_ACEOF 
    61176132if ac_fn_c_try_link "$LINENO"; then : 
    6118   ac_cv_lib_srtp_srtp_shutdown=yes 
    6119 else 
    6120   ac_cv_lib_srtp_srtp_shutdown=no 
     6133  eval "$as_ac_Lib=yes" 
     6134else 
     6135  eval "$as_ac_Lib=no" 
    61216136fi 
    61226137rm -f core conftest.err conftest.$ac_objext \ 
     
    61246139LIBS=$ac_check_lib_save_LIBS 
    61256140fi 
    6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_srtp_srtp_shutdown" >&5 
    6127 $as_echo "$ac_cv_lib_srtp_srtp_shutdown" >&6; } 
    6128 if test "x$ac_cv_lib_srtp_srtp_shutdown" = xyes; then : 
     6141eval ac_res=\$$as_ac_Lib 
     6142               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 
     6143$as_echo "$ac_res" >&6; } 
     6144if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : 
    61296145  ac_srtp_shutdown_present=1 
    61306146fi 
Note: See TracChangeset for help on using the changeset viewer.