diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-05-21 00:48:30 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-05-21 00:48:30 +0000 |
| commit | 481093baa83a3f5754c75b0f4a71b57b048bb2d8 (patch) | |
| tree | 1679451ac25e88fe4d7bbc58e3fd6cd44d3b33cd /configure.ac | |
| parent | d8682fcd25a752a4b22ffd8848b80bf62fd31c92 (diff) | |
| download | pcsxr-481093baa83a3f5754c75b0f4a71b57b048bb2d8.tar.gz | |
readded oss/pulseaudio/alsa/null sound backends, added --enable-sound configure flag to specify the backend to be used.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@48419 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index defef36e..9c1b8124 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,40 @@ then CFLAGS="$CFLAGS -fno-dse" fi +AM_CONDITIONAL(SOUND_OSS, false) +AM_CONDITIONAL(SOUND_SDL, false) +AM_CONDITIONAL(SOUND_NULL, false) + +dnl Check for ALSA 1.x, OSS, or PulseAudio + +AC_ARG_ENABLE(sound, [ --enable-sound=... force selection of sound backend (alsa, null, oss, pulseaudio, sdl) (default: sdl)], +[ SOUND="$enableval" ],[ SOUND="sdl" ]) + +if test "x$SOUND" = xalsa; then + PKG_CHECK_MODULES(ALSA, alsa >= 1.0.0, have_alsa=yes, have_alsa=no) +elif test "x$SOUND" = xpulseaudio; then + PKG_CHECK_MODULES(PULSEAUDIO, libpulse >= 0.9.16, have_pulseaudio=yes) +elif test "x$SOUND" = xoss; then + AC_CHECK_HEADER(sys/soundcard.h, have_oss=yes, have_oss=no) + if test "x$have_oss" = xno; then + AC_MSG_ERROR([sys/soundcard.h not found!]) + else + AM_CONDITIONAL(SOUND_OSS, true) + fi +elif test "x$SOUND" = xno; then + AM_CONDITIONAL(SOUND_NULL, true) +elif test "x$SOUND" = xnull; then + AM_CONDITIONAL(SOUND_NULL, true) +else + AM_CONDITIONAL(SOUND_SDL, true) +fi + +AM_CONDITIONAL(SOUND_ALSA, test "x$have_alsa" = xyes) +AC_SUBST(ALSA_LIBS) +AM_CONDITIONAL(SOUND_PULSEAUDIO, test "x$have_pulseaudio" = xyes) +AC_SUBST(PULSEAUDIO_CFLAGS) +AC_SUBST(PULSEAUDIO_LIBS) + AC_CHECK_HEADER(zlib.h, have_zlib=yes, have_zlib=no) if test "x$have_zlib" = xno; then AC_MSG_ERROR([unable to find libz headers]) |
