alsa sound support is alive and kicking

This commit is contained in:
Bill Currie 2000-05-24 06:52:19 +00:00
parent 72ff6cb80b
commit b1da890046
3 changed files with 26 additions and 1 deletions

View File

@ -476,6 +476,10 @@ dnl ==================================================================
dnl Checks for sound
dnl ==================================================================
AC_ARG_ENABLE(alsa,
[ --disable-alsa disable alsa support],
)
dnl MME
AC_CHECK_LIB(mme,waveOutOpen,HAVE_LIBMME=yes)
if test -z "$SNDTYPE" -a "x$ac_cv_header_mme_mmsystem_h" = "xyes" -a \
@ -489,6 +493,21 @@ QF_maGiC_VALUE
SOUND_LIBS="-lmme")
fi
SNDTYPE=""
AC_MSG_CHECKING(for sound support)
if test "x$enable_alsa" != "xno"; then
if test -z "$SNDTYPE" -a "x$ac_cv_header_sys_asoundlib_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],[
#include <sys/asoundlib.h>
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR)
#if SND_LIB_MAJOR>0 || (SND_LIB_MAJOR==0 && SND_LIB_MINOR>=5)
QF_maGiC_VALUE
#endif
#endif
],[ SNDTYPE="ALSA" SOUND_LIBS="-lasound"])
fi
fi
dnl OSS
if test -z "$SNDTYPE" -a "x$ac_cv_header_sys_soundcard_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],[
@ -533,6 +552,7 @@ fi
AC_SUBST(SOUND_LIBS)
AM_CONDITIONAL(SNDTYPE_MME, test "$SNDTYPE" = "MME")
AM_CONDITIONAL(SNDTYPE_OSS, test "$SNDTYPE" = "OSS")
AM_CONDITIONAL(SNDTYPE_ALSA, test "$SNDTYPE" = "ALSA")
AM_CONDITIONAL(SNDTYPE_WIN32, test "$SNDTYPE" = "WIN32")

View File

@ -155,6 +155,7 @@ extern int total_channels;
extern qboolean fakedma;
extern int fakedma_updates;
extern int paintedtime;
extern int soundtime;
extern vec3_t listener_origin;
extern vec3_t listener_forward;
extern vec3_t listener_right;

View File

@ -25,9 +25,13 @@ libqfsnd_a_SOURCES = snd_win.c
else
if SNDTYPE_OSS
libqfsnd_a_SOURCES = snd_oss.c
else
if SNDTYPE_ALSA
libqfsnd_a_SOURCES = snd_alsa.c
endif
endif
EXTRA_libqfsnd_a_SOURCES = snd_win.c snd_oss.c
endif
EXTRA_libqfsnd_a_SOURCES = snd_win.c snd_oss.c snd_alsa.c
if CDTYPE_WIN32
libqfcd_a_SOURCES = cd_win.c