Index: /pjproject/trunk/aconfigure
===================================================================
--- /pjproject/trunk/aconfigure	(revision 5813)
+++ /pjproject/trunk/aconfigure	(revision 5814)
@@ -683,6 +683,4 @@
 ac_pjmedia_video_has_android
 ac_pjmedia_video
-ac_pa_use_oss
-ac_pa_use_alsa
 ac_pjmedia_audiodev_objs
 ac_pa_cflags
@@ -797,5 +795,4 @@
 enable_sound
 with_external_pa
-enable_oss
 enable_video
 enable_ext_sound
@@ -1482,5 +1479,4 @@
   --disable-resample      Disable resampling implementations
   --disable-sound         Exclude sound (i.e. use null sound)
-  --disable-oss           Disable OSS audio (default: not disabled)
   --disable-video         Disable video feature
   --enable-ext-sound      PJMEDIA will not provide any sound device backend
@@ -1548,9 +1544,8 @@
                           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)
+  --with-external-pa      Use external PortAudio development files. 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)
   --with-sdl=DIR          Specify alternate libSDL prefix
   --with-ffmpeg=DIR       Specify alternate FFMPEG prefix
@@ -1742,4 +1737,50 @@
 
 } # ac_fn_cxx_try_compile
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
 
 # ac_fn_c_try_link LINENO
@@ -3663,4 +3704,36 @@
 
 
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+else
+  as_fn_error $? "C++ compiler does not work" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
@@ -6354,5 +6427,5 @@
 		#ac_pa_cflags="$ac_pa_cflags -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS"
 		#AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS])
-		ac_pjmedia_snd=pa_old_darwinos
+		#ac_pjmedia_snd=pa_old_darwinos
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... old coreaudio" >&5
 $as_echo "Checking sound device backend... old coreaudio" >&6; }
@@ -6375,31 +6448,19 @@
   *)
 	if test "x$ac_external_pa" != "x1"; then
-				ac_pjmedia_snd=alsa
-		ac_pa_use_alsa=1
-
-		ac_fn_c_check_header_mongrel "$LINENO" "alsa/version.h" "ac_cv_header_alsa_version_h" "$ac_includes_default"
+				ac_fn_c_check_header_mongrel "$LINENO" "alsa/version.h" "ac_cv_header_alsa_version_h" "$ac_includes_default"
 if test "x$ac_cv_header_alsa_version_h" = xyes; then :
   LIBS="$LIBS -lasound"
-else
-  ac_pa_use_alsa=0
-fi
-
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... unix" >&5
-$as_echo "Checking sound device backend... unix" >&6; }
-
-				ac_pa_use_oss=1
-
-		# Check whether --enable-oss was given.
-if test "${enable_oss+set}" = set; then :
-  enableval=$enable_oss;
-				if test "$enable_oss" = "no"; then
-				 ac_pa_use_oss=0
-				 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if OSS audio is disabled... yes" >&5
-$as_echo "Checking if OSS audio is disabled... yes" >&6; }
-				fi
-
-fi
-
+				 ac_pjmedia_snd=alsa
+fi
+
+
+		if test "x$ac_pjmedia_snd" = "xalsa"; then
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... alsa" >&5
+$as_echo "Checking sound device backend... alsa" >&6; }
+		else
+			ac_pjmedia_snd=null
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... null sound" >&5
+$as_echo "Checking sound device backend... null sound" >&6; }
+		fi
 	fi
 	;;
Index: /pjproject/trunk/aconfigure.ac
===================================================================
--- /pjproject/trunk/aconfigure.ac	(revision 5813)
+++ /pjproject/trunk/aconfigure.ac	(revision 5814)
@@ -36,4 +36,9 @@
 AC_PROG_CXX
 AC_LANG([C])
+
+dnl Make sure C++ compiler works
+AC_LANG_PUSH([C++])
+AC_TRY_LINK([], [], , AC_MSG_ERROR([C++ compiler does not work]))
+AC_LANG_POP([C++])
 
 AC_PROG_RANLIB
@@ -670,5 +675,5 @@
 AC_ARG_WITH(external-pa,
     AS_HELP_STRING([--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)]),
+		   [Use external PortAudio development files. 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)]),
     [
 	if test "x$with_external_pa" != "xno"; then
@@ -720,5 +725,5 @@
 		#ac_pa_cflags="$ac_pa_cflags -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS"
 		#AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS])
-		ac_pjmedia_snd=pa_old_darwinos
+		#ac_pjmedia_snd=pa_old_darwinos
 		AC_MSG_RESULT([Checking sound device backend... old coreaudio])
 	else
@@ -738,22 +743,13 @@
 	if test "x$ac_external_pa" != "x1"; then
 		dnl # Check if ALSA is available
-		ac_pjmedia_snd=alsa
-		AC_SUBST(ac_pa_use_alsa,1)
 		AC_CHECK_HEADER(alsa/version.h,
-				[LIBS="$LIBS -lasound"],
-				[ac_pa_use_alsa=0])
-		AC_MSG_RESULT([Checking sound device backend... unix])
-
-		dnl # Check if OSS is disabled
-		AC_SUBST(ac_pa_use_oss,1)
-		AC_ARG_ENABLE(oss,
-			      AS_HELP_STRING([--disable-oss],
-					     [Disable OSS audio (default: not disabled)]),
-			      [
-				if test "$enable_oss" = "no"; then
-				 [ac_pa_use_oss=0]
-				 AC_MSG_RESULT([Checking if OSS audio is disabled... yes])
-				fi
-			      ])
+				[LIBS="$LIBS -lasound"
+				 ac_pjmedia_snd=alsa])
+		if test "x$ac_pjmedia_snd" = "xalsa"; then
+			AC_MSG_RESULT([Checking sound device backend... alsa])
+		else
+			ac_pjmedia_snd=null
+			AC_MSG_RESULT([Checking sound device backend... null sound])
+		fi
 	fi
 	;;
Index: /pjproject/trunk/pjmedia/build/os-auto.mak.in
===================================================================
--- /pjproject/trunk/pjmedia/build/os-auto.mak.in	(revision 5813)
+++ /pjproject/trunk/pjmedia/build/os-auto.mak.in	(revision 5814)
@@ -44,8 +44,4 @@
 # 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)
 #   - win32:	    	Win32 MME (wmme_dev.c)
 #   - coreaudio:	MaxOSX CoreAudio (coreaudio_dev.m)
@@ -54,9 +50,4 @@
 #   - external:		Link with no sounddev (app will provide)
 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@
 
 #
