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 \ vomp.c \
xprintf.c xprintf.c
# Only build these on Linux HAVE_ALSA= @HAVE_ALSA@
ifeq (0, 1) ifeq (HAVE_ALSA,1)
SRCS+= audio_alsa.c \ SRCS+= audio_alsa.c
audio_msm_g1.c
endif endif
MONITORCLIENTSRCS=conf.c \ MONITORCLIENTSRCS=conf.c \

View File

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

View File

@ -92,13 +92,17 @@ AC_CHECK_HEADERS(
net/route.h \ net/route.h \
signal.h \ signal.h \
jni.h \ jni.h \
alsa/asoundlib.h \
ucred.h \ ucred.h \
sys/filio.h \ sys/filio.h \
sys/endian.h \ sys/endian.h \
sys/byteorder.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 "Fetching and building NaCl if required."
echo "(this can take HOURS to build depending on your architecture," echo "(this can take HOURS to build depending on your architecture,"
echo " but fortunately it only needs to happen once.)" echo " but fortunately it only needs to happen once.)"