From 37495db5212156bbe762fe4458b8f1342c0b4264 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 27 Sep 2001 17:12:17 +0000 Subject: [PATCH] this should work for older alsa 0.9 where asoundlib.h is still in sys instead of alsa --- configure.ac | 15 ++++++++++++++- libs/audio/targets/snd_alsa_0_9.c | 8 +++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index cc2fb4154..b1f61772c 100644 --- a/configure.ac +++ b/configure.ac @@ -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 +#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 diff --git a/libs/audio/targets/snd_alsa_0_9.c b/libs/audio/targets/snd_alsa_0_9.c index 3746f47ce..b2ce58582 100644 --- a/libs/audio/targets/snd_alsa_0_9.c +++ b/libs/audio/targets/snd_alsa_0_9.c @@ -32,7 +32,13 @@ #endif #include -#include +#ifdef HAVE_ALSA_ASOUNDLIB_H // newer alsa 0.9 +# include +#else +# ifdef HAVE_SYS_ASOUNDLIB_H // older alsa 0.9 +# include +# endif +#endif #include "QF/cvar.h" #include "QF/plugin.h"