From c9ba2be9a2015221a86727d2317129168510964b Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Mon, 30 Oct 2017 11:02:22 +0100 Subject: [PATCH] Check for alloca.h in the configure script Signed-off-by: Tobias Kortkamp --- cava.c | 13 +++---------- configure.ac | 5 +++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/cava.c b/cava.c index faa47e5..9f7956e 100644 --- a/cava.c +++ b/cava.c @@ -1,12 +1,10 @@ #define _XOPEN_SOURCE_EXTENDED #include -#ifdef SNDIO -#include -#endif - -#ifndef SNDIO +#ifdef HAVE_ALLOCA_H #include +#else +#include #endif #include @@ -63,11 +61,6 @@ #ifdef SNDIO #include "input/sndio.c" -#include -#endif - -#ifndef SNDIO -#include #endif #include diff --git a/configure.ac b/configure.ac index 92fa281..a5eca4b 100644 --- a/configure.ac +++ b/configure.ac @@ -36,6 +36,11 @@ AC_CHECK_HEADERS([pthread.h], AC_MSG_ERROR([no pthread.h header header file found]) ) +dnl ###################### +dnl checking for alloca.h +dnl ###################### + +AC_CHECK_HEADER([alloca.h], [CPPFLAGS="$CPPFLAGS -DHAVE_ALLOCA_H"]) dnl ###################### dnl checking for alsa dev