Index: pjproject/trunk/aconfigure
===================================================================
--- pjproject/trunk/aconfigure	(revision 4656)
+++ pjproject/trunk/aconfigure	(revision 4701)
@@ -651,4 +651,6 @@
 ac_external_pa
 ac_pjmedia_snd
+ac_pjmedia_resample
+ac_external_srtp
 ac_external_gsm
 ac_external_speex
@@ -743,4 +745,6 @@
 with_external_speex
 with_external_gsm
+with_external_srtp
+enable_resample
 enable_sound
 with_external_pa
@@ -1410,4 +1414,5 @@
   --enable-epoll          Use /dev/epoll ioqueue on Linux (experimental)
   --enable-shared         Build shared libraries
+  --disable-resample      Disable resampling implementations
   --disable-sound         Exclude sound (i.e. use null sound)
   --disable-oss           Disable OSS audio (default: not disabled)
@@ -1424,6 +1429,5 @@
   --disable-speex-codec   Exclude Speex codecs in the build
   --disable-ilbc-codec    Exclude iLBC codec in the build
-  --enable-libsamplerate  Link with libsamplerate when available. Note that
-                          PJMEDIA_RESAMPLE_IMP must also be configured
+  --enable-libsamplerate  Link with libsamplerate when available.
   --enable-resample-dll   Build libresample as shared library
   --disable-sdl           Disable SDL (default: not disabled)
@@ -1456,4 +1460,9 @@
                           accessible to use (hint: use CFLAGS and LDFLAGS env
                           var to set the include/lib paths)
+  --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)
   --with-external-pa      Use external PortAudio development files, not the
                           one in "third_party" directory. When this option is
@@ -5789,4 +5798,54 @@
 
 
+ac_external_srtp=0
+
+
+# Check whether --with-external-srtp was given.
+if test "${with_external_srtp+set}" = set; then :
+  withval=$with_external_srtp;
+	if test "x$with_external_srtp" != "xno"; then
+		# Test SRTP installation
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external SRTP devkit is installed" >&5
+$as_echo_n "checking if external SRTP devkit is installed... " >&6; }
+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <srtp/srtp.h>
+
+int
+main ()
+{
+srtp_init();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5
+$as_echo "yes!!" >&6; }
+				   ac_external_srtp="1"
+
+else
+  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
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+	fi
+
+
+fi
+
+
+
+ac_pjmedia_resample=libresample
+
+# Check whether --enable-resample was given.
+if test "${enable_resample+set}" = set; then :
+  enableval=$enable_resample; if test "$enable_resample" = "no"; then
+		ac_pjmedia_resample=none
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if resampling is disabled...yes" >&5
+$as_echo "Checking if resampling is disabled...yes" >&6; }
+	       fi
+
+fi
+
 
 
@@ -6258,4 +6317,5 @@
 fi
 
+	      ac_pjmedia_resample=libsamplerate
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: Skipping libsamplerate detection" >&5
@@ -7455,5 +7515,5 @@
 
 		ac_fn_c_check_header_mongrel "$LINENO" "vo-amrwbenc/enc_if.h" "ac_cv_header_vo_amrwbenc_enc_if_h" "$ac_includes_default"
-if test "x$ac_cv_header_vo_amrwbenc_enc_if_h" = xyes; then :
+if test "x$ac_cv_header_vo_amrwbenc_enc_if_h" = x""yes; then :
   opencore_amrwb_enc_h_present=1
 fi
@@ -7461,5 +7521,5 @@
 
 		ac_fn_c_check_header_mongrel "$LINENO" "opencore-amrwb/dec_if.h" "ac_cv_header_opencore_amrwb_dec_if_h" "$ac_includes_default"
-if test "x$ac_cv_header_opencore_amrwb_dec_if_h" = xyes; then :
+if test "x$ac_cv_header_opencore_amrwb_dec_if_h" = x""yes; then :
   opencore_amrwb_dec_h_present=1
 fi
@@ -7468,5 +7528,5 @@
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for D_IF_init in -lopencore-amrwb" >&5
 $as_echo_n "checking for D_IF_init in -lopencore-amrwb... " >&6; }
-if ${ac_cv_lib_opencore_amrwb_D_IF_init+:} false; then :
+if test "${ac_cv_lib_opencore_amrwb_D_IF_init+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
@@ -7502,5 +7562,5 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_opencore_amrwb_D_IF_init" >&5
 $as_echo "$ac_cv_lib_opencore_amrwb_D_IF_init" >&6; }
-if test "x$ac_cv_lib_opencore_amrwb_D_IF_init" = xyes; then :
+if test "x$ac_cv_lib_opencore_amrwb_D_IF_init" = x""yes; then :
   opencore_amrwb_dec_present=1 && LIBS="$LIBS -lopencore-amrwb"
 fi
@@ -7508,5 +7568,5 @@
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for E_IF_init in -lvo-amrwbenc" >&5
 $as_echo_n "checking for E_IF_init in -lvo-amrwbenc... " >&6; }
-if ${ac_cv_lib_vo_amrwbenc_E_IF_init+:} false; then :
+if test "${ac_cv_lib_vo_amrwbenc_E_IF_init+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
@@ -7542,5 +7602,5 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vo_amrwbenc_E_IF_init" >&5
 $as_echo "$ac_cv_lib_vo_amrwbenc_E_IF_init" >&6; }
-if test "x$ac_cv_lib_vo_amrwbenc_E_IF_init" = xyes; then :
+if test "x$ac_cv_lib_vo_amrwbenc_E_IF_init" = x""yes; then :
   opencore_amrwb_enc_present=1 && LIBS="$LIBS -lvo-amrwbenc"
 fi
@@ -7601,5 +7661,5 @@
 
 		ac_fn_c_check_header_mongrel "$LINENO" "SKP_Silk_SDK_API.h" "ac_cv_header_SKP_Silk_SDK_API_h" "$ac_includes_default"
-if test "x$ac_cv_header_SKP_Silk_SDK_API_h" = xyes; then :
+if test "x$ac_cv_header_SKP_Silk_SDK_API_h" = x""yes; then :
   silk_h_present=1
 fi
@@ -7608,5 +7668,5 @@
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SKP_Silk_SDK_get_version in -lSKP_SILK_SDK" >&5
 $as_echo_n "checking for SKP_Silk_SDK_get_version in -lSKP_SILK_SDK... " >&6; }
-if ${ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version+:} false; then :
+if test "${ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
@@ -7642,5 +7702,5 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" >&5
 $as_echo "$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" >&6; }
-if test "x$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" = xyes; then :
+if test "x$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" = x""yes; then :
   silk_present=1 && LIBS="$LIBS -lSKP_SILK_SDK"
 fi
