this should work for older alsa 0.9 where asoundlib.h is still in sys instead of alsa

This commit is contained in:
Bill Currie 2001-09-27 17:12:17 +00:00
parent bd1465ef3e
commit 37495db521
2 changed files with 21 additions and 2 deletions

View file

@ -607,7 +607,20 @@ QF_maGiC_VALUE
],
SOUND_TYPES="$SOUND_TYPES ALSA0.9"
ALSA_LIBS="-lasound"
HAVE_ALSA=yes
HAVE_ALSA=yes,
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 >= 9)
QF_maGiC_VALUE
#endif
#endif
],
SOUND_TYPES="$SOUND_TYPES ALSA0.9"
ALSA_LIBS="-lasound"
HAVE_ALSA=yes
)
)
)
fi

View file

@ -32,7 +32,13 @@
#endif
#include <stdio.h>
#include <alsa/asoundlib.h>
#ifdef HAVE_ALSA_ASOUNDLIB_H // newer alsa 0.9
# include <alsa/asoundlib.h>
#else
# ifdef HAVE_SYS_ASOUNDLIB_H // older alsa 0.9
# include <sys/asoundlib.h>
# endif
#endif
#include "QF/cvar.h"
#include "QF/plugin.h"