41119c
--- configure.ac.orig	2010-05-10 16:39:57.000000000 +0200
41119c
+++ configure.ac	2010-05-10 16:42:54.000000000 +0200
41119c
@@ -68,6 +68,7 @@
aa3ccd
             [if test "x$withval" = "xno"; then ac_cv_header_png_h=no; fi])
aa3ccd
 AC_ARG_WITH(pthread,   AS_HELP_STRING([--without-pthread],[do not use the pthread library]),
aa3ccd
             [if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi])
aa3ccd
+AC_ARG_WITH(pulse,     AC_HELP_STRING([--without-pulse],[do not use PulseAudio sound support]))
aa3ccd
 AC_ARG_WITH(sane,      AS_HELP_STRING([--without-sane],[do not use SANE (scanner support)]))
41119c
 AC_ARG_WITH(tiff,       AS_HELP_STRING([--without-tiff],[do not use TIFF]),
41119c
             [if test "x$withval" = "xno"; then ac_cv_header_tiffio_h=no; fi])
41119c
@@ -1361,6 +1362,31 @@
aa3ccd
     CFLAGS="$save_CFLAGS"
aa3ccd
 fi
aa3ccd
 
aa3ccd
+dnl **** Check for PulseAudio ****
aa3ccd
+AC_SUBST(PULSELIBS,"")
aa3ccd
+AC_SUBST(PULSECFLAGS,"")
aa3ccd
+if test "x$with_pulse" != "xno";
aa3ccd
+then
aa3ccd
+    ac_save_CPPFLAGS="$CPPFLAGS"
aa3ccd
+    if test "$PKG_CONFIG" != "false";
aa3ccd
+    then
aa3ccd
+        ac_pulse_libs="`$PKG_CONFIG --libs libpulse 2>/dev/null`"
aa3ccd
+        ac_pulse_cflags="`$PKG_CONFIG --cflags libpulse 2>/dev/null`"
aa3ccd
+
aa3ccd
+        CPPFLAGS="$CPPFLAGS $ac_pulse_cflags"
aa3ccd
+        AC_CHECK_HEADERS(pulse/pulseaudio.h,
aa3ccd
+            [AC_CHECK_LIB(pulse, pa_stream_is_corked,
aa3ccd
+                [AC_DEFINE(HAVE_PULSEAUDIO, 1, [Define if you have pulseaudio])
aa3ccd
+                 PULSELIBS="$ac_pulse_libs"
aa3ccd
+                 PULSECFLAGS="$ac_pulse_cflags"],,$ac_pulse_libs)
aa3ccd
+        ])
aa3ccd
+    fi
aa3ccd
+    CPPFLAGS="$ac_save_CPPFLAGS"
aa3ccd
+fi
aa3ccd
+WINE_WARNING_WITH(pulse, [test "$ac_cv_lib_pulse_pa_stream_is_corked" != "yes"],
aa3ccd
+        [libpulse ${notice_platform}development files not found or too old, Pulse won't be supported.])
aa3ccd
+
41119c
+
aa3ccd
 dnl **** Check for ALSA 1.x ****
aa3ccd
 AC_SUBST(ALSALIBS,"")
aa3ccd
 if test "$ac_cv_header_sys_asoundlib_h" = "yes" -o "$ac_cv_header_alsa_asoundlib_h" = "yes"
41119c
@@ -1528,7 +1554,7 @@
aa3ccd
 WINE_CHECK_SONAME(odbc,SQLConnect,,[AC_DEFINE_UNQUOTED(SONAME_LIBODBC,["libodbc.$LIBEXT"])])
aa3ccd
 
aa3ccd
 dnl **** Check for any sound system ****
aa3ccd
-if test "x$ALSALIBS$AUDIOIOLIBS$COREAUDIO$NASLIBS$ESDLIBS$ac_cv_lib_soname_jack" = "x" -a \
aa3ccd
+if test "x$ALSALIBS$AUDIOIOLIBS$COREAUDIO$NASLIBS$ESDLIBS$PULSELIBS$ac_cv_lib_soname_jack" = "x" -a \
aa3ccd
         "$ac_cv_header_sys_soundcard_h" != "yes" -a \
aa3ccd
         "$ac_cv_header_machine_soundcard_h" != "yes" -a \
aa3ccd
         "$ac_cv_header_soundcard_h" != "yes" -a \
41119c
@@ -2621,6 +2647,7 @@
aa3ccd
 WINE_CONFIG_DLL(wineoss.drv)
aa3ccd
 WINE_CONFIG_DLL(wineps.drv)
aa3ccd
 WINE_CONFIG_DLL(wineps16.drv16,enable_win16)
aa3ccd
+WINE_CONFIG_DLL(winepulse.drv)
aa3ccd
 WINE_CONFIG_DLL(winequartz.drv)
aa3ccd
 WINE_CONFIG_DLL(winex11.drv)
aa3ccd
 WINE_CONFIG_DLL(wing.dll16,enable_win16)