revert jeff's last commit since it breaks the build
[moon.git] / m4 / sound.m4
blobd9b7eea808765a43fdc99c248994e2d49833926f
1 AC_DEFUN([MOONLIGHT_CHECK_SOUND],
3         dnl
4         dnl ALSA
5         dnl
7         AC_ARG_WITH(alsa, AC_HELP_STRING([--with-alsa=yes|no], 
8                 [If you want to enable alsa sound support]),
9                 [], [with_alsa=yes])
11         if test x$with_alsa = xyes; then
12                 if pkg-config --exists alsa; then
13                         AC_DEFINE([INCLUDE_ALSA], [1], [Include alsa sound support])
14                         PKG_CHECK_MODULES(ALSA, alsa)
15                 else
16                         with_alsa=no
17                         alsa_reason="(reason: could not find alsa development package)"
18                 fi
19         else
20                 alsa_reason="(reason: disabled at configure time)"
21         fi
23         AM_CONDITIONAL(INCLUDE_ALSA, test x$with_alsa = xyes)
25         dnl
26         dnl PulseAudio
27         dnl
29         AC_ARG_WITH(pulseaudio, AC_HELP_STRING([--with-pulseaudio=yes|no], 
30                 [If you want to enable pulseaudio sound support]),
31                 [], [with_pulseaudio=yes])
33         if test x$with_pulseaudio = xyes; then
34                 if pkg-config --exists libpulse; then
35                         AC_DEFINE([INCLUDE_PULSEAUDIO], [1], [Include pulseaudio sound support])
36                         PKG_CHECK_MODULES(PULSEAUDIO, libpulse)
37                 else
38                         with_pulseaudio=no
39                         pulseaudio_reason="(reason: could not find libpulse development package)"
40                 fi
41         else
42                 pulseaudio_reason="(reason: disabled at configure time)"
43         fi
44         
45         AM_CONDITIONAL(INCLUDE_PULSEAUDIO, test x$with_pulseaudio = xyes)