mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 18:56:32 +01:00
bat: don't link all binaries with fftw library, add missing header
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
9b757e3a64
commit
bc352dfba9
2 changed files with 18 additions and 1 deletions
|
@ -11,7 +11,10 @@ bat_SOURCES = \
|
|||
convert.c \
|
||||
alsa.c
|
||||
|
||||
noinst_HEADERS = \
|
||||
common.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-Wall -I$(top_srcdir)/include
|
||||
|
||||
bat_LDADD = -lasound
|
||||
bat_LDADD = @FFTW_LIB@
|
||||
|
|
14
configure.ac
14
configure.ac
|
@ -64,9 +64,23 @@ AM_CONDITIONAL(BAT, test x$bat = xtrue)
|
|||
|
||||
if test x$bat = xtrue; then
|
||||
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
saved_LDFLAGS="$LDFLAGS"
|
||||
saved_LIBS="$LIBS"
|
||||
FFTW_INC=""
|
||||
FFTW_LIB=""
|
||||
FFTW_CFLAGS=""
|
||||
AC_CHECK_LIB([fftw3], [fftw_malloc], , [AC_MSG_ERROR([Error: need FFTW3 library])])
|
||||
AC_CHECK_LIB([m], [sqrtf], , [AC_MSG_ERROR([Error: Need sqrtf])])
|
||||
AC_CHECK_LIB([pthread], [pthread_create], , [AC_MSG_ERROR([Error: need PTHREAD library])])
|
||||
FFTW_CFLAGS="$CFLAGS"
|
||||
FFTW_LIB="$LIBS"
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
LDFLAGS="$saved_LDFLAGS"
|
||||
LIBS="$saved_LIBS"
|
||||
AC_SUBST(FFTW_INC)
|
||||
AC_SUBST(FFTW_LIB)
|
||||
AC_SUBST(FFTW_CFLAGS)
|
||||
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue