Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > media > main-testing-src > by-pkgid > 091c3e54533b1512fa2a001ce74e2ace > files > 3

audacity-1.3.5-3.1mdv2009.0.src.rpm

diff -p -up audacity-src-1.3.5-beta/configure.in.portaudio audacity-src-1.3.5-beta/configure.in
--- audacity-src-1.3.5-beta/configure.in.portaudio	2008-05-07 23:20:10.000000000 +0200
+++ audacity-src-1.3.5-beta/configure.in	2008-05-09 07:44:58.000000000 +0200
@@ -374,7 +374,7 @@ AC_ARG_WITH(portmixer,
 
 AC_ARG_WITH(portaudio,
    [AS_HELP_STRING([--with-portaudio],
-      [which version of PortAudio to use (=[v18,v19]) [default=v19]])],
+      [which version of PortAudio to use (=[v18,v19,system]) [default=v18]])],
    use_portaudio=$withval,
    use_portaudio="v19")
 
@@ -480,7 +480,20 @@ esac
 
 dnl PortAudio configuration
 
-if [[ "$use_portaudio" = "v19" ]] ; then
+if [[ "$use_portaudio" = "system" ]] ; then
+	AC_CHECK_HEADER([portaudio.h],, AC_MSG_ERROR([Could not find portaudio.h header file.]))
+	AC_CHECK_LIB(portaudio, Pa_GetDeviceCount, [have_pa=v19], [have_pa=no])
+	if [[ "$have_pa19" = "no" ]] ; then
+		AC_CHECK_LIB(portaudio, Pa_CountDevices, [have_pa=v18], [AC_MSG_ERROR([Could not find portaudio library.])])
+	else
+		AC_DEFINE(USE_PORTAUDIO_V19, 1,
+			[Define if PortAudio v19 is being used (instead of v18)])
+	fi
+
+	LIBS="$LIBS -lportaudio"
+	use_portaudio=$have_pa
+
+elif [[ "$use_portaudio" = "v19" ]] ; then
    dnl PortAudio v19
    AC_DEFINE(USE_PORTAUDIO_V19, 1,
       [Define if PortAudio v19 is being used (instead of v18)])