summaryrefslogtreecommitdiffstats
path: root/m4/alsa.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/alsa.m4')
-rw-r--r--m4/alsa.m413
1 files changed, 7 insertions, 6 deletions
diff --git a/m4/alsa.m4 b/m4/alsa.m4
index e12310d..d88130b 100644
--- a/m4/alsa.m4
+++ b/m4/alsa.m4
@@ -1,4 +1,5 @@
dnl Configure Paths for Alsa
+dnl Modified by Matthias P. Braendli
dnl Some modifications by Richard Boulton <richard-alsa@tartarus.org>
dnl Christopher Lansdown <lansdoct@cs.alfred.edu>
dnl Jaroslav Kysela <perex@perex.cz>
@@ -68,11 +69,11 @@ no_alsa=""
alsa_min_micro_version=`echo $min_alsa_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-AC_LANG_SAVE
-AC_LANG_C
-AC_TRY_COMPILE([
+AC_LANG_PUSH([C])
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM([[
#include <alsa/asoundlib.h>
-], [
+]], [[
/* ensure backward compatibility */
#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
@@ -104,13 +105,13 @@ AC_TRY_COMPILE([
# endif
# endif
exit(0);
-],
+]])],
[AC_MSG_RESULT(found.)],
[AC_MSG_RESULT(not present.)
ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)])
alsa_found=no]
)
-AC_LANG_RESTORE
+AC_LANG_POP([C])
fi
dnl Now that we know that we have the right version, let's see if we have the library and not just the headers.