Index: pjproject/trunk/aconfigure
===================================================================
--- pjproject/trunk/aconfigure	(revision 3059)
+++ pjproject/trunk/aconfigure	(revision 3062)
@@ -1,5 +1,5 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for pjproject 1.0.
+# Generated by GNU Autoconf 2.64 for pjproject 1.x.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -547,6 +547,6 @@
 PACKAGE_NAME='pjproject'
 PACKAGE_TARNAME='pjproject'
-PACKAGE_VERSION='1.0'
-PACKAGE_STRING='pjproject 1.0'
+PACKAGE_VERSION='1.x'
+PACKAGE_STRING='pjproject 1.x'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
@@ -611,6 +611,8 @@
 ac_pa_use_alsa
 ac_pa_cflags
-ac_pa_path
+ac_external_pa
 ac_pjmedia_snd
+ac_external_gsm
+ac_external_speex
 ac_os_objs
 EGREP
@@ -684,6 +686,8 @@
 enable_floating_point
 enable_epoll
+with_external_speex
+with_external_gsm
 enable_sound
-with_pa_path
+with_external_pa
 enable_oss
 enable_ext_sound
@@ -1256,5 +1260,5 @@
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures pjproject 1.0 to adapt to many kinds of systems.
+\`configure' configures pjproject 1.x to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1322,5 +1326,5 @@
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pjproject 1.0:";;
+     short | recursive ) echo "Configuration of pjproject 1.x:";;
    esac
   cat <<\_ACEOF
@@ -1361,7 +1365,19 @@
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-pa-path=DIR      Specify PortAudio alternate location (e.g. /usr).
-                          When this option is set, we will not use our copy of
-                          PortAudio in third_party directory.
+  --with-external-speex   Use external Speex development files, not the one in
+                          "third_party" directory. When this option is set,
+                          make sure that Speex is accessible to use (hint: use
+                          CFLAGS and LDFLAGS env var to set the include/lib
+                          paths)
+  --with-external-gsm     Use external GSM codec library, not the one in
+                          "third_party" directory. When this option is set,
+                          make sure that the GSM include/lib files are
+                          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
+                          set, make sure that PortAudio is accessible to use
+                          (hint: use CFLAGS and LDFLAGS env var to set the
+                          include/lib paths)
 
 Some influential environment variables:
@@ -1443,5 +1459,5 @@
 if $ac_init_version; then
   cat <<\_ACEOF
-pjproject configure 1.0
+pjproject configure 1.x
 generated by GNU Autoconf 2.64
 
@@ -1779,5 +1795,5 @@
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by pjproject $as_me 1.0, which was
+It was created by pjproject $as_me 1.x, which was
 generated by GNU Autoconf 2.64.  Invocation command line was
 
@@ -2264,5 +2280,5 @@
 ac_config_headers="$ac_config_headers pjlib/include/pj/compat/os_auto.h pjlib/include/pj/compat/m_auto.h pjmedia/include/pjmedia/config_auto.h pjmedia/include/pjmedia-codec/config_auto.h pjsip/include/pjsip/sip_autoconf.h"
 
-ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak third_party/build/portaudio/os-auto.mak third_party/build/os-auto.mak"
+ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak third_party/build/os-auto.mak third_party/build/portaudio/os-auto.mak"
 
 
@@ -5172,4 +5188,86 @@
 
 
+ac_external_speex=0
+
+
+# Check whether --with-external-speex was given.
+if test "${with_external_speex+set}" = set; then :
+  withval=$with_external_speex;
+	if test "x$with_external_speex" != "xno"; then
+		# Test Speex installation
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external Speex devkit is installed" >&5
+$as_echo_n "checking if external Speex devkit is installed... " >&6; }
+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <speex/speex.h>
+						     #include <speex/speex_echo.h>
+
+int
+main ()
+{
+speex_echo_state_init(0, 0); speex_encoder_init(0);
+  ;
+  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; }
+				   $as_echo "#define PJMEDIA_EXTERNAL_SPEEX_CODEC 1" >>confdefs.h
+
+				   ac_external_speex="1"
+
+else
+  as_fn_error "Unable to use external Speex library. If Speex 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_external_gsm=0
+
+
+# Check whether --with-external-gsm was given.
+if test "${with_external_gsm+set}" = set; then :
+  withval=$with_external_gsm;
+	if test "x$with_external_gsm" != "xno"; then
+		# Test GSM library installation
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external GSM devkit is installed" >&5
+$as_echo_n "checking if external GSM devkit is installed... " >&6; }
+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <gsm/gsm.h>
+
+int
+main ()
+{
+gsm_create();
+  ;
+  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; }
+				           $as_echo "#define PJMEDIA_EXTERNAL_GSM_CODEC 1" >>confdefs.h
+
+				           ac_external_gsm="1"
+
+else
+  as_fn_error "Unable to use external GSM library. If GSM 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
+
+
+
+
 
 # Check whether --enable-sound was given.
@@ -5184,27 +5282,39 @@
 
 
-
-
-# Check whether --with-pa-path was given.
-if test "${with_pa_path+set}" = set; then :
-  withval=$with_pa_path;
-	if test "x$with_pa_path" != "xno"; then
-		ac_pa_path=$with_pa_path
-		# Remove trailing backslash
-		ac_pa_path=`echo $ac_pa_path | sed 's/\/$//'`
-		# Test the path
-    		#if test ! -f $ac_pa_path/include/portaudio.h; then
-		#	AC_MSG_ERROR([Wrong --with-pa-path value, $ac_pa_path/include/portaudio.h does not exist])
-		#fi
-    		#if test ! -d $ac_pa_path/lib; then
-		#	AC_MSG_ERROR([Wrong --with-pa-path value, $ac_pa_path/lib does not exist])
-		#fi
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ** Using PortAudio in $ac_pa_path **" >&5
-$as_echo "** Using PortAudio in $ac_pa_path **" >&6; }
+ac_external_pa=0
+
+
+# Check whether --with-external-pa was given.
+if test "${with_external_pa+set}" = set; then :
+  withval=$with_external_pa;
+	if test "x$with_external_pa" != "xno"; then
+		# Test PortAudio installation
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if external PortAudio devkit is installed" >&5
+$as_echo_n "checking if external PortAudio devkit is installed... " >&6; }
+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <portaudio.h>
+
+int
+main ()
+{
+Pa_Initialize();
+  ;
+  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_pa="1"
+
+else
+  as_fn_error "Unable to use PortAudio. If PortAudio 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
-
 
 
@@ -6446,5 +6556,5 @@
 # values after options handling.
 ac_log="
-This file was extended by pjproject $as_me 1.0, which was
+This file was extended by pjproject $as_me 1.x, which was
 generated by GNU Autoconf 2.64.  Invocation command line was
 
@@ -6506,5 +6616,5 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-pjproject config.status 1.0
+pjproject config.status 1.x
 configured by $0, generated by GNU Autoconf 2.64,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -6630,6 +6740,6 @@
     "pjmedia/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjmedia/build/os-auto.mak" ;;
     "pjsip/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES pjsip/build/os-auto.mak" ;;
+    "third_party/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES third_party/build/os-auto.mak" ;;
     "third_party/build/portaudio/os-auto.mak") CONFIG_FILES="$CONFIG_FILES third_party/build/portaudio/os-auto.mak" ;;
-    "third_party/build/os-auto.mak") CONFIG_FILES="$CONFIG_FILES third_party/build/os-auto.mak" ;;
 
   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
