Import Upstream version 1.0.28
This commit is contained in:
commit
f3546b656e
|
@ -0,0 +1,57 @@
|
|||
The main author of libsndfile is Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
apart from code in the following directories:
|
||||
|
||||
- src/GSM610 : Written by Jutta Degener <jutta@cs.tu-berlin.de> and Carsten
|
||||
Bormann <cabo@cs.tu-berlin.de>. They should not be contacted in relation to
|
||||
libsndfile or the GSM 6.10 code that is part of libsndfile. Their original
|
||||
code can be found at:
|
||||
|
||||
http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
|
||||
- src/G72x : Released by Sun Microsystems, Inc. to the public domain. Minor
|
||||
modifications were required to integrate these files into libsndfile. The
|
||||
changes are listed in src/G72x/ChangeLog.
|
||||
|
||||
|
||||
Others:
|
||||
|
||||
2013-03-07 Michael Pruett
|
||||
2013-02-11 Chris Roberts c.roberts@csrfm.com
|
||||
2012-03-17 IOhannes m zmoelnig
|
||||
2013-02-21 Jan Starry
|
||||
2012-01-20 Bodo
|
||||
2011-06-23 Tim van der Molen
|
||||
2010-12-01 Tim Blechmann
|
||||
2010-10-04 Matti Nykyri
|
||||
2010-09-17 Brian Lewis
|
||||
2010-02-22 Robin Gareus
|
||||
2010-01-07 Christian Weisgerber and Jacob Meuserto
|
||||
2009-10-18 Olivier Tristan
|
||||
2009-10-14, 2009-08-30 Uli Franke
|
||||
2009-06-24, 2008-11-19, 2004-09-22, 2004-06-17, 2003-05-03, 2003-05-02 Conrad Parker
|
||||
2009-05-22 Lennart Poettering
|
||||
2008-07-03, 2006-10-22, 2006-10-18 Fons Adriaensen
|
||||
2008-04-19 David Yeo
|
||||
2008-01-20 Yair K.
|
||||
2007-12-03 Robs
|
||||
2007-07-12 Ed Schouten
|
||||
2007-06-07 Trent Apted
|
||||
2007-04-14, 2003-12-12 André Pang
|
||||
2007-04-14 Reuben Thomas
|
||||
2006-11-09 Jonathan Woithe
|
||||
2006-03-26 Diego 'Flameeyes' Pettenò
|
||||
2006-03-17 Paul Davis
|
||||
2006-03-09 Jesse Chappell
|
||||
2006-01-09, 2005-12-28 John ffitch
|
||||
2005-09-21 David A. van Leeuwen
|
||||
2005-08-15 Mo DeJong
|
||||
2005-04-30 David Viens
|
||||
2004-12-29 Steve Baker
|
||||
2004-09-05 Denis Cote
|
||||
2004-06-28 Stanko Juzbasic
|
||||
2004-02-14 Frank Neumann
|
||||
2003-08-15 Axel Röbel
|
||||
2003-08-06 Peter Miller
|
||||
2003-07-21 Tero Pelander
|
||||
2003-02-10 Antoine Mathys
|
||||
2002-12-30 Marek Peteraj
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
function (lsf_autogen dir basefilename)
|
||||
# Only generate the file if it does not already exist.
|
||||
if (NOT (EXISTS "${CMAKE_SOURCE_DIR}/${dir}/${basefilename}.c"))
|
||||
|
||||
# If it doesn't exist, but we don't have autogen its an error.
|
||||
if (NOT AUTOGEN)
|
||||
message (FATAL_ERROR "Need GNU autogen to generate '${dir}/${basefilename}.c'.")
|
||||
endif ()
|
||||
|
||||
execute_process (
|
||||
COMMAND ${AUTOGEN} --writable ${basefilename}.def
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${dir}
|
||||
)
|
||||
endif ()
|
||||
|
||||
endfunction ()
|
|
@ -0,0 +1,73 @@
|
|||
# Build recipe for building programs in the programs/ directory.
|
||||
function (lsf_build_program prog_name)
|
||||
add_executable (${prog_name}
|
||||
programs/common.c
|
||||
programs/${prog_name}.c
|
||||
)
|
||||
target_link_libraries (${prog_name} sndfile)
|
||||
set_target_properties (${prog_name}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY programs
|
||||
)
|
||||
endfunction ()
|
||||
|
||||
function (lsf_build_program_extra prog_name extra_libs)
|
||||
add_executable (${prog_name}
|
||||
programs/common.c
|
||||
programs/${prog_name}.c
|
||||
)
|
||||
target_link_libraries (${prog_name} sndfile ${extra_libs})
|
||||
set_target_properties (${prog_name}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY programs
|
||||
)
|
||||
endfunction ()
|
||||
|
||||
# Build recipe for building C tests in the src/ directory.
|
||||
function (lsf_build_src_test_c test_name extra_files)
|
||||
add_executable (${test_name}
|
||||
src/${test_name}.c
|
||||
${extra_files}
|
||||
)
|
||||
target_link_libraries (${test_name} m)
|
||||
set_target_properties (${test_name}
|
||||
PROPERTIES
|
||||
EXCLUDE_FROM_DEFAULT_BUILD TRUE
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
RUNTIME_OUTPUT_DIRECTORY src
|
||||
)
|
||||
add_dependencies (check ${test_name})
|
||||
endfunction ()
|
||||
|
||||
# Build recipe for building C tests in the tests/ directory.
|
||||
function (lsf_build_test_c test_name extra_files)
|
||||
add_executable (${test_name}
|
||||
tests/${test_name}.c
|
||||
tests/utils.c
|
||||
${extra_files}
|
||||
)
|
||||
target_link_libraries (${test_name} sndfile)
|
||||
set_target_properties (${test_name}
|
||||
PROPERTIES
|
||||
EXCLUDE_FROM_DEFAULT_BUILD TRUE
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
RUNTIME_OUTPUT_DIRECTORY tests
|
||||
)
|
||||
add_dependencies (check ${test_name})
|
||||
endfunction ()
|
||||
|
||||
# Build recipe for building C++ tests in the tests/ directory.
|
||||
function (lsf_build_test_cc test_name)
|
||||
add_executable (${test_name}
|
||||
tests/utils.c
|
||||
tests/${test_name}.cc
|
||||
)
|
||||
target_link_libraries (${test_name} sndfile)
|
||||
set_target_properties (${test_name}
|
||||
PROPERTIES
|
||||
EXCLUDE_FROM_DEFAULT_BUILD TRUE
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
RUNTIME_OUTPUT_DIRECTORY tests
|
||||
)
|
||||
add_dependencies (check ${test_name})
|
||||
endfunction ()
|
|
@ -0,0 +1,92 @@
|
|||
include (CheckFunctionExists)
|
||||
include (CheckIncludeFile)
|
||||
include (CheckLibraryExists)
|
||||
include (CheckTypeSize)
|
||||
include (TestBigEndian)
|
||||
|
||||
function (lsf_try_compile_c_result c_file result_name result_pass result_fail)
|
||||
try_compile (compile_result
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${c_file}
|
||||
OUTPUT_VARIABLE LOG2
|
||||
)
|
||||
|
||||
if (${compile_result})
|
||||
set (${result_name} ${result_pass} PARENT_SCOPE)
|
||||
else (${compile_result})
|
||||
set (${result_name} ${result_fail} PARENT_SCOPE)
|
||||
endif (${compile_result})
|
||||
|
||||
endfunction ()
|
||||
|
||||
function (lsf_check_include_file header_name result_name)
|
||||
check_include_file (${header_name} header_${result_name})
|
||||
|
||||
if (header_${result_name})
|
||||
set (${result_name} 1 PARENT_SCOPE)
|
||||
else (header_${result_name})
|
||||
set (${result_name} 0 PARENT_SCOPE)
|
||||
endif (header_${result_name})
|
||||
|
||||
unset (header_${result_name})
|
||||
endfunction ()
|
||||
|
||||
function (lsf_check_type_size type_name result_size)
|
||||
string (REPLACE "*" "_P" tmp1 ${type_name})
|
||||
string (REPLACE " " "_" tmp2 ${tmp1})
|
||||
|
||||
check_type_size (${type_name} size_${tmp2})
|
||||
|
||||
if (size_${type_name})
|
||||
set (${result_size} ${size_${type_name}} PARENT_SCOPE)
|
||||
else (size_${type_name})
|
||||
set (${result_size} 0 PARENT_SCOPE)
|
||||
endif (size_${type_name})
|
||||
|
||||
unset (tmp1)
|
||||
unset (tmp2)
|
||||
unset (size_${tmp2})
|
||||
endfunction ()
|
||||
|
||||
function (lsf_check_function_exists func_name result_name)
|
||||
check_function_exists (${func_name} func_${result_name})
|
||||
|
||||
if (func_${result_name})
|
||||
set (${result_name} 1 PARENT_SCOPE)
|
||||
else (func_${result_name})
|
||||
set (${result_name} 0 PARENT_SCOPE)
|
||||
endif (func_${result_name})
|
||||
|
||||
unset (func_${result_name})
|
||||
endfunction ()
|
||||
|
||||
# Unix does not link libm by default while windows does. We therefore have
|
||||
# a special function for testing math functions.
|
||||
function (lsf_check_math_function_exists func_name result_name)
|
||||
if (${UNIX})
|
||||
check_library_exists (m ${func_name} "" func_${result_name})
|
||||
else (${UNIX})
|
||||
check_function_exists (${func_name} func_${result_name})
|
||||
endif (${UNIX})
|
||||
|
||||
if (func_${result_name})
|
||||
set (${result_name} 1 PARENT_SCOPE)
|
||||
else (func_${result_name})
|
||||
set (${result_name} 0 PARENT_SCOPE)
|
||||
endif (func_${result_name})
|
||||
|
||||
unset (func_${result_name})
|
||||
endfunction ()
|
||||
|
||||
function (lsf_check_library_exists lib_name lib_func location result_name)
|
||||
check_library_exists (${lib_name} ${lib_func} "${location}" lib_${result_name})
|
||||
|
||||
if (lib_${result_name})
|
||||
set (${result_name} 1 PARENT_SCOPE)
|
||||
else (lib_${result_name})
|
||||
set (${result_name} 0 PARENT_SCOPE)
|
||||
endif (lib_${result_name})
|
||||
|
||||
unset (lib_${result_name})
|
||||
endfunction ()
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
int main (void)
|
||||
{
|
||||
#if __GNUC__
|
||||
#if __clang__
|
||||
This is clang
|
||||
# endif
|
||||
#else
|
||||
This is not GCC.
|
||||
#endif
|
||||
return 0 ;
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
|
||||
find_package (PkgConfig)
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
function (find_libogg return_name)
|
||||
pkg_check_modules (PC_LIBOGG QUIET libogg)
|
||||
set (LIBOGG_DEFINITIONS ${PC_LIBOGG_CFLAGS_OTHER})
|
||||
|
||||
find_path (LIBOGG_INCLUDE_DIR ogg/ogg.h
|
||||
HINTS ${PC_LIBOGG_INCLUDEDIR} ${PC_LIBOGG_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES libogg)
|
||||
|
||||
find_library (LIBOGG_LIBRARY NAMES ogg libogg
|
||||
HINTS ${PC_LIBOGG_LIBDIR} ${PC_LIBOGG_LIBRARY_DIRS})
|
||||
|
||||
find_package_handle_standard_args (LibOgg DEFAULT_MSG
|
||||
LIBOGG_LIBRARY LIBOGG_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced (LIBOGG_INCLUDE_DIR LIBOGG_LIBRARY)
|
||||
|
||||
set (LIBOGG_LIBRARIES ${LIBOGG_LIBRARY} PARENT_SCOPE)
|
||||
set (LIBOGG_INCLUDE_DIRS ${LIBOGG_INCLUDE_DIR} PARENT_SCOPE)
|
||||
set (${return_name} ${LIBOGG_FOUND} PARENT_SCOPE)
|
||||
endfunction (find_libogg)
|
||||
|
||||
|
||||
function (find_libvorbis return_name)
|
||||
pkg_check_modules (PC_LIBVORBIS QUIET libvorbis)
|
||||
set (LIBVORBIS_DEFINITIONS ${PC_LIBVORBIS_CFLAGS_OTHER})
|
||||
|
||||
find_path (LIBVORBIS_INCLUDE_DIR vorbis/codec.h
|
||||
HINTS ${PC_LIBVORBIS_INCLUDEDIR} ${PC_LIBVORBIS_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES libvorbis)
|
||||
|
||||
find_library (LIBVORBIS_LIBRARY NAMES vorbis libvorbis
|
||||
HINTS ${PC_LIBVORBIS_LIBDIR} ${PC_LIBVORBIS_LIBRARY_DIRS})
|
||||
|
||||
find_package_handle_standard_args (LibVorbis DEFAULT_MSG
|
||||
LIBVORBIS_LIBRARY LIBVORBIS_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced (LIBVORBIS_INCLUDE_DIR LIBVORBIS_LIBRARY)
|
||||
|
||||
set (LIBVORBIS_LIBRARIES ${LIBVORBIS_LIBRARY} PARENT_SCOPE)
|
||||
set (LIBVORBIS_INCLUDE_DIRS ${LIBVORBIS_INCLUDE_DIR} PARENT_SCOPE)
|
||||
set (${return_name} ${LIBVORBIS_FOUND} PARENT_SCOPE)
|
||||
endfunction (find_libvorbis)
|
||||
|
||||
|
||||
function (find_libflac return_name)
|
||||
pkg_check_modules (PC_LIBFLAC QUIET libFLAC)
|
||||
set (LIBFLAC_DEFINITIONS ${PC_LIBFLAC_CFLAGS_OTHER})
|
||||
|
||||
find_path (LIBFLAC_INCLUDE_DIR FLAC/all.h
|
||||
HINTS ${PC_LIBFLAC_INCLUDEDIR} ${PC_LIBFLAC_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES libFLAC)
|
||||
|
||||
find_library (LIBFLAC_LIBRARY NAMES FLAC libFLAC
|
||||
HINTS ${PC_LIBFLAC_LIBDIR} ${PC_LIBFLAC_LIBRARY_DIRS})
|
||||
|
||||
find_package_handle_standard_args (LibFlac DEFAULT_MSG
|
||||
LIBFLAC_LIBRARY LIBFLAC_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced (LIBFLAC_INCLUDE_DIR LIBFLAC_LIBRARY)
|
||||
|
||||
set (LIBFLAC_LIBRARIES ${LIBFLAC_LIBRARY} PARENT_SCOPE)
|
||||
set (LIBFLAC_INCLUDE_DIRS ${LIBFLAC_INCLUDE_DIR} PARENT_SCOPE)
|
||||
set (${return_name} ${LIBFLAC_FOUND} PARENT_SCOPE)
|
||||
endfunction (find_libflac)
|
||||
|
||||
|
||||
function (find_external_xiph_libs return_name include_dirs external_libs)
|
||||
find_libogg (LIBOGG_FOUND)
|
||||
find_libvorbis (LIBVORBIS_FOUND)
|
||||
find_libflac (LIBFLAC_FOUND)
|
||||
|
||||
set (name 1)
|
||||
set (includes "")
|
||||
set (libs "")
|
||||
|
||||
if (LIBOGG_FOUND AND LIBVORBIS_FOUND AND LIBFLAC_FOUND)
|
||||
set (${name} 1)
|
||||
|
||||
if (NOT (LIBOGG_INCLUDE_DIR STREQUAL "/usr/include"))
|
||||
set (${includes} "${includes} ${LIBOGG_INCLUDE_DIR}")
|
||||
endif ()
|
||||
if (NOT (LIBVORBIS_INCLUDE_DIR STREQUAL "/usr/include"))
|
||||
set (${includes} "${includes} ${LIBVORBIS_INCLUDE_DIR}")
|
||||
endif ()
|
||||
if (NOT (LIBFLAC_INCLUDE_DIR STREQUAL "/usr/include"))
|
||||
set (${includes} "${includes} ${LIBFLAC_INCLUDE_DIR}")
|
||||
endif ()
|
||||
|
||||
set (libs "FLAC;vorbis;vorbisenc;ogg")
|
||||
endif ()
|
||||
|
||||
set (${return_name} ${name} PARENT_SCOPE)
|
||||
set (${include_dirs} "${includes}" PARENT_SCOPE)
|
||||
set (${external_libs} "${libs}" PARENT_SCOPE)
|
||||
endfunction (find_external_xiph_libs)
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
function (file_line_count filename variable)
|
||||
# Assume `find_progam (WC wc)` has already set this.
|
||||
if (NOT WC)
|
||||
message (FATAL_ERROR "Need the 'wc' program to find line coount.")
|
||||
endif ()
|
||||
|
||||
if (NOT SED)
|
||||
message (FATAL_ERROR "Need the 'sed' program to find line coount.")
|
||||
endif ()
|
||||
|
||||
if (NOT (EXISTS "${filename}"))
|
||||
message (FATAL_ERROR "File ${filename} does not exist.")
|
||||
endif ()
|
||||
|
||||
execute_process (
|
||||
COMMAND ${WC} -l ${filename}
|
||||
COMMAND ${SED} "s/^[ ]*//" # wc output on Mac has leading whitespace.
|
||||
COMMAND ${SED} "s/ .*//"
|
||||
OUTPUT_VARIABLE line_count
|
||||
)
|
||||
|
||||
# Tedious!
|
||||
string (STRIP ${line_count} line_count)
|
||||
|
||||
set (${variable} ${line_count} PARENT_SCOPE)
|
||||
endfunction ()
|
||||
|
||||
function (assert_line_count_non_zero filename)
|
||||
|
||||
file_line_count (${filename} line_count)
|
||||
|
||||
if (${line_count} LESS 1)
|
||||
message (FATAL_ERROR "Line count of ${filename} is ${line_count}, which is less than expected.")
|
||||
endif ()
|
||||
|
||||
endfunction ()
|
|
@ -0,0 +1,6 @@
|
|||
#include <sys/stat.h>
|
||||
int main (void)
|
||||
{
|
||||
/* This will fail to compile if S_IRGRP doesn't exist. */
|
||||
return S_IRGRP ;
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
|
||||
include (CMake/check.cmake)
|
||||
|
||||
lsf_check_include_file (alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H)
|
||||
lsf_check_include_file (byteswap.h HAVE_BYTESWAP_H)
|
||||
lsf_check_include_file (dlfcn.h HAVE_DLFCN_H)
|
||||
lsf_check_include_file (endian.h HAVE_ENDIAN_H)
|
||||
lsf_check_include_file (inttypes.h HAVE_INTTYPES_H)
|
||||
lsf_check_include_file (locale.h HAVE_LOCALE_H)
|
||||
lsf_check_include_file (memory.h HAVE_MEMORY_H)
|
||||
lsf_check_include_file (sndio.h HAVE_SNDIO_H)
|
||||
lsf_check_include_file (stdint.h HAVE_STDINT_H)
|
||||
lsf_check_include_file (stdlib.h HAVE_STDLIB_H)
|
||||
lsf_check_include_file (string.h HAVE_STRING_H)
|
||||
lsf_check_include_file (strings.h HAVE_STRINGS_H)
|
||||
lsf_check_include_file (sys/stat.h HAVE_SYS_STAT_H)
|
||||
lsf_check_include_file (sys/time.h HAVE_SYS_TIME_H)
|
||||
lsf_check_include_file (sys/types.h HAVE_SYS_TYPES_H)
|
||||
lsf_check_include_file (sys/wait.h HAVE_SYS_WAIT_H)
|
||||
lsf_check_include_file (unistd.h HAVE_UNISTD_H)
|
||||
|
||||
|
||||
lsf_check_type_size (double SIZEOF_DOUBLE)
|
||||
lsf_check_type_size (float SIZEOF_FLOAT)
|
||||
lsf_check_type_size (int SIZEOF_INT)
|
||||
lsf_check_type_size (int64_t SIZEOF_INT64_T)
|
||||
lsf_check_type_size (loff_t SIZEOF_LOFF_T)
|
||||
lsf_check_type_size (long SIZEOF_LONG)
|
||||
lsf_check_type_size (long\ long SIZEOF_LONG_LONG)
|
||||
lsf_check_type_size (offt64_t SIZEOF_OFF64_T)
|
||||
lsf_check_type_size (off_t SIZEOF_OFF_T)
|
||||
lsf_check_type_size (short SIZEOF_SHORT)
|
||||
lsf_check_type_size (size_t SIZEOF_SIZE_T)
|
||||
lsf_check_type_size (ssize_t SIZEOF_SSIZE_T)
|
||||
lsf_check_type_size (void* SIZEOF_VOIDP)
|
||||
lsf_check_type_size (wchar_t SIZEOF_WCHAR_T)
|
||||
|
||||
set (SIZEOF_SF_COUNT_T ${SIZEOF_INT64_T})
|
||||
set (TYPEOF_SF_COUNT_T int64_t)
|
||||
set (SF_COUNT_MAX 0x7fffffffffffffffll)
|
||||
|
||||
# Can't figure out how to make CMAKE_COMPILER_IS_GNUCC set something to either
|
||||
# 1 or 0 so we do this:
|
||||
lsf_try_compile_c_result (CMake/compiler_is_gcc.c COMPILER_IS_GCC 1 0)
|
||||
|
||||
lsf_try_compile_c_result (CMake/have_decl_s_irgrp.c HAVE_DECL_S_IRGRP 1 0)
|
||||
|
||||
TEST_BIG_ENDIAN (BIGENDIAN)
|
||||
if (${BIGENDIAN})
|
||||
set (WORDS_BIGENDIAN 1)
|
||||
set (CPU_IS_BIG_ENDIAN 1)
|
||||
set (CPU_IS_LITTLE_ENDIAN 0)
|
||||
else (${BIGENDIAN})
|
||||
set (WORDS_BIGENDIAN 0)
|
||||
set (CPU_IS_LITTLE_ENDIAN 1)
|
||||
set (CPU_IS_BIG_ENDIAN 0)
|
||||
endif (${BIGENDIAN})
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set (OS_IS_WIN32 1)
|
||||
set (USE_WINDOWS_API 1)
|
||||
set (USE_WINDOWS_API 1)
|
||||
set (WIN32_TARGET_DLL 1)
|
||||
set (__USE_MINGW_ANSI_STDIO 1)
|
||||
else (${WINDOWS})
|
||||
set (OS_IS_WIN32 0)
|
||||
set (USE_WINDOWS_API 0)
|
||||
set (USE_WINDOWS_API 0)
|
||||
set (WIN32_TARGET_DLL 0)
|
||||
set (__USE_MINGW_ANSI_STDIO 0)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
||||
set (OS_IS_OPENBSD 1)
|
||||
else ()
|
||||
set (OS_IS_OPENBSD 0)
|
||||
endif ()
|
||||
|
||||
lsf_check_library_exists (m floor "" HAVE_LIBM)
|
||||
lsf_check_library_exists (sqlite3 sqlite3_close "" HAVE_SQLITE3)
|
||||
|
||||
lsf_check_function_exists (calloc HAVE_CALLOC)
|
||||
lsf_check_function_exists (free HAVE_FREE)
|
||||
lsf_check_function_exists (fstat HAVE_FSTAT)
|
||||
lsf_check_function_exists (fstat64 HAVE_FSTAT64)
|
||||
lsf_check_function_exists (fsync HAVE_FSYNC)
|
||||
lsf_check_function_exists (ftruncate HAVE_FTRUNCATE)
|
||||
lsf_check_function_exists (getpagesize HAVE_GETPAGESIZE)
|
||||
lsf_check_function_exists (gettimeofday HAVE_GETTIMEOFDAY)
|
||||
lsf_check_function_exists (gmtime HAVE_GMTIME)
|
||||
lsf_check_function_exists (gmtime_r HAVE_GMTIME_R)
|
||||
lsf_check_function_exists (localtime HAVE_LOCALTIME)
|
||||
lsf_check_function_exists (localtime_r HAVE_LOCALTIME_R)
|
||||
lsf_check_function_exists (lseek HAVE_LSEEK)
|
||||
lsf_check_function_exists (lseek64 HAVE_LSEEK64)
|
||||
lsf_check_function_exists (malloc HAVE_MALLOC)
|
||||
lsf_check_function_exists (mmap HAVE_MMAP)
|
||||
lsf_check_function_exists (open HAVE_OPEN)
|
||||
lsf_check_function_exists (pipe HAVE_PIPE)
|
||||
lsf_check_function_exists (read HAVE_READ)
|
||||
lsf_check_function_exists (realloc HAVE_REALLOC)
|
||||
lsf_check_function_exists (setlocale HAVE_SETLOCALE)
|
||||
lsf_check_function_exists (snprintf HAVE_SNPRINTF)
|
||||
lsf_check_function_exists (vsnprintf HAVE_VSNPRINTF)
|
||||
lsf_check_function_exists (waitpid HAVE_WAITPID)
|
||||
lsf_check_function_exists (write HAVE_WRITE)
|
||||
|
||||
lsf_check_math_function_exists (ceil HAVE_CEIL)
|
||||
lsf_check_math_function_exists (floor HAVE_FLOOR)
|
||||
lsf_check_math_function_exists (fmod HAVE_FMOD)
|
||||
lsf_check_math_function_exists (lrint HAVE_LRINT)
|
||||
lsf_check_math_function_exists (lrintf HAVE_LRINTF)
|
||||
lsf_check_math_function_exists (lround HAVE_LROUND)
|
|
@ -0,0 +1,334 @@
|
|||
# CMakeLists.txt for libsndfile
|
||||
|
||||
cmake_minimum_required (VERSION 3.0.0)
|
||||
|
||||
project (libsndfile)
|
||||
|
||||
# We may need these programs so detect them now.
|
||||
find_program (AUTOGEN autogen)
|
||||
find_program (AUTOHEADER autoheader)
|
||||
find_program (GREP grep)
|
||||
find_program (SED sed)
|
||||
find_program (WC wc)
|
||||
|
||||
include (CMake/file.cmake)
|
||||
|
||||
# Duplicate the autoconf/autoheader functionality.
|
||||
|
||||
# Get the version number from configure.ac.
|
||||
execute_process (
|
||||
COMMAND ${GREP} ^AC_INIT configure.ac
|
||||
COMMAND ${SED} "s/.*libsndfile[^0-9]*//;s/\\].*//"
|
||||
OUTPUT_VARIABLE LIB_VERSION
|
||||
)
|
||||
|
||||
string (STRIP ${LIB_VERSION} LIB_VERSION)
|
||||
string (REGEX REPLACE "\\..*" "" LIB_VERSION_MAJOR ${LIB_VERSION})
|
||||
|
||||
message (STATUS "libsndfile version : ${LIB_VERSION}")
|
||||
|
||||
# Generate config.h.in if it does not already exist.
|
||||
if (NOT (EXISTS "${CMAKE_SOURCE_DIR}/CMakeFiles/config.h.in"))
|
||||
if (NOT AUTOHEADER)
|
||||
message (FATAL_ERROR "Need autoheader (part of GNU autoconf) to proceed.")
|
||||
endif ()
|
||||
|
||||
message (STATUS "Running autoheader to create src/config.h.in")
|
||||
execute_process (COMMAND ${AUTOHEADER} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
|
||||
assert_line_count_non_zero ("${CMAKE_SOURCE_DIR}/src/config.h.in")
|
||||
|
||||
message (STATUS "Post processing src/config.h.in")
|
||||
execute_process (
|
||||
COMMAND ${SED} -E "s/undef([ \\t]+)([a-zA-Z0-8_]+)/define\\1\\2\\1@\\2@/" src/config.h.in
|
||||
COMMAND ${SED} "s/.*_FILE_OFFSET_BITS.*//"
|
||||
OUTPUT_FILE ${CMAKE_SOURCE_DIR}/CMakeFiles/config.h.in
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
execute_process (
|
||||
COMMAND ${GREP} -c undef ${CMAKE_SOURCE_DIR}/CMakeFiles/config.h.in
|
||||
OUTPUT_VARIABLE undef_count
|
||||
)
|
||||
|
||||
if (${undef_count} GREATER 0)
|
||||
message (FATAL_ERROR "CMake processing of CMakeFIles/config.h.in has failed.")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
assert_line_count_non_zero ("${CMAKE_SOURCE_DIR}/CMakeFiles/config.h.in")
|
||||
|
||||
# Use autogen to generate files if they don't already exist.
|
||||
include (CMake/autogen.cmake)
|
||||
lsf_autogen (src test_endswap)
|
||||
lsf_autogen (tests pcm_test)
|
||||
lsf_autogen (tests utils)
|
||||
lsf_autogen (tests floating_point_test)
|
||||
lsf_autogen (tests header_test)
|
||||
lsf_autogen (tests pipe_test)
|
||||
lsf_autogen (tests write_read_test)
|
||||
lsf_autogen (tests scale_clip_test)
|
||||
lsf_autogen (tests rdwr_test)
|
||||
lsf_autogen (tests benchmark)
|
||||
|
||||
if (DEFINED ENV{CC})
|
||||
set (CMAKE_C_COMPILER $ENV{CC})
|
||||
endif()
|
||||
|
||||
if (DEFINED ENV{CXX})
|
||||
set (CMAKE_CXX_COMPILER $ENV{CXX})
|
||||
endif()
|
||||
|
||||
message (STATUS "System : ${CMAKE_SYSTEM_NAME}")
|
||||
message (STATUS "Processor : ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
message (STATUS "C compiler : ${CMAKE_C_COMPILER_ID}")
|
||||
message (STATUS "C++ compiler : ${CMAKE_CXX_COMPILER_ID}")
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
set (PACKAGE \"libsndfile\")
|
||||
set (PACKAGE_NAME \"libsndfile\")
|
||||
set (VERSION \"${LIB_VERSION}\")
|
||||
set (PACKAGE_VERSION \"${LIB_VERSION}\")
|
||||
|
||||
set (BASEPATH "${CMAKE_SOURCE_DIR}")
|
||||
|
||||
include (CMake/build.cmake)
|
||||
include (CMake/external_libs.cmake)
|
||||
include (CMake/libsndfile.cmake)
|
||||
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -std=gnu99 -Wall -Wextra" CACHE STRING "" FORCE)
|
||||
set (CMAKE_CXX__FLAGS "${CMAKE_C_FLAGS} -O3 -std=gnu99 -Wall -Wextra" CACHE STRING "" FORCE)
|
||||
|
||||
set (COMPILER_IS_GCC 1)
|
||||
set (_POSIX_SOURCE 1)
|
||||
|
||||
if (${Werror} MATCHES "on")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror" CACHE STRING "" FORCE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
# Untested. Probably does not work. Patches accepted.
|
||||
|
||||
set (CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4996" CACHE STRING "" FORCE)
|
||||
add_definitions ("/wd4244 /wd4996")
|
||||
endif ()
|
||||
|
||||
|
||||
# Need to actually detect this.
|
||||
set (CPU_CLIPS_POSITIVE 0)
|
||||
set (CPU_CLIPS_NEGATIVE 0)
|
||||
|
||||
set (ENABLE_EXPERIMENTAL_CODE 0)
|
||||
|
||||
find_external_xiph_libs (HAVE_EXTERNAL_XIPH_LIBS EXTERNAL_XIPH_CFLAGS EXTERNAL_XIPH_LIBS)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Project definitions follow.
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/sndfile.h.in ${CMAKE_SOURCE_DIR}/src/sndfile.h)
|
||||
configure_file (${CMAKE_SOURCE_DIR}/CMakeFiles/config.h.in ${CMAKE_SOURCE_DIR}/src/config.h)
|
||||
|
||||
include_directories (src)
|
||||
|
||||
set (libsndfile_sources
|
||||
src/ALAC/ALACBitUtilities.c
|
||||
src/ALAC/ag_dec.c
|
||||
src/ALAC/ag_enc.c
|
||||
src/ALAC/alac_decoder.c
|
||||
src/ALAC/alac_encoder.c
|
||||
src/ALAC/dp_dec.c
|
||||
src/ALAC/dp_enc.c
|
||||
src/ALAC/matrix_dec.c
|
||||
src/ALAC/matrix_enc.c
|
||||
|
||||
src/G72x/g721.c
|
||||
src/G72x/g723_16.c
|
||||
src/G72x/g723_24.c
|
||||
src/G72x/g723_40.c
|
||||
src/G72x/g72x.c
|
||||
src/G72x/g72x_test.c
|
||||
|
||||
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/aiff.c
|
||||
src/alac.c
|
||||
src/alaw.c
|
||||
src/au.c
|
||||
src/audio_detect.c
|
||||
src/avr.c
|
||||
src/broadcast.c
|
||||
src/caf.c
|
||||
src/cart.c
|
||||
src/chanmap.c
|
||||
src/chunk.c
|
||||
src/command.c
|
||||
src/common.c
|
||||
src/dither.c
|
||||
src/double64.c
|
||||
src/dwd.c
|
||||
src/dwvw.c
|
||||
src/file_io.c
|
||||
src/flac.c
|
||||
src/float32.c
|
||||
src/g72x.c
|
||||
src/gsm610.c
|
||||
src/htk.c
|
||||
src/id3.c
|
||||
src/ima_adpcm.c
|
||||
src/ima_oki_adpcm.c
|
||||
src/interleave.c
|
||||
src/ircam.c
|
||||
src/macos.c
|
||||
src/mat4.c
|
||||
src/mat5.c
|
||||
src/mpc2k.c
|
||||
src/ms_adpcm.c
|
||||
src/nist.c
|
||||
src/ogg.c
|
||||
src/ogg_opus.c
|
||||
src/ogg_pcm.c
|
||||
src/ogg_speex.c
|
||||
src/ogg_vorbis.c
|
||||
src/paf.c
|
||||
src/pcm.c
|
||||
src/pvf.c
|
||||
src/raw.c
|
||||
src/rf64.c
|
||||
src/rx2.c
|
||||
src/sd2.c
|
||||
src/sds.c
|
||||
src/sndfile.c
|
||||
src/strings.c
|
||||
src/svx.c
|
||||
src/txw.c
|
||||
src/ulaw.c
|
||||
src/voc.c
|
||||
src/vox_adpcm.c
|
||||
src/w64.c
|
||||
src/wav.c
|
||||
src/wavlike.c
|
||||
src/windows.c
|
||||
src/wve.c
|
||||
src/xi.c
|
||||
)
|
||||
|
||||
add_library (sndfile SHARED
|
||||
${libsndfile_sources}
|
||||
)
|
||||
|
||||
target_link_libraries (sndfile LINK_PRIVATE ${EXTERNAL_XIPH_LIBS} LINK_PUBLIC m)
|
||||
|
||||
set_target_properties (sndfile
|
||||
PROPERTIES
|
||||
VERSION ${LIB_VERSION}
|
||||
SOVERSION ${LIB_VERSION_MAJOR}
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Programs.
|
||||
|
||||
lsf_build_program (sndfile-cmp)
|
||||
lsf_build_program (sndfile-concat)
|
||||
lsf_build_program (sndfile-convert)
|
||||
lsf_build_program (sndfile-deinterleave)
|
||||
lsf_build_program (sndfile-info)
|
||||
lsf_build_program (sndfile-interleave)
|
||||
lsf_build_program (sndfile-metadata-get)
|
||||
lsf_build_program (sndfile-metadata-set)
|
||||
lsf_build_program (sndfile-salvage)
|
||||
lsf_build_program_extra (sndfile-play asound)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Tests.
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/tests/test_wrapper.sh.in ${CMAKE_SOURCE_DIR}/tests/test_wrapper.sh)
|
||||
configure_file (${CMAKE_SOURCE_DIR}/tests/pedantic-header-test.sh.in ${CMAKE_SOURCE_DIR}/tests/pedantic-header-test.sh)
|
||||
|
||||
add_custom_target (check
|
||||
COMMAND src/test_main && bash tests/test_wrapper.sh
|
||||
DEPENDS src/test_main tests/test_wrapper.sh
|
||||
)
|
||||
|
||||
# Tests from the src/ directory.
|
||||
set (src_test_sources
|
||||
src/audio_detect.c
|
||||
src/broadcast.c
|
||||
src/cart.c
|
||||
src/common.c
|
||||
src/double64.c
|
||||
src/file_io.c
|
||||
src/float32.c
|
||||
src/test_audio_detect.c
|
||||
src/test_broadcast_var.c
|
||||
src/test_cart_var.c
|
||||
src/test_conversions.c
|
||||
src/test_endswap.c
|
||||
src/test_file_io.c
|
||||
src/test_float.c
|
||||
src/test_ima_oki_adpcm.c
|
||||
src/test_log_printf.c
|
||||
src/test_strncpy_crlf.c
|
||||
)
|
||||
|
||||
lsf_build_src_test_c (test_main "${src_test_sources}")
|
||||
|
||||
# Tests from the tests/ directory.
|
||||
|
||||
lsf_build_test_c (aiff_rw_test "")
|
||||
lsf_build_test_c (alaw_test "")
|
||||
lsf_build_test_c (benchmark "")
|
||||
lsf_build_test_c (channel_test "")
|
||||
lsf_build_test_c (checksum_test "")
|
||||
lsf_build_test_c (chunk_test "")
|
||||
lsf_build_test_c (command_test "")
|
||||
lsf_build_test_c (compression_size_test "")
|
||||
lsf_build_test_cc (cpp_test "")
|
||||
lsf_build_test_c (dither_test "")
|
||||
lsf_build_test_c (dwvw_test "")
|
||||
lsf_build_test_c (error_test "")
|
||||
lsf_build_test_c (external_libs_test "")
|
||||
lsf_build_test_c (fix_this "")
|
||||
lsf_build_test_c (floating_point_test "tests/dft_cmp.c")
|
||||
lsf_build_test_c (format_check_test "")
|
||||
lsf_build_test_c (headerless_test "")
|
||||
lsf_build_test_c (header_test "")
|
||||
lsf_build_test_c (largefile_test "")
|
||||
lsf_build_test_c (locale_test "")
|
||||
lsf_build_test_c (lossy_comp_test "")
|
||||
lsf_build_test_c (long_read_write_test "")
|
||||
lsf_build_test_c (misc_test "")
|
||||
lsf_build_test_c (multi_file_test "")
|
||||
lsf_build_test_c (ogg_test "")
|
||||
lsf_build_test_c (pcm_test "")
|
||||
lsf_build_test_c (peak_chunk_test "")
|
||||
lsf_build_test_c (pipe_test "")
|
||||
lsf_build_test_c (raw_test "")
|
||||
lsf_build_test_c (rdwr_test "")
|
||||
lsf_build_test_c (scale_clip_test "")
|
||||
lsf_build_test_c (sfversion "")
|
||||
lsf_build_test_c (stdin_test "")
|
||||
lsf_build_test_c (stdio_test "")
|
||||
lsf_build_test_c (stdout_test "")
|
||||
lsf_build_test_c (string_test "")
|
||||
lsf_build_test_c (ulaw_test "")
|
||||
lsf_build_test_c (virtual_io_test "")
|
||||
lsf_build_test_c (win32_ordinal_test "")
|
||||
lsf_build_test_c (win32_test "")
|
||||
lsf_build_test_c (write_read_test "tests/generate.c")
|
|
@ -0,0 +1,503 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
|
@ -0,0 +1,270 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for Microsoft lib.exe
|
||||
|
||||
me=ar-lib
|
||||
scriptversion=2012-03-01.08; # UTC
|
||||
|
||||
# Copyright (C) 2010-2014 Free Software Foundation, Inc.
|
||||
# Written by Peter Rosin <peda@lysator.liu.se>.
|
||||
#
|
||||
# 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 2, 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
|
||||
# func_error message
|
||||
func_error ()
|
||||
{
|
||||
echo "$me: $1" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv in
|
||||
mingw)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_at_file at_file operation archive
|
||||
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
|
||||
# for each of them.
|
||||
# When interpreting the content of the @FILE, do NOT use func_file_conv,
|
||||
# since the user would need to supply preconverted file names to
|
||||
# binutils ar, at least for MinGW.
|
||||
func_at_file ()
|
||||
{
|
||||
operation=$2
|
||||
archive=$3
|
||||
at_file_contents=`cat "$1"`
|
||||
eval set x "$at_file_contents"
|
||||
shift
|
||||
|
||||
for member
|
||||
do
|
||||
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
|
||||
done
|
||||
}
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
func_error "no command. Try '$0 --help' for more information."
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<EOF
|
||||
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
|
||||
|
||||
Members may be specified in a file named with @FILE.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "$me, version $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test $# -lt 3; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
|
||||
AR=$1
|
||||
shift
|
||||
while :
|
||||
do
|
||||
if test $# -lt 2; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
case $1 in
|
||||
-lib | -LIB \
|
||||
| -ltcg | -LTCG \
|
||||
| -machine* | -MACHINE* \
|
||||
| -subsystem* | -SUBSYSTEM* \
|
||||
| -verbose | -VERBOSE \
|
||||
| -wx* | -WX* )
|
||||
AR="$AR $1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
action=$1
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
orig_archive=$1
|
||||
shift
|
||||
func_file_conv "$orig_archive"
|
||||
archive=$file
|
||||
|
||||
# strip leading dash in $action
|
||||
action=${action#-}
|
||||
|
||||
delete=
|
||||
extract=
|
||||
list=
|
||||
quick=
|
||||
replace=
|
||||
index=
|
||||
create=
|
||||
|
||||
while test -n "$action"
|
||||
do
|
||||
case $action in
|
||||
d*) delete=yes ;;
|
||||
x*) extract=yes ;;
|
||||
t*) list=yes ;;
|
||||
q*) quick=yes ;;
|
||||
r*) replace=yes ;;
|
||||
s*) index=yes ;;
|
||||
S*) ;; # the index is always updated implicitly
|
||||
c*) create=yes ;;
|
||||
u*) ;; # TODO: don't ignore the update modifier
|
||||
v*) ;; # TODO: don't ignore the verbose modifier
|
||||
*)
|
||||
func_error "unknown action specified"
|
||||
;;
|
||||
esac
|
||||
action=${action#?}
|
||||
done
|
||||
|
||||
case $delete$extract$list$quick$replace,$index in
|
||||
yes,* | ,yes)
|
||||
;;
|
||||
yesyes*)
|
||||
func_error "more than one action specified"
|
||||
;;
|
||||
*)
|
||||
func_error "no action specified"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$delete"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -REMOVE "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
elif test -n "$extract"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
if test $# -gt 0; then
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -EXTRACT "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
fi
|
||||
|
||||
elif test -n "$quick$replace"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
if test -z "$create"; then
|
||||
echo "$me: creating $orig_archive"
|
||||
fi
|
||||
orig_archive=
|
||||
else
|
||||
orig_archive=$archive
|
||||
fi
|
||||
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_file_conv "${1#@}"
|
||||
set x "$@" "@$file"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
set x "$@" "$file"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
shift
|
||||
done
|
||||
|
||||
if test -n "$orig_archive"; then
|
||||
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
|
||||
else
|
||||
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
|
||||
fi
|
||||
|
||||
elif test -n "$list"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
$AR -NOLOGO -LIST "$archive" || exit $?
|
||||
fi
|
|
@ -0,0 +1,347 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.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 2, 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,791 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
|
||||
# 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 2, 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -0,0 +1,508 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2014-09-12.12; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
# $RANDOM is not portable (e.g. dash); use it when possible to
|
||||
# lower collision chance
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
# As "mkdir -p" follows symlinks and we work in /tmp possibly; so
|
||||
# create the $tmpdir first (and fail if unsuccessful) to make sure
|
||||
# that nobody tries to guess the $tmpdir name.
|
||||
if (umask $mkdir_umask &&
|
||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
test_tmpdir="$tmpdir/a"
|
||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,215 @@
|
|||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# 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 2, 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -0,0 +1,370 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell command `./configure && make && make install'
|
||||
should configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
|
@ -0,0 +1,5 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = add_cflags.m4 clip_mode.m4 endian.m4 \
|
||||
flexible_array.m4 llrint.m4 lrint.m4 lrintf.m4 octave.m4 extra_pkg.m4 visibility.m4
|
||||
|
|
@ -0,0 +1,513 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = M4
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/M4/add_cflags.m4 \
|
||||
$(top_srcdir)/M4/add_cxxflags.m4 \
|
||||
$(top_srcdir)/M4/ax_add_fortify_source.m4 \
|
||||
$(top_srcdir)/M4/clang.m4 $(top_srcdir)/M4/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/gcc_version.m4 $(top_srcdir)/M4/libtool.m4 \
|
||||
$(top_srcdir)/M4/lrint.m4 $(top_srcdir)/M4/lrintf.m4 \
|
||||
$(top_srcdir)/M4/ltoptions.m4 $(top_srcdir)/M4/ltsugar.m4 \
|
||||
$(top_srcdir)/M4/ltversion.m4 $(top_srcdir)/M4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/M4/mkoctfile_version.m4 \
|
||||
$(top_srcdir)/M4/octave.m4 $(top_srcdir)/M4/really_gcc.m4 \
|
||||
$(top_srcdir)/M4/stack_protect.m4 \
|
||||
$(top_srcdir)/M4/visibility.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
|
||||
CLEAN_VERSION = @CLEAN_VERSION@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXTERNAL_XIPH_CFLAGS = @EXTERNAL_XIPH_CFLAGS@
|
||||
EXTERNAL_XIPH_LIBS = @EXTERNAL_XIPH_LIBS@
|
||||
FGREP = @FGREP@
|
||||
FLAC_CFLAGS = @FLAC_CFLAGS@
|
||||
FLAC_LIBS = @FLAC_LIBS@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GCC_MINOR_VERSION = @GCC_MINOR_VERSION@
|
||||
GCC_VERSION = @GCC_VERSION@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_EXTERNAL_XIPH_LIBS = @HAVE_EXTERNAL_XIPH_LIBS@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_VISIBILITY = @HAVE_VISIBILITY@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
HAVE_XCODE_SELECT = @HAVE_XCODE_SELECT@
|
||||
HOST_TRIPLET = @HOST_TRIPLET@
|
||||
HTML_BGCOLOUR = @HTML_BGCOLOUR@
|
||||
HTML_FGCOLOUR = @HTML_FGCOLOUR@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MKOCTFILE = @MKOCTFILE@
|
||||
MKOCTFILE_VERSION = @MKOCTFILE_VERSION@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OCTAVE = @OCTAVE@
|
||||
OCTAVE_CONFIG = @OCTAVE_CONFIG@
|
||||
OCTAVE_CONFIG_VERSION = @OCTAVE_CONFIG_VERSION@
|
||||
OCTAVE_DEST_MDIR = @OCTAVE_DEST_MDIR@
|
||||
OCTAVE_DEST_ODIR = @OCTAVE_DEST_ODIR@
|
||||
OCTAVE_VERSION = @OCTAVE_VERSION@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
OS_SPECIFIC_CFLAGS = @OS_SPECIFIC_CFLAGS@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SF_COUNT_MAX = @SF_COUNT_MAX@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
|
||||
SIZEOF_SF_COUNT_T = @SIZEOF_SF_COUNT_T@
|
||||
SNDIO_LIBS = @SNDIO_LIBS@
|
||||
SPEEX_CFLAGS = @SPEEX_CFLAGS@
|
||||
SPEEX_LIBS = @SPEEX_LIBS@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
SRC_BINDIR = @SRC_BINDIR@
|
||||
STRIP = @STRIP@
|
||||
TEST_BINDIR = @TEST_BINDIR@
|
||||
TYPEOF_SF_COUNT_T = @TYPEOF_SF_COUNT_T@
|
||||
VERSION = @VERSION@
|
||||
VORBISENC_CFLAGS = @VORBISENC_CFLAGS@
|
||||
VORBISENC_LIBS = @VORBISENC_LIBS@
|
||||
VORBIS_CFLAGS = @VORBIS_CFLAGS@
|
||||
VORBIS_LIBS = @VORBIS_LIBS@
|
||||
WIN_RC_VERSION = @WIN_RC_VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = add_cflags.m4 clip_mode.m4 endian.m4 \
|
||||
flexible_array.m4 llrint.m4 lrint.m4 lrintf.m4 octave.m4 extra_pkg.m4 visibility.m4
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu M4/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu M4/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,18 @@
|
|||
dnl @synopsis MN_ADD_CFLAGS
|
||||
dnl
|
||||
dnl Add the given option to CFLAGS, if it doesn't break the compiler
|
||||
|
||||
AC_DEFUN([MN_ADD_CFLAGS],
|
||||
[AC_MSG_CHECKING([if $CC accepts $1])
|
||||
ac_add_cflags__old_cflags="$CFLAGS"
|
||||
CFLAGS="$1"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
],
|
||||
[puts("Hello, World!"); return 0;],
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$ac_add_cflags__old_cflags $1",
|
||||
AC_MSG_RESULT([no])
|
||||
CFLAGS="$ac_add_cflags__old_cflags"
|
||||
)
|
||||
])# MN_ADD_CFLAGS
|
|
@ -0,0 +1,19 @@
|
|||
dnl @synopsis MN_ADD_CXXFLAGS
|
||||
dnl
|
||||
dnl Add the given option to CXXFLAGS, if it doesn't break the compiler
|
||||
|
||||
AC_DEFUN([MN_ADD_CXXFLAGS],
|
||||
[AC_MSG_CHECKING([if $CXX accepts $1])
|
||||
AC_LANG_ASSERT([C++])
|
||||
ac_add_cxxflags__old_cxxflags="$CXXFLAGS"
|
||||
CXXFLAGS="$1"
|
||||
AC_TRY_LINK([
|
||||
#include <cstdio>
|
||||
],
|
||||
[puts("Hello, World!"); return 0;],
|
||||
AC_MSG_RESULT([yes])
|
||||
CXXFLAGS="$ac_add_cxxflags__old_cxxflags $1",
|
||||
AC_MSG_RESULT([no])
|
||||
CXXFLAGS="$ac_add_cxxflags__old_cxxflags"
|
||||
)
|
||||
])# MN_ADD_CXXFLAGS
|
|
@ -0,0 +1,53 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_add_fortify_source.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_ADD_FORTIFY_SOURCE
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check whether -D_FORTIFY_SOURCE=2 can be added to CPPFLAGS without macro
|
||||
# redefinition warnings. Some distributions (such as Gentoo Linux) enable
|
||||
# _FORTIFY_SOURCE globally in their compilers, leading to unnecessary
|
||||
# warnings in the form of
|
||||
#
|
||||
# <command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
|
||||
# <built-in>: note: this is the location of the previous definition
|
||||
#
|
||||
# which is a problem if -Werror is enabled. This macro checks whether
|
||||
# _FORTIFY_SOURCE is already defined, and if not, adds -D_FORTIFY_SOURCE=2
|
||||
# to CPPFLAGS.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2017 David Seifert <soap@gentoo.org>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 1
|
||||
|
||||
AC_DEFUN([AX_ADD_FORTIFY_SOURCE],[
|
||||
AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS])
|
||||
AC_LINK_IFELSE([
|
||||
AC_LANG_SOURCE(
|
||||
[[
|
||||
int main() {
|
||||
#ifndef _FORTIFY_SOURCE
|
||||
return 0;
|
||||
#else
|
||||
this_is_an_error;
|
||||
#endif
|
||||
}
|
||||
]]
|
||||
)], [
|
||||
AC_MSG_RESULT([yes])
|
||||
CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
|
@ -0,0 +1,31 @@
|
|||
dnl @synopsis MN_C_COMPILER_IS_CLANG
|
||||
dnl
|
||||
dnl Find out if a compiler claiming to be gcc really is gcc (fuck you clang).
|
||||
dnl @version 1.0 Oct 31 2013
|
||||
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_C_COMPILER_IS_CLANG],
|
||||
[AC_CACHE_CHECK(whether we are using the CLANG C compiler,
|
||||
mn_cv_c_compiler_clang,
|
||||
[ AC_LANG_ASSERT(C)
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
],
|
||||
[
|
||||
#ifndef __clang__
|
||||
This is not clang!
|
||||
#endif
|
||||
],
|
||||
mn_cv_c_compiler_clang=yes,
|
||||
mn_cv_c_compiler_clang=no
|
||||
])
|
||||
)
|
||||
])
|
|
@ -0,0 +1,124 @@
|
|||
dnl @synopsis MN_C_CLIP_MODE
|
||||
dnl
|
||||
dnl Determine the clipping mode when converting float to int.
|
||||
dnl @version 1.0 May 17 2003
|
||||
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 Find the clipping mode in the following way:
|
||||
dnl 1) If we are not cross compiling test it.
|
||||
dnl 2) IF we are cross compiling, assume that clipping isn't done correctly.
|
||||
|
||||
AC_DEFUN([MN_C_CLIP_MODE],
|
||||
[AC_CACHE_CHECK(processor clipping capabilities,
|
||||
ac_cv_c_clip_type,
|
||||
|
||||
# Initialize to unknown
|
||||
ac_cv_c_clip_positive=unknown
|
||||
ac_cv_c_clip_negative=unknown
|
||||
|
||||
|
||||
if test $ac_cv_c_clip_positive = unknown ; then
|
||||
AC_TRY_RUN(
|
||||
[[
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
#include <math.h>
|
||||
int main (void)
|
||||
{ double fval ;
|
||||
int k, ival ;
|
||||
|
||||
fval = 1.0 * 0x7FFFFFFF ;
|
||||
for (k = 0 ; k < 100 ; k++)
|
||||
{ ival = (lrint (fval)) >> 24 ;
|
||||
if (ival != 127)
|
||||
return 1 ;
|
||||
|
||||
fval *= 1.2499999 ;
|
||||
} ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
]],
|
||||
ac_cv_c_clip_positive=yes,
|
||||
ac_cv_c_clip_positive=no,
|
||||
ac_cv_c_clip_positive=unknown
|
||||
)
|
||||
|
||||
AC_TRY_RUN(
|
||||
[[
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
#include <math.h>
|
||||
int main (void)
|
||||
{ double fval ;
|
||||
int k, ival ;
|
||||
|
||||
fval = -8.0 * 0x10000000 ;
|
||||
for (k = 0 ; k < 100 ; k++)
|
||||
{ ival = (lrint (fval)) >> 24 ;
|
||||
if (ival != -128)
|
||||
return 1 ;
|
||||
|
||||
fval *= 1.2499999 ;
|
||||
} ;
|
||||
|
||||
return 0 ;
|
||||
}
|
||||
]],
|
||||
ac_cv_c_clip_negative=yes,
|
||||
ac_cv_c_clip_negative=no,
|
||||
ac_cv_c_clip_negative=unknown
|
||||
)
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_clip_positive = yes ; then
|
||||
ac_cv_c_clip_positive=1
|
||||
else
|
||||
ac_cv_c_clip_positive=0
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_clip_negative = yes ; then
|
||||
ac_cv_c_clip_negative=1
|
||||
else
|
||||
ac_cv_c_clip_negative=0
|
||||
fi
|
||||
|
||||
[[
|
||||
case "$ac_cv_c_clip_positive$ac_cv_c_clip_negative" in
|
||||
"00")
|
||||
ac_cv_c_clip_type="none"
|
||||
;;
|
||||
"10")
|
||||
ac_cv_c_clip_type="positive"
|
||||
;;
|
||||
"01")
|
||||
ac_cv_c_clip_type="negative"
|
||||
;;
|
||||
"11")
|
||||
ac_cv_c_clip_type="both"
|
||||
;;
|
||||
esac
|
||||
]]
|
||||
|
||||
)
|
||||
]
|
||||
|
||||
)# MN_C_CLIP_MODE
|
||||
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
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
|
||||
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
# extra_pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (c) 2008-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
# Copyright (c) 2004 Scott James Remnant <scott@netsplit.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 2 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, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# --------------------------------------------------------------
|
||||
# PKG_CHECK_MOD_VERSION(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||
# [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# This is a very slight modification to the macro PKG_CHECK_MODULES that
|
||||
# is in the original pkg.m4 file. It prints the versions in the checking
|
||||
# message (erikd@mega-nerd.com).
|
||||
|
||||
AC_DEFUN([PKG_CHECK_MOD_VERSION],
|
||||
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||
|
||||
pkg_failed=no
|
||||
AC_MSG_CHECKING([for $2 ])
|
||||
|
||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||
|
||||
pkg_link_saved_CFLAGS=$CFLAGS
|
||||
pkg_link_saved_LIBS=$LIBS
|
||||
|
||||
eval "pkg_CFLAGS=\${pkg_cv_[]$1[]_CFLAGS}"
|
||||
eval "pkg_LIBS=\${pkg_cv_[]$1[]_LIBS}"
|
||||
|
||||
CFLAGS="$CFLAGS $pkg_CFLAGS"
|
||||
LIBS="$LIBS $pkg_LIBS"
|
||||
|
||||
AC_TRY_LINK([], puts ("");, pkg_link=yes, pkg_link=no)
|
||||
|
||||
CFLAGS=$pkg_link_saved_CFLAGS
|
||||
LIBS=$pkg_link_saved_LIBS
|
||||
|
||||
if test $pkg_link = no ; then
|
||||
$as_echo_n "link failed ... "
|
||||
pkg_failed=yes
|
||||
fi
|
||||
|
||||
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.])
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
_PKG_SHORT_ERRORS_SUPPORTED
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
|
||||
else
|
||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||
|
||||
ifelse([$4], , [AC_MSG_ERROR(dnl
|
||||
[Package requirements ($2) were not met:
|
||||
|
||||
$$1_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
_PKG_TEXT
|
||||
])],
|
||||
[AC_MSG_RESULT([no])
|
||||
$4])
|
||||
elif test $pkg_failed = untried; then
|
||||
ifelse([$4], , [AC_MSG_FAILURE(dnl
|
||||
[The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
|
||||
[$4])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||
AC_MSG_RESULT([yes])
|
||||
ifelse([$3], , :, [$3])
|
||||
fi[]dnl
|
||||
])# PKG_CHECK_MOD_VERSION
|
|
@ -0,0 +1,32 @@
|
|||
dnl @synopsis MN_C99_FLEXIBLE_ARRAY
|
||||
dnl
|
||||
dnl Dose the compiler support the 1999 ISO C Standard "stuct hack".
|
||||
dnl @version 1.1 Mar 15 2004
|
||||
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.
|
||||
|
||||
AC_DEFUN([MN_C99_FLEXIBLE_ARRAY],
|
||||
[AC_CACHE_CHECK(C99 struct flexible array support,
|
||||
ac_cv_c99_flexible_array,
|
||||
|
||||
# Initialize to unknown
|
||||
ac_cv_c99_flexible_array=no
|
||||
|
||||
AC_TRY_LINK([[
|
||||
#include <stdlib.h>
|
||||
typedef struct {
|
||||
int k;
|
||||
char buffer [] ;
|
||||
} MY_STRUCT ;
|
||||
]],
|
||||
[ MY_STRUCT *p = calloc (1, sizeof (MY_STRUCT) + 42); ],
|
||||
ac_cv_c99_flexible_array=yes,
|
||||
ac_cv_c99_flexible_array=no
|
||||
))]
|
||||
) # MN_C99_FLEXIBLE_ARRAY
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
dnl @synopsis MN_GCC_VERSION
|
||||
dnl
|
||||
dnl Find the version of gcc.
|
||||
dnl @version 1.0 Nov 05 2007
|
||||
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_GCC_VERSION],
|
||||
[
|
||||
if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
|
||||
|
||||
AC_MSG_CHECKING([for version of $CC])
|
||||
GCC_VERSION=`$CC -dumpversion`
|
||||
AC_MSG_RESULT($GCC_VERSION)
|
||||
|
||||
changequote(,)dnl
|
||||
GCC_MAJOR_VERSION=`echo $GCC_VERSION | sed "s/\..*//"`
|
||||
GCC_MINOR_VERSION=`echo $GCC_VERSION | sed "s/$GCC_MAJOR_VERSION\.//" | sed "s/\..*//"`
|
||||
changequote([,])dnl
|
||||
fi
|
||||
|
||||
AC_SUBST(GCC_VERSION)
|
||||
AC_SUBST(GCC_MAJOR_VERSION)
|
||||
AC_SUBST(GCC_MINOR_VERSION)
|
||||
|
||||
])# MN_GCC_VERSION
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,38 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,437 @@
|
|||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
|
@ -0,0 +1,124 @@
|
|||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59, which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
|
@ -0,0 +1,23 @@
|
|||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4179 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
|
@ -0,0 +1,99 @@
|
|||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
|
@ -0,0 +1,38 @@
|
|||
dnl @synopsis OCTAVE_MKOCTFILE_VERSION
|
||||
dnl
|
||||
dnl Find the version of mkoctfile.
|
||||
dnl @version 1.0 Aug 23 2007
|
||||
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([OCTAVE_MKOCTFILE_VERSION],
|
||||
[
|
||||
|
||||
|
||||
AC_ARG_WITH(mkoctfile,
|
||||
AC_HELP_STRING([--with-mkoctfile], [choose the mkoctfile version]),
|
||||
[ with_mkoctfile=$withval ])
|
||||
|
||||
test -z "$with_mkoctfile" && with_mkoctfile=mkoctfile
|
||||
|
||||
AC_CHECK_PROG(HAVE_MKOCTFILE,$with_mkoctfile,yes,no)
|
||||
|
||||
if test "x$ac_cv_prog_HAVE_MKOCTFILE" = "xyes" ; then
|
||||
MKOCTFILE=$with_mkoctfile
|
||||
|
||||
AC_MSG_CHECKING([for version of $MKOCTFILE])
|
||||
MKOCTFILE_VERSION=`$with_mkoctfile --version 2>&1 | sed 's/mkoctfile, version //g'`
|
||||
AC_MSG_RESULT($MKOCTFILE_VERSION)
|
||||
fi
|
||||
|
||||
AC_SUBST(MKOCTFILE)
|
||||
AC_SUBST(MKOCTFILE_VERSION)
|
||||
|
||||
])# OCTAVE_MKOCTFILE_VERSION
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
dnl Evaluate an expression in octave
|
||||
dnl
|
||||
dnl OCTAVE_EVAL(expr,var) -> var=expr
|
||||
dnl
|
||||
dnl Stolen from octave-forge
|
||||
|
||||
AC_DEFUN([OCTAVE_EVAL],
|
||||
[
|
||||
AC_MSG_CHECKING([for $1 in $OCTAVE])
|
||||
$2=`TERM=;$OCTAVE -qfH --eval "disp($1)"`
|
||||
AC_MSG_RESULT($$2)
|
||||
AC_SUBST($2)
|
||||
]) # OCTAVE_EVAL
|
||||
|
||||
dnl @synopsis AC_OCTAVE_VERSION
|
||||
dnl
|
||||
dnl Find the version of Octave.
|
||||
dnl @version 1.0 Aug 23 2007
|
||||
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([AC_OCTAVE_VERSION],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(octave,
|
||||
AC_HELP_STRING([--with-octave], [choose the octave version]),
|
||||
[ with_octave=$withval ])
|
||||
|
||||
test -z "$with_octave" && with_octave=octave
|
||||
|
||||
AC_CHECK_PROG(HAVE_OCTAVE,$with_octave,yes,no)
|
||||
|
||||
if test "x$ac_cv_prog_HAVE_OCTAVE" = "xyes" ; then
|
||||
OCTAVE=$with_octave
|
||||
OCTAVE_EVAL(OCTAVE_VERSION,OCTAVE_VERSION)
|
||||
fi
|
||||
|
||||
AC_SUBST(OCTAVE)
|
||||
AC_SUBST(OCTAVE_VERSION)
|
||||
|
||||
])# AC_OCTAVE_VERSION
|
||||
|
||||
dnl @synopsis AC_OCTAVE_CONFIG_VERSION
|
||||
dnl
|
||||
dnl Find the version of Octave.
|
||||
dnl @version 1.0 Aug 23 2007
|
||||
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([AC_OCTAVE_CONFIG_VERSION],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(octave-config,
|
||||
AC_HELP_STRING([--with-octave-config], [choose the octave-config version]),
|
||||
[ with_octave_config=$withval ])
|
||||
|
||||
test -z "$with_octave_config" && with_octave_config=octave-config
|
||||
|
||||
AC_CHECK_PROG(HAVE_OCTAVE_CONFIG,$with_octave_config,yes,no)
|
||||
|
||||
if test "x$ac_cv_prog_HAVE_OCTAVE_CONFIG" = "xyes" ; then
|
||||
OCTAVE_CONFIG=$with_octave_config
|
||||
AC_MSG_CHECKING([for version of $OCTAVE_CONFIG])
|
||||
OCTAVE_CONFIG_VERSION=`$OCTAVE_CONFIG --version`
|
||||
AC_MSG_RESULT($OCTAVE_CONFIG_VERSION)
|
||||
fi
|
||||
|
||||
AC_SUBST(OCTAVE_CONFIG)
|
||||
AC_SUBST(OCTAVE_CONFIG_VERSION)
|
||||
|
||||
])# AC_OCTAVE_CONFIG_VERSION
|
||||
|
||||
dnl @synopsis AC_OCTAVE_BUILD
|
||||
dnl
|
||||
dnl Check programs and headers required for building octave plugins.
|
||||
dnl @version 1.0 Aug 23 2007
|
||||
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.
|
||||
|
||||
|
||||
AC_DEFUN([AC_OCTAVE_BUILD],
|
||||
[
|
||||
|
||||
dnl Default to no.
|
||||
OCTAVE_BUILD=no
|
||||
|
||||
AC_OCTAVE_VERSION
|
||||
OCTAVE_MKOCTFILE_VERSION
|
||||
AC_OCTAVE_CONFIG_VERSION
|
||||
|
||||
prog_concat="$ac_cv_prog_HAVE_OCTAVE$ac_cv_prog_HAVE_OCTAVE_CONFIG$ac_cv_prog_HAVE_MKOCTFILE"
|
||||
|
||||
if test "x$prog_concat" = "xyesyesyes" ; then
|
||||
if test "x$OCTAVE_VERSION" != "x$MKOCTFILE_VERSION" ; then
|
||||
AC_MSG_WARN([** Mismatch between versions of octave and mkoctfile. **])
|
||||
AC_MSG_WARN([** Octave libsndfile modules will not be built. **])
|
||||
elif test "x$OCTAVE_VERSION" != "x$OCTAVE_CONFIG_VERSION" ; then
|
||||
AC_MSG_WARN([** Mismatch between versions of octave and octave-config. **])
|
||||
AC_MSG_WARN([** Octave libsndfile modules will not be built. **])
|
||||
else
|
||||
case "$MKOCTFILE_VERSION" in
|
||||
2.*)
|
||||
AC_MSG_WARN([Octave version 2.X is not supported.])
|
||||
;;
|
||||
3.*)
|
||||
OCTAVE_DEST_ODIR=`$OCTAVE_CONFIG --oct-site-dir | sed 's%^/usr%${prefix}%'`
|
||||
OCTAVE_DEST_MDIR=`$OCTAVE_CONFIG --m-site-dir | sed 's%^/usr%${prefix}%'`
|
||||
|
||||
OCTAVE_BUILD=yes
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([Octave version $MKOCTFILE_VERSION is not supported.])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT([building octave libsndfile module... $OCTAVE_BUILD])
|
||||
fi
|
||||
|
||||
AC_SUBST(OCTAVE_DEST_ODIR)
|
||||
AC_SUBST(OCTAVE_DEST_MDIR)
|
||||
|
||||
AC_SUBST(MKOCTFILE)
|
||||
|
||||
AM_CONDITIONAL(BUILD_OCTAVE_MOD, test "x$OCTAVE_BUILD" = xyes)
|
||||
|
||||
])# AC_OCTAVE_BUILD
|
|
@ -0,0 +1,33 @@
|
|||
dnl @synopsis MN_GCC_REALLY_IS_GCC
|
||||
dnl
|
||||
dnl Find out if a compiler claiming to be gcc really is gcc (fuck you clang).
|
||||
dnl @version 1.0 Oct 31 2013
|
||||
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
|
||||
|
||||
# If the configure script has already detected GNU GCC, then make sure it
|
||||
# isn't CLANG masquerading as GCC.
|
||||
|
||||
AC_DEFUN([MN_GCC_REALLY_IS_GCC],
|
||||
[ AC_LANG_ASSERT(C)
|
||||
if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
],
|
||||
[
|
||||
#ifdef __clang__
|
||||
This is clang!
|
||||
#endif
|
||||
],
|
||||
ac_cv_c_compiler_gnu=yes,
|
||||
ac_cv_c_compiler_gnu=no
|
||||
)
|
||||
fi
|
||||
|
||||
])
|
|
@ -0,0 +1,73 @@
|
|||
dnl Copyright (C) 2013 Xiph.org Foundation
|
||||
dnl
|
||||
dnl Redistribution and use in source and binary forms, with or without
|
||||
dnl modification, are permitted provided that the following conditions
|
||||
dnl are met:
|
||||
dnl
|
||||
dnl - Redistributions of source code must retain the above copyright
|
||||
dnl notice, this list of conditions and the following disclaimer.
|
||||
dnl
|
||||
dnl - Redistributions in binary form must reproduce the above copyright
|
||||
dnl notice, this list of conditions and the following disclaimer in the
|
||||
dnl documentation and/or other materials provided with the distribution.
|
||||
dnl
|
||||
dnl - Neither the name of the Xiph.org Foundation nor the names of its
|
||||
dnl contributors may be used to endorse or promote products derived from
|
||||
dnl this software without specific prior written permission.
|
||||
dnl
|
||||
dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
dnl ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||
dnl CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
dnl EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
dnl PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
dnl LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
dnl Want to know of GCC stack protector works, botfor the C and for the C++
|
||||
dnl compiler.
|
||||
dnl
|
||||
dnl Just checking if the compiler accepts the required CFLAGSs is not enough
|
||||
dnl because we have seen at least one instance where this check was
|
||||
dnl in-sufficient.
|
||||
dnl
|
||||
dnl Instead, try to compile and link a test program with the stack protector
|
||||
dnl flags. If that works, we use it.
|
||||
|
||||
AC_DEFUN([XIPH_GCC_STACK_PROTECTOR],
|
||||
[AC_LANG_ASSERT(C)
|
||||
AC_MSG_CHECKING([if $CC supports stack smash protection])
|
||||
xiph_stack_check_old_cflags="$CFLAGS"
|
||||
SSP_FLAGS="-fstack-protector --param ssp-buffer-size=4"
|
||||
CFLAGS=$SSP_FLAGS
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
],
|
||||
[puts("Hello, World!"); return 0;],
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$xiph_stack_check_old_cflags $SSP_FLAGS",
|
||||
AC_MSG_RESULT([no])
|
||||
CFLAGS="$xiph_stack_check_old_cflags"
|
||||
)
|
||||
])# XIPH_GCC_STACK_PROTECTOR
|
||||
|
||||
AC_DEFUN([XIPH_GXX_STACK_PROTECTOR],
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_MSG_CHECKING([if $CXX supports stack smash protection])
|
||||
xiph_stack_check_old_cflags="$CFLAGS"
|
||||
SSP_FLAGS="-fstack-protector --param ssp-buffer-size=4"
|
||||
CFLAGS=$SSP_FLAGS
|
||||
AC_TRY_LINK([
|
||||
#include <cstdio>
|
||||
],
|
||||
[puts("Hello, World!"); return 0;],
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$xiph_stack_check_old_cflags $SSP_FLAGS",
|
||||
AC_MSG_RESULT([no])
|
||||
CFLAGS="$xiph_stack_check_old_cflags"
|
||||
)
|
||||
AC_LANG_POP([C++])
|
||||
])# XIPH_GXX_STACK_PROTECTOR
|
|
@ -0,0 +1,77 @@
|
|||
# visibility.m4 serial 5 (gettext-0.18.2)
|
||||
dnl Copyright (C) 2005, 2008, 2010-2017 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl Tests whether the compiler supports the command-line option
|
||||
dnl -fvisibility=hidden and the function and variable attributes
|
||||
dnl __attribute__((__visibility__("hidden"))) and
|
||||
dnl __attribute__((__visibility__("default"))).
|
||||
dnl Does *not* test for __visibility__("protected") - which has tricky
|
||||
dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
|
||||
dnl Mac OS X.
|
||||
dnl Does *not* test for __visibility__("internal") - which has processor
|
||||
dnl dependent semantics.
|
||||
dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
|
||||
dnl "really only recommended for legacy code".
|
||||
dnl Set the variable CFLAG_VISIBILITY.
|
||||
dnl Defines and sets the variable HAVE_VISIBILITY.
|
||||
|
||||
AC_DEFUN([gl_VISIBILITY],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CFLAG_VISIBILITY=
|
||||
HAVE_VISIBILITY=0
|
||||
if test -n "$GCC"; then
|
||||
dnl First, check whether -Werror can be added to the command line, or
|
||||
dnl whether it leads to an error because of some other option that the
|
||||
dnl user has put into $CC $CFLAGS $CPPFLAGS.
|
||||
AC_MSG_CHECKING([whether the -Werror option is usable])
|
||||
AC_CACHE_VAL([gl_cv_cc_vis_werror], [
|
||||
gl_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]], [[]])],
|
||||
[gl_cv_cc_vis_werror=yes],
|
||||
[gl_cv_cc_vis_werror=no])
|
||||
CFLAGS="$gl_save_CFLAGS"])
|
||||
AC_MSG_RESULT([$gl_cv_cc_vis_werror])
|
||||
dnl Now check whether visibility declarations are supported.
|
||||
AC_MSG_CHECKING([for simple visibility declarations])
|
||||
AC_CACHE_VAL([gl_cv_cc_visibility], [
|
||||
gl_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden"
|
||||
dnl We use the option -Werror and a function dummyfunc, because on some
|
||||
dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
|
||||
dnl "visibility attribute not supported in this configuration; ignored"
|
||||
dnl at the first function definition in every compilation unit, and we
|
||||
dnl don't want to use the option in this case.
|
||||
if test $gl_cv_cc_vis_werror = yes; then
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
fi
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
|
||||
extern __attribute__((__visibility__("default"))) int exportedvar;
|
||||
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
|
||||
extern __attribute__((__visibility__("default"))) int exportedfunc (void);
|
||||
void dummyfunc (void) {}
|
||||
]],
|
||||
[[]])],
|
||||
[gl_cv_cc_visibility=yes],
|
||||
[gl_cv_cc_visibility=no])
|
||||
CFLAGS="$gl_save_CFLAGS"])
|
||||
AC_MSG_RESULT([$gl_cv_cc_visibility])
|
||||
if test $gl_cv_cc_visibility = yes; then
|
||||
CFLAG_VISIBILITY="-fvisibility=hidden"
|
||||
HAVE_VISIBILITY=1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CFLAG_VISIBILITY])
|
||||
AC_SUBST([HAVE_VISIBILITY])
|
||||
AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
|
||||
[Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
|
||||
])
|
|
@ -0,0 +1,49 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
ACLOCAL_AMFLAGS = -I M4
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-werror
|
||||
|
||||
if BUILD_OCTAVE_MOD
|
||||
octave_dir = Octave
|
||||
endif
|
||||
|
||||
SUBDIRS = M4 Win32 src examples tests
|
||||
|
||||
if FULL_SUITE
|
||||
SUBDIRS += man doc $(octave_dir) regtest programs
|
||||
endif
|
||||
|
||||
DIST_SUBDIRS = M4 man doc Win32 src Octave examples regtest tests programs
|
||||
|
||||
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 \
|
||||
CMakeLists.txt CMake/autogen.cmake CMake/build.cmake CMake/check.cmake \
|
||||
CMake/compiler_is_gcc.c CMake/external_libs.cmake CMake/file.cmake \
|
||||
CMake/have_decl_s_irgrp.c CMake/libsndfile.cmake
|
||||
|
||||
|
||||
CLEANFILES = *~
|
||||
|
||||
pkgconfig_DATA = sndfile.pc
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
|
||||
#===============================================================================
|
||||
|
||||
test: check-recursive
|
||||
|
||||
# Target to make autogenerated files.
|
||||
checkprograms :
|
||||
(cd src ; $(MAKE) libsndfile.la checkprograms)
|
||||
(cd tests ; $(MAKE) checkprograms)
|
||||
|
||||
testprogs :
|
||||
(cd src ; $(MAKE) testprogs)
|
||||
(cd tests ; $(MAKE) testprogs)
|
||||
|
||||
|
||||
test-tarball : Scripts/build-test-tarball.mk
|
||||
(cd src ; $(MAKE) all libsndfile.la checkprograms)
|
||||
(cd tests ; $(MAKE) all checkprograms)
|
||||
$(MAKE) -f Scripts/build-test-tarball.mk
|
|
@ -0,0 +1,970 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@FULL_SUITE_TRUE@am__append_1 = man doc $(octave_dir) regtest programs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/M4/add_cflags.m4 \
|
||||
$(top_srcdir)/M4/add_cxxflags.m4 \
|
||||
$(top_srcdir)/M4/ax_add_fortify_source.m4 \
|
||||
$(top_srcdir)/M4/clang.m4 $(top_srcdir)/M4/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/gcc_version.m4 $(top_srcdir)/M4/libtool.m4 \
|
||||
$(top_srcdir)/M4/lrint.m4 $(top_srcdir)/M4/lrintf.m4 \
|
||||
$(top_srcdir)/M4/ltoptions.m4 $(top_srcdir)/M4/ltsugar.m4 \
|
||||
$(top_srcdir)/M4/ltversion.m4 $(top_srcdir)/M4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/M4/mkoctfile_version.m4 \
|
||||
$(top_srcdir)/M4/octave.m4 $(top_srcdir)/M4/really_gcc.m4 \
|
||||
$(top_srcdir)/M4/stack_protect.m4 \
|
||||
$(top_srcdir)/M4/visibility.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps) $(am__DIST_COMMON)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES = Scripts/build-test-tarball.mk libsndfile.spec \
|
||||
sndfile.pc echo-install-dirs
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
|
||||
DATA = $(pkgconfig_DATA)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/echo-install-dirs.in \
|
||||
$(srcdir)/libsndfile.spec.in $(srcdir)/sndfile.pc.in \
|
||||
$(top_srcdir)/Cfg/ar-lib $(top_srcdir)/Cfg/compile \
|
||||
$(top_srcdir)/Cfg/config.guess $(top_srcdir)/Cfg/config.sub \
|
||||
$(top_srcdir)/Cfg/install-sh $(top_srcdir)/Cfg/ltmain.sh \
|
||||
$(top_srcdir)/Cfg/missing \
|
||||
$(top_srcdir)/Scripts/build-test-tarball.mk.in AUTHORS COPYING \
|
||||
Cfg/ar-lib Cfg/compile Cfg/config.guess Cfg/config.sub \
|
||||
Cfg/depcomp Cfg/install-sh Cfg/ltmain.sh Cfg/missing ChangeLog \
|
||||
INSTALL NEWS README
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
|
||||
CLEAN_VERSION = @CLEAN_VERSION@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXTERNAL_XIPH_CFLAGS = @EXTERNAL_XIPH_CFLAGS@
|
||||
EXTERNAL_XIPH_LIBS = @EXTERNAL_XIPH_LIBS@
|
||||
FGREP = @FGREP@
|
||||
FLAC_CFLAGS = @FLAC_CFLAGS@
|
||||
FLAC_LIBS = @FLAC_LIBS@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GCC_MINOR_VERSION = @GCC_MINOR_VERSION@
|
||||
GCC_VERSION = @GCC_VERSION@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_EXTERNAL_XIPH_LIBS = @HAVE_EXTERNAL_XIPH_LIBS@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_VISIBILITY = @HAVE_VISIBILITY@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
HAVE_XCODE_SELECT = @HAVE_XCODE_SELECT@
|
||||
HOST_TRIPLET = @HOST_TRIPLET@
|
||||
HTML_BGCOLOUR = @HTML_BGCOLOUR@
|
||||
HTML_FGCOLOUR = @HTML_FGCOLOUR@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MKOCTFILE = @MKOCTFILE@
|
||||
MKOCTFILE_VERSION = @MKOCTFILE_VERSION@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OCTAVE = @OCTAVE@
|
||||
OCTAVE_CONFIG = @OCTAVE_CONFIG@
|
||||
OCTAVE_CONFIG_VERSION = @OCTAVE_CONFIG_VERSION@
|
||||
OCTAVE_DEST_MDIR = @OCTAVE_DEST_MDIR@
|
||||
OCTAVE_DEST_ODIR = @OCTAVE_DEST_ODIR@
|
||||
OCTAVE_VERSION = @OCTAVE_VERSION@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
OS_SPECIFIC_CFLAGS = @OS_SPECIFIC_CFLAGS@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SF_COUNT_MAX = @SF_COUNT_MAX@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
|
||||
SIZEOF_SF_COUNT_T = @SIZEOF_SF_COUNT_T@
|
||||
SNDIO_LIBS = @SNDIO_LIBS@
|
||||
SPEEX_CFLAGS = @SPEEX_CFLAGS@
|
||||
SPEEX_LIBS = @SPEEX_LIBS@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
SRC_BINDIR = @SRC_BINDIR@
|
||||
STRIP = @STRIP@
|
||||
TEST_BINDIR = @TEST_BINDIR@
|
||||
TYPEOF_SF_COUNT_T = @TYPEOF_SF_COUNT_T@
|
||||
VERSION = @VERSION@
|
||||
VORBISENC_CFLAGS = @VORBISENC_CFLAGS@
|
||||
VORBISENC_LIBS = @VORBISENC_LIBS@
|
||||
VORBIS_CFLAGS = @VORBIS_CFLAGS@
|
||||
VORBIS_LIBS = @VORBIS_LIBS@
|
||||
WIN_RC_VERSION = @WIN_RC_VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
ACLOCAL_AMFLAGS = -I M4
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-werror
|
||||
@BUILD_OCTAVE_MOD_TRUE@octave_dir = Octave
|
||||
SUBDIRS = M4 Win32 src examples tests $(am__append_1)
|
||||
DIST_SUBDIRS = M4 man doc Win32 src Octave examples regtest tests programs
|
||||
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 \
|
||||
CMakeLists.txt CMake/autogen.cmake CMake/build.cmake CMake/check.cmake \
|
||||
CMake/compiler_is_gcc.c CMake/external_libs.cmake CMake/file.cmake \
|
||||
CMake/have_decl_s_irgrp.c CMake/libsndfile.cmake
|
||||
|
||||
CLEANFILES = *~
|
||||
pkgconfig_DATA = sndfile.pc
|
||||
m4datadir = $(datadir)/aclocal
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
Scripts/build-test-tarball.mk: $(top_builddir)/config.status $(top_srcdir)/Scripts/build-test-tarball.mk.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
libsndfile.spec: $(top_builddir)/config.status $(srcdir)/libsndfile.spec.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
sndfile.pc: $(top_builddir)/config.status $(srcdir)/sndfile.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
echo-install-dirs: $(top_builddir)/config.status $(srcdir)/echo-install-dirs.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build/sub \
|
||||
&& ../../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-pkgconfigDATA
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-pkgconfigDATA
|
||||
|
||||
.MAKE: $(am__recursive_targets) install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
|
||||
dist-xz dist-zip distcheck distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-pkgconfigDATA install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-pkgconfigDATA
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
#===============================================================================
|
||||
|
||||
test: check-recursive
|
||||
|
||||
# Target to make autogenerated files.
|
||||
checkprograms :
|
||||
(cd src ; $(MAKE) libsndfile.la checkprograms)
|
||||
(cd tests ; $(MAKE) checkprograms)
|
||||
|
||||
testprogs :
|
||||
(cd src ; $(MAKE) testprogs)
|
||||
(cd tests ; $(MAKE) testprogs)
|
||||
|
||||
test-tarball : Scripts/build-test-tarball.mk
|
||||
(cd src ; $(MAKE) all libsndfile.la checkprograms)
|
||||
(cd tests ; $(MAKE) all checkprograms)
|
||||
$(MAKE) -f Scripts/build-test-tarball.mk
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,199 @@
|
|||
Version 1.0.28 (2017-04-02)
|
||||
* Fix buffer overruns in FLAC and ID3 handling code.
|
||||
* Move to variable length header storage.
|
||||
* Fix detection of Large File Support for 32 bit systems.
|
||||
* Remove large stack allocations in ALAC handling code.
|
||||
* Remove all use of Variable Length Arrays.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.27 (2016-06-19)
|
||||
* Fix an SF_INFO seekable flag regression introduced in 1.0.26.
|
||||
* Fix potential infinite loops on malformed input files.
|
||||
* Add string metadata read/write for CAF and RF64.
|
||||
* Add handling of CUE chunks.
|
||||
* Fix endian-ness issues in PAF files.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.26 (2015-11-22)
|
||||
* Fix for CVE-2014-9496, SD2 buffer read overflow.
|
||||
* Fix for CVE-2014-9756, file_io.c divide by zero.
|
||||
* Fix for CVE-2015-7805, AIFF heap write overflow.
|
||||
* Add support for ALAC encoder in a CAF container.
|
||||
* Add support for Cart chunks in WAV files.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.25 (2011-07-13)
|
||||
* Fix for Secunia Advisory SA45125, heap overflow in PAF file handler.
|
||||
* Accept broken WAV files with blockalign == 0.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.24 (2011-03-23)
|
||||
* WAV files now have an 18 byte u-law and A-law fmt chunk.
|
||||
* Document virtual I/O functionality.
|
||||
* Two new methods rawHandle() and takeOwnership() in sndfile.hh.
|
||||
* AIFF fix for non-zero offset value in SSND chunk.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.23 (2010-10-10)
|
||||
* Add version metadata to Windows DLL.
|
||||
* Add a missing 'inline' to sndfile.hh.
|
||||
* Update docs.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.22 (2010-10-04)
|
||||
* Couple of fixes for SDS file writer.
|
||||
* Fixes arising from static analysis.
|
||||
* Handle FLAC files with ID3 meta data at start of file.
|
||||
* Handle FLAC files which report zero length.
|
||||
* Other minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.21 (2009-12-13)
|
||||
* Add a couple of new binary programs to programs/ dir.
|
||||
* Remove sndfile-jackplay (now in sndfile-tools package).
|
||||
* Add windows only function sf_wchar_open().
|
||||
* Bunch of minor bug fixes.
|
||||
|
||||
Version 1.0.20 (2009-05-14)
|
||||
* Fix potential heap overflow in VOC file parser (Tobias Klein, http://www.trapkit.de/).
|
||||
|
||||
Version 1.0.19 (2009-03-02)
|
||||
* Fix for CVE-2009-0186 (Alin Rad Pop, Secunia Research).
|
||||
* Huge number of minor bug fixes as a result of static analysis.
|
||||
|
||||
Version 1.0.18 (2009-02-07)
|
||||
* Add Ogg/Vorbis support (thanks to John ffitch).
|
||||
* Remove captive FLAC library.
|
||||
* Many new features and bug fixes.
|
||||
* Generate Win32 and Win64 pre-compiled binaries.
|
||||
|
||||
Version 1.0.17 (2006-08-31)
|
||||
* Add sndfile.hh C++ wrapper.
|
||||
* Update Win32 MinGW build instructions.
|
||||
* Minor bug fixes and cleanups.
|
||||
|
||||
Version 1.0.16 (2006-04-30)
|
||||
* Add support for Broadcast (BEXT) chunks in WAV files.
|
||||
* Implement new commands SFC_GET_SIGNAL_MAX and SFC_GET_MAX_ALL_CHANNELS.
|
||||
* Add support for RIFX (big endian WAV variant).
|
||||
* Fix configure script bugs.
|
||||
* Fix bug in INST and MARK chunk writing for AIFF files.
|
||||
|
||||
Version 1.0.15 (2006-03-16)
|
||||
* Fix some ia64 issues.
|
||||
* Fix precompiled DLL.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.14 (2006-02-19)
|
||||
* Really fix MinGW compile problems.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.13 (2006-01-21)
|
||||
* Fix for MinGW compiler problems.
|
||||
* Allow readin/write of instrument chunks from WAV and AIFF files.
|
||||
* Compile problem fix for Solaris compiler.
|
||||
* Minor cleanups and bug fixes.
|
||||
|
||||
Version 1.0.12 (2005-09-30)
|
||||
* Add support for FLAC and Apple's Core Audio Format (CAF).
|
||||
* Add virtual I/O interface (still needs docs).
|
||||
* Cygwin and other Win32 fixes.
|
||||
* Minor bug fixes and cleanups.
|
||||
|
||||
Version 1.0.11 (2004-11-15)
|
||||
* Add support for SD2 files.
|
||||
* Add read support for loop info in WAV and AIFF files.
|
||||
* Add more tests.
|
||||
* Improve type safety.
|
||||
* Minor optimisations and bug fixes.
|
||||
|
||||
Version 1.0.10 (2004-06-15)
|
||||
* Fix AIFF read/write mode bugs.
|
||||
* Add support for compiling Win32 DLLS using MinGW.
|
||||
* Fix problems resulting in failed compiles with gcc-2.95.
|
||||
* Improve test suite.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.9 (2004-03-30)
|
||||
* Add handling of AVR (Audio Visual Research) files.
|
||||
* Improve handling of WAVEFORMATEXTENSIBLE WAV files.
|
||||
* Fix for using pipes on Win32.
|
||||
|
||||
Version 1.0.8 (2004-03-14)
|
||||
* Correct peak chunk handing for files with > 16 tracks.
|
||||
* Fix for WAV files with huge number of CUE chunks.
|
||||
|
||||
Version 1.0.7 (2004-02-25)
|
||||
* Fix clip mode detection on ia64, MIPS and other CPUs.
|
||||
* Fix two MacOSX build problems.
|
||||
|
||||
Version 1.0.6 (2004-02-08)
|
||||
* Added support for native Win32 file access API (Ross Bencina).
|
||||
* New mode to add clippling then a converting from float/double to integer
|
||||
would otherwise wrap around.
|
||||
* Fixed a bug in reading/writing files > 2Gig on Linux, Solaris and others.
|
||||
* Many minor bug fixes.
|
||||
* Other random fixes for Win32.
|
||||
|
||||
Version 1.0.5 (2003-05-03)
|
||||
* Added support for HTK files.
|
||||
* Added new function sf_open_fd() to allow for secure opening of temporary
|
||||
files as well as reading/writing sound files embedded within larger
|
||||
container files.
|
||||
* Added string support for AIFF files.
|
||||
* Minor bug fixes and code cleanups.
|
||||
|
||||
Version 1.0.4 (2003-02-02)
|
||||
* Added suport of PVF and XI files.
|
||||
* Added functionality for setting and retreiving strings from sound files.
|
||||
* Minor code cleanups and bug fixes.
|
||||
|
||||
Version 1.0.3 (2002-12-09)
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.2 (2002-11-24)
|
||||
* Added support for VOX ADPCM.
|
||||
* Improved error reporting.
|
||||
* Added version scripting on Linux and Solaris.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.1 (2002-09-14)
|
||||
* Added MAT and MAT5 file formats.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.0 (2002-08-16)
|
||||
* Final release for 1.0.0.
|
||||
|
||||
Version 1.0.0rc6 (2002-08-14)
|
||||
* Release candidate 6 for the 1.0.0 series.
|
||||
* MacOS9 fixes.
|
||||
|
||||
Version 1.0.0rc5 (2002-08-10)
|
||||
* Release candidate 5 for the 1.0.0 series.
|
||||
* Changed the definition of sf_count_t which was causing problems when
|
||||
libsndfile was compiled with other libraries (ie WxWindows).
|
||||
* Minor bug fixes.
|
||||
* Documentation cleanup.
|
||||
|
||||
Version 1.0.0rc4 (2002-08-03)
|
||||
* Release candidate 4 for the 1.0.0 series.
|
||||
* Minor bug fixes.
|
||||
* Fix broken Win32 "make check".
|
||||
|
||||
Version 1.0.0rc3 (2002-08-02)
|
||||
* Release candidate 3 for the 1.0.0 series.
|
||||
* Fix bug where libsndfile was reading beyond the end of the data chunk.
|
||||
* Added on-the-fly header updates on write.
|
||||
* Fix a couple of documentation issues.
|
||||
|
||||
Version 1.0.0rc2 (2002-06-24)
|
||||
* Release candidate 2 for the 1.0.0 series.
|
||||
* Fix compile problem for Win32.
|
||||
|
||||
Version 1.0.0rc1 (2002-06-24)
|
||||
* Release candidate 1 for the 1.0.0 series.
|
||||
|
||||
Version 0.0.28 (2002-04-27)
|
||||
* Last offical release of 0.0.X series of the library.
|
||||
|
||||
Version 0.0.8 (1999-02-16)
|
||||
* First offical release.
|
|
@ -0,0 +1,79 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# Prevent any extension.
|
||||
EXEEXT =
|
||||
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
EXTRA_DIST = sndfile_load.m sndfile_save.m sndfile_play.m \
|
||||
octave_test.m octave_test.sh $(oct_module_srcs) PKG_ADD
|
||||
|
||||
octconfigdir = $(exec_prefix)/share/octave/site/m
|
||||
octconfig_DATA = sndfile_load.m sndfile_save.m sndfile_play.m
|
||||
|
||||
OCTAVE_DEST_MDIR = @OCTAVE_DEST_MDIR@
|
||||
OCTAVE_DEST_ODIR = @OCTAVE_DEST_ODIR@/sndfile
|
||||
|
||||
OCT_CXXFLAGS = @OCT_CXXFLAGS@
|
||||
OCT_LIB_DIR = @OCT_LIB_DIR@
|
||||
OCT_LIBS = @OCT_LIBS@
|
||||
|
||||
SNDFILEDIR = $(top_builddir)/src
|
||||
AM_CPPFLAGS = -I$(SNDFILEDIR)
|
||||
|
||||
oct_module_srcs = sndfile.cc
|
||||
oct_module_files = sndfile.oct PKG_ADD
|
||||
|
||||
# Make these noinst so they can be installed manually.
|
||||
noinst_DATA = $(oct_module_files)
|
||||
|
||||
|
||||
# Used by shave which cleans up automake generated Makefile output.
|
||||
V = @
|
||||
Q = $(V:1=)
|
||||
QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
|
||||
|
||||
|
||||
# Use Octave's mkoctfile to do all the heavy lifting. Unfortunately, its
|
||||
# a little dumb so we need to guide it carefully.
|
||||
sndfile.oct : sndfile.o
|
||||
$(QUIET_GEN) $(MKOCTFILE) -v $(INCLUDES) $(top_builddir)/Octave/$+ -L$(SNDFILEDIR)/.libs -L$(SNDFILEDIR) -lsndfile -o $(top_builddir)/Octave/$@ > /dev/null
|
||||
|
||||
sndfile.o : sndfile.cc
|
||||
$(QUIET_GEN) $(MKOCTFILE) -v $(INCLUDES) -c $+ -o $(top_builddir)/Octave/$@ > /dev/null
|
||||
|
||||
# Allow for the test being run in the build dir, but the test script
|
||||
# being located in the source dir.
|
||||
check :
|
||||
octave_src_dir=$(srcdir) $(srcdir)/octave_test.sh
|
||||
|
||||
|
||||
# Since the octave modules are installed in a special location, a custom install
|
||||
# and uninstall routine must be specified.
|
||||
install-exec-local : $(oct_module_files)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(OCTAVE_DEST_ODIR)" || $(mkdir_p) "$(DESTDIR)$(OCTAVE_DEST_ODIR)"
|
||||
@list='$(oct_module_files)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL) '$$p' '$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL) "$$p" "$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-local :
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(oct_module_files)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f"; \
|
||||
done
|
||||
|
||||
clean-local :
|
||||
rm -f sndfile.o sndfile.oct
|
||||
@if test $(abs_builddir) != $(abs_srcdir) ; then rm -f PKG_ADD ; fi
|
|
@ -0,0 +1,632 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = Octave
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/M4/add_cflags.m4 \
|
||||
$(top_srcdir)/M4/add_cxxflags.m4 \
|
||||
$(top_srcdir)/M4/ax_add_fortify_source.m4 \
|
||||
$(top_srcdir)/M4/clang.m4 $(top_srcdir)/M4/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/gcc_version.m4 $(top_srcdir)/M4/libtool.m4 \
|
||||
$(top_srcdir)/M4/lrint.m4 $(top_srcdir)/M4/lrintf.m4 \
|
||||
$(top_srcdir)/M4/ltoptions.m4 $(top_srcdir)/M4/ltsugar.m4 \
|
||||
$(top_srcdir)/M4/ltversion.m4 $(top_srcdir)/M4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/M4/mkoctfile_version.m4 \
|
||||
$(top_srcdir)/M4/octave.m4 $(top_srcdir)/M4/really_gcc.m4 \
|
||||
$(top_srcdir)/M4/stack_protect.m4 \
|
||||
$(top_srcdir)/M4/visibility.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(octconfigdir)"
|
||||
DATA = $(noinst_DATA) $(octconfig_DATA)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
|
||||
CLEAN_VERSION = @CLEAN_VERSION@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
|
||||
# Prevent any extension.
|
||||
EXEEXT =
|
||||
EXTERNAL_XIPH_CFLAGS = @EXTERNAL_XIPH_CFLAGS@
|
||||
EXTERNAL_XIPH_LIBS = @EXTERNAL_XIPH_LIBS@
|
||||
FGREP = @FGREP@
|
||||
FLAC_CFLAGS = @FLAC_CFLAGS@
|
||||
FLAC_LIBS = @FLAC_LIBS@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GCC_MINOR_VERSION = @GCC_MINOR_VERSION@
|
||||
GCC_VERSION = @GCC_VERSION@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_EXTERNAL_XIPH_LIBS = @HAVE_EXTERNAL_XIPH_LIBS@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_VISIBILITY = @HAVE_VISIBILITY@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
HAVE_XCODE_SELECT = @HAVE_XCODE_SELECT@
|
||||
HOST_TRIPLET = @HOST_TRIPLET@
|
||||
HTML_BGCOLOUR = @HTML_BGCOLOUR@
|
||||
HTML_FGCOLOUR = @HTML_FGCOLOUR@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MKOCTFILE = @MKOCTFILE@
|
||||
MKOCTFILE_VERSION = @MKOCTFILE_VERSION@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OCTAVE = @OCTAVE@
|
||||
OCTAVE_CONFIG = @OCTAVE_CONFIG@
|
||||
OCTAVE_CONFIG_VERSION = @OCTAVE_CONFIG_VERSION@
|
||||
OCTAVE_DEST_MDIR = @OCTAVE_DEST_MDIR@
|
||||
OCTAVE_DEST_ODIR = @OCTAVE_DEST_ODIR@/sndfile
|
||||
OCTAVE_VERSION = @OCTAVE_VERSION@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
OS_SPECIFIC_CFLAGS = @OS_SPECIFIC_CFLAGS@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SF_COUNT_MAX = @SF_COUNT_MAX@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
|
||||
SIZEOF_SF_COUNT_T = @SIZEOF_SF_COUNT_T@
|
||||
SNDIO_LIBS = @SNDIO_LIBS@
|
||||
SPEEX_CFLAGS = @SPEEX_CFLAGS@
|
||||
SPEEX_LIBS = @SPEEX_LIBS@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
SRC_BINDIR = @SRC_BINDIR@
|
||||
STRIP = @STRIP@
|
||||
TEST_BINDIR = @TEST_BINDIR@
|
||||
TYPEOF_SF_COUNT_T = @TYPEOF_SF_COUNT_T@
|
||||
VERSION = @VERSION@
|
||||
VORBISENC_CFLAGS = @VORBISENC_CFLAGS@
|
||||
VORBISENC_LIBS = @VORBISENC_LIBS@
|
||||
VORBIS_CFLAGS = @VORBIS_CFLAGS@
|
||||
VORBIS_LIBS = @VORBIS_LIBS@
|
||||
WIN_RC_VERSION = @WIN_RC_VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
|
||||
EXTRA_DIST = sndfile_load.m sndfile_save.m sndfile_play.m \
|
||||
octave_test.m octave_test.sh $(oct_module_srcs) PKG_ADD
|
||||
|
||||
octconfigdir = $(exec_prefix)/share/octave/site/m
|
||||
octconfig_DATA = sndfile_load.m sndfile_save.m sndfile_play.m
|
||||
OCT_CXXFLAGS = @OCT_CXXFLAGS@
|
||||
OCT_LIB_DIR = @OCT_LIB_DIR@
|
||||
OCT_LIBS = @OCT_LIBS@
|
||||
SNDFILEDIR = $(top_builddir)/src
|
||||
AM_CPPFLAGS = -I$(SNDFILEDIR)
|
||||
oct_module_srcs = sndfile.cc
|
||||
oct_module_files = sndfile.oct PKG_ADD
|
||||
|
||||
# Make these noinst so they can be installed manually.
|
||||
noinst_DATA = $(oct_module_files)
|
||||
|
||||
# Used by shave which cleans up automake generated Makefile output.
|
||||
V = @
|
||||
Q = $(V:1=)
|
||||
QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Octave/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Octave/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-octconfigDATA: $(octconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(octconfig_DATA)'; test -n "$(octconfigdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(octconfigdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(octconfigdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(octconfigdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(octconfigdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-octconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(octconfig_DATA)'; test -n "$(octconfigdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(octconfigdir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(octconfigdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-octconfigDATA
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-exec-local
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-local uninstall-octconfigDATA
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
clean-local cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-exec-local \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-octconfigDATA install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
|
||||
uninstall-am uninstall-local uninstall-octconfigDATA
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Use Octave's mkoctfile to do all the heavy lifting. Unfortunately, its
|
||||
# a little dumb so we need to guide it carefully.
|
||||
sndfile.oct : sndfile.o
|
||||
$(QUIET_GEN) $(MKOCTFILE) -v $(INCLUDES) $(top_builddir)/Octave/$+ -L$(SNDFILEDIR)/.libs -L$(SNDFILEDIR) -lsndfile -o $(top_builddir)/Octave/$@ > /dev/null
|
||||
|
||||
sndfile.o : sndfile.cc
|
||||
$(QUIET_GEN) $(MKOCTFILE) -v $(INCLUDES) -c $+ -o $(top_builddir)/Octave/$@ > /dev/null
|
||||
|
||||
# Allow for the test being run in the build dir, but the test script
|
||||
# being located in the source dir.
|
||||
check :
|
||||
octave_src_dir=$(srcdir) $(srcdir)/octave_test.sh
|
||||
|
||||
# Since the octave modules are installed in a special location, a custom install
|
||||
# and uninstall routine must be specified.
|
||||
install-exec-local : $(oct_module_files)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(OCTAVE_DEST_ODIR)" || $(mkdir_p) "$(DESTDIR)$(OCTAVE_DEST_ODIR)"
|
||||
@list='$(oct_module_files)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL) '$$p' '$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(INSTALL) "$$p" "$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-local :
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(oct_module_files)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(OCTAVE_DEST_ODIR)/$$f"; \
|
||||
done
|
||||
|
||||
clean-local :
|
||||
rm -f sndfile.o sndfile.oct
|
||||
@if test $(abs_builddir) != $(abs_srcdir) ; then rm -f PKG_ADD ; fi
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,3 @@
|
|||
autoload ("sfread", "sndfile.oct");
|
||||
autoload ("sfversion", "sndfile.oct");
|
||||
autoload ("sfwrite", "sndfile.oct");
|
|
@ -0,0 +1,52 @@
|
|||
# Copyright (C) 2007-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# These tests are nowhere near comprehensive.
|
||||
|
||||
printf (" Running Octave tests : ") ;
|
||||
fflush (stdout) ;
|
||||
|
||||
filename = "whatever" ;
|
||||
srate_out = 32000 ;
|
||||
fmt_out = "wav-float" ;
|
||||
|
||||
t = (2 * pi / srate_out * (0:srate_out-1))' ;
|
||||
data_out = sin (440.0 * t) ;
|
||||
|
||||
# Write out a file.
|
||||
sfwrite (filename, data_out, srate_out, fmt_out) ;
|
||||
|
||||
# Read it back in again.
|
||||
[ data_in, srate_in, fmt_in ] = sfread (filename) ;
|
||||
|
||||
if (srate_in != srate_out)
|
||||
error ("\n\nSample rate mismatch : %d -> %d.\n\n", srate_out, srate_in) ;
|
||||
endif
|
||||
|
||||
# Octave strcmp return 1 for the same.
|
||||
if (strcmp (fmt_in, fmt_out) != 1)
|
||||
error ("\n\nFormat error : '%s' -> '%s'.\n\n", fmt_out, fmt_in) ;
|
||||
endif
|
||||
|
||||
err = max (abs (data_out - data_in)) ;
|
||||
|
||||
if (err > 1e-7)
|
||||
error ("err : %g\n", err) ;
|
||||
endif
|
||||
|
||||
printf ("ok") ;
|
||||
|
||||
unlink (filename) ;
|
|
@ -0,0 +1,81 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
# Check where we're being run from.
|
||||
if test -d Octave ; then
|
||||
cd Octave
|
||||
octave_src_dir=$(pwd)
|
||||
elif test -z "$octave_src_dir" ; then
|
||||
echo
|
||||
echo "Error : \$octave_src_dir is undefined."
|
||||
echo
|
||||
exit 1
|
||||
else
|
||||
octave_src_dir=$(cd $octave_src_dir && pwd)
|
||||
fi
|
||||
|
||||
# Find libsndfile shared object.
|
||||
libsndfile_lib_location=""
|
||||
|
||||
if test -f "../src/.libs/libsndfile.so" ; then
|
||||
libsndfile_lib_location="../src/.libs/"
|
||||
elif test -f "../src/libsndfile.so" ; then
|
||||
libsndfile_lib_location="../src/"
|
||||
elif test -f "../src/.libs/libsndfile.dylib" ; then
|
||||
libsndfile_lib_location="../src/.libs/"
|
||||
elif test -f "../src/libsndfile.dylib" ; then
|
||||
libsndfile_lib_location="../src/"
|
||||
else
|
||||
echo
|
||||
echo "Not able to find the libsndfile shared lib we've just built."
|
||||
echo "This may cause the following test to fail."
|
||||
echo
|
||||
fi
|
||||
|
||||
libsndfile_lib_location=`(cd $libsndfile_lib_location && pwd)`
|
||||
|
||||
|
||||
# Find sndfile.oct
|
||||
sndfile_oct_location=""
|
||||
|
||||
if test -f .libs/sndfile.oct ; then
|
||||
sndfile_oct_location=".libs"
|
||||
elif test -f sndfile.oct ; then
|
||||
sndfile_oct_location="."
|
||||
else
|
||||
echo "Not able to find the sndfile.oct binaries we've just built."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case `file -b $sndfile_oct_location/sndfile.oct` in
|
||||
ELF*)
|
||||
;;
|
||||
Mach*)
|
||||
echo "Tests don't work on this platform."
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Not able to find the sndfile.oct binary we just built."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# Make sure the TERM environment variable doesn't contain anything wrong.
|
||||
unset TERM
|
||||
# echo "octave_src_dir : $octave_src_dir"
|
||||
# echo "libsndfile_lib_location : $libsndfile_lib_location"
|
||||
# echo "sndfile_oct_location : $sndfile_oct_location"
|
||||
|
||||
if test ! -f PKG_ADD ; then
|
||||
cp $octave_src_dir/PKG_ADD .
|
||||
fi
|
||||
|
||||
export LD_LIBRARY_PATH="$libsndfile_lib_location:$LD_LIBRARY_PATH"
|
||||
|
||||
octave_script="$octave_src_dir/octave_test.m"
|
||||
|
||||
(cd $sndfile_oct_location && octave -qH $octave_script)
|
||||
res=$?
|
||||
echo
|
||||
exit $res
|
|
@ -0,0 +1,405 @@
|
|||
/*
|
||||
** Copyright (C) 2007-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
** it under the terms of the GNU Lesser General Public License as published by
|
||||
** the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <octave/oct.h>
|
||||
|
||||
#include "sndfile.h"
|
||||
|
||||
#define FOUR_GIG (0x100000000LL)
|
||||
#define BUFFER_FRAMES 8192
|
||||
|
||||
|
||||
static int format_of_str (const std::string & fmt) ;
|
||||
static void string_of_format (std::string & fmt, int format) ;
|
||||
|
||||
|
||||
DEFUN_DLD (sfversion, args, nargout ,
|
||||
"-*- texinfo -*-\n\
|
||||
@deftypefn {Loadable Function} {@var{version} =} sfversion ()\n\
|
||||
@cindex Reading sound files\n\
|
||||
Return a string containing the libsndfile version.\n\
|
||||
@seealso{sfread, sfwrite}\n\
|
||||
@end deftypefn")
|
||||
{ char buffer [256] ;
|
||||
octave_value_list retval ;
|
||||
|
||||
/* Bail out if the input parameters are bad. */
|
||||
if (args.length () != 0 || nargout > 1)
|
||||
{ print_usage () ;
|
||||
return retval ;
|
||||
} ;
|
||||
|
||||
sf_command (NULL, SFC_GET_LIB_VERSION, buffer, sizeof (buffer)) ;
|
||||
|
||||
std::string version (buffer) ;
|
||||
|
||||
retval.append (version) ;
|
||||
return retval ;
|
||||
} /* sfversion */
|
||||
|
||||
|
||||
DEFUN_DLD (sfread, args, nargout ,
|
||||
"-*- texinfo -*-\n\
|
||||
@deftypefn {Loadable Function} {@var{data},@var{srate},@var{format} =} sfread (@var{filename})\n\
|
||||
@cindex Reading sound files\n\
|
||||
Read a sound file from disk using libsndfile.\n\
|
||||
@seealso{sfversion, sfwrite}\n\
|
||||
@end deftypefn")
|
||||
{ SNDFILE * file ;
|
||||
SF_INFO sfinfo ;
|
||||
|
||||
octave_value_list retval ;
|
||||
|
||||
int nargin = args.length () ;
|
||||
|
||||
/* Bail out if the input parameters are bad. */
|
||||
if ((nargin != 1) || !args (0) .is_string () || nargout < 1 || nargout > 3)
|
||||
{ print_usage () ;
|
||||
return retval ;
|
||||
} ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
std::string filename = args (0).string_value () ;
|
||||
|
||||
if ((file = sf_open (filename.c_str (), SFM_READ, &sfinfo)) == NULL)
|
||||
{ error ("sfread: couldn't open file %s : %s", filename.c_str (), sf_strerror (NULL)) ;
|
||||
return retval ;
|
||||
} ;
|
||||
|
||||
if (sfinfo.frames > FOUR_GIG)
|
||||
printf ("This is a really huge file (%lld frames).\nYou may run out of memory trying to load it.\n", (long long) sfinfo.frames) ;
|
||||
|
||||
dim_vector dim = dim_vector () ;
|
||||
dim.resize (2) ;
|
||||
dim (0) = sfinfo.frames ;
|
||||
dim (1) = sfinfo.channels ;
|
||||
|
||||
/* Should I be using Matrix instead? */
|
||||
NDArray out (dim, 0.0) ;
|
||||
|
||||
float buffer [BUFFER_FRAMES * sfinfo.channels] ;
|
||||
int readcount ;
|
||||
sf_count_t total = 0 ;
|
||||
|
||||
do
|
||||
{ readcount = sf_readf_float (file, buffer, BUFFER_FRAMES) ;
|
||||
|
||||
/* Make sure we don't read more frames than we allocated. */
|
||||
if (total + readcount > sfinfo.frames)
|
||||
readcount = sfinfo.frames - total ;
|
||||
|
||||
for (int ch = 0 ; ch < sfinfo.channels ; ch++)
|
||||
{ for (int k = 0 ; k < readcount ; k++)
|
||||
out (total + k, ch) = buffer [k * sfinfo.channels + ch] ;
|
||||
} ;
|
||||
|
||||
total += readcount ;
|
||||
} while (readcount > 0 && total < sfinfo.frames) ;
|
||||
|
||||
retval.append (out.squeeze ()) ;
|
||||
|
||||
if (nargout >= 2)
|
||||
retval.append ((octave_uint32) sfinfo.samplerate) ;
|
||||
|
||||
if (nargout >= 3)
|
||||
{ std::string fmt ("") ;
|
||||
string_of_format (fmt, sfinfo.format) ;
|
||||
retval.append (fmt) ;
|
||||
} ;
|
||||
|
||||
/* Clean up. */
|
||||
sf_close (file) ;
|
||||
|
||||
return retval ;
|
||||
} /* sfread */
|
||||
|
||||
DEFUN_DLD (sfwrite, args, nargout ,
|
||||
"-*- texinfo -*-\n\
|
||||
@deftypefn {Function File} sfwrite (@var{filename},@var{data},@var{srate},@var{format})\n\
|
||||
Write a sound file to disk using libsndfile.\n\
|
||||
@seealso{sfread, sfversion}\n\
|
||||
@end deftypefn\n\
|
||||
")
|
||||
{ SNDFILE * file ;
|
||||
SF_INFO sfinfo ;
|
||||
|
||||
octave_value_list retval ;
|
||||
|
||||
int nargin = args.length () ;
|
||||
|
||||
/* Bail out if the input parameters are bad. */
|
||||
if (nargin != 4 || !args (0).is_string () || !args (1).is_real_matrix ()
|
||||
|| !args (2).is_real_scalar () || !args (3).is_string ()
|
||||
|| nargout != 0)
|
||||
{ print_usage () ;
|
||||
return retval ;
|
||||
} ;
|
||||
|
||||
std::string filename = args (0).string_value () ;
|
||||
std::string format = args (3).string_value () ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
sfinfo.format = format_of_str (format) ;
|
||||
if (sfinfo.format == 0)
|
||||
{ error ("Bad format '%s'", format.c_str ()) ;
|
||||
return retval ;
|
||||
} ;
|
||||
|
||||
sfinfo.samplerate = lrint (args (2).scalar_value ()) ;
|
||||
if (sfinfo.samplerate < 1)
|
||||
{ error ("Bad sample rate : %d.\n", sfinfo.samplerate) ;
|
||||
return retval ;
|
||||
} ;
|
||||
|
||||
Matrix data = args (1).matrix_value () ;
|
||||
long rows = args (1).rows () ;
|
||||
long cols = args (1).columns () ;
|
||||
|
||||
if (cols > rows)
|
||||
{ error ("Audio data should have one column per channel, but supplied data "
|
||||
"has %ld rows and %ld columns.\n", rows, cols) ;
|
||||
return retval ;
|
||||
} ;
|
||||
|
||||
sfinfo.channels = cols ;
|
||||
|
||||
if ((file = sf_open (filename.c_str (), SFM_WRITE, &sfinfo)) == NULL)
|
||||
{ error ("Couldn't open file %s : %s", filename.c_str (), sf_strerror (NULL)) ;
|
||||
return retval ;
|
||||
} ;
|
||||
|
||||
float buffer [BUFFER_FRAMES * sfinfo.channels] ;
|
||||
int writecount ;
|
||||
long total = 0 ;
|
||||
|
||||
do
|
||||
{
|
||||
writecount = BUFFER_FRAMES ;
|
||||
|
||||
/* Make sure we don't read more frames than we allocated. */
|
||||
if (total + writecount > rows)
|
||||
writecount = rows - total ;
|
||||
|
||||
for (int ch = 0 ; ch < sfinfo.channels ; ch++)
|
||||
{ for (int k = 0 ; k < writecount ; k++)
|
||||
buffer [k * sfinfo.channels + ch] = data (total + k, ch) ;
|
||||
} ;
|
||||
|
||||
if (writecount > 0)
|
||||
sf_writef_float (file, buffer, writecount) ;
|
||||
|
||||
total += writecount ;
|
||||
} while (writecount > 0 && total < rows) ;
|
||||
|
||||
/* Clean up. */
|
||||
sf_close (file) ;
|
||||
|
||||
return retval ;
|
||||
} /* sfwrite */
|
||||
|
||||
|
||||
static void
|
||||
str_split (const std::string & str, const std::string & delim, std::vector <std::string> & output)
|
||||
{
|
||||
unsigned int offset = 0 ;
|
||||
size_t delim_index = 0 ;
|
||||
|
||||
delim_index = str.find (delim, offset) ;
|
||||
|
||||
while (delim_index != std::string::npos)
|
||||
{
|
||||
output.push_back (str.substr(offset, delim_index - offset)) ;
|
||||
offset += delim_index - offset + delim.length () ;
|
||||
delim_index = str.find (delim, offset) ;
|
||||
}
|
||||
|
||||
output.push_back (str.substr (offset)) ;
|
||||
} /* str_split */
|
||||
|
||||
static int
|
||||
hash_of_str (const std::string & str)
|
||||
{
|
||||
int hash = 0 ;
|
||||
|
||||
for (unsigned k = 0 ; k < str.length () ; k++)
|
||||
hash = (hash * 3) + tolower (str [k]) ;
|
||||
|
||||
return hash ;
|
||||
} /* hash_of_str */
|
||||
|
||||
static int
|
||||
major_format_of_hash (const std::string & str)
|
||||
{ int hash ;
|
||||
|
||||
hash = hash_of_str (str) ;
|
||||
|
||||
switch (hash)
|
||||
{
|
||||
case 0x5c8 : /* 'wav' */ return SF_FORMAT_WAV ;
|
||||
case 0xf84 : /* 'aiff' */ return SF_FORMAT_AIFF ;
|
||||
case 0x198 : /* 'au' */ return SF_FORMAT_AU ;
|
||||
case 0x579 : /* 'paf' */ return SF_FORMAT_PAF ;
|
||||
case 0x5e5 : /* 'svx' */ return SF_FORMAT_SVX ;
|
||||
case 0x1118 : /* 'nist' */ return SF_FORMAT_NIST ;
|
||||
case 0x5d6 : /* 'voc' */ return SF_FORMAT_VOC ;
|
||||
case 0x324a : /* 'ircam' */ return SF_FORMAT_IRCAM ;
|
||||
case 0x505 : /* 'w64' */ return SF_FORMAT_W64 ;
|
||||
case 0x1078 : /* 'mat4' */ return SF_FORMAT_MAT4 ;
|
||||
case 0x1079 : /* 'mat5' */ return SF_FORMAT_MAT5 ;
|
||||
case 0x5b8 : /* 'pvf' */ return SF_FORMAT_PVF ;
|
||||
case 0x1d1 : /* 'xi' */ return SF_FORMAT_XI ;
|
||||
case 0x56f : /* 'htk' */ return SF_FORMAT_HTK ;
|
||||
case 0x5aa : /* 'sds' */ return SF_FORMAT_SDS ;
|
||||
case 0x53d : /* 'avr' */ return SF_FORMAT_AVR ;
|
||||
case 0x11d0 : /* 'wavx' */ return SF_FORMAT_WAVEX ;
|
||||
case 0x569 : /* 'sd2' */ return SF_FORMAT_SD2 ;
|
||||
case 0x1014 : /* 'flac' */ return SF_FORMAT_FLAC ;
|
||||
case 0x504 : /* 'caf' */ return SF_FORMAT_CAF ;
|
||||
case 0x5f6 : /* 'wve' */ return SF_FORMAT_WVE ;
|
||||
default : break ;
|
||||
} ;
|
||||
|
||||
printf ("%s : hash '%s' -> 0x%x\n", __func__, str.c_str (), hash) ;
|
||||
|
||||
return 0 ;
|
||||
} /* major_format_of_hash */
|
||||
|
||||
static int
|
||||
minor_format_of_hash (const std::string & str)
|
||||
{ int hash ;
|
||||
|
||||
hash = hash_of_str (str) ;
|
||||
|
||||
switch (hash)
|
||||
{
|
||||
case 0x1085 : /* 'int8' */ return SF_FORMAT_PCM_S8 ;
|
||||
case 0x358a : /* 'uint8' */ return SF_FORMAT_PCM_U8 ;
|
||||
case 0x31b0 : /* 'int16' */ return SF_FORMAT_PCM_16 ;
|
||||
case 0x31b1 : /* 'int24' */ return SF_FORMAT_PCM_24 ;
|
||||
case 0x31b2 : /* 'int32' */ return SF_FORMAT_PCM_32 ;
|
||||
case 0x3128 : /* 'float' */ return SF_FORMAT_FLOAT ;
|
||||
case 0x937d : /* 'double' */ return SF_FORMAT_DOUBLE ;
|
||||
case 0x11bd : /* 'ulaw' */ return SF_FORMAT_ULAW ;
|
||||
case 0xfa1 : /* 'alaw' */ return SF_FORMAT_ALAW ;
|
||||
case 0xfc361 : /* 'ima_adpcm' */ return SF_FORMAT_IMA_ADPCM ;
|
||||
case 0x5739a : /* 'ms_adpcm' */ return SF_FORMAT_MS_ADPCM ;
|
||||
case 0x9450 : /* 'gsm610' */ return SF_FORMAT_GSM610 ;
|
||||
case 0x172a3 : /* 'g721_32' */ return SF_FORMAT_G721_32 ;
|
||||
case 0x172d8 : /* 'g723_24' */ return SF_FORMAT_G723_24 ;
|
||||
case 0x172da : /* 'g723_40' */ return SF_FORMAT_G723_40 ;
|
||||
default : break ;
|
||||
} ;
|
||||
|
||||
printf ("%s : hash '%s' -> 0x%x\n", __func__, str.c_str (), hash) ;
|
||||
|
||||
return 0 ;
|
||||
} /* minor_format_of_hash */
|
||||
|
||||
|
||||
static const char *
|
||||
string_of_major_format (int format)
|
||||
{
|
||||
switch (format & SF_FORMAT_TYPEMASK)
|
||||
{
|
||||
case SF_FORMAT_WAV : return "wav" ;
|
||||
case SF_FORMAT_AIFF : return "aiff" ;
|
||||
case SF_FORMAT_AU : return "au" ;
|
||||
case SF_FORMAT_PAF : return "paf" ;
|
||||
case SF_FORMAT_SVX : return "svx" ;
|
||||
case SF_FORMAT_NIST : return "nist" ;
|
||||
case SF_FORMAT_VOC : return "voc" ;
|
||||
case SF_FORMAT_IRCAM : return "ircam" ;
|
||||
case SF_FORMAT_W64 : return "w64" ;
|
||||
case SF_FORMAT_MAT4 : return "mat4" ;
|
||||
case SF_FORMAT_MAT5 : return "mat5" ;
|
||||
case SF_FORMAT_PVF : return "pvf" ;
|
||||
case SF_FORMAT_XI : return "xi" ;
|
||||
case SF_FORMAT_HTK : return "htk" ;
|
||||
case SF_FORMAT_SDS : return "sds" ;
|
||||
case SF_FORMAT_AVR : return "avr" ;
|
||||
case SF_FORMAT_WAVEX : return "wavx" ;
|
||||
case SF_FORMAT_SD2 : return "sd2" ;
|
||||
case SF_FORMAT_FLAC : return "flac" ;
|
||||
case SF_FORMAT_CAF : return "caf" ;
|
||||
case SF_FORMAT_WVE : return "wfe" ;
|
||||
default : break ;
|
||||
} ;
|
||||
|
||||
return "unknown" ;
|
||||
} /* string_of_major_format */
|
||||
|
||||
static const char *
|
||||
string_of_minor_format (int format)
|
||||
{
|
||||
switch (format & SF_FORMAT_SUBMASK)
|
||||
{
|
||||
case SF_FORMAT_PCM_S8 : return "int8" ;
|
||||
case SF_FORMAT_PCM_U8 : return "uint8" ;
|
||||
case SF_FORMAT_PCM_16 : return "int16" ;
|
||||
case SF_FORMAT_PCM_24 : return "int24" ;
|
||||
case SF_FORMAT_PCM_32 : return "int32" ;
|
||||
case SF_FORMAT_FLOAT : return "float" ;
|
||||
case SF_FORMAT_DOUBLE : return "double" ;
|
||||
case SF_FORMAT_ULAW : return "ulaw" ;
|
||||
case SF_FORMAT_ALAW : return "alaw" ;
|
||||
case SF_FORMAT_IMA_ADPCM : return "ima_adpcm" ;
|
||||
case SF_FORMAT_MS_ADPCM : return "ms_adpcm" ;
|
||||
case SF_FORMAT_GSM610 : return "gsm610" ;
|
||||
case SF_FORMAT_G721_32 : return "g721_32" ;
|
||||
case SF_FORMAT_G723_24 : return "g723_24" ;
|
||||
case SF_FORMAT_G723_40 : return "g723_40" ;
|
||||
default : break ;
|
||||
} ;
|
||||
|
||||
return "unknown" ;
|
||||
} /* string_of_minor_format */
|
||||
|
||||
static int
|
||||
format_of_str (const std::string & fmt)
|
||||
{
|
||||
std::vector <std::string> split ;
|
||||
|
||||
str_split (fmt, "-", split) ;
|
||||
|
||||
if (split.size () != 2)
|
||||
return 0 ;
|
||||
|
||||
int major_fmt = major_format_of_hash (split.at (0)) ;
|
||||
if (major_fmt == 0)
|
||||
return 0 ;
|
||||
|
||||
int minor_fmt = minor_format_of_hash (split.at (1)) ;
|
||||
if (minor_fmt == 0)
|
||||
return 0 ;
|
||||
|
||||
return major_fmt | minor_fmt ;
|
||||
} /* format_of_str */
|
||||
|
||||
static void
|
||||
string_of_format (std::string & fmt, int format)
|
||||
{
|
||||
char buffer [64] ;
|
||||
|
||||
snprintf (buffer, sizeof (buffer), "%s-%s", string_of_major_format (format), string_of_minor_format (format)) ;
|
||||
|
||||
fmt = buffer ;
|
||||
|
||||
return ;
|
||||
} /* string_of_format */
|
|
@ -0,0 +1,52 @@
|
|||
## Copyright (C) 2002-2011 Erik de Castro Lopo
|
||||
##
|
||||
## 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 2, 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 file. If not, write to the Free Software Foundation,
|
||||
## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
## -*- texinfo -*-
|
||||
## @deftypefn {Function File} {} sndfile_load (@var{filename})
|
||||
## Load data from the file given by @var{filename}.
|
||||
## @end deftypefn
|
||||
|
||||
## Author: Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
## Description: Load the sound data from the given file name
|
||||
|
||||
function [data fs] = sndfile_load (filename)
|
||||
|
||||
if (nargin != 1),
|
||||
error ("Need an input filename") ;
|
||||
endif
|
||||
|
||||
samplerate = -1 ;
|
||||
samplingrate = -1 ;
|
||||
wavedata = -1 ;
|
||||
|
||||
|
||||
eval (sprintf ('load -f %s', filename)) ;
|
||||
|
||||
if (samplerate > 0),
|
||||
fs = samplerate ;
|
||||
elseif (samplingrate > 0),
|
||||
fs = samplingrate ;
|
||||
else
|
||||
error ("Not able to find sample rate.") ;
|
||||
endif
|
||||
|
||||
if (max (size (wavedata)) > 1),
|
||||
data = wavedata ;
|
||||
else
|
||||
error ("Not able to find waveform data.") ;
|
||||
endif
|
||||
|
||||
endfunction
|
|
@ -0,0 +1,59 @@
|
|||
## Copyright (C) 2002-2011 Erik de Castro Lopo
|
||||
##
|
||||
## 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 2, 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 file. If not, write to the Free Software Foundation,
|
||||
## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
## -*- texinfo -*-
|
||||
## @deftypefn {Function File} {} sndfile_play (@var{data, fs})
|
||||
## Play @var{data} at sample rate @var{fs} using the sndfile-play
|
||||
## program.
|
||||
## @end deftypefn
|
||||
|
||||
## Author: Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
## Description: Play the given data as a sound file
|
||||
|
||||
function sndfile_play (data, fs)
|
||||
|
||||
if nargin != 2,
|
||||
error ("Need two input arguments: data and fs.") ;
|
||||
endif
|
||||
|
||||
if (max (size (fs)) > 1),
|
||||
error ("Second parameter fs must be a single value.") ;
|
||||
endif
|
||||
|
||||
[nr nc] = size (data) ;
|
||||
|
||||
if (nr > nc),
|
||||
data = data' ;
|
||||
endif
|
||||
|
||||
samplerate = fs ;
|
||||
wavedata = data ;
|
||||
|
||||
filename = tmpnam () ;
|
||||
|
||||
cmd = sprintf ("save -mat-binary %s fs data", filename) ;
|
||||
|
||||
eval (cmd) ;
|
||||
|
||||
cmd = sprintf ("sndfile-play %s", filename) ;
|
||||
|
||||
[output, status] = system (cmd) ;
|
||||
|
||||
if (status),
|
||||
disp (outout) ;
|
||||
endif
|
||||
|
||||
endfunction
|
|
@ -0,0 +1,53 @@
|
|||
## Copyright (C) 2002-2011 Erik de Castro Lopo
|
||||
##
|
||||
## 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 2, 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 file. If not, write to the Free Software Foundation,
|
||||
## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
## -*- texinfo -*-
|
||||
## @deftypefn {Function File} {} sndfile_save (@var{filename, data, fs})
|
||||
## Save the given @var{data} as audio data to the given at @var{fs}. Set
|
||||
## the sample rate to @var{fs}.
|
||||
## @end deftypefn
|
||||
|
||||
## Author: Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
## Description: Save data as a sound file
|
||||
|
||||
function sndfile_save (filename, data, fs)
|
||||
|
||||
if nargin != 3,
|
||||
error ("Need three input arguments: filename, data and fs.") ;
|
||||
endif
|
||||
|
||||
if (! isstr (filename)),
|
||||
error ("First parameter 'filename' is must be a string.") ;
|
||||
endif
|
||||
|
||||
if (max (size (fs)) > 1),
|
||||
error ("Second parameter 'fs' must be a single value, not an array or matrix.") ;
|
||||
endif
|
||||
|
||||
[nr nc] = size (data) ;
|
||||
|
||||
if (nr > nc),
|
||||
data = data' ;
|
||||
endif
|
||||
|
||||
samplerate = fs ;
|
||||
wavedata = data ;
|
||||
|
||||
str = sprintf ("save -mat-binary %s samplerate wavedata", filename) ;
|
||||
|
||||
eval (str) ;
|
||||
|
||||
endfunction
|
|
@ -0,0 +1,71 @@
|
|||
This is libsndfile, 1.0.28
|
||||
|
||||
libsndfile is a library of C routines for reading and writing
|
||||
files containing sampled audio data.
|
||||
|
||||
The src/ directory contains the source code for library itself.
|
||||
|
||||
The doc/ directory contains the libsndfile documentation.
|
||||
|
||||
The examples/ directory contains examples of how to write code using
|
||||
libsndfile.
|
||||
|
||||
The tests/ directory contains programs which link against libsndfile
|
||||
and test its functionality.
|
||||
|
||||
The src/GSM610 directory contains code written by Jutta Degener and Carsten
|
||||
Bormann. Their original code can be found at :
|
||||
http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
|
||||
The src/G72x directory contains code written and released by Sun Microsystems
|
||||
under a suitably free license.
|
||||
|
||||
The src/ALAC directory contains code written and released by Apple Inc and
|
||||
released under the Apache license.
|
||||
|
||||
|
||||
LINUX
|
||||
-----
|
||||
Whereever possible, you should use the packages supplied by your Linux
|
||||
distribution.
|
||||
|
||||
If you really do need to compile from source it should be as easy as:
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
Since libsndfile optionally links against libFLAC, libogg and libvorbis, you
|
||||
will need to install appropriate versions of these libraries before running
|
||||
configure as above.
|
||||
|
||||
|
||||
UNIX
|
||||
----
|
||||
Compile as for Linux.
|
||||
|
||||
|
||||
Win32/Win64
|
||||
-----------
|
||||
The default Windows compilers are nowhere near compliant with the 1999 ISO
|
||||
C Standard and hence not able to compile libsndfile.
|
||||
|
||||
Please use the libsndfile binaries available on the libsndfile web site.
|
||||
|
||||
|
||||
MacOSX
|
||||
------
|
||||
Building on MacOSX should be the same as building it on any other Unix.
|
||||
|
||||
|
||||
CONTACTS
|
||||
--------
|
||||
|
||||
libsndfile was written by Erik de Castro Lopo (erikd AT mega-nerd DOT com).
|
||||
The libsndfile home page is at :
|
||||
|
||||
http://www.mega-nerd.com/libsndfile/
|
||||
|
||||
Bugs and support questions can be raised at :
|
||||
|
||||
https://github.com/erikd/libsndfile/
|
|
@ -0,0 +1,96 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# Copyright (C) 2013-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Neither the author nor the names of any contributors may be used
|
||||
# to endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Android NDK version number; eg r10, r10b etc
|
||||
ANDROID_NDK_VER=${ANDROID_NDK_VER:-r10}
|
||||
|
||||
# Android NDK gcc version; eg 4.8, 4.9 etc.
|
||||
ANDROID_GCC_VER=${ANDROID_GCC_VER:-4.9}
|
||||
|
||||
# Android API version; eg 14 (Android 4.0), 21 (Android 5.0) etc.
|
||||
ANDROID_API_VER=${ANDROID_API_VER:-14}
|
||||
|
||||
ANDROID_TARGET=${ANDROID_TARGET:-arm-linux-androideabi}
|
||||
|
||||
if test -z ${ANDROID_TOOLCHAIN_HOME} ; then
|
||||
echo "Environment variable ANDROID_TOOLCHAIN_HOME not defined."
|
||||
echo "This should point to the directory containing the Android NDK."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# No more user config beyond here.
|
||||
|
||||
BUILD_MACHINE=$(uname -s | tr 'A-Z' 'a-z')-$(uname -m)
|
||||
|
||||
function die_with {
|
||||
echo $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
export CROSS_COMPILE=${ANDROID_TARGET}
|
||||
|
||||
# Don't forget to adjust this to your NDK path
|
||||
export ANDROID_NDK=${ANDROID_TOOLCHAIN_HOME}/android-ndk-${ANDROID_NDK_VER}
|
||||
test -d ${ANDROID_NDK} || die_with "Error : ANDROID_NDK '$ANDROID_NDK' does not exist."
|
||||
|
||||
export ANDROID_PREFIX=${ANDROID_NDK}/toolchains/arm-linux-androideabi-${ANDROID_GCC_VER}/prebuilt/${BUILD_MACHINE}
|
||||
test -d ${ANDROID_PREFIX} || die_with "Error : ANDROID_PREFIX '$ANDROID_PREFIX' does not exist."
|
||||
|
||||
export SYSROOT=${ANDROID_NDK}/platforms/android-${ANDROID_API_VER}/arch-arm
|
||||
test -d ${SYSROOT} || die_with "Error : SYSROOT '$SYSROOT' does not exist."
|
||||
|
||||
export CROSS_PREFIX=${ANDROID_PREFIX}/bin/${CROSS_COMPILE}
|
||||
test -f ${CROSS_PREFIX}-gcc || die_with "Error : CROSS_PREFIX compiler '${CROSS_PREFIX}-gcc' does not exist."
|
||||
|
||||
|
||||
# Non-exhaustive lists of compiler + binutils
|
||||
# Depending on what you compile, you might need more binutils than that
|
||||
export CPP=${CROSS_PREFIX}-cpp
|
||||
export AR=${CROSS_PREFIX}-ar
|
||||
export AS=${CROSS_PREFIX}-as
|
||||
export NM=${CROSS_PREFIX}-nm
|
||||
export CC=${CROSS_PREFIX}-gcc
|
||||
export CXX=${CROSS_PREFIX}-g++
|
||||
export LD=${CROSS_PREFIX}-ld
|
||||
export RANLIB=${CROSS_PREFIX}-ranlib
|
||||
|
||||
# Don't mix up .pc files from your host and build target
|
||||
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
|
||||
|
||||
# Set up the needed FLAGS.
|
||||
export CFLAGS="${CFLAGS} -gstabs --sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${ANDROID_PREFIX}/include"
|
||||
export CXXFLAGS="${CXXFLAGS} -gstabs -fno-exceptions --sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${ANDROID_PREFIX}/include -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/include/ -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/libs/armeabi/include"
|
||||
|
||||
export CPPFLAGS="${CFLAGS}"
|
||||
export LDFLAGS="${LDFLAGS} -L${SYSROOT}/usr/lib -L${ANDROID_PREFIX}/lib"
|
||||
|
||||
# Create a symlink to the gdbclient.
|
||||
test -h gdbclient || ln -s ${ANDROID_PREFIX}/bin/arm-linux-androideabi-gdb gdbclient
|
||||
|
||||
./configure --host=${CROSS_COMPILE} --with-sysroot=${SYSROOT} "$@"
|
|
@ -0,0 +1,61 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
# This is probably only going to work with GNU Make.
|
||||
# This in a separate file instead of in Makefile.am because Automake complains
|
||||
# about the GNU Make-isms.
|
||||
|
||||
EXEEXT = @EXEEXT@
|
||||
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
|
||||
HOST_TRIPLET = @HOST_TRIPLET@
|
||||
|
||||
SRC_BINDIR = @SRC_BINDIR@
|
||||
TEST_BINDIR = @TEST_BINDIR@
|
||||
|
||||
LIBRARY := $(SRC_BINDIR)libsndfile.so.$(LIB_VERSION)
|
||||
|
||||
LIB_VERSION := $(shell echo $(PACKAGE_VERSION) | sed -e 's/[a-z].*//')
|
||||
|
||||
TESTNAME = libsndfile-testsuite-$(HOST_TRIPLET)-$(PACKAGE_VERSION)
|
||||
|
||||
TARBALL = $(TESTNAME).tar.gz
|
||||
|
||||
# Find the test programs by grepping the script for the programs it executes.
|
||||
testprogs := $(shell grep '^\./' tests/test_wrapper.sh | sed -e "s|./||" -e "s/ .*//" | sort | uniq)
|
||||
# Also add the programs not found by the above.
|
||||
testprogs += sfversion@EXEEXT@ stdin_test@EXEEXT@ stdout_test@EXEEXT@ cpp_test@EXEEXT@ win32_test@EXEEXT@
|
||||
|
||||
# Find the single test program in src/ .
|
||||
srcprogs := $(shell if test -x src/.libs/test_main$(EXEEXT) ; then echo "src/.libs/test_main$(EXEEXT)" ; else echo "src/test_main$(EXEEXT)" ; fi)
|
||||
|
||||
libfiles := $(shell if test ! -z $(EXEEXT) ; then echo "src/libsndfile-1.def src/.libs/libsndfile-1.dll" ; elif test -f $(LIBRARY) ; then echo $(LIBRARY) ; fi ; fi)
|
||||
|
||||
testbins := $(addprefix $(TEST_BINDIR),$(subst @EXEEXT@,$(EXEEXT),$(testprogs))) $(libfiles) $(srcprogs)
|
||||
|
||||
|
||||
all : $(TARBALL)
|
||||
|
||||
clean :
|
||||
rm -rf $(TARBALL) $(TESTNAME)/
|
||||
|
||||
check : $(TESTNAME)/test_wrapper.sh
|
||||
(cd ./$(TESTNAME)/ && ./test_wrapper.sh)
|
||||
|
||||
$(TARBALL) : $(TESTNAME)/test_wrapper.sh
|
||||
tar zcf $@ $(TESTNAME)
|
||||
rm -rf $(TESTNAME)
|
||||
@echo
|
||||
@echo "Created : $(TARBALL)"
|
||||
@echo
|
||||
|
||||
$(TESTNAME)/test_wrapper.sh : $(testbins) tests/test_wrapper.sh tests/pedantic-header-test.sh
|
||||
rm -rf $(TESTNAME)
|
||||
mkdir -p $(TESTNAME)/tests/
|
||||
cp $(testbins) $(TESTNAME)/tests/
|
||||
cp tests/test_wrapper.sh $(TESTNAME)/
|
||||
cp tests/pedantic-header-test.sh $(TESTNAME)/tests/
|
||||
chmod u+x $@
|
||||
|
||||
tests/test_wrapper.sh : tests/test_wrapper.sh.in
|
||||
(cd tests/ ; make $@)
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
case "$1" in
|
||||
w32)
|
||||
compiler_name=i686-w64-mingw32
|
||||
;;
|
||||
w64)
|
||||
compiler_name=x86_64-w64-mingw32
|
||||
;;
|
||||
*)
|
||||
echo "$0 (w32|w64) <other args>"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
|
||||
build_cpu=$(dpkg-architecture -qDEB_BUILD_GNU_CPU)
|
||||
build_host=$build_cpu-linux
|
||||
|
||||
./configure --host=$compiler_name --target=$compiler_name --build=$build_host \
|
||||
--program-prefix='' --disable-sqlite --disable-static $@
|
|
@ -0,0 +1,4 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = README-precompiled-dll.txt testprog.c
|
||||
|
|
@ -0,0 +1,511 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = Win32
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/M4/add_cflags.m4 \
|
||||
$(top_srcdir)/M4/add_cxxflags.m4 \
|
||||
$(top_srcdir)/M4/ax_add_fortify_source.m4 \
|
||||
$(top_srcdir)/M4/clang.m4 $(top_srcdir)/M4/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/gcc_version.m4 $(top_srcdir)/M4/libtool.m4 \
|
||||
$(top_srcdir)/M4/lrint.m4 $(top_srcdir)/M4/lrintf.m4 \
|
||||
$(top_srcdir)/M4/ltoptions.m4 $(top_srcdir)/M4/ltsugar.m4 \
|
||||
$(top_srcdir)/M4/ltversion.m4 $(top_srcdir)/M4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/M4/mkoctfile_version.m4 \
|
||||
$(top_srcdir)/M4/octave.m4 $(top_srcdir)/M4/really_gcc.m4 \
|
||||
$(top_srcdir)/M4/stack_protect.m4 \
|
||||
$(top_srcdir)/M4/visibility.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
|
||||
CLEAN_VERSION = @CLEAN_VERSION@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXTERNAL_XIPH_CFLAGS = @EXTERNAL_XIPH_CFLAGS@
|
||||
EXTERNAL_XIPH_LIBS = @EXTERNAL_XIPH_LIBS@
|
||||
FGREP = @FGREP@
|
||||
FLAC_CFLAGS = @FLAC_CFLAGS@
|
||||
FLAC_LIBS = @FLAC_LIBS@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GCC_MINOR_VERSION = @GCC_MINOR_VERSION@
|
||||
GCC_VERSION = @GCC_VERSION@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_EXTERNAL_XIPH_LIBS = @HAVE_EXTERNAL_XIPH_LIBS@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_VISIBILITY = @HAVE_VISIBILITY@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
HAVE_XCODE_SELECT = @HAVE_XCODE_SELECT@
|
||||
HOST_TRIPLET = @HOST_TRIPLET@
|
||||
HTML_BGCOLOUR = @HTML_BGCOLOUR@
|
||||
HTML_FGCOLOUR = @HTML_FGCOLOUR@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MKOCTFILE = @MKOCTFILE@
|
||||
MKOCTFILE_VERSION = @MKOCTFILE_VERSION@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OCTAVE = @OCTAVE@
|
||||
OCTAVE_CONFIG = @OCTAVE_CONFIG@
|
||||
OCTAVE_CONFIG_VERSION = @OCTAVE_CONFIG_VERSION@
|
||||
OCTAVE_DEST_MDIR = @OCTAVE_DEST_MDIR@
|
||||
OCTAVE_DEST_ODIR = @OCTAVE_DEST_ODIR@
|
||||
OCTAVE_VERSION = @OCTAVE_VERSION@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
OS_SPECIFIC_CFLAGS = @OS_SPECIFIC_CFLAGS@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SF_COUNT_MAX = @SF_COUNT_MAX@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
|
||||
SIZEOF_SF_COUNT_T = @SIZEOF_SF_COUNT_T@
|
||||
SNDIO_LIBS = @SNDIO_LIBS@
|
||||
SPEEX_CFLAGS = @SPEEX_CFLAGS@
|
||||
SPEEX_LIBS = @SPEEX_LIBS@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
SRC_BINDIR = @SRC_BINDIR@
|
||||
STRIP = @STRIP@
|
||||
TEST_BINDIR = @TEST_BINDIR@
|
||||
TYPEOF_SF_COUNT_T = @TYPEOF_SF_COUNT_T@
|
||||
VERSION = @VERSION@
|
||||
VORBISENC_CFLAGS = @VORBISENC_CFLAGS@
|
||||
VORBISENC_LIBS = @VORBISENC_LIBS@
|
||||
VORBIS_CFLAGS = @VORBIS_CFLAGS@
|
||||
VORBIS_LIBS = @VORBIS_LIBS@
|
||||
WIN_RC_VERSION = @WIN_RC_VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = README-precompiled-dll.txt testprog.c
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Win32/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Win32/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,40 @@
|
|||
Notes on Using the Pre-compiled libsndfile DLL.
|
||||
===============================================
|
||||
|
||||
In order to use this pre-compiled DLL with Visual Studio, you will need to
|
||||
generate a .LIB file from the DLL.
|
||||
|
||||
This can be achieved as follows:
|
||||
|
||||
1) In a CMD window, change to the directory containing this file and
|
||||
run the command:
|
||||
|
||||
lib /machine:i386 /def:libsndfile-1.def
|
||||
|
||||
You now have two files:
|
||||
|
||||
libsndfile-1.dll
|
||||
libsndfile-1.lib
|
||||
|
||||
to be used with VisualStudio.
|
||||
|
||||
If the lib command fails with a command saying "'lib' is not recognized as
|
||||
an internal or external command, operable program or batch file", you need
|
||||
to find the location of "lib.exe" and add that directory to your PATH
|
||||
environment variable. Another alternative is to use the "Visual Studio 2005
|
||||
Command Prompt" Start menu item:
|
||||
|
||||
Start ->
|
||||
All Programs ->
|
||||
Visual Studio 2005 ->
|
||||
Visual Studio Tools ->
|
||||
Visual Studio 2005 Command Prompt
|
||||
|
||||
If for some reason these instructions don't work for you or you are still
|
||||
not able to use the libsndfile DLL with you project, please do not contact
|
||||
the main author of libsndfile. Instead, join the libsndfile-users mailing
|
||||
list :
|
||||
|
||||
http://www.mega-nerd.com/libsndfile/lists.html
|
||||
|
||||
and ask a question there.
|
|
@ -0,0 +1,16 @@
|
|||
/* Simple test program to make sure that Win32 linking to libsndfile is
|
||||
** working.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "sndfile.h"
|
||||
|
||||
int
|
||||
main (void)
|
||||
{ static char strbuffer [256] ;
|
||||
sf_command (NULL, SFC_GET_LIB_VERSION, strbuffer, sizeof (strbuffer)) ;
|
||||
puts (strbuffer) ;
|
||||
return 0 ;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,698 @@
|
|||
# Copyright (C) 1999-2017 Erik de Castro Lopo <erikd@mega-nerd.com>.
|
||||
|
||||
dnl Require autoconf version
|
||||
AC_PREREQ(2.57)
|
||||
|
||||
AC_INIT([libsndfile],[1.0.28],[sndfile@mega-nerd.com],
|
||||
[libsndfile],[http://www.mega-nerd.com/libsndfile/])
|
||||
|
||||
# Put config stuff in Cfg.
|
||||
AC_CONFIG_AUX_DIR(Cfg)
|
||||
AC_CONFIG_MACRO_DIR([M4])
|
||||
|
||||
AC_CONFIG_SRCDIR([src/sndfile.c])
|
||||
AC_CANONICAL_TARGET([])
|
||||
|
||||
AC_CONFIG_HEADERS([src/config.h])
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
AC_LANG([C])
|
||||
|
||||
AC_PROG_CC_STDC
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CXX
|
||||
|
||||
MN_C_COMPILER_IS_CLANG
|
||||
MN_GCC_REALLY_IS_GCC
|
||||
|
||||
AC_PROG_SED
|
||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
|
||||
LT_INIT
|
||||
LT_PROG_RC
|
||||
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
|
||||
AC_CHECK_PROG(HAVE_AUTOGEN, autogen, yes, no)
|
||||
AC_CHECK_PROG(HAVE_WINE, wine, yes, no)
|
||||
AC_CHECK_PROG(HAVE_XCODE_SELECT, xcode-select, yes, no)
|
||||
|
||||
#------------------------------------------------------------------------------------
|
||||
# Rules for library version information:
|
||||
#
|
||||
# 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
|
||||
# your software. More frequent updates are unnecessary, and only guarantee
|
||||
# that the current interface number gets larger faster.
|
||||
# 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').
|
||||
# 4. If any interfaces have been added, removed, or changed since the last update,
|
||||
# increment current, and set revision to 0.
|
||||
# 5. If any interfaces have been added since the last public release, then increment
|
||||
# age.
|
||||
# 6. If any interfaces have been removed since the last public release, then set age
|
||||
# to 0.
|
||||
|
||||
CLEAN_VERSION=`echo $PACKAGE_VERSION | $SED "s/p.*//"`
|
||||
VERSION_MINOR=`echo $CLEAN_VERSION | $SED "s/.*\.//"`
|
||||
|
||||
SHARED_VERSION_INFO="1:$VERSION_MINOR:0"
|
||||
|
||||
#------------------------------------------------------------------------------------
|
||||
|
||||
AC_HEADER_STDC
|
||||
|
||||
AC_CHECK_HEADERS(endian.h)
|
||||
AC_CHECK_HEADERS(byteswap.h)
|
||||
AC_CHECK_HEADERS(locale.h)
|
||||
AC_CHECK_HEADERS(sys/time.h)
|
||||
|
||||
AC_HEADER_SYS_WAIT
|
||||
|
||||
AC_CHECK_DECLS(S_IRGRP)
|
||||
if test x$ac_cv_have_decl_S_IRGRP = xyes ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_DECL_S_IRGRP],1,[Set to 1 if S_IRGRP is defined.])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED([HAVE_DECL_S_IRGRP],0)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([LINUX_MINGW_CROSS_TEST],
|
||||
[test "$build_os:$target_os:$host_os:$HAVE_WINE" = "linux-gnu:mingw32msvc:mingw32msvc:yes"])
|
||||
|
||||
gl_VISIBILITY
|
||||
|
||||
#====================================================================================
|
||||
# Couple of initializations here. Fill in real values later.
|
||||
|
||||
SHLIB_VERSION_ARG=""
|
||||
|
||||
#====================================================================================
|
||||
# Finished checking, handle options.
|
||||
|
||||
AC_ARG_ENABLE(experimental,
|
||||
AS_HELP_STRING([--enable-experimental], [enable experimental code]))
|
||||
|
||||
EXPERIMENTAL_CODE=0
|
||||
if test x$enable_experimental = xyes ; then
|
||||
EXPERIMENTAL_CODE=1
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([ENABLE_EXPERIMENTAL_CODE],${EXPERIMENTAL_CODE}, [Set to 1 to enable experimental code.])
|
||||
|
||||
AC_ARG_ENABLE(werror,
|
||||
AS_HELP_STRING([--enable-werror], [enable -Werror in all Makefiles]))
|
||||
|
||||
AC_ARG_ENABLE(stack-smash-protection,
|
||||
AS_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection]))
|
||||
|
||||
AC_ARG_ENABLE(gcc-pipe,
|
||||
AS_HELP_STRING([--disable-gcc-pipe], [disable gcc -pipe option]))
|
||||
|
||||
AC_ARG_ENABLE(gcc-opt,
|
||||
AS_HELP_STRING([--disable-gcc-opt], [disable gcc optimisations]))
|
||||
|
||||
AC_ARG_ENABLE(cpu-clip,
|
||||
AS_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper]))
|
||||
|
||||
AC_ARG_ENABLE(bow-docs,
|
||||
AS_HELP_STRING([--enable-bow-docs], [enable black-on-white html docs]))
|
||||
|
||||
AC_ARG_ENABLE(sqlite,
|
||||
AS_HELP_STRING([--disable-sqlite], [disable use of sqlite]))
|
||||
|
||||
AC_ARG_ENABLE(alsa,
|
||||
AS_HELP_STRING([--disable-alsa], [disable use of ALSA]))
|
||||
|
||||
AC_ARG_ENABLE(external-libs,
|
||||
AS_HELP_STRING([--disable-external-libs], [disable use of FLAC, Ogg and Vorbis [[default=no]]]))
|
||||
|
||||
AC_ARG_ENABLE(octave,
|
||||
AS_HELP_STRING([--enable-octave], [disable building of GNU Octave module]))
|
||||
|
||||
AC_ARG_ENABLE([full-suite],
|
||||
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"])
|
||||
|
||||
AC_ARG_ENABLE(test-coverage,
|
||||
AS_HELP_STRING([--enable-test-coverage], [enable test coverage]))
|
||||
AM_CONDITIONAL([ENABLE_TEST_COVERAGE], [test "$enable_test_coverage" = yes])
|
||||
|
||||
#====================================================================================
|
||||
# Check types and their sizes.
|
||||
|
||||
AC_CHECK_SIZEOF(wchar_t,4)
|
||||
AC_CHECK_SIZEOF(short,2)
|
||||
AC_CHECK_SIZEOF(int,4)
|
||||
AC_CHECK_SIZEOF(long,4)
|
||||
AC_CHECK_SIZEOF(float,4)
|
||||
AC_CHECK_SIZEOF(double,4)
|
||||
AC_CHECK_SIZEOF(void*,8)
|
||||
AC_CHECK_SIZEOF(size_t,4)
|
||||
AC_CHECK_SIZEOF(int64_t,8)
|
||||
AC_CHECK_SIZEOF(long long,8)
|
||||
|
||||
#====================================================================================
|
||||
# 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.
|
||||
# Unfortunately there is more than one way of ensuring this so need to do some
|
||||
# pretty rigourous testing here.
|
||||
|
||||
# Check for common 64 bit file offset types.
|
||||
AC_CHECK_SIZEOF(off_t,1)
|
||||
|
||||
if test "$enable_largefile:$ac_cv_sizeof_off_t" = "no:8" ; then
|
||||
echo
|
||||
echo "Error : Cannot disable large file support because sizeof (off_t) == 8."
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$host_os" in
|
||||
mingw32*)
|
||||
TYPEOF_SF_COUNT_T="__int64"
|
||||
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
||||
SIZEOF_SF_COUNT_T=8
|
||||
AC_DEFINE([__USE_MINGW_ANSI_STDIO],1,[Set to 1 to use C99 printf/snprintf in MinGW.])
|
||||
;;
|
||||
*)
|
||||
SIZEOF_SF_COUNT_T=0
|
||||
if test "x$ac_cv_sizeof_off_t" = "x8" ; then
|
||||
# If sizeof (off_t) is 8, no further checking is needed.
|
||||
TYPEOF_SF_COUNT_T="int64_t"
|
||||
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
||||
SIZEOF_SF_COUNT_T=8
|
||||
else
|
||||
# Save the old sizeof (off_t) value and then unset it to see if it
|
||||
# changes when Large File Support is enabled.
|
||||
pre_largefile_sizeof_off_t=$ac_cv_sizeof_off_t
|
||||
unset ac_cv_sizeof_off_t
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
if test "x$ac_cv_sys_largefile_CFLAGS" = "xno" ; then
|
||||
ac_cv_sys_largefile_CFLAGS=""
|
||||
fi
|
||||
if test "x$ac_cv_sys_largefile_LDFLAGS" = "xno" ; then
|
||||
ac_cv_sys_largefile_LDFLAGS=""
|
||||
fi
|
||||
if test "x$ac_cv_sys_largefile_LIBS" = "xno" ; then
|
||||
ac_cv_sys_largefile_LIBS=""
|
||||
fi
|
||||
|
||||
AC_CHECK_SIZEOF(off_t,1)
|
||||
|
||||
if test "x$ac_cv_sizeof_off_t" = "x8" ; then
|
||||
TYPEOF_SF_COUNT_T="int64_t"
|
||||
SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
|
||||
SIZEOF_SF_COUNT_T=8
|
||||
elif test "x$TYPEOF_SF_COUNT_T" = "xunknown" ; then
|
||||
echo
|
||||
echo "*** The configure process has determined that this system is capable"
|
||||
echo "*** of Large File Support but has not been able to find a type which"
|
||||
echo "*** is an unambiguous 64 bit file offset."
|
||||
echo "*** Please contact the author to help resolve this problem."
|
||||
echo
|
||||
AC_MSG_ERROR([[Bad file offset type.]])
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if test $SIZEOF_SF_COUNT_T = 4 ; then
|
||||
SF_COUNT_MAX="0x7FFFFFFF"
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([TYPEOF_SF_COUNT_T],${TYPEOF_SF_COUNT_T}, [Set to long if unknown.])
|
||||
AC_SUBST(TYPEOF_SF_COUNT_T)
|
||||
|
||||
AC_DEFINE_UNQUOTED([SIZEOF_SF_COUNT_T],${SIZEOF_SF_COUNT_T}, [Set to sizeof (long) if unknown.])
|
||||
AC_SUBST(SIZEOF_SF_COUNT_T)
|
||||
|
||||
AC_DEFINE_UNQUOTED([SF_COUNT_MAX],${SF_COUNT_MAX}, [Set to maximum allowed value of sf_count_t type.])
|
||||
AC_SUBST(SF_COUNT_MAX)
|
||||
|
||||
AC_TYPE_SSIZE_T
|
||||
|
||||
#====================================================================================
|
||||
# Determine endian-ness of target processor.
|
||||
|
||||
MN_C_FIND_ENDIAN
|
||||
|
||||
AC_DEFINE_UNQUOTED(CPU_IS_BIG_ENDIAN, ${ac_cv_c_big_endian},
|
||||
[Target processor is big 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.])
|
||||
|
||||
#====================================================================================
|
||||
# Check for functions.
|
||||
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free)
|
||||
AC_CHECK_FUNCS(open read write lseek lseek64)
|
||||
AC_CHECK_FUNCS(fstat fstat64 ftruncate fsync)
|
||||
AC_CHECK_FUNCS(snprintf vsnprintf)
|
||||
AC_CHECK_FUNCS(gmtime gmtime_r localtime localtime_r gettimeofday)
|
||||
AC_CHECK_FUNCS(mmap getpagesize)
|
||||
AC_CHECK_FUNCS(setlocale)
|
||||
AC_CHECK_FUNCS(pipe waitpid)
|
||||
|
||||
AC_CHECK_LIB([m],floor)
|
||||
AC_CHECK_FUNCS(floor ceil fmod lround)
|
||||
|
||||
MN_C99_FUNC_LRINT
|
||||
MN_C99_FUNC_LRINTF
|
||||
|
||||
#====================================================================================
|
||||
# Check for requirements for building plugins for other languages/enviroments.
|
||||
|
||||
dnl Octave maths environment http://www.octave.org/
|
||||
if test x$cross_compiling = xno ; then
|
||||
if test x$enable_octave = xno ; then
|
||||
AM_CONDITIONAL(BUILD_OCTAVE_MOD, false)
|
||||
else
|
||||
AC_OCTAVE_BUILD
|
||||
fi
|
||||
else
|
||||
AM_CONDITIONAL(BUILD_OCTAVE_MOD, false)
|
||||
fi
|
||||
|
||||
#====================================================================================
|
||||
# Check for Ogg, Vorbis and FLAC.
|
||||
|
||||
HAVE_EXTERNAL_XIPH_LIBS=0
|
||||
EXTERNAL_XIPH_CFLAGS=""
|
||||
EXTERNAL_XIPH_LIBS=""
|
||||
|
||||
# Check for pkg-config outside the if statement.
|
||||
PKG_PROG_PKG_CONFIG
|
||||
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig))
|
||||
|
||||
if test -n "$PKG_CONFIG" ; then
|
||||
if test x$enable_external_libs = xno ; then
|
||||
AC_MSG_WARN([[*** External libs (FLAC, Ogg, Vorbis) disabled. ***]])
|
||||
else
|
||||
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.
|
||||
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)
|
||||
|
||||
if test x$enable_experimental = xyes ; then
|
||||
PKG_CHECK_MOD_VERSION(SPEEX, speex >= 1.2, ac_cv_speex=yes, ac_cv_speex=no)
|
||||
else
|
||||
SPEEX_CFLAGS=""
|
||||
SPEEX_LIBS=""
|
||||
fi
|
||||
|
||||
# Vorbis versions earlier than 1.2.3 have bugs that cause the libsndfile
|
||||
# test suite to fail on MIPS, PowerPC and others.
|
||||
# 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(VORBISENC, vorbisenc >= 1.2.3, ac_cv_vorbisenc=yes, ac_cv_vorbisenc=no)
|
||||
enable_external_libs=yes
|
||||
fi
|
||||
|
||||
if test x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc = "xyesyesyesyes" ; then
|
||||
HAVE_EXTERNAL_XIPH_LIBS=1
|
||||
enable_external_libs=yes
|
||||
|
||||
EXTERNAL_XIPH_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS"
|
||||
EXTERNAL_XIPH_LIBS="$FLAC_LIBS $OGG_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS "
|
||||
else
|
||||
echo
|
||||
AC_MSG_WARN([[*** One or more of the external libraries (ie libflac, libogg and]])
|
||||
AC_MSG_WARN([[*** libvorbis) is either missing (possibly only the development]])
|
||||
AC_MSG_WARN([[*** headers) or is of an unsupported version.]])
|
||||
AC_MSG_WARN([[***]])
|
||||
AC_MSG_WARN([[*** Unfortunately, for ease of maintenance, the external libs]])
|
||||
AC_MSG_WARN([[*** are an all or nothing affair.]])
|
||||
echo
|
||||
enable_external_libs=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_XIPH_LIBS], $HAVE_EXTERNAL_XIPH_LIBS, [Will be set to 1 if flac, ogg and vorbis are available.])
|
||||
|
||||
#====================================================================================
|
||||
# Check for libsqlite3 (only used in regtest).
|
||||
|
||||
ac_cv_sqlite3=no
|
||||
if test x$enable_sqlite != xno ; then
|
||||
PKG_CHECK_MOD_VERSION(SQLITE3, sqlite3 >= 3.2, ac_cv_sqlite3=yes, ac_cv_sqlite3=no)
|
||||
fi
|
||||
|
||||
if test x$ac_cv_sqlite3 = "xyes" ; then
|
||||
HAVE_SQLITE3=1
|
||||
else
|
||||
HAVE_SQLITE3=0
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([HAVE_SQLITE3],$HAVE_SQLITE3,[Set to 1 if you have libsqlite3.])
|
||||
AM_CONDITIONAL([HAVE_SQLITE3], [test "x$ac_cv_sqlite3" = "xyes"])
|
||||
|
||||
#====================================================================================
|
||||
# Determine if the processor can do clipping on float to int conversions.
|
||||
|
||||
if test x$enable_cpu_clip != "xno" ; then
|
||||
MN_C_CLIP_MODE
|
||||
else
|
||||
echo "checking processor clipping capabilities... disabled"
|
||||
ac_cv_c_clip_positive=0
|
||||
ac_cv_c_clip_negative=0
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(CPU_CLIPS_POSITIVE, ${ac_cv_c_clip_positive},
|
||||
[Target processor clips on positive float to int conversion.])
|
||||
AC_DEFINE_UNQUOTED(CPU_CLIPS_NEGATIVE, ${ac_cv_c_clip_negative},
|
||||
[Target processor clips on negative float to int conversion.])
|
||||
|
||||
#====================================================================================
|
||||
# Target OS specific stuff.
|
||||
|
||||
OS_SPECIFIC_CFLAGS=""
|
||||
OS_SPECIFIC_LINKS=""
|
||||
os_is_win32=0
|
||||
os_is_openbsd=0
|
||||
use_windows_api=0
|
||||
case "$host_os" in
|
||||
darwin* | rhapsody*)
|
||||
if test x$HAVE_XCODE_SELECT = xyes ; then
|
||||
developer_path=`xcode-select --print-path`
|
||||
else
|
||||
developer_path="/Developer"
|
||||
fi
|
||||
OS_SPECIFIC_LINKS="-framework CoreAudio -framework AudioToolbox -framework CoreFoundation"
|
||||
;;
|
||||
mingw*)
|
||||
os_is_win32=1
|
||||
use_windows_api=1
|
||||
OS_SPECIFIC_LINKS="-lwinmm"
|
||||
;;
|
||||
openbsd*)
|
||||
os_is_openbsd=1
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_DEFINE_UNQUOTED(OS_IS_WIN32, ${os_is_win32}, [Set to 1 if compiling for Win32])
|
||||
AC_DEFINE_UNQUOTED(OS_IS_OPENBSD, ${os_is_openbsd}, [Set to 1 if compiling for OpenBSD])
|
||||
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)
|
||||
|
||||
#====================================================================================
|
||||
# Check for ALSA.
|
||||
|
||||
ALSA_LIBS=""
|
||||
|
||||
if test x$enable_alsa != xno ; then
|
||||
AC_CHECK_HEADERS(alsa/asoundlib.h)
|
||||
if test x$ac_cv_header_alsa_asoundlib_h = xyes ; then
|
||||
ALSA_LIBS="-lasound"
|
||||
enable_alsa=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
#====================================================================================
|
||||
# Check for OpenBSD's sndio.
|
||||
|
||||
SNDIO_LIBS=""
|
||||
HAVE_SNDIO_H=0
|
||||
case "$host_os" in
|
||||
openbsd*)
|
||||
AC_CHECK_HEADERS(sndio.h)
|
||||
if test x$ac_cv_header_sndio_h = xyes ; then
|
||||
SNDIO_LIBS="-lsndio"
|
||||
HAVE_SNDIO_H=1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_DEFINE_UNQUOTED([HAVE_SNDIO_H],${HAVE_SNDIO_H},[Set to 1 if <sndio.h> is available.])
|
||||
|
||||
#====================================================================================
|
||||
# Test for sanity when cross-compiling.
|
||||
|
||||
if test $ac_cv_sizeof_short != 2 ; then
|
||||
AC_MSG_WARN([[******************************************************************]])
|
||||
AC_MSG_WARN([[*** sizeof (short) != 2. ]])
|
||||
AC_MSG_WARN([[******************************************************************]])
|
||||
fi
|
||||
|
||||
if test $ac_cv_sizeof_int != 4 ; then
|
||||
AC_MSG_WARN([[******************************************************************]])
|
||||
AC_MSG_WARN([[*** sizeof (int) != 4 ]])
|
||||
AC_MSG_WARN([[******************************************************************]])
|
||||
fi
|
||||
|
||||
if test $ac_cv_sizeof_float != 4 ; then
|
||||
AC_MSG_WARN([[******************************************************************]])
|
||||
AC_MSG_WARN([[*** sizeof (float) != 4. ]])
|
||||
AC_MSG_WARN([[******************************************************************]])
|
||||
fi
|
||||
|
||||
if test $ac_cv_sizeof_double != 8 ; then
|
||||
AC_MSG_WARN([[******************************************************************]])
|
||||
AC_MSG_WARN([[*** sizeof (double) != 8. ]])
|
||||
AC_MSG_WARN([[******************************************************************]])
|
||||
fi
|
||||
|
||||
if test x"$ac_cv_prog_HAVE_AUTOGEN" = "xno" ; then
|
||||
AC_MSG_WARN([[Touching files in directory tests/.]])
|
||||
touch tests/*.c tests/*.h
|
||||
fi
|
||||
|
||||
#====================================================================================
|
||||
# Settings for the HTML documentation.
|
||||
|
||||
if test x$enable_bow_docs = "xyes" ; then
|
||||
HTML_BGCOLOUR="white"
|
||||
HTML_FGCOLOUR="black"
|
||||
else
|
||||
HTML_BGCOLOUR="black"
|
||||
HTML_FGCOLOUR="white"
|
||||
fi
|
||||
|
||||
#====================================================================================
|
||||
# Now use the information from the checking stage.
|
||||
|
||||
win32_target_dll=0
|
||||
COMPILER_IS_GCC=0
|
||||
|
||||
if test x$ac_cv_c_compiler_gnu = xyes ; then
|
||||
MN_ADD_CFLAGS(-std=gnu99)
|
||||
|
||||
MN_GCC_VERSION
|
||||
|
||||
if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
|
||||
AC_MSG_WARN([****************************************************************])
|
||||
AC_MSG_WARN([** GCC version 4.2 warns about the inline keyword for no good **])
|
||||
AC_MSG_WARN([** reason but the maintainers do not see it as a bug. **])
|
||||
AC_MSG_WARN([** See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33995 **])
|
||||
AC_MSG_WARN([** Using -fgnu-inline to avoid this stupidity. **])
|
||||
AC_MSG_WARN([****************************************************************])
|
||||
MN_ADD_CFLAGS([-fgnu89-inline])
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
CXXFLAGS="$CXXFLAGS -Wall"
|
||||
|
||||
MN_ADD_CFLAGS([-Wextra])
|
||||
MN_ADD_CFLAGS([-Wdeclaration-after-statement])
|
||||
MN_ADD_CFLAGS([-Wpointer-arith])
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
MN_ADD_CXXFLAGS([-Wextra])
|
||||
MN_ADD_CXXFLAGS([-Wpointer-arith])
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
if test x$enable_stack_smash_protection = "xyes" ; then
|
||||
XIPH_GCC_STACK_PROTECTOR
|
||||
XIPH_GXX_STACK_PROTECTOR
|
||||
fi
|
||||
|
||||
if test x$enable_test_coverage = "xyes" ; then
|
||||
# MN_ADD_CFLAGS([-ftest-coverage])
|
||||
MN_ADD_CFLAGS([-coverage])
|
||||
fi
|
||||
|
||||
dnl some distributions (such as Gentoo) have _FORTIFY_SOURCE always
|
||||
dnl enabled. We test for this situation in order to prevent polluting
|
||||
dnl the console with messages of macro redefinitions.
|
||||
AX_ADD_FORTIFY_SOURCE
|
||||
|
||||
common_flags="-Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wundef -Wuninitialized -Winit-self"
|
||||
|
||||
# -Winline -Wconversion "
|
||||
CFLAGS="$CFLAGS $common_flags -Wbad-function-cast -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Waggregate-return -Wvla"
|
||||
CXXFLAGS="$CXXFLAGS $common_flags -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo"
|
||||
|
||||
if test "x$enable_gcc_opt" = "xno" ; then
|
||||
temp_CFLAGS=`echo $CFLAGS | $SED "s/O2/O0/"`
|
||||
CFLAGS=$temp_CFLAGS
|
||||
AC_MSG_WARN([[*** Compiler optimisations switched off. ***]])
|
||||
fi
|
||||
|
||||
# OS specific tweaks.
|
||||
case "$host_os" in
|
||||
darwin* | rhapsody*)
|
||||
# Disable -Wall, -pedantic and -Wshadow for Apple Darwin/Rhapsody.
|
||||
# System headers on these systems are broken.
|
||||
temp_CFLAGS=`echo $CFLAGS | $SED "s/-Wall -pedantic//" | $SED "s/-Wshadow//" | $SED "s/-Waggregate-return//"`
|
||||
CFLAGS=$temp_CFLAGS
|
||||
SHLIB_VERSION_ARG="-Wl,-exported_symbols_list -Wl,\$(srcdir)/Symbols.darwin"
|
||||
;;
|
||||
linux*|kfreebsd*-gnu*|gnu*)
|
||||
SHLIB_VERSION_ARG="-Wl,--version-script=\$(srcdir)/Symbols.gnu-binutils"
|
||||
;;
|
||||
mingw*)
|
||||
SHLIB_VERSION_ARG="-Wc,-static-libgcc -Wl,\$(srcdir)/libsndfile-1.def"
|
||||
win32_target_dll=1
|
||||
if test x"$enable_shared" = xno ; then
|
||||
win32_target_dll=0
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
SHLIB_VERSION_ARG="-Wl,-export-symbols \$(srcdir)/Symbols.os2"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
if test x$enable_gcc_pipe != "xno" ; then
|
||||
CFLAGS="$CFLAGS -pipe"
|
||||
fi
|
||||
|
||||
COMPILER_IS_GCC=1
|
||||
fi
|
||||
|
||||
if test x$enable_werror = "xyes" ; then
|
||||
MN_ADD_CFLAGS([-Werror])
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
MN_ADD_CXXFLAGS([-Werror])
|
||||
AC_LANG_POP([C++])
|
||||
fi
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED([WIN32_TARGET_DLL], ${win32_target_dll}, [Set to 1 if windows DLL is being built.])
|
||||
AC_DEFINE_UNQUOTED([COMPILER_IS_GCC], ${COMPILER_IS_GCC}, [Set to 1 if the compile is GNU GCC.])
|
||||
|
||||
CFLAGS="$CFLAGS $OS_SPECIFIC_CFLAGS"
|
||||
|
||||
if test x"$CFLAGS" = x ; then
|
||||
echo "Error in configure script. CFLAGS has been screwed up."
|
||||
exit
|
||||
fi
|
||||
|
||||
HOST_TRIPLET="${host_cpu}-${host_vendor}-${host_os}"
|
||||
|
||||
AC_DEFINE_UNQUOTED([HOST_TRIPLET], "${HOST_TRIPLET}", [The host triplet of the compiled binary.])
|
||||
|
||||
if test "$HOST_TRIPLET" = "x86_64-w64-mingw32" ; then
|
||||
OS_SPECIFIC_LINKS=" -static-libgcc $OS_SPECIFIC_LINKS"
|
||||
fi
|
||||
|
||||
WIN_RC_VERSION=`echo $PACKAGE_VERSION | $SED -e "s/p.*//" -e "s/\./,/g"`
|
||||
|
||||
|
||||
if test "$enable_static" = no ; then
|
||||
SRC_BINDIR=src/.libs/
|
||||
TEST_BINDIR=tests/.libs/
|
||||
else
|
||||
SRC_BINDIR=src/
|
||||
TEST_BINDIR=tests/
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
AC_SUBST(HOST_TRIPLET)
|
||||
|
||||
AC_SUBST(HTML_BGCOLOUR)
|
||||
AC_SUBST(HTML_FGCOLOUR)
|
||||
|
||||
AC_SUBST(SHLIB_VERSION_ARG)
|
||||
AC_SUBST(SHARED_VERSION_INFO)
|
||||
AC_SUBST(CLEAN_VERSION)
|
||||
AC_SUBST(WIN_RC_VERSION)
|
||||
|
||||
AC_SUBST(HAVE_EXTERNAL_XIPH_LIBS)
|
||||
AC_SUBST(OS_SPECIFIC_CFLAGS)
|
||||
AC_SUBST(OS_SPECIFIC_LINKS)
|
||||
AC_SUBST(ALSA_LIBS)
|
||||
AC_SUBST(SNDIO_LIBS)
|
||||
|
||||
AC_SUBST(EXTERNAL_XIPH_CFLAGS)
|
||||
AC_SUBST(EXTERNAL_XIPH_LIBS)
|
||||
AC_SUBST(SRC_BINDIR)
|
||||
AC_SUBST(TEST_BINDIR)
|
||||
|
||||
dnl The following line causes the libtool distributed with the source
|
||||
dnl to be replaced if the build system has a more recent version.
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
|
||||
AC_CONFIG_FILES([ \
|
||||
src/Makefile man/Makefile examples/Makefile tests/Makefile regtest/Makefile \
|
||||
M4/Makefile doc/Makefile Win32/Makefile Octave/Makefile programs/Makefile \
|
||||
Makefile \
|
||||
src/version-metadata.rc tests/test_wrapper.sh tests/pedantic-header-test.sh \
|
||||
doc/libsndfile.css Scripts/build-test-tarball.mk libsndfile.spec sndfile.pc \
|
||||
src/sndfile.h \
|
||||
echo-install-dirs
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
# Make sure these are executable.
|
||||
chmod u+x tests/test_wrapper.sh Scripts/build-test-tarball.mk echo-install-dirs
|
||||
|
||||
#====================================================================================
|
||||
|
||||
AC_MSG_RESULT([
|
||||
-=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
Configuration summary :
|
||||
|
||||
libsndfile version : .................. ${VERSION}
|
||||
|
||||
Host CPU : ............................ ${host_cpu}
|
||||
Host Vendor : ......................... ${host_vendor}
|
||||
Host OS : ............................. ${host_os}
|
||||
|
||||
Experimental code : ................... ${enable_experimental:-no}
|
||||
Using ALSA in example programs : ...... ${enable_alsa:-no}
|
||||
External FLAC/Ogg/Vorbis : ............ ${enable_external_libs:-no}
|
||||
])
|
||||
|
||||
if test -z "$PKG_CONFIG" ; then
|
||||
echo " *****************************************************************"
|
||||
echo " *** The pkg-config program is missing. ***"
|
||||
echo " *** External FLAC/Ogg/Vorbis libs cannot be found without it. ***"
|
||||
echo " *** http://pkg-config.freedesktop.org/wiki/ ***"
|
||||
echo " *****************************************************************"
|
||||
echo
|
||||
fi
|
||||
|
||||
echo " Tools :"
|
||||
echo
|
||||
echo " Compiler is Clang : ................... ${mn_cv_c_compiler_clang}"
|
||||
echo " Compiler is GCC : ..................... ${ac_cv_c_compiler_gnu}"
|
||||
|
||||
if test x$ac_cv_c_compiler_gnu = xyes ; then
|
||||
echo " GCC version : ......................... ${GCC_VERSION}"
|
||||
if test $GCC_MAJOR_VERSION -lt 3 ; then
|
||||
echo "\n"
|
||||
echo " ** This compiler version allows applications to write"
|
||||
echo " ** to static strings within the library."
|
||||
echo " ** Compile with GCC version 3.X or above to avoid this problem."
|
||||
fi
|
||||
fi
|
||||
echo " Sanitizer enabled : ................... ${enable_sanitizer:-no}"
|
||||
echo " Stack smash protection : .............. ${enable_stack_smash_protection:-no}"
|
||||
|
||||
./echo-install-dirs
|
||||
|
||||
# Remove symlink created by Scripts/android-configure.sh.
|
||||
rm -f gdbclient
|
|
@ -0,0 +1,57 @@
|
|||
The main author of libsndfile is Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
apart from code in the following directories:
|
||||
|
||||
- src/GSM610 : Written by Jutta Degener <jutta@cs.tu-berlin.de> and Carsten
|
||||
Bormann <cabo@cs.tu-berlin.de>. They should not be contacted in relation to
|
||||
libsndfile or the GSM 6.10 code that is part of libsndfile. Their original
|
||||
code can be found at:
|
||||
|
||||
http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
|
||||
- src/G72x : Released by Sun Microsystems, Inc. to the public domain. Minor
|
||||
modifications were required to integrate these files into libsndfile. The
|
||||
changes are listed in src/G72x/ChangeLog.
|
||||
|
||||
|
||||
Others:
|
||||
|
||||
2013-03-07 Michael Pruett
|
||||
2013-02-11 Chris Roberts c.roberts@csrfm.com
|
||||
2012-03-17 IOhannes m zmoelnig
|
||||
2013-02-21 Jan Starry
|
||||
2012-01-20 Bodo
|
||||
2011-06-23 Tim van der Molen
|
||||
2010-12-01 Tim Blechmann
|
||||
2010-10-04 Matti Nykyri
|
||||
2010-09-17 Brian Lewis
|
||||
2010-02-22 Robin Gareus
|
||||
2010-01-07 Christian Weisgerber and Jacob Meuserto
|
||||
2009-10-18 Olivier Tristan
|
||||
2009-10-14, 2009-08-30 Uli Franke
|
||||
2009-06-24, 2008-11-19, 2004-09-22, 2004-06-17, 2003-05-03, 2003-05-02 Conrad Parker
|
||||
2009-05-22 Lennart Poettering
|
||||
2008-07-03, 2006-10-22, 2006-10-18 Fons Adriaensen
|
||||
2008-04-19 David Yeo
|
||||
2008-01-20 Yair K.
|
||||
2007-12-03 Robs
|
||||
2007-07-12 Ed Schouten
|
||||
2007-06-07 Trent Apted
|
||||
2007-04-14, 2003-12-12 André Pang
|
||||
2007-04-14 Reuben Thomas
|
||||
2006-11-09 Jonathan Woithe
|
||||
2006-03-26 Diego 'Flameeyes' Pettenò
|
||||
2006-03-17 Paul Davis
|
||||
2006-03-09 Jesse Chappell
|
||||
2006-01-09, 2005-12-28 John ffitch
|
||||
2005-09-21 David A. van Leeuwen
|
||||
2005-08-15 Mo DeJong
|
||||
2005-04-30 David Viens
|
||||
2004-12-29 Steve Baker
|
||||
2004-09-05 Denis Cote
|
||||
2004-06-28 Stanko Juzbasic
|
||||
2004-02-14 Frank Neumann
|
||||
2003-08-15 Axel Röbel
|
||||
2003-08-06 Peter Miller
|
||||
2003-07-21 Tero Pelander
|
||||
2003-02-10 Antoine Mathys
|
||||
2002-12-30 Marek Peteraj
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,851 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
libsndfile : Frequently Asked Questions.
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<META NAME="Description" CONTENT="The libsndfile FAQ.">
|
||||
<META NAME="Keywords" CONTENT="WAV AIFF AU libsndfile sound audio dsp Linux">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<H1><B>libsndfile : Frequently Asked Questions.</B></H1>
|
||||
<P>
|
||||
<A HREF="#Q001">Q1 : Do you plan to support XYZ codec in libsndfile?</A><BR/>
|
||||
<A HREF="#Q002">Q2 : In version 0 the SF_INFO struct had a pcmbitwidth field
|
||||
but version 1 does not. Why?</A><BR/>
|
||||
<A HREF="#Q003">Q3 : Compiling is really slow on MacOS X. Why?</A><BR/>
|
||||
<A HREF="#Q004">Q4 : When trying to compile libsndfile on Solaris I get a "bad
|
||||
substitution" error during linking. What can I do to fix this?</A><BR/>
|
||||
<A HREF="#Q005">Q5 : Why doesn't libsndfile do interleaving/de-interleaving?</A><BR/>
|
||||
<A HREF="#Q006">Q6 : What's the best format for storing temporary files?</A><BR/>
|
||||
<A HREF="#Q007">Q7 : On Linux/Unix/MacOS X, what's the best way of detecting the
|
||||
presence of libsndfile?</A><BR/>
|
||||
<A HREF="#Q008">Q8 : I have libsndfile installed and now I want to use it. I
|
||||
just want a simple Makefile! What do I do?</A><BR/>
|
||||
<A HREF="#Q009">Q9 : How about adding the ability to write/read sound files to/from
|
||||
memory buffers?</A><BR/>
|
||||
<A HREF="#Q010">Q10 : Reading a 16 bit PCM file as normalised floats and then
|
||||
writing them back changes some sample values. Why?</A><BR/>
|
||||
<A HREF="#Q011">Q11 : I'm having problems with u-law encoded WAV files generated by
|
||||
libsndfile in Winamp. Why?</A><BR/>
|
||||
<A HREF="#Q012">Q12 : I'm looking at sf_read*. What are items? What are frames?</A><BR/>
|
||||
<A HREF="#Q013">Q13 : Why can't libsndfile open this Sound Designer II (SD2)
|
||||
file?</A><BR/>
|
||||
<A HREF="#Q014">Q14 : I'd like to statically link libsndfile to my closed source
|
||||
application. Can I buy a license so that this is possible?</A><BR/>
|
||||
<A HREF="#Q015">Q15 : My program is crashing during a call to a function in libsndfile.
|
||||
Is this a bug in libsndfile?</A><BR/>
|
||||
<A HREF="#Q016">Q16 : Will you accept a fix for compiling libsndfile with compiler X?
|
||||
</A><BR/>
|
||||
<A HREF="#Q017">Q17 : Can libsndfile read/write files from/to UNIX pipes?
|
||||
</A><BR/>
|
||||
<A HREF="#Q018">Q18 : Is it possible to build a Universal Binary on Mac OS X?
|
||||
</A><BR/>
|
||||
<A HREF="#Q019">Q19 : I have project files for Visual Studio / XCode / Whatever. Why
|
||||
don't you distribute them with libsndfile?
|
||||
</A><BR/>
|
||||
<A HREF="#Q020">Q20 : Why doesn't libsndfile support MP3? Lots of other Open Source
|
||||
projects support it!
|
||||
</A><BR/>
|
||||
<A HREF="#Q021">Q21 : How do I use libsndfile in a closed source or commercial program
|
||||
and comply with the license?
|
||||
</A><BR/>
|
||||
<A HREF="#Q022">Q22 : What versions of windows does libsndfile work on?
|
||||
</A><BR/>
|
||||
<A HREF="#Q023">Q23 : I'm cross compiling libsndfile for another platform. How can I
|
||||
run the test suite?
|
||||
</A><BR/>
|
||||
<HR>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q001"></A>
|
||||
<H2><BR/><B>Q1 : Do you plan to support XYZ codec in libsndfile?</B></H2>
|
||||
<P>
|
||||
If source code for XYZ codec is available under a suitable license (LGPL, BSD,
|
||||
MIT etc) then yes, I'd like to add it.
|
||||
</P>
|
||||
<P>
|
||||
If suitable documentation is available on how to decode and encode the format
|
||||
then maybe, depending on how much work is involved.
|
||||
</P>
|
||||
<P>
|
||||
If XYZ is some proprietary codec where no source code or documentation is
|
||||
available then no.
|
||||
</P>
|
||||
<P>
|
||||
So if you want support for XYZ codec, first find existing source code or
|
||||
documentation.
|
||||
If you can't find either then the answer is no.
|
||||
</P>
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q002"></A>
|
||||
<H2><BR/><B>Q2 : In version 0 the SF_INFO struct had a pcmbitwidth field
|
||||
but version 1 does not. Why?</B></H2>
|
||||
<P>
|
||||
This was dropped for a number of reasons:
|
||||
</P>
|
||||
<UL>
|
||||
<LI> pcmbitwidth makes little sense on compressed or floating point formats
|
||||
<LI> with the new API you really don't need to know it
|
||||
</UL>
|
||||
<P>
|
||||
As documented
|
||||
<A HREF="api.html#note1">here</A>
|
||||
there is now a well defined behaviour which ensures that no matter what the
|
||||
bit width of the source file, the scaling always does something sensible.
|
||||
This makes it safe to read 8, 16, 24 and 32 bit PCM files using sf_read_short()
|
||||
and always have the optimal behaviour.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q003"></A>
|
||||
<H2><BR/><B>Q3 : Compiling is really slow on MacOS X. Why?</B></H2>
|
||||
<P>
|
||||
When you configure and compile libsndfile, it uses the /bin/sh shell for a number
|
||||
of tasks (ie configure script and libtool).
|
||||
Older versions of OS X (10.2?) shipped a really crappy Bourne shell as /bin/sh
|
||||
which resulted in <b>really</b> slow compiles.
|
||||
Newer version of OS X ship GNU Bash as /bin/sh and this answer doesn't apply in that
|
||||
case.
|
||||
</P>
|
||||
<P>
|
||||
To fix this I suggest that you install the GNU Bash shell, rename /bin/sh to
|
||||
/bin/sh.old and make a symlink from /bin/sh to the bash shell.
|
||||
Bash is designed to behave as a Bourne shell when is is called as /bin/sh.
|
||||
</P>
|
||||
<P>
|
||||
When I did this on my iBook running MacOS X, compile times dropped from 13 minutes
|
||||
to 3 minutes.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q004"></A>
|
||||
<H2><BR/><B>Q4 : When trying to compile libsndfile on Solaris I get a "bad
|
||||
substitution" error on linking. Why?</B></H2>
|
||||
<P>
|
||||
It seems that the Solaris Bourne shell disagrees with GNU libtool.
|
||||
</P>
|
||||
<P>
|
||||
To fix this I suggest that you install the GNU Bash shell, rename /bin/sh to
|
||||
/bin/sh.old and make a symlink from /bin/sh to the bash shell.
|
||||
Bash is designed to behave as a Bourne shell when is is called as /bin/sh.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q005"></A>
|
||||
<H2><BR/><B>Q5 : Why doesn't libsndfile do interleaving/de-interleaving?</B></H2>
|
||||
<P>
|
||||
This problem is bigger than it may seem at first.
|
||||
</P>
|
||||
<P>
|
||||
For a stereo file, it is a pretty safe bet that a simple interleaving/de-interleaving
|
||||
could satisfy most users.
|
||||
However, for files with more than 2 channels this is unlikely to be the case.
|
||||
If the user has a 4 channel file and want to play that file on a stereo output
|
||||
sound card they either want the first 2 channels or they want some mixed combination
|
||||
of the 4 channels.
|
||||
</P>
|
||||
<P>
|
||||
When you add more channels, the combinations grow exponentially and it becomes
|
||||
increasingly difficult to cover even a sensible subset of the possible combinations.
|
||||
On top of that, coding any one style of interleaver/de-interleaver is trivial, while
|
||||
coding one that can cover all combinations is far from trivial.
|
||||
This means that this feature will not be added any time soon.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q006"></A>
|
||||
<H2><BR/><B>Q6 : What's the best format for storing temporary files?</B></H2>
|
||||
|
||||
<P>
|
||||
When you want to store temporary data there are a number of requirements;
|
||||
</P>
|
||||
<UL>
|
||||
<LI> A simple, easy to parse header.
|
||||
<LI> The format must provide the fastest possible read and write rates (ie
|
||||
avoid conversions and encoding/decoding).
|
||||
<LI> The file format must be reasonably common and playable by most players.
|
||||
<LI> Able to store data in either endian-ness.
|
||||
</UL>
|
||||
<P>
|
||||
The format which best meets these requirements is AU, which allows data to be
|
||||
stored in any one of short, int, float and double (among others) formats.
|
||||
</P>
|
||||
<P>
|
||||
For instance, if an application uses float data internally, its temporary files
|
||||
should use a format of (SF_ENDIAN_CPU | SF_FORMAT_AU | SF_FORMAT_FLOAT) which
|
||||
will store big endian float data in big endian CPUs and little endian float data
|
||||
on little endian CPUs.
|
||||
Reading and writing this format will not require any conversions or byte swapping
|
||||
regardless of the host CPU.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
<A NAME="Q007"></A>
|
||||
<H2><BR/><B>Q7 : On Linux/Unix/MaxOS X, what's the best way of detecting the presence
|
||||
of libsndfile using autoconf?</B></H2>
|
||||
|
||||
<P>
|
||||
libsndfile uses the pkg-config (man pkg-config) method of registering itself with the
|
||||
host system.
|
||||
The best way of detecting its presence is using something like this in configure.ac
|
||||
(or configure.in):
|
||||
</P>
|
||||
<PRE>
|
||||
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, ac_cv_sndfile=1, ac_cv_sndfile=0)
|
||||
|
||||
AC_DEFINE_UNQUOTED([HAVE_SNDFILE],${ac_cv_sndfile},
|
||||
[Set to 1 if you have libsndfile.])
|
||||
|
||||
AC_SUBST(SNDFILE_CFLAGS)
|
||||
AC_SUBST(SNDFILE_LIBS)
|
||||
</PRE>
|
||||
<P>
|
||||
This will automatically set the <B>SNDFILE_CFLAGS</B> and <B>SNDFILE_LIBS</B>
|
||||
variables which can be used in Makefile.am like this:
|
||||
</P>
|
||||
<PRE>
|
||||
SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
|
||||
SNDFILE_LIBS = @SNDFILE_LIBS@
|
||||
</PRE>
|
||||
<P>
|
||||
If you install libsndfile from source, you will probably need to set the
|
||||
<B>PKG_CONFIG_PATH</B> environment variable as suggested at the end of the
|
||||
libsndfile configure process. For instance on my system I get this:
|
||||
</P>
|
||||
<PRE>
|
||||
-=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
Configuration summary :
|
||||
|
||||
Version : ..................... 1.0.5
|
||||
Experimental code : ........... no
|
||||
|
||||
Tools :
|
||||
|
||||
Compiler is GCC : ............. yes
|
||||
GCC major version : ........... 3
|
||||
|
||||
Installation directories :
|
||||
|
||||
Library directory : ........... /usr/local/lib
|
||||
Program directory : ........... /usr/local/bin
|
||||
Pkgconfig directory : ......... /usr/local/lib/pkgconfig
|
||||
|
||||
Compiling some other packages against libsndfile may require
|
||||
the addition of "/usr/local/lib/pkgconfig" to the
|
||||
PKG_CONFIG_PATH environment variable.
|
||||
</PRE>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
<A NAME="Q008"></A>
|
||||
<H2><BR/><B>Q8 : I have libsndfile installed and now I want to use it. I just want
|
||||
a simple Makefile! What do I do?</B></H2>
|
||||
|
||||
<P>
|
||||
The <B>pkg-config</B> program makes finding the correct compiler flag values and
|
||||
library location far easier.
|
||||
During the installation of libsndfile, a file named <B>sndfile.pc</B> is installed
|
||||
in the directory <B>${libdir}/pkgconfig</B> (ie if libsndfile is installed in
|
||||
<B>/usr/local/lib</B>, <B>sndfile.pc</B> will be installed in
|
||||
<B>/usr/local/lib/pkgconfig/</B>).
|
||||
</P>
|
||||
<P>
|
||||
In order for pkg-config to find sndfile.pc it may be necessary to point the
|
||||
environment variable <B>PKG_CONFIG_PATH</B> in the right direction.
|
||||
</P>
|
||||
<PRE>
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Then, to compile a C file into an object file, the command would be:
|
||||
</P>
|
||||
<PRE>
|
||||
gcc `pkg-config --cflags sndfile` -c somefile.c
|
||||
</PRE>
|
||||
<P>
|
||||
and to link a number of objects into an executable that links against libsndfile,
|
||||
the command would be:
|
||||
</P>
|
||||
<PRE>
|
||||
gcc `pkg-config --libs sndfile` obj1.o obj2.o -o program
|
||||
</PRE>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
<A NAME="Q009"></A>
|
||||
<H2><BR/><B>Q9 : How about adding the ability to write/read sound files to/from
|
||||
memory buffers?</B></H2>
|
||||
|
||||
<P>
|
||||
This has been added for version 1.0.13.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
<A NAME="Q010"></A>
|
||||
<H2><BR/><B>Q10 : Reading a 16 bit PCM file as normalised floats and then
|
||||
writing them back changes some sample values. Why?</B></H2>
|
||||
|
||||
<P>
|
||||
This is caused by the fact that the conversion from 16 bit short to float is
|
||||
done by dividing by 32768 (0x8000 in hexadecimal) while the conversion from
|
||||
float to 16 bit short is done by multiplying by 32767 (0x7FFF in hex).
|
||||
So for instance, a value in a 16 bit PCM file of 20000 gets read as a floating
|
||||
point number of 0.6103515625 (20000.0 / 0x8000).
|
||||
Converting that back to a 16 bit short results in a value of 19999.3896484375
|
||||
(0.6103515625 * 0x7FFF) which then gets rounded down to 19999.
|
||||
</P>
|
||||
<P>
|
||||
You will notice that for this particular case, the error is 1 in 20000 or
|
||||
0.005%.
|
||||
Interestingly, for values of less than 16369, dividing by 0x8000 followed
|
||||
by multiplying by 0x7FFF and then rounding the result, gives back the
|
||||
original value.
|
||||
It turns out that as long as the host operating system supplies the 1999 ISO
|
||||
C Standard functions <B>lrintf</B> and <B>lrint</B> (or a replacement has
|
||||
been supplied) then the maximum possible error is 1 in 16369 or about 0.006%.
|
||||
</P>
|
||||
<P>
|
||||
Regardless of the size of the error, the reason why this is done is rather
|
||||
subtle.
|
||||
</P>
|
||||
<P>
|
||||
In a file containing 16 bit PCM samples, the values are restricted to the range
|
||||
[-32768, 32767] while we want floating point values in the range [-1.0, 1.0].
|
||||
The only way to do this conversion is to do a floating point division by a value
|
||||
of 0x8000.
|
||||
Converting the other way, the only way to ensure that floating point values in
|
||||
the range [-1.0, 1.0] are within the valid range allowed by a 16 bit short is
|
||||
to multiply by 0x7FFF.
|
||||
</P>
|
||||
<P>
|
||||
Some people would say that this is a severe short-coming of libsndfile.
|
||||
I would counter that anybody who is constantly converting back and forth
|
||||
between 16 bit shorts and normalised floats is going to suffer other losses
|
||||
in audio quality that they should also be concerned about.
|
||||
</P>
|
||||
<P>
|
||||
Since this problem only occurs when converting between integer data on disk and
|
||||
normalized floats in the application, it can be avoided by using something
|
||||
other than normalized floats in the application.
|
||||
Alternatives to normalized floats are the <b>short</b> and <b>int</b> data
|
||||
types (ie using sf_read_short or sf_read_int) or using un-normalized floats
|
||||
(see
|
||||
<a href="command.html#SFC_SET_NORM_FLOAT">
|
||||
SFC_SET_NORM_FLOAT</a>).
|
||||
</P>
|
||||
<P>
|
||||
Another way to deal with this problem is to consider 16 bit short data as a
|
||||
final destination format only, not as an intermediate storage format.
|
||||
All intermediate data (ie which is going to be processed further) should be
|
||||
stored in floating point format which is supported by all of the most common
|
||||
file formats.
|
||||
If floating point files are considered too large (2 times the size of a 16 bit
|
||||
PCM file), it would also be possible to use 24 bit PCM as an intermediate
|
||||
storage format (and which is also supported by most common file types).
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
<A NAME="Q011"></A>
|
||||
<H2><BR/><B>Q11 : I'm having problems with u-law encoded WAV files generated by
|
||||
libsndfile in Winamp. Why?
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
This is actually a Winamp problem.
|
||||
The official Microsoft spec suggests that the 'fmt ' chunk should be 18 bytes.
|
||||
Unfortunately at least one of Microsoft's own applications (Sound Recorder on
|
||||
Win98 I believe) did not accept 18 bytes 'fmt ' chunks.
|
||||
</P>
|
||||
<P>
|
||||
Michael Lee did some experimenting and found that:
|
||||
</P>
|
||||
<PRE>
|
||||
I have checked that Windows Media Player 9, QuickTime Player 6.4,
|
||||
RealOne Player 2.0 and GoldWave 5.06 can all play u-law files with
|
||||
16-byte or 18-byte 'fmt ' chunk. Only Winamp (2.91) and foobar2000
|
||||
are unable to play u-law files with 16-byte 'fmt ' chunk.
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Even this is a very small sampling of all the players out there.
|
||||
For that reason it is probably not a good idea to change this now because there
|
||||
is the risk of breaking something that currently works.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
<A NAME="Q012"></A>
|
||||
<H2><BR/><B>Q12 : I'm looking at sf_read*. What are items? What are frames?
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
An <tt>item</tt> is a single sample of the data type you are reading; ie a
|
||||
single <tt>short</tt> value for <tt>sf_read_short</tt> or a single <tt>float</tt>
|
||||
for <tt>sf_read_float</tt>.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
For a sound file with only one channel, a frame is the same as a item (ie a
|
||||
single sample) while for multi channel sound files, a single frame contains a
|
||||
single item for each channel.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Here are two simple, correct examples, both of which are assumed to be working
|
||||
on a stereo file, first using items:
|
||||
</P>
|
||||
|
||||
<PRE>
|
||||
#define CHANNELS 2
|
||||
short data [CHANNELS * 100] ;
|
||||
sf_count items_read = sf_read_short (file, data, 200) ;
|
||||
assert (items_read == 200) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
and now reading the exact same amount of data using frames:
|
||||
</P>
|
||||
|
||||
<PRE>
|
||||
#define CHANNELS 2
|
||||
short data [CHANNELS * 100] ;
|
||||
sf_count frames_read = sf_readf_short (file, data, 100) ;
|
||||
assert (frames_read == 100) ;
|
||||
</PRE>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
<A NAME="Q013"></A>
|
||||
<H2><BR/><B>Q13 : Why can't libsndfile open this Sound Designer II (SD2) file?
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
This is somewhat complicated.
|
||||
First some background.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
SD2 files are native to the Apple Macintosh platform and use features of
|
||||
the Mac filesystem (file resource forks) to store the file's sample rate,
|
||||
number of channels, sample width and more.
|
||||
When you look at a file and its resource fork on Mac OS X it looks like
|
||||
this:
|
||||
</P>
|
||||
|
||||
<PRE>
|
||||
-rw-r--r-- 1 erikd erikd 46512 Oct 18 22:57 file.sd2
|
||||
-rw-r--r-- 1 erikd erikd 538 Oct 18 22:57 file.sd2/rsrc
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Notice how the file itself looks like a directory containing a single file
|
||||
named <B>rsrc</B>.
|
||||
When libsndfile is compiled for MacOS X, it should open (for write and read)
|
||||
SD2 file with resource forks like this without any problems.
|
||||
It will also handle files with the resource fork in a separate file as
|
||||
described below.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
When SD2 files are moved to other platforms, the resource fork of the file
|
||||
can sometimes be dropped altogether.
|
||||
All that remains is the raw audio data and no information about the number
|
||||
of channels, sample rate or bit width which makes it a little difficult for
|
||||
libsndfile to open the file.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
However, it is possible to safely move an SD2 file to a Linux or Windows
|
||||
machine.
|
||||
For instance, when an SD2 file is copied from inside MacOS X to a windows
|
||||
shared directory or a Samba share (ie Linux), MacOS X is clever enough to
|
||||
store the resource fork of the file in a separate hidden file in the
|
||||
same directory like this:
|
||||
</P>
|
||||
<PRE>
|
||||
-rw-r--r-- 1 erikd erikd 538 Oct 18 22:57 ._file.sd2
|
||||
-rw-r--r-- 1 erikd erikd 46512 Oct 18 22:57 file.sd2
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Regardless of what platform it is running on, when libsndfile is asked to
|
||||
open a file named <B>"foo"</B> and it can't recognize the file type from
|
||||
the data in the file, it will attempt to open the resource fork and if
|
||||
that fails, it then tries to open a file named <B>"._foo"</B> to see if
|
||||
the file has a valid resource fork.
|
||||
This is the same regardless of whether the file is being opened for read
|
||||
or write.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
In short, libsndfile should open SD2 files with a valid resource fork on
|
||||
all of the platforms that libsndfile supports.
|
||||
If a file has lost its resource fork, the only option is the open the file
|
||||
using the SF_FORMAT_RAW option and guessing its sample rate, channel count
|
||||
and bit width.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Occasionally, when SD2 files are moved to other systems, the file is
|
||||
<A HREF="http://www.macdisk.com/binhexen.php3">BinHexed</A>
|
||||
which wraps the resource fork and the data fork together.
|
||||
For these files, it would be possible to write a BinHex parser but
|
||||
there is not a lot to gain considering how rare these BinHexed SD2
|
||||
files are.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q014"></A>
|
||||
<H2><BR/><B>Q14 : I'd like to statically link libsndfile to my closed source
|
||||
application. Can I buy a license so that this is possible?
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
Unfortunately no.
|
||||
libsndfile contains code written by other people who have agreed that their
|
||||
code be used under the GNU LGPL but no more.
|
||||
Even if they were to agree, there would be significant difficulties in
|
||||
dividing up the payments fairly.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
The <B>only</B> way you can legally use libsndfile as a statically linked
|
||||
library is if your application is released under the GNU GPL or LGPL.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q015"></A>
|
||||
<H2><BR/><B>Q15 : My program is crashing during a call to a function in libsndfile.
|
||||
Is this a bug in libsndfile?
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
libsndfile is being used by large numbers of people all over the world
|
||||
without any problems like this. That means that it is much more likely
|
||||
that your code has a bug than libsndfile. However, it is still possible
|
||||
that there is a bug in libsndfile.
|
||||
</P>
|
||||
<P>
|
||||
To figure out whether it is your code or libsndfile you should do the
|
||||
following:
|
||||
</P>
|
||||
<UL>
|
||||
<LI>Make sure you are compiling your code with warnings switched on and
|
||||
that you fix as many warnings as possible.
|
||||
With the GNU compiler (gcc) I would recommend at least
|
||||
<B>-W -Wall -Werror</B> which will force you to fix all warnings
|
||||
before you can run the code.
|
||||
<LI>Try using a memory debugger.
|
||||
<A HREF="http://valgrind.kde.org/">Valgrind</A> on x86 Linux is excellent.
|
||||
<A HREF="http://www.ibm.com/software/awdtools/purify/">Purify</A> also
|
||||
has a good reputation.
|
||||
<LI>If the code is clean after the above two steps and you still get
|
||||
a crash in libsndfile, then send me a small snippet of code (no
|
||||
more than 30-40 lines) which includes the call to sf_open() and
|
||||
also shows how all variables passed to/returned from sf_open()
|
||||
are defined.
|
||||
</UL>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q016"></A>
|
||||
<H2><BR/><B>Q16 : Will you accept a fix for compiling libsndfile with compiler X?
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
If compiler X is a C++ compiler then no.
|
||||
C and C++ are different enough to make writing code that compiles as valid C
|
||||
and valid C++ too difficult.
|
||||
I would rather spend my time fixing bugs and adding features.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
If compiler X is a C compiler then I will do what I can as long as that does
|
||||
not hamper the correctness, portability and maintainability of the existing
|
||||
code.
|
||||
It should be noted however that libsndfile uses features specified by the 1999
|
||||
ISO C Standard.
|
||||
This can make compiling libsndfile with some older compilers difficult.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q017"></A>
|
||||
<H2><BR/><B>Q17 : Can libsndfile read/write files from/to UNIX pipes?
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
Yes, libsndfile can read files from pipes.
|
||||
Unfortunately, the write case is much more complicated.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
File formats like AIFF and WAV have information at the start of the file (the
|
||||
file header) which states the length of the file, the number of sample frames
|
||||
etc.
|
||||
This information must be filled in correctly when the file header is written,
|
||||
but this information is not reliably known until the file is closed.
|
||||
This means that libsndfile cannot write AIFF, WAV and many other file types
|
||||
to a pipe.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
However, there is at least one file format (AU) which is specifically designed
|
||||
to be written to a pipe.
|
||||
Like AIFF and WAV, AU has a header with a sample frames field, but it is
|
||||
specifically allowable to set that frames field to 0x7FFFFFFF if the file
|
||||
length is not known when the header is written.
|
||||
The AU file format can also hold data in many of the standard formats (ie
|
||||
SF_FORMAT_PCM_16, SF_FORMAT_PCM_24, SF_FORMAT_FLOAT etc) as well as allowing
|
||||
data in both big and little endian format.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
See also <A HREF="#Q006">FAQ Q6</A>.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q018"></A>
|
||||
<H2><BR/><B>Q18 : Is it possible to build a Universal Binary on Mac OS X?
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
Yes, but you must do two separate configure/build/test runs; one on PowerPC
|
||||
and one on Intel.
|
||||
It is then possible to merge the binaries into a single universal binary using
|
||||
one of the programs in the Apple tool chain.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
It is <b>not</b> possible to build a working universal binary via a single
|
||||
compile/build run on a single CPU.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
The problem is that the libsndfile build process detects features of the CPU its
|
||||
being built for during the configure process and when building a universal binary,
|
||||
configure is only run once and that data is then used for both CPUs.
|
||||
That configure data will be wrong for one of those CPUs.
|
||||
You will still be able to compile libsndfile, and the test suite will pass on
|
||||
the machine you compiled it on.
|
||||
However, if you take the universal binary test suite programs compiled on one
|
||||
CPU and run them on the other, the test suite will fail.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Part of the problem is that the CPU endian-ness is detected at configure time.
|
||||
Yes, I know the Apple compiler defines one of the macros __LITTLE_ENDIAN__
|
||||
and __BIG_ENDIAN__, but those macros are not part of the 1999 ISO C Standard
|
||||
and they are not portable.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Endian issues are not the only reason why the cross compiled binary will fail.
|
||||
The configure script also detects other CPU specific idiosyncrasies to provide
|
||||
more optimized code.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Finally, the real show stopper problem with universal binaries is the problem
|
||||
with the test suite.
|
||||
libsndfile contains a huge, comprehensive test suite.
|
||||
When you compile a universal binary and run the test suite, you only test the
|
||||
native compile.
|
||||
The cross compiled binary (the one with the much higher chance of having
|
||||
problems) cannot be tested.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Now, if you have read this far you're probably thinking there must be a way
|
||||
to fix this and there probably is.
|
||||
The problem is that its a hell of a lot of work and would require significant
|
||||
changes to the configure process, the internal code and the test suite.
|
||||
In addition, these changes must not break compilation on any of the platforms
|
||||
libsndfile is currently working on.
|
||||
</p>
|
||||
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q019"></A>
|
||||
<H2><BR/><B>Q19 : I have project files for Visual Studio / XCode / Whatever. Why
|
||||
don't you distribute them with libsndfile?
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
There's a very good reason for this.
|
||||
I will only distribute things that I actually have an ability to test and
|
||||
maintain.
|
||||
Project files for a bunch of different compilers and Integrated Development
|
||||
Environments are simply too difficult to maintain.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
The problem is that every time I add a new file to libsndfile or rename an
|
||||
existing file I would have to modify all the project files and then test that
|
||||
libsndfile still built with all the different compilers.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Maintaining these project files is also rather difficult if I don't have access
|
||||
to the required compiler/IDE.
|
||||
If I just edit the project files without testing them I will almost certainly
|
||||
get it wrong.
|
||||
If I release a version of libsndfile with broken project files, I'll get a bunch
|
||||
of emails from people complaining about it not building and have no way of
|
||||
fixing or even testing it.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
I currently release sources that I personally test on Win32, Linux and
|
||||
MacOS X (PowerPC) using the compiler I trust (GNU GCC).
|
||||
Supporting one compiler on three (actually much more because GCC is available
|
||||
almost everywhere) platforms is doable without too much pain.
|
||||
I also release binaries for Win32 with instructions on how to use those
|
||||
binaries with Visual Studio.
|
||||
As a guy who is mainly interested in Linux, I'm not to keen to jump through
|
||||
a bunch of hoops to support compilers and operating systems I don't use.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
So, I hear you want to volunteer to maintain the project files for Some Crappy
|
||||
Compiler 2007?
|
||||
Well sorry, that won't work either.
|
||||
I have had numerous people over the years offer to maintaining the project
|
||||
files for Microsoft's Visual Studio.
|
||||
Every single time that happened, they maintained it for a release or two and
|
||||
then disappeared off the face of the earth.
|
||||
Hence, I'm not willing to enter into an arrangement like that again.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q020"></A>
|
||||
<H2><BR/><B>Q20 : Why doesn't libsndfile support MP3? Lots of other Open Source
|
||||
projects support it!
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
MP3 is not supported for one very good reason; doing so requires the payment
|
||||
of licensing fees.
|
||||
As can be seen from
|
||||
<a href="http://www.mp3licensing.com/royalty/software.html">
|
||||
mp3licensing.com</a>
|
||||
the required royalty payments are not cheap.
|
||||
</P>
|
||||
|
||||
<p>
|
||||
Yes, I know other libraries ignore the licensing requirements, but their legal
|
||||
status is extremely dubious.
|
||||
At any time, the body selling the licenses could go after the authors of those
|
||||
libraries.
|
||||
Some of those authors may be students and hence wouldn't be worth pursuing.
|
||||
</P>
|
||||
|
||||
<p>
|
||||
However, libsndfile is released under the name of a company, Mega Nerd Pty Ltd;
|
||||
a company which has income from from libsamplerate licensing, libsndfile based
|
||||
consulting income and other unrelated consulting income.
|
||||
Adding MP3 support to libsndfile could place that income under legal threat.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Fortunately, Ogg Vorbis exists as an alternative to MP3.
|
||||
Support for Ogg Vorbis was added to libsndfile (mostly due to the efforts of
|
||||
John ffitch of the Csound project) in version 1.0.18.
|
||||
</p>
|
||||
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q021"></A>
|
||||
<H2><BR/><B>Q21 : How do I use libsndfile in a closed source or commercial program
|
||||
and comply with the license?
|
||||
</B></H2>
|
||||
|
||||
<p>
|
||||
Here is a checklist of things you need to do to make sure your use of libsndfile
|
||||
in a closed source or commercial project complies with the license libsndfile is
|
||||
released under, the GNU Lesser General Public License (LGPL):
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Make sure you are linking to libsndfile as a shared library (Linux and Unix
|
||||
systems), Dynamic Link Library (Microsoft Windows) or dynlib (Mac OS X).
|
||||
If you are using some other operating system that doesn't allow dynamically
|
||||
linked libraries, you will not be able to use libsndfile unless you release
|
||||
the source code to your program.
|
||||
<li>In the licensing documentation for your program, add a statement that your
|
||||
software depends on libsndfile and that libsndfile is released under the GNU
|
||||
Lesser General Public License, either
|
||||
<a href="http://www.gnu.org/licenses/lgpl-2.1.txt">version 2.1</a>
|
||||
or optionally
|
||||
<a href="http://www.gnu.org/licenses/lgpl.txt">version 3</a>.
|
||||
<li>Include the text for both versions of the license, possibly as separate
|
||||
files named libsndfile_lgpl_v2_1.txt and libsndfile_lgpl_v3.txt.
|
||||
</ul>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q022"></A>
|
||||
<H2><BR/><B>Q22 : What versions of Windows does libsndfile work on?
|
||||
</B></H2>
|
||||
|
||||
<p>
|
||||
Currently the precompiled windows binaries are thoroughly tested on Windows XP.
|
||||
As such, they should also work on Win2k and Windows Vista.
|
||||
They may also work on earlier versions of Windows.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Since version 0.1.18 I have also been releasing precompiled binaries for Win64,
|
||||
the 64 bit version of Windows.
|
||||
These binaries have received much less testing than the 32 bit versions, but
|
||||
should work as expected.
|
||||
I'd be very interested in receiving feedback on these binaries.
|
||||
</p>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q023"></A>
|
||||
<H2><BR/><B>Q23 : I'm cross compiling libsndfile for another platform. How can I
|
||||
run the test suite?
|
||||
</B></H2>
|
||||
|
||||
<p>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Since version 1.0.21 the top level Makefile has an extra make target,
|
||||
'test-tarball'.
|
||||
Building this target creates a tarball called called:
|
||||
</p>
|
||||
|
||||
<center><tt>
|
||||
libsndfile-testsuite-${host_triplet}-${version}.tar.gz
|
||||
</tt></center>
|
||||
|
||||
<p>
|
||||
in the top level directory.
|
||||
This tarball can then be copied to the target platform.
|
||||
Once untarred and test script <tt>test_wrapper.sh</tt> can be run from
|
||||
the top level of the extracted tarball.
|
||||
</p>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<HR>
|
||||
<P>
|
||||
The libsndfile home page is here :
|
||||
<A HREF="http://www.mega-nerd.com/libsndfile/">
|
||||
http://www.mega-nerd.com/libsndfile/</A>.
|
||||
<BR/>
|
||||
Version : 1.0.28
|
||||
</P>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,9 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
html_DATA = index.html libsndfile.jpg libsndfile.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)
|
||||
|
|
@ -0,0 +1,573 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = doc
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/M4/add_cflags.m4 \
|
||||
$(top_srcdir)/M4/add_cxxflags.m4 \
|
||||
$(top_srcdir)/M4/ax_add_fortify_source.m4 \
|
||||
$(top_srcdir)/M4/clang.m4 $(top_srcdir)/M4/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/gcc_version.m4 $(top_srcdir)/M4/libtool.m4 \
|
||||
$(top_srcdir)/M4/lrint.m4 $(top_srcdir)/M4/lrintf.m4 \
|
||||
$(top_srcdir)/M4/ltoptions.m4 $(top_srcdir)/M4/ltsugar.m4 \
|
||||
$(top_srcdir)/M4/ltversion.m4 $(top_srcdir)/M4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/M4/mkoctfile_version.m4 \
|
||||
$(top_srcdir)/M4/octave.m4 $(top_srcdir)/M4/really_gcc.m4 \
|
||||
$(top_srcdir)/M4/stack_protect.m4 \
|
||||
$(top_srcdir)/M4/visibility.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES = libsndfile.css
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(htmldir)"
|
||||
DATA = $(html_DATA)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libsndfile.css.in \
|
||||
AUTHORS ChangeLog NEWS README
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
|
||||
CLEAN_VERSION = @CLEAN_VERSION@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXTERNAL_XIPH_CFLAGS = @EXTERNAL_XIPH_CFLAGS@
|
||||
EXTERNAL_XIPH_LIBS = @EXTERNAL_XIPH_LIBS@
|
||||
FGREP = @FGREP@
|
||||
FLAC_CFLAGS = @FLAC_CFLAGS@
|
||||
FLAC_LIBS = @FLAC_LIBS@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GCC_MINOR_VERSION = @GCC_MINOR_VERSION@
|
||||
GCC_VERSION = @GCC_VERSION@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_EXTERNAL_XIPH_LIBS = @HAVE_EXTERNAL_XIPH_LIBS@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_VISIBILITY = @HAVE_VISIBILITY@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
HAVE_XCODE_SELECT = @HAVE_XCODE_SELECT@
|
||||
HOST_TRIPLET = @HOST_TRIPLET@
|
||||
HTML_BGCOLOUR = @HTML_BGCOLOUR@
|
||||
HTML_FGCOLOUR = @HTML_FGCOLOUR@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MKOCTFILE = @MKOCTFILE@
|
||||
MKOCTFILE_VERSION = @MKOCTFILE_VERSION@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OCTAVE = @OCTAVE@
|
||||
OCTAVE_CONFIG = @OCTAVE_CONFIG@
|
||||
OCTAVE_CONFIG_VERSION = @OCTAVE_CONFIG_VERSION@
|
||||
OCTAVE_DEST_MDIR = @OCTAVE_DEST_MDIR@
|
||||
OCTAVE_DEST_ODIR = @OCTAVE_DEST_ODIR@
|
||||
OCTAVE_VERSION = @OCTAVE_VERSION@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
OS_SPECIFIC_CFLAGS = @OS_SPECIFIC_CFLAGS@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SF_COUNT_MAX = @SF_COUNT_MAX@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
|
||||
SIZEOF_SF_COUNT_T = @SIZEOF_SF_COUNT_T@
|
||||
SNDIO_LIBS = @SNDIO_LIBS@
|
||||
SPEEX_CFLAGS = @SPEEX_CFLAGS@
|
||||
SPEEX_LIBS = @SPEEX_LIBS@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
SRC_BINDIR = @SRC_BINDIR@
|
||||
STRIP = @STRIP@
|
||||
TEST_BINDIR = @TEST_BINDIR@
|
||||
TYPEOF_SF_COUNT_T = @TYPEOF_SF_COUNT_T@
|
||||
VERSION = @VERSION@
|
||||
VORBISENC_CFLAGS = @VORBISENC_CFLAGS@
|
||||
VORBISENC_LIBS = @VORBISENC_LIBS@
|
||||
VORBIS_CFLAGS = @VORBIS_CFLAGS@
|
||||
VORBIS_LIBS = @VORBIS_LIBS@
|
||||
WIN_RC_VERSION = @WIN_RC_VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
html_DATA = index.html libsndfile.jpg libsndfile.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)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
libsndfile.css: $(top_builddir)/config.status $(srcdir)/libsndfile.css.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-htmlDATA: $(html_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-htmlDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(htmldir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-htmlDATA
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-htmlDATA
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-htmlDATA install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags-am uninstall uninstall-am uninstall-htmlDATA
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,191 @@
|
|||
Version 1.0.27 (2016-06-19)
|
||||
* Fix an SF_INFO seekable flag regression introduced in 1.0.26.
|
||||
* Fix potential infinite loops on malformed input files.
|
||||
* Add string metadata read/write for CAF and RF64.
|
||||
* Add handling of CUE chunks.
|
||||
* Fix enaian-ness issues in PAF files.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.26 (2015-11-22)
|
||||
* Fix for CVE-2014-9496, SD2 buffer read overflow.
|
||||
* Fix for CVE-2014-9756, file_io.c divide by zero.
|
||||
* Fix for CVE-2015-7805, AIFF heap write overflow.
|
||||
* Add support for ALAC encoder in a CAF container.
|
||||
* Add support for Cart chunks in WAV files.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.25 (2011-07-13)
|
||||
* Fix for Secunia Advisory SA45125, heap overflow in PAF file handler.
|
||||
* Accept broken WAV files with blockalign == 0.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.24 (2011-03-23)
|
||||
* WAV files now have an 18 byte u-law and A-law fmt chunk.
|
||||
* Document virtual I/O functionality.
|
||||
* Two new methods rawHandle() and takeOwnership() in sndfile.hh.
|
||||
* AIFF fix for non-zero offset value in SSND chunk.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.23 (2010-10-10)
|
||||
* Add version metadata to Windows DLL.
|
||||
* Add a missing 'inline' to sndfile.hh.
|
||||
* Update docs.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.22 (2010-10-04)
|
||||
* Couple of fixes for SDS file writer.
|
||||
* Fixes arising from static analysis.
|
||||
* Handle FLAC files with ID3 meta data at start of file.
|
||||
* Handle FLAC files which report zero length.
|
||||
* Other minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.21 (2009-12-13)
|
||||
* Add a couple of new binary programs to programs/ dir.
|
||||
* Remove sndfile-jackplay (now in sndfile-tools package).
|
||||
* Add windows only function sf_wchar_open().
|
||||
* Bunch of minor bug fixes.
|
||||
|
||||
Version 1.0.20 (2009-05-14)
|
||||
* Fix potential heap overflow in VOC file parser (Tobias Klein, http://www.trapkit.de/).
|
||||
|
||||
Version 1.0.19 (2009-03-02)
|
||||
* Fix for CVE-2009-0186 (Alin Rad Pop, Secunia Research).
|
||||
* Huge number of minor bug fixes as a result of static analysis.
|
||||
|
||||
Version 1.0.18 (2009-02-07)
|
||||
* Add Ogg/Vorbis support (thanks to John ffitch).
|
||||
* Remove captive FLAC library.
|
||||
* Many new features and bug fixes.
|
||||
* Generate Win32 and Win64 pre-compiled binaries.
|
||||
|
||||
Version 1.0.17 (2006-08-31)
|
||||
* Add sndfile.hh C++ wrapper.
|
||||
* Update Win32 MinGW build instructions.
|
||||
* Minor bug fixes and cleanups.
|
||||
|
||||
Version 1.0.16 (2006-04-30)
|
||||
* Add support for Broadcast (BEXT) chunks in WAV files.
|
||||
* Implement new commands SFC_GET_SIGNAL_MAX and SFC_GET_MAX_ALL_CHANNELS.
|
||||
* Add support for RIFX (big endian WAV variant).
|
||||
* Fix configure script bugs.
|
||||
* Fix bug in INST and MARK chunk writing for AIFF files.
|
||||
|
||||
Version 1.0.15 (2006-03-16)
|
||||
* Fix some ia64 issues.
|
||||
* Fix precompiled DLL.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.14 (2006-02-19)
|
||||
* Really fix MinGW compile problems.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.13 (2006-01-21)
|
||||
* Fix for MinGW compiler problems.
|
||||
* Allow readin/write of instrument chunks from WAV and AIFF files.
|
||||
* Compile problem fix for Solaris compiler.
|
||||
* Minor cleanups and bug fixes.
|
||||
|
||||
Version 1.0.12 (2005-09-30)
|
||||
* Add support for FLAC and Apple's Core Audio Format (CAF).
|
||||
* Add virtual I/O interface (still needs docs).
|
||||
* Cygwin and other Win32 fixes.
|
||||
* Minor bug fixes and cleanups.
|
||||
|
||||
Version 1.0.11 (2004-11-15)
|
||||
* Add support for SD2 files.
|
||||
* Add read support for loop info in WAV and AIFF files.
|
||||
* Add more tests.
|
||||
* Improve type safety.
|
||||
* Minor optimisations and bug fixes.
|
||||
|
||||
Version 1.0.10 (2004-06-15)
|
||||
* Fix AIFF read/write mode bugs.
|
||||
* Add support for compiling Win32 DLLS using MinGW.
|
||||
* Fix problems resulting in failed compiles with gcc-2.95.
|
||||
* Improve test suite.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.9 (2004-03-30)
|
||||
* Add handling of AVR (Audio Visual Research) files.
|
||||
* Improve handling of WAVEFORMATEXTENSIBLE WAV files.
|
||||
* Fix for using pipes on Win32.
|
||||
|
||||
Version 1.0.8 (2004-03-14)
|
||||
* Correct peak chunk handing for files with > 16 tracks.
|
||||
* Fix for WAV files with huge number of CUE chunks.
|
||||
|
||||
Version 1.0.7 (2004-02-25)
|
||||
* Fix clip mode detection on ia64, MIPS and other CPUs.
|
||||
* Fix two MacOSX build problems.
|
||||
|
||||
Version 1.0.6 (2004-02-08)
|
||||
* Added support for native Win32 file access API (Ross Bencina).
|
||||
* New mode to add clippling then a converting from float/double to integer
|
||||
would otherwise wrap around.
|
||||
* Fixed a bug in reading/writing files > 2Gig on Linux, Solaris and others.
|
||||
* Many minor bug fixes.
|
||||
* Other random fixes for Win32.
|
||||
|
||||
Version 1.0.5 (2003-05-03)
|
||||
* Added support for HTK files.
|
||||
* Added new function sf_open_fd() to allow for secure opening of temporary
|
||||
files as well as reading/writing sound files embedded within larger
|
||||
container files.
|
||||
* Added string support for AIFF files.
|
||||
* Minor bug fixes and code cleanups.
|
||||
|
||||
Version 1.0.4 (2003-02-02)
|
||||
* Added suport of PVF and XI files.
|
||||
* Added functionality for setting and retreiving strings from sound files.
|
||||
* Minor code cleanups and bug fixes.
|
||||
|
||||
Version 1.0.3 (2002-12-09)
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.2 (2002-11-24)
|
||||
* Added support for VOX ADPCM.
|
||||
* Improved error reporting.
|
||||
* Added version scripting on Linux and Solaris.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.1 (2002-09-14)
|
||||
* Added MAT and MAT5 file formats.
|
||||
* Minor bug fixes.
|
||||
|
||||
Version 1.0.0 (2002-08-16)
|
||||
* Final release for 1.0.0.
|
||||
|
||||
Version 1.0.0rc6 (2002-08-14)
|
||||
* Release candidate 6 for the 1.0.0 series.
|
||||
* MacOS9 fixes.
|
||||
|
||||
Version 1.0.0rc5 (2002-08-10)
|
||||
* Release candidate 5 for the 1.0.0 series.
|
||||
* Changed the definition of sf_count_t which was causing problems when
|
||||
libsndfile was compiled with other libraries (ie WxWindows).
|
||||
* Minor bug fixes.
|
||||
* Documentation cleanup.
|
||||
|
||||
Version 1.0.0rc4 (2002-08-03)
|
||||
* Release candidate 4 for the 1.0.0 series.
|
||||
* Minor bug fixes.
|
||||
* Fix broken Win32 "make check".
|
||||
|
||||
Version 1.0.0rc3 (2002-08-02)
|
||||
* Release candidate 3 for the 1.0.0 series.
|
||||
* Fix bug where libsndfile was reading beyond the end of the data chunk.
|
||||
* Added on-the-fly header updates on write.
|
||||
* Fix a couple of documentation issues.
|
||||
|
||||
Version 1.0.0rc2 (2002-06-24)
|
||||
* Release candidate 2 for the 1.0.0 series.
|
||||
* Fix compile problem for Win32.
|
||||
|
||||
Version 1.0.0rc1 (2002-06-24)
|
||||
* Release candidate 1 for the 1.0.0 series.
|
||||
|
||||
Version 0.0.28 (2002-04-27)
|
||||
* Last offical release of 0.0.X series of the library.
|
||||
|
||||
Version 0.0.8 (1999-02-16)
|
||||
* First offical release.
|
|
@ -0,0 +1,71 @@
|
|||
This is libsndfile, 1.0.27
|
||||
|
||||
libsndfile is a library of C routines for reading and writing
|
||||
files containing sampled audio data.
|
||||
|
||||
The src/ directory contains the source code for library itself.
|
||||
|
||||
The doc/ directory contains the libsndfile documentation.
|
||||
|
||||
The examples/ directory contains examples of how to write code using
|
||||
libsndfile.
|
||||
|
||||
The tests/ directory contains programs which link against libsndfile
|
||||
and test its functionality.
|
||||
|
||||
The src/GSM610 directory contains code written by Jutta Degener and Carsten
|
||||
Bormann. Their original code can be found at :
|
||||
http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
|
||||
The src/G72x directory contains code written and released by Sun Microsystems
|
||||
under a suitably free license.
|
||||
|
||||
The src/ALAC directory contains code written and released by Apple Inc and
|
||||
released under the Apache license.
|
||||
|
||||
|
||||
LINUX
|
||||
-----
|
||||
Whereever possible, you should use the packages supplied by your Linux
|
||||
distribution.
|
||||
|
||||
If you really do need to compile from source it should be as easy as:
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
Since libsndfile optionally links against libFLAC, libogg and libvorbis, you
|
||||
will need to install appropriate versions of these libraries before running
|
||||
configure as above.
|
||||
|
||||
|
||||
UNIX
|
||||
----
|
||||
Compile as for Linux.
|
||||
|
||||
|
||||
Win32/Win64
|
||||
-----------
|
||||
The default Windows compilers are nowhere near compliant with the 1999 ISO
|
||||
C Standard and hence not able to compile libsndfile.
|
||||
|
||||
Please use the libsndfile binaries available on the libsndfile web site.
|
||||
|
||||
|
||||
MacOSX
|
||||
------
|
||||
Building on MacOSX should be the same as building it on any other Unix.
|
||||
|
||||
|
||||
CONTACTS
|
||||
--------
|
||||
|
||||
libsndfile was written by Erik de Castro Lopo (erikd AT mega-nerd DOT com).
|
||||
The libsndfile home page is at :
|
||||
|
||||
http://www.mega-nerd.com/libsndfile/
|
||||
|
||||
Bugs and support questions can be raised at :
|
||||
|
||||
https://github.com/erikd/libsndfile/
|
|
@ -0,0 +1,810 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
The libsndfile API
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<META NAME="Description" CONTENT="The libsndfile API.">
|
||||
<META NAME="Keywords" CONTENT="WAV AIFF AU libsndfile sound audio dsp Linux">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<BR>
|
||||
<H1><B>libsndfile</B></H1>
|
||||
<P>
|
||||
Libsndfile is a library designed to allow the reading and writing of many
|
||||
different sampled sound file formats (such as MS Windows WAV and the Apple/SGI
|
||||
AIFF format) through one standard library interface.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
During read and write operations, formats are seamlessly converted between the
|
||||
format the application program has requested or supplied and the file's data
|
||||
format. The application programmer can remain blissfully unaware of issues
|
||||
such as file endian-ness and data format. See <A HREF="#note1">Note 1</A> and
|
||||
<A HREF="#note2">Note 2</A>.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
Every effort is made to keep these documents up-to-date, error free and
|
||||
unambiguous.
|
||||
However, since maintaining the documentation is the least fun part of working
|
||||
on libsndfile, these docs can and do fall behind the behaviour of the library.
|
||||
If any errors, omissions or ambiguities are found, please notify me (erikd)
|
||||
at mega-nerd dot com.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
To supplement this reference documentation, there are simple example programs
|
||||
included in the source code tarball.
|
||||
The test suite which is also part of the source code tarball is also a good
|
||||
place to look for the correct usage of the library functions.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
<B> Finally, if you think there is some feature missing from libsndfile, check that
|
||||
it isn't already implemented (and documented)
|
||||
<A HREF="command.html">here</A>.
|
||||
</B>
|
||||
</P>
|
||||
|
||||
<H2><B>Synopsis</B></H2>
|
||||
<P>
|
||||
The functions of libsndfile are defined as follows:
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<PRE>
|
||||
#include <stdio.h>
|
||||
#include <sndfile.h>
|
||||
|
||||
SNDFILE* <A HREF="#open">sf_open</A> (const char *path, int mode, SF_INFO *sfinfo) ;
|
||||
SNDFILE* <A HREF="#open">sf_wchar_open</A> (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
|
||||
SNDFILE* <A HREF="#open_fd">sf_open_fd</A> (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;
|
||||
SNDFILE* <A HREF="#open_virtual">sf_open_virtual</A> (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data) ;
|
||||
int <A HREF="#check">sf_format_check</A> (const SF_INFO *info) ;
|
||||
|
||||
sf_count_t <A HREF="#seek">sf_seek</A> (SNDFILE *sndfile, sf_count_t frames, int whence) ;
|
||||
|
||||
int <A HREF="command.html">sf_command</A> (SNDFILE *sndfile, int cmd, void *data, int datasize) ;
|
||||
|
||||
int <A HREF="#error">sf_error</A> (SNDFILE *sndfile) ;
|
||||
const char* <A HREF="#error">sf_strerror</A> (SNDFILE *sndfile) ;
|
||||
const char* <A HREF="#error">sf_error_number</A> (int errnum) ;
|
||||
|
||||
int <A HREF="#error">sf_perror</A> (SNDFILE *sndfile) ;
|
||||
int <A HREF="#error">sf_error_str</A> (SNDFILE *sndfile, char* str, size_t len) ;
|
||||
|
||||
int <A HREF="#close">sf_close</A> (SNDFILE *sndfile) ;
|
||||
void <A HREF="#write_sync">sf_write_sync</A> (SNDFILE *sndfile) ;
|
||||
|
||||
sf_count_t <A HREF="#read">sf_read_short</A> (SNDFILE *sndfile, short *ptr, sf_count_t items) ;
|
||||
sf_count_t <A HREF="#read">sf_read_int</A> (SNDFILE *sndfile, int *ptr, sf_count_t items) ;
|
||||
sf_count_t <A HREF="#read">sf_read_float</A> (SNDFILE *sndfile, float *ptr, sf_count_t items) ;
|
||||
sf_count_t <A HREF="#read">sf_read_double</A> (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
|
||||
|
||||
sf_count_t <A HREF="#readf">sf_readf_short</A> (SNDFILE *sndfile, short *ptr, sf_count_t frames) ;
|
||||
sf_count_t <A HREF="#readf">sf_readf_int</A> (SNDFILE *sndfile, int *ptr, sf_count_t frames) ;
|
||||
sf_count_t <A HREF="#readf">sf_readf_float</A> (SNDFILE *sndfile, float *ptr, sf_count_t frames) ;
|
||||
sf_count_t <A HREF="#readf">sf_readf_double</A> (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
|
||||
|
||||
sf_count_t <A HREF="#write">sf_write_short</A> (SNDFILE *sndfile, short *ptr, sf_count_t items) ;
|
||||
sf_count_t <A HREF="#write">sf_write_int</A> (SNDFILE *sndfile, int *ptr, sf_count_t items) ;
|
||||
sf_count_t <A HREF="#write">sf_write_float</A> (SNDFILE *sndfile, float *ptr, sf_count_t items) ;
|
||||
sf_count_t <A HREF="#write">sf_write_double</A> (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
|
||||
|
||||
sf_count_t <A HREF="#writef">sf_writef_short</A> (SNDFILE *sndfile, short *ptr, sf_count_t frames) ;
|
||||
sf_count_t <A HREF="#writef">sf_writef_int</A> (SNDFILE *sndfile, int *ptr, sf_count_t frames) ;
|
||||
sf_count_t <A HREF="#writef">sf_writef_float</A> (SNDFILE *sndfile, float *ptr, sf_count_t frames) ;
|
||||
sf_count_t <A HREF="#writef">sf_writef_double</A> (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
|
||||
|
||||
sf_count_t <A HREF="#raw">sf_read_raw</A> (SNDFILE *sndfile, void *ptr, sf_count_t bytes) ;
|
||||
sf_count_t <A HREF="#raw">sf_write_raw</A> (SNDFILE *sndfile, void *ptr, sf_count_t bytes) ;
|
||||
|
||||
const char* <A HREF="#string">sf_get_string</A> (SNDFILE *sndfile, int str_type) ;
|
||||
int <A HREF="#string">sf_set_string</A> (SNDFILE *sndfile, int str_type, const char* str) ;
|
||||
|
||||
</PRE>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
SNDFILE* is an anonymous pointer to data which is private to the library.
|
||||
</P>
|
||||
|
||||
|
||||
<A NAME="open"></A>
|
||||
<H2><B>File Open Function</B></H2>
|
||||
|
||||
<PRE>
|
||||
SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The sf_open() function opens the sound file at the specified path.
|
||||
The filename is byte encoded, but may be utf-8 on Linux, while on Mac OS X it
|
||||
will use the filesystem character set.
|
||||
On Windows, there is also a Windows specific sf_wchar_open() that takes a
|
||||
UTF16_BE encoded filename.
|
||||
</P>
|
||||
|
||||
<PRE>
|
||||
SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The SF_INFO structure is for passing data between the calling function and the library
|
||||
when opening a file for reading or writing. It is defined in sndfile.h as follows:
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<PRE>
|
||||
typedef struct
|
||||
{ sf_count_t frames ; /* Used to be called samples. */
|
||||
int samplerate ;
|
||||
int channels ;
|
||||
int format ;
|
||||
int sections ;
|
||||
int seekable ;
|
||||
} SF_INFO ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The mode parameter for this function can be any one of the following three values:
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<PRE>
|
||||
SFM_READ - read only mode
|
||||
SFM_WRITE - write only mode
|
||||
SFM_RDWR - read/write mode
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
When opening a file for read, the <b>format</B> field should be set to zero before
|
||||
calling sf_open().
|
||||
The only exception to this is the case of RAW files where the caller has to set
|
||||
the samplerate, channels and format fields to valid values.
|
||||
All other fields of the structure are filled in by the library.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
When opening a file for write, the caller must fill in structure members samplerate,
|
||||
channels, and format.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
The format field in the above SF_INFO structure is made up of the bit-wise OR of a
|
||||
major format type (values between 0x10000 and 0x08000000), a minor format type
|
||||
(with values less than 0x10000) and an optional endian-ness value.
|
||||
The currently understood formats are listed in sndfile.h as follows and also include
|
||||
bitmasks for separating major and minor file types.
|
||||
Not all combinations of endian-ness and major and minor file types are valid.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<PRE>
|
||||
enum
|
||||
{ /* Major formats. */
|
||||
SF_FORMAT_WAV = 0x010000, /* Microsoft WAV format (little endian). */
|
||||
SF_FORMAT_AIFF = 0x020000, /* Apple/SGI AIFF format (big endian). */
|
||||
SF_FORMAT_AU = 0x030000, /* Sun/NeXT AU format (big endian). */
|
||||
SF_FORMAT_RAW = 0x040000, /* RAW PCM data. */
|
||||
SF_FORMAT_PAF = 0x050000, /* Ensoniq PARIS file format. */
|
||||
SF_FORMAT_SVX = 0x060000, /* Amiga IFF / SVX8 / SV16 format. */
|
||||
SF_FORMAT_NIST = 0x070000, /* Sphere NIST format. */
|
||||
SF_FORMAT_VOC = 0x080000, /* VOC files. */
|
||||
SF_FORMAT_IRCAM = 0x0A0000, /* Berkeley/IRCAM/CARL */
|
||||
SF_FORMAT_W64 = 0x0B0000, /* Sonic Foundry's 64 bit RIFF/WAV */
|
||||
SF_FORMAT_MAT4 = 0x0C0000, /* Matlab (tm) V4.2 / GNU Octave 2.0 */
|
||||
SF_FORMAT_MAT5 = 0x0D0000, /* Matlab (tm) V5.0 / GNU Octave 2.1 */
|
||||
SF_FORMAT_PVF = 0x0E0000, /* Portable Voice Format */
|
||||
SF_FORMAT_XI = 0x0F0000, /* Fasttracker 2 Extended Instrument */
|
||||
SF_FORMAT_HTK = 0x100000, /* HMM Tool Kit format */
|
||||
SF_FORMAT_SDS = 0x110000, /* Midi Sample Dump Standard */
|
||||
SF_FORMAT_AVR = 0x120000, /* Audio Visual Research */
|
||||
SF_FORMAT_WAVEX = 0x130000, /* MS WAVE with WAVEFORMATEX */
|
||||
SF_FORMAT_SD2 = 0x160000, /* Sound Designer 2 */
|
||||
SF_FORMAT_FLAC = 0x170000, /* FLAC lossless file format */
|
||||
SF_FORMAT_CAF = 0x180000, /* Core Audio File format */
|
||||
SF_FORMAT_WVE = 0x190000, /* Psion WVE format */
|
||||
SF_FORMAT_OGG = 0x200000, /* Xiph OGG container */
|
||||
SF_FORMAT_MPC2K = 0x210000, /* Akai MPC 2000 sampler */
|
||||
SF_FORMAT_RF64 = 0x220000, /* RF64 WAV file */
|
||||
|
||||
/* Subtypes from here on. */
|
||||
|
||||
SF_FORMAT_PCM_S8 = 0x0001, /* Signed 8 bit data */
|
||||
SF_FORMAT_PCM_16 = 0x0002, /* Signed 16 bit data */
|
||||
SF_FORMAT_PCM_24 = 0x0003, /* Signed 24 bit data */
|
||||
SF_FORMAT_PCM_32 = 0x0004, /* Signed 32 bit data */
|
||||
|
||||
SF_FORMAT_PCM_U8 = 0x0005, /* Unsigned 8 bit data (WAV and RAW only) */
|
||||
|
||||
SF_FORMAT_FLOAT = 0x0006, /* 32 bit float data */
|
||||
SF_FORMAT_DOUBLE = 0x0007, /* 64 bit float data */
|
||||
|
||||
SF_FORMAT_ULAW = 0x0010, /* U-Law encoded. */
|
||||
SF_FORMAT_ALAW = 0x0011, /* A-Law encoded. */
|
||||
SF_FORMAT_IMA_ADPCM = 0x0012, /* IMA ADPCM. */
|
||||
SF_FORMAT_MS_ADPCM = 0x0013, /* Microsoft ADPCM. */
|
||||
|
||||
SF_FORMAT_GSM610 = 0x0020, /* GSM 6.10 encoding. */
|
||||
SF_FORMAT_VOX_ADPCM = 0x0021, /* Oki Dialogic ADPCM encoding. */
|
||||
|
||||
SF_FORMAT_G721_32 = 0x0030, /* 32kbs G721 ADPCM encoding. */
|
||||
SF_FORMAT_G723_24 = 0x0031, /* 24kbs G723 ADPCM encoding. */
|
||||
SF_FORMAT_G723_40 = 0x0032, /* 40kbs G723 ADPCM encoding. */
|
||||
|
||||
SF_FORMAT_DWVW_12 = 0x0040, /* 12 bit Delta Width Variable Word encoding. */
|
||||
SF_FORMAT_DWVW_16 = 0x0041, /* 16 bit Delta Width Variable Word encoding. */
|
||||
SF_FORMAT_DWVW_24 = 0x0042, /* 24 bit Delta Width Variable Word encoding. */
|
||||
SF_FORMAT_DWVW_N = 0x0043, /* N bit Delta Width Variable Word encoding. */
|
||||
|
||||
SF_FORMAT_DPCM_8 = 0x0050, /* 8 bit differential PCM (XI only) */
|
||||
SF_FORMAT_DPCM_16 = 0x0051, /* 16 bit differential PCM (XI only) */
|
||||
|
||||
SF_FORMAT_VORBIS = 0x0060, /* Xiph Vorbis encoding. */
|
||||
|
||||
/* Endian-ness options. */
|
||||
|
||||
SF_ENDIAN_FILE = 0x00000000, /* Default file endian-ness. */
|
||||
SF_ENDIAN_LITTLE = 0x10000000, /* Force little endian-ness. */
|
||||
SF_ENDIAN_BIG = 0x20000000, /* Force big endian-ness. */
|
||||
SF_ENDIAN_CPU = 0x30000000, /* Force CPU endian-ness. */
|
||||
|
||||
SF_FORMAT_SUBMASK = 0x0000FFFF,
|
||||
SF_FORMAT_TYPEMASK = 0x0FFF0000,
|
||||
SF_FORMAT_ENDMASK = 0x30000000
|
||||
} ;
|
||||
</PRE>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
Every call to sf_open() should be matched with a call to sf_close() to free up
|
||||
memory allocated during the call to sf_open().
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
On success, the sf_open function returns a non-NULL pointer which should be
|
||||
passed as the first parameter to all subsequent libsndfile calls dealing with
|
||||
that audio file.
|
||||
On fail, the sf_open function returns a NULL pointer.
|
||||
An explanation of the error can obtained by passing NULL to
|
||||
<A HREF="#error">sf_strerror</A>.
|
||||
</P>
|
||||
|
||||
<A NAME="open_fd"></A>
|
||||
<H3><B>File Descriptor Open</B></H3>
|
||||
|
||||
<PRE>
|
||||
SNDFILE* sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
<b>Note:</b> On Microsoft Windows, this function does not work if the
|
||||
application and the libsndfile DLL are linked to different versions of the
|
||||
Microsoft C runtime DLL.
|
||||
</P>
|
||||
<P>
|
||||
The second open function takes a file descriptor of a file that has already been
|
||||
opened.
|
||||
Care should be taken to ensure that the mode of the file represented by the
|
||||
descriptor matches the mode argument.
|
||||
This function is useful in the following circumstances:
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI>Opening temporary files securely (ie use the tmpfile() to return a
|
||||
FILE* pointer and then using fileno() to retrieve the file descriptor
|
||||
which is then passed to libsndfile).
|
||||
<LI>Opening files with file names using OS specific character encodings
|
||||
and then passing the file descriptor to sf_open_fd().
|
||||
<LI>Opening sound files embedded within larger files.
|
||||
<A HREF="embedded_files.html">More info</A>.
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
Every call to sf_open_fd() should be matched with a call to sf_close() to free up
|
||||
memory allocated during the call to sf_open().
|
||||
</P>
|
||||
|
||||
<P>
|
||||
When sf_close() is called, the file descriptor is only closed if the <B>close_desc</B>
|
||||
parameter was TRUE when the sf_open_fd() function was called.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
On success, the sf_open_fd function returns a non-NULL pointer which should be
|
||||
passed as the first parameter to all subsequent libsndfile calls dealing with
|
||||
that audio file.
|
||||
On fail, the sf_open_fd function returns a NULL pointer.
|
||||
</P>
|
||||
|
||||
<A NAME="open_virtual"></A>
|
||||
<h3><b>Virtual File Open Function</b></h3>
|
||||
<pre>
|
||||
SNDFILE* sf_open_virtual (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data) ;
|
||||
</pre>
|
||||
<p>
|
||||
Opens a soundfile from a virtual file I/O context which is provided
|
||||
by the caller. This is usually used to interface libsndfile to a stream or buffer
|
||||
based system. Apart from the sfvirtual and the user_data parameters this function behaves
|
||||
like <a href="#open">sf_open</a>.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
typedef struct
|
||||
{ sf_vio_get_filelen get_filelen ;
|
||||
sf_vio_seek seek ;
|
||||
sf_vio_read read ;
|
||||
sf_vio_write write ;
|
||||
sf_vio_tell tell ;
|
||||
} SF_VIRTUAL_IO ;
|
||||
</pre>
|
||||
<p>
|
||||
Libsndfile calls the callbacks provided by the SF_VIRTUAL_IO structure when opening, reading
|
||||
and writing to the virtual file context. The user_data pointer is a user defined context which
|
||||
will be available in the callbacks.
|
||||
</p>
|
||||
<pre>
|
||||
typedef sf_count_t (*sf_vio_get_filelen) (void *user_data) ;
|
||||
typedef sf_count_t (*sf_vio_seek) (sf_count_t offset, int whence, void *user_data) ;
|
||||
typedef sf_count_t (*sf_vio_read) (void *ptr, sf_count_t count, void *user_data) ;
|
||||
typedef sf_count_t (*sf_vio_write) (const void *ptr, sf_count_t count, void *user_data) ;
|
||||
typedef sf_count_t (*sf_vio_tell) (void *user_data) ;
|
||||
</pre>
|
||||
<h4>sf_vio_get_filelen</h4>
|
||||
<pre>
|
||||
typedef sf_count_t (*sf_vio_get_filelen) (void *user_data) ;
|
||||
</pre>
|
||||
<p>
|
||||
The virtual file contex must return the length of the virtual file in bytes.<br>
|
||||
</p>
|
||||
<h4>sf_vio_seek</h4>
|
||||
<pre>
|
||||
typedef sf_count_t (*sf_vio_seek) (sf_count_t offset, int whence, void *user_data) ;
|
||||
</pre>
|
||||
<p>
|
||||
The virtual file context must seek to offset using the seek mode provided by whence which is one of<br>
|
||||
</p>
|
||||
<pre>
|
||||
SEEK_CUR
|
||||
SEEK_SET
|
||||
SEEK_END
|
||||
</pre>
|
||||
<p>
|
||||
The return value must contain the new offset in the file.
|
||||
</p>
|
||||
<h4>sf_vio_read</h4>
|
||||
<pre>
|
||||
typedef sf_count_t (*sf_vio_read) (void *ptr, sf_count_t count, void *user_data) ;
|
||||
</pre>
|
||||
<p>
|
||||
The virtual file context must copy ("read") "count" bytes into the
|
||||
buffer provided by ptr and return the count of actually copied bytes.
|
||||
</p>
|
||||
<h4>sf_vio_write</h4>
|
||||
<pre>
|
||||
typedef sf_count_t (*sf_vio_write) (const void *ptr, sf_count_t count, void *user_data) ;
|
||||
</pre>
|
||||
<p>
|
||||
The virtual file context must process "count" bytes stored in the
|
||||
buffer passed with ptr and return the count of actually processed bytes.<br>
|
||||
</p>
|
||||
<h4>sf_vio_tell</h4>
|
||||
<pre>
|
||||
typedef sf_count_t (*sf_vio_tell) (void *user_data) ;
|
||||
</pre>
|
||||
<p>
|
||||
Return the current position of the virtual file context.<br>
|
||||
</p>
|
||||
|
||||
|
||||
<A NAME="check"></A>
|
||||
<BR><H2><B>Format Check Function</B></H2>
|
||||
|
||||
<PRE>
|
||||
int sf_format_check (const SF_INFO *info) ;
|
||||
</PRE>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
This function allows the caller to check if a set of parameters in the SF_INFO struct
|
||||
is valid before calling sf_open (SFM_WRITE).
|
||||
</P>
|
||||
<P>
|
||||
sf_format_check returns TRUE if the parameters are valid and FALSE otherwise.
|
||||
</P>
|
||||
|
||||
<A NAME="seek"></A>
|
||||
<BR><H2><B>File Seek Functions</B></H2>
|
||||
|
||||
<PRE>
|
||||
sf_count_t sf_seek (SNDFILE *sndfile, sf_count_t frames, int whence) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The file seek functions work much like lseek in unistd.h with the exception that
|
||||
the non-audio data is ignored and the seek only moves within the audio data section of
|
||||
the file.
|
||||
In addition, seeks are defined in number of (multichannel) frames.
|
||||
Therefore, a seek in a stereo file from the current position forward with an offset
|
||||
of 1 would skip forward by one sample of both channels.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
like lseek(), the whence parameter can be any one of the following three values:
|
||||
</P>
|
||||
|
||||
<PRE>
|
||||
SEEK_SET - The offset is set to the start of the audio data plus offset (multichannel) frames.
|
||||
SEEK_CUR - The offset is set to its current location plus offset (multichannel) frames.
|
||||
SEEK_END - The offset is set to the end of the data plus offset (multichannel) frames.
|
||||
</PRE>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
Internally, libsndfile keeps track of the read and write locations using separate
|
||||
read and write pointers.
|
||||
If a file has been opened with a mode of SFM_RDWR, bitwise OR-ing the standard whence
|
||||
values above with either SFM_READ or SFM_WRITE allows the read and write pointers to
|
||||
be modified separately.
|
||||
If the SEEK_* values are used on their own, the read and write pointers are
|
||||
both modified.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Note that the frames offset can be negative and in fact should be when SEEK_END is used for the
|
||||
whence parameter.
|
||||
</P>
|
||||
<P>
|
||||
sf_seek will return the offset in (multichannel) frames from the start of the audio data
|
||||
or -1 if an error occured (ie an attempt is made to seek beyond the start or end of the file).
|
||||
</P>
|
||||
|
||||
<A NAME="error"></A>
|
||||
<H2><BR><B>Error Reporting Functions</B></H2>
|
||||
|
||||
|
||||
<PRE>
|
||||
int sf_error (SNDFILE *sndfile) ;
|
||||
</PRE>
|
||||
<P>
|
||||
This function returns the current error number for the given SNDFILE.
|
||||
The error number may be one of the following:
|
||||
</P>
|
||||
<PRE>
|
||||
enum
|
||||
{ SF_ERR_NO_ERROR = 0,
|
||||
SF_ERR_UNRECOGNISED_FORMAT = 1,
|
||||
SF_ERR_SYSTEM = 2,
|
||||
SF_ERR_MALFORMED_FILE = 3,
|
||||
SF_ERR_UNSUPPORTED_ENCODING = 4
|
||||
} ;
|
||||
</PRE>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
or any one of many other internal error values.
|
||||
Applications should only test the return value against error values defined in
|
||||
<sndfile.h> as the internal error values are subject to change at any
|
||||
time.
|
||||
For errors not in the above list, the function sf_error_number() can be used to
|
||||
convert it to an error string.
|
||||
</P>
|
||||
|
||||
<PRE>
|
||||
const char* sf_strerror (SNDFILE *sndfile) ;
|
||||
const char* sf_error_number (int errnum) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The error functions sf_strerror() and sf_error_number() convert the library's internal
|
||||
error enumerations into text strings.
|
||||
</P>
|
||||
<PRE>
|
||||
int sf_perror (SNDFILE *sndfile) ;
|
||||
int sf_error_str (SNDFILE *sndfile, char* str, size_t len) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The functions sf_perror() and sf_error_str() are deprecated and will be dropped
|
||||
from the library at some later date.
|
||||
</P>
|
||||
|
||||
<A NAME="close"></A>
|
||||
<H2><BR><B>File Close Function</B></H2>
|
||||
|
||||
<PRE>
|
||||
int sf_close (SNDFILE *sndfile) ;
|
||||
</PRE>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
The close function closes the file, deallocates its internal buffers and returns
|
||||
0 on success or an error value otherwise.
|
||||
</P>
|
||||
<BR>
|
||||
|
||||
<A NAME="write_sync"></A>
|
||||
<H2><BR><B>Write Sync Function</B></H2>
|
||||
|
||||
<PRE>
|
||||
void sf_write_sync (SNDFILE *sndfile) ;
|
||||
</PRE>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
If the file is opened SFM_WRITE or SFM_RDWR, call the operating system's function
|
||||
to force the writing of all file cache buffers to disk. If the file is opened
|
||||
SFM_READ no action is taken.
|
||||
</P>
|
||||
<BR>
|
||||
|
||||
|
||||
<A NAME="read"></A>
|
||||
<H2><BR><B>File Read Functions</B></H2>
|
||||
|
||||
<PRE>
|
||||
sf_count_t sf_read_short (SNDFILE *sndfile, short *ptr, sf_count_t items) ;
|
||||
sf_count_t sf_read_int (SNDFILE *sndfile, int *ptr, sf_count_t items) ;
|
||||
sf_count_t sf_read_float (SNDFILE *sndfile, float *ptr, sf_count_t items) ;
|
||||
sf_count_t sf_read_double (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
|
||||
</PRE>
|
||||
|
||||
<A NAME="readf"></A>
|
||||
<PRE>
|
||||
sf_count_t sf_readf_short (SNDFILE *sndfile, short *ptr, sf_count_t frames) ;
|
||||
sf_count_t sf_readf_int (SNDFILE *sndfile, int *ptr, sf_count_t frames) ;
|
||||
sf_count_t sf_readf_float (SNDFILE *sndfile, float *ptr, sf_count_t frames) ;
|
||||
sf_count_t sf_readf_double (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
|
||||
</PRE>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
The file read functions fill the array pointed to by ptr with the
|
||||
requested number of items or frames.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
For the frames-count functions, the frames parameter specifies the number
|
||||
of frames. A frame is just a block of samples, one for each
|
||||
channel. <B>Care must be taken to ensure that there is enough space
|
||||
in the array pointed to by ptr, to take (frames * channels) number of
|
||||
items (shorts, ints, floats or doubles).
|
||||
</B></P>
|
||||
|
||||
<P>
|
||||
For the items-count functions, the items parameter must be an integer product
|
||||
of the number of channels or an error will occur. Here, an item is just a
|
||||
sample.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Note: The only difference between the "items" and "frames" versions of
|
||||
each read function is the units in which the object count is specified
|
||||
- calling sf_readf_short with a count argument of N, on a SNDFILE with
|
||||
C channels, is the same as calling sf_read_short with a count argument
|
||||
of N*C. The buffer pointed to by "ptr" should be the same number of
|
||||
bytes in each case.
|
||||
</P>
|
||||
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
Note: The data type used by the calling program and the data format of
|
||||
the file do not need to be the same. For instance, it is possible to
|
||||
open a 16 bit PCM encoded WAV file and read the data using
|
||||
sf_read_float(). The library seamlessly converts between the two
|
||||
formats on-the-fly. See
|
||||
<A HREF="#note1">Note 1</A>.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
The sf_read_XXXX and sf_readf_XXXX functions return the number of
|
||||
items or frames read, respectively. Unless the end of the file was
|
||||
reached during the read, the return value should equal the number of
|
||||
objects requested. Attempts to read beyond the end of the file will
|
||||
not result in an error but will cause the read functions to return
|
||||
less than the number of objects requested or 0 if already at the end
|
||||
of the file.
|
||||
</P>
|
||||
|
||||
<A NAME="write"></A>
|
||||
<H2><BR><B>File Write Functions</B></H2>
|
||||
|
||||
<PRE>
|
||||
sf_count_t sf_write_short (SNDFILE *sndfile, short *ptr, sf_count_t items) ;
|
||||
sf_count_t sf_write_int (SNDFILE *sndfile, int *ptr, sf_count_t items) ;
|
||||
sf_count_t sf_write_float (SNDFILE *sndfile, float *ptr, sf_count_t items) ;
|
||||
sf_count_t sf_write_double (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
|
||||
</PRE>
|
||||
|
||||
<A NAME="writef"></A>
|
||||
<PRE>
|
||||
sf_count_t sf_writef_short (SNDFILE *sndfile, short *ptr, sf_count_t frames) ;
|
||||
sf_count_t sf_writef_int (SNDFILE *sndfile, int *ptr, sf_count_t frames) ;
|
||||
sf_count_t sf_writef_float (SNDFILE *sndfile, float *ptr, sf_count_t frames) ;
|
||||
sf_count_t sf_writef_double (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The file write functions write the data in the array pointed to by ptr to the file.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
For items-count functions, the items parameter specifies the size of
|
||||
the array and must be an integer product of the number of channels or
|
||||
an error will occur.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
For the frames-count functions, the array is expected to be large enough
|
||||
to hold a number of items equal to the product of frames and the
|
||||
number of channels.
|
||||
</P>
|
||||
|
||||
<P>As with the read functions <A HREF="#read">above</A>, the only
|
||||
difference in the items and frames version of each write function is
|
||||
the units in which the buffer size is specified. Again, the data type
|
||||
used by the calling program and the data format of the file do not
|
||||
need to be the same (<A HREF="#note1">Note 1</A>).
|
||||
</P>
|
||||
|
||||
<P>
|
||||
The sf_write_XXXX and sf_writef_XXXX functions respectively return the
|
||||
number of items or frames written (which should be the same as the
|
||||
items or frames parameter).
|
||||
</P>
|
||||
|
||||
|
||||
<A NAME="raw"></A>
|
||||
<H2><BR><B>Raw File Read and Write Functions</B></H2>
|
||||
<!-- pepper -->
|
||||
<PRE>
|
||||
sf_count_t sf_read_raw (SNDFILE *sndfile, void *ptr, sf_count_t bytes) ;
|
||||
sf_count_t sf_write_raw (SNDFILE *sndfile, void *ptr, sf_count_t bytes) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
<b>Note:</b> Unless you are writing an external decoder/encode that uses
|
||||
libsndfile to handle the file headers, you should not be using these
|
||||
functions.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
The raw read and write functions read raw audio data from the audio file (not to be
|
||||
confused with reading RAW header-less PCM files). The number of bytes read or written
|
||||
must always be an integer multiple of the number of channels multiplied by the number
|
||||
of bytes required to represent one sample from one channel.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
The raw read and write functions return the number of bytes read or written (which
|
||||
should be the same as the bytes parameter).
|
||||
</P>
|
||||
|
||||
<P>
|
||||
<B>
|
||||
Note : The result of using of both regular reads/writes and raw reads/writes on
|
||||
compressed file formats other than SF_FORMAT_ALAW and SF_FORMAT_ULAW is undefined.
|
||||
</B>
|
||||
</P>
|
||||
|
||||
<p>
|
||||
See also : <a href="command.html#SFC_RAW_NEEDS_ENDSWAP">SFC_RAW_NEEDS_ENDSWAP</a>
|
||||
</p>
|
||||
|
||||
<A NAME="string"></A>
|
||||
<H2><BR><B>Functions for Reading and Writing String Data</B></H2>
|
||||
|
||||
|
||||
<PRE>
|
||||
const char* sf_get_string (SNDFILE *sndfile, int str_type) ;
|
||||
int sf_set_string (SNDFILE *sndfile, int str_type, const char* str) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
These functions allow strings to be set on files opened for write and to be
|
||||
retrieved from files opened for read where supported by the given file type.
|
||||
The <B>str_type</B> parameter can be any one of the following string types:
|
||||
</P>
|
||||
|
||||
<PRE>
|
||||
enum
|
||||
{ SF_STR_TITLE,
|
||||
SF_STR_COPYRIGHT,
|
||||
SF_STR_SOFTWARE,
|
||||
SF_STR_ARTIST,
|
||||
SF_STR_COMMENT,
|
||||
SF_STR_DATE,
|
||||
SF_STR_ALBUM,
|
||||
SF_STR_LICENSE,
|
||||
SF_STR_TRACKNUMBER,
|
||||
SF_STR_GENRE
|
||||
} ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The sf_get_string() function returns the specified string if it exists and a
|
||||
NULL pointer otherwise.
|
||||
In addition to the string ids above, SF_STR_FIRST (== SF_STR_TITLE) and
|
||||
SF_STR_LAST (always the same as the highest numbers string id) are also
|
||||
available to allow iteration over all the available string ids.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
The sf_set_string() function sets the string data.
|
||||
It returns zero on success and non-zero on error.
|
||||
The error code can be converted to a string using sf_error_number().
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Strings passed to and retrieved from these two functions are assumed to be
|
||||
utf-8.
|
||||
However, while formats like Ogg/Vorbis and FLAC fully support utf-8, others
|
||||
like WAV and AIFF officially only support ASCII.
|
||||
Writing utf-8 strings to WAV and AIF files with libsndfile will work when read
|
||||
back with libsndfile, but may not work with other programs.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
The suggested method of dealing with tags retrived using sf_get_string() is to
|
||||
assume they are utf-8.
|
||||
Similarly if you have a string in some exotic format like utf-16, it should be
|
||||
encoded to utf-8 before being written using libsndfile.
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME="note1"></A>
|
||||
<H2><BR><B>Note 1</B></H2>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
When converting between integer PCM formats of differing size
|
||||
(e.g. using sf_read_int() to read a 16 bit PCM encoded WAV file)
|
||||
libsndfile obeys one simple rule:
|
||||
</P>
|
||||
|
||||
<P CLASS=indent_block>
|
||||
Whenever integer data is moved from one sized container to another sized container,
|
||||
the most significant bit in the source container will become the most significant bit
|
||||
in the destination container.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
When converting between integer data and floating point data, different rules apply.
|
||||
The default behaviour when reading floating point data (sf_read_float() or
|
||||
sf_read_double ()) from a file with integer data is normalisation. Regardless of
|
||||
whether data in the file is 8, 16, 24 or 32 bit wide, the data will be read as
|
||||
floating point data in the range [-1.0, 1.0]. Similarly, data in the range [-1.0, 1.0]
|
||||
will be written to an integer PCM file so that a data value of 1.0 will be the largest
|
||||
allowable integer for the given bit width. This normalisation can be turned on or off
|
||||
using the <A HREF="command.html">sf_command</A> interface.
|
||||
</P>
|
||||
|
||||
<A NAME="note2"></A>
|
||||
<H2><BR><B>Note 2</B></H2>
|
||||
|
||||
<P>
|
||||
Reading a file containg floating point data (allowable with WAV, AIFF, AU and other
|
||||
file formats) using integer read methods (sf_read_short() or sf_read_int()) can
|
||||
produce unexpected results.
|
||||
For instance the data in the file may have a maximum absolute value < 1.0 which
|
||||
would mean that all sample values read from the file will be zero.
|
||||
In order to read these files correctly using integer read methods, it is recommended
|
||||
that you use the
|
||||
<A HREF="command.html">sf_command</A>
|
||||
interface, a command of
|
||||
<A HREF="command.html#SFC_SET_SCALE_FLOAT_INT_READ">SFC_SET_SCALE_FLOAT_INT_READ</A>
|
||||
and a parameter of SF_TRUE to force correct scaling.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<HR>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
The libsndfile home page is
|
||||
<A HREF="http://www.mega-nerd.com/libsndfile/">here</A>.
|
||||
</P>
|
||||
<P>
|
||||
Version : 1.0.28
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,76 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Bug Reporting
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<CENTER>
|
||||
<H1><B>Reporting Bugs in libsndfile</B></H1>
|
||||
</CENTER>
|
||||
<P>
|
||||
Before even attempting to report a bug in libsndfile please make sure you have
|
||||
read the
|
||||
<A HREF="FAQ.html">Frequently Asked Questions</A>.
|
||||
If you are having a problem writing code using libsndfile make sure you read
|
||||
the
|
||||
<A HREF="api.html">Application Programming Interface</A>
|
||||
documentation.
|
||||
</P>
|
||||
<P>
|
||||
That said, I am interested in finding and fixing all genuine bugs in libsndfile.
|
||||
Bugs I want to fix include any of the following problems (and probably others) :
|
||||
</P>
|
||||
<UL>
|
||||
<LI> Compilation problems on new platforms.
|
||||
<LI> Errors being detected during the `make check' process.
|
||||
<LI> Segmentation faults occuring inside libsndfile.
|
||||
<LI> libsndfile hanging when opening a file.
|
||||
<LI> Supported sound file types being incorrectly read or written.
|
||||
<LI> Omissions, errors or spelling mistakes in the documentation.
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
When submitting a bug report you must include :
|
||||
</P>
|
||||
<UL>
|
||||
<LI> Your system (CPU and memory size should be enough).
|
||||
<LI> The operating system you are using.
|
||||
<LI> Whether you are using a package provided by your distribution or you
|
||||
compiled it youself.
|
||||
<LI> If you compiled it yourself, the compiler you are using. (Also make
|
||||
sure to run 'make check'.)
|
||||
<LI> A description of the problem.
|
||||
<LI> Information generated by the sndfile-info program (see next paragraph).
|
||||
<LI> If you are having problems with sndfile-play and ALSA on Linux, I will
|
||||
need information about your kernel, ALSA version, compiler version,
|
||||
whether you compiled the kernel/ALSA your self or installed from a
|
||||
package etc.
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
If libsndfile compiles and installs correctly but has difficulty reading a particular
|
||||
file or type of file you should run the <B>sndfile-info</B> program (from the examples
|
||||
directory of the libsndfile distribution) on the file. See
|
||||
<A HREF="sndfile_info.html">here</A>
|
||||
for an example of the use of the <B>sndfile-info</B> program.
|
||||
</P>
|
||||
<P>
|
||||
Please do not send me a sound file which fails to open under libsndfile unless I
|
||||
specifically ask you to. The above information should usually suffice for most
|
||||
problems.
|
||||
</P>
|
||||
<P>
|
||||
Once you have the above information you should submit a ticket on the libsnfile
|
||||
<A HREF="https://github.com/erikd/libsndfile/issues">github issue tracker</A>.
|
||||
|
||||
</P>
|
||||
</BODY>
|
||||
</HTML>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
libsndfile : Embedded Sound Files.
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<META NAME="Description" CONTENT="The libsndfile API.">
|
||||
<META NAME="Keywords" CONTENT="WAV AIFF AU libsndfile sound audio dsp Linux">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
<!-- pepper -->
|
||||
<BODY>
|
||||
<!-- pepper -->
|
||||
<H1><B>Embedded Sound Files.</B></H1>
|
||||
|
||||
<P>
|
||||
By using the open SNDFILE with a file descriptor function:
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<PRE>
|
||||
SNDFILE* sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;
|
||||
</PRE>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
it is possible to open sound files embedded within larger files.
|
||||
There are however a couple of caveats:
|
||||
<P>
|
||||
<!-- pepper -->
|
||||
<UL>
|
||||
<LI> Read/Write mode (SFM_RDWR) is not supported.
|
||||
<LI> Writing of embedded files is only supported at the end of the file.
|
||||
<LI> Reading of embedded files is only supported at file offsets greater
|
||||
than zero.
|
||||
<LI> Not all file formats are supported (currently only WAV, AIFF and AU).
|
||||
</UL>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
The test program <B>multi_file_test.c</B> in the <B>tests/</B> directory of the
|
||||
source code tarball shows how this functionality is used to read and write
|
||||
embedded files.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,505 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
libsndfile
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<META NAME="Version" CONTENT="libsndfile-1.0.28">
|
||||
<META NAME="Description" CONTENT="The libsndfile Home Page">
|
||||
<META NAME="Keywords" CONTENT="WAV AIFF AU SVX PAF NIST W64 libsndfile sound audio dsp Linux">
|
||||
<META NAME="ROBOTS" CONTENT="NOFOLLOW">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
<!-- pepper -->
|
||||
<CENTER>
|
||||
<IMG SRC="libsndfile.jpg" HEIGHT=98 WIDTH=367 ALT="libsndfile.jpg">
|
||||
</CENTER>
|
||||
<!-- pepper -->
|
||||
<CENTER>
|
||||
<A HREF="#History">History</A> -+-
|
||||
<A HREF="#Features">Features</A> -+-
|
||||
<A HREF="#Similar">Similar or Related Projects</A> -+-
|
||||
<A HREF="NEWS">News</A>
|
||||
<br>
|
||||
<A HREF="development.html">Development</A> -+-
|
||||
<A HREF="api.html">Programming Interface</A> -+-
|
||||
<A HREF="bugs.html">Bug Reporting</A> -+-
|
||||
<A HREF="#Download">Download</A>
|
||||
<br>
|
||||
<A HREF="FAQ.html">FAQ</A> -+-
|
||||
<A HREF="lists.html">Mailing Lists</A> -+-
|
||||
<A HREF="ChangeLog">Change Log</A> -+-
|
||||
<A HREF="#Licensing">Licensing Information</A> -+-
|
||||
<A HREF="#SeeAlso">See Also</A>
|
||||
</CENTER>
|
||||
|
||||
<br><br>
|
||||
<P>
|
||||
Libsndfile is a C library for reading and writing files containing sampled sound
|
||||
(such as MS Windows WAV and the Apple/SGI AIFF format) through one standard
|
||||
library interface. It is released in source code format under the
|
||||
<A HREF="http://www.gnu.org/copyleft/lesser.html">Gnu Lesser General Public License</A>.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
The library was written to compile and run on a Linux system but should compile
|
||||
and run on just about any Unix (including MacOS X).
|
||||
There are also pre-compiled binaries available for 32 and 64 bit windows.
|
||||
</P>
|
||||
<P>
|
||||
It was designed to handle both little-endian (such as WAV) and big-endian
|
||||
(such as AIFF) data, and to compile and run correctly on little-endian (such as Intel
|
||||
and DEC/Compaq Alpha) processor systems as well as big-endian processor systems such
|
||||
as Motorola 68k, Power PC, MIPS and Sparc.
|
||||
Hopefully the design of the library will also make it easy to extend for reading and
|
||||
writing new sound file formats.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
It has been compiled and tested (at one time or another) on the following systems:
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<UL>
|
||||
<LI>Every platform supported by Debian GNU/Linux including x86_64-linux-gnu,
|
||||
i486-linux-gnu, powerpc-linux-gnu, sparc-linux-gnu, alpha-linux-gnu,
|
||||
mips-linux-gnu and armel-linux-gnu.</LI>
|
||||
<LI>powerpc-apple-darwin7.0 (Mac OS X 10.3)</LI>
|
||||
<LI>sparc-sun-solaris2.8 (using gcc)</LI>
|
||||
<LI>mips-sgi-irix5.3 (using gcc)</LI>
|
||||
<LI>QNX 6.0</LI>
|
||||
<LI>i386-unknown-openbsd2.9</LI>
|
||||
</UL>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
At the moment, each new release is being tested on i386 Linux, x86_64 Linux,
|
||||
PowerPC Linux, Win32 and Win64.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
|
||||
<A NAME="Capabilities"></A>
|
||||
<A NAME="Features"></A>
|
||||
<H1><B>Features</B></H1>
|
||||
<P>
|
||||
libsndfile has the following main features :
|
||||
</P>
|
||||
<UL>
|
||||
<lI> Ability to read and write a large number of file formats.
|
||||
<LI> A simple, elegant and easy to use Applications Programming Interface.
|
||||
<LI> Usable on Unix, Win32, MacOS and others.
|
||||
<LI> On the fly format conversion, including endian-ness swapping, type conversion
|
||||
and bitwidth scaling.
|
||||
<LI> Optional normalisation when reading floating point data from files containing
|
||||
integer data.
|
||||
<LI> Ability to open files in read/write mode.
|
||||
<LI> The ability to write the file header without closing the file (only on files
|
||||
open for write or read/write).
|
||||
<LI> Ability to query the library about all supported formats and retrieve text
|
||||
strings describing each format.
|
||||
</UL>
|
||||
<P>
|
||||
libsndfile has a comprehensive test suite so that each release is as bug free
|
||||
as possible.
|
||||
When new bugs are found, new tests are added to the test suite to ensure that
|
||||
these bugs don't creep back into the code.
|
||||
When new features are added, tests are added to the test suite to make sure that
|
||||
these features continue to work correctly even when they are old features.
|
||||
</P>
|
||||
<P>
|
||||
The following table lists the file formats and encodings that libsndfile can read
|
||||
and write.
|
||||
The file formats are arranged across the top and encodings along the left
|
||||
edge.
|
||||
</P>
|
||||
<br>
|
||||
|
||||
<TABLE BORDER="1" cellpadding="2">
|
||||
<TR><TD> </TD>
|
||||
<TD ALIGN="center">Micro- soft<br>WAV</TD>
|
||||
<TD ALIGN="center">SGI / Apple<br>AIFF / AIFC</TD>
|
||||
<TD ALIGN="center">Sun / DEC /<br>NeXT<br>AU / SND</TD>
|
||||
<TD ALIGN="center">Header- less<br>RAW</TD>
|
||||
<TD ALIGN="center">Paris Audio<br>File<br>PAF</TD>
|
||||
<TD ALIGN="center">Commo- dore<br>Amiga<br>IFF / SVX</TD>
|
||||
<TD ALIGN="center">Sphere<br>Nist<br>WAV</TD>
|
||||
<TD ALIGN="center">IRCAM<br>SF</TD>
|
||||
<TD ALIGN="center">Creative<br>VOC</TD>
|
||||
<TD ALIGN="center">Sound forge<br>W64</TD>
|
||||
<TD ALIGN="center"><A HREF="octave.html">GNU Octave 2.0</A><br>MAT4</TD>
|
||||
<TD ALIGN="center"><A HREF="octave.html">GNU Octave 2.1</A><br>MAT5</TD>
|
||||
<TD ALIGN="center">Portable Voice Format<br>PVF</TD>
|
||||
<TD ALIGN="center">Fasttracker 2<br>XI</TD>
|
||||
<TD ALIGN="center">HMM Tool Kit<br>HTK</TD>
|
||||
<TD ALIGN="center">Apple<br>CAF</TD>
|
||||
<TD ALIGN="center">Sound<br>Designer II<br>SD2</TD>
|
||||
<TD ALIGN="center">Free Lossless Audio Codec<br>FLAC</TD>
|
||||
</TR>
|
||||
<TR><TD>Unsigned 8 bit PCM</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>Signed 8 bit PCM</TD>
|
||||
<TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD>
|
||||
<TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>Signed 16 bit PCM</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>Signed 24 bit PCM</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>Signed 32 bit PCM</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD> </TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>32 bit float</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>64 bit double</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>u-law encoding</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
<TR><TD>A-law encoding</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>IMA ADPCM</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>MS ADPCM</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>GSM 6.10</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>G721 ADPCM 32kbps</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>G723 ADPCM 24kbps</TD>
|
||||
<TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>G723 ADPCM 40kbps</TD>
|
||||
<TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>12 bit DWVW</TD>
|
||||
<TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>16 bit DWVW</TD>
|
||||
<TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
|
||||
<TR><TD>24 bit DWVW</TD>
|
||||
<TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
<TR><TD>Ok Dialogic ADPCM</TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
<TR><TD>8 bit DPCM</TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
<TR><TD>16 bit DPCM</TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<p>
|
||||
From version 1.0.18, libsndfile also reads and writes
|
||||
<a href="http://flac.sourceforge.net/">FLAC</a>
|
||||
and
|
||||
<a href="http://www.vorbis.com/">Ogg/Vorbis</a>.
|
||||
</p>
|
||||
|
||||
<!-- pepper -->
|
||||
|
||||
<P>
|
||||
Some of the file formats I am also interested in adding are:
|
||||
</P>
|
||||
<UL>
|
||||
<LI> Kurzweil K2000 sampler files.
|
||||
<LI> Ogg Speex.
|
||||
</UL>
|
||||
<P>
|
||||
I have decided that I will not be adding support for MPEG Layer 3 (commonly
|
||||
known as MP3) due to the patent issues surrounding this file format.
|
||||
See
|
||||
<a href="FAQ.html#Q020">
|
||||
the FAQ</a>
|
||||
for more.
|
||||
</P>
|
||||
<P>
|
||||
Other file formats may also be added on request.
|
||||
</P>
|
||||
|
||||
<!-- pepper -->
|
||||
|
||||
<A NAME="History"></A>
|
||||
<H1><B>History</B></H1>
|
||||
<P>
|
||||
My first attempt at reading and writing WAV files was in 1990 or so under Windows
|
||||
3.1.
|
||||
I started using Linux in early 1995 and contributed some code to the
|
||||
<A HREF="http://www.vaxxine.com/ve3wwg/gnuwave.html">wavplay</A>
|
||||
program.
|
||||
That contributed code would eventually mutate into this library.
|
||||
As one of my interests is Digital Signal Processing (DSP) I decided that as well as
|
||||
reading data from an audio file in the native format (typically 16 bit short integers)
|
||||
it would also be useful to be able to have the library do the conversion to floating
|
||||
point numbers for DSP applications.
|
||||
It then dawned on me that whatever file format (anything from 8 bit unsigned chars,
|
||||
to 32 bit floating point numbers) the library should be able to convert the data to
|
||||
whatever format the library user wishes to use it in.
|
||||
For example, in a sound playback program, the library caller typically wants the sound
|
||||
data in 16 bit short integers to dump into a sound card even though the data in the
|
||||
file may be 32 bit floating point numbers (ie Microsoft's WAVE_FORMAT_IEEE_FLOAT
|
||||
format).
|
||||
Another example would be someone doing speech recognition research who has recorded
|
||||
some speech as a 16 bit WAV file but wants to process it as double precision floating
|
||||
point numbers.
|
||||
</P>
|
||||
<P>
|
||||
Here is the release history for libsndfile :
|
||||
</P>
|
||||
<UL>
|
||||
<LI>Version 0.0.8 (Feb 15 1999) First official release.
|
||||
<LI>Version 0.0.28 (Apr 26 2002) Final release of version 0 of libsndfile.
|
||||
<LI>Version 1.0.0rc1 (Jun 24 2002) Release candidate 1 of version 1 of libsndfile.
|
||||
<LI>Version 1.0.0rc6 (Aug 14 2002) MacOS 9 fixes.
|
||||
<LI>Version 1.0.0 (Aug 16 2002) First 1.0.X release.
|
||||
<LI>Version 1.0.1 (Sep 14 2002) Added MAT4 and MAT5 file formats.
|
||||
<LI>Version 1.0.2 (Nov 24 2002) Added VOX ADPCM format.
|
||||
<LI>Version 1.0.3 (Dec 09 2002) Fixes for Linux on ia64 CPUs.
|
||||
<LI>Version 1.0.4 (Feb 02 2003) New file formats and functionality.
|
||||
<LI>Version 1.0.5 (May 03 2003) One new file format and new functionality.
|
||||
<LI>Version 1.0.6 (Feb 08 2004) Large file fix for Linux/Solaris, new functionality
|
||||
and Win32 improvements.
|
||||
<LI>Version 1.0.7 (Feb 24 2004) Fix build problems on MacOS X and fix ia64/MIPS etc
|
||||
clip mode detction.
|
||||
<LI>Version 1.0.8 (Mar 14 2004) Minor bug fixes.
|
||||
<LI>Version 1.0.9 (Mar 30 2004) Add AVR format. Improve handling of some WAV files.
|
||||
<LI>Version 1.0.10 (Jun 15 2004) Minor bug fixes. Fix support for Win32 MinGW compiler.
|
||||
<LI>Version 1.0.11 (Nov 15 2004) Add SD2 file support, reading of loop data in WAV and AIFF.
|
||||
Minor bug fixes.
|
||||
<LI>Version 1.0.12 (Sep 30 2005) Add FLAC and CAF file support, virtual I/O interface.
|
||||
Minor bug fixes and cleanups.
|
||||
<LI>Version 1.0.13 (Jan 21 2006) Add read/write of instrument chunks. Minor bug fixes.
|
||||
<LI>Version 1.0.14 (Feb 19 2006) Minor bug fixes. Start shipping windows binary/source ZIP.
|
||||
<LI>Version 1.0.15 (Mar 16 2006) Minor bug fixes.
|
||||
<LI>Version 1.0.16 (Apr 30 2006) Add support for RIFX. Other minor feature enhancements and
|
||||
bug fixes.
|
||||
<LI>Version 1.0.17 (Aug 31 2006) Add C++ wrapper sndfile.hh. Minor bug fixes and cleanups.
|
||||
<LI>Version 1.0.18 (Feb 07 2009) Add Ogg/Vorbis suppport, remove captive libraries, many
|
||||
new features and bug fixes. Generate Win32 and Win64 pre-compiled binaries.
|
||||
<LI>Version 1.0.19 (Mar 02 2009) Fix for CVE-2009-0186. Huge number of minor fixes as a
|
||||
result of static analysis.
|
||||
<LI>Version 1.0.20 (May 14 2009) Fix for potential heap overflow.
|
||||
<LI>Version 1.0.21 (December 13 2009) Bunch of minor bug fixes.
|
||||
<LI>Version 1.0.22 (October 04 2010) Bunch of minor bug fixes.
|
||||
<LI>Version 1.0.23 (October 10 2010) Minor bug fixes.
|
||||
<LI>Version 1.0.24 (March 23 2011) Minor bug fixes.
|
||||
<LI>Version 1.0.25 (July 13 2011) Fix for Secunia Advisory SA45125. Minor bug fixes and
|
||||
improvements.
|
||||
<LI>Version 1.0.26 (November 22 2015) Fix for CVE-2014-9496, CVE-2014-9756 and CVE-2015-7805.
|
||||
Add ALAC/CAF support. Minor bug fixes and improvements.
|
||||
<LI>Version 1.0.27 (June 19 2016) Fix a seek regression in 1.0.26. Add metadata read/write
|
||||
for CAF and RF64. FIx PAF endian-ness issue.
|
||||
<LI>Version 1.0.28 (April 2 2017) Fix buffer overruns in FLAC and ID3 handling code. Reduce default
|
||||
header memory requirements. Fix detection of Large File Support for 32 bit systems.
|
||||
</UL>
|
||||
|
||||
<A NAME="Similar"></A>
|
||||
<H1><B>Similar or Related Projects</B></H1>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="http://sox.sourceforge.net/">SoX</A> is a program for
|
||||
converting between sound file formats.
|
||||
<LI><A HREF="http://www.hitsquad.com/smm/programs/WavPlay/">Wavplay</A> started out
|
||||
as a minimal WAV file player under Linux and has mutated into Gnuwave, a client/server
|
||||
application for more general multimedia and games sound playback.
|
||||
<LI><A HREF="http://www.68k.org/~michael/audiofile/">Audiofile</A> (libaudiofile) is
|
||||
a library similar to libsndfile but with a different programming interface. The
|
||||
author Michael Pruett has set out to clone (and fix some bugs in) the libaudiofile
|
||||
library which ships with SGI's IRIX OS.
|
||||
<LI><A HREF="ftp://ccrma-ftp.stanford.edu/pub/Lisp/sndlib.tar.gz">sndlib.tar.gz</A> is
|
||||
another library written by Bill Schottstaedt of CCRMA.
|
||||
</UL>
|
||||
|
||||
<A NAME="Licensing"></A>
|
||||
<H1><B>Licensing</B></H1>
|
||||
<P>
|
||||
libsndfile is released under the terms of the GNU Lesser General Public License,
|
||||
of which there are two versions;
|
||||
<a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">version 2.1</a>
|
||||
and
|
||||
<a href="http://www.gnu.org/copyleft/lesser.html">version 3</a>.
|
||||
To maximise the compatibility of libsndfile, the user may choose to use libsndfile
|
||||
under either of the above two licenses.
|
||||
You can also read a simple explanation of the ideas behind the GPL and the LGPL
|
||||
<A HREF="http://www.gnu.org/copyleft/copyleft.html">here</A>.
|
||||
</P>
|
||||
<P>
|
||||
You can use libsndfile with
|
||||
<A HREF="http://www.gnu.org/">Free Software</A>,
|
||||
<A HREF="http://www.opensource.org/">Open Source</A>,
|
||||
proprietary, shareware or other closed source applications as long as libsndfile
|
||||
is used as a dynamically loaded library and you abide by a small number of other
|
||||
conditions (read the LGPL for more info).
|
||||
With applications released under the GNU GPL you can also use libsndfile statically
|
||||
linked to your application.
|
||||
</P>
|
||||
<P>
|
||||
I would like to see libsndfile used as widely as possible but I would prefer it
|
||||
if you released software that uses libsndfile as
|
||||
<A HREF="http://www.gnu.org/">Free Software</A>
|
||||
or
|
||||
<A HREF="http://www.opensource.org/">Open Source</A>.
|
||||
However, if you put in a great deal of effort building a significant application
|
||||
which simply uses libsndfile for file I/O, then I have no problem with you releasing
|
||||
that as closed source and charging as much money as you want for it as long as you
|
||||
abide by <A HREF="http://www.gnu.org/copyleft/lesser.html">the license</A>.
|
||||
</P>
|
||||
|
||||
<A NAME="Download"></A>
|
||||
<H1><B>Download</B></H1>
|
||||
<P>
|
||||
Here is the latest version. It is available in the following formats:
|
||||
</P>
|
||||
<UL>
|
||||
<LI>Source code as a .tar.gz :
|
||||
<A HREF="files/libsndfile-1.0.28.tar.gz">libsndfile-1.0.28.tar.gz</A>
|
||||
and
|
||||
<A HREF="files/libsndfile-1.0.28.tar.gz.asc">GPG signature</A>.
|
||||
<LI>Win32 installer:
|
||||
<A HREF="files/libsndfile-1.0.28-w32-setup.exe">
|
||||
libsndfile-1.0.28-w32-setup.exe</A> (thoroughly tested under
|
||||
<a href="http://www.winehq.com/">Wine</a>)
|
||||
and
|
||||
<A HREF="files/libsndfile-1.0.28-w32-setup.exe.asc">GPG signature</A>.
|
||||
<LI>Win64 installer:
|
||||
<A HREF="files/libsndfile-1.0.28-w64-setup.exe">
|
||||
libsndfile-1.0.28-w64-setup.exe</A> (thoroughly tested under
|
||||
<a href="http://www.winehq.com/">Wine</a>)
|
||||
and
|
||||
<A HREF="files/libsndfile-1.0.28-w64-setup.exe.asc">GPG signature</A>.
|
||||
</UL>
|
||||
<P>
|
||||
The GPG signature can be validated at
|
||||
<A HREF="https://keybase.io/erikd/">Keybase.IO</A>.
|
||||
</P>
|
||||
<P>
|
||||
The Win32 installer should work on Windows Vista or later.
|
||||
</p>
|
||||
|
||||
<P>
|
||||
Pre-release versions of libsndfile are available
|
||||
<A HREF="http://www.mega-nerd.com/tmp/">here</A>
|
||||
and are announced on the
|
||||
<A HREF="lists.html">libsndfile-devel</A>
|
||||
mailing list.
|
||||
</P>
|
||||
|
||||
<A NAME="SeeAlso"></A>
|
||||
<H1><B>See Also</B></H1>
|
||||
<UL>
|
||||
<LI><a href="http://www.mega-nerd.com/libsndfile/tools/">
|
||||
sndfile-tools</a>
|
||||
: a small collection of programs which use libsndfile.
|
||||
</UL>
|
||||
|
||||
<br><br>
|
||||
|
||||
<hr>
|
||||
|
||||
<P>
|
||||
The latest version of this document can be found
|
||||
<A HREF="http://www.mega-nerd.com/libsndfile/">here</A>.
|
||||
</P>
|
||||
<P>
|
||||
Author :
|
||||
<A HREF="mailto:erikd@mega-nerd.com">
|
||||
Erik de Castro Lopo</a>
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
This page has been accessed
|
||||
<IMG SRC=
|
||||
"/cgi-bin/Count.cgi?ft=6|frgb=55;55;55|tr=0|trgb=0;0;0|wxh=15;20|md=7|dd=B|st=1|sh=1|df=libsndfile.dat"
|
||||
HEIGHT=30 WIDTH=100 ALT="counter.gif">
|
||||
times.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
|
||||
<br><br>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,92 @@
|
|||
body {
|
||||
background : black ;
|
||||
color : white ;
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
line-height: 1.5 ;
|
||||
}
|
||||
td {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
background : black ;
|
||||
color : white ;
|
||||
}
|
||||
center {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
}
|
||||
p {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
.indent_block {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
text-align : left ;
|
||||
margin-left : 10% ;
|
||||
margin-right : 10% ;
|
||||
}
|
||||
br {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
}
|
||||
form {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
}
|
||||
ul {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 6% ;
|
||||
}
|
||||
ol {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 6% ;
|
||||
}
|
||||
dl {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
h1 {
|
||||
font-size : xx-large ;
|
||||
background : black ;
|
||||
color : #5050FF ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
h2 {
|
||||
font-size : x-large ;
|
||||
background : black ;
|
||||
color : #5050FF ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
h3 {
|
||||
font-size : large ;
|
||||
background : black ;
|
||||
color : #5050FF ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
h4 {
|
||||
font-size : medium ;
|
||||
background : black ;
|
||||
color : #5050FF ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
pre {
|
||||
font-family : courier, monospace ;
|
||||
font-size : medium ;
|
||||
margin-left : 6% ;
|
||||
margin-right : 6% ;
|
||||
}
|
||||
a:link { color : #9090FF ; }
|
||||
a:visited { color : #5050FF ; }
|
||||
a:active { color : #FF00FF ; }
|
||||
a:hover { background-color : #202080 ; }
|
|
@ -0,0 +1,92 @@
|
|||
body {
|
||||
background : @HTML_BGCOLOUR@ ;
|
||||
color : @HTML_FGCOLOUR@ ;
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
line-height: 1.5 ;
|
||||
}
|
||||
td {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
background : @HTML_BGCOLOUR@ ;
|
||||
color : @HTML_FGCOLOUR@ ;
|
||||
}
|
||||
center {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
}
|
||||
p {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
.indent_block {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
text-align : left ;
|
||||
margin-left : 10% ;
|
||||
margin-right : 10% ;
|
||||
}
|
||||
br {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
}
|
||||
form {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
}
|
||||
ul {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 6% ;
|
||||
}
|
||||
ol {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 6% ;
|
||||
}
|
||||
dl {
|
||||
font-family : arial, helvetica, sans-serif ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
h1 {
|
||||
font-size : xx-large ;
|
||||
background : @HTML_BGCOLOUR@ ;
|
||||
color : #5050FF ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
h2 {
|
||||
font-size : x-large ;
|
||||
background : @HTML_BGCOLOUR@ ;
|
||||
color : #5050FF ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
h3 {
|
||||
font-size : large ;
|
||||
background : @HTML_BGCOLOUR@ ;
|
||||
color : #5050FF ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
h4 {
|
||||
font-size : medium ;
|
||||
background : @HTML_BGCOLOUR@ ;
|
||||
color : #5050FF ;
|
||||
text-align : left ;
|
||||
margin-left : 3% ;
|
||||
margin-right : 3% ;
|
||||
}
|
||||
pre {
|
||||
font-family : courier, monospace ;
|
||||
font-size : medium ;
|
||||
margin-left : 6% ;
|
||||
margin-right : 6% ;
|
||||
}
|
||||
a:link { color : #9090FF ; }
|
||||
a:visited { color : #5050FF ; }
|
||||
a:active { color : #FF00FF ; }
|
||||
a:hover { background-color : #202080 ; }
|
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
libsndfile Mailing Lists
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
<!-- pepper -->
|
||||
<H1><BR>libsndfile Mailing Lists</H1>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
There are three mailing lists for libsndfile:
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<UL>
|
||||
<LI> <B>libsndfile-announce@mega-nerd.com</B> <!-- pepper -->
|
||||
<A HREF="mailto:libsndfile-announce-request@mega-nerd.com?subject=subscribe">Subscribe</A>
|
||||
<BR>
|
||||
A list which will announce each new release of libsndfile.
|
||||
Noone can post to this list except the author.
|
||||
<BR><BR>
|
||||
|
||||
<LI> <B>libsndfile-devel@mega-nerd.com</B> <!-- pepper -->
|
||||
<A HREF="mailto:libsndfile-devel-request@mega-nerd.com?subject=subscribe">Subscribe</A>
|
||||
<BR>
|
||||
A list for discussing bugs, porting issues and feature requests.
|
||||
Posting is restricted to subscribers.
|
||||
<BR><BR>
|
||||
|
||||
<LI> <B>libsndfile-users@mega-nerd.com</B> <!-- pepper -->
|
||||
<A HREF="mailto:libsndfile-users-request@mega-nerd.com?subject=subscribe">Subscribe</A>
|
||||
<BR>
|
||||
A list for discussing the use of libsndfile in other programs.
|
||||
Posting is restricted to subscribers.
|
||||
<!-- pepper -->
|
||||
<BR><BR>
|
||||
</UL>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
The libsndfile-devel and libsndfile-users list will automatically receive a
|
||||
copy of all emails to the libsndfile-announce list.
|
||||
</P>
|
||||
<BR>
|
||||
<!-- pepper -->
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,135 @@
|
|||
new_file_type.HOWTO
|
||||
===================
|
||||
|
||||
Original : Wed May 23 19:05:07 EST 2001
|
||||
Update 1 : Fri Jul 11 22:12:38 EST 2003
|
||||
|
||||
This document will attempt to explain as fully as possible how to add code to
|
||||
libsndfile to allow the reading and writing of new file types. By new file
|
||||
type I particularly mean a new header type rather than a new encoding method
|
||||
for an existing file type.
|
||||
|
||||
This HOWTO will take the form of a step by step guide. It will assume that you
|
||||
have all required tools including :
|
||||
|
||||
- gcc
|
||||
- make (should really be the GNU version)
|
||||
- autoconf
|
||||
- automake
|
||||
- libtool
|
||||
|
||||
These should all be available on the GNU ftp site: ftp://ftp.gnu.org/pub/gnu/.
|
||||
|
||||
To help make these steps clearer let's suppose we are adding support for the
|
||||
Whacky file format whose files contain 'W','A','C' and 'K' as the first four
|
||||
bytes of the file format. Lets also assume that Whacky files contain PCM encoded
|
||||
data.
|
||||
|
||||
Step 1
|
||||
------
|
||||
Create a new .c file in the src/ directory of the libsndfile source tree. The
|
||||
file name should be reasonable descriptive so that is is obvious that files of
|
||||
the new type are handled by this file. In this particular case the file might
|
||||
be named 'whacky.c'.
|
||||
|
||||
Step 2
|
||||
------
|
||||
Add your new source code file to the build process.
|
||||
|
||||
Edit the file src/Makefile.am and add the name of your file handler to the
|
||||
FILESPECIFIC list of handlers. This list looks something like this:
|
||||
|
||||
FILESPECIFIC = aiff.c au.c au_g72x.c nist.c paf.c raw.c samplitude.c \
|
||||
svx.c wav.c wav_float.c wav_gsm610.c wav_ima_adpcm.c \
|
||||
wav_ms_adpcm.c
|
||||
|
||||
Then, run the script named 'reconf' in the libsndfile top level directory,
|
||||
which will run autoconf and other associated tools. Finally run "./configure"
|
||||
in the top level directory. You may want to use the "--disable-gcc-opt" option
|
||||
to disable gcc optimisations and make debugging with gdb/ddd easier.
|
||||
|
||||
Step 3
|
||||
------
|
||||
Add a unique identifier for the new file type.
|
||||
|
||||
Edit src/sndfile.h.in and find the enum containing the SF_FORMAT_XXX identifiers.
|
||||
Since you will be adding a major file type you should add your identifier to the
|
||||
top part of the list where the values are above 0x10000 in value. The easiest
|
||||
way to do this is to find the largest value in the list, add 0x10000 to it and
|
||||
make that your new identifier value. The identifier should be something like
|
||||
SF_FORMAT_WACK.
|
||||
|
||||
Step 4
|
||||
------
|
||||
Add code to the file type recogniser function.
|
||||
|
||||
Edit src/sndfile.c and find the function guess_file_type (). This function
|
||||
reads the first 3 ints of the file and from that makes a guess at the file
|
||||
type. In our case we would add:
|
||||
|
||||
|
||||
if (buffer [0] == MAKE_MARKER ('W','A','C','K'))
|
||||
return SF_FORMAT_WACK ;
|
||||
|
||||
The use of the MAKE_MARKER macro should be pretty obvious and it is defined at the
|
||||
top of file should you need to have a look at it.
|
||||
|
||||
Step 5
|
||||
------
|
||||
Add a call to your open function from psf_open_file ().
|
||||
|
||||
Edit src/sndfile.c and find the switch statement in psf_open_file (). It starts
|
||||
like this:
|
||||
|
||||
switch (filetype)
|
||||
{ case SF_FORMAT_WAV :
|
||||
error = wav_open (psf) ;
|
||||
break ;
|
||||
|
||||
case SF_FORMAT_AIFF :
|
||||
error = aiff_open (psf) ;
|
||||
break ;
|
||||
|
||||
Towards the bottom of this switch statement your should add one for the new file
|
||||
type. Something like:
|
||||
|
||||
case SF_FORMAT_WACK :
|
||||
sf_errno = whacky_open (psf) ;
|
||||
break ;
|
||||
|
||||
Setp 6
|
||||
------
|
||||
Add prototypes for new open read and open write functions.
|
||||
|
||||
Edit src/common.h, go to the bottom of the file and add something like
|
||||
|
||||
int whacky_open (SF_PRIVATE *psf) ;
|
||||
|
||||
Step 7
|
||||
------
|
||||
|
||||
Implement your open read function. The best way to do this is by coding
|
||||
something much like one of the other file formats. The file src/au.c might be
|
||||
a good place to start.
|
||||
|
||||
In src/whacky.c you should now implement the function whacky_open() which
|
||||
was prototyped in src/common.h. This function should return 0 on success and
|
||||
a non-zero number on error.
|
||||
|
||||
Error values are defined in src/common.h in a enum which starts at SFE_NO_ERROR.
|
||||
When adding a new error value, you also need to add an error string to the
|
||||
SndfileErrors array in src/sndfile.c.
|
||||
|
||||
To parse the header of your new file type you should avoid using standard read/
|
||||
write/seek functions (and the fread/fwrite/fseek etc) and instead use
|
||||
psf_binheader_readf () which is implemented and documented in src/common.h.
|
||||
|
||||
During the parsing process, you should also print logging information to
|
||||
libsndfile's internal log buffer using the psf_log_printf() function.
|
||||
|
||||
At the end of the open read process, you should have set a number of fields in the
|
||||
SF_PRIVATE structure pointed to by psf.
|
||||
|
||||
|
||||
|
||||
*** THIS FILE IS INCOMPLETE ***
|
|
@ -0,0 +1,118 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
libsndfile and GNU Octave
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<BR>
|
||||
<H1><B>libsndfile and GNU Octave</B></H1>
|
||||
<P>
|
||||
<A HREF="http://www.octave.org/">GNU Octave</A> is a high-level interactive
|
||||
language for numerical computations.
|
||||
There are currently two development streams, a stable 2.0.X series and a
|
||||
development 2.1.X series.
|
||||
Octave reads and writes data in binary formats that were originally developed
|
||||
for
|
||||
<A HREF="http://www.mathworks.com/">MATLAB</A>.
|
||||
Version 2.0.X of Octave uses binary data files compatible with MATLAB
|
||||
version 4.2 while Octave 2.1.X uses binary data files compatible
|
||||
with MATLAB version 5.0 as well as being able to read the older MATLAB 4.2
|
||||
format.
|
||||
</P>
|
||||
<P>
|
||||
From version 1.0.1 of libsndfile onwards, libsndfile has the ability of reading
|
||||
and writing a small subset of the binary data files used by both versions
|
||||
of GNU Octave.
|
||||
This gives people using GNU Octave for audio based work an easy method of
|
||||
moving audio data between GNU Octave and other programs which use libsndfile.
|
||||
</P>
|
||||
<P>
|
||||
For instance it is now possible to do the following:
|
||||
</P>
|
||||
|
||||
<UL>
|
||||
<LI> Load a WAV file into a sound file editor such as
|
||||
<A HREF="http://www.metadecks.org/software/sweep/">Sweep</A>.
|
||||
<LI> Save it as a MAT4 file.
|
||||
<LI> Load the data into Octave for manipulation.
|
||||
<LI> Save the modified data.
|
||||
<LI> Reload it in Sweep.
|
||||
</UL>
|
||||
<P>
|
||||
Another example would be using the MAT4 or MAT5 file formats as a format which
|
||||
can be easily loaded into Octave for viewing/analyzing as well as a format
|
||||
which can be played with command line players such as the one included with
|
||||
libsndfile.
|
||||
</P>
|
||||
|
||||
<H2><B>Details</B></H2>
|
||||
<P>
|
||||
Octave, like most programming languages, uses variables to store data, and
|
||||
Octave variables can contain both arrays and matrices.
|
||||
It is also able to store one or more of these variables in a file.
|
||||
When reading Octave files, libsndfile expects a file to contain two
|
||||
variables and their associated data.
|
||||
The first variable should contain a variable holding the file sample rate
|
||||
while the second variable contains the audio data.
|
||||
</P>
|
||||
<P>
|
||||
For example, to generate a sine wave and store it as a binary file which
|
||||
is compatible with libsndfile, do the following:
|
||||
</P>
|
||||
<PRE>
|
||||
octave:1 > samplerate = 44100 ;
|
||||
octave:2 > wavedata = sin ((0:1023)*2*pi/1024) ;
|
||||
octave:3 > save sine.mat samplerate wavedata
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The process of reading and writing files compatible with libsndfile can be
|
||||
made easier by use of two Octave script files :
|
||||
</P>
|
||||
<PRE>
|
||||
octave:4 > [data fs] = sndfile_load ("sine.mat") ;
|
||||
octave:5 > sndfile_save ("sine2.mat", data, fs) ;
|
||||
</PRE>
|
||||
<P>
|
||||
In addition, libsndfile contains a command line program which which is able
|
||||
to play the correct types of Octave files.
|
||||
Using this command line player <B>sndfile-play</B> and a third Octave script
|
||||
file allows Octave data to be played from within Octave on any of the platforms
|
||||
which <B>sndfile-play</B> supports (at the moment: Linux, MacOS X, Solaris and
|
||||
Win32).
|
||||
</P>
|
||||
<PRE>
|
||||
octave:6 > sndfile_play (data, fs) ;
|
||||
</PRE>
|
||||
<P>
|
||||
These three Octave scripts are installed automatically in Octave's site
|
||||
script directory when libsndfile is installed (except on Win32) ie when
|
||||
libsndfile is being installed into /usr/local, the Octave scripts will
|
||||
be installed in /usr/local/share/octave/site/m/.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
There are some other Octave scripts for audio to be found
|
||||
<A HREF="http://octave.sourceforge.net/audio/index.html">here</A>.
|
||||
</P>
|
||||
|
||||
<BR>
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
<HR>
|
||||
<P>
|
||||
The libsndfile home page is here :
|
||||
<A HREF="http://www.mega-nerd.com/libsndfile/">
|
||||
http://www.mega-nerd.com/libsndfile/</A>.
|
||||
</P>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
sndfile-info
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<P>
|
||||
Here is an example of the output from the <B>sndfile-info</B> program distributed with
|
||||
libsndfile.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
This file was opened and parsed correctly but had been truncated so that the values
|
||||
in the <B>FORM</B> and <B>SSND</B> chunks were incorrect.
|
||||
</P>
|
||||
<PRE>
|
||||
<B>erikd@hendrix ></B> examples/sndfile-info truncated.aiff
|
||||
truncated.aiff
|
||||
size : 200000
|
||||
FORM : 307474 (should be 199992)
|
||||
AIFF
|
||||
COMM : 18
|
||||
Sample Rate : 16000
|
||||
Samples : 76857
|
||||
Channels : 2
|
||||
Sample Size : 16
|
||||
SSND : 307436 (should be 199946)
|
||||
Offset : 0
|
||||
Block Size : 0
|
||||
|
||||
--------------------------------
|
||||
Sample Rate : 16000
|
||||
Frames : 76857
|
||||
Channels : 2
|
||||
Bit Width : 16
|
||||
Format : 0x00020001
|
||||
Sections : 1
|
||||
Seekable : TRUE
|
||||
Signal Max : 32766
|
||||
|
||||
</PRE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
libsndfile Tutorial
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
<!-- pepper -->
|
||||
<H1><BR>libsndfile Tutorial</H1>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
<b>More coming soon.</b>
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
For now, the best place to look for example code is the <tt>examples/</tt>
|
||||
directory of the source code distribution and the libsndfile test suite which
|
||||
is located in the <tt>tests/</tt> directory of the source code distribution.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Building libsndfile on Win32
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
<!-- pepper -->
|
||||
<H1><BR>Building libsndfile on Win32</H1>
|
||||
|
||||
<P><B>
|
||||
Note : For pre-compiled binaries for windows, both for win32 and win64, see the
|
||||
main web page.
|
||||
</B></P>
|
||||
|
||||
<P>
|
||||
There is currently only one way of building libsndfile for Win32 and Win64;
|
||||
cross compiling from Linux using the MinGW cross compiler.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
libsndfile is written to be compiled by a compiler which supports large
|
||||
chunks of the 1999 ISO C Standard.
|
||||
Unfortunately, the microsoft compiler supports close to nothing of this
|
||||
standard and hence is not suitable for libsndfile.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
It <b>may</b> be possible to compile libsndfile on windows using the
|
||||
<a href="http://www.mingw.org/">MinGW</a>
|
||||
compiler suite, but I haven't tested that and have no interest in supporting
|
||||
that.
|
||||
</P>
|
||||
|
||||
<!--===========================================================================-->
|
||||
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<BR>
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
# @configure_input@
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
bindir=@bindir@
|
||||
pkgconfigdir=@pkgconfigdir@
|
||||
datadir=@datadir@
|
||||
datarootdir=@datarootdir@
|
||||
docdir=@docdir@
|
||||
htmldir=@htmldir@
|
||||
|
||||
echo "
|
||||
Installation directories :
|
||||
|
||||
Library directory : ................... $libdir
|
||||
Program directory : ................... $bindir
|
||||
Pkgconfig directory : ................. $pkgconfigdir
|
||||
HTML docs directory : ................. $htmldir
|
||||
"
|
||||
echo "Compiling some other packages against libsndfile may require"
|
||||
echo "the addition of '$pkgconfigdir' to the"
|
||||
echo "PKG_CONFIG_PATH environment variable."
|
||||
echo
|
|
@ -0,0 +1,29 @@
|
|||
## 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
|
|
@ -0,0 +1,767 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
check_PROGRAMS = make_sine$(EXEEXT) sfprocess$(EXEEXT) \
|
||||
list_formats$(EXEEXT) generate$(EXEEXT) sndfilehandle$(EXEEXT) \
|
||||
sndfile-to-text$(EXEEXT) sndfile-loopify$(EXEEXT)
|
||||
subdir = examples
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/M4/add_cflags.m4 \
|
||||
$(top_srcdir)/M4/add_cxxflags.m4 \
|
||||
$(top_srcdir)/M4/ax_add_fortify_source.m4 \
|
||||
$(top_srcdir)/M4/clang.m4 $(top_srcdir)/M4/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/gcc_version.m4 $(top_srcdir)/M4/libtool.m4 \
|
||||
$(top_srcdir)/M4/lrint.m4 $(top_srcdir)/M4/lrintf.m4 \
|
||||
$(top_srcdir)/M4/ltoptions.m4 $(top_srcdir)/M4/ltsugar.m4 \
|
||||
$(top_srcdir)/M4/ltversion.m4 $(top_srcdir)/M4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/M4/mkoctfile_version.m4 \
|
||||
$(top_srcdir)/M4/octave.m4 $(top_srcdir)/M4/really_gcc.m4 \
|
||||
$(top_srcdir)/M4/stack_protect.m4 \
|
||||
$(top_srcdir)/M4/visibility.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am_generate_OBJECTS = generate.$(OBJEXT)
|
||||
generate_OBJECTS = $(am_generate_OBJECTS)
|
||||
generate_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
am_list_formats_OBJECTS = list_formats.$(OBJEXT)
|
||||
list_formats_OBJECTS = $(am_list_formats_OBJECTS)
|
||||
list_formats_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
|
||||
am_make_sine_OBJECTS = make_sine.$(OBJEXT)
|
||||
make_sine_OBJECTS = $(am_make_sine_OBJECTS)
|
||||
make_sine_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
|
||||
am_sfprocess_OBJECTS = sfprocess.$(OBJEXT)
|
||||
sfprocess_OBJECTS = $(am_sfprocess_OBJECTS)
|
||||
sfprocess_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
|
||||
am_sndfile_loopify_OBJECTS = sndfile-loopify.$(OBJEXT)
|
||||
sndfile_loopify_OBJECTS = $(am_sndfile_loopify_OBJECTS)
|
||||
sndfile_loopify_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
|
||||
am_sndfile_to_text_OBJECTS = sndfile-to-text.$(OBJEXT)
|
||||
sndfile_to_text_OBJECTS = $(am_sndfile_to_text_OBJECTS)
|
||||
sndfile_to_text_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
|
||||
am_sndfilehandle_OBJECTS = sndfilehandle.$(OBJEXT)
|
||||
sndfilehandle_OBJECTS = $(am_sndfilehandle_OBJECTS)
|
||||
sndfilehandle_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
|
||||
depcomp = $(SHELL) $(top_srcdir)/Cfg/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_CXX = $(am__v_CXX_@AM_V@)
|
||||
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
|
||||
am__v_CXX_0 = @echo " CXX " $@;
|
||||
am__v_CXX_1 =
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
|
||||
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
||||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||
am__v_CXXLD_1 =
|
||||
SOURCES = $(generate_SOURCES) $(list_formats_SOURCES) \
|
||||
$(make_sine_SOURCES) $(sfprocess_SOURCES) \
|
||||
$(sndfile_loopify_SOURCES) $(sndfile_to_text_SOURCES) \
|
||||
$(sndfilehandle_SOURCES)
|
||||
DIST_SOURCES = $(generate_SOURCES) $(list_formats_SOURCES) \
|
||||
$(make_sine_SOURCES) $(sfprocess_SOURCES) \
|
||||
$(sndfile_loopify_SOURCES) $(sndfile_to_text_SOURCES) \
|
||||
$(sndfilehandle_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/Cfg/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
|
||||
CLEAN_VERSION = @CLEAN_VERSION@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXTERNAL_XIPH_CFLAGS = @EXTERNAL_XIPH_CFLAGS@
|
||||
EXTERNAL_XIPH_LIBS = @EXTERNAL_XIPH_LIBS@
|
||||
FGREP = @FGREP@
|
||||
FLAC_CFLAGS = @FLAC_CFLAGS@
|
||||
FLAC_LIBS = @FLAC_LIBS@
|
||||
GCC_MAJOR_VERSION = @GCC_MAJOR_VERSION@
|
||||
GCC_MINOR_VERSION = @GCC_MINOR_VERSION@
|
||||
GCC_VERSION = @GCC_VERSION@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_EXTERNAL_XIPH_LIBS = @HAVE_EXTERNAL_XIPH_LIBS@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_VISIBILITY = @HAVE_VISIBILITY@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
HAVE_XCODE_SELECT = @HAVE_XCODE_SELECT@
|
||||
HOST_TRIPLET = @HOST_TRIPLET@
|
||||
HTML_BGCOLOUR = @HTML_BGCOLOUR@
|
||||
HTML_FGCOLOUR = @HTML_FGCOLOUR@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MKOCTFILE = @MKOCTFILE@
|
||||
MKOCTFILE_VERSION = @MKOCTFILE_VERSION@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OCTAVE = @OCTAVE@
|
||||
OCTAVE_CONFIG = @OCTAVE_CONFIG@
|
||||
OCTAVE_CONFIG_VERSION = @OCTAVE_CONFIG_VERSION@
|
||||
OCTAVE_DEST_MDIR = @OCTAVE_DEST_MDIR@
|
||||
OCTAVE_DEST_ODIR = @OCTAVE_DEST_ODIR@
|
||||
OCTAVE_VERSION = @OCTAVE_VERSION@
|
||||
OGG_CFLAGS = @OGG_CFLAGS@
|
||||
OGG_LIBS = @OGG_LIBS@
|
||||
OS_SPECIFIC_CFLAGS = @OS_SPECIFIC_CFLAGS@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SF_COUNT_MAX = @SF_COUNT_MAX@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SHLIB_VERSION_ARG = @SHLIB_VERSION_ARG@
|
||||
SIZEOF_SF_COUNT_T = @SIZEOF_SF_COUNT_T@
|
||||
SNDIO_LIBS = @SNDIO_LIBS@
|
||||
SPEEX_CFLAGS = @SPEEX_CFLAGS@
|
||||
SPEEX_LIBS = @SPEEX_LIBS@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
SRC_BINDIR = @SRC_BINDIR@
|
||||
STRIP = @STRIP@
|
||||
TEST_BINDIR = @TEST_BINDIR@
|
||||
TYPEOF_SF_COUNT_T = @TYPEOF_SF_COUNT_T@
|
||||
VERSION = @VERSION@
|
||||
VORBISENC_CFLAGS = @VORBISENC_CFLAGS@
|
||||
VORBISENC_LIBS = @VORBISENC_LIBS@
|
||||
VORBIS_CFLAGS = @VORBIS_CFLAGS@
|
||||
VORBIS_LIBS = @VORBIS_LIBS@
|
||||
WIN_RC_VERSION = @WIN_RC_VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
pkgconfigdir = @pkgconfigdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
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
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .cc .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu examples/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-checkPROGRAMS:
|
||||
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
generate$(EXEEXT): $(generate_OBJECTS) $(generate_DEPENDENCIES) $(EXTRA_generate_DEPENDENCIES)
|
||||
@rm -f generate$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(generate_OBJECTS) $(generate_LDADD) $(LIBS)
|
||||
|
||||
list_formats$(EXEEXT): $(list_formats_OBJECTS) $(list_formats_DEPENDENCIES) $(EXTRA_list_formats_DEPENDENCIES)
|
||||
@rm -f list_formats$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(list_formats_OBJECTS) $(list_formats_LDADD) $(LIBS)
|
||||
|
||||
make_sine$(EXEEXT): $(make_sine_OBJECTS) $(make_sine_DEPENDENCIES) $(EXTRA_make_sine_DEPENDENCIES)
|
||||
@rm -f make_sine$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(make_sine_OBJECTS) $(make_sine_LDADD) $(LIBS)
|
||||
|
||||
sfprocess$(EXEEXT): $(sfprocess_OBJECTS) $(sfprocess_DEPENDENCIES) $(EXTRA_sfprocess_DEPENDENCIES)
|
||||
@rm -f sfprocess$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(sfprocess_OBJECTS) $(sfprocess_LDADD) $(LIBS)
|
||||
|
||||
sndfile-loopify$(EXEEXT): $(sndfile_loopify_OBJECTS) $(sndfile_loopify_DEPENDENCIES) $(EXTRA_sndfile_loopify_DEPENDENCIES)
|
||||
@rm -f sndfile-loopify$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(sndfile_loopify_OBJECTS) $(sndfile_loopify_LDADD) $(LIBS)
|
||||
|
||||
sndfile-to-text$(EXEEXT): $(sndfile_to_text_OBJECTS) $(sndfile_to_text_DEPENDENCIES) $(EXTRA_sndfile_to_text_DEPENDENCIES)
|
||||
@rm -f sndfile-to-text$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(sndfile_to_text_OBJECTS) $(sndfile_to_text_LDADD) $(LIBS)
|
||||
|
||||
sndfilehandle$(EXEEXT): $(sndfilehandle_OBJECTS) $(sndfilehandle_DEPENDENCIES) $(EXTRA_sndfilehandle_DEPENDENCIES)
|
||||
@rm -f sndfilehandle$(EXEEXT)
|
||||
$(AM_V_CXXLD)$(CXXLINK) $(sndfilehandle_OBJECTS) $(sndfilehandle_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list_formats.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_sine.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfprocess.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-loopify.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-to-text.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfilehandle.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
.cc.o:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cc.obj:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cc.lo:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
|
||||
clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
|
||||
ctags ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,133 @@
|
|||
/*
|
||||
** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the author nor the names of any contributors may be used
|
||||
** to endorse or promote products derived from this software without
|
||||
** specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "sfconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
#define BUFFER_LEN 4096
|
||||
|
||||
static void encode_file (const char *infilename, const char *outfilename, int filetype) ;
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
{ puts ("\nEncode a single input file into a number of different output ") ;
|
||||
puts ("encodings. These output encodings can then be moved to another ") ;
|
||||
puts ("OS for testing.\n") ;
|
||||
puts (" Usage : generate <filename>\n") ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
/* A couple of standard WAV files. Make sure Win32 plays these. */
|
||||
encode_file (argv [1], "pcmu8.wav" , SF_FORMAT_WAV | SF_FORMAT_PCM_U8) ;
|
||||
encode_file (argv [1], "pcm16.wav" , SF_FORMAT_WAV | SF_FORMAT_PCM_16) ;
|
||||
encode_file (argv [1], "imaadpcm.wav", SF_FORMAT_WAV | SF_FORMAT_MS_ADPCM) ;
|
||||
encode_file (argv [1], "msadpcm.wav", SF_FORMAT_WAV | SF_FORMAT_IMA_ADPCM) ;
|
||||
encode_file (argv [1], "gsm610.wav" , SF_FORMAT_WAV | SF_FORMAT_GSM610) ;
|
||||
|
||||
/* Soundforge W64. */
|
||||
encode_file (argv [1], "pcmu8.w64" , SF_FORMAT_W64 | SF_FORMAT_PCM_U8) ;
|
||||
encode_file (argv [1], "pcm16.w64" , SF_FORMAT_W64 | SF_FORMAT_PCM_16) ;
|
||||
encode_file (argv [1], "imaadpcm.w64", SF_FORMAT_W64 | SF_FORMAT_MS_ADPCM) ;
|
||||
encode_file (argv [1], "msadpcm.w64", SF_FORMAT_W64 | SF_FORMAT_IMA_ADPCM) ;
|
||||
encode_file (argv [1], "gsm610.w64" , SF_FORMAT_W64 | SF_FORMAT_GSM610) ;
|
||||
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
||||
/*============================================================================================
|
||||
** Helper functions and macros.
|
||||
*/
|
||||
|
||||
#define PUT_DOTS(k) \
|
||||
{ while (k--) \
|
||||
putchar ('.') ; \
|
||||
putchar (' ') ; \
|
||||
}
|
||||
|
||||
/*========================================================================================
|
||||
*/
|
||||
|
||||
static void
|
||||
encode_file (const char *infilename, const char *outfilename, int filetype)
|
||||
{ static float buffer [BUFFER_LEN] ;
|
||||
|
||||
SNDFILE *infile, *outfile ;
|
||||
SF_INFO sfinfo ;
|
||||
int k, readcount ;
|
||||
|
||||
printf (" %s -> %s ", infilename, outfilename) ;
|
||||
fflush (stdout) ;
|
||||
|
||||
k = 16 - strlen (outfilename) ;
|
||||
PUT_DOTS (k) ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
if (! (infile = sf_open (infilename, SFM_READ, &sfinfo)))
|
||||
{ printf ("Error : could not open file : %s\n", infilename) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
exit (1) ;
|
||||
}
|
||||
|
||||
sfinfo.format = filetype ;
|
||||
|
||||
if (! sf_format_check (&sfinfo))
|
||||
{ sf_close (infile) ;
|
||||
printf ("Invalid encoding\n") ;
|
||||
return ;
|
||||
} ;
|
||||
|
||||
if (! (outfile = sf_open (outfilename, SFM_WRITE, &sfinfo)))
|
||||
{ printf ("Error : could not open file : %s\n", outfilename) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
while ((readcount = sf_read_float (infile, buffer, BUFFER_LEN)) > 0)
|
||||
sf_write_float (outfile, buffer, readcount) ;
|
||||
|
||||
sf_close (infile) ;
|
||||
sf_close (outfile) ;
|
||||
|
||||
printf ("ok\n") ;
|
||||
|
||||
return ;
|
||||
} /* encode_file */
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
** Copyright (C) 2001-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the author nor the names of any contributors may be used
|
||||
** to endorse or promote products derived from this software without
|
||||
** specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
int
|
||||
main (void)
|
||||
{ SF_FORMAT_INFO info ;
|
||||
SF_INFO sfinfo ;
|
||||
int format, major_count, subtype_count, m, s ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
printf ("Version : %s\n\n", sf_version_string ()) ;
|
||||
|
||||
sf_command (NULL, SFC_GET_FORMAT_MAJOR_COUNT, &major_count, sizeof (int)) ;
|
||||
sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &subtype_count, sizeof (int)) ;
|
||||
|
||||
sfinfo.channels = 1 ;
|
||||
for (m = 0 ; m < major_count ; m++)
|
||||
{ info.format = m ;
|
||||
sf_command (NULL, SFC_GET_FORMAT_MAJOR, &info, sizeof (info)) ;
|
||||
printf ("%s (extension \"%s\")\n", info.name, info.extension) ;
|
||||
|
||||
format = info.format ;
|
||||
|
||||
for (s = 0 ; s < subtype_count ; s++)
|
||||
{ info.format = s ;
|
||||
sf_command (NULL, SFC_GET_FORMAT_SUBTYPE, &info, sizeof (info)) ;
|
||||
|
||||
format = (format & SF_FORMAT_TYPEMASK) | info.format ;
|
||||
|
||||
sfinfo.format = format ;
|
||||
if (sf_format_check (&sfinfo))
|
||||
printf (" %s\n", info.name) ;
|
||||
} ;
|
||||
puts ("") ;
|
||||
} ;
|
||||
puts ("") ;
|
||||
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the author nor the names of any contributors may be used
|
||||
** to endorse or promote products derived from this software without
|
||||
** specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846264338
|
||||
#endif
|
||||
|
||||
#define SAMPLE_RATE 44100
|
||||
#define SAMPLE_COUNT (SAMPLE_RATE * 4) /* 4 seconds */
|
||||
#define AMPLITUDE (1.0 * 0x7F000000)
|
||||
#define LEFT_FREQ (344.0 / SAMPLE_RATE)
|
||||
#define RIGHT_FREQ (466.0 / SAMPLE_RATE)
|
||||
|
||||
int
|
||||
main (void)
|
||||
{ SNDFILE *file ;
|
||||
SF_INFO sfinfo ;
|
||||
int k ;
|
||||
int *buffer ;
|
||||
|
||||
if (! (buffer = malloc (2 * SAMPLE_COUNT * sizeof (int))))
|
||||
{ printf ("Malloc failed.\n") ;
|
||||
exit (0) ;
|
||||
} ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
sfinfo.samplerate = SAMPLE_RATE ;
|
||||
sfinfo.frames = SAMPLE_COUNT ;
|
||||
sfinfo.channels = 2 ;
|
||||
sfinfo.format = (SF_FORMAT_WAV | SF_FORMAT_PCM_24) ;
|
||||
|
||||
if (! (file = sf_open ("sine.wav", SFM_WRITE, &sfinfo)))
|
||||
{ printf ("Error : Not able to open output file.\n") ;
|
||||
free (buffer) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
if (sfinfo.channels == 1)
|
||||
{ for (k = 0 ; k < SAMPLE_COUNT ; k++)
|
||||
buffer [k] = AMPLITUDE * sin (LEFT_FREQ * 2 * k * M_PI) ;
|
||||
}
|
||||
else if (sfinfo.channels == 2)
|
||||
{ for (k = 0 ; k < SAMPLE_COUNT ; k++)
|
||||
{ buffer [2 * k] = AMPLITUDE * sin (LEFT_FREQ * 2 * k * M_PI) ;
|
||||
buffer [2 * k + 1] = AMPLITUDE * sin (RIGHT_FREQ * 2 * k * M_PI) ;
|
||||
} ;
|
||||
}
|
||||
else
|
||||
{ printf ("makesine can only generate mono or stereo files.\n") ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
if (sf_write_int (file, buffer, sfinfo.channels * SAMPLE_COUNT) !=
|
||||
sfinfo.channels * SAMPLE_COUNT)
|
||||
puts (sf_strerror (file)) ;
|
||||
|
||||
sf_close (file) ;
|
||||
free (buffer) ;
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
/*
|
||||
** Copyright (C) 2001-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the author nor the names of any contributors may be used
|
||||
** to endorse or promote products derived from this software without
|
||||
** specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Include this header file to use functions from libsndfile. */
|
||||
#include <sndfile.h>
|
||||
|
||||
/* This will be the length of the buffer used to hold.frames while
|
||||
** we process them.
|
||||
*/
|
||||
#define BUFFER_LEN 1024
|
||||
|
||||
/* libsndfile can handle more than 6 channels but we'll restrict it to 6. */
|
||||
#define MAX_CHANNELS 6
|
||||
|
||||
/* Function prototype. */
|
||||
static void process_data (double *data, int count, int channels) ;
|
||||
|
||||
|
||||
int
|
||||
main (void)
|
||||
{ /* This is a buffer of double precision floating point values
|
||||
** which will hold our data while we process it.
|
||||
*/
|
||||
static double data [BUFFER_LEN] ;
|
||||
|
||||
/* A SNDFILE is very much like a FILE in the Standard C library. The
|
||||
** sf_open function return an SNDFILE* pointer when they sucessfully
|
||||
** open the specified file.
|
||||
*/
|
||||
SNDFILE *infile, *outfile ;
|
||||
|
||||
/* A pointer to an SF_INFO struct is passed to sf_open.
|
||||
** On read, the library fills this struct with information about the file.
|
||||
** On write, the struct must be filled in before calling sf_open.
|
||||
*/
|
||||
SF_INFO sfinfo ;
|
||||
int readcount ;
|
||||
const char *infilename = "input.wav" ;
|
||||
const char *outfilename = "output.wav" ;
|
||||
|
||||
/* The SF_INFO struct must be initialized before using it.
|
||||
*/
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
/* Here's where we open the input file. We pass sf_open the file name and
|
||||
** a pointer to an SF_INFO struct.
|
||||
** On successful open, sf_open returns a SNDFILE* pointer which is used
|
||||
** for all subsequent operations on that file.
|
||||
** If an error occurs during sf_open, the function returns a NULL pointer.
|
||||
**
|
||||
** If you are trying to open a raw headerless file you will need to set the
|
||||
** format and channels fields of sfinfo before calling sf_open(). For
|
||||
** instance to open a raw 16 bit stereo PCM file you would need the following
|
||||
** two lines:
|
||||
**
|
||||
** sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_16 ;
|
||||
** sfinfo.channels = 2 ;
|
||||
*/
|
||||
if (! (infile = sf_open (infilename, SFM_READ, &sfinfo)))
|
||||
{ /* Open failed so print an error message. */
|
||||
printf ("Not able to open input file %s.\n", infilename) ;
|
||||
/* Print the error message from libsndfile. */
|
||||
puts (sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
if (sfinfo.channels > MAX_CHANNELS)
|
||||
{ printf ("Not able to process more than %d channels\n", MAX_CHANNELS) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
/* Open the output file. */
|
||||
if (! (outfile = sf_open (outfilename, SFM_WRITE, &sfinfo)))
|
||||
{ printf ("Not able to open output file %s.\n", outfilename) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
/* While there are.frames in the input file, read them, process
|
||||
** them and write them to the output file.
|
||||
*/
|
||||
while ((readcount = sf_read_double (infile, data, BUFFER_LEN)))
|
||||
{ process_data (data, readcount, sfinfo.channels) ;
|
||||
sf_write_double (outfile, data, readcount) ;
|
||||
} ;
|
||||
|
||||
/* Close input and output files. */
|
||||
sf_close (infile) ;
|
||||
sf_close (outfile) ;
|
||||
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
||||
static void
|
||||
process_data (double *data, int count, int channels)
|
||||
{ double channel_gain [MAX_CHANNELS] = { 0.5, 0.8, 0.1, 0.4, 0.4, 0.9 } ;
|
||||
int k, chan ;
|
||||
|
||||
/* Process the data here.
|
||||
** If the soundfile contains more then 1 channel you need to take care of
|
||||
** the data interleaving youself.
|
||||
** Current we just apply a channel dependant gain.
|
||||
*/
|
||||
|
||||
for (chan = 0 ; chan < channels ; chan ++)
|
||||
for (k = chan ; k < count ; k+= channels)
|
||||
data [k] *= channel_gain [chan] ;
|
||||
|
||||
return ;
|
||||
} /* process_data */
|
||||
|
|
@ -0,0 +1,182 @@
|
|||
/*
|
||||
** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the author nor the names of any contributors may be used
|
||||
** to endorse or promote products derived from this software without
|
||||
** specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
** A quick/rough hack to add SF_INSTRUMENT data to a file. It compiles, but
|
||||
** no guarantees beyond that. Happy to receive patches to fix/improve it.
|
||||
**
|
||||
** Code for this was stolen from programs/sndfile-convert.c and related code.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#define BUFFER_LEN (1 << 14)
|
||||
|
||||
|
||||
typedef struct
|
||||
{ char *infilename, *outfilename ;
|
||||
SF_INFO infileinfo, outfileinfo ;
|
||||
} OptionData ;
|
||||
|
||||
const char * program_name (const char * argv0) ;
|
||||
static void sfe_copy_data_int (SNDFILE *outfile, SNDFILE *infile, int channels) ;
|
||||
static void add_instrument_data (SNDFILE *outfile, const SF_INFO * in_info) ;
|
||||
|
||||
static void
|
||||
usage_exit (const char *progname)
|
||||
{
|
||||
printf ("\nUsage : %s <input file> <output file>\n", progname) ;
|
||||
puts ("") ;
|
||||
exit (1) ;
|
||||
} /* usage_exit */
|
||||
|
||||
int
|
||||
main (int argc, char * argv [])
|
||||
{ const char *progname, *infilename, *outfilename ;
|
||||
SNDFILE *infile = NULL, *outfile = NULL ;
|
||||
SF_INFO in_sfinfo, out_sfinfo ;
|
||||
|
||||
progname = program_name (argv [0]) ;
|
||||
|
||||
if (argc < 3 || argc > 5)
|
||||
usage_exit (progname) ;
|
||||
|
||||
infilename = argv [argc-2] ;
|
||||
outfilename = argv [argc-1] ;
|
||||
|
||||
if (strcmp (infilename, outfilename) == 0)
|
||||
{ printf ("Error : Input and output filenames are the same.\n\n") ;
|
||||
usage_exit (progname) ;
|
||||
} ;
|
||||
|
||||
if (strlen (infilename) > 1 && infilename [0] == '-')
|
||||
{ printf ("Error : Input filename (%s) looks like an option.\n\n", infilename) ;
|
||||
usage_exit (progname) ;
|
||||
} ;
|
||||
|
||||
if (outfilename [0] == '-')
|
||||
{ printf ("Error : Output filename (%s) looks like an option.\n\n", outfilename) ;
|
||||
usage_exit (progname) ;
|
||||
} ;
|
||||
|
||||
memset (&in_sfinfo, 0, sizeof (in_sfinfo)) ;
|
||||
|
||||
if ((infile = sf_open (infilename, SFM_READ, &in_sfinfo)) == NULL)
|
||||
{ printf ("Not able to open input file %s.\n", infilename) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
memcpy (&out_sfinfo, &in_sfinfo, sizeof (out_sfinfo)) ;
|
||||
/* Open the output file. */
|
||||
if ((outfile = sf_open (outfilename, SFM_WRITE, &out_sfinfo)) == NULL)
|
||||
{ printf ("Not able to open output file %s : %s\n", outfilename, sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
/* Add the loop data */
|
||||
add_instrument_data (outfile, &in_sfinfo) ;
|
||||
|
||||
/* Copy the audio data */
|
||||
sfe_copy_data_int (outfile, infile, in_sfinfo.channels) ;
|
||||
|
||||
sf_close (infile) ;
|
||||
sf_close (outfile) ;
|
||||
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
||||
const char *
|
||||
program_name (const char * argv0)
|
||||
{ const char * tmp ;
|
||||
|
||||
tmp = strrchr (argv0, '/') ;
|
||||
argv0 = tmp ? tmp + 1 : argv0 ;
|
||||
|
||||
/* Remove leading libtool name mangling. */
|
||||
if (strstr (argv0, "lt-") == argv0)
|
||||
return argv0 + 3 ;
|
||||
|
||||
return argv0 ;
|
||||
} /* program_name */
|
||||
|
||||
static void
|
||||
sfe_copy_data_int (SNDFILE *outfile, SNDFILE *infile, int channels)
|
||||
{ static int data [BUFFER_LEN] ;
|
||||
int frames, readcount ;
|
||||
|
||||
frames = BUFFER_LEN / channels ;
|
||||
readcount = frames ;
|
||||
|
||||
while (readcount > 0)
|
||||
{ readcount = sf_readf_int (infile, data, frames) ;
|
||||
sf_writef_int (outfile, data, readcount) ;
|
||||
} ;
|
||||
|
||||
return ;
|
||||
} /* sfe_copy_data_int */
|
||||
|
||||
static void
|
||||
add_instrument_data (SNDFILE *file, const SF_INFO *info)
|
||||
{ SF_INSTRUMENT instr ;
|
||||
|
||||
memset (&instr, 0, sizeof (instr)) ;
|
||||
|
||||
instr.gain = 1 ;
|
||||
instr.basenote = 0 ;
|
||||
instr.detune = 0 ;
|
||||
instr.velocity_lo = 0 ;
|
||||
instr.velocity_hi = 0 ;
|
||||
instr.key_lo = 0 ;
|
||||
instr.key_hi = 0 ;
|
||||
instr.loop_count = 1 ;
|
||||
|
||||
instr.loops [0].mode = SF_LOOP_FORWARD ;
|
||||
instr.loops [0].start = 0 ;
|
||||
instr.loops [0].end = info->frames ;
|
||||
instr.loops [0].count = 0 ;
|
||||
|
||||
if (sf_command (file, SFC_SET_INSTRUMENT, &instr, sizeof (instr)) == SF_FALSE)
|
||||
{ printf ("\n\nLine %d : sf_command (SFC_SET_INSTRUMENT) failed.\n\n", __LINE__) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
return ;
|
||||
} /* add_instrument_data */
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
/*
|
||||
** Copyright (C) 2008-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the author nor the names of any contributors may be used
|
||||
** to endorse or promote products derived from this software without
|
||||
** specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <float.h>
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
#define BLOCK_SIZE 4096
|
||||
|
||||
#ifdef DBL_DECIMAL_DIG
|
||||
#define OP_DBL_Digs (DBL_DECIMAL_DIG)
|
||||
#else
|
||||
#ifdef DECIMAL_DIG
|
||||
#define OP_DBL_Digs (DECIMAL_DIG)
|
||||
#else
|
||||
#define OP_DBL_Digs (DBL_DIG + 3)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static void
|
||||
print_usage (char *progname)
|
||||
{ printf ("\nUsage : %s [--full-precision] <input file> <output file>\n", progname) ;
|
||||
puts ("\n"
|
||||
" Where the output file will contain a line for each frame\n"
|
||||
" and a column for each channel.\n"
|
||||
) ;
|
||||
|
||||
} /* print_usage */
|
||||
|
||||
static void
|
||||
convert_to_text (SNDFILE * infile, FILE * outfile, int channels, int full_precision)
|
||||
{ float buf [BLOCK_SIZE] ;
|
||||
sf_count_t frames ;
|
||||
int k, m, readcount ;
|
||||
|
||||
frames = BLOCK_SIZE / channels ;
|
||||
|
||||
while ((readcount = sf_readf_float (infile, buf, frames)) > 0)
|
||||
{ for (k = 0 ; k < readcount ; k++)
|
||||
{ for (m = 0 ; m < channels ; m++)
|
||||
if (full_precision)
|
||||
fprintf (outfile, " %.*e", OP_DBL_Digs - 1, buf [k * channels + m]) ;
|
||||
else
|
||||
fprintf (outfile, " % 12.10f", buf [k * channels + m]) ;
|
||||
fprintf (outfile, "\n") ;
|
||||
} ;
|
||||
} ;
|
||||
|
||||
return ;
|
||||
} /* convert_to_text */
|
||||
|
||||
int
|
||||
main (int argc, char * argv [])
|
||||
{ char *progname, *infilename, *outfilename ;
|
||||
SNDFILE *infile = NULL ;
|
||||
FILE *outfile = NULL ;
|
||||
SF_INFO sfinfo ;
|
||||
int full_precision = 0 ;
|
||||
|
||||
progname = strrchr (argv [0], '/') ;
|
||||
progname = progname ? progname + 1 : argv [0] ;
|
||||
|
||||
switch (argc)
|
||||
{ case 4 :
|
||||
if (!strcmp ("--full-precision", argv [3]))
|
||||
{ print_usage (progname) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
full_precision = 1 ;
|
||||
argv++ ;
|
||||
case 3 :
|
||||
break ;
|
||||
default:
|
||||
print_usage (progname) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
infilename = argv [1] ;
|
||||
outfilename = argv [2] ;
|
||||
|
||||
if (strcmp (infilename, outfilename) == 0)
|
||||
{ printf ("Error : Input and output filenames are the same.\n\n") ;
|
||||
print_usage (progname) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
if (infilename [0] == '-')
|
||||
{ printf ("Error : Input filename (%s) looks like an option.\n\n", infilename) ;
|
||||
print_usage (progname) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
if (outfilename [0] == '-')
|
||||
{ printf ("Error : Output filename (%s) looks like an option.\n\n", outfilename) ;
|
||||
print_usage (progname) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
if ((infile = sf_open (infilename, SFM_READ, &sfinfo)) == NULL)
|
||||
{ printf ("Not able to open input file %s.\n", infilename) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
/* Open the output file. */
|
||||
if ((outfile = fopen (outfilename, "w")) == NULL)
|
||||
{ printf ("Not able to open output file %s : %s\n", outfilename, sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
fprintf (outfile, "# Converted from file %s.\n", infilename) ;
|
||||
fprintf (outfile, "# Channels %d, Sample rate %d\n", sfinfo.channels, sfinfo.samplerate) ;
|
||||
|
||||
convert_to_text (infile, outfile, sfinfo.channels, full_precision) ;
|
||||
|
||||
sf_close (infile) ;
|
||||
fclose (outfile) ;
|
||||
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
** Copyright (C) 2007-2011 Erik de Castro Lopo <erikd@mega-nerd.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 2 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, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#include <sndfile.hh>
|
||||
|
||||
#define BUFFER_LEN 1024
|
||||
|
||||
static void
|
||||
create_file (const char * fname, int format)
|
||||
{ static short buffer [BUFFER_LEN] ;
|
||||
|
||||
SndfileHandle file ;
|
||||
int channels = 2 ;
|
||||
int srate = 48000 ;
|
||||
|
||||
printf ("Creating file named '%s'\n", fname) ;
|
||||
|
||||
file = SndfileHandle (fname, SFM_WRITE, format, channels, srate) ;
|
||||
|
||||
memset (buffer, 0, sizeof (buffer)) ;
|
||||
|
||||
file.write (buffer, BUFFER_LEN) ;
|
||||
|
||||
puts ("") ;
|
||||
/*
|
||||
** The SndfileHandle object will automatically close the file and
|
||||
** release all allocated memory when the object goes out of scope.
|
||||
** This is the Resource Acquisition Is Initailization idom.
|
||||
** See : http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization
|
||||
*/
|
||||
} /* create_file */
|
||||
|
||||
static void
|
||||
read_file (const char * fname)
|
||||
{ static short buffer [BUFFER_LEN] ;
|
||||
|
||||
SndfileHandle file ;
|
||||
|
||||
file = SndfileHandle (fname) ;
|
||||
|
||||
printf ("Opened file '%s'\n", fname) ;
|
||||
printf (" Sample rate : %d\n", file.samplerate ()) ;
|
||||
printf (" Channels : %d\n", file.channels ()) ;
|
||||
|
||||
file.read (buffer, BUFFER_LEN) ;
|
||||
|
||||
puts ("") ;
|
||||
|
||||
/* RAII takes care of destroying SndfileHandle object. */
|
||||
} /* read_file */
|
||||
|
||||
int
|
||||
main (void)
|
||||
{ const char * fname = "test.wav" ;
|
||||
|
||||
puts ("\nSimple example showing usage of the C++ SndfileHandle object.\n") ;
|
||||
|
||||
create_file (fname, SF_FORMAT_WAV | SF_FORMAT_PCM_16) ;
|
||||
|
||||
read_file (fname) ;
|
||||
|
||||
puts ("Done.\n") ;
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
|
||||
%define name @PACKAGE@
|
||||
%define version @VERSION@
|
||||
%define release 1
|
||||
|
||||
Summary: A library to handle various audio file formats.
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Copyright: LGPL
|
||||
Group: Libraries/Sound
|
||||
Source: http://www.mega-nerd.com/libsndfile/libsndfile-%{version}.tar.gz
|
||||
Url: http://www.mega-nerd.com/libsndfile/
|
||||
BuildRoot: /var/tmp/%{name}-%{version}
|
||||
|
||||
%description
|
||||
libsndfile is a C library for reading and writing sound files such as
|
||||
AIFF, AU and WAV files through one standard interface. It can currently
|
||||
read/write 8, 16, 24 and 32-bit PCM files as well as 32-bit floating
|
||||
point WAV files and a number of compressed formats.
|
||||
|
||||
%package devel
|
||||
Summary: Libraries, includes, etc to develop libsndfile applications
|
||||
Group: Libraries
|
||||
|
||||
%description devel
|
||||
Libraries, include files, etc you can use to develop libsndfile applications.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
%configure
|
||||
make
|
||||
|
||||
%install
|
||||
if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi
|
||||
mkdir -p $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%clean
|
||||
if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO doc
|
||||
%{_libdir}/libsndfile.so.*
|
||||
%{_bindir}/*
|
||||
%{_mandir}/man1/*
|
||||
%{_datadir}/octave/site/m/*
|
||||
%{_defaultdocdir}/libsndfile1-dev/html/*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libsndfile.a
|
||||
%{_libdir}/libsndfile.la
|
||||
%{_libdir}/libsndfile.so
|
||||
%{_includedir}/sndfile.h
|
||||
%{_libdir}/pkgconfig/sndfile.pc
|
||||
|
||||
%changelog
|
||||
* Sun May 15 2005 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
- Add html files to the files section.
|
||||
* Tue Sep 16 2003 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
- Apply corrections from Andrew Schultz.
|
||||
* Mon Oct 21 2002 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
- Force installation of sndfile.pc file.
|
||||
* Thu Jul 6 2000 Josh Green <jgreen@users.sourceforge.net>
|
||||
- Created libsndfile.spec.in
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue