Changeset 5656
- Timestamp:
- Sep 22, 2017 2:42:22 AM (7 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/aconfigure
r5630 r5656 691 691 ac_srtp_shutdown_present 692 692 ac_srtp_deinit_present 693 ac_external_srtp_lib 693 694 ac_external_srtp 694 695 ac_external_gsm … … 758 759 oldincludedir 759 760 includedir 760 runstatedir761 761 localstatedir 762 762 sharedstatedir … … 883 883 sharedstatedir='${prefix}/com' 884 884 localstatedir='${prefix}/var' 885 runstatedir='${localstatedir}/run'886 885 includedir='${prefix}/include' 887 886 oldincludedir='/usr/include' … … 1136 1135 silent=yes ;; 1137 1136 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 1147 1137 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 1148 1138 ac_prev=sbindir ;; … … 1282 1272 datadir sysconfdir sharedstatedir localstatedir includedir \ 1283 1273 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1284 libdir localedir mandir runstatedir1274 libdir localedir mandir 1285 1275 do 1286 1276 eval ac_val=\$$ac_var … … 1435 1425 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1436 1426 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1437 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]1438 1427 --libdir=DIR object code libraries [EPREFIX/lib] 1439 1428 --includedir=DIR C header files [PREFIX/include] … … 6010 5999 6011 6000 6001 6012 6002 # Check whether --with-external-srtp was given. 6013 6003 if test "${with_external_srtp+set}" = set; then : … … 6019 6009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6020 6010 /* end confdefs.h. */ 6021 #include <srtp /srtp.h>6011 #include <srtp2/srtp.h> 6022 6012 6023 6013 int … … 6030 6020 _ACEOF 6031 6021 if 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 6027 else 6028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6029 /* end confdefs.h. */ 6030 #include <srtp/srtp.h> 6031 6032 int 6033 main () 6034 { 6035 srtp_init(); 6036 ; 6037 return 0; 6038 } 6039 _ACEOF 6040 if 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; } 6034 6043 ac_external_srtp="1" 6044 ac_external_srtp_lib="srtp" 6035 6045 6036 6046 else 6037 6047 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 6048 fi 6049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6038 6050 fi 6039 6051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext … … 6044 6056 6045 6057 6046 if test "x$ac_external_srtp" = "x1"; then6058 if test "x$ac_external_srtp" != "x0"; then 6047 6059 ac_srtp_deinit_present=0 6048 6060 6049 6061 ac_srtp_shutdown_present=0 6050 6062 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; } 6066 if eval \${$as_ac_Lib+:} false; then : 6054 6067 $as_echo_n "(cached) " >&6 6055 6068 else 6056 6069 ac_check_lib_save_LIBS=$LIBS 6057 LIBS="-l srtp$LIBS"6070 LIBS="-l$ac_external_srtp_lib $LIBS" 6058 6071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6059 6072 /* end confdefs.h. */ … … 6075 6088 _ACEOF 6076 6089 if ac_fn_c_try_link "$LINENO"; then : 6077 ac_cv_lib_srtp_srtp_deinit=yes6078 else 6079 ac_cv_lib_srtp_srtp_deinit=no6090 eval "$as_ac_Lib=yes" 6091 else 6092 eval "$as_ac_Lib=no" 6080 6093 fi 6081 6094 rm -f core conftest.err conftest.$ac_objext \ … … 6083 6096 LIBS=$ac_check_lib_save_LIBS 6084 6097 fi 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 : 6098 eval ac_res=\$$as_ac_Lib 6099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 6100 $as_echo "$ac_res" >&6; } 6101 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : 6088 6102 ac_srtp_deinit_present=1 6089 6103 fi 6090 6104 6091 6105 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; } 6109 if eval \${$as_ac_Lib+:} false; then : 6095 6110 $as_echo_n "(cached) " >&6 6096 6111 else 6097 6112 ac_check_lib_save_LIBS=$LIBS 6098 LIBS="-l srtp$LIBS"6113 LIBS="-l$ac_external_srtp_lib $LIBS" 6099 6114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6100 6115 /* end confdefs.h. */ … … 6116 6131 _ACEOF 6117 6132 if ac_fn_c_try_link "$LINENO"; then : 6118 ac_cv_lib_srtp_srtp_shutdown=yes6119 else 6120 ac_cv_lib_srtp_srtp_shutdown=no6133 eval "$as_ac_Lib=yes" 6134 else 6135 eval "$as_ac_Lib=no" 6121 6136 fi 6122 6137 rm -f core conftest.err conftest.$ac_objext \ … … 6124 6139 LIBS=$ac_check_lib_save_LIBS 6125 6140 fi 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 : 6141 eval ac_res=\$$as_ac_Lib 6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 6143 $as_echo "$ac_res" >&6; } 6144 if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : 6129 6145 ac_srtp_shutdown_present=1 6130 6146 fi -
pjproject/trunk/aconfigure.ac
r5630 r5656 567 567 dnl # Use external SRTP installation 568 568 AC_SUBST(ac_external_srtp,0) 569 AC_SUBST(ac_external_srtp_lib) 569 570 AC_ARG_WITH(external-srtp, 570 571 AS_HELP_STRING([--with-external-srtp], … … 574 575 # Test SRTP installation 575 576 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> 577 578 ]], 578 579 [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) 580 588 ac_external_srtp="1" 589 ac_external_srtp_lib="srtp" 581 590 ], 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])])]) 583 592 fi 584 593 ] … … 586 595 587 596 dnl # For external SRTP, check availability of srtp_deinit() or srtp_shutdown() 588 if test "x$ac_external_srtp" = "x1"; then597 if test "x$ac_external_srtp" != "x0"; then 589 598 AC_SUBST(ac_srtp_deinit_present,0) 590 599 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]) 592 601 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]) 594 603 fi 595 604 fi -
pjproject/trunk/build.mak.in
r5606 r5656 29 29 export APP_THIRD_PARTY_LIB_FILES := 30 30 31 if eq (@ac_external_srtp@,1)31 ifneq (@ac_external_srtp@,0) 32 32 # External SRTP library 33 APP_THIRD_PARTY_EXT += -l srtp33 APP_THIRD_PARTY_EXT += -l@ac_external_srtp_lib@ 34 34 else 35 35 APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libsrtp-$(LIB_SUFFIX) -
pjproject/trunk/pjmedia/build/os-auto.mak.in
r5630 r5656 149 149 # SRTP 150 150 # 151 if eq (@ac_external_srtp@,1)151 ifneq (@ac_external_srtp@,0) 152 152 # External SRTP 153 export CFLAGS += -DPJMEDIA_EXTERNAL_SRTP= 1153 export CFLAGS += -DPJMEDIA_EXTERNAL_SRTP=@ac_external_srtp@ 154 154 # SRTP srtp_deinit()/srtp_shutdown() API availability settings 155 155 export CFLAGS += -DPJMEDIA_SRTP_HAS_DEINIT=@ac_srtp_deinit_present@ \ -
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r5640 r5656 45 45 #endif 46 46 47 #if defined(PJMEDIA_EXTERNAL_SRTP) && (PJMEDIA_EXTERNAL_SRTP != 0) 47 #if defined(PJMEDIA_EXTERNAL_SRTP) 48 49 #if (PJMEDIA_EXTERNAL_SRTP == 1) /* External SRTP 1.x */ 48 50 # include <srtp/srtp.h> 49 51 # include <srtp/crypto_kernel.h> 50 #else 52 #define srtp_crypto_policy_t crypto_policy_t 53 #define srtp_cipher_type_id_t cipher_type_id_t 54 #define srtp_cipher_type_t cipher_type_t 55 #define srtp_auth_type_id_t auth_type_id_t 56 #define srtp_sec_serv_t sec_serv_t 57 #define srtp_err_status_t err_status_t 58 #define srtp_err_status_ok err_status_ok 59 #define srtp_err_status_replay_old err_status_replay_old 60 #define srtp_err_status_replay_fail err_status_replay_fail 61 #define srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32 \ 62 crypto_policy_set_aes_cm_256_hmac_sha1_32 63 #define srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80 \ 64 crypto_policy_set_aes_cm_256_hmac_sha1_80 65 #define SRTP_NULL_CIPHER NULL_CIPHER 66 #define SRTP_NULL_AUTH NULL_AUTH 67 #define SRTP_AES_ICM_128 AES_ICM 68 #define SRTP_AES_ICM_256 AES_ICM 69 #define SRTP_HMAC_SHA1 HMAC_SHA1 70 71 #else /* External SRTP 2.x */ 72 # include <srtp2/srtp.h> 73 # include <srtp2/cipher.h> 74 #endif 75 76 #else /* Bundled SRTP */ 51 77 # include <srtp.h> 52 78 # include <crypto_kernel.h> -
pjproject/trunk/third_party/build/os-auto.mak.in
r5614 r5656 40 40 endif 41 41 42 if eq (@ac_external_srtp@,1)42 ifneq (@ac_external_srtp@,0) 43 43 # External SRTP 44 44 else
Note: See TracChangeset
for help on using the changeset viewer.