1 AC_DEFUN([MOONLIGHT_CHECK_SOUND],
7 AC_ARG_WITH(alsa, AC_HELP_STRING([--with-alsa=yes|no],
8 [If you want to enable alsa sound support]),
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)
17 alsa_reason="(reason: could not find alsa development package)"
20 alsa_reason="(reason: disabled at configure time)"
23 AM_CONDITIONAL(INCLUDE_ALSA, test x$with_alsa = xyes)
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)
39 pulseaudio_reason="(reason: could not find libpulse development package)"
42 pulseaudio_reason="(reason: disabled at configure time)"
45 AM_CONDITIONAL(INCLUDE_PULSEAUDIO, test x$with_pulseaudio = xyes)