Fix building of internal sox on MinGW. Add logic to pickup depdendency on libwinpthread on MinGW.

pull/2/head
hobbes1069 2017-01-29 14:46:12 +00:00
parent 9f8d69386d
commit b17ea38308
7 changed files with 69 additions and 3001 deletions

View File

@ -145,10 +145,16 @@ endif(UNIX)
# Find some standard headers and functions.
include(CheckIncludeFiles)
check_include_files("limits.h" HAVE_LIMITS_H)
check_include_files("stddef.h" HAVE_STDDEF_H)
check_include_files("stdlib.h" HAVE_STDLIB_H)
check_include_files("string.h" HAVE_STRING_H)
check_include_files("byteswap.h" HAVE_BYTESWAP_H)
check_include_files("limits.h" HAVE_LIMITS_H)
check_include_files("stddef.h" HAVE_STDDEF_H)
check_include_files("stdlib.h" HAVE_STDLIB_H)
check_include_files("string.h" HAVE_STRING_H)
check_include_files("strings.h" HAVE_STRINGS_H)
check_include_files("ltdl.h" HAVE_LTDL_H)
check_include_files("inttypes.h" HAVE_INTTYPES_H)
check_include_files("sys/stat.h" HAVE_SYS_STAT_H)
check_include_files("sys/types.h" HAVE_SYS_TYPES_H)
include(CheckTypeSize)
check_type_size("int" SIZEOF_INT)
@ -158,6 +164,13 @@ check_function_exists(floor HAVE_FLOOR)
check_function_exists(memset HAVE_MEMSET)
check_function_exists(pow HAVE_POW)
check_function_exists(sqrt HAVE_SQRT)
check_function_exists(fseeko HAVE_FSEEKO)
check_function_exists(fmemopen HAVE_FMEMOPEN)
check_function_exists(strcasecmp HAVE_STRCASECMP)
check_function_exists(vsnprintf HAVE_VSNPRINTF)
include(CheckSymbolExists)
check_symbol_exists("_fseeki64" "stdio.h" HAVE__FSEEKI64)
# fdmdv2_main.h requires patching to find config.h as it current looks in the
# source directory and the generated file goes in the binary directory.
@ -166,6 +179,10 @@ configure_file ("${PROJECT_SOURCE_DIR}/cmake/config.h.in"
include_directories(${PROJECT_BINARY_DIR})
add_definitions(-DHAVE_CONFIG_H)
# Config file for bundled sox sources
configure_file("${PROJECT_SOURCE_DIR}/cmake/soxconfig.h.in"
"${PROJECT_BINARY_DIR}/soxconfig.h")
# Pthread Library
find_package(Threads REQUIRED)
message(STATUS "Threads library flags: ${CMAKE_THREAD_LIBS_INIT}")
@ -364,6 +381,25 @@ else()
message(STATUS "Will attempt static build of speex.")
include(cmake/BuildSpeex.cmake)
endif()
#
# Find libdl for dlopen/dlclose
#
if(UNIX)
message(STATUS "Looking for dl library.")
find_library(DL_LIBRARY dl)
if(DL_LIBRARY)
message(STATUS " dl library: ${DL_LIBRARY}")
list(APPEND FREEDV_LINK_LIBS ${DL_LIBRARY})
else()
message(FATAL_ERROR "dl library not found.
On Linux systems try installing:
glibc-devel (RPM based systems)
glibc-dev (DEB based systems)"
)
endif()
endif(UNIX)
#Freedv
add_subdirectory(src)

View File

@ -18,6 +18,18 @@ foreach(_runtime ${_deps})
message("Looking for ${_runtime}")
find_library(RUNTIME_${_runtime} ${_runtime})
message("${RUNTIME_${_runtime}}")
if("${_runtime}" MATCHES "^libgcc.*")
message("Looking for dependencies of ${_runtime}")
get_prerequisites("${RUNTIME_${_runtime}}" _deps2 1 0 "" "")
foreach(_runtime2 ${_deps2})
find_library(RUNTIME_${_runtime2} ${_runtime2})
message("${RUNTIME_${_runtime2}}")
if(RUNTIME_${_runtime2})
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
TYPE EXECUTABLE FILES "${RUNTIME_${_runtime2}}")
endif()
endforeach()
endif()
if(RUNTIME_${_runtime})
file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
TYPE EXECUTABLE FILES "${RUNTIME_${_runtime}}")

View File

@ -0,0 +1,16 @@
#define PACKAGE_VERSION "14.4.2"
#cmakedefine HAVE_BYTESWAP_H 1
#cmakedefine HAVE_FMEMOPEN 1
#cmakedefine HAVE_FSEEKO 1
#cmakedefine HAVE__FSEEKOI64 1
#cmakedefine HAVE_LTDL_H 1
#cmakedefine HAVE_MAGIC 1
#cmakedefine HAVE_POPEN 1
#cmakedefine HAVE_STDINT_H 1
#cmakedefine HAVE_INTTYPES_H 1
#cmakedefine HAVE_STRCASECMP 1
#cmakedefine HAVE_STRINGS_H 1
#cmakedefine HAVE_SYS_STAT_H 1
#cmakedefine HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_VSNPRINTF 1

View File

@ -29,7 +29,6 @@ set(FREEDV_SOURCES
fdmdv2_plot_waterfall.h
hamlib.h
sox_biquad.h
sox.h
sox/band.h
sox/biquad.c
sox/biquads.c
@ -39,7 +38,6 @@ set(FREEDV_SOURCES
sox/effects_i.c
sox/formats_i.c
sox/libsox.c
sox/soxconfig.h
sox/sox.h
sox/sox_i.h
sox/soxomp.h

2608
src/sox.h

File diff suppressed because it is too large Load Diff

View File

@ -1,386 +0,0 @@
/* src/soxconfig.h. Generated from soxconfig.h.in by configure. */
/* src/soxconfig.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Define to dlopen() amrnb. */
/* #undef DL_AMRNB */
/* Define to dlopen() amrwb. */
/* #undef DL_AMRWB */
/* Define to dlopen() lame. */
/* #undef DL_LAME */
/* Define to dlopen() mad. */
/* #undef DL_MAD */
/* Define to dlopen() sndfile. */
/* #undef DL_SNDFILE */
/* Define to dlopen() libtwolame. */
/* #undef DL_TWOLAME */
/* Define if you are using an external GSM library */
#define EXTERNAL_GSM 1
/* Define if you are using an external LPC10 library */
/* #undef EXTERNAL_LPC10 */
/* Define to 1 if you have alsa. */
#define HAVE_ALSA 1
/* Define to 1 if you have amrnb. */
/* #undef HAVE_AMRNB */
/* Define to 1 if you have amrwb. */
/* #undef HAVE_AMRWB */
/* Define to 1 if you have the <amrwb/dec.h> header file. */
/* #undef HAVE_AMRWB_DEC_H */
/* Define to 1 if you have ao. */
#define HAVE_AO 1
/* Define to 1 if you have the <byteswap.h> header file. */
#define HAVE_BYTESWAP_H 1
/* Define to 1 if you have coreaudio. */
/* #undef HAVE_COREAUDIO */
/* 1 if DISTRO is defined */
/* #undef HAVE_DISTRO */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have ffmpeg. */
/* #undef HAVE_FFMPEG */
/* Define to 1 if you have the <ffmpeg/avcodec.h> header file. */
/* #undef HAVE_FFMPEG_AVCODEC_H */
/* Define to 1 if you have the <ffmpeg/avformat.h> header file. */
/* #undef HAVE_FFMPEG_AVFORMAT_H */
/* Define to 1 if you have flac. */
/* #undef HAVE_FLAC */
/* Define to 1 if you have the `fmemopen' function. */
#define HAVE_FMEMOPEN 1
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#define HAVE_FSEEKO 1
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the <glob.h> header file. */
#define HAVE_GLOB_H 1
/* Define to 1 if you have gsm. */
#define HAVE_GSM 1
/* Define to 1 if you have the <gsm/gsm.h> header file. */
#define HAVE_GSM_GSM_H 1
/* Define to 1 if you have the <gsm.h> header file. */
/* #undef HAVE_GSM_H */
/* Define to 1 if you have id3tag. */
/* #undef HAVE_ID3TAG */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* 1 if should enable LADSPA */
/* #undef HAVE_LADSPA_H */
/* Define to 1 if you have the <lame.h> header file. */
/* #undef HAVE_LAME_H */
/* Define to 1 if lame supports optional ID3 tags. */
/* #undef HAVE_LAME_ID3TAG */
/* Define to 1 if you have the <lame/lame.h> header file. */
/* #undef HAVE_LAME_LAME_H */
/* Define to 1 if you have the <libavcodec/avcodec.h> header file. */
/* #undef HAVE_LIBAVCODEC_AVCODEC_H */
/* Define to 1 if you have the <libavformat/avformat.h> header file. */
/* #undef HAVE_LIBAVFORMAT_AVFORMAT_H */
/* Define to 1 if you have libltdl */
/* #undef HAVE_LIBLTDL */
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
/* Define to 1 if you have the <libpng/png.h> header file. */
/* #undef HAVE_LIBPNG_PNG_H */
/* Define to 1 if you have lpc10. */
#define HAVE_LPC10 1
/* Define to 1 if you have the <lpc10.h> header file. */
/* #undef HAVE_LPC10_H */
/* Define to 1 if you have the <ltdl.h> header file. */
/* #undef HAVE_LTDL_H */
/* Define to 1 if you have the <machine/soundcard.h> header file. */
/* #undef HAVE_MACHINE_SOUNDCARD_H */
/* Define to 1 if you have the <mad.h> header file. */
/* #undef HAVE_MAD_H */
/* Define to 1 if you have magic. */
/* #undef HAVE_MAGIC */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkstemp' function. */
#define HAVE_MKSTEMP 1
/* Define to 1 if you have mp3. */
/* #undef HAVE_MP3 */
/* Define to 1 if you have oggvorbis. */
/* #undef HAVE_OGG_VORBIS */
/* Define to 1 if you have the <omp.h> header file. */
/* #undef HAVE_OMP_H */
/* Define to 1 if you have the <opencore-amrnb/interf_dec.h> header file. */
/* #undef HAVE_OPENCORE_AMRNB_INTERF_DEC_H */
/* Define to 1 if you have the <opencore-amrwb/dec_if.h> header file. */
/* #undef HAVE_OPENCORE_AMRWB_DEC_IF_H */
/* Define to 1 if you have GOMP. */
/* #undef HAVE_OPENMP */
/* Define to 1 if you have oss. */
/* #undef HAVE_OSS */
/* Define to 1 if you have PNG. */
/* #undef HAVE_PNG */
/* Define to 1 if you have the <png.h> header file. */
/* #undef HAVE_PNG_H */
/* Define to 1 if you have the `popen' function. */
#define HAVE_POPEN 1
/* Define to 1 if you have pulseaudio. */
/* #undef HAVE_PULSEAUDIO */
/* Define if you have libsndfile with SFC_SFC_SET_SCALE_INT_FLOAT_WRITE */
#define HAVE_SFC_SET_SCALE_INT_FLOAT_WRITE 1
/* Define to 1 if you have sndfile. */
#define HAVE_SNDFILE 1
/* Define if you have libsndfile >= 1.0.18 */
#define HAVE_SNDFILE_1_0_18 1
/* Define if you have <sndfile.h> */
#define HAVE_SNDFILE_H 1
/* Define to 1 if you have sndio. */
/* #undef HAVE_SNDIO */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have sunaudio. */
/* #undef HAVE_SUN_AUDIO */
/* Define to 1 if you have the <sun/audioio.h> header file. */
/* #undef HAVE_SUN_AUDIOIO_H */
/* Define to 1 if you have the <sys/audioio.h> header file. */
/* #undef HAVE_SYS_AUDIOIO_H */
/* Define to 1 if you have the <sys/soundcard.h> header file. */
/* #undef HAVE_SYS_SOUNDCARD_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/timeb.h> header file. */
#define HAVE_SYS_TIMEB_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/utsname.h> header file. */
#define HAVE_SYS_UTSNAME_H 1
/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define to 1 if you have the <twolame.h> header file. */
/* #undef HAVE_TWOLAME_H */
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
/* Define to 1 if you have waveaudio. */
/* #undef HAVE_WAVEAUDIO */
/* Define to 1 if you have wavpack. */
/* #undef HAVE_WAVPACK */
/* Define to 1 to use win32 glob */
/* #undef HAVE_WIN32_GLOB_H */
/* Define to 1 to use internal win32 ltdl */
/* #undef HAVE_WIN32_LTDL_H */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Name of package */
#define PACKAGE "sox"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "sox-devel@lists.sourceforge.net"
/* Define to the full name of this package. */
#define PACKAGE_NAME "SoX"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "SoX 14.4.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "sox"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "14.4.1"
/* Define to 1 if you have static alsa. */
#define STATIC_ALSA 1
/* Define to 1 if you have static amrnb. */
/* #undef STATIC_AMRNB */
/* Define to 1 if you have static amrwb. */
/* #undef STATIC_AMRWB */
/* Define to 1 if you have static ao. */
#define STATIC_AO 1
/* Define to 1 if you have static coreaudio. */
/* #undef STATIC_COREAUDIO */
/* Define to 1 if you have static ffmpeg. */
/* #undef STATIC_FFMPEG */
/* Define to 1 if you have static flac. */
/* #undef STATIC_FLAC */
/* Define to 1 if you have static gsm. */
#define STATIC_GSM 1
/* Define to 1 if you have static lpc10. */
#define STATIC_LPC10 1
/* Define to 1 if you have static mp3. */
/* #undef STATIC_MP3 */
/* Define to 1 if you have static oggvorbis. */
/* #undef STATIC_OGG_VORBIS */
/* Define to 1 if you have static oss. */
/* #undef STATIC_OSS */
/* Define to 1 if you have static pulseaudio. */
/* #undef STATIC_PULSEAUDIO */
/* Define to 1 if you have static sndfile. */
#define STATIC_SNDFILE 1
/* Define to 1 if you have static sndio. */
/* #undef STATIC_SNDIO */
/* Define to 1 if you have static sunaudio. */
/* #undef STATIC_SUN_AUDIO */
/* Define to 1 if you have static waveaudio. */
/* #undef STATIC_WAVEAUDIO */
/* Define to 1 if you have static wavpack. */
/* #undef STATIC_WAVPACK */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "14.4.1"
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
/* #undef _LARGEFILE_SOURCE */
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif

View File

@ -31,7 +31,7 @@
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include "sox.h"
#include "sox/sox.h"
#include "sox_biquad.h"