Ticket #511: Add --disable-oss option to disable OSS in configure script

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1863 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/aconfigure.ac b/aconfigure.ac
index ea26160..5b0f2ae 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -379,6 +379,7 @@
 	AC_MSG_RESULT([Checking sound device backend... null sound])
 	;;
   *)
+	dnl # Check if ALSA is available
 	ac_pjmedia_snd=pa_unix
 	AC_CHECK_HEADER(alsa/version.h,
 			[AC_SUBST(ac_pa_use_alsa,1)
@@ -386,6 +387,19 @@
 			],
 		        [AC_SUBST(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,
+		      AC_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
+		      ])
 	;;
  esac
 fi