From 499bda86d351aed23348aa38103738231ae7d4c1 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Fri, 3 Jan 2014 03:44:05 +0000 Subject: Close #1720: - Added configure flags --with-external-srtp and --disable-resample. - Added macro setting PJMEDIA_LIBSRTP_AUTO_INIT_DEINIT to allow application to handle libsrtp init & deinit by itself. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4701 74dad513-b988-da41-8d7b-12977e46ad98 --- aconfigure.ac | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'aconfigure.ac') diff --git a/aconfigure.ac b/aconfigure.ac index 8d77ffa3..20467f2c 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -528,6 +528,37 @@ AC_ARG_WITH(external-gsm, ) +dnl # Use external SRTP installation +AC_SUBST(ac_external_srtp,0) +AC_ARG_WITH(external-srtp, + AC_HELP_STRING([--with-external-srtp], + [Use external SRTP development files, not the one in "third_party" directory. When this option is set, make sure that SRTP is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), + [ + if test "x$with_external_srtp" != "xno"; then + # Test SRTP installation + AC_MSG_CHECKING([if external SRTP devkit is installed]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + ]], + [srtp_init();])], + [AC_MSG_RESULT(yes!!) + ac_external_srtp="1" + ], + [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])]) + fi + ] + ) + + +dnl # Resample implementation +AC_SUBST(ac_pjmedia_resample,libresample) +AC_ARG_ENABLE(resample, + AC_HELP_STRING([--disable-resample], + [Disable resampling implementations]), + [if test "$enable_resample" = "no"; then + [ac_pjmedia_resample=none] + AC_MSG_RESULT([Checking if resampling is disabled...yes]) + fi] + ) dnl # Sound device backend selection AC_SUBST(ac_pjmedia_snd) @@ -831,8 +862,9 @@ AC_ARG_ENABLE(ilbc-codec, dnl # Include libsamplerate AC_ARG_ENABLE(libsamplerate, AC_HELP_STRING([--enable-libsamplerate], - [Link with libsamplerate when available. Note that PJMEDIA_RESAMPLE_IMP must also be configured]), - [ AC_CHECK_LIB(samplerate,src_new) ], + [Link with libsamplerate when available.]), + [ AC_CHECK_LIB(samplerate,src_new) ] + [ac_pjmedia_resample=libsamplerate], AC_MSG_RESULT([Skipping libsamplerate detection]) ) -- cgit v1.2.3