configure.ac,Makefile.am,build.sh : Added cwFFTW library detection variable.
This commit is contained in:
parent
b0d35e77d6
commit
75238b7374
15
Makefile.am
15
Makefile.am
@ -46,11 +46,14 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if cwWEB
|
if cwWEB
|
||||||
|
|
||||||
|
AM_CXXFLAGS += --std=c++11
|
||||||
|
|
||||||
FFT_DIR = $(HOME)/src/fftw-3.3.8/build
|
FFT_DIR = $(HOME)/src/fftw-3.3.8/build
|
||||||
FFT_DIR_D = $(FFT_DIR)/d
|
FFT_DIR_D = $(FFT_DIR)/d
|
||||||
FFT_DIR_S = $(FFT_DIR)/s
|
FFT_DIR_S = $(FFT_DIR)/s
|
||||||
|
|
||||||
AM_CXXFLAGS += --std=c++11
|
|
||||||
AM_CPPFLAGS += -I$(FFT_DIR)/include -I$(FFT_DIR_D)/include -I$(FFT_DIR_S)/include
|
AM_CPPFLAGS += -I$(FFT_DIR)/include -I$(FFT_DIR_D)/include -I$(FFT_DIR_S)/include
|
||||||
AM_LDFLAGS += -L$(FFT_DIR)/lib -L$(FFT_DIR_D)/lib -L$(FFT_DIR_S)/lib
|
AM_LDFLAGS += -L$(FFT_DIR)/lib -L$(FFT_DIR_D)/lib -L$(FFT_DIR_S)/lib
|
||||||
else
|
else
|
||||||
@ -68,7 +71,15 @@ src_cwtest_cwtest_SOURCES = src/cwtest/main.cpp
|
|||||||
|
|
||||||
# 1) autoconfig manual recommends setting direct referenes to non-3rd party libraries rather than using -L and -l
|
# 1) autoconfig manual recommends setting direct referenes to non-3rd party libraries rather than using -L and -l
|
||||||
# 2) -ldl is required for dlopen(),dlclose() ...
|
# 2) -ldl is required for dlopen(),dlclose() ...
|
||||||
src_cwtest_cwtest_LDADD = libcw.la -lpthread -ldl -lfftw3 -lfftw3f
|
src_cwtest_cwtest_LDADD = libcw.la -lpthread -ldl
|
||||||
|
|
||||||
|
if cwFFTW
|
||||||
|
src_cwtest_cwtest_LDADD += -lfftw3 -lfftw3f
|
||||||
|
endif
|
||||||
|
|
||||||
|
if cwWEB
|
||||||
|
src_cwtest_cwtest_LDADD += -lfftw3 -lfftw3f
|
||||||
|
endif
|
||||||
|
|
||||||
if cwWEBSOCK
|
if cwWEBSOCK
|
||||||
AM_CPPFLAGS += -I$(WS_DIR)/include
|
AM_CPPFLAGS += -I$(WS_DIR)/include
|
||||||
|
@ -18,8 +18,8 @@ cd ${curdir}
|
|||||||
../../../configure --prefix=${curdir} --enable-debug --enable-alsa \
|
../../../configure --prefix=${curdir} --enable-debug --enable-alsa \
|
||||||
CFLAGS="-g -Wall" \
|
CFLAGS="-g -Wall" \
|
||||||
CXXFLAGS="-g -Wall" \
|
CXXFLAGS="-g -Wall" \
|
||||||
CPPFLAGS= \
|
CPPFLAGS="-I${HOME}/sdk/libwebsockets/build/out/include" \
|
||||||
LDFLAGS= \
|
LDFLAGS="-L${HOME}/sdk/libwebsockets/build/out/lib" \
|
||||||
LIBS=
|
LIBS=
|
||||||
|
|
||||||
|
|
||||||
|
14
configure.ac
14
configure.ac
@ -22,10 +22,6 @@ AC_PROG_CXX
|
|||||||
|
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
|
||||||
# Checks for libraries.
|
|
||||||
# AC_CHECK_LIB([cairo],[cairo_debug_reset_static_data],[AC_MSG_RESULT([The 'cairo' library was found.])],[AC_MSG_ERROR([The 'cairo' library was not found.])])
|
|
||||||
#TODO: add more library checks
|
|
||||||
|
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h limits.h mach/mach.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h])
|
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h limits.h mach/mach.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h])
|
||||||
@ -46,6 +42,16 @@ AC_FUNC_REALLOC
|
|||||||
AC_FUNC_STRTOD
|
AC_FUNC_STRTOD
|
||||||
AC_CHECK_FUNCS([clock_gettime floor memmove memset mkdir pow rint select socket sqrt strcasecmp strchr strcspn strerror strspn strstr strtol])
|
AC_CHECK_FUNCS([clock_gettime floor memmove memset mkdir pow rint select socket sqrt strcasecmp strchr strcspn strerror strspn strstr strtol])
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
fftw=false
|
||||||
|
AC_CHECK_LIB([fftw3],[fftw_malloc],[fftw=true],[])
|
||||||
|
AM_CONDITIONAL([cwFFTW],[test x"${fftw}" = xtrue])
|
||||||
|
|
||||||
|
if test x"$fftw" = xtrue; then
|
||||||
|
AC_DEFINE([cwFFTW], 1,[Use libfftw3.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "fftw='${fftw}'"
|
||||||
|
|
||||||
# The following is a custom macro in ./m4/os_type.m4
|
# The following is a custom macro in ./m4/os_type.m4
|
||||||
# be sure to also set "ACLOCAL_AMFLAGS = -I m4" in ./Makefile.am
|
# be sure to also set "ACLOCAL_AMFLAGS = -I m4" in ./Makefile.am
|
||||||
|
Loading…
Reference in New Issue
Block a user