simplify by using #cmakedefine01; introduce HAVE_AVCODEC
parent
e923db11ad
commit
897bbfead0
|
@ -97,12 +97,13 @@ if (WITH_DOUBLE_PRECISION)
|
|||
set (HAVE_DOUBLE_PRECISION 1)
|
||||
endif ()
|
||||
|
||||
if (WITH_AVFFT)
|
||||
if (WITH_AVFFT OR HAVE_SIMD)
|
||||
find_package (LibAVCodec)
|
||||
if (AVCODEC_FOUND)
|
||||
include_directories (${AVCODEC_INCLUDE_DIRS})
|
||||
link_libraries (${AVCODEC_LIBRARIES})
|
||||
set (HAVE_AVFFT 1)
|
||||
set (HAVE_AVFFT ${WITH_AVFFT})
|
||||
set (HAVE_AVCODEC 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
@ -110,17 +111,6 @@ check_function_exists (lrint HAVE_LRINT)
|
|||
check_include_files (fenv.h HAVE_FENV_H)
|
||||
test_big_endian (WORDS_BIGENDIAN)
|
||||
|
||||
macro (make_exist)
|
||||
foreach (x ${ARGN})
|
||||
if (NOT ${x})
|
||||
set (${x} 0)
|
||||
endif ()
|
||||
endforeach ()
|
||||
endmacro ()
|
||||
|
||||
make_exist (HAVE_LRINT HAVE_FENV_H WORDS_BIGENDIAN HAVE_SIMD)
|
||||
make_exist (HAVE_SINGLE_PRECISION HAVE_DOUBLE_PRECISION HAVE_AVFFT)
|
||||
|
||||
|
||||
|
||||
# Compiler configuration:
|
||||
|
|
|
@ -21,8 +21,6 @@ check_function_exists (lrintf HAVE_LRINTF)
|
|||
check_function_exists (alarm HAVE_ALARM)
|
||||
check_function_exists (signal HAVE_SIGNAL)
|
||||
check_include_files (sys/times.h HAVE_SYS_TIMES_H)
|
||||
make_exist (HAVE_LRINTF HAVE_ALARM HAVE_SIGNAL HAVE_SYS_TIMES_H)
|
||||
make_exist (HAVE_FFTW3 HAVE_SNDFILE)
|
||||
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
include_directories (${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
#if !defined soxsrc_lsr_tests_config_included
|
||||
#define soxsrc_lsr_tests_config_included
|
||||
|
||||
#define HAVE_ALARM @HAVE_ALARM@
|
||||
#define HAVE_FFTW3 @HAVE_FFTW3@
|
||||
#define HAVE_LRINTF @HAVE_LRINTF@
|
||||
#define HAVE_LRINT @HAVE_LRINT@
|
||||
#define HAVE_SIGNAL @HAVE_SIGNAL@
|
||||
#define HAVE_SNDFILE @HAVE_SNDFILE@
|
||||
#define HAVE_SYS_TIMES_H @HAVE_SYS_TIMES_H@
|
||||
#cmakedefine01 HAVE_ALARM
|
||||
#cmakedefine01 HAVE_FFTW3
|
||||
#cmakedefine01 HAVE_LRINTF
|
||||
#cmakedefine01 HAVE_LRINT
|
||||
#cmakedefine01 HAVE_SIGNAL
|
||||
#cmakedefine01 HAVE_SNDFILE
|
||||
#cmakedefine01 HAVE_SYS_TIMES_H
|
||||
|
||||
#if HAVE_SIGNAL
|
||||
#include <signal.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* SoX Resampler Library Copyright (c) 2007-13 robs@users.sourceforge.net
|
||||
/* SoX Resampler Library Copyright (c) 2007-16 robs@users.sourceforge.net
|
||||
* Licence for this file: LGPL v2.1 See LICENCE for details. */
|
||||
|
||||
/* N.B. Pre-configured for typical MS-Windows systems. However, the normal
|
||||
|
@ -9,11 +9,12 @@
|
|||
|
||||
#define HAVE_SINGLE_PRECISION 1
|
||||
#define HAVE_DOUBLE_PRECISION 1
|
||||
#define HAVE_AVFFT 0
|
||||
#define HAVE_SIMD 1
|
||||
#define HAVE_FENV_H 0
|
||||
#define HAVE_LRINT 0
|
||||
#define WORDS_BIGENDIAN 0
|
||||
#define HAVE_AVFFT 0
|
||||
#define HAVE_AVCODEC 0
|
||||
#define HAVE_SIMD 1
|
||||
#define HAVE_FENV_H 0
|
||||
#define HAVE_LRINT 0
|
||||
#define WORDS_BIGENDIAN 0
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
|
|
|
@ -4,13 +4,14 @@
|
|||
#if !defined soxr_config_included
|
||||
#define soxr_config_included
|
||||
|
||||
#define HAVE_SINGLE_PRECISION @HAVE_SINGLE_PRECISION@
|
||||
#define HAVE_DOUBLE_PRECISION @HAVE_DOUBLE_PRECISION@
|
||||
#define HAVE_AVFFT @HAVE_AVFFT@
|
||||
#define HAVE_SIMD @HAVE_SIMD@
|
||||
#define HAVE_FENV_H @HAVE_FENV_H@
|
||||
#define HAVE_LRINT @HAVE_LRINT@
|
||||
#define WORDS_BIGENDIAN @WORDS_BIGENDIAN@
|
||||
#cmakedefine01 HAVE_SINGLE_PRECISION
|
||||
#cmakedefine01 HAVE_DOUBLE_PRECISION
|
||||
#cmakedefine01 HAVE_AVFFT
|
||||
#cmakedefine01 HAVE_AVCODEC
|
||||
#cmakedefine01 HAVE_SIMD
|
||||
#cmakedefine01 HAVE_FENV_H
|
||||
#cmakedefine01 HAVE_LRINT
|
||||
#cmakedefine01 WORDS_BIGENDIAN
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue