Simplify sound configuration.
Use --enable-sound=yes/pulseaudio/esound/no. --enable-sound-pulse and --enable-sound-esound are now gone.
This commit is contained in:
parent
be326e53a8
commit
c08ff59b9c
52
configure.ac
52
configure.ac
|
@ -87,58 +87,52 @@ AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_hints_gnome" = "xyes")
|
||||||
|
|
||||||
AC_ARG_ENABLE(sound,
|
AC_ARG_ENABLE(sound,
|
||||||
AC_HELP_STRING([--enable-sound],
|
AC_HELP_STRING([--enable-sound],
|
||||||
[compile with sound support @<:@default=yes@:>@]),,
|
[compile with sound support (pulseaudio/esound/no)@<:@default=pulseaudio@:>@]),,
|
||||||
enable_sound=yes)
|
enable_sound=pulseaudio)
|
||||||
if test "x$enable_sound" = "xyes"; then
|
case x$enable_sound in
|
||||||
AC_ARG_ENABLE(sound_pulse,
|
xyes)
|
||||||
AC_HELP_STRING([--enable-sound-pulse],
|
enable_sound=pulseaudio;;
|
||||||
[compile with PulseAudio sound support @<:@default=yes@:>@]),,
|
xpulseaudio|xesound)
|
||||||
enable_sound_pulse=yes)
|
;;
|
||||||
AC_ARG_ENABLE(sound_esound,
|
*)
|
||||||
AC_HELP_STRING([--enable-sound-esound],
|
enable_sound=no;;
|
||||||
[compile with EsounD sound support @<:@default=no@:>@]),,
|
esac
|
||||||
enable_sound_esound=no)
|
|
||||||
AC_ARG_WITH(sndldr,
|
AC_ARG_WITH(sndldr,
|
||||||
AC_HELP_STRING([--with-sndldr],
|
AC_HELP_STRING([--with-sndldr],
|
||||||
[select sound loader (audiofile/sndfile/none) @<:@default=sndfile@:>@]),,
|
[select sound loader (audiofile/sndfile/none) @<:@default=sndfile@:>@]),,
|
||||||
with_sndldr=sndfile)
|
with_sndldr=sndfile)
|
||||||
fi
|
|
||||||
enable_sound=no
|
|
||||||
|
|
||||||
if test "x$with_sndldr" = "xsndfile"; then
|
if test "x$with_sndldr" = "xsndfile"; then
|
||||||
PKG_CHECK_MODULES(SNDFILE, sndfile,
|
PKG_CHECK_MODULES(SNDFILE, sndfile,
|
||||||
AC_DEFINE(USE_SOUND_LOADER_SNDFILE, 1, [Use sndfile sound loader]),
|
AC_DEFINE(USE_SOUND_LOADER_SNDFILE, 1, [Use sndfile sound loader]),
|
||||||
with_sndldr=none)
|
with_sndldr=none)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$with_sndldr" = "xaudiofile"; then
|
if test "x$with_sndldr" = "xaudiofile"; then
|
||||||
PKG_CHECK_MODULES(AUDIOFILE, audiofile,
|
PKG_CHECK_MODULES(AUDIOFILE, audiofile,
|
||||||
AC_DEFINE(USE_SOUND_LOADER_AUDIOFILE, 1, [Use audiofile sound loader]),
|
AC_DEFINE(USE_SOUND_LOADER_AUDIOFILE, 1, [Use audiofile sound loader]),
|
||||||
with_sndldr=none)
|
with_sndldr=none)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$enable_sound_pulse" = "xyes"; then
|
if test "x$enable_sound" = "xpulseaudio"; then
|
||||||
PKG_CHECK_MODULES(PA, libpulse,
|
PKG_CHECK_MODULES(PA, libpulse,
|
||||||
AC_DEFINE(HAVE_SOUND, 1, [Sound support])
|
AC_DEFINE(HAVE_SOUND, 1, [Sound support])
|
||||||
AC_DEFINE(HAVE_SOUND_PA, 1, [PulseAudio sound support])
|
AC_DEFINE(HAVE_SOUND_PA, 1, [PulseAudio sound support]),
|
||||||
enable_sound=pulseaudio
|
enable_sound=no)
|
||||||
enable_sound_esound=no,
|
|
||||||
enable_sound_pulse=no)
|
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(USE_LIBPA, test "x$enable_sound_pulse" = "xyes")
|
AM_CONDITIONAL(USE_LIBPA, test "x$enable_sound" = "xpulseaudio")
|
||||||
|
|
||||||
if test "x$enable_sound_esound" = "xyes"; then
|
if test "x$enable_sound" = "xesound"; then
|
||||||
AM_PATH_ESD(0.2.17,,[
|
AM_PATH_ESD(0.2.17,,[
|
||||||
enable_sound_esound=no
|
enable_sound=no
|
||||||
AC_MSG_WARN([EsounD sound support was requested but not found.])
|
AC_MSG_WARN([EsounD sound support was requested but not found.])
|
||||||
])
|
])
|
||||||
if test "x$enable_sound_esound" = "xyes"; then
|
if test "x$enable_sound" = "xesound"; then
|
||||||
AC_DEFINE(HAVE_SOUND, 1, [Sound support])
|
AC_DEFINE(HAVE_SOUND, 1, [Sound support])
|
||||||
AC_DEFINE(HAVE_SOUND_ESD, 1, [EsounD sound support])
|
AC_DEFINE(HAVE_SOUND_ESD, 1, [EsounD sound support])
|
||||||
enable_sound=esound
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(USE_LIBESD, test "x$enable_sound_esound" = "xyes")
|
AM_CONDITIONAL(USE_LIBESD, test "x$enable_sound" = "xesound")
|
||||||
|
|
||||||
# Save CPPFLAGS/LDFLAGS and add X_... to each
|
# Save CPPFLAGS/LDFLAGS and add X_... to each
|
||||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||||
|
|
Loading…
Reference in New Issue