Index: /pjproject/branches/split-3rd-party/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/Makefile	(revision 1201)
+++ /pjproject/branches/split-3rd-party/Makefile	(revision 1202)
@@ -2,5 +2,5 @@
 include build/host-$(HOST_NAME).mak
 
-DIRS = pjlib pjlib-util pjnath pjmedia pjsip pjsip-apps
+DIRS = pjlib pjlib-util pjnath third_party pjmedia pjsip pjsip-apps
 
 ifdef MINSIZE
@@ -10,5 +10,4 @@
 all clean dep depend distclean doc print realclean:
 	for dir in $(DIRS); do \
-	   if [ -d $$dir ]; then \
 		if $(MAKE) $(MAKE_FLAGS) -C $$dir/build $@; then \
 		    true; \
@@ -16,5 +15,4 @@
 		    exit 1; \
 		fi; \
-	   fi; \
 	done
 
Index: /pjproject/branches/split-3rd-party/aconfigure
===================================================================
--- /pjproject/branches/split-3rd-party/aconfigure	(revision 1201)
+++ /pjproject/branches/split-3rd-party/aconfigure	(revision 1202)
@@ -309,5 +309,5 @@
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX ac_pjdir CPP EGREP ac_os_objs ac_pjmedia_snd ac_pa_cflags ac_pa_use_alsa ac_no_small_filter ac_no_large_filter ac_no_g711_plc ac_no_speex_aec ac_no_g711_codec ac_no_l16_codec ac_no_gsm_codec ac_no_speex_codec ac_no_ilbc_codec ac_no_ssl openssl_h_present libssl_present libcrypto_present ac_cross_compile ac_linux_poll ac_host ac_main_obj LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX ac_pjdir CPP EGREP ac_os_objs ac_pjmedia_snd ac_pa_cflags ac_pa_use_alsa ac_no_small_filter ac_no_large_filter ac_no_speex_aec ac_no_g711_codec ac_no_l16_codec ac_no_gsm_codec ac_no_speex_codec ac_no_ilbc_codec ac_no_ssl openssl_h_present libssl_present libcrypto_present ac_cross_compile ac_linux_poll ac_host ac_main_obj LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
@@ -1440,5 +1440,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/Makefile third_party/build/portaudio/Makefile"
+                                                                                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"
 
 
@@ -9013,7 +9013,4 @@
 echo "${ECHO_T}Checking if large filter is disabled... no" >&6
 fi;
-
-ac_no_g711_plc=yes
-
 
 
@@ -10082,6 +10079,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/Makefile" ) CONFIG_FILES="$CONFIG_FILES third_party/Makefile" ;;
-  "third_party/build/portaudio/Makefile" ) CONFIG_FILES="$CONFIG_FILES third_party/build/portaudio/Makefile" ;;
+  "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" ;;
   "pjlib/include/pj/compat/os_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/os_auto.h" ;;
   "pjlib/include/pj/compat/m_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/m_auto.h" ;;
@@ -10204,5 +10201,4 @@
 s,@ac_no_small_filter@,$ac_no_small_filter,;t t
 s,@ac_no_large_filter@,$ac_no_large_filter,;t t
-s,@ac_no_g711_plc@,$ac_no_g711_plc,;t t
 s,@ac_no_speex_aec@,$ac_no_speex_aec,;t t
 s,@ac_no_g711_codec@,$ac_no_g711_codec,;t t
@@ -10708,2 +10704,24 @@
 
 
+
+echo "$as_me:$LINENO: result:
+
+The configuration for current target has been written to 'build.mak', and 'os-auto.mak' in various build directories.
+
+Customizations can be put in:
+  - 'user.mak'
+  - 'pjlib/include/pj/config_site.h'
+
+The next step now is to run 'make dep' and 'make'.
+" >&5
+echo "${ECHO_T}
+
+The configuration for current target has been written to 'build.mak', and 'os-auto.mak' in various build directories.
+
+Customizations can be put in:
+  - 'user.mak'
+  - 'pjlib/include/pj/config_site.h'
+
+The next step now is to run 'make dep' and 'make'.
+" >&6
+
Index: /pjproject/branches/split-3rd-party/aconfigure.ac
===================================================================
--- /pjproject/branches/split-3rd-party/aconfigure.ac	(revision 1201)
+++ /pjproject/branches/split-3rd-party/aconfigure.ac	(revision 1202)
@@ -18,6 +18,6 @@
 		 pjmedia/build/os-auto.mak
 		 pjsip/build/os-auto.mak
-		 third_party/Makefile
-		 third_party/build/portaudio/Makefile
+		 third_party/build/portaudio/os-auto.mak 
+		 third_party/build/os-auto.mak
 	        ])
 
@@ -518,2 +518,14 @@
 AC_OUTPUT()
 
+
+AC_MSG_RESULT([
+
+The configuration for current target has been written to 'build.mak', and 'os-auto.mak' in various build directories.
+
+Customizations can be put in:
+  - 'user.mak'
+  - 'pjlib/include/pj/config_site.h'
+
+The next step now is to run 'make dep' and 'make'.
+])
+
Index: /pjproject/branches/split-3rd-party/build/os-linux.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/os-linux.mak	(revision 1201)
+++ /pjproject/branches/split-3rd-party/build/os-linux.mak	(revision 1202)
@@ -3,5 +3,5 @@
 export OS_CXXFLAGS := 
 
-export OS_LDFLAGS  := $(CC_LIB)pthread$(LIBEXT2) -lm
+export OS_LDFLAGS  := -lportaudio-$(TARGET_NAME) -lgsmcodec-$(TARGET_NAME) -lilbccodec-$(TARGET_NAME) -lspeex-$(TARGET_NAME) -lresample-$(TARGET_NAME) $(CC_LIB)pthread$(LIBEXT2) -lm
 
 export OS_SOURCES  := 
Index: /pjproject/branches/split-3rd-party/configure-legacy
===================================================================
--- /pjproject/branches/split-3rd-party/configure-legacy	(revision 1201)
+++ /pjproject/branches/split-3rd-party/configure-legacy	(revision 1202)
@@ -1,3 +1,5 @@
 #!/bin/sh
+
+PJDIR=`pwd`
 
 #
@@ -92,14 +94,16 @@
 fi
 
-echo 'Writing build.mak as follows:'
-echo " MACHINE_NAME = $MACHINE_NAME"
-echo " OS_NAME      = $OS_NAME"
-echo " HOST_NAME    = $HOST_NAME"
-echo " CC_NAME      = $CC_NAME"
-echo " TARGET_NAME  = $TARGET_NAME"
-echo " CROSS_COMPILE= $CROSS_COMPILE"
-echo " LINUX_POLL   = $LINUX_POLL"
+echo 'build.mak configurations are set as follows:'
+echo " PJDIR         = $PJDIR"
+echo " MACHINE_NAME  = $MACHINE_NAME"
+echo " OS_NAME       = $OS_NAME"
+echo " HOST_NAME     = $HOST_NAME"
+echo " CC_NAME       = $CC_NAME"
+echo " TARGET_NAME   = $TARGET_NAME"
+echo " CROSS_COMPILE = $CROSS_COMPILE"
+echo " LINUX_POLL    = $LINUX_POLL"
 
 echo "# Auto-generated build.mak" > build.mak
+echo "export PJDIR := $PJDIR" >> build.mak
 echo "export MACHINE_NAME := $MACHINE_NAME" >> build.mak
 echo "export OS_NAME := $OS_NAME" >> build.mak
@@ -110,5 +114,28 @@
 echo "export LINUX_POLL := $LINUX_POLL" >> build.mak
 
+echo >> build.mak
+
+cat << EOF >> build.mak
+export APP_CC = \$(CROSS_COMPILE)\$(CC_NAME)
+
+export APP_CFLAGS = \$(CC_CFLAGS) \$(OS_CFLAGS) \$(HOST_CFLAGS) \$(M_CFLAGS) \$(CFLAGS) -I\$(PJDIR)/pjlib/include -I\$(PJDIR)/pjlib-util/include -I\$(PJDIR)/pjnath/include -I\$(PJDIR)/pjmedia/include -I\$(PJDIR)/pjsip/include
+
+export APP_CXXFLAGS = \$(APP_CFLAGS)
+
+export APP_LDFLAGS = -L\$(PJDIR)/pjlib/lib -L\$(PJDIR)/pjlib-util/lib -L\$(PJDIR)/pjnath/lib -L\$(PJDIR)/pjmedia/lib -L\$(PJDIR)/pjsip/lib -L\$(PJDIR)/third_party/lib 
+
+export APP_LDLIBS = -lpjsua-\$(TARGET_NAME) -lpjsip-ua-\$(TARGET_NAME) -lpjsip-simple-\$(TARGET_NAME) -lpjsip-\$(TARGET_NAME) -lpjmedia-codec-\$(TARGET_NAME) -lpjmedia-\$(TARGET_NAME) -lpjnath-\$(TARGET_NAME) -lpjlib-util-\$(TARGET_NAME) \$(APP_THIRD_PARTY_LIBS) -lpj-\$(TARGET_NAME) \$(CC_LDFLAGS) \$(OS_LDFLAGS) \$(M_LDFLAGS) \$(HOST_LDFLAGS) \$(LDFLAGS)
+
+export PJ_DIR = \$(PJDIR)
+export PJ_CC = \$(APP_CC)
+export PJ_CFLAGS = \$(APP_CFLAGS)
+export PJ_CXXFLAGS = \$(APP_CXXFLAGS)
+export PJ_LDFLAGS = \$(APP_LDFLAGS)
+export PJ_LDLIBS = \$(APP_LDLIBS)
+
+EOF
+
 touch user.mak
+
 
 echo
Index: /pjproject/branches/split-3rd-party/pjmedia/build/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/Makefile	(revision 1201)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/Makefile	(revision 1202)
@@ -1,6 +1,9 @@
 include ../../build.mak
+
+THIRD_PARTY:=$(PJDIR)/third_party
+PA_DIR := $(THIRD_PARTY)/build/portaudio/src
+
 include $(PJDIR)/build/common.mak
 
-THIRD_PARTY:=../../third_party
 RULES_MAK := $(PJDIR)/build/rules.mak
 
@@ -39,5 +42,5 @@
 export PJMEDIA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
 			alaw_ulaw.o alaw_ulaw_table.o clock_thread.o codec.o \
-			conference.o echo_common.o echo_port.o echo_speex.o \
+			conference.o echo_common.o echo_port.o \
 			echo_suppress.o endpoint.o errno.o \
 			g711.o jbuf.o master_port.o mem_capture.o mem_player.o \
Index: /pjproject/branches/split-3rd-party/pjmedia/build/os-auto.mak.in
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/os-auto.mak.in	(revision 1201)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/os-auto.mak.in	(revision 1202)
@@ -53,4 +53,9 @@
 export CFLAGS += -I$(THIRD_PARTY)/build/speex -I$(THIRD_PARTY)/speex/include
 export CODEC_OBJS += speex_codec.o
+
+ifneq (@ac_no_speex_aec@,1)
+export PJMEDIA_OBJS += echo_speex.o
+endif
+
 endif
 
Index: /pjproject/branches/split-3rd-party/pjmedia/build/os-darwinos.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/os-darwinos.mak	(revision 1201)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/os-darwinos.mak	(revision 1202)
@@ -1,17 +1,91 @@
-#
-# OS specific configuration for Darwin/MacOS target. 
-#
+
+# PJMEDIA features exclusion
+export CFLAGS += 
+
+# Define the desired sound device backend
+# Valid values are:
+#   - pa_unix:	    	PortAudio on Unix (OSS or ALSA)
+#   - pa_darwinos:  	PortAudio on MacOSX (CoreAudio)
+#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
+#   - pa_win32:	    	PortAudio on Win32 (WMME)
+#   - ds:	    	Win32 DirectSound (dsound.c)
+#   - null:	    	Null sound device (nullsound.c)
+AC_PJMEDIA_SND=pa_old_darwinos
+
+# For Unix, specify if ALSA should be supported
+AC_PA_USE_ALSA=0
 
 #
-# PJMEDIA_OBJS specified here are object files to be included in PJMEDIA
-# (the library) for this specific operating system. Object files common 
-# to all operating systems should go in Makefile instead.
+# Codecs
 #
-export PJMEDIA_OBJS += $(PA_DIR)/pa_mac_hostapis.o \
-		       $(PA_DIR)/pa_unix_util.o \
-		       $(PA_DIR)/pa_mac_core.o
+AC_NO_G711_CODEC=0
+AC_NO_L16_CODEC=0
+AC_NO_GSM_CODEC=0
+AC_NO_SPEEX_CODEC=0
+AC_NO_ILBC_CODEC=0
 
-#		       $(PA_DIR)/pa_mac_alt.o
-#		       $(PA_DIR)/ringbuffer.o
+export CODEC_OBJS=
 
-export OS_CFLAGS +=  $(CC_DEF)PA_USE_COREAUDIO=1 $(CC_DEF)PA_BIG_ENDIAN=1
+ifeq ($(AC_NO_G711_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_G711_CODEC=0
+else
+export CODEC_OBJS +=
+endif
+
+ifeq ($(AC_NO_L16_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_L16_CODEC=0
+else
+export CODEC_OBJS += l16.o
+endif
+
+ifeq ($(AC_NO_GSM_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_GSM_CODEC=0
+else
+export CODEC_OBJS += gsm.o
+endif
+
+ifeq ($(AC_NO_SPEEX_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_SPEEX_CODEC=0
+else
+export CFLAGS += -I$(THIRD_PARTY)/build/speex -I$(THIRD_PARTY)/speex/include
+export CODEC_OBJS += speex_codec.o
+
+#ifeq (@ac_no_speex_aec@,1)
+ifeq (0,1)
+export PJMEDIA_OBJS += echo_speex.o
+endif
+
+endif
+
+ifeq ($(AC_NO_ILBC_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_ILBC_CODEC=0
+else
+export CODEC_OBJS += ilbc.o
+endif
+
+
+#
+# PortAudio
+#
+ifneq ($(findstring pa,$(AC_PJMEDIA_SND)),)
+export CFLAGS += -I$(THIRD_PARTY)/build/portaudio -I$(THIRD_PARTY)/portaudio/include -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+export SOUND_OBJS = pasound.o
+endif
+
+#
+# Win32 DirectSound
+#
+ifeq ($(AC_PJMEDIA_SND),ds)
+export SOUND_OBJS = dsound.o
+export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_WIN32_DIRECT_SOUND
+endif
+
+#
+# Last resort, null sound device
+#
+ifeq ($(AC_PJMEDIA_SND),null)
+export SOUND_OBJS = nullsound.o
+export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND
+endif
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/build/os-linux.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/os-linux.mak	(revision 1201)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/os-linux.mak	(revision 1202)
@@ -1,14 +1,85 @@
-#
-# OS specific configuration for Linux OS target. 
-#
+# Linux
+
+# Define the desired sound device backend
+# Valid values are:
+#   - pa_unix:	    	PortAudio on Unix (OSS or ALSA)
+#   - pa_darwinos:  	PortAudio on MacOSX (CoreAudio)
+#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
+#   - pa_win32:	    	PortAudio on Win32 (WMME)
+#   - ds:	    	Win32 DirectSound (dsound.c)
+#   - null:	    	Null sound device (nullsound.c)
+AC_PJMEDIA_SND=pa_unix
 
 #
-# PJMEDIA_OBJS specified here are object files to be included in PJMEDIA
-# (the library) for this specific operating system. Object files common 
-# to all operating systems should go in Makefile instead.
+# Codecs
 #
-export PJMEDIA_OBJS += $(PA_DIR)/pa_unix_hostapis.o $(PA_DIR)/pa_unix_util.o \
-		       $(PA_DIR)/pa_unix_oss.o
-#		       $(PA_DIR)/pa_linux_alsa.o
+AC_NO_G711_CODEC=0
+AC_NO_L16_CODEC=0
+AC_NO_GSM_CODEC=0
+AC_NO_SPEEX_CODEC=0
+AC_NO_ILBC_CODEC=0
 
-export OS_CFLAGS +=  $(CC_DEF)PA_USE_OSS=1
+export CODEC_OBJS=
+
+ifeq ($(AC_NO_G711_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_G711_CODEC=0
+else
+export CODEC_OBJS +=
+endif
+
+ifeq ($(AC_NO_L16_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_L16_CODEC=0
+else
+export CODEC_OBJS += l16.o
+endif
+
+ifeq ($(AC_NO_GSM_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_GSM_CODEC=0
+else
+export CODEC_OBJS += gsm.o
+endif
+
+ifeq ($(AC_NO_SPEEX_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_SPEEX_CODEC=0
+else
+export CFLAGS += -I$(THIRD_PARTY)/build/speex -I$(THIRD_PARTY)/speex/include
+export CODEC_OBJS += speex_codec.o
+
+ifeq (1,1)
+export PJMEDIA_OBJS += echo_speex.o
+endif
+
+endif
+
+ifeq ($(AC_NO_ILBC_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_ILBC_CODEC=0
+else
+export CODEC_OBJS += ilbc.o
+endif
+
+
+#
+# PortAudio
+#
+ifneq ($(findstring pa,$(AC_PJMEDIA_SND)),)
+export CFLAGS += -I$(THIRD_PARTY)/build/portaudio -I$(THIRD_PARTY)/portaudio/include -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+export SOUND_OBJS = pasound.o
+endif
+
+#
+# Win32 DirectSound
+#
+ifeq ($(AC_PJMEDIA_SND),ds)
+export SOUND_OBJS = dsound.o
+export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_WIN32_DIRECT_SOUND
+endif
+
+#
+# Last resort, null sound device
+#
+ifeq ($(AC_PJMEDIA_SND),null)
+export SOUND_OBJS = nullsound.o
+export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND
+endif
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/build/os-win32.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/os-win32.mak	(revision 1201)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/os-win32.mak	(revision 1202)
@@ -1,26 +1,87 @@
-#
-# OS specific configuration for Win32 OS target. 
-#
+# PJMEDIA features exclusion
+export CFLAGS += 
+
+# Define the desired sound device backend
+# Valid values are:
+#   - pa_unix:	    	PortAudio on Unix (OSS or ALSA)
+#   - pa_darwinos:  	PortAudio on MacOSX (CoreAudio)
+#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
+#   - pa_win32:	    	PortAudio on Win32 (WMME)
+#   - ds:	    	Win32 DirectSound (dsound.c)
+#   - null:	    	Null sound device (nullsound.c)
+AC_PJMEDIA_SND=pa_win32
 
 #
-# PJMEDIA_OBJS specified here are object files to be included in PJMEDIA
-# (the library) for this specific operating system. Object files common 
-# to all operating systems should go in Makefile instead.
+# Codecs
 #
-export PJMEDIA_OBJS += $(PA_DIR)/pa_win_hostapis.o $(PA_DIR)/pa_win_util.o \
-		       $(PA_DIR)/pa_win_wmme.o
+AC_NO_G711_CODEC=0
+AC_NO_L16_CODEC=0
+AC_NO_GSM_CODEC=0
+AC_NO_SPEEX_CODEC=0
+AC_NO_ILBC_CODEC=0
 
-export OS_CFLAGS += -DPA_NO_ASIO -DPA_NO_DS \
-		    -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+export CODEC_OBJS=
 
-# Example:
-#  to activate Null sound, uncomment these two lines below.
-#export SOUND_OBJS = $(NULLSOUND_OBJS)
-#export OS_CFLAGS += $(CC_DEF)PJMEDIA_HAS_NULL_SOUND
+ifeq ($(AC_NO_G711_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_G711_CODEC=0
+else
+export CODEC_OBJS +=
+endif
 
-# Example:
-#  to include only GSM and exclude Speex codec, uncomment the "export" line below.
-#  Note that you'll need to put "#define PJMEDIA_HAS_SPEEX_CODEC 0" in
-#  <pj/config_site.h>
-#export CODEC_OBJS = $(GSM_OBJS)
+ifeq ($(AC_NO_L16_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_L16_CODEC=0
+else
+export CODEC_OBJS += l16.o
+endif
 
+ifeq ($(AC_NO_GSM_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_GSM_CODEC=0
+else
+export CODEC_OBJS += gsm.o
+endif
+
+ifeq ($(AC_NO_SPEEX_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_SPEEX_CODEC=0
+else
+export CFLAGS += -I$(THIRD_PARTY)/build/speex -I$(THIRD_PARTY)/speex/include
+export CODEC_OBJS += speex_codec.o
+
+#ifeq (@ac_no_speex_aec@,1)
+ifeq (0,1)
+export PJMEDIA_OBJS += echo_speex.o
+endif
+
+endif
+
+ifeq ($(AC_NO_ILBC_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_ILBC_CODEC=0
+else
+export CODEC_OBJS += ilbc.o
+endif
+
+
+#
+# PortAudio
+#
+ifneq ($(findstring pa,$(AC_PJMEDIA_SND)),)
+export CFLAGS += -I$(THIRD_PARTY)/build/portaudio -I$(THIRD_PARTY)/portaudio/include -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+export SOUND_OBJS = pasound.o
+endif
+
+#
+# Win32 DirectSound
+#
+ifeq ($(AC_PJMEDIA_SND),ds)
+export SOUND_OBJS = dsound.o
+export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_WIN32_DIRECT_SOUND
+endif
+
+#
+# Last resort, null sound device
+#
+ifeq ($(AC_PJMEDIA_SND),null)
+export SOUND_OBJS = nullsound.o
+export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND
+endif
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/errno.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/errno.c	(revision 1201)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/errno.c	(revision 1202)
@@ -20,5 +20,7 @@
 #include <pjmedia/types.h>
 #include <pj/string.h>
-#include <portaudio.h>
+#if PJMEDIA_SOUND_IMPLEMENTATION == PJMEDIA_SOUND_PORTAUDIO_SOUND
+#   include <portaudio.h>
+#endif
 
 
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sound_port.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sound_port.c	(revision 1201)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sound_port.c	(revision 1202)
@@ -26,12 +26,4 @@
 #include <pj/string.h>	    /* pj_memset() */
 
-#ifndef PJMEDIA_SOUND_HAS_AEC
-#   define PJMEDIA_SOUND_HAS_AEC	1
-#endif
-
-#if defined(PJMEDIA_SOUND_HAS_AEC) && PJMEDIA_SOUND_HAS_AEC!=0
-#   include <speex/speex_echo.h>
-#endif
-
 //#define SIMULATE_LOST_PCT   20
 #define AEC_TAIL	    128	    /* default AEC length in ms */
Index: /pjproject/branches/split-3rd-party/pjsip/build/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/Makefile	(revision 1201)
+++ /pjproject/branches/split-3rd-party/pjsip/build/Makefile	(revision 1202)
@@ -90,5 +90,5 @@
 		    tsx_uas_test.o txdata_test.o uri_test.o
 export TEST_CFLAGS += $(_CFLAGS)
-export TEST_LDFLAGS += $(APP_LDFLAGS) $(APP_LDLIBS)
+export TEST_LDFLAGS += $(PJ_LDFLAGS) $(PJ_LDLIBS)
 export TEST_EXE := ../bin/pjsip-test-$(TARGET_NAME)$(HOST_EXE)
 
Index: project/branches/split-3rd-party/third_party/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/Makefile	(revision 1201)
+++ 	(revision )
@@ -1,49 +1,0 @@
-include ../build.mak
-include $(PJDIR)/build/host-$(HOST_NAME).mak
-
-DIRS = build/resample
-
-ifeq (,1)
-else
-DIRS += build/gsm
-endif
-
-ifeq (,1)
-else
-DIRS += build/ilbc
-endif
-
-ifeq (,1)
-else
-DIRS += build/speex
-endif
-
-ifeq (pa_unix,pa_old_darwinos)
-DIRS += build/portaudio
-endif
-
-ifeq (pa_unix,pa_darwinos)
-DIRS += build/portaudio
-endif
-
-ifeq (pa_unix,pa_win32)
-DIRS += build/portaudio
-endif
-
-ifeq (pa_unix,pa_unix)
-DIRS += build/portaudio
-endif
-
-
-
-all clean dep depend distclean realclean:
-	for dir in $(DIRS); do \
-	   if [ -d $$dir ]; then \
-		if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
-		    true; \
-		else \
-		    exit 1; \
-		fi; \
-	   fi; \
-	done
-
Index: project/branches/split-3rd-party/third_party/Makefile.in
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/Makefile.in	(revision 1201)
+++ 	(revision )
@@ -1,49 +1,0 @@
-include ../build.mak
-include $(PJDIR)/build/host-$(HOST_NAME).mak
-
-DIRS = build/resample
-
-ifeq (@ac_no_gsm_codec@,1)
-else
-DIRS += build/gsm
-endif
-
-ifeq (@ac_no_ilbc_codec@,1)
-else
-DIRS += build/ilbc
-endif
-
-ifeq (@ac_no_speex_codec@,1)
-else
-DIRS += build/speex
-endif
-
-ifeq (@ac_pjmedia_snd@,pa_old_darwinos)
-DIRS += build/portaudio
-endif
-
-ifeq (@ac_pjmedia_snd@,pa_darwinos)
-DIRS += build/portaudio
-endif
-
-ifeq (@ac_pjmedia_snd@,pa_win32)
-DIRS += build/portaudio
-endif
-
-ifeq (@ac_pjmedia_snd@,pa_unix)
-DIRS += build/portaudio
-endif
-
-
-
-all clean dep depend distclean realclean:
-	for dir in $(DIRS); do \
-	   if [ -d $$dir ]; then \
-		if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
-		    true; \
-		else \
-		    exit 1; \
-		fi; \
-	   fi; \
-	done
-
Index: /pjproject/branches/split-3rd-party/third_party/build/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/build/Makefile	(revision 1202)
+++ /pjproject/branches/split-3rd-party/third_party/build/Makefile	(revision 1202)
@@ -0,0 +1,12 @@
+include ../../build.mak
+include $(PJDIR)/build/common.mak
+
+all clean dep depend distclean realclean:
+	for dir in $(DIRS); do \
+		if $(MAKE) $(MAKE_FLAGS) -C $$dir $@; then \
+		    true; \
+		else \
+		    exit 1; \
+		fi; \
+	done
+
Index: /pjproject/branches/split-3rd-party/third_party/build/os-auto.mak.in
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/build/os-auto.mak.in	(revision 1202)
+++ /pjproject/branches/split-3rd-party/third_party/build/os-auto.mak.in	(revision 1202)
@@ -0,0 +1,17 @@
+DIRS = resample
+
+ifneq (@ac_no_gsm_codec@,1)
+DIRS += gsm
+endif
+
+ifneq (@ac_no_ilbc_codec@,1)
+DIRS += ilbc
+endif
+
+ifneq (@ac_no_speex_codec@,1)
+DIRS += speex
+endif
+
+ifneq ($(findstring pa,@ac_pjmedia_snd@),)
+DIRS += portaudio
+endif
Index: /pjproject/branches/split-3rd-party/third_party/build/os-darwinos.mak
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/build/os-darwinos.mak	(revision 1202)
+++ /pjproject/branches/split-3rd-party/third_party/build/os-darwinos.mak	(revision 1202)
@@ -0,0 +1,7 @@
+DIRS = resample
+DIRS += gsm
+DIRS += ilbc
+DIRS += speex
+DIRS += portaudio
+
+
Index: /pjproject/branches/split-3rd-party/third_party/build/os-linux.mak
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/build/os-linux.mak	(revision 1202)
+++ /pjproject/branches/split-3rd-party/third_party/build/os-linux.mak	(revision 1202)
@@ -0,0 +1,7 @@
+DIRS = resample
+DIRS += gsm
+DIRS += ilbc
+DIRS += speex
+DIRS += portaudio
+
+
Index: /pjproject/branches/split-3rd-party/third_party/build/os-win32.mak
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/build/os-win32.mak	(revision 1202)
+++ /pjproject/branches/split-3rd-party/third_party/build/os-win32.mak	(revision 1202)
@@ -0,0 +1,7 @@
+DIRS = resample
+DIRS += gsm
+DIRS += ilbc
+DIRS += speex
+DIRS += portaudio
+
+
Index: /pjproject/branches/split-3rd-party/third_party/build/portaudio/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/build/portaudio/Makefile	(revision 1202)
+++ /pjproject/branches/split-3rd-party/third_party/build/portaudio/Makefile	(revision 1202)
@@ -0,0 +1,69 @@
+# @configure_input@
+include ../../../build.mak
+include $(PJDIR)/build/common.mak
+
+export LIBDIR := ../../lib
+
+RULES_MAK := $(PJDIR)/build/rules.mak
+
+export PORTAUDIO_LIB:=../../lib/libportaudio-$(TARGET_NAME)$(LIBEXT)
+
+PORTAUDIO_OBJS += pa_allocation.o \
+		  pa_converters.o \
+		  pa_cpuload.o \
+		  pa_dither.o \
+		  pa_debugprint.o \
+		  pa_front.o \
+		  pa_process.o \
+		  pa_skeleton.o \
+		  pa_stream.o \
+		  pa_trace.o
+
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	+= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC). $(CC_INC)src 
+export _CXXFLAGS+= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+export _LDFLAGS += $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS) 
+
+###############################################################################
+# Defines for building PORTAUDIO library
+#
+export PORTAUDIO_SRCDIR = src
+export PORTAUDIO_OBJS += 
+export PORTAUDIO_CFLAGS += $(_CFLAGS)
+
+export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
+###############################################################################
+# Main entry
+#
+# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
+#
+TARGETS := libportaudio
+
+all: $(TARGETS)
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend libportaudio clean realclean distclean
+
+libportaudio:
+	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $(PORTAUDIO_LIB)
+
+clean:
+	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.libportaudio-$(TARGET_NAME).depend),$(HOST_RMR))
+	
+	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
+
+depend:
+	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
+	echo '$(PORTAUDIO_LIB): .libportaudio-$(TARGET_NAME).depend' >> .libportaudio-$(TARGET_NAME).depend; \
+
Index: project/branches/split-3rd-party/third_party/build/portaudio/Makefile.in
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/build/portaudio/Makefile.in	(revision 1201)
+++ 	(revision )
@@ -1,141 +1,0 @@
-# @configure_input@
-include ../../../build.mak
-include $(PJDIR)/build/common.mak
-
-export LIBDIR := ../../lib
-
-RULES_MAK := $(PJDIR)/build/rules.mak
-
-export PORTAUDIO_LIB:=../../lib/libportaudio-$(TARGET_NAME)$(LIBEXT)
-
-PORTAUDIO_OBJS := pa_allocation.o \
-		  pa_converters.o \
-		  pa_cpuload.o \
-		  pa_dither.o \
-		  pa_front.o \
-		  pa_process.o \
-		  pa_skeleton.o \
-		  pa_stream.o \
-		  pa_trace.o
-
-
-# Define the desired sound device backend
-# Valid values are:
-#   - pa_unix:	    	PortAudio on Unix (OSS or ALSA)
-#   - pa_darwinos:  	PortAudio on MacOSX (CoreAudio)
-#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
-#   - pa_win32:	    	PortAudio on Win32 (WMME)
-#
-# There are other values below, but these are handled by PJMEDIA's Makefile
-#   - ds:	    	Win32 DirectSound (dsound.c)
-#   - null:	    	Null sound device (nullsound.c)
-AC_PJMEDIA_SND=@ac_pjmedia_snd@
-
-# For Unix, specify if ALSA should be supported
-AC_PA_USE_ALSA=@ac_pa_use_alsa@
-
-# Additional PortAudio CFLAGS are in @ac_pa_cflags@
-
-
-#
-# PortAudio on Unix
-#
-ifeq ($(AC_PJMEDIA_SND),pa_unix)
-# Host APIs and utils
-export PORTAUDIO_OBJS += pa_unix_hostapis.o pa_unix_util.o
-
-# Include ALSA?
-ifeq ($(AC_PA_USE_ALSA),1)
-export CFLAGS += -DPA_USE_ALSA=1
-export PORTAUDIO_OBJS += pa_linux_alsa.o
-endif
-
-export CFLAGS += -DPA_USE_OSS=1
-export CFLAGS += @ac_pa_cflags@
-export PORTAUDIO_OBJS += pa_unix_oss.o
-endif
-
-
-#
-# PortAudio on MacOS X (using current PortAudio)
-#
-ifeq ($(AC_PJMEDIA_SND),pa_darwinos)
-export PORTAUDIO_OBJS +=pa_mac_hostapis.o \
-			pa_unix_util.o \
-			pa_mac_core.o \
-			pa_mac_core_blocking.o \
-			pa_mac_core_utilities.o \
-			pa_ringbuffer.o
-export CFLAGS += -DPA_USE_COREAUDIO=1
-export CFLAGS += @ac_pa_cflags@
-endif
-
-#
-# PortAudio on MacOS X (using old PortAudio, for MacOS X 10.2.x)
-#
-ifeq ($(AC_PJMEDIA_SND),pa_old_darwinos)
-export PORTAUDIO_OBJS +=pa_mac_hostapis.o \
-			pa_unix_util.o \
-			pa_mac_core_old.o 
-export CFLAGS += -DPA_USE_COREAUDIO=1
-export CFLAGS += @ac_pa_cflags@
-endif
-
-#
-#
-# PortAudio on Win32 (WMME)
-#
-ifeq ($(AC_PJMEDIA_SND),pa_win32)
-export PORTAUDIO_OBJS += pa_win_hostapis.o pa_win_util.o \
-		       pa_win_wmme.o
-export CFLAGS += -DPA_NO_ASIO -DPA_NO_DS
-endif
-
-
-###############################################################################
-# Gather all flags.
-#
-export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
-		   $(CFLAGS) $(CC_INC). $(CC_INC)src 
-export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
-		   $(HOST_CXXFLAGS) $(CXXFLAGS)
-export _LDFLAGS := $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
-		   $(LDFLAGS) 
-
-###############################################################################
-# Defines for building PORTAUDIO library
-#
-export PORTAUDIO_SRCDIR = src
-export PORTAUDIO_OBJS += 
-export PORTAUDIO_CFLAGS += $(_CFLAGS)
-
-export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
-###############################################################################
-# Main entry
-#
-# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
-#
-TARGETS := libportaudio
-
-all: $(TARGETS)
-
-dep: depend
-distclean: realclean
-
-.PHONY: dep depend libportaudio clean realclean distclean
-
-libportaudio:
-	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $(PORTAUDIO_LIB)
-
-clean:
-	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
-
-realclean:
-	$(subst @@,$(subst /,$(HOST_PSEP),.libportaudio-$(TARGET_NAME).depend),$(HOST_RMR))
-	
-	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
-
-depend:
-	$(MAKE) -f $(RULES_MAK) APP=PORTAUDIO app=libportaudio $@
-	echo '$(PORTAUDIO_LIB): .libportaudio-$(TARGET_NAME).depend' >> .libportaudio-$(TARGET_NAME).depend; \
-
Index: /pjproject/branches/split-3rd-party/third_party/build/portaudio/os-auto.mak.in
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/build/portaudio/os-auto.mak.in	(revision 1202)
+++ /pjproject/branches/split-3rd-party/third_party/build/portaudio/os-auto.mak.in	(revision 1202)
@@ -0,0 +1,73 @@
+# @configure_input@
+
+# Define the desired sound device backend
+# Valid values are:
+#   - pa_unix:	    	PortAudio on Unix (OSS or ALSA)
+#   - pa_darwinos:  	PortAudio on MacOSX (CoreAudio)
+#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
+#   - pa_win32:	    	PortAudio on Win32 (WMME)
+#
+# There are other values below, but these are handled by PJMEDIA's Makefile
+#   - ds:	    	Win32 DirectSound (dsound.c)
+#   - null:	    	Null sound device (nullsound.c)
+AC_PJMEDIA_SND=@ac_pjmedia_snd@
+
+# For Unix, specify if ALSA should be supported
+AC_PA_USE_ALSA=@ac_pa_use_alsa@
+
+# Additional PortAudio CFLAGS are in @ac_pa_cflags@
+
+
+#
+# PortAudio on Unix
+#
+ifeq ($(AC_PJMEDIA_SND),pa_unix)
+# Host APIs and utils
+export PORTAUDIO_OBJS += pa_unix_hostapis.o pa_unix_util.o
+
+# Include ALSA?
+ifeq ($(AC_PA_USE_ALSA),1)
+export CFLAGS += -DPA_USE_ALSA=1
+export PORTAUDIO_OBJS += pa_linux_alsa.o
+endif
+
+export CFLAGS += -DPA_USE_OSS=1
+export CFLAGS += @ac_pa_cflags@
+export PORTAUDIO_OBJS += pa_unix_oss.o
+endif
+
+
+#
+# PortAudio on MacOS X (using current PortAudio)
+#
+ifeq ($(AC_PJMEDIA_SND),pa_darwinos)
+export PORTAUDIO_OBJS +=pa_mac_hostapis.o \
+			pa_unix_util.o \
+			pa_mac_core.o \
+			pa_mac_core_blocking.o \
+			pa_mac_core_utilities.o \
+			pa_ringbuffer.o
+export CFLAGS += -DPA_USE_COREAUDIO=1
+export CFLAGS += @ac_pa_cflags@
+endif
+
+#
+# PortAudio on MacOS X (using old PortAudio, for MacOS X 10.2.x)
+#
+ifeq ($(AC_PJMEDIA_SND),pa_old_darwinos)
+export PORTAUDIO_OBJS +=pa_mac_hostapis.o \
+			pa_unix_util.o \
+			pa_mac_core_old.o 
+export CFLAGS += -DPA_USE_COREAUDIO=1
+export CFLAGS += @ac_pa_cflags@
+endif
+
+#
+#
+# PortAudio on Win32 (WMME)
+#
+ifeq ($(AC_PJMEDIA_SND),pa_win32)
+export PORTAUDIO_OBJS += pa_win_hostapis.o pa_win_util.o \
+		       pa_win_wmme.o
+export CFLAGS += -DPA_NO_ASIO -DPA_NO_DS
+endif
Index: /pjproject/branches/split-3rd-party/third_party/build/portaudio/os-linux.mak
===================================================================
--- /pjproject/branches/split-3rd-party/third_party/build/portaudio/os-linux.mak	(revision 1202)
+++ /pjproject/branches/split-3rd-party/third_party/build/portaudio/os-linux.mak	(revision 1202)
@@ -0,0 +1,34 @@
+# @configure_input@
+
+# Define the desired sound device backend
+# Valid values are:
+#   - pa_unix:	    	PortAudio on Unix (OSS or ALSA)
+#   - pa_darwinos:  	PortAudio on MacOSX (CoreAudio)
+#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
+#   - pa_win32:	    	PortAudio on Win32 (WMME)
+#
+# There are other values below, but these are handled by PJMEDIA's Makefile
+#   - ds:	    	Win32 DirectSound (dsound.c)
+#   - null:	    	Null sound device (nullsound.c)
+AC_PJMEDIA_SND=pa_unix
+
+# For Unix, specify if ALSA should be supported
+AC_PA_USE_ALSA=0
+
+#
+# PortAudio on Unix
+#
+ifeq ($(AC_PJMEDIA_SND),pa_unix)
+# Host APIs and utils
+export PORTAUDIO_OBJS += pa_unix_hostapis.o pa_unix_util.o
+
+# Include ALSA?
+ifeq ($(AC_PA_USE_ALSA),1)
+export CFLAGS += -DPA_USE_ALSA=1
+export PORTAUDIO_OBJS += pa_linux_alsa.o
+endif
+
+export CFLAGS += -DPA_USE_OSS=1 -DHAVE_SYS_SOUNDCARD_H
+export PORTAUDIO_OBJS += pa_unix_oss.o
+endif
+
Index: /pjproject/branches/split-3rd-party/user.mak.sample
===================================================================
--- /pjproject/branches/split-3rd-party/user.mak.sample	(revision 1202)
+++ /pjproject/branches/split-3rd-party/user.mak.sample	(revision 1202)
@@ -0,0 +1,2 @@
+export CFLAGS += -Wno-unused-label -Werror
+export LDFLAGS += -
