Try detecting ALSA better.

This commit is contained in:
Paul Gardner-Stephen 2012-09-06 12:43:06 +09:30
parent 2dfc056354
commit 0562367b23
3 changed files with 9 additions and 6 deletions

View File

@ -59,10 +59,9 @@ SRCS= \
vomp.c \
xprintf.c
# Only build these on Linux
ifeq (0, 1)
SRCS+= audio_alsa.c \
audio_msm_g1.c
HAVE_ALSA= @HAVE_ALSA@
ifeq (HAVE_ALSA,1)
SRCS+= audio_alsa.c
endif
MONITORCLIENTSRCS=conf.c \

View File

@ -33,7 +33,7 @@ int detectAudioDevice()
#ifdef ANDROID
if (!audev) audev=audio_msm_g1_detect();
#endif
#ifdef linux
#ifdef HAVE_SYS_ALSA_ASOUNDLIB_H
if (!audev) audev=audio_alsa_detect();
#endif
if (audev) {

View File

@ -92,13 +92,17 @@ AC_CHECK_HEADERS(
net/route.h \
signal.h \
jni.h \
alsa/asoundlib.h \
ucred.h \
sys/filio.h \
sys/endian.h \
sys/byteorder.h \
)
dnl Check for ALSA
AC_CHECK_HEADER([alsa/asoundlib.h], [have_alsa=1], [have_alsa=0])
AS_IF([test x"$have_alsa" = "x1"], [AC_DEFINE([HAVE_ALSA_ASOUNDLIB_H])])
AS_IF([test x"$have_alsa" = "x1"], [AC_SUBST(HAVE_ALSA,1)], [AC_SUBST(HAVE_ALSA,0)])
echo "Fetching and building NaCl if required."
echo "(this can take HOURS to build depending on your architecture,"
echo " but fortunately it only needs to happen once.)"