From 95e9ccaf7925bf9f08c4ebaef03427fe134f4187 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 12 Apr 2009 10:28:42 +0000 Subject: [PATCH] Add support for ALSA_(LD|C)FLAGS. Originally committed to SVN as r2790. --- aegisub/configure.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/aegisub/configure.in b/aegisub/configure.in index e903f0c8a..ec56dbbc1 100644 --- a/aegisub/configure.in +++ b/aegisub/configure.in @@ -395,8 +395,23 @@ AC_SUBST(ICONV_CFLAGS) ## ALSA ####### 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 + aegisub_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$ALSA_LDFLAGS" AC_CHECK_LIB([asound], [snd_pcm_open], [ALSA_LDFLAGS="-lasound"; with_alsa="yes"], [with_alsa="no"]) + LDFLAGS="$aegisub_save_LDFLAGS" fi if test "$with_alsa" != "no"; then