Make build system completely non-recursive

This commit is contained in:
David Seifert 2017-09-03 10:33:06 +02:00 committed by Erik de Castro Lopo
parent beee21e5c2
commit e6c42ff027
36 changed files with 997 additions and 1174 deletions

14
.gitignore vendored
View File

@ -44,15 +44,15 @@ Build/
CMake/config.h.in CMake/config.h.in
CMakeFiles CMakeFiles
CMakeCache.txt CMakeCache.txt
Cfg build-aux
Hack Hack
Hack/sndfile-fuzzbomb Hack/sndfile-fuzzbomb
INSTALL INSTALL
M4/libtool.m4 m4/libtool.m4
M4/ltoptions.m4 m4/ltoptions.m4
M4/ltsugar.m4 m4/ltsugar.m4
M4/ltversion.m4 m4/ltversion.m4
M4/lt~obsolete.m4 m4/lt~obsolete.m4
Makefile Makefile
Makefile.in Makefile.in
aclocal.m4 aclocal.m4
@ -127,6 +127,8 @@ tests/test_wrapper.sh
tests/utils.c tests/utils.c
tests/utils.h tests/utils.h
tests/write_read_test.c tests/write_read_test.c
*.log
*.trs
.vs/ .vs/
packages/ packages/
*.vcxproj.user *.vcxproj.user

View File

@ -1074,6 +1074,9 @@ if (BUILD_TESTING)
if (BUILD_SHARED_LIBS AND LIBM_REQUIRED) if (BUILD_SHARED_LIBS AND LIBM_REQUIRED)
target_link_libraries(stdin_test PRIVATE ${M_LIBRARY}) target_link_libraries(stdin_test PRIVATE ${M_LIBRARY})
endif () endif ()
set_target_properties(stdin_test
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "tests")
set (stdout_test_SOURCES tests/stdout_test.c) set (stdout_test_SOURCES tests/stdout_test.c)
add_executable (stdout_test ${stdout_test_SOURCES}) add_executable (stdout_test ${stdout_test_SOURCES})
@ -1081,6 +1084,9 @@ if (BUILD_TESTING)
if (BUILD_SHARED_LIBS AND LIBM_REQUIRED) if (BUILD_SHARED_LIBS AND LIBM_REQUIRED)
target_link_libraries(stdout_test PRIVATE ${M_LIBRARY}) target_link_libraries(stdout_test PRIVATE ${M_LIBRARY})
endif () endif ()
set_target_properties(stdout_test
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "tests")
set (stdio_test_SOURCES tests/stdio_test.c) set (stdio_test_SOURCES tests/stdio_test.c)
add_executable (stdio_test ${stdio_test_SOURCES}) add_executable (stdio_test ${stdio_test_SOURCES})

View File

@ -1,155 +0,0 @@
dnl @synopsis MN_C_FIND_ENDIAN
dnl
dnl Determine endian-ness of target processor.
dnl @version 1.1 Mar 03 2002
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
dnl
dnl Majority written from scratch to replace the standard autoconf macro
dnl AC_C_BIGENDIAN. Only part remaining from the original it the invocation
dnl of the AC_TRY_RUN macro.
dnl
dnl Permission to use, copy, modify, distribute, and sell this file for any
dnl purpose is hereby granted without fee, provided that the above copyright
dnl and this permission notice appear in all copies. No representations are
dnl made about the suitability of this software for any purpose. It is
dnl provided "as is" without express or implied warranty.
dnl Find endian-ness in the following way:
dnl 1) Look in <endian.h>.
dnl 2) If 1) fails, look in <sys/types.h> and <sys/param.h>.
dnl 3) If 1) and 2) fails and not cross compiling run a test program.
dnl 4) If 1) and 2) fails and cross compiling then guess based on target.
AC_DEFUN([MN_C_FIND_ENDIAN],
[AC_CACHE_CHECK(processor byte ordering,
ac_cv_c_byte_order,
# Initialize to unknown
ac_cv_c_byte_order=unknown
if test x$ac_cv_header_endian_h = xyes ; then
# First try <endian.h> which should set BYTE_ORDER.
[AC_TRY_LINK([
#include <endian.h>
#if BYTE_ORDER != LITTLE_ENDIAN
not big endian
#endif
], return 0 ;,
ac_cv_c_byte_order=little
)]
[AC_TRY_LINK([
#include <endian.h>
#if BYTE_ORDER != BIG_ENDIAN
not big endian
#endif
], return 0 ;,
ac_cv_c_byte_order=big
)]
fi
if test $ac_cv_c_byte_order = unknown ; then
[AC_TRY_LINK([
#include <sys/types.h>
#include <sys/param.h>
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
bogus endian macros
#endif
], return 0 ;,
[AC_TRY_LINK([
#include <sys/types.h>
#include <sys/param.h>
#if BYTE_ORDER != LITTLE_ENDIAN
not big endian
#endif
], return 0 ;,
ac_cv_c_byte_order=little
)]
[AC_TRY_LINK([
#include <sys/types.h>
#include <sys/param.h>
#if BYTE_ORDER != LITTLE_ENDIAN
not big endian
#endif
], return 0 ;,
ac_cv_c_byte_order=little
)]
)]
fi
if test $ac_cv_c_byte_order = unknown ; then
if test $cross_compiling = yes ; then
# This is the last resort. Try to guess the target processor endian-ness
# by looking at the target CPU type.
[
case "$target_cpu" in
alpha* | i?86* | mipsel* | ia64*)
ac_cv_c_byte_order=little
;;
m68* | mips* | powerpc* | hppa* | sparc*)
ac_cv_c_byte_order=big
;;
esac
]
else
AC_TRY_RUN(
[[
int main (void)
{ /* Are we little or big endian? From Harbison&Steele. */
union
{ long l ;
char c [sizeof (long)] ;
} u ;
u.l = 1 ;
return (u.c [sizeof (long) - 1] == 1);
}
]], , ac_cv_c_byte_order=big,
)
AC_TRY_RUN(
[[int main (void)
{ /* Are we little or big endian? From Harbison&Steele. */
union
{ long l ;
char c [sizeof (long)] ;
} u ;
u.l = 1 ;
return (u.c [0] == 1);
}]], , ac_cv_c_byte_order=little,
)
fi
fi
)
if test $ac_cv_c_byte_order = big ; then
ac_cv_c_big_endian=1
ac_cv_c_little_endian=0
elif test $ac_cv_c_byte_order = little ; then
ac_cv_c_big_endian=0
ac_cv_c_little_endian=1
else
ac_cv_c_big_endian=0
ac_cv_c_little_endian=0
AC_MSG_WARN([[*****************************************************************]])
AC_MSG_WARN([[*** Not able to determine endian-ness of target processor. ]])
AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in ]])
AC_MSG_WARN([[*** src/config.h may need to be hand editied. ]])
AC_MSG_WARN([[*****************************************************************]])
fi
]
)# MN_C_FIND_ENDIAN

View File

@ -1,38 +0,0 @@
dnl @synopsis MN_C99_FUNC_LLRINT
dnl
dnl Check whether C99's llrint function is available.
dnl @version 1.1 Sep 30 2002
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
dnl
dnl Permission to use, copy, modify, distribute, and sell this file for any
dnl purpose is hereby granted without fee, provided that the above copyright
dnl and this permission notice appear in all copies. No representations are
dnl made about the suitability of this software for any purpose. It is
dnl provided "as is" without express or implied warranty.
dnl
AC_DEFUN([MN_C99_FUNC_LLRINT],
[AC_CACHE_CHECK(for llrint,
ac_cv_c99_llrint,
[
llrint_save_CFLAGS=$CFLAGS
CFLAGS="-lm"
AC_TRY_LINK([
#define _ISOC9X_SOURCE 1
#define _ISOC99_SOURCE 1
#define __USE_ISOC99 1
#define __USE_ISOC9X 1
#include <math.h>
#include <stdint.h>
], int64_t x ; x = llrint(3.14159) ;, ac_cv_c99_llrint=yes, ac_cv_c99_llrint=no)
CFLAGS=$llrint_save_CFLAGS
])
if test "$ac_cv_c99_llrint" = yes; then
AC_DEFINE(HAVE_LLRINT, 1,
[Define if you have C99's llrint function.])
fi
])# MN_C99_FUNC_LLRINT

View File

@ -1,37 +0,0 @@
dnl @synopsis MN_C99_FUNC_LRINT
dnl
dnl Check whether C99's lrint function is available.
dnl @version 1.3 Feb 12 2002
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
dnl
dnl Permission to use, copy, modify, distribute, and sell this file for any
dnl purpose is hereby granted without fee, provided that the above copyright
dnl and this permission notice appear in all copies. No representations are
dnl made about the suitability of this software for any purpose. It is
dnl provided "as is" without express or implied warranty.
dnl
AC_DEFUN([MN_C99_FUNC_LRINT],
[AC_CACHE_CHECK(for lrint,
ac_cv_c99_lrint,
[
lrint_save_CFLAGS=$CFLAGS
CFLAGS="-lm"
AC_TRY_LINK([
#define _ISOC9X_SOURCE 1
#define _ISOC99_SOURCE 1
#define __USE_ISOC99 1
#define __USE_ISOC9X 1
#include <math.h>
], if (!lrint(3.14159)) lrint(2.7183);, ac_cv_c99_lrint=yes, ac_cv_c99_lrint=no)
CFLAGS=$lrint_save_CFLAGS
])
if test "$ac_cv_c99_lrint" = yes; then
AC_DEFINE(HAVE_LRINT, 1,
[Define if you have C99's lrint function.])
fi
])# MN_C99_FUNC_LRINT

View File

@ -1,37 +0,0 @@
dnl @synopsis MN_C99_FUNC_LRINTF
dnl
dnl Check whether C99's lrintf function is available.
dnl @version 1.3 Feb 12 2002
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
dnl
dnl Permission to use, copy, modify, distribute, and sell this file for any
dnl purpose is hereby granted without fee, provided that the above copyright
dnl and this permission notice appear in all copies. No representations are
dnl made about the suitability of this software for any purpose. It is
dnl provided "as is" without express or implied warranty.
dnl
AC_DEFUN([MN_C99_FUNC_LRINTF],
[AC_CACHE_CHECK(for lrintf,
ac_cv_c99_lrintf,
[
lrintf_save_CFLAGS=$CFLAGS
CFLAGS="-lm"
AC_TRY_LINK([
#define _ISOC9X_SOURCE 1
#define _ISOC99_SOURCE 1
#define __USE_ISOC99 1
#define __USE_ISOC9X 1
#include <math.h>
], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
CFLAGS=$lrintf_save_CFLAGS
])
if test "$ac_cv_c99_lrintf" = yes; then
AC_DEFINE(HAVE_LRINTF, 1,
[Define if you have C99's lrintf function.])
fi
])# MN_C99_FUNC_LRINTF

View File

@ -1,24 +1,20 @@
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I M4 AM_CPPFLAGS = -I$(top_srcdir)/src $(OS_SPECIFIC_CFLAGS)
DISTCHECK_CONFIGURE_FLAGS = --enable-werror DISTCHECK_CONFIGURE_FLAGS = --enable-werror
if BUILD_OCTAVE_MOD CLEANFILES = programs/*.wav
octave_dir = Octave
endif
SUBDIRS = Win32 src examples tests
if FULL_SUITE if FULL_SUITE
SUBDIRS += man doc $(octave_dir) regtest programs if BUILD_OCTAVE_MOD
SUBDIRS = Octave
endif
endif endif
DIST_SUBDIRS = man doc Win32 src Octave examples regtest tests programs
EXTRA_DIST = libsndfile.spec.in sndfile.pc.in Scripts/android-configure.sh \ EXTRA_DIST = libsndfile.spec.in sndfile.pc.in Scripts/android-configure.sh \
Scripts/linux-to-win-cross-configure.sh Scripts/build-test-tarball.mk.in \ Scripts/linux-to-win-cross-configure.sh \
CMakeLists.txt $(cmake_files) sndfile.pc.cmake.in CMakeLists.txt $(cmake_files) sndfile.pc.cmake.in Win32
cmake_files = cmake/ClipMode.cmake cmake/FindFLAC.cmake \ cmake_files = cmake/ClipMode.cmake cmake/FindFLAC.cmake \
cmake/CMakeAutoGen.cmake cmake/CMakeAutoGenScript.cmake \ cmake/CMakeAutoGen.cmake cmake/CMakeAutoGenScript.cmake \
@ -28,27 +24,434 @@ cmake_files = cmake/ClipMode.cmake cmake/FindFLAC.cmake \
cmake/TestLargeFiles.cmake cmake/LibSndFileConfig.cmake.in \ cmake/TestLargeFiles.cmake cmake/LibSndFileConfig.cmake.in \
cmake/TestInline.c.in cmake/TestInline.c.in
CLEANFILES = *~
pkgconfig_DATA = sndfile.pc pkgconfig_DATA = sndfile.pc
m4datadir = $(datadir)/aclocal
#=============================================================================== #===============================================================================
test: check-recursive test: check
# Target to make autogenerated files. # Need this target to force building of test programs.
checkprograms : checkprograms: $(check_PROGRAMS)
$(MAKE) -C src libsndfile.la checkprograms
$(MAKE) -C tests checkprograms
testprogs : ########
$(MAKE) -C src testprogs # src/ #
$(MAKE) -C tests testprogs ########
SYMBOL_FILES = src/Symbols.gnu-binutils src/Symbols.darwin src/libsndfile-1.def src/Symbols.os2 src/Symbols.static
test-tarball : Scripts/build-test-tarball.mk EXTRA_DIST += src/sndfile.h.in src/config.h.in src/test_endswap.c src/test_endswap.tpl src/test_endswap.def \
$(MAKE) -C src all libsndfile.la checkprograms $(SYMBOL_FILES) src/create_symbols_file.py src/binheader_writef_check.py \
$(MAKE) -C tests all checkprograms src/GSM610/README src/GSM610/COPYRIGHT src/GSM610/ChangeLog \
$(MAKE) -f Scripts/build-test-tarball.mk src/G72x/README src/G72x/README.original src/G72x/ChangeLog \
src/make-static-lib-hidden-privates.sh \
src/config.h.cmake
if USE_WIN_VERSION_FILE
WIN_VERSION_FILE = src/version-metadata.rc
else
WIN_VERSION_FILE =
endif
#===============================================================================
lib_LTLIBRARIES = src/libsndfile.la
include_HEADERS = src/sndfile.hh
nodist_include_HEADERS = src/sndfile.h
src_libsndfile_la_CFLAGS = $(EXTERNAL_XIPH_CFLAGS)
# MinGW requires -no-undefined if a DLL is to be built.
src_libsndfile_la_LDFLAGS = -no-undefined -version-info $(SHARED_VERSION_INFO) $(SHLIB_VERSION_ARG)
src_libsndfile_la_SOURCES = src/sndfile.c src/aiff.c src/au.c src/avr.c src/caf.c src/dwd.c src/flac.c src/g72x.c src/htk.c src/ircam.c \
src/macos.c src/mat4.c src/mat5.c src/nist.c src/paf.c src/pvf.c src/raw.c src/rx2.c src/sd2.c \
src/sds.c src/svx.c src/txw.c src/voc.c src/wve.c src/w64.c src/wavlike.c src/wav.c src/xi.c src/mpc2k.c src/rf64.c \
src/ogg_vorbis.c src/ogg_speex.c src/ogg_pcm.c src/ogg_opus.c src/common.h src/sfconfig.h src/sfendian.h src/wavlike.h \
src/sf_unistd.h src/ogg.h src/chanmap.h
nodist_src_libsndfile_la_SOURCES = $(nodist_include_HEADERS)
src_libsndfile_la_LIBADD = src/GSM610/libgsm.la src/G72x/libg72x.la src/ALAC/libalac.la \
src/libcommon.la $(EXTERNAL_XIPH_LIBS) -lm
EXTRA_src_libsndfile_la_DEPENDENCIES = $(SYMBOL_FILES)
noinst_LTLIBRARIES = src/libcommon.la
src_libcommon_la_CFLAGS = $(EXTERNAL_XIPH_CFLAGS)
src_libcommon_la_SOURCES = src/common.c src/file_io.c src/command.c src/pcm.c src/ulaw.c src/alaw.c \
src/float32.c src/double64.c src/ima_adpcm.c src/ms_adpcm.c src/gsm610.c src/dwvw.c src/vox_adpcm.c \
src/interleave.c src/strings.c src/dither.c src/cart.c src/broadcast.c src/audio_detect.c \
src/ima_oki_adpcm.c src/ima_oki_adpcm.h src/alac.c src/chunk.c src/ogg.c src/chanmap.c \
src/windows.c src/id3.c $(WIN_VERSION_FILE)
check_PROGRAMS = src/test_main
src_test_main_SOURCES = src/test_main.c src/test_main.h src/test_conversions.c src/test_float.c src/test_endswap.c \
src/test_audio_detect.c src/test_log_printf.c src/test_file_io.c src/test_ima_oki_adpcm.c \
src/test_strncpy_crlf.c src/test_broadcast_var.c src/test_cart_var.c \
src/test_binheader_writef.c
src_test_main_LDADD = src/libcommon.la
##############
# src/GSM610 #
##############
noinst_LTLIBRARIES += src/GSM610/libgsm.la
src_GSM610_libgsm_la_SOURCES = src/GSM610/config.h src/GSM610/gsm.h src/GSM610/gsm610_priv.h \
src/GSM610/add.c src/GSM610/code.c src/GSM610/decode.c src/GSM610/gsm_create.c \
src/GSM610/gsm_decode.c src/GSM610/gsm_destroy.c src/GSM610/gsm_encode.c \
src/GSM610/gsm_option.c src/GSM610/long_term.c src/GSM610/lpc.c src/GSM610/preprocess.c \
src/GSM610/rpe.c src/GSM610/short_term.c src/GSM610/table.c
############
# src/G72x #
############
noinst_LTLIBRARIES += src/G72x/libg72x.la
src_G72x_libg72x_la_SOURCES = src/G72x/g72x.h src/G72x/g72x_priv.h \
src/G72x/g721.c src/G72x/g723_16.c src/G72x/g723_24.c src/G72x/g723_40.c src/G72x/g72x.c
check_PROGRAMS += src/G72x/g72x_test
src_G72x_g72x_test_SOURCES = src/G72x/g72x_test.c
src_G72x_g72x_test_LDADD = src/G72x/libg72x.la
############
# src/ALAC #
############
noinst_LTLIBRARIES += src/ALAC/libalac.la
src_ALAC_libalac_la_SOURCES = src/ALAC/ALACAudioTypes.h src/ALAC/ALACBitUtilities.h \
src/ALAC/EndianPortable.h src/ALAC/aglib.h src/ALAC/dplib.h src/ALAC/matrixlib.h \
src/ALAC/alac_codec.h src/ALAC/shift.h \
src/ALAC/ALACBitUtilities.c src/ALAC/ag_dec.c \
src/ALAC/ag_enc.c src/ALAC/dp_dec.c src/ALAC/dp_enc.c src/ALAC/matrix_dec.c \
src/ALAC/matrix_enc.c src/ALAC/alac_decoder.c src/ALAC/alac_encoder.c
#===============================================================================
# Generate an OS specific Symbols files. This is done when the author
# builds the distribution tarball. There should be not need for the
# end user to create these files.
src/Symbols.gnu-binutils: $(top_srcdir)/src/create_symbols_file.py
$(PYTHON) $< linux $(VERSION) > $@
src/Symbols.darwin: $(top_srcdir)/src/create_symbols_file.py
$(PYTHON) $< darwin $(VERSION) > $@
src/libsndfile-1.def: $(top_srcdir)/src/create_symbols_file.py
$(PYTHON) $< win32 $(VERSION) > $@
src/Symbols.os2: $(top_srcdir)/src/create_symbols_file.py
$(PYTHON) $< os2 $(VERSION) > $@
src/Symbols.static: $(top_srcdir)/src/create_symbols_file.py
$(PYTHON) $< static $(VERSION) > $@
#===============================================================================
# Building windows resource files (if needed).
.rc.lo:
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) $< -o $@
#===============================================================================
# Disable autoheader.
AUTOHEADER=echo
########
# doc/ #
########
if FULL_SUITE
dist_html_DATA = doc/index.html doc/libsndfile.jpg doc/libsndfile.css doc/print.css doc/api.html \
doc/command.html doc/bugs.html doc/sndfile_info.html doc/new_file_type.HOWTO \
doc/win32.html doc/FAQ.html doc/lists.html doc/embedded_files.html doc/octave.html \
doc/tutorial.html
endif
#############
# examples/ #
#############
check_PROGRAMS += examples/make_sine examples/sfprocess examples/list_formats examples/generate examples/sndfilehandle \
examples/sndfile-to-text examples/sndfile-loopify
examples_sndfile_to_text_SOURCES = examples/sndfile-to-text.c
examples_sndfile_to_text_LDADD = src/libsndfile.la
examples_sndfile_loopify_SOURCES = examples/sndfile-loopify.c
examples_sndfile_loopify_LDADD = src/libsndfile.la
examples_make_sine_SOURCES = examples/make_sine.c
examples_make_sine_LDADD = src/libsndfile.la
examples_sfprocess_SOURCES = examples/sfprocess.c
examples_sfprocess_LDADD = src/libsndfile.la
examples_list_formats_SOURCES = examples/list_formats.c
examples_list_formats_LDADD = src/libsndfile.la
examples_generate_SOURCES = examples/generate.c
examples_generate_LDADD = src/libsndfile.la
examples_sndfilehandle_SOURCES = examples/sndfilehandle.cc
examples_sndfilehandle_LDADD = src/libsndfile.la
##########
# tests/ #
##########
TESTS_ENVIRONMENT = $(SHELL) tests/test_wrapper.sh
if ENABLE_TEST_COVERAGE
CPP_TEST =
else
CPP_TEST = tests/cpp_test
endif
TESTS = tests/pedantic-header-test.sh
check_PROGRAMS += tests/sfversion tests/floating_point_test tests/write_read_test \
tests/lossy_comp_test tests/error_test tests/ulaw_test tests/alaw_test tests/dwvw_test \
tests/peak_chunk_test tests/command_test tests/stdio_test \
tests/pcm_test tests/headerless_test tests/pipe_test tests/header_test tests/misc_test \
tests/raw_test tests/string_test tests/multi_file_test tests/chunk_test \
tests/scale_clip_test tests/win32_test tests/aiff_rw_test tests/virtual_io_test \
tests/locale_test tests/win32_ordinal_test tests/ogg_test tests/compression_size_test \
tests/checksum_test tests/external_libs_test tests/rdwr_test tests/format_check_test $(CPP_TEST) \
tests/channel_test tests/long_read_write_test tests/stdin_test tests/stdout_test \
tests/dither_test tests/fix_this tests/largefile_test tests/benchmark
EXTRA_DIST += \
tests/write_read_test.c tests/write_read_test.tpl tests/write_read_test.def \
tests/pcm_test.c tests/pcm_test.tpl tests/pcm_test.def \
tests/header_test.c tests/header_test.tpl tests/header_test.def \
tests/utils.c tests/utils.tpl tests/utils.def \
tests/scale_clip_test.c tests/scale_clip_test.tpl tests/scale_clip_test.def \
tests/pipe_test.c tests/pipe_test.tpl tests/pipe_test.def \
tests/rdwr_test.c tests/rdwr_test.tpl tests/rdwr_test.def \
tests/floating_point_test.c tests/floating_point_test.tpl tests/floating_point_test.def \
tests/benchmark.c tests/benchmark.tpl tests/benchmark.def
# If we're cross compiling from Linux to Windows and running the test suite
# under Wine, we need a symbolic link to the generated libsndfile DLL.
if LINUX_MINGW_CROSS_TEST
$(check_PROGRAMS) : libsndfile-1.dll
libsndfile-1.dll :
$(LN_S) src/.libs/$@ $@
clean-local :
-rm -f libsndfile-1.dll
endif
#===============================================================================
tests_sfversion_SOURCES = tests/sfversion.c
tests_sfversion_LDADD = src/libsndfile.la
tests_write_read_test_SOURCES = tests/utils.c tests/generate.c tests/generate.h tests/write_read_test.c tests/utils.h
tests_write_read_test_LDADD = src/libsndfile.la
tests_lossy_comp_test_SOURCES = tests/utils.c tests/lossy_comp_test.c tests/utils.h
tests_lossy_comp_test_LDADD = src/libsndfile.la
tests_fix_this_SOURCES = tests/utils.c tests/fix_this.c tests/utils.h
tests_fix_this_LDADD = src/libsndfile.la
tests_error_test_SOURCES = tests/error_test.c tests/utils.c tests/utils.h
tests_error_test_LDADD = src/libsndfile.la
tests_ulaw_test_SOURCES = tests/utils.c tests/ulaw_test.c tests/utils.h
tests_ulaw_test_LDADD = src/libsndfile.la
tests_alaw_test_SOURCES = tests/utils.c tests/alaw_test.c tests/utils.h
tests_alaw_test_LDADD = src/libsndfile.la
tests_aiff_rw_test_SOURCES = tests/utils.c tests/aiff_rw_test.c tests/utils.h
tests_aiff_rw_test_LDADD = src/libsndfile.la
tests_command_test_SOURCES = tests/command_test.c tests/utils.c tests/utils.h
tests_command_test_LDADD = src/libsndfile.la
tests_locale_test_SOURCES = tests/locale_test.c tests/utils.c tests/utils.h
tests_locale_test_LDADD = src/libsndfile.la
tests_largefile_test_SOURCES = tests/largefile_test.c tests/utils.c tests/utils.h
tests_largefile_test_LDADD = src/libsndfile.la
tests_pcm_test_SOURCES = tests/pcm_test.c tests/utils.c tests/utils.h
tests_pcm_test_LDADD = src/libsndfile.la
tests_headerless_test_SOURCES = tests/utils.c tests/headerless_test.c tests/utils.h
tests_headerless_test_LDADD = src/libsndfile.la
tests_stdin_test_SOURCES = tests/stdin_test.c tests/utils.c tests/utils.h
tests_stdin_test_LDADD = src/libsndfile.la
tests_stdout_test_SOURCES = tests/stdout_test.c tests/utils.h
tests_stdout_test_LDADD = src/libsndfile.la
tests_stdio_test_SOURCES = tests/stdio_test.c tests/utils.c tests/utils.h
tests_stdio_test_LDADD = src/libsndfile.la
tests_pipe_test_SOURCES = tests/pipe_test.c tests/utils.c tests/utils.h
tests_pipe_test_LDADD = src/libsndfile.la
tests_benchmark_SOURCES = tests/benchmark.c tests/utils.h
tests_benchmark_LDADD = src/libsndfile.la
tests_header_test_SOURCES = tests/header_test.c tests/utils.c tests/utils.h
tests_header_test_LDADD = src/libsndfile.la
tests_misc_test_SOURCES = tests/misc_test.c tests/utils.c tests/utils.h
tests_misc_test_LDADD = src/libsndfile.la
tests_raw_test_SOURCES = tests/raw_test.c tests/utils.c tests/utils.h
tests_raw_test_LDADD = src/libsndfile.la
tests_string_test_SOURCES = tests/string_test.c tests/utils.c tests/utils.h
tests_string_test_LDADD = src/libsndfile.la
tests_dither_test_SOURCES = tests/dither_test.c tests/utils.c tests/utils.h
tests_dither_test_LDADD = src/libsndfile.la
tests_chunk_test_SOURCES = tests/chunk_test.c tests/utils.c tests/utils.h
tests_chunk_test_LDADD = src/libsndfile.la
tests_multi_file_test_SOURCES = tests/multi_file_test.c tests/utils.c tests/utils.h
tests_multi_file_test_LDADD = src/libsndfile.la
tests_virtual_io_test_SOURCES = tests/virtual_io_test.c tests/utils.c tests/utils.h
tests_virtual_io_test_LDADD = src/libsndfile.la
tests_ogg_test_SOURCES = tests/ogg_test.c tests/utils.c tests/utils.h
tests_ogg_test_LDADD = src/libsndfile.la
tests_compression_size_test_SOURCES = tests/compression_size_test.c tests/utils.c tests/utils.h tests/dft_cmp.h
tests_compression_size_test_LDADD = src/libsndfile.la
tests_rdwr_test_SOURCES = tests/rdwr_test.c tests/utils.c tests/utils.h
tests_rdwr_test_LDADD = src/libsndfile.la
tests_win32_test_SOURCES = tests/win32_test.c
# Link lib here so that generating the testsuite tarball works correctly.
tests_win32_test_LDADD = src/libsndfile.la
tests_win32_ordinal_test_SOURCES = tests/win32_ordinal_test.c tests/utils.c tests/utils.h
tests_win32_ordinal_test_LDADD = src/libsndfile.la
tests_external_libs_test_SOURCES = tests/external_libs_test.c tests/utils.c tests/utils.h
tests_external_libs_test_LDADD = src/libsndfile.la
tests_format_check_test_SOURCES = tests/format_check_test.c tests/utils.c tests/utils.h
tests_format_check_test_LDADD = src/libsndfile.la
tests_channel_test_SOURCES = tests/channel_test.c tests/utils.c tests/utils.h
tests_channel_test_LDADD = src/libsndfile.la
tests_long_read_write_test_SOURCES = tests/long_read_write_test.c tests/utils.c tests/utils.h tests/dft_cmp.h
tests_long_read_write_test_LDADD = src/libsndfile.la
tests_cpp_test_SOURCES = tests/cpp_test.cc tests/utils.c tests/utils.h
tests_cpp_test_LDADD = src/libsndfile.la
tests_checksum_test_SOURCES = tests/checksum_test.c tests/utils.c tests/utils.h
tests_checksum_test_LDADD = src/libsndfile.la
# Lite remove start
tests_dwvw_test_SOURCES = tests/dwvw_test.c tests/utils.c tests/utils.h
tests_dwvw_test_LDADD = src/libsndfile.la
tests_floating_point_test_SOURCES = tests/utils.c tests/utils.h tests/dft_cmp.c tests/dft_cmp.h tests/floating_point_test.c
tests_floating_point_test_LDADD = src/libsndfile.la
tests_peak_chunk_test_SOURCES = tests/peak_chunk_test.c tests/utils.c tests/utils.h
tests_peak_chunk_test_LDADD = src/libsndfile.la
tests_scale_clip_test_SOURCES = tests/scale_clip_test.c tests/utils.c tests/utils.h
tests_scale_clip_test_LDADD = src/libsndfile.la
# Lite remove end
#===============================================================================
# Autogen generated sources.
# These GNU style rules actually work. The old style suffix rules do not.
%.c : %.def %.tpl
cd $(@D) && autogen --writable $(<F)
# recommended Automake way for multi-output targets:
# https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
%.h : %.c
@if test -f $@; then :; else \
rm -f $<; \
$(MAKE) $(AM_MAKEFLAGS) $<; \
fi
########
# man/ #
########
if FULL_SUITE
dist_man_MANS = man/sndfile-info.1 man/sndfile-play.1 man/sndfile-convert.1 man/sndfile-cmp.1 \
man/sndfile-metadata-get.1 man/sndfile-metadata-set.1 man/sndfile-concat.1 \
man/sndfile-interleave.1 man/sndfile-deinterleave.1 man/sndfile-salvage.1
# Same manpage for both programs.
man/sndfile-metadata-set.1: man/sndfile-metadata-get.1
-rm -f $@
cd $(@D) && $(LN_S) $(<F) $(@F)
man/sndfile-deinterleave.1: man/sndfile-interleave.1
-rm -f $@
cd $(@D) && $(LN_S) $(<F) $(@F)
#############
# programs/ #
#############
bin_PROGRAMS = programs/sndfile-info programs/sndfile-play programs/sndfile-convert programs/sndfile-cmp \
programs/sndfile-metadata-set programs/sndfile-metadata-get programs/sndfile-interleave \
programs/sndfile-deinterleave programs/sndfile-concat programs/sndfile-salvage
endif
# This is the BeOS version of sndfile-play. It needs to be compiled with the C++
# compiler.
EXTRA_DIST += programs/sndfile-play-beos.cpp programs/test-sndfile-metadata-set.py
programs_sndfile_info_SOURCES = programs/sndfile-info.c programs/common.c programs/common.h
programs_sndfile_info_LDADD = src/libsndfile.la
programs_sndfile_play_SOURCES = programs/sndfile-play.c programs/common.c programs/common.h
programs_sndfile_play_LDADD = src/libsndfile.la $(OS_SPECIFIC_LINKS) $(ALSA_LIBS) $(SNDIO_LIBS)
programs_sndfile_convert_SOURCES = programs/sndfile-convert.c programs/common.c programs/common.h
programs_sndfile_convert_LDADD = src/libsndfile.la
programs_sndfile_cmp_SOURCES = programs/sndfile-cmp.c programs/common.c programs/common.h
programs_sndfile_cmp_LDADD = src/libsndfile.la
programs_sndfile_metadata_set_SOURCES = programs/sndfile-metadata-set.c programs/common.c programs/common.h
programs_sndfile_metadata_set_LDADD = src/libsndfile.la
programs_sndfile_metadata_get_SOURCES = programs/sndfile-metadata-get.c programs/common.c programs/common.h
programs_sndfile_metadata_get_LDADD = src/libsndfile.la
programs_sndfile_interleave_SOURCES = programs/sndfile-interleave.c programs/common.c programs/common.h
programs_sndfile_interleave_LDADD = src/libsndfile.la
programs_sndfile_deinterleave_SOURCES = programs/sndfile-deinterleave.c programs/common.c programs/common.h
programs_sndfile_deinterleave_LDADD = src/libsndfile.la
programs_sndfile_concat_SOURCES = programs/sndfile-concat.c programs/common.c programs/common.h
programs_sndfile_concat_LDADD = src/libsndfile.la
programs_sndfile_salvage_SOURCES = programs/sndfile-salvage.c programs/common.c programs/common.h
programs_sndfile_salvage_LDADD = src/libsndfile.la
############
# regtest/ #
############
if HAVE_SQLITE3
check_PROGRAMS += regtest/sndfile-regtest
endif
regtest_sndfile_regtest_SOURCES = regtest/regtest.h regtest/sndfile-regtest.c regtest/database.c regtest/checksum.c
regtest_sndfile_CPPFLAGS = -I$(top_srcdir)/src $(SQLITE3_CFLAGS) $(OS_SPECIFIC_CFLAGS)
regtest_sndfile_regtest_LDADD = src/libsndfile.la $(SQLITE3_LIBS)

View File

@ -1,4 +0,0 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = README-precompiled-dll.txt testprog.c

View File

@ -4,8 +4,6 @@
package="libsndfile" package="libsndfile"
ACLOCAL_FLAGS="-I M4"
olddir=`pwd` olddir=`pwd`
srcdir=`dirname $0` srcdir=`dirname $0`
test -z "$srcdir" && srcdir=. test -z "$srcdir" && srcdir=.
@ -146,11 +144,6 @@ if test "$DIE" -eq 1; then
exit 1 exit 1
fi fi
if test ! -d Cfg ; then
echo "Creating 'Cfg' directory."
mkdir Cfg
fi
echo "Generating configuration files for $package, please wait ... " echo "Generating configuration files for $package, please wait ... "
echo " $ACLOCAL $ACLOCAL_FLAGS" echo " $ACLOCAL $ACLOCAL_FLAGS"

View File

@ -1,7 +1,7 @@
# Copyright (C) 1999-2017 Erik de Castro Lopo <erikd@mega-nerd.com>. dnl Copyright (C) 1999-2017 Erik de Castro Lopo <erikd@mega-nerd.com>.
dnl Require autoconf version dnl Require autoconf version >= 2.69
AC_PREREQ(2.57) AC_PREREQ([2.69])
AC_INIT([libsndfile],[1.0.29pre1],[sndfile@mega-nerd.com], AC_INIT([libsndfile],[1.0.29pre1],[sndfile@mega-nerd.com],
[libsndfile],[http://www.mega-nerd.com/libsndfile/]) [libsndfile],[http://www.mega-nerd.com/libsndfile/])
@ -21,19 +21,27 @@ AS_IF([test "x${CFLAGS+set}" = "xset" || test "x${CXXFLAGS+set}" = "xset" || tes
]) ])
AC_MSG_RESULT([${enable_flags_setting}]) AC_MSG_RESULT([${enable_flags_setting}])
# Put config stuff in Cfg. dnl Put config stuff in 'build-aux'.
AC_CONFIG_AUX_DIR(Cfg) AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([M4])
AC_CONFIG_SRCDIR([src/sndfile.c]) AC_CONFIG_SRCDIR([src/sndfile.c])
AC_CANONICAL_TARGET([]) AC_CANONICAL_HOST
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_HEADERS([src/config.h])
AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip subdir-objects]) AM_INIT_AUTOMAKE([1.14 foreign dist-bzip2 no-dist-gzip serial-tests subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AM_SILENT_RULES([yes])
dnl ====================================================================================
AC_PROG_CC
AC_PROG_CC_C99 AC_PROG_CC_C99
AS_IF([test "x$ac_cv_prog_cc_c99" = "xno"], [
AC_MSG_ERROR([libsndfile requires a C99 capable compiler!])
])
AC_USE_SYSTEM_EXTENSIONS AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CXX AC_PROG_CXX
@ -47,7 +55,7 @@ AX_COMPILER_VERSION
AC_LANG_POP([C++]) AC_LANG_POP([C++])
AC_PROG_SED AC_PROG_SED
m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AM_PROG_AR
LT_INIT([win32-dll]) LT_INIT([win32-dll])
LT_PROG_RC LT_PROG_RC
@ -57,25 +65,25 @@ AC_PROG_LN_S
AM_PATH_PYTHON AM_PATH_PYTHON
AC_CHECK_PROG(HAVE_AUTOGEN, autogen, yes, no) AC_CHECK_PROG([HAVE_AUTOGEN], [autogen], [yes], [no])
AC_CHECK_PROG(HAVE_WINE, wine, yes, no) AC_CHECK_PROG([HAVE_WINE], [wine], [yes], [no])
AC_CHECK_PROG(HAVE_XCODE_SELECT, xcode-select, yes, no) AC_CHECK_PROG([HAVE_XCODE_SELECT], [xcode-select], [yes], [no])
#------------------------------------------------------------------------------------ dnl ------------------------------------------------------------------------------------
# Rules for library version information: dnl Rules for library version information:
# dnl
# 1. Start with version information of `0:0:0' for each libtool library. dnl 1. Start with version information of `0:0:0' for each libtool library.
# 2. Update the version information only immediately before a public release of dnl 2. Update the version information only immediately before a public release of
# your software. More frequent updates are unnecessary, and only guarantee dnl your software. More frequent updates are unnecessary, and only guarantee
# that the current interface number gets larger faster. dnl that the current interface number gets larger faster.
# 3. If the library source code has changed at all since the last update, then dnl 3. If the library source code has changed at all since the last update, then
# increment revision (`c:r:a' becomes `c:r+1:a'). dnl increment revision (`c:r:a' becomes `c:r+1:a').
# 4. If any interfaces have been added, removed, or changed since the last update, dnl 4. If any interfaces have been added, removed, or changed since the last update,
# increment current, and set revision to 0. dnl increment current, and set revision to 0.
# 5. If any interfaces have been added since the last public release, then increment dnl 5. If any interfaces have been added since the last public release, then increment
# age. dnl age.
# 6. If any interfaces have been removed since the last public release, then set age dnl 6. If any interfaces have been removed since the last public release, then set age
# to 0. dnl to 0.
CLEAN_VERSION=`echo $PACKAGE_VERSION | $SED "s/p.*//"` CLEAN_VERSION=`echo $PACKAGE_VERSION | $SED "s/p.*//"`
VERSION_MAJOR=`echo $PACKAGE_VERSION | $SED "s/\..*//"` VERSION_MAJOR=`echo $PACKAGE_VERSION | $SED "s/\..*//"`
@ -84,18 +92,18 @@ GEN_TOOL="autoconf"
SHARED_VERSION_INFO="$VERSION_MAJOR:$VERSION_MINOR:0" SHARED_VERSION_INFO="$VERSION_MAJOR:$VERSION_MINOR:0"
#------------------------------------------------------------------------------------ dnl ------------------------------------------------------------------------------------
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(endian.h) AC_CHECK_HEADERS([endian.h])
AC_CHECK_HEADERS(byteswap.h) AC_CHECK_HEADERS([byteswap.h])
AC_CHECK_HEADERS(locale.h) AC_CHECK_HEADERS([locale.h])
AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS([sys/time.h])
AC_HEADER_SYS_WAIT AC_HEADER_SYS_WAIT
AC_CHECK_DECLS(S_IRGRP) AC_CHECK_DECLS([S_IRGRP])
AS_IF([test "x$ac_cv_have_decl_S_IRGRP" = "xyes"], [ AS_IF([test "x$ac_cv_have_decl_S_IRGRP" = "xyes"], [
AC_DEFINE_UNQUOTED([HAVE_DECL_S_IRGRP], [1], [Set to 1 if S_IRGRP is defined.]) AC_DEFINE_UNQUOTED([HAVE_DECL_S_IRGRP], [1], [Set to 1 if S_IRGRP is defined.])
], [ ], [
@ -103,15 +111,15 @@ AS_IF([test "x$ac_cv_have_decl_S_IRGRP" = "xyes"], [
]) ])
AM_CONDITIONAL([LINUX_MINGW_CROSS_TEST], AM_CONDITIONAL([LINUX_MINGW_CROSS_TEST],
[test "$build_os:$target_os:$host_os:$HAVE_WINE" = "linux-gnu:mingw32msvc:mingw32msvc:yes"]) [test "x${build_os}:${host_os}:${HAVE_WINE}" = "xlinux-gnu:mingw32msvc:yes"])
#==================================================================================== dnl ====================================================================================
# Couple of initializations here. Fill in real values later. dnl Couple of initializations here. Fill in real values later.
SHLIB_VERSION_ARG="" SHLIB_VERSION_ARG=""
#==================================================================================== dnl ====================================================================================
# Finished checking, handle options. dnl Finished checking, handle options.
AC_ARG_ENABLE(experimental, AC_ARG_ENABLE(experimental,
AS_HELP_STRING([--enable-experimental], [enable experimental code])) AS_HELP_STRING([--enable-experimental], [enable experimental code]))
@ -123,60 +131,60 @@ AS_IF([test "x$enable_experimental" = "xyes"], [
]) ])
AC_DEFINE_UNQUOTED([ENABLE_EXPERIMENTAL_CODE], [${EXPERIMENTAL_CODE}], [Set to 1 to enable experimental code.]) AC_DEFINE_UNQUOTED([ENABLE_EXPERIMENTAL_CODE], [${EXPERIMENTAL_CODE}], [Set to 1 to enable experimental code.])
AC_ARG_ENABLE(werror, AC_ARG_ENABLE([werror],
AS_HELP_STRING([--enable-werror], [enable -Werror in all Makefiles])) [AS_HELP_STRING([--enable-werror], [enable -Werror in all Makefiles])])
AC_ARG_ENABLE(stack-smash-protection, AC_ARG_ENABLE([stack-smash-protection],
AS_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection])) [AS_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection])])
AC_ARG_ENABLE(cpu-clip, AC_ARG_ENABLE([cpu-clip],
AS_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper])) [AS_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper])])
AC_ARG_ENABLE(bow-docs, AC_ARG_ENABLE([bow-docs],
AS_HELP_STRING([--enable-bow-docs], [enable black-on-white html docs])) [AS_HELP_STRING([--enable-bow-docs], [enable black-on-white html docs])])
AC_ARG_ENABLE(sqlite, AC_ARG_ENABLE([sqlite],
AS_HELP_STRING([--disable-sqlite], [disable use of sqlite])) [AS_HELP_STRING([--disable-sqlite], [disable use of sqlite])])
AC_ARG_ENABLE(alsa, AC_ARG_ENABLE([alsa],
AS_HELP_STRING([--disable-alsa], [disable use of ALSA])) [AS_HELP_STRING([--disable-alsa], [disable ALSA support (default=autodetect)])], [], [enable_alsa=auto])
AC_ARG_ENABLE(external-libs, AC_ARG_ENABLE([external-libs],
AS_HELP_STRING([--disable-external-libs], [disable use of FLAC, Ogg and Vorbis [[default=no]]])) [AS_HELP_STRING([--disable-external-libs], [disable use of FLAC, Ogg and Vorbis [[default=no]]])])
AC_ARG_ENABLE(octave, AC_ARG_ENABLE(octave,
AS_HELP_STRING([--enable-octave], [disable building of GNU Octave module])) [AS_HELP_STRING([--enable-octave], [disable building of GNU Octave module])])
AC_ARG_ENABLE([full-suite], AC_ARG_ENABLE([full-suite],
AS_HELP_STRING([--disable-full-suite], [disable building and installing programs, documentation, only build library [[default=no]]])) [AS_HELP_STRING([--disable-full-suite], [disable building and installing programs, documentation, only build library [[default=no]]])])
AM_CONDITIONAL([FULL_SUITE], [test "x$enable_full_suite" != "xno"]) AM_CONDITIONAL([FULL_SUITE], [test "x$enable_full_suite" != "xno"])
AC_ARG_ENABLE(test-coverage, AC_ARG_ENABLE([test-coverage],
AS_HELP_STRING([--enable-test-coverage], [enable test coverage])) [AS_HELP_STRING([--enable-test-coverage], [enable test coverage])])
AM_CONDITIONAL([ENABLE_TEST_COVERAGE], [test "$enable_test_coverage" = yes]) AM_CONDITIONAL([ENABLE_TEST_COVERAGE], [test "x$enable_test_coverage" = "xyes"])
#==================================================================================== dnl ====================================================================================
# Check types and their sizes. dnl Check types and their sizes.
AC_CHECK_SIZEOF(wchar_t,4) AC_CHECK_SIZEOF([wchar_t], [4])
AC_CHECK_SIZEOF(short,2) AC_CHECK_SIZEOF([short], [2])
AC_CHECK_SIZEOF(int,4) AC_CHECK_SIZEOF([int], [4])
AC_CHECK_SIZEOF(long,4) AC_CHECK_SIZEOF([long], [4])
AC_CHECK_SIZEOF(float,4) AC_CHECK_SIZEOF([float], [4])
AC_CHECK_SIZEOF(double,4) AC_CHECK_SIZEOF([double], [4])
AC_CHECK_SIZEOF(void*,8) AC_CHECK_SIZEOF([void*], [8])
AC_CHECK_SIZEOF(size_t,4) AC_CHECK_SIZEOF([size_t], [4])
AC_CHECK_SIZEOF(int64_t,8) AC_CHECK_SIZEOF([int64_t], [8])
AC_CHECK_SIZEOF(long long,8) AC_CHECK_SIZEOF([long long], [8])
#==================================================================================== dnl ====================================================================================
# Find an appropriate type for sf_count_t. dnl Find an appropriate type for sf_count_t.
# On systems supporting files larger than 2 Gig, sf_count_t must be a 64 bit value. dnl On systems supporting files larger than 2 Gig, sf_count_t must be a 64 bit value.
# Unfortunately there is more than one way of ensuring this so need to do some dnl Unfortunately there is more than one way of ensuring this so need to do some
# pretty rigourous testing here. dnl pretty rigourous testing here.
# Check for common 64 bit file offset types. dnl Check for common 64 bit file offset types.
AC_CHECK_SIZEOF(off_t,1) AC_CHECK_SIZEOF([off_t], [1])
AS_IF([test "x$enable_largefile:$ac_cv_sizeof_off_t" = "xno:8"], [ AS_IF([test "x$enable_largefile:$ac_cv_sizeof_off_t" = "xno:8"], [
AC_MSG_ERROR(["Error : Cannot disable large file support because sizeof (off_t) == 8."]) AC_MSG_ERROR(["Error : Cannot disable large file support because sizeof (off_t) == 8."])
@ -199,13 +207,13 @@ AS_CASE([$host_os],
[ [
SIZEOF_SF_COUNT_T=0 SIZEOF_SF_COUNT_T=0
AS_IF([test "x$ac_cv_sizeof_off_t" = "x8"], [ AS_IF([test "x$ac_cv_sizeof_off_t" = "x8"], [
# If sizeof (off_t) is 8, no further checking is needed. dnl If sizeof (off_t) is 8, no further checking is needed.
TYPEOF_SF_COUNT_T="int64_t" TYPEOF_SF_COUNT_T="int64_t"
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL" SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
SIZEOF_SF_COUNT_T=8 SIZEOF_SF_COUNT_T=8
], [ ], [
# Save the old sizeof (off_t) value and then unset it to see if it dnl Save the old sizeof (off_t) value and then unset it to see if it
# changes when Large File Support is enabled. dnl changes when Large File Support is enabled.
pre_largefile_sizeof_off_t=$ac_cv_sizeof_off_t pre_largefile_sizeof_off_t=$ac_cv_sizeof_off_t
unset ac_cv_sizeof_off_t unset ac_cv_sizeof_off_t
@ -253,38 +261,41 @@ AC_SUBST(SF_COUNT_MAX)
AC_TYPE_SSIZE_T AC_TYPE_SSIZE_T
#==================================================================================== dnl ====================================================================================
# Determine endian-ness of target processor. dnl Determine endian-ness of host processor.
MN_C_FIND_ENDIAN AC_C_BIGENDIAN([
dnl big-endian
ac_cv_c_big_endian=1
ac_cv_c_little_endian=0
], [
dnl little-endian
ac_cv_c_big_endian=0
ac_cv_c_little_endian=1
])
AC_DEFINE_UNQUOTED([CPU_IS_BIG_ENDIAN], [${ac_cv_c_big_endian}], AC_DEFINE_UNQUOTED([CPU_IS_BIG_ENDIAN], [${ac_cv_c_big_endian}], [Host processor is big endian.])
[Target processor is big endian.]) AC_DEFINE_UNQUOTED([CPU_IS_LITTLE_ENDIAN], [${ac_cv_c_little_endian}], [Host processor is little endian.])
AC_DEFINE_UNQUOTED([CPU_IS_LITTLE_ENDIAN], [${ac_cv_c_little_endian}],
[Target processor is little endian.])
AC_DEFINE_UNQUOTED([WORDS_BIGENDIAN], [${ac_cv_c_big_endian}],
[Target processor is big endian.])
#==================================================================================== dnl ====================================================================================
# Check for functions. dnl Check for functions.
AC_CHECK_FUNCS(malloc calloc realloc free) AC_CHECK_FUNCS([malloc calloc realloc free])
AC_CHECK_FUNCS(open read write lseek lseek64) AC_CHECK_FUNCS([open read write lseek lseek64])
AC_CHECK_FUNCS(fstat fstat64 ftruncate fsync) AC_CHECK_FUNCS([fstat fstat64 ftruncate fsync])
AC_CHECK_FUNCS(snprintf vsnprintf) AC_CHECK_FUNCS([snprintf vsnprintf])
AC_CHECK_FUNCS(gmtime gmtime_r localtime localtime_r gettimeofday) AC_CHECK_FUNCS([gmtime gmtime_r localtime localtime_r gettimeofday])
AC_CHECK_FUNCS(mmap getpagesize) AC_CHECK_FUNCS([mmap getpagesize])
AC_CHECK_FUNCS(setlocale) AC_CHECK_FUNCS([setlocale])
AC_CHECK_FUNCS(pipe waitpid) AC_CHECK_FUNCS([pipe waitpid])
AC_CHECK_LIB([m],floor) AC_SEARCH_LIBS([floor], [m], [], [
AC_CHECK_FUNCS(floor ceil fmod lround) AC_MSG_ERROR([unable to find the floor() function!])
])
AC_CHECK_FUNCS([floor ceil fmod lrint lrintf])
MN_C99_FUNC_LRINT dnl ====================================================================================
MN_C99_FUNC_LRINTF dnl Check for requirements for building plugins for other languages/enviroments.
#====================================================================================
# Check for requirements for building plugins for other languages/enviroments.
dnl Octave maths environment http://www.octave.org/ dnl Octave maths environment http://www.octave.org/
AS_IF([test "x$cross_compiling" = "xno"], [ AS_IF([test "x$cross_compiling" = "xno"], [
@ -297,16 +308,17 @@ AS_IF([test "x$cross_compiling" = "xno"], [
AM_CONDITIONAL(BUILD_OCTAVE_MOD, false) AM_CONDITIONAL(BUILD_OCTAVE_MOD, false)
]) ])
#==================================================================================== dnl ====================================================================================
# Check for Ogg, Vorbis and FLAC. dnl Check for Ogg, Vorbis and FLAC.
HAVE_EXTERNAL_XIPH_LIBS=0 HAVE_EXTERNAL_XIPH_LIBS=0
EXTERNAL_XIPH_CFLAGS="" EXTERNAL_XIPH_CFLAGS=""
EXTERNAL_XIPH_LIBS="" EXTERNAL_XIPH_LIBS=""
# Check for pkg-config outside the if statement. dnl Check for pkg-config outside the if statement.
PKG_PROG_PKG_CONFIG PKG_PROG_PKG_CONFIG
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig)) AX_REQUIRE_DEFINED([PKG_INSTALLDIR])
PKG_INSTALLDIR
AS_IF([test -n "$PKG_CONFIG"], [ AS_IF([test -n "$PKG_CONFIG"], [
AS_IF([test "x$enable_external_libs" = "xno"], [ AS_IF([test "x$enable_external_libs" = "xno"], [
@ -314,7 +326,7 @@ AS_IF([test -n "$PKG_CONFIG"], [
], [ ], [
PKG_CHECK_MOD_VERSION(FLAC, flac >= 1.3.1, ac_cv_flac=yes, ac_cv_flac=no) PKG_CHECK_MOD_VERSION(FLAC, flac >= 1.3.1, ac_cv_flac=yes, ac_cv_flac=no)
# Make sure the FLAC_CFLAGS value is sane. dnl Make sure the FLAC_CFLAGS value is sane.
FLAC_CFLAGS=`echo $FLAC_CFLAGS | $SED "s|include/FLAC|include|"` FLAC_CFLAGS=`echo $FLAC_CFLAGS | $SED "s|include/FLAC|include|"`
PKG_CHECK_MOD_VERSION(OGG, ogg >= 1.1.3, ac_cv_ogg=yes, ac_cv_ogg=no) PKG_CHECK_MOD_VERSION(OGG, ogg >= 1.1.3, ac_cv_ogg=yes, ac_cv_ogg=no)
@ -326,9 +338,9 @@ AS_IF([test -n "$PKG_CONFIG"], [
SPEEX_LIBS="" SPEEX_LIBS=""
]) ])
# Vorbis versions earlier than 1.2.3 have bugs that cause the libsndfile dnl Vorbis versions earlier than 1.2.3 have bugs that cause the libsndfile
# test suite to fail on MIPS, PowerPC and others. dnl test suite to fail on MIPS, PowerPC and others.
# See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549899 dnl See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549899
PKG_CHECK_MOD_VERSION(VORBIS, vorbis >= 1.2.3, ac_cv_vorbis=yes, ac_cv_vorbis=no) PKG_CHECK_MOD_VERSION(VORBIS, vorbis >= 1.2.3, ac_cv_vorbis=yes, ac_cv_vorbis=no)
PKG_CHECK_MOD_VERSION(VORBISENC, vorbisenc >= 1.2.3, ac_cv_vorbisenc=yes, ac_cv_vorbisenc=no) PKG_CHECK_MOD_VERSION(VORBISENC, vorbisenc >= 1.2.3, ac_cv_vorbisenc=yes, ac_cv_vorbisenc=no)
enable_external_libs=yes enable_external_libs=yes
@ -355,25 +367,19 @@ AS_IF([test -n "$PKG_CONFIG"], [
AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_XIPH_LIBS], [$HAVE_EXTERNAL_XIPH_LIBS], [Will be set to 1 if flac, ogg and vorbis are available.]) AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_XIPH_LIBS], [$HAVE_EXTERNAL_XIPH_LIBS], [Will be set to 1 if flac, ogg and vorbis are available.])
#==================================================================================== dnl ====================================================================================
# Check for libsqlite3 (only used in regtest). dnl Check for libsqlite3 (only used in regtest).
ac_cv_sqlite3=no ac_cv_sqlite3=0
AS_IF([test "x$enable_sqlite" != "xno"], [ AS_IF([test "x$enable_sqlite" != "xno"], [
PKG_CHECK_MOD_VERSION(SQLITE3, sqlite3 >= 3.2, ac_cv_sqlite3=yes, ac_cv_sqlite3=no) PKG_CHECK_MOD_VERSION([SQLITE3], [sqlite3 >= 3.2], [ac_cv_sqlite3=1], [ac_cv_sqlite3=0])
]) ])
AS_IF([test "x$ac_cv_sqlite3" = "xyes"], [ AC_DEFINE_UNQUOTED([HAVE_SQLITE3], [${ac_cv_sqlite3}], [Set to 1 if you have libsqlite3.])
HAVE_SQLITE3=1 AM_CONDITIONAL([HAVE_SQLITE3], [test "x$ac_cv_sqlite3" = "x1"])
], [
HAVE_SQLITE3=0
])
AC_DEFINE_UNQUOTED([HAVE_SQLITE3], [$HAVE_SQLITE3], [Set to 1 if you have libsqlite3.]) dnl ====================================================================================
AM_CONDITIONAL([HAVE_SQLITE3], [test "x$ac_cv_sqlite3" = "xyes"]) dnl Determine if the processor can do clipping on float to int conversions.
#====================================================================================
# Determine if the processor can do clipping on float to int conversions.
AS_IF([test "x$enable_cpu_clip" != "xno"], [ AS_IF([test "x$enable_cpu_clip" != "xno"], [
MN_C_CLIP_MODE MN_C_CLIP_MODE
@ -384,12 +390,12 @@ AS_IF([test "x$enable_cpu_clip" != "xno"], [
]) ])
AC_DEFINE_UNQUOTED([CPU_CLIPS_POSITIVE], [${ac_cv_c_clip_positive}], AC_DEFINE_UNQUOTED([CPU_CLIPS_POSITIVE], [${ac_cv_c_clip_positive}],
[Target processor clips on positive float to int conversion.]) [Host processor clips on positive float to int conversion.])
AC_DEFINE_UNQUOTED([CPU_CLIPS_NEGATIVE], [${ac_cv_c_clip_negative}], AC_DEFINE_UNQUOTED([CPU_CLIPS_NEGATIVE], [${ac_cv_c_clip_negative}],
[Target processor clips on negative float to int conversion.]) [Host processor clips on negative float to int conversion.])
#==================================================================================== dnl ====================================================================================
# Target OS specific stuff. dnl Host OS specific stuff.
OS_SPECIFIC_CFLAGS="" OS_SPECIFIC_CFLAGS=""
OS_SPECIFIC_LINKS="" OS_SPECIFIC_LINKS=""
@ -417,21 +423,50 @@ AC_DEFINE_UNQUOTED([OS_IS_OPENBSD], [${os_is_openbsd}], [Set to 1 if compiling f
AC_DEFINE_UNQUOTED([USE_WINDOWS_API], [${use_windows_api}], [Set to 1 to use the native windows API]) AC_DEFINE_UNQUOTED([USE_WINDOWS_API], [${use_windows_api}], [Set to 1 to use the native windows API])
AM_CONDITIONAL(USE_WIN_VERSION_FILE, test ${use_windows_api} -eq 1) AM_CONDITIONAL(USE_WIN_VERSION_FILE, test ${use_windows_api} -eq 1)
#==================================================================================== dnl ====================================================================================
# Check for ALSA. dnl Check for ALSA.
ALSA_LIBS=""
AS_IF([test "x$enable_alsa" != "xno"], [ AS_IF([test "x$enable_alsa" != "xno"], [
AC_CHECK_HEADERS(alsa/asoundlib.h) PKG_CHECK_MODULES([ALSA], [alsa], [
AS_IF([test "x$ac_cv_header_alsa_asoundlib_h" = "xyes"], [ dnl actually test whether ALSA really works, in
ALSA_LIBS="-lasound" dnl order to dodge wrong cross-compilation pickups
enable_alsa=yes save_CFLAGS="${CFLAGS}"
save_LIBS="${LIBS}"
CFLAGS="${CFLAGS} ${ALSA_CFLAGS}"
LIBS="${LIBS} ${ALSA_LIBS}"
AC_CHECK_HEADERS([alsa/asoundlib.h])
AS_IF([test "x$ac_cv_header_alsa_asoundlib_h" = "xyes"], [
dnl ALSA definitely works
AC_DEFINE([HAVE_ALSA], [1], [Set to 1 if you have alsa])
alsa_works="yes"
], [
dnl picked up wrong ALSA
alsa_works="no"
dnl reset flags
ALSA_CFLAGS=""
ALSA_LIBS=""
])
CFLAGS="${save_CFLAGS}"
LIBS="${save_LIBS}"
], [
dnl could not find ALSA
alsa_works="no"
])
AS_IF([test "x$alsa_works" = "xno"], [
AS_IF([test "x$enable_alsa" = "xyes"], [
dnl explicitly passed --enable-alsa, hence error out loud and clearly
AC_MSG_ERROR([You explicitly requested alsa support, but alsa could not be found!])
], [
dnl did not explicitly pass --enable-alsa, relying on default automagic on
enable_alsa="no (auto)"
])
]) ])
]) ])
#==================================================================================== dnl ====================================================================================
# Check for OpenBSD's sndio. dnl Check for OpenBSD's sndio.
SNDIO_LIBS="" SNDIO_LIBS=""
HAVE_SNDIO_H=0 HAVE_SNDIO_H=0
@ -446,8 +481,8 @@ AS_CASE([$host_os],
AC_DEFINE_UNQUOTED([HAVE_SNDIO_H], [${HAVE_SNDIO_H}], [Set to 1 if <sndio.h> is available.]) AC_DEFINE_UNQUOTED([HAVE_SNDIO_H], [${HAVE_SNDIO_H}], [Set to 1 if <sndio.h> is available.])
#==================================================================================== dnl ====================================================================================
# Test for sanity when cross-compiling. dnl Test for sanity when cross-compiling.
AS_IF([test "x$ac_cv_sizeof_short" != "x2"], [ AS_IF([test "x$ac_cv_sizeof_short" != "x2"], [
AC_MSG_WARN([[******************************************************************]]) AC_MSG_WARN([[******************************************************************]])
@ -478,8 +513,8 @@ AS_IF([test "x$ac_cv_prog_HAVE_AUTOGEN" = "xno"], [
touch tests/*.c tests/*.h touch tests/*.c tests/*.h
]) ])
#==================================================================================== dnl ====================================================================================
# Settings for the HTML documentation. dnl Settings for the HTML documentation.
AS_IF([test "x$enable_bow_docs" = "xyes"], [ AS_IF([test "x$enable_bow_docs" = "xyes"], [
HTML_BGCOLOUR="white" HTML_BGCOLOUR="white"
@ -489,8 +524,8 @@ AS_IF([test "x$enable_bow_docs" = "xyes"], [
HTML_FGCOLOUR="white" HTML_FGCOLOUR="white"
]) ])
#==================================================================================== dnl ====================================================================================
# Now use the information from the checking stage. dnl Now use the information from the checking stage.
win32_target_dll=0 win32_target_dll=0
COMPILER_IS_GCC=0 COMPILER_IS_GCC=0
@ -501,6 +536,14 @@ AS_IF([test "x$enable_flags_setting" = "xyes"], [
AC_LANG_PUSH([C++]) AC_LANG_PUSH([C++])
AX_APPEND_COMPILE_FLAGS([-O2 -pipe], [CXXFLAGS]) AX_APPEND_COMPILE_FLAGS([-O2 -pipe], [CXXFLAGS])
AC_LANG_POP([C++]) AC_LANG_POP([C++])
AS_CASE([${host_os}],
[darwin*], [
ldflags_test="-Wl,-dead_strip_dylibs"],
[linux*], [
ldflags_test="-Wl,-O1 -Wl,--as-needed -Wl,--no-undefined -Wl,--gc-sections"]
)
AX_APPEND_LINK_FLAGS([${ldflags_test}], [LDFLAGS])
]) ])
AS_IF([test "x$enable_werror" = "xyes"], [ AS_IF([test "x$enable_werror" = "xyes"], [
@ -533,24 +576,24 @@ dnl the console with messages of macro redefinitions.
AX_ADD_FORTIFY_SOURCE AX_ADD_FORTIFY_SOURCE
AS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [ AS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [
# OS specific tweaks. dnl OS specific tweaks.
AS_CASE([$host_os], AS_CASE([$host_os],
[darwin* | rhapsody*], [ [darwin* | rhapsody*], [
# Disable -Wall, -pedantic and -Wshadow for Apple Darwin/Rhapsody. dnl Disable -Wall, -pedantic and -Wshadow for Apple Darwin/Rhapsody.
# System headers on these systems are broken. dnl System headers on these systems are broken.
temp_CFLAGS=`echo $CFLAGS | $SED "s/-Wall -pedantic//" | $SED "s/-Wshadow//" | $SED "s/-Waggregate-return//"` temp_CFLAGS=`echo $CFLAGS | $SED "s/-Wall -pedantic//" | $SED "s/-Wshadow//" | $SED "s/-Waggregate-return//"`
CFLAGS=$temp_CFLAGS CFLAGS=$temp_CFLAGS
SHLIB_VERSION_ARG="-Wl,-exported_symbols_list -Wl,\$(srcdir)/Symbols.darwin"], SHLIB_VERSION_ARG="-Wl,-exported_symbols_list -Wl,\$(top_srcdir)/src/Symbols.darwin"],
[linux*|kfreebsd*-gnu*|gnu*], [ [linux*|kfreebsd*-gnu*|gnu*], [
SHLIB_VERSION_ARG="-Wl,--version-script=\$(srcdir)/Symbols.gnu-binutils"], SHLIB_VERSION_ARG="-Wl,--version-script=\$(top_srcdir)/src/Symbols.gnu-binutils"],
[mingw*], [ [mingw*], [
SHLIB_VERSION_ARG="-Wc,-static-libgcc -Wl,\$(srcdir)/libsndfile-1.def" SHLIB_VERSION_ARG="-Wc,-static-libgcc -Wl,\$(top_srcdir)/src/libsndfile-1.def"
win32_target_dll=1 win32_target_dll=1
AS_IF([test "x$enable_shared" = "xno"], [ AS_IF([test "x$enable_shared" = "xno"], [
win32_target_dll=0 win32_target_dll=0
])], ])],
[os2*], [ [os2*], [
SHLIB_VERSION_ARG="-Wl,-export-symbols \$(srcdir)/Symbols.os2" SHLIB_VERSION_ARG="-Wl,-export-symbols \$(top_srcdir)/src/Symbols.os2"
]) ])
COMPILER_IS_GCC=1 COMPILER_IS_GCC=1
@ -584,7 +627,7 @@ AS_IF([test "x$enable_static" = "xno"], [
TEST_BINDIR=tests/ TEST_BINDIR=tests/
]) ])
#------------------------------------------------------------------------------- dnl -------------------------------------------------------------------------------
AC_SUBST(HOST_TRIPLET) AC_SUBST(HOST_TRIPLET)
@ -602,7 +645,6 @@ AC_SUBST(WIN_RC_VERSION)
AC_SUBST(HAVE_EXTERNAL_XIPH_LIBS) AC_SUBST(HAVE_EXTERNAL_XIPH_LIBS)
AC_SUBST(OS_SPECIFIC_CFLAGS) AC_SUBST(OS_SPECIFIC_CFLAGS)
AC_SUBST(OS_SPECIFIC_LINKS) AC_SUBST(OS_SPECIFIC_LINKS)
AC_SUBST(ALSA_LIBS)
AC_SUBST(SNDIO_LIBS) AC_SUBST(SNDIO_LIBS)
AC_SUBST(EXTERNAL_XIPH_CFLAGS) AC_SUBST(EXTERNAL_XIPH_CFLAGS)
@ -610,23 +652,30 @@ AC_SUBST(EXTERNAL_XIPH_LIBS)
AC_SUBST(SRC_BINDIR) AC_SUBST(SRC_BINDIR)
AC_SUBST(TEST_BINDIR) AC_SUBST(TEST_BINDIR)
AC_CONFIG_FILES([ \ AC_CONFIG_FILES([
src/Makefile man/Makefile examples/Makefile tests/Makefile regtest/Makefile \ Makefile Octave/Makefile
doc/Makefile Win32/Makefile Octave/Makefile programs/Makefile \ src/version-metadata.rc src/sndfile.h src/libsndfile.def
Makefile \ tests/test_wrapper.sh tests/pedantic-header-test.sh
src/version-metadata.rc tests/test_wrapper.sh tests/pedantic-header-test.sh \ doc/libsndfile.css libsndfile.spec sndfile.pc
doc/libsndfile.css Scripts/build-test-tarball.mk libsndfile.spec sndfile.pc \
src/sndfile.h src/libsndfile.def
]) ])
AC_OUTPUT AC_OUTPUT
# Make sure these are executable. dnl ====================================================================================
chmod u+x tests/test_wrapper.sh Scripts/build-test-tarball.mk
#==================================================================================== AS_IF([test -z "$PKG_CONFIG"], [
AS_ECHO([" *****************************************************************"])
AS_ECHO([" *** The pkg-config program is missing. ***"])
AS_ECHO([" *** External FLAC/Ogg/Vorbis libs cannot be found without it. ***"])
AS_ECHO([" *** http://pkg-config.freedesktop.org/wiki/ ***"])
AS_ECHO([" *****************************************************************"])
])
AX_RECURSIVE_EVAL([$libdir], [full_absolute_libdir])
AX_RECURSIVE_EVAL([$bindir], [full_absolute_bindir])
AX_RECURSIVE_EVAL([$pkgconfigdir], [full_absolute_pkgconfigdir])
AX_RECURSIVE_EVAL([$htmldir], [full_absolute_htmldir])
AC_MSG_RESULT([ AC_MSG_RESULT([
-=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-=-
Configuration summary : Configuration summary :
@ -644,40 +693,26 @@ AC_MSG_RESULT([
Experimental code : ................... ${enable_experimental:-no} Experimental code : ................... ${enable_experimental:-no}
Using ALSA in example programs : ...... ${enable_alsa:-no} Using ALSA in example programs : ...... ${enable_alsa:-no}
External FLAC/Ogg/Vorbis : ............ ${enable_external_libs:-no} External FLAC/Ogg/Vorbis : ............ ${enable_external_libs:-no}
Tools :
C Compiler Vendor is : ................ ${ax_cv_c_compiler_vendor} (${ax_cv_c_compiler_version})
CXX Compiler Vendor is : .............. ${ax_cv_cxx_compiler_vendor} (${ax_cv_cxx_compiler_version})
Sanitizer enabled : ................... ${enable_sanitizer:-no}
Stack smash protection : .............. ${enable_stack_smash_protection:-no}
Installation directories :
Library directory : ................... ${full_absolute_libdir}
Program directory : ................... ${full_absolute_bindir}
Pkgconfig directory : ................. ${full_absolute_pkgconfigdir}
HTML docs directory : ................. ${full_absolute_htmldir}
Compiling some other packages against libsndfile may require
the addition of '$full_absolute_pkgconfigdir' to the
PKG_CONFIG_PATH environment variable.
]) ])
AS_IF([test -z "$PKG_CONFIG"], [ dnl Remove symlink created by Scripts/android-configure.sh.
AS_ECHO([" *****************************************************************"])
AS_ECHO([" *** The pkg-config program is missing. ***"])
AS_ECHO([" *** External FLAC/Ogg/Vorbis libs cannot be found without it. ***"])
AS_ECHO([" *** http://pkg-config.freedesktop.org/wiki/ ***"])
AS_ECHO([" *****************************************************************"])
])
AS_ECHO([" Tools :"])
AS_ECHO([""])
AS_ECHO([" C Compiler Vendor is : ................ ${ax_cv_c_compiler_vendor} (${ax_cv_c_compiler_version})"])
AS_ECHO([" CXX Compiler Vendor is : .............. ${ax_cv_cxx_compiler_vendor} (${ax_cv_cxx_compiler_version})"])
AS_ECHO([" Sanitizer enabled : ................... ${enable_sanitizer:-no}"])
AS_ECHO([" Stack smash protection : .............. ${enable_stack_smash_protection:-no}"])
AX_RECURSIVE_EVAL([$libdir], [full_absolute_libdir])
AX_RECURSIVE_EVAL([$bindir], [full_absolute_bindir])
AX_RECURSIVE_EVAL([$pkgconfigdir], [full_absolute_pkgconfigdir])
AX_RECURSIVE_EVAL([$htmldir], [full_absolute_htmldir])
AS_ECHO([""])
AS_ECHO([" Installation directories :"])
AS_ECHO([""])
AS_ECHO([" Library directory : ................... $full_absolute_libdir"])
AS_ECHO([" Program directory : ................... $full_absolute_bindir"])
AS_ECHO([" Pkgconfig directory : ................. $full_absolute_pkgconfigdir"])
AS_ECHO([" HTML docs directory : ................. $full_absolute_htmldir"])
AS_ECHO([""])
AS_ECHO(["Compiling some other packages against libsndfile may require"])
AS_ECHO(["the addition of '$full_absolute_pkgconfigdir' to the"])
AS_ECHO(["PKG_CONFIG_PATH environment variable."])
AS_ECHO([""])
# Remove symlink created by Scripts/android-configure.sh.
rm -f gdbclient rm -f gdbclient

View File

@ -1,9 +0,0 @@
## Process this file with automake to produce Makefile.in
html_DATA = index.html libsndfile.jpg libsndfile.css print.css api.html \
command.html bugs.html sndfile_info.html new_file_type.HOWTO \
win32.html FAQ.html lists.html embedded_files.html octave.html \
tutorial.html
EXTRA_DIST = $(html_DATA)

View File

@ -1,29 +0,0 @@
## Process this file with automake to produce Makefile.in
check_PROGRAMS = make_sine sfprocess list_formats generate sndfilehandle \
sndfile-to-text sndfile-loopify
AM_CPPFLAGS = -I$(top_srcdir)/src
sndfile_to_text_SOURCES = sndfile-to-text.c
sndfile_to_text_LDADD = $(top_builddir)/src/libsndfile.la
sndfile_loopify_SOURCES = sndfile-loopify.c
sndfile_loopify_LDADD = $(top_builddir)/src/libsndfile.la
make_sine_SOURCES = make_sine.c
make_sine_LDADD = $(top_builddir)/src/libsndfile.la
sfprocess_SOURCES = sfprocess.c
sfprocess_LDADD = $(top_builddir)/src/libsndfile.la
list_formats_SOURCES = list_formats.c
list_formats_LDADD = $(top_builddir)/src/libsndfile.la
generate_SOURCES = generate.c
generate_LDADD = $(top_builddir)/src/libsndfile.la
sndfilehandle_SOURCES = sndfilehandle.cc
sndfilehandle_LDADD = $(top_builddir)/src/libsndfile.la
CLEANFILES = *~ *.exe

View File

@ -0,0 +1,65 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# For every FLAG1, FLAG2 it is checked whether the linker works with the
# flag. If it does, the flag is added FLAGS-VARIABLE
#
# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is
# used. During the check the flag is always added to the linker's flags.
#
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
# when the check is done. The check is thus made with the flags: "LDFLAGS
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
# issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG.
# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS.
#
# LICENSE
#
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 6
AC_DEFUN([AX_APPEND_LINK_FLAGS],
[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
for flag in $1; do
AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4])
done
])dnl AX_APPEND_LINK_FLAGS

74
m4/ax_check_link_flag.m4 Normal file
View File

@ -0,0 +1,74 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the linker or gives an error.
# (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the linker's default flags
# when the check is done. The check is thus made with the flags: "LDFLAGS
# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
# issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_LINK_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 5
AC_DEFUN([AX_CHECK_LINK_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
ax_check_save_flags=$LDFLAGS
LDFLAGS="$LDFLAGS $4 $1"
AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
LDFLAGS=$ax_check_save_flags])
AS_VAR_IF(CACHEVAR,yes,
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_LINK_FLAGS

View File

@ -1,16 +0,0 @@
## Process this file with automake to produce Makefile.in
man_MANS = sndfile-info.1 sndfile-play.1 sndfile-convert.1 sndfile-cmp.1 \
sndfile-metadata-get.1 sndfile-metadata-set.1 sndfile-concat.1 \
sndfile-interleave.1 sndfile-deinterleave.1 sndfile-salvage.1
EXTRA_DIST = sndfile-info.1 sndfile-play.1 sndfile-convert.1 sndfile-cmp.1 \
sndfile-metadata-get.1 sndfile-concat.1 sndfile-interleave.1 \
sndfile-salvage.1
# Same manpage for both programs.
sndfile-metadata-set.1 : sndfile-metadata-get.1
$(LN_S) $(srcdir)/sndfile-metadata-get.1 $@
sndfile-deinterleave.1 : sndfile-interleave.1
$(LN_S) $(srcdir)/sndfile-interleave.1 $@

View File

@ -1,49 +0,0 @@
## Process this file with automake to produce Makefile.in
bin_PROGRAMS = sndfile-info sndfile-play sndfile-convert sndfile-cmp \
sndfile-metadata-set sndfile-metadata-get sndfile-interleave \
sndfile-deinterleave sndfile-concat sndfile-salvage
OS_SPECIFIC_CFLAGS = @OS_SPECIFIC_CFLAGS@
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
AM_CPPFLAGS = -I$(top_srcdir)/src $(OS_SPECIFIC_CFLAGS)
CLEANFILES = *~ sndfile-*.exe *.wav
# This is the BeOS version of sndfile-play. It needs to be compiled with the C++
# compiler.
EXTRA_DIST = sndfile-play-beos.cpp test-sndfile-metadata-set.py
sndfile_info_SOURCES = sndfile-info.c common.c common.h
sndfile_info_LDADD = $(top_builddir)/src/libsndfile.la
sndfile_play_SOURCES = sndfile-play.c common.c common.h
sndfile_play_LDADD = $(top_builddir)/src/libsndfile.la $(OS_SPECIFIC_LINKS) $(ALSA_LIBS) $(SNDIO_LIBS)
sndfile_convert_SOURCES = sndfile-convert.c common.c common.h
sndfile_convert_LDADD = $(top_builddir)/src/libsndfile.la
sndfile_cmp_SOURCES = sndfile-cmp.c common.c common.h
sndfile_cmp_LDADD = $(top_builddir)/src/libsndfile.la
sndfile_metadata_set_SOURCES = sndfile-metadata-set.c common.c common.h
sndfile_metadata_set_LDADD = $(top_builddir)/src/libsndfile.la
sndfile_metadata_get_SOURCES = sndfile-metadata-get.c common.c common.h
sndfile_metadata_get_LDADD = $(top_builddir)/src/libsndfile.la
sndfile_interleave_SOURCES = sndfile-interleave.c common.c common.h
sndfile_interleave_LDADD = $(top_builddir)/src/libsndfile.la
sndfile_deinterleave_SOURCES = sndfile-deinterleave.c common.c common.h
sndfile_deinterleave_LDADD = $(top_builddir)/src/libsndfile.la
sndfile_concat_SOURCES = sndfile-concat.c common.c common.h
sndfile_concat_LDADD = $(top_builddir)/src/libsndfile.la
sndfile_salvage_SOURCES = sndfile-salvage.c common.c common.h
sndfile_salvage_LDADD = $(top_builddir)/src/libsndfile.la
check :
$(PYTHON) $(top_srcdir)/programs/test-sndfile-metadata-set.py @HOST_TRIPLET@

View File

@ -1,14 +0,0 @@
## Process this file with automake to produce Makefile.in
if HAVE_SQLITE3
bin_PROGRAMS = sndfile-regtest
endif
noinst_HEADERS = regtest.h
AM_CPPFLAGS = -I$(top_srcdir)/src $(SQLITE3_CFLAGS) $(OS_SPECIFIC_CFLAGS)
sndfile_regtest_SOURCES = sndfile-regtest.c database.c checksum.c
sndfile_regtest_LDADD = $(top_builddir)/src/libsndfile.la $(SQLITE3_LIBS)
CLEANFILES = *~ *.exe

View File

@ -1,132 +0,0 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = subdir-objects
lib_LTLIBRARIES = libsndfile.la
include_HEADERS = sndfile.hh
nodist_include_HEADERS = sndfile.h
noinst_LTLIBRARIES = GSM610/libgsm.la G72x/libg72x.la ALAC/libalac.la libcommon.la
SYMBOL_FILES = Symbols.gnu-binutils Symbols.darwin libsndfile-1.def Symbols.os2 Symbols.static
EXTRA_DIST = sndfile.h.in config.h.in test_endswap.c test_endswap.tpl test_endswap.def \
$(SYMBOL_FILES) create_symbols_file.py binheader_writef_check.py \
GSM610/README GSM610/COPYRIGHT GSM610/ChangeLog \
G72x/README G72x/README.original G72x/ChangeLog \
make-static-lib-hidden-privates.sh \
config.h.cmake
noinst_HEADERS = common.h sfconfig.h sfendian.h wavlike.h sf_unistd.h ogg.h chanmap.h
check_PROGRAMS = test_main G72x/g72x_test
FILESPECIFIC = sndfile.c aiff.c au.c avr.c caf.c dwd.c flac.c g72x.c htk.c ircam.c \
macos.c mat4.c mat5.c nist.c paf.c pvf.c raw.c rx2.c sd2.c \
sds.c svx.c txw.c voc.c wve.c w64.c wavlike.c wav.c xi.c mpc2k.c rf64.c \
ogg_vorbis.c ogg_speex.c ogg_pcm.c ogg_opus.c
CLEANFILES = *~ *.exe G72x/*.exe error.dat
if USE_WIN_VERSION_FILE
WIN_VERSION_FILE = version-metadata.rc
else
WIN_VERSION_FILE =
endif
libsndfile_la_CFLAGS = $(EXTERNAL_XIPH_CFLAGS)
#===============================================================================
# MinGW requires -no-undefined if a DLL is to be built.
libsndfile_la_LDFLAGS = -no-undefined -version-info $(SHARED_VERSION_INFO) $(SHLIB_VERSION_ARG)
libsndfile_la_SOURCES = $(FILESPECIFIC) $(noinst_HEADERS)
nodist_libsndfile_la_SOURCES = $(nodist_include_HEADERS)
libsndfile_la_LIBADD = GSM610/libgsm.la G72x/libg72x.la ALAC/libalac.la \
libcommon.la $(EXTERNAL_XIPH_LIBS) -lm
EXTRA_libsndfile_la_DEPENDENCIES = $(SYMBOL_FILES)
libcommon_la_CFLAGS = $(EXTERNAL_XIPH_CFLAGS)
libcommon_la_SOURCES = common.c file_io.c command.c pcm.c ulaw.c alaw.c \
float32.c double64.c ima_adpcm.c ms_adpcm.c gsm610.c dwvw.c vox_adpcm.c \
interleave.c strings.c dither.c cart.c broadcast.c audio_detect.c \
ima_oki_adpcm.c ima_oki_adpcm.h alac.c chunk.c ogg.c chanmap.c \
windows.c id3.c $(WIN_VERSION_FILE)
#======================================================================
# Subdir libraries.
GSM610_libgsm_la_SOURCES = GSM610/config.h GSM610/gsm.h GSM610/gsm610_priv.h \
GSM610/add.c GSM610/code.c GSM610/decode.c GSM610/gsm_create.c \
GSM610/gsm_decode.c GSM610/gsm_destroy.c GSM610/gsm_encode.c \
GSM610/gsm_option.c GSM610/long_term.c GSM610/lpc.c GSM610/preprocess.c \
GSM610/rpe.c GSM610/short_term.c GSM610/table.c
G72x_libg72x_la_SOURCES = G72x/g72x.h G72x/g72x_priv.h \
G72x/g721.c G72x/g723_16.c G72x/g723_24.c G72x/g723_40.c G72x/g72x.c
ALAC_libalac_la_SOURCES = ALAC/ALACAudioTypes.h ALAC/ALACBitUtilities.h \
ALAC/EndianPortable.h ALAC/aglib.h ALAC/dplib.h ALAC/matrixlib.h \
ALAC/alac_codec.h ALAC/shift.h \
ALAC/ALACBitUtilities.c ALAC/ag_dec.c \
ALAC/ag_enc.c ALAC/dp_dec.c ALAC/dp_enc.c ALAC/matrix_dec.c \
ALAC/matrix_enc.c ALAC/alac_decoder.c ALAC/alac_encoder.c
#===============================================================================
# Test programs.
test_main_SOURCES = test_main.c test_main.h test_conversions.c test_float.c test_endswap.c \
test_audio_detect.c test_log_printf.c test_file_io.c test_ima_oki_adpcm.c \
test_strncpy_crlf.c test_broadcast_var.c test_cart_var.c \
test_binheader_writef.c
test_main_LDADD = libcommon.la
G72x_g72x_test_SOURCES = G72x/g72x_test.c
G72x_g72x_test_LDADD = G72x/libg72x.la
SUFFIXES = .def .tpl
.def.c:
autogen --writable $<
check :
$(PYTHON) $(srcdir)/binheader_writef_check.py $(srcdir)/*.c
G72x/g72x_test$(EXEEXT) all
./test_main$(EXEEXT)
# Need this target to force building of test programs.
checkprograms : $(check_PROGRAMS)
#======================================================================
# Generate an OS specific Symbols files. This is done when the author
# builds the distribution tarball. There should be not need for the
# end user to create these files.
Symbols.gnu-binutils: create_symbols_file.py
$(PYTHON) $(srcdir)/create_symbols_file.py linux $(VERSION) > $@
Symbols.darwin: create_symbols_file.py
$(PYTHON) $(srcdir)/create_symbols_file.py darwin $(VERSION) > $@
libsndfile-1.def: create_symbols_file.py
$(PYTHON) $(srcdir)/create_symbols_file.py win32 $(VERSION) > $@
Symbols.os2: create_symbols_file.py
$(PYTHON) $(srcdir)/create_symbols_file.py os2 $(VERSION) > $@
Symbols.static: create_symbols_file.py
$(PYTHON) $(srcdir)/create_symbols_file.py static $(VERSION) > $@
#======================================================================
# Building windows resource files (if needed).
.rc.lo:
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) $< -o $@
#======================================================================
# Disable autoheader.
AUTOHEADER=echo

View File

@ -1,198 +0,0 @@
## Process this file with automake to produce Makefile.in
if ENABLE_TEST_COVERAGE
CPP_TEST =
else
CPP_TEST = cpp_test
endif
AM_CPPFLAGS = -I$(top_srcdir)/src
check_PROGRAMS = sfversion floating_point_test write_read_test \
lossy_comp_test error_test ulaw_test alaw_test dwvw_test \
peak_chunk_test command_test stdin_test stdout_test stdio_test \
pcm_test headerless_test pipe_test benchmark header_test misc_test \
raw_test string_test multi_file_test dither_test chunk_test \
scale_clip_test win32_test fix_this aiff_rw_test virtual_io_test \
locale_test largefile_test win32_ordinal_test ogg_test compression_size_test \
checksum_test external_libs_test rdwr_test format_check_test $(CPP_TEST) \
channel_test long_read_write_test
noinst_HEADERS = dft_cmp.h utils.h generate.h
autogen_sources = \
write_read_test.c write_read_test.tpl write_read_test.def \
pcm_test.c pcm_test.tpl pcm_test.def \
header_test.c header_test.tpl header_test.def \
utils.c utils.tpl utils.def \
scale_clip_test.c scale_clip_test.tpl scale_clip_test.def \
pipe_test.c pipe_test.tpl pipe_test.def \
rdwr_test.c rdwr_test.tpl rdwr_test.def \
floating_point_test.c floating_point_test.tpl floating_point_test.def \
benchmark.c benchmark.tpl benchmark.def
EXTRA_DIST = $(autogen_sources)
CLEANFILES = *~ *.exe
#===============================================================================
# If we're cross compiling from Linux to Windows and running the test suite
# under Wine, we need a symbolic link to the generated libsndfile DLL.
if LINUX_MINGW_CROSS_TEST
$(check_PROGRAMS) : libsndfile-1.dll
libsndfile-1.dll :
ln -s $(top_builddir)/src/.libs/$@ $@
clean-local :
-rm -f libsndfile-1.dll
endif
#===============================================================================
check: test_wrapper.sh
sh test_wrapper.sh
# Need this target to force building of test programs.
checkprograms : $(check_PROGRAMS)
#===============================================================================
sfversion_SOURCES = sfversion.c
sfversion_LDADD = $(top_builddir)/src/libsndfile.la
write_read_test_SOURCES = utils.c generate.c write_read_test.c
write_read_test_LDADD = $(top_builddir)/src/libsndfile.la
lossy_comp_test_SOURCES = utils.c lossy_comp_test.c
lossy_comp_test_LDADD = $(top_builddir)/src/libsndfile.la
fix_this_SOURCES = utils.c fix_this.c
fix_this_LDADD = $(top_builddir)/src/libsndfile.la
error_test_SOURCES = error_test.c utils.c
error_test_LDADD = $(top_builddir)/src/libsndfile.la
ulaw_test_SOURCES = utils.c ulaw_test.c
ulaw_test_LDADD = $(top_builddir)/src/libsndfile.la
alaw_test_SOURCES = utils.c alaw_test.c
alaw_test_LDADD = $(top_builddir)/src/libsndfile.la
aiff_rw_test_SOURCES = utils.c aiff_rw_test.c
aiff_rw_test_LDADD = $(top_builddir)/src/libsndfile.la
command_test_SOURCES = command_test.c utils.c
command_test_LDADD = $(top_builddir)/src/libsndfile.la
locale_test_SOURCES = locale_test.c utils.c
locale_test_LDADD = $(top_builddir)/src/libsndfile.la
largefile_test_SOURCES = largefile_test.c utils.c
largefile_test_LDADD = $(top_builddir)/src/libsndfile.la
pcm_test_SOURCES = pcm_test.c utils.c
pcm_test_LDADD = $(top_builddir)/src/libsndfile.la
headerless_test_SOURCES = utils.c headerless_test.c
headerless_test_LDADD = $(top_builddir)/src/libsndfile.la
stdin_test_SOURCES = stdin_test.c utils.c
stdin_test_LDADD = $(top_builddir)/src/libsndfile.la
stdout_test_SOURCES = stdout_test.c
stdout_test_LDADD = $(top_builddir)/src/libsndfile.la
stdio_test_SOURCES = stdio_test.c utils.c
stdio_test_LDADD = $(top_builddir)/src/libsndfile.la
pipe_test_SOURCES = pipe_test.c utils.c
pipe_test_LDADD = $(top_builddir)/src/libsndfile.la
benchmark_SOURCES = benchmark.c
benchmark_LDADD = $(top_builddir)/src/libsndfile.la
header_test_SOURCES = header_test.c utils.c
header_test_LDADD = $(top_builddir)/src/libsndfile.la
misc_test_SOURCES = misc_test.c utils.c
misc_test_LDADD = $(top_builddir)/src/libsndfile.la
raw_test_SOURCES = raw_test.c utils.c
raw_test_LDADD = $(top_builddir)/src/libsndfile.la
string_test_SOURCES = string_test.c utils.c
string_test_LDADD = $(top_builddir)/src/libsndfile.la
dither_test_SOURCES = dither_test.c utils.c
dither_test_LDADD = $(top_builddir)/src/libsndfile.la
chunk_test_SOURCES = chunk_test.c utils.c
chunk_test_LDADD = $(top_builddir)/src/libsndfile.la
multi_file_test_SOURCES = multi_file_test.c utils.c
multi_file_test_LDADD = $(top_builddir)/src/libsndfile.la
virtual_io_test_SOURCES = virtual_io_test.c utils.c
virtual_io_test_LDADD = $(top_builddir)/src/libsndfile.la
ogg_test_SOURCES = ogg_test.c utils.c
ogg_test_LDADD = $(top_builddir)/src/libsndfile.la
compression_size_test_SOURCES = compression_size_test.c utils.c
compression_size_test_LDADD = $(top_builddir)/src/libsndfile.la
rdwr_test_SOURCES = rdwr_test.c utils.c
rdwr_test_LDADD = $(top_builddir)/src/libsndfile.la
win32_test_SOURCES = win32_test.c
# Link lib here so that generating the testsuite tarball works correctly.
win32_test_LDADD = $(top_builddir)/src/libsndfile.la
win32_ordinal_test_SOURCES = win32_ordinal_test.c utils.c
win32_ordinal_test_LDADD = $(top_builddir)/src/libsndfile.la
external_libs_test_SOURCES = external_libs_test.c utils.c
external_libs_test_LDADD = $(top_builddir)/src/libsndfile.la
format_check_test_SOURCES = format_check_test.c utils.c
format_check_test_LDADD = $(top_builddir)/src/libsndfile.la
channel_test_SOURCES = channel_test.c utils.c
channel_test_LDADD = $(top_builddir)/src/libsndfile.la
long_read_write_test_SOURCES = long_read_write_test.c utils.c
long_read_write_test_LDADD = $(top_builddir)/src/libsndfile.la
cpp_test_SOURCES = cpp_test.cc utils.c
cpp_test_LDADD = $(top_builddir)/src/libsndfile.la
checksum_test_SOURCES = checksum_test.c utils.c
checksum_test_LDADD = $(top_builddir)/src/libsndfile.la
# Lite remove start
dwvw_test_SOURCES = utils.c dwvw_test.c
dwvw_test_LDADD = $(top_builddir)/src/libsndfile.la
floating_point_test_SOURCES = utils.c dft_cmp.c floating_point_test.c
floating_point_test_LDADD = $(top_builddir)/src/libsndfile.la
peak_chunk_test_SOURCES = peak_chunk_test.c utils.c
peak_chunk_test_LDADD = $(top_builddir)/src/libsndfile.la
scale_clip_test_SOURCES = scale_clip_test.c utils.c
scale_clip_test_LDADD = $(top_builddir)/src/libsndfile.la
# Lite remove end
#===============================================================================
# Autogen generated sources.
# These GNU style rules actually work. The old style suffix rules do not.
%.c : %.def %.tpl
autogen --writable $<
%.h : %.def %.tpl
autogen --writable $<

View File

@ -56,7 +56,6 @@ typedef struct
const char *ext ; const char *ext ;
} FILETYPE ; } FILETYPE ;
static int file_exists (const char *filename) ;
static void useek_pipe_rw_test (int filetype, const char *ext) ; static void useek_pipe_rw_test (int filetype, const char *ext) ;
static void pipe_read_test (int filetype, const char *ext) ; static void pipe_read_test (int filetype, const char *ext) ;
static void pipe_write_test (const char *ext) ; static void pipe_write_test (const char *ext) ;
@ -95,9 +94,6 @@ int
main (void) main (void)
{ int k ; { int k ;
if (file_exists ("libsndfile.spec.in"))
exit_if_true (chdir ("tests") != 0, "\n Error : chdir ('tests') failed.\n") ;
for (k = 0 ; read_only_types [k].format ; k++) for (k = 0 ; read_only_types [k].format ; k++)
pipe_read_test (read_only_types [k].format, read_only_types [k].ext) ; pipe_read_test (read_only_types [k].format, read_only_types [k].ext) ;
@ -141,7 +137,7 @@ pipe_read_test (int filetype, const char *ext)
test_writef_short_or_die (outfile, 0, data, PIPE_TEST_LEN, __LINE__) ; test_writef_short_or_die (outfile, 0, data, PIPE_TEST_LEN, __LINE__) ;
sf_close (outfile) ; sf_close (outfile) ;
snprintf (buffer, sizeof (buffer), "cat %s | ./stdin_test %s ", filename, ext) ; snprintf (buffer, sizeof (buffer), "cat %s | ./tests/stdin_test %s ", filename, ext) ;
if ((retval = system (buffer)) != 0) if ((retval = system (buffer)) != 0)
{ retval = WEXITSTATUS (retval) ; { retval = WEXITSTATUS (retval) ;
printf ("\n\n Line %d : pipe test returned error for file type \"%s\".\n\n", __LINE__, ext) ; printf ("\n\n Line %d : pipe test returned error for file type \"%s\".\n\n", __LINE__, ext) ;
@ -162,7 +158,7 @@ pipe_write_test (const char *ext)
print_test_name ("pipe_write_test", ext) ; print_test_name ("pipe_write_test", ext) ;
snprintf (buffer, sizeof (buffer), "./stdout_test %s | ./stdin_test %s ", ext, ext) ; snprintf (buffer, sizeof (buffer), "./tests/stdout_test %s | ./tests/stdin_test %s ", ext, ext) ;
if ((retval = system (buffer))) if ((retval = system (buffer)))
{ retval = WEXITSTATUS (retval) ; { retval = WEXITSTATUS (retval) ;
printf ("\n\n Line %d : pipe test returned error file type \"%s\".\n\n", __LINE__, ext) ; printf ("\n\n Line %d : pipe test returned error file type \"%s\".\n\n", __LINE__, ext) ;
@ -341,7 +337,7 @@ pipe_test_others (FILETYPE* list1, FILETYPE* list2)
test_writef_short_or_die (outfile, 0, data, PIPE_TEST_LEN, __LINE__) ; test_writef_short_or_die (outfile, 0, data, PIPE_TEST_LEN, __LINE__) ;
sf_close (outfile) ; sf_close (outfile) ;
snprintf (buffer, sizeof (buffer), "cat %s | ./stdin_test %s %d ", filename, info.extension, PIPE_TEST_LEN) ; snprintf (buffer, sizeof (buffer), "cat %s | ./tests/stdin_test %s %d ", filename, info.extension, PIPE_TEST_LEN) ;
if ((retval = system (buffer)) == 0) if ((retval = system (buffer)) == 0)
{ retval = WEXITSTATUS (retval) ; { retval = WEXITSTATUS (retval) ;
printf ("\n\n Line %d : pipe test should have returned error file type \"%s\" but didn't.\n\n", __LINE__, info.name) ; printf ("\n\n Line %d : pipe test should have returned error file type \"%s\" but didn't.\n\n", __LINE__, info.name) ;
@ -362,15 +358,5 @@ pipe_test_others (FILETYPE* list1, FILETYPE* list2)
/*============================================================================== /*==============================================================================
*/ */
static int
file_exists (const char *filename)
{ struct stat buf ;
if (stat (filename, &buf))
return 0 ;
return 1 ;
} /* file_exists */
#endif #endif

View File

@ -63,7 +63,6 @@ main (void)
static size_t file_length (const char *filename) ; static size_t file_length (const char *filename) ;
static int file_exists (const char *filename) ;
static void stdio_test (const char *filetype) ; static void stdio_test (const char *filetype) ;
static const char *filetypes [] = static const char *filetypes [] =
@ -76,9 +75,6 @@ int
main (void) main (void)
{ int k ; { int k ;
if (file_exists ("libsndfile.spec.in"))
exit_if_true (chdir ("tests") != 0, "\n Error : chdir ('tests') failed.\n") ;
for (k = 0 ; filetypes [k] ; k++) for (k = 0 ; filetypes [k] ; k++)
stdio_test (filetypes [k]) ; stdio_test (filetypes [k]) ;
@ -94,7 +90,7 @@ stdio_test (const char *filetype)
print_test_name ("stdio_test", filetype) ; print_test_name ("stdio_test", filetype) ;
snprintf (buffer, sizeof (buffer), "./stdout_test %s > stdio.%s", filetype, filetype) ; snprintf (buffer, sizeof (buffer), "./tests/stdout_test %s > stdio.%s", filetype, filetype) ;
if ((retval = system (buffer))) if ((retval = system (buffer)))
{ retval = WIFEXITED (retval) ? WEXITSTATUS (retval) : 1 ; { retval = WIFEXITED (retval) ? WEXITSTATUS (retval) : 1 ;
printf ("%s : %s", buffer, (strerror (retval))) ; printf ("%s : %s", buffer, (strerror (retval))) ;
@ -107,7 +103,7 @@ stdio_test (const char *filetype)
exit (1) ; exit (1) ;
} ; } ;
snprintf (buffer, sizeof (buffer), "./stdin_test %s < stdio.%s", filetype, filetype) ; snprintf (buffer, sizeof (buffer), "./tests/stdin_test %s < stdio.%s", filetype, filetype) ;
if ((retval = system (buffer))) if ((retval = system (buffer)))
{ retval = WIFEXITED (retval) ? WEXITSTATUS (retval) : 1 ; { retval = WIFEXITED (retval) ? WEXITSTATUS (retval) : 1 ;
printf ("%s : %s", buffer, (strerror (retval))) ; printf ("%s : %s", buffer, (strerror (retval))) ;
@ -141,15 +137,5 @@ file_length (const char *filename)
return buf.st_size ; return buf.st_size ;
} /* file_length */ } /* file_length */
static int
file_exists (const char *filename)
{ struct stat buf ;
if (stat (filename, &buf))
return 0 ;
return 1 ;
} /* file_exists */
#endif #endif

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/usr/bin/env sh
# Copyright (C) 2008-2016 Erik de Castro Lopo <erikd@mega-nerd.com> # Copyright (C) 2008-2017 Erik de Castro Lopo <erikd@mega-nerd.com>
# #
# All rights reserved. # All rights reserved.
# #
@ -34,26 +34,10 @@
HOST_TRIPLET=@HOST_TRIPLET@ HOST_TRIPLET=@HOST_TRIPLET@
PACKAGE_VERSION=@PACKAGE_VERSION@ PACKAGE_VERSION=@PACKAGE_VERSION@
LIB_VERSION=$(echo $PACKAGE_VERSION | sed "s/[a-z].*//") LIB_VERSION=$(echo $PACKAGE_VERSION | sed "s/[a-z].*//")
TOP_SRCDIR=@top_srcdir@
PYTHON=@PYTHON@
if test -f tests/sfversion@EXEEXT@ ; then sfversion=$(./tests/sfversion@EXEEXT@ | grep libsndfile | sed "s/-exp$//")
cd tests
fi
if test ! -f sfversion@EXEEXT@ ; then
echo "Not able to find test executables."
exit 1
fi
if test -f libsndfile.so.$LIB_VERSION ; then
# This will work on Linux, but not on Mac.
# Windows is already sorted out.
export LD_LIBRARY_PATH=`pwd`
if test ! -f libsndfile.so.1 ; then
ln -s libsndfile.so.$LIB_VERSION libsndfile.so.1
fi
fi
sfversion=$(./sfversion@EXEEXT@ | grep libsndfile | sed "s/-exp$//")
if test "$sfversion" != libsndfile-$PACKAGE_VERSION ; then if test "$sfversion" != libsndfile-$PACKAGE_VERSION ; then
echo "Error : sfversion ($sfversion) and PACKAGE_VERSION ($PACKAGE_VERSION) don't match." echo "Error : sfversion ($sfversion) and PACKAGE_VERSION ($PACKAGE_VERSION) don't match."
@ -63,48 +47,44 @@ if test "$sfversion" != libsndfile-$PACKAGE_VERSION ; then
# Force exit on errors. # Force exit on errors.
set -e set -e
# Generic-tests
uname -a
# Check the header file. # Check the header file.
sh pedantic-header-test.sh /usr/bin/env sh tests/pedantic-header-test.sh
# Need this for when we're running from files collected into the # Need this for when we're running from files collected into the
# libsndfile-testsuite-@PACKAGE_VERSION@ tarball. # libsndfile-testsuite-@PACKAGE_VERSION@ tarball.
if test -x test_main@EXEEXT@ ; then echo "Running unit tests from src/ directory of source code tree."
echo "Running unit tests from src/ directory of source code tree." ./src/test_main@EXEEXT@
./test_main@EXEEXT@
echo
echo "Running end-to-end tests from tests/ directory."
fi
./error_test@EXEEXT@ echo
./pcm_test@EXEEXT@ echo "Running end-to-end tests from tests/ directory."
./ulaw_test@EXEEXT@
./alaw_test@EXEEXT@ ./tests/error_test@EXEEXT@
./dwvw_test@EXEEXT@ ./tests/pcm_test@EXEEXT@
./command_test@EXEEXT@ ver ./tests/ulaw_test@EXEEXT@
./command_test@EXEEXT@ norm ./tests/alaw_test@EXEEXT@
./command_test@EXEEXT@ format ./tests/dwvw_test@EXEEXT@
./command_test@EXEEXT@ peak ./tests/command_test@EXEEXT@ ver
./command_test@EXEEXT@ trunc ./tests/command_test@EXEEXT@ norm
./command_test@EXEEXT@ inst ./tests/command_test@EXEEXT@ format
./command_test@EXEEXT@ cue ./tests/command_test@EXEEXT@ peak
./command_test@EXEEXT@ current_sf_info ./tests/command_test@EXEEXT@ trunc
./command_test@EXEEXT@ bext ./tests/command_test@EXEEXT@ inst
./command_test@EXEEXT@ bextch ./tests/command_test@EXEEXT@ cue
./command_test@EXEEXT@ chanmap ./tests/command_test@EXEEXT@ current_sf_info
./command_test@EXEEXT@ cart ./tests/command_test@EXEEXT@ bext
./floating_point_test@EXEEXT@ ./tests/command_test@EXEEXT@ bextch
./checksum_test@EXEEXT@ ./tests/command_test@EXEEXT@ chanmap
./scale_clip_test@EXEEXT@ ./tests/command_test@EXEEXT@ cart
./headerless_test@EXEEXT@ ./tests/floating_point_test@EXEEXT@
./rdwr_test@EXEEXT@ ./tests/checksum_test@EXEEXT@
./locale_test@EXEEXT@ ./tests/scale_clip_test@EXEEXT@
./win32_ordinal_test@EXEEXT@ ./tests/headerless_test@EXEEXT@
./external_libs_test@EXEEXT@ ./tests/rdwr_test@EXEEXT@
./format_check_test@EXEEXT@ ./tests/locale_test@EXEEXT@
./channel_test@EXEEXT@ ./tests/win32_ordinal_test@EXEEXT@
./tests/external_libs_test@EXEEXT@
./tests/format_check_test@EXEEXT@
./tests/channel_test@EXEEXT@
# The w64 G++ compiler requires an extra runtime DLL which we don't have, # The w64 G++ compiler requires an extra runtime DLL which we don't have,
# so skip this test. # so skip this test.
@ -114,7 +94,7 @@ case "$HOST_TRIPLET" in
i686-w64-mingw32) i686-w64-mingw32)
;; ;;
*) *)
./cpp_test@EXEEXT@ ./tests/cpp_test@EXEEXT@
;; ;;
esac esac
@ -123,248 +103,259 @@ echo " $sfversion passed common tests."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# aiff-tests # aiff-tests
./write_read_test@EXEEXT@ aiff ./tests/write_read_test@EXEEXT@ aiff
./lossy_comp_test@EXEEXT@ aiff_ulaw ./tests/lossy_comp_test@EXEEXT@ aiff_ulaw
./lossy_comp_test@EXEEXT@ aiff_alaw ./tests/lossy_comp_test@EXEEXT@ aiff_alaw
./lossy_comp_test@EXEEXT@ aiff_gsm610 ./tests/lossy_comp_test@EXEEXT@ aiff_gsm610
echo "==========================" echo "----------------------------------------------------------------------"
echo "./lossy_comp_test@EXEEXT@ aiff_ima" echo " lossy_comp_test@EXEEXT@ aiff_ima"
echo "==========================" echo "----------------------------------------------------------------------"
./peak_chunk_test@EXEEXT@ aiff
./header_test@EXEEXT@ aiff ./tests/peak_chunk_test@EXEEXT@ aiff
./misc_test@EXEEXT@ aiff ./tests/header_test@EXEEXT@ aiff
./string_test@EXEEXT@ aiff ./tests/misc_test@EXEEXT@ aiff
./multi_file_test@EXEEXT@ aiff ./tests/string_test@EXEEXT@ aiff
./aiff_rw_test@EXEEXT@ ./tests/multi_file_test@EXEEXT@ aiff
./chunk_test@EXEEXT@ aiff ./tests/aiff_rw_test@EXEEXT@
./tests/chunk_test@EXEEXT@ aiff
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on AIFF files." echo " $sfversion passed tests on AIFF files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# au-tests # au-tests
./write_read_test@EXEEXT@ au ./tests/write_read_test@EXEEXT@ au
./lossy_comp_test@EXEEXT@ au_ulaw ./tests/lossy_comp_test@EXEEXT@ au_ulaw
./lossy_comp_test@EXEEXT@ au_alaw ./tests/lossy_comp_test@EXEEXT@ au_alaw
./lossy_comp_test@EXEEXT@ au_g721 ./tests/lossy_comp_test@EXEEXT@ au_g721
./lossy_comp_test@EXEEXT@ au_g723 ./tests/lossy_comp_test@EXEEXT@ au_g723
./header_test@EXEEXT@ au ./tests/header_test@EXEEXT@ au
./misc_test@EXEEXT@ au ./tests/misc_test@EXEEXT@ au
./multi_file_test@EXEEXT@ au ./tests/multi_file_test@EXEEXT@ au
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on AU files." echo " $sfversion passed tests on AU files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# caf-tests # caf-tests
./write_read_test@EXEEXT@ caf ./tests/write_read_test@EXEEXT@ caf
./lossy_comp_test@EXEEXT@ caf_ulaw ./tests/lossy_comp_test@EXEEXT@ caf_ulaw
./lossy_comp_test@EXEEXT@ caf_alaw ./tests/lossy_comp_test@EXEEXT@ caf_alaw
./header_test@EXEEXT@ caf ./tests/header_test@EXEEXT@ caf
./peak_chunk_test@EXEEXT@ caf ./tests/peak_chunk_test@EXEEXT@ caf
./misc_test@EXEEXT@ caf ./tests/misc_test@EXEEXT@ caf
./chunk_test@EXEEXT@ caf ./tests/chunk_test@EXEEXT@ caf
./string_test@EXEEXT@ caf ./tests/string_test@EXEEXT@ caf
./long_read_write_test@EXEEXT@ alac ./tests/long_read_write_test@EXEEXT@ alac
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on CAF files." echo " $sfversion passed tests on CAF files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# wav-tests # wav-tests
./write_read_test@EXEEXT@ wav ./tests/write_read_test@EXEEXT@ wav
./lossy_comp_test@EXEEXT@ wav_pcm ./tests/lossy_comp_test@EXEEXT@ wav_pcm
./lossy_comp_test@EXEEXT@ wav_ima ./tests/lossy_comp_test@EXEEXT@ wav_ima
./lossy_comp_test@EXEEXT@ wav_msadpcm ./tests/lossy_comp_test@EXEEXT@ wav_msadpcm
./lossy_comp_test@EXEEXT@ wav_ulaw ./tests/lossy_comp_test@EXEEXT@ wav_ulaw
./lossy_comp_test@EXEEXT@ wav_alaw ./tests/lossy_comp_test@EXEEXT@ wav_alaw
./lossy_comp_test@EXEEXT@ wav_gsm610 ./tests/lossy_comp_test@EXEEXT@ wav_gsm610
./lossy_comp_test@EXEEXT@ wav_g721 ./tests/lossy_comp_test@EXEEXT@ wav_g721
./peak_chunk_test@EXEEXT@ wav ./tests/peak_chunk_test@EXEEXT@ wav
./header_test@EXEEXT@ wav ./tests/header_test@EXEEXT@ wav
./misc_test@EXEEXT@ wav ./tests/misc_test@EXEEXT@ wav
./string_test@EXEEXT@ wav ./tests/string_test@EXEEXT@ wav
./multi_file_test@EXEEXT@ wav ./tests/multi_file_test@EXEEXT@ wav
./chunk_test@EXEEXT@ wav ./tests/chunk_test@EXEEXT@ wav
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on WAV files." echo " $sfversion passed tests on WAV files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# w64-tests # w64-tests
./write_read_test@EXEEXT@ w64 ./tests/write_read_test@EXEEXT@ w64
./lossy_comp_test@EXEEXT@ w64_ima ./tests/lossy_comp_test@EXEEXT@ w64_ima
./lossy_comp_test@EXEEXT@ w64_msadpcm ./tests/lossy_comp_test@EXEEXT@ w64_msadpcm
./lossy_comp_test@EXEEXT@ w64_ulaw ./tests/lossy_comp_test@EXEEXT@ w64_ulaw
./lossy_comp_test@EXEEXT@ w64_alaw ./tests/lossy_comp_test@EXEEXT@ w64_alaw
./lossy_comp_test@EXEEXT@ w64_gsm610 ./tests/lossy_comp_test@EXEEXT@ w64_gsm610
./header_test@EXEEXT@ w64 ./tests/header_test@EXEEXT@ w64
./misc_test@EXEEXT@ w64 ./tests/misc_test@EXEEXT@ w64
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on W64 files." echo " $sfversion passed tests on W64 files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# rf64-tests # rf64-tests
./write_read_test@EXEEXT@ rf64 ./tests/write_read_test@EXEEXT@ rf64
./header_test@EXEEXT@ rf64 ./tests/header_test@EXEEXT@ rf64
./misc_test@EXEEXT@ rf64 ./tests/misc_test@EXEEXT@ rf64
./string_test@EXEEXT@ rf64 ./tests/string_test@EXEEXT@ rf64
./peak_chunk_test@EXEEXT@ rf64 ./tests/peak_chunk_test@EXEEXT@ rf64
./chunk_test@EXEEXT@ rf64 ./tests/chunk_test@EXEEXT@ rf64
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on RF64 files." echo " $sfversion passed tests on RF64 files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# raw-tests # raw-tests
./write_read_test@EXEEXT@ raw ./tests/write_read_test@EXEEXT@ raw
./lossy_comp_test@EXEEXT@ raw_ulaw ./tests/lossy_comp_test@EXEEXT@ raw_ulaw
./lossy_comp_test@EXEEXT@ raw_alaw ./tests/lossy_comp_test@EXEEXT@ raw_alaw
./lossy_comp_test@EXEEXT@ raw_gsm610 ./tests/lossy_comp_test@EXEEXT@ raw_gsm610
./lossy_comp_test@EXEEXT@ vox_adpcm ./tests/lossy_comp_test@EXEEXT@ vox_adpcm
./raw_test@EXEEXT@ ./tests/raw_test@EXEEXT@
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on RAW (header-less) files." echo " $sfversion passed tests on RAW (header-less) files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# paf-tests # paf-tests
./write_read_test@EXEEXT@ paf ./tests/write_read_test@EXEEXT@ paf
./header_test@EXEEXT@ paf ./tests/header_test@EXEEXT@ paf
./misc_test@EXEEXT@ paf ./tests/misc_test@EXEEXT@ paf
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on PAF files." echo " $sfversion passed tests on PAF files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# svx-tests # svx-tests
./write_read_test@EXEEXT@ svx ./tests/write_read_test@EXEEXT@ svx
./header_test@EXEEXT@ svx ./tests/header_test@EXEEXT@ svx
./misc_test@EXEEXT@ svx ./tests/misc_test@EXEEXT@ svx
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on SVX files." echo " $sfversion passed tests on SVX files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# nist-tests # nist-tests
./write_read_test@EXEEXT@ nist ./tests/write_read_test@EXEEXT@ nist
./lossy_comp_test@EXEEXT@ nist_ulaw ./tests/lossy_comp_test@EXEEXT@ nist_ulaw
./lossy_comp_test@EXEEXT@ nist_alaw ./tests/lossy_comp_test@EXEEXT@ nist_alaw
./header_test@EXEEXT@ nist ./tests/header_test@EXEEXT@ nist
./misc_test@EXEEXT@ nist ./tests/misc_test@EXEEXT@ nist
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on NIST files." echo " $sfversion passed tests on NIST files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# ircam-tests # ircam-tests
./write_read_test@EXEEXT@ ircam ./tests/write_read_test@EXEEXT@ ircam
./lossy_comp_test@EXEEXT@ ircam_ulaw ./tests/lossy_comp_test@EXEEXT@ ircam_ulaw
./lossy_comp_test@EXEEXT@ ircam_alaw ./tests/lossy_comp_test@EXEEXT@ ircam_alaw
./header_test@EXEEXT@ ircam ./tests/header_test@EXEEXT@ ircam
./misc_test@EXEEXT@ ircam ./tests/misc_test@EXEEXT@ ircam
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on IRCAM files." echo " $sfversion passed tests on IRCAM files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# voc-tests # voc-tests
./write_read_test@EXEEXT@ voc ./tests/write_read_test@EXEEXT@ voc
./lossy_comp_test@EXEEXT@ voc_ulaw ./tests/lossy_comp_test@EXEEXT@ voc_ulaw
./lossy_comp_test@EXEEXT@ voc_alaw ./tests/lossy_comp_test@EXEEXT@ voc_alaw
./header_test@EXEEXT@ voc ./tests/header_test@EXEEXT@ voc
./misc_test@EXEEXT@ voc ./tests/misc_test@EXEEXT@ voc
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on VOC files." echo " $sfversion passed tests on VOC files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# mat4-tests # mat4-tests
./write_read_test@EXEEXT@ mat4 ./tests/write_read_test@EXEEXT@ mat4
./header_test@EXEEXT@ mat4 ./tests/header_test@EXEEXT@ mat4
./misc_test@EXEEXT@ mat4 ./tests/misc_test@EXEEXT@ mat4
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on MAT4 files." echo " $sfversion passed tests on MAT4 files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# mat5-tests # mat5-tests
./write_read_test@EXEEXT@ mat5 ./tests/write_read_test@EXEEXT@ mat5
./header_test@EXEEXT@ mat5 ./tests/header_test@EXEEXT@ mat5
./misc_test@EXEEXT@ mat5 ./tests/misc_test@EXEEXT@ mat5
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on MAT5 files." echo " $sfversion passed tests on MAT5 files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# pvf-tests # pvf-tests
./write_read_test@EXEEXT@ pvf ./tests/write_read_test@EXEEXT@ pvf
./header_test@EXEEXT@ pvf ./tests/header_test@EXEEXT@ pvf
./misc_test@EXEEXT@ pvf ./tests/misc_test@EXEEXT@ pvf
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on PVF files." echo " $sfversion passed tests on PVF files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# xi-tests # xi-tests
./lossy_comp_test@EXEEXT@ xi_dpcm ./tests/lossy_comp_test@EXEEXT@ xi_dpcm
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on XI files." echo " $sfversion passed tests on XI files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# htk-tests # htk-tests
./write_read_test@EXEEXT@ htk ./tests/write_read_test@EXEEXT@ htk
./header_test@EXEEXT@ htk ./tests/header_test@EXEEXT@ htk
./misc_test@EXEEXT@ htk ./tests/misc_test@EXEEXT@ htk
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on HTK files." echo " $sfversion passed tests on HTK files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# avr-tests # avr-tests
./write_read_test@EXEEXT@ avr ./tests/write_read_test@EXEEXT@ avr
./header_test@EXEEXT@ avr ./tests/header_test@EXEEXT@ avr
./misc_test@EXEEXT@ avr ./tests/misc_test@EXEEXT@ avr
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on AVR files." echo " $sfversion passed tests on AVR files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# sds-tests # sds-tests
./write_read_test@EXEEXT@ sds ./tests/write_read_test@EXEEXT@ sds
./header_test@EXEEXT@ sds ./tests/header_test@EXEEXT@ sds
./misc_test@EXEEXT@ sds ./tests/misc_test@EXEEXT@ sds
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on SDS files." echo " $sfversion passed tests on SDS files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# sd2-tests # sd2-tests
./write_read_test@EXEEXT@ sd2 ./tests/write_read_test@EXEEXT@ sd2
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on SD2 files." echo " $sfversion passed tests on SD2 files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# wve-tests # wve-tests
./lossy_comp_test@EXEEXT@ wve ./tests/lossy_comp_test@EXEEXT@ wve
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on WVE files." echo " $sfversion passed tests on WVE files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# mpc2k-tests # mpc2k-tests
./write_read_test@EXEEXT@ mpc2k ./tests/write_read_test@EXEEXT@ mpc2k
./header_test@EXEEXT@ mpc2k ./tests/header_test@EXEEXT@ mpc2k
./misc_test@EXEEXT@ mpc2k ./tests/misc_test@EXEEXT@ mpc2k
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on MPC 2000 files." echo " $sfversion passed tests on MPC 2000 files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# flac-tests # flac-tests
./write_read_test@EXEEXT@ flac ./tests/write_read_test@EXEEXT@ flac
./compression_size_test@EXEEXT@ flac ./tests/compression_size_test@EXEEXT@ flac
./string_test@EXEEXT@ flac ./tests/string_test@EXEEXT@ flac
./header_test@EXEEXT@ flac ./tests/header_test@EXEEXT@ flac
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on FLAC files." echo " $sfversion passed tests on FLAC files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# vorbis-tests # vorbis-tests
./ogg_test@EXEEXT@ ./tests/ogg_test@EXEEXT@
./compression_size_test@EXEEXT@ vorbis ./tests/compression_size_test@EXEEXT@ vorbis
./lossy_comp_test@EXEEXT@ ogg_vorbis ./tests/lossy_comp_test@EXEEXT@ ogg_vorbis
./string_test@EXEEXT@ ogg ./tests/string_test@EXEEXT@ ogg
./misc_test@EXEEXT@ ogg ./tests/misc_test@EXEEXT@ ogg
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed tests on OGG/VORBIS files." echo " $sfversion passed tests on OGG/VORBIS files."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
# io-tests # io-tests
./stdio_test@EXEEXT@ ./tests/stdio_test@EXEEXT@
./pipe_test@EXEEXT@ ./tests/pipe_test@EXEEXT@
./virtual_io_test@EXEEXT@ ./tests/virtual_io_test@EXEEXT@
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
echo " $sfversion passed stdio/pipe/vio tests." echo " $sfversion passed stdio/pipe/vio tests."
echo "----------------------------------------------------------------------" echo "----------------------------------------------------------------------"
"${PYTHON}" "tests/${TOP_SRCDIR}/src/binheader_writef_check.py" "tests/${TOP_SRCDIR}/src"/*.c
echo "----------------------------------------------------------------------"
echo " $sfversion passed binary header tests."
echo "----------------------------------------------------------------------"
"${PYTHON}" "tests/${TOP_SRCDIR}/programs/test-sndfile-metadata-set.py" "${HOST_TRIPLET}"
echo "----------------------------------------------------------------------"
echo " $sfversion passed sndfile metadata tests."
echo "----------------------------------------------------------------------"