Don't fail if we don't have ALSA available
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40949
This commit is contained in:
parent
6be22e6739
commit
bc515ab0b8
2 changed files with 17 additions and 18 deletions
27
acinclude.m4
27
acinclude.m4
|
@ -19,24 +19,22 @@ __EOF__
|
|||
cat >>$new <$old
|
||||
])
|
||||
|
||||
#
|
||||
# --- alsa.m4 ---
|
||||
#
|
||||
##############################################################################
|
||||
dnl Configure Paths for Alsa
|
||||
dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
|
||||
dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
|
||||
dnl Jaroslav Kysela <perex@suse.cz>
|
||||
dnl Last modification: alsa.m4,v 1.22 2002/05/27 11:14:20 tiwai Exp
|
||||
dnl Last modification: alsa.m4,v 1.23 2004/01/16 18:14:22 tiwai Exp
|
||||
dnl AM_PATH_ALSA([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for libasound, and define ALSA_CFLAGS and ALSA_LIBS as appropriate.
|
||||
dnl enables arguments --with-alsa-prefix=
|
||||
dnl --with-alsa-enc-prefix=
|
||||
dnl --disable-alsatest (this has no effect, as yet)
|
||||
dnl --disable-alsatest
|
||||
dnl
|
||||
dnl For backwards compatibility, if ACTION_IF_NOT_FOUND is not specified,
|
||||
dnl and the alsa libraries are not found, a fatal AC_MSG_ERROR() will result.
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_ALSA,
|
||||
AC_DEFUN([AM_PATH_ALSA],
|
||||
[dnl Save the original CFLAGS, LDFLAGS, and LIBS
|
||||
alsa_save_CFLAGS="$CFLAGS"
|
||||
alsa_save_LDFLAGS="$LDFLAGS"
|
||||
|
@ -57,7 +55,7 @@ AC_ARG_WITH(alsa-inc-prefix,
|
|||
dnl FIXME: this is not yet implemented
|
||||
AC_ARG_ENABLE(alsatest,
|
||||
[ --disable-alsatest Do not try to compile and run a test Alsa program],
|
||||
[enable_alsatest=no],
|
||||
[enable_alsatest="$enableval"],
|
||||
[enable_alsatest=yes])
|
||||
|
||||
dnl Add any special include directories
|
||||
|
@ -140,17 +138,20 @@ exit(0);
|
|||
AC_LANG_RESTORE
|
||||
|
||||
dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.
|
||||
if test "x$enable_alsatest" = "xyes"; then
|
||||
AC_CHECK_LIB([asound], [snd_ctl_open],,
|
||||
[ifelse([$3], , [AC_MSG_ERROR(No linkable libasound was found.)])
|
||||
alsa_found=no]
|
||||
)
|
||||
fi
|
||||
|
||||
CFLAGS="$alsa_save_CFLAGS"
|
||||
LDFLAGS="$alsa_save_LDFLAGS"
|
||||
LIBS="$alsa_save_LIBS"
|
||||
if test "x$alsa_found" = "xyes" ; then
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
LIBS=`echo $LIBS | sed 's/-lasound//g'`
|
||||
LIBS=`echo $LIBS | sed 's/ //'`
|
||||
LIBS="-lasound $LIBS"
|
||||
fi
|
||||
if test "x$alsa_found" = "xno" ; then
|
||||
ifelse([$3], , :, [$3])
|
||||
CFLAGS="$alsa_save_CFLAGS"
|
||||
LDFLAGS="$alsa_save_LDFLAGS"
|
||||
|
@ -164,8 +165,7 @@ AC_SUBST(ALSA_CFLAGS)
|
|||
AC_SUBST(ALSA_LIBS)
|
||||
])
|
||||
|
||||
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# --- esd.m4 ---
|
||||
#
|
||||
|
@ -334,6 +334,7 @@ int main ()
|
|||
rm -f conf.esdtest
|
||||
])
|
||||
|
||||
##############################################################################
|
||||
# Based on libtool-1.5.8
|
||||
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
|
||||
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
|
||||
|
|
|
@ -282,8 +282,7 @@ CheckALSA()
|
|||
[ --enable-alsa support the ALSA audio API [default=yes]],
|
||||
, enable_alsa=yes)
|
||||
if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
|
||||
have_alsa=no
|
||||
AM_PATH_ALSA(0.9.0, have_alsa=yes)
|
||||
AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
|
||||
if test x$have_alsa = xyes; then
|
||||
AC_ARG_ENABLE(alsa-shared,
|
||||
[ --enable-alsa-shared dynamically load ALSA audio support [default=yes]],
|
||||
|
@ -364,9 +363,8 @@ CheckESD()
|
|||
[ --enable-esd support the Enlightened Sound Daemon [default=yes]],
|
||||
, enable_esd=yes)
|
||||
if test x$enable_audio = xyes -a x$enable_esd = xyes; then
|
||||
use_esd=no
|
||||
AM_PATH_ESD(0.2.8, use_esd=yes)
|
||||
if test x$use_esd = xyes; then
|
||||
AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
|
||||
if test x$have_esd = xyes; then
|
||||
AC_ARG_ENABLE(esd-shared,
|
||||
[ --enable-esd-shared dynamically load ESD audio support [default=yes]],
|
||||
, enable_esd_shared=yes)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue