Add support for ALSA_(LD|C)FLAGS.

Originally committed to SVN as r2790.
This commit is contained in:
Amar Takhar 2009-04-12 10:28:42 +00:00
parent 21460ec589
commit 95e9ccaf79
1 changed files with 15 additions and 0 deletions

View File

@ -395,8 +395,23 @@ AC_SUBST(ICONV_CFLAGS)
## ALSA ## ALSA
####### #######
AC_ARG_WITH(alsa, [ --without-alsa build without ALSA audio provider. (default: auto)], alsa_disabled="(disabled)") AC_ARG_WITH(alsa, [ --without-alsa build without ALSA audio provider. (default: auto)], alsa_disabled="(disabled)")
AC_ARG_VAR([ALSA_CFLAGS], [CFLAGS to use for ALSA (default: CPPFLAGS)])
AC_ARG_VAR([ALSA_LDFLAGS], [LDFLAGS to use for ALSA (default: -lasound)])
if test -z "$ALSA_LDFLAGS"; then
ALSA_LDFLAGS="-lasound";
fi
if test -z "$ALSA_CFLAGS"; then
ALSA_CFLAGS="$CPPFLAGS";
fi
if test "$with_alsa" != "no"; then if test "$with_alsa" != "no"; then
aegisub_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$ALSA_LDFLAGS"
AC_CHECK_LIB([asound], [snd_pcm_open], [ALSA_LDFLAGS="-lasound"; with_alsa="yes"], [with_alsa="no"]) AC_CHECK_LIB([asound], [snd_pcm_open], [ALSA_LDFLAGS="-lasound"; with_alsa="yes"], [with_alsa="no"])
LDFLAGS="$aegisub_save_LDFLAGS"
fi fi
if test "$with_alsa" != "no"; then if test "$with_alsa" != "no"; then