Imported Upstream version 1.0.28 50/134350/1 upstream/1.0.28
authorSeungbae Shin <seungbae.shin@samsung.com>
Thu, 15 Jun 2017 03:30:39 +0000 (12:30 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Fri, 16 Jun 2017 05:51:39 +0000 (14:51 +0900)
Change-Id: Id92ab7f7f5dc6513db5650da4eda1e4f392bc54f

190 files changed:
.gitattributes [new file with mode: 0644]
.gitignore [new file with mode: 0644]
.travis.yml [new file with mode: 0644]
Building-for-Android.md [new file with mode: 0644]
CMake/autogen.cmake [new file with mode: 0644]
CMake/build.cmake [new file with mode: 0644]
CMake/check.cmake [new file with mode: 0644]
CMake/compiler_is_gcc.c [new file with mode: 0644]
CMake/external_libs.cmake [new file with mode: 0644]
CMake/file.cmake [new file with mode: 0644]
CMake/have_decl_s_irgrp.c [new file with mode: 0644]
CMake/libsndfile.cmake [new file with mode: 0644]
CMakeLists.txt [new file with mode: 0644]
CONTRIBUTING.md [new file with mode: 0644]
Cfg/compile [deleted file]
Cfg/config.guess [deleted file]
Cfg/config.sub [deleted file]
Cfg/depcomp [deleted file]
Cfg/install-sh [deleted file]
Cfg/ltmain.sh [deleted file]
Cfg/missing [deleted file]
INSTALL [deleted file]
M4/Makefile.am
M4/Makefile.in [deleted file]
M4/ax_add_fortify_source.m4 [new file with mode: 0644]
M4/libtool.m4 [deleted file]
M4/ltoptions.m4 [deleted file]
M4/ltsugar.m4 [deleted file]
M4/ltversion.m4 [deleted file]
M4/lt~obsolete.m4 [deleted file]
M4/visibility.m4 [new file with mode: 0644]
Makefile.am
Makefile.in [deleted file]
NEWS
Octave/Makefile.in [deleted file]
Octave/Readme.txt [new file with mode: 0644]
Octave/format.h [moved from src/macbinary3.c with 63% similarity]
README
README.md [new file with mode: 0644]
Scripts/android-configure.sh
Scripts/clang-sanitize.sh [new file with mode: 0755]
Scripts/cmake-build.sh [new file with mode: 0755]
Scripts/cstyle.py [new file with mode: 0755]
Scripts/git-pre-commit-hook [new file with mode: 0755]
Scripts/static-deps-build.mk [new file with mode: 0755]
Win32/Makefile.in [deleted file]
aclocal.m4 [deleted file]
autogen.sh [new file with mode: 0755]
configure [deleted file]
configure.ac
doc/FAQ.html
doc/Makefile.am
doc/Makefile.in [deleted file]
doc/api.html
doc/command.html
doc/development.html [new file with mode: 0644]
doc/dither.html [deleted file]
doc/donate.html [new file with mode: 0644]
doc/index.html
doc/libsndfile.css [deleted file]
doc/linux_games_programming.txt [new file with mode: 0644]
doc/print.css [new file with mode: 0644]
examples/Makefile.am
examples/Makefile.in [deleted file]
examples/generate.cs [new file with mode: 0644]
examples/sndfile-to-text.c
make_lite.py [new file with mode: 0644]
man/Makefile.in [deleted file]
man/sndfile-interleave.1
man/sndfile-play.1
programs/Makefile.am
programs/Makefile.in [deleted file]
programs/sndfile-cmp.c
programs/sndfile-convert.c
programs/sndfile-metadata-set.c
programs/sndfile-play.c
programs/test-sndfile-metadata-set.py
regtest/Makefile.am
regtest/Makefile.in [deleted file]
regtest/Readme.txt [new file with mode: 0644]
sndfile.pc.in
src/ALAC/ALACDecoder.h [new file with mode: 0644]
src/ALAC/ALACEncoder.h [new file with mode: 0644]
src/ALAC/LICENSE [new file with mode: 0644]
src/ALAC/ag_dec.c
src/ALAC/ag_enc.c
src/ALAC/alac_decoder.h [new file with mode: 0644]
src/ALAC/alac_encoder.c
src/GSM610/lpc.c
src/Makefile.am
src/Makefile.in [deleted file]
src/Symbols.darwin [deleted file]
src/Symbols.gnu-binutils [deleted file]
src/Symbols.os2 [deleted file]
src/Symbols.static [deleted file]
src/aiff.c
src/alac.c
src/au.c
src/avr.c
src/broadcast.c
src/caf.c
src/chunk.c
src/command.c
src/common.c
src/common.h
src/config.h.in [deleted file]
src/create_symbols_file.c [new file with mode: 0755]
src/create_symbols_file.py
src/flac.c
src/gsm610.c
src/htk.c
src/id3.c
src/ima_adpcm.c
src/ircam.c
src/libsndfile-1.def [deleted file]
src/mat4.c
src/mat5.c
src/mpc2k.c
src/ms_adpcm.c
src/new.c [new file with mode: 0644]
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/rf64.c
src/sd2.c
src/sds.c
src/sfendian.h
src/sndfile.c
src/sndfile.h.in
src/strings.c
src/svx.c
src/test_binheader_writef.c [new file with mode: 0644]
src/test_conversions.c
src/test_endswap.c [deleted file]
src/test_endswap.tpl
src/test_main.c
src/test_main.h
src/test_strncpy_crlf.c
src/version-metadata.rc [deleted file]
src/voc.c
src/w64.c
src/wav.c
src/wavlike.c [moved from src/wav_w64.c with 52% similarity]
src/wavlike.h [moved from src/wav_w64.h with 76% similarity]
src/windows.c
src/wve.c
src/xi.c
tests/Makefile.am
tests/Makefile.in [deleted file]
tests/benchmark-0.0.28 [new file with mode: 0644]
tests/benchmark-1.0.0 [new file with mode: 0644]
tests/benchmark-1.0.0rc2 [new file with mode: 0644]
tests/benchmark-1.0.18pre16-hendrix [new file with mode: 0644]
tests/benchmark-1.0.18pre16-mingus [new file with mode: 0644]
tests/benchmark-1.0.6pre10-coltrane [new file with mode: 0644]
tests/benchmark-1.0.6pre10-miles [new file with mode: 0644]
tests/benchmark-latest-coltrane [new file with mode: 0644]
tests/benchmark.c [deleted file]
tests/chunk_test.c
tests/command_test.c
tests/compression_size_test.c
tests/error_test.c
tests/external_libs_test.c
tests/floating_point_test.c [deleted file]
tests/floating_point_test.tpl
tests/header_test.c [deleted file]
tests/long_read_write_test.c
tests/lossy_comp_test.c
tests/misc_test.c
tests/ogg_test.c
tests/pcm_test.c [deleted file]
tests/peak_chunk_test.c
tests/pipe_test.c [deleted file]
tests/rdwr_test.c [deleted file]
tests/scale_clip_test.c [deleted file]
tests/sftest.c [new file with mode: 0644]
tests/sfversion.c
tests/string_test.c
tests/test_wrapper.sh.in
tests/utils.c [deleted file]
tests/utils.h [deleted file]
tests/utils.tpl
tests/write_read_test.c [deleted file]
tests/write_read_test.tpl

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..cbedc73
--- /dev/null
@@ -0,0 +1,15 @@
+# Set the default behavior, in case people don't have core.autocrlf set.
+* text=auto
+
+# Declare files that will always have CRLF line endings on checkout.
+*.ac text eol=lf
+*.am text eol=lf
+*.m4 text eol=lf
+*.pc text eol=lf
+*.spec text eol=lf
+*.sh text eol=lf
+
+# Explicitly declare text files you want to always be normalized and converted
+# to native line endings on checkout.
+*.c text
+*.h text
diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..856aa66
--- /dev/null
@@ -0,0 +1,116 @@
+*.8svx
+*.aif
+*.aifc
+*.aiff
+*.au
+*.bin
+*.caf
+*.cm*
+*.exe
+*.flac
+*.la
+*.lo
+*.loT
+*.o
+*.oct
+*.oga
+*.ogg
+*.paf
+*.raw
+*.rifx
+*.sd2
+*.sds
+*.svx
+*.w64
+*.wav
+*.wavex
+.DS_Store
+.deps
+.dirstamp
+.libs
+Build/
+CMake/config.h.in
+CMakeFiles
+CMakeCache.txt
+Cfg
+Hack
+Hack/sndfile-fuzzbomb
+INSTALL
+M4/libtool.m4
+M4/ltoptions.m4
+M4/ltsugar.m4
+M4/ltversion.m4
+M4/lt~obsolete.m4
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+build-test-tarball.mk
+config.log
+config.status
+configure
+doc/AUTHORS
+doc/ChangeLog
+doc/NEWS
+doc/README
+doc/libsndfile.css
+echo-install-dirs
+examples/generate
+examples/list_formats
+examples/make_sine
+examples/sfprocess
+examples/sndfile-loopify
+examples/sndfile-to-text
+examples/sndfilehandle
+libsndfile-1.0.*
+libsndfile-testsuite-*
+libsndfile.spec
+libtool
+man/sndfile-deinterleave.1
+man/sndfile-metadata-set.1
+programs/sndfile-cmp
+programs/sndfile-concat
+programs/sndfile-convert
+programs/sndfile-data-trim
+programs/sndfile-deinterleave
+programs/sndfile-info
+programs/sndfile-interleave
+programs/sndfile-jackplay
+programs/sndfile-metadata-get
+programs/sndfile-metadata-set
+programs/sndfile-play
+programs/sndfile-salvage
+regtest/sndfile-regtest
+sndfile.pc
+src/Ext
+src/G72x/g72x_test
+src/Symbols.darwin
+src/Symbols.gnu-binutils
+src/Symbols.os2
+src/Symbols.static
+src/config.h
+src/config.h.in
+src/libsndfile.so*
+src/libsndfile-1.def
+src/sndfile.h
+src/stamp-h1
+src/test_endswap.c
+src/test_main
+src/version-metadata.rc
+tests/*_test
+tests/benchmark
+tests/benchmark.c
+tests/fix_this
+tests/floating_point_test.c
+tests/header_test.c
+tests/libsndfile-1.dll
+tests/pcm_test.c
+tests/pedantic-header-test.sh
+tests/pipe_test.c
+tests/rdwr_test.c
+tests/scale_clip_test.c
+tests/sfversion
+tests/test_wrapper.sh
+tests/utils.c
+tests/utils.h
+tests/write_read_test.c
diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..c9cf431
--- /dev/null
@@ -0,0 +1,13 @@
+language: c
+
+sudo: required
+dist: trusty
+
+before_install:
+  - sudo apt-get update
+  - sudo apt-get install -y libogg-dev libflac-dev libvorbis-dev
+
+script:
+  - ./autogen.sh
+  - ./configure
+  - make distcheck
diff --git a/Building-for-Android.md b/Building-for-Android.md
new file mode 100644 (file)
index 0000000..72b302d
--- /dev/null
@@ -0,0 +1,17 @@
+# Building for Android
+
+Assuming the Android Ndk is installed at location `/path/to/toolchain`, building
+libsndfile for Android (arm-linux-androideabi) should be as simple as:
+```
+./autogen.sh
+export ANDROID_TOOLCHAIN_HOME=/path/to/android/toolchain
+./Scripts/android-configure.sh
+make
+```
+The `Scripts/android-configure.sh` contains four of variables; `ANDROID_NDK_VER`,
+`ANDROID_GCC_VER`, `ANDROID_API_VER` and `ANDROID_TARGET` that can be overridden
+by setting them before the script is run.
+
+Since I (erikd), do almost zero Android development, I am happy accept patches
+for this documentation and script to improve its utility for real Android
+developers.
diff --git a/CMake/autogen.cmake b/CMake/autogen.cmake
new file mode 100644 (file)
index 0000000..9d06f92
--- /dev/null
@@ -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 ()
diff --git a/CMake/build.cmake b/CMake/build.cmake
new file mode 100644 (file)
index 0000000..ae1d663
--- /dev/null
@@ -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 ()
diff --git a/CMake/check.cmake b/CMake/check.cmake
new file mode 100644 (file)
index 0000000..ba5d1ab
--- /dev/null
@@ -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 ()
+
diff --git a/CMake/compiler_is_gcc.c b/CMake/compiler_is_gcc.c
new file mode 100644 (file)
index 0000000..784c884
--- /dev/null
@@ -0,0 +1,11 @@
+int main (void)
+{
+#if __GNUC__
+       #if __clang__
+               This is clang
+#      endif
+#else
+       This is not GCC.
+#endif
+       return 0 ;
+}
diff --git a/CMake/external_libs.cmake b/CMake/external_libs.cmake
new file mode 100644 (file)
index 0000000..665a777
--- /dev/null
@@ -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)
diff --git a/CMake/file.cmake b/CMake/file.cmake
new file mode 100644 (file)
index 0000000..b9c8cf9
--- /dev/null
@@ -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 ()
diff --git a/CMake/have_decl_s_irgrp.c b/CMake/have_decl_s_irgrp.c
new file mode 100644 (file)
index 0000000..854a460
--- /dev/null
@@ -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 ;
+}
diff --git a/CMake/libsndfile.cmake b/CMake/libsndfile.cmake
new file mode 100644 (file)
index 0000000..080150d
--- /dev/null
@@ -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)
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..590429b
--- /dev/null
@@ -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")
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644 (file)
index 0000000..71f1226
--- /dev/null
@@ -0,0 +1,11 @@
+## Submitting Patches.
+
+* Patches should pass all pre-commit hook tests.
+* Patches should always be submitted via a either Github "pull request" or a
+  via emailed patches created using "git format-patch".
+* Patches for new features should include tests and documentation.
+* Patches to fix bugs should either pass all tests, or modify the tests in some
+  sane way.
+* When a new feature is added for a particular file format and that feature
+  makes sense for other formats, then it should also be implemented for one
+  or two of the other formats.
diff --git a/Cfg/compile b/Cfg/compile
deleted file mode 100755 (executable)
index a85b723..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-#! /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:
diff --git a/Cfg/config.guess b/Cfg/config.guess
deleted file mode 100755 (executable)
index 1659250..0000000
+++ /dev/null
@@ -1,1441 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
-
-timestamp='2015-08-20'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <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 Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-#
-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
-#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-#
-# Please send patches to <config-patches@gnu.org>.
-
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright 1992-2015 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-       for c in cc gcc c89 c99 ; do
-         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-            CC_FOR_BUILD="$c"; break ;
-         fi ;
-       done ;
-       if test x"$CC_FOR_BUILD" = x ; then
-         CC_FOR_BUILD=no_compiler_found ;
-       fi
-       ;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-       PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-case "${UNAME_SYSTEM}" in
-Linux|GNU|GNU/*)
-       # If the system lacks a compiler, then just pick glibc.
-       # We could probably try harder.
-       LIBC=gnu
-
-       eval $set_cc_for_build
-       cat <<-EOF > $dummy.c
-       #include <features.h>
-       #if defined(__UCLIBC__)
-       LIBC=uclibc
-       #elif defined(__dietlibc__)
-       LIBC=dietlibc
-       #else
-       LIBC=gnu
-       #endif
-       EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
-       ;;
-esac
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-       # NetBSD (nbsd) targets should (where applicable) match one or
-       # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
-       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-       # switched to ELF, *-*-netbsd* would select the old
-       # object file format.  This provides both forward
-       # compatibility and a consistent mechanism for selecting the
-       # object file format.
-       #
-       # Note: NetBSD doesn't particularly care about the vendor
-       # portion of the name.  We always set it to "unknown".
-       sysctl="sysctl -n hw.machine_arch"
-       UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-           /sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || \
-           echo unknown)`
-       case "${UNAME_MACHINE_ARCH}" in
-           armeb) machine=armeb-unknown ;;
-           arm*) machine=arm-unknown ;;
-           sh3el) machine=shl-unknown ;;
-           sh3eb) machine=sh-unknown ;;
-           sh5el) machine=sh5le-unknown ;;
-           earmv*)
-               arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
-               endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
-               machine=${arch}${endian}-unknown
-               ;;
-           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-       esac
-       # The Operating System including object format, if it has switched
-       # to ELF recently, or will in the future.
-       case "${UNAME_MACHINE_ARCH}" in
-           arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
-               eval $set_cc_for_build
-               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-                       | grep -q __ELF__
-               then
-                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-                   # Return netbsd for either.  FIX?
-                   os=netbsd
-               else
-                   os=netbsdelf
-               fi
-               ;;
-           *)
-               os=netbsd
-               ;;
-       esac
-       # Determine ABI tags.
-       case "${UNAME_MACHINE_ARCH}" in
-           earm*)
-               expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-               abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
-               ;;
-       esac
-       # The OS release
-       # Debian GNU/NetBSD machines have a different userland, and
-       # thus, need a distinct triplet. However, they do not need
-       # kernel version information, so it can be replaced with a
-       # suitable tag, in the style of linux-gnu.
-       case "${UNAME_VERSION}" in
-           Debian*)
-               release='-gnu'
-               ;;
-           *)
-               release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
-               ;;
-       esac
-       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-       # contains redundant information, the shorter form:
-       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}${abi}"
-       exit ;;
-    *:Bitrig:*:*)
-       UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
-       exit ;;
-    *:OpenBSD:*:*)
-       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-       exit ;;
-    *:ekkoBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-       exit ;;
-    *:SolidBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-       exit ;;
-    macppc:MirBSD:*:*)
-       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    *:MirBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-       exit ;;
-    *:Sortix:*:*)
-       echo ${UNAME_MACHINE}-unknown-sortix
-       exit ;;
-    alpha:OSF1:*:*)
-       case $UNAME_RELEASE in
-       *4.0)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-               ;;
-       *5.*)
-               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-               ;;
-       esac
-       # According to Compaq, /usr/sbin/psrinfo has been available on
-       # OSF/1 and Tru64 systems produced since 1995.  I hope that
-       # covers most systems running today.  This code pipes the CPU
-       # types through head -n 1, so we only detect the type of CPU 0.
-       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-       case "$ALPHA_CPU_TYPE" in
-           "EV4 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "EV4.5 (21064)")
-               UNAME_MACHINE="alpha" ;;
-           "LCA4 (21066/21068)")
-               UNAME_MACHINE="alpha" ;;
-           "EV5 (21164)")
-               UNAME_MACHINE="alphaev5" ;;
-           "EV5.6 (21164A)")
-               UNAME_MACHINE="alphaev56" ;;
-           "EV5.6 (21164PC)")
-               UNAME_MACHINE="alphapca56" ;;
-           "EV5.7 (21164PC)")
-               UNAME_MACHINE="alphapca57" ;;
-           "EV6 (21264)")
-               UNAME_MACHINE="alphaev6" ;;
-           "EV6.7 (21264A)")
-               UNAME_MACHINE="alphaev67" ;;
-           "EV6.8CB (21264C)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8AL (21264B)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.8CX (21264D)")
-               UNAME_MACHINE="alphaev68" ;;
-           "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE="alphaev69" ;;
-           "EV7 (21364)")
-               UNAME_MACHINE="alphaev7" ;;
-           "EV7.9 (21364A)")
-               UNAME_MACHINE="alphaev79" ;;
-       esac
-       # A Pn.n version is a patched version.
-       # A Vn.n version is a released version.
-       # A Tn.n version is a released field test version.
-       # A Xn.n version is an unreleased experimental baselevel.
-       # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-       exitcode=$?
-       trap '' 0
-       exit $exitcode ;;
-    Alpha\ *:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # Should we change UNAME_MACHINE based on the output of uname instead
-       # of the specific Alpha model?
-       echo alpha-pc-interix
-       exit ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
-       exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-unknown-sysv4
-       exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-amigaos
-       exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-morphos
-       exit ;;
-    *:OS/390:*:*)
-       echo i370-ibm-openedition
-       exit ;;
-    *:z/VM:*:*)
-       echo s390-ibm-zvmoe
-       exit ;;
-    *:OS400:*:*)
-       echo powerpc-ibm-os400
-       exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix${UNAME_RELEASE}
-       exit ;;
-    arm*:riscos:*:*|arm*:RISCOS:*:*)
-       echo arm-unknown-riscos
-       exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-       echo hppa1.1-hitachi-hiuxmpp
-       exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-       if test "`(/bin/universe) 2>/dev/null`" = att ; then
-               echo pyramid-pyramid-sysv3
-       else
-               echo pyramid-pyramid-bsd
-       fi
-       exit ;;
-    NILE*:*:*:dcosx)
-       echo pyramid-pyramid-svr4
-       exit ;;
-    DRS?6000:unix:4.0:6*)
-       echo sparc-icl-nx6
-       exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-       case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7; exit ;;
-       esac ;;
-    s390x:SunOS:*:*)
-       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4H:SunOS:5.*:*)
-       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-       echo i386-pc-auroraux${UNAME_RELEASE}
-       exit ;;
-    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-       eval $set_cc_for_build
-       SUN_ARCH="i386"
-       # If there is a compiler, see if it is configured for 64-bit objects.
-       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
-       # This test works for both compilers.
-       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-               grep IS_64BIT_ARCH >/dev/null
-           then
-               SUN_ARCH="x86_64"
-           fi
-       fi
-       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:6*:*)
-       # According to config.sub, this is the proper way to canonicalize
-       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-       # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    sun4*:SunOS:*:*)
-       case "`/usr/bin/arch -k`" in
-           Series*|S4*)
-               UNAME_RELEASE=`uname -v`
-               ;;
-       esac
-       # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit ;;
-    sun3*:SunOS:*:*)
-       echo m68k-sun-sunos${UNAME_RELEASE}
-       exit ;;
-    sun*:*:4.2BSD:*)
-       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-       case "`/bin/arch`" in
-           sun3)
-               echo m68k-sun-sunos${UNAME_RELEASE}
-               ;;
-           sun4)
-               echo sparc-sun-sunos${UNAME_RELEASE}
-               ;;
-       esac
-       exit ;;
-    aushp:SunOS:*:*)
-       echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-       echo m68k-milan-mint${UNAME_RELEASE}
-       exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-       echo m68k-hades-mint${UNAME_RELEASE}
-       exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-       echo m68k-unknown-mint${UNAME_RELEASE}
-       exit ;;
-    m68k:machten:*:*)
-       echo m68k-apple-machten${UNAME_RELEASE}
-       exit ;;
-    powerpc:machten:*:*)
-       echo powerpc-apple-machten${UNAME_RELEASE}
-       exit ;;
-    RISC*:Mach:*:*)
-       echo mips-dec-mach_bsd4.3
-       exit ;;
-    RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix${UNAME_RELEASE}
-       exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-       echo clipper-intergraph-clix${UNAME_RELEASE}
-       exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-       int main (int argc, char *argv[]) {
-#else
-       int main (argc, argv) int argc; char *argv[]; {
-#endif
-       #if defined (host_mips) && defined (MIPSEB)
-       #if defined (SYSTYPE_SYSV)
-         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_SVR4)
-         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-       #endif
-       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-       #endif
-       #endif
-         exit (-1);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c &&
-         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-         SYSTEM_NAME=`$dummy $dummyarg` &&
-           { echo "$SYSTEM_NAME"; exit; }
-       echo mips-mips-riscos${UNAME_RELEASE}
-       exit ;;
-    Motorola:PowerMAX_OS:*:*)
-       echo powerpc-motorola-powermax
-       exit ;;
-    Motorola:*:4.3:PL8-*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-       echo powerpc-harris-powermax
-       exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-       echo powerpc-harris-powerunix
-       exit ;;
-    m88k:CX/UX:7*:*)
-       echo m88k-harris-cxux7
-       exit ;;
-    m88k:*:4*:R4*)
-       echo m88k-motorola-sysv4
-       exit ;;
-    m88k:*:3*:R3*)
-       echo m88k-motorola-sysv3
-       exit ;;
-    AViiON:dgux:*:*)
-       # DG/UX returns AViiON for all architectures
-       UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-       then
-           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-              [ ${TARGET_BINARY_INTERFACE}x = x ]
-           then
-               echo m88k-dg-dgux${UNAME_RELEASE}
-           else
-               echo m88k-dg-dguxbcs${UNAME_RELEASE}
-           fi
-       else
-           echo i586-dg-dgux${UNAME_RELEASE}
-       fi
-       exit ;;
-    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
-       echo m88k-dolphin-sysv3
-       exit ;;
-    M88*:*:R3*:*)
-       # Delta 88k system running SVR3
-       echo m88k-motorola-sysv3
-       exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-       echo m88k-tektronix-sysv3
-       exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-       echo m68k-tektronix-bsd
-       exit ;;
-    *:IRIX*:*:*)
-       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-       echo i386-ibm-aix
-       exit ;;
-    ia64:AIX:*:*)
-       if [ -x /usr/bin/oslevel ] ; then
-               IBM_REV=`/usr/bin/oslevel`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:2:3)
-       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               eval $set_cc_for_build
-               sed 's/^                //' << EOF >$dummy.c
-               #include <sys/systemcfg.h>
-
-               main()
-                       {
-                       if (!__power_pc())
-                               exit(1);
-                       puts("powerpc-ibm-aix3.2.5");
-                       exit(0);
-                       }
-EOF
-               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-               then
-                       echo "$SYSTEM_NAME"
-               else
-                       echo rs6000-ibm-aix3.2.5
-               fi
-       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-               echo rs6000-ibm-aix3.2.4
-       else
-               echo rs6000-ibm-aix3.2
-       fi
-       exit ;;
-    *:AIX:*:[4567])
-       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-               IBM_ARCH=rs6000
-       else
-               IBM_ARCH=powerpc
-       fi
-       if [ -x /usr/bin/lslpp ] ; then
-               IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
-                          awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
-       else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-       fi
-       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit ;;
-    *:AIX:*:*)
-       echo rs6000-ibm-aix
-       exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-       echo romp-ibm-bsd4.4
-       exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-       exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-       echo rs6000-bull-bosx
-       exit ;;
-    DPX/2?00:B.O.S.:*:*)
-       echo m68k-bull-sysv3
-       exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-       echo m68k-hp-bsd
-       exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-       echo m68k-hp-bsd4.4
-       exit ;;
-    9000/[34678]??:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       case "${UNAME_MACHINE}" in
-           9000/31? )            HP_ARCH=m68000 ;;
-           9000/[34]?? )         HP_ARCH=m68k ;;
-           9000/[678][0-9][0-9])
-               if [ -x /usr/bin/getconf ]; then
-                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                   sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                   case "${sc_cpu_version}" in
-                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                     532)                      # CPU_PA_RISC2_0
-                       case "${sc_kernel_bits}" in
-                         32) HP_ARCH="hppa2.0n" ;;
-                         64) HP_ARCH="hppa2.0w" ;;
-                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                       esac ;;
-                   esac
-               fi
-               if [ "${HP_ARCH}" = "" ]; then
-                   eval $set_cc_for_build
-                   sed 's/^            //' << EOF >$dummy.c
-
-               #define _HPUX_SOURCE
-               #include <stdlib.h>
-               #include <unistd.h>
-
-               int main ()
-               {
-               #if defined(_SC_KERNEL_BITS)
-                   long bits = sysconf(_SC_KERNEL_BITS);
-               #endif
-                   long cpu  = sysconf (_SC_CPU_VERSION);
-
-                   switch (cpu)
-                       {
-                       case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-                       case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-                       case CPU_PA_RISC2_0:
-               #if defined(_SC_KERNEL_BITS)
-                           switch (bits)
-                               {
-                               case 64: puts ("hppa2.0w"); break;
-                               case 32: puts ("hppa2.0n"); break;
-                               default: puts ("hppa2.0"); break;
-                               } break;
-               #else  /* !defined(_SC_KERNEL_BITS) */
-                           puts ("hppa2.0"); break;
-               #endif
-                       default: puts ("hppa1.0"); break;
-                       }
-                   exit (0);
-               }
-EOF
-                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-                   test -z "$HP_ARCH" && HP_ARCH=hppa
-               fi ;;
-       esac
-       if [ ${HP_ARCH} = "hppa2.0w" ]
-       then
-           eval $set_cc_for_build
-
-           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-           # generating 64-bit code.  GNU and HP use different nomenclature:
-           #
-           # $ CC_FOR_BUILD=cc ./config.guess
-           # => hppa2.0w-hp-hpux11.23
-           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-           # => hppa64-hp-hpux11.23
-
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep -q __LP64__
-           then
-               HP_ARCH="hppa2.0w"
-           else
-               HP_ARCH="hppa64"
-           fi
-       fi
-       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit ;;
-    ia64:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       echo ia64-hp-hpux${HPUX_REV}
-       exit ;;
-    3050*:HI-UX:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <unistd.h>
-       int
-       main ()
-       {
-         long cpu = sysconf (_SC_CPU_VERSION);
-         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-            results, however.  */
-         if (CPU_IS_PA_RISC (cpu))
-           {
-             switch (cpu)
-               {
-                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-                 default: puts ("hppa-hitachi-hiuxwe2"); break;
-               }
-           }
-         else if (CPU_IS_HP_MC68K (cpu))
-           puts ("m68k-hitachi-hiuxwe2");
-         else puts ("unknown-hitachi-hiuxwe2");
-         exit (0);
-       }
-EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-               { echo "$SYSTEM_NAME"; exit; }
-       echo unknown-hitachi-hiuxwe2
-       exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-       echo hppa1.1-hp-bsd
-       exit ;;
-    9000/8??:4.3bsd:*:*)
-       echo hppa1.0-hp-bsd
-       exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-       echo hppa1.0-hp-mpeix
-       exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-       echo hppa1.1-hp-osf
-       exit ;;
-    hp8??:OSF1:*:*)
-       echo hppa1.0-hp-osf
-       exit ;;
-    i*86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
-           echo ${UNAME_MACHINE}-unknown-osf1mk
-       else
-           echo ${UNAME_MACHINE}-unknown-osf1
-       fi
-       exit ;;
-    parisc*:Lites*:*:*)
-       echo hppa1.1-hp-lites
-       exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-       echo c1-convex-bsd
-       exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-       echo c34-convex-bsd
-       exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-       echo c38-convex-bsd
-       exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-       echo c4-convex-bsd
-       exit ;;
-    CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*[A-Z]90:*:*:*)
-       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-             -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*T3E:*:*:*)
-       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    CRAY*SV1:*:*:*)
-       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    *:UNICOS/mp:*:*)
-       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-       FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-       echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
-    5000:UNIX_System_V:4.*:*)
-       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-       echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit ;;
-    sparc*:BSD/OS:*:*)
-       echo sparc-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
-    *:FreeBSD:*:*)
-       UNAME_PROCESSOR=`/usr/bin/uname -p`
-       case ${UNAME_PROCESSOR} in
-           amd64)
-               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           *)
-               echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-       esac
-       exit ;;
-    i*:CYGWIN*:*)
-       echo ${UNAME_MACHINE}-pc-cygwin
-       exit ;;
-    *:MINGW64*:*)
-       echo ${UNAME_MACHINE}-pc-mingw64
-       exit ;;
-    *:MINGW*:*)
-       echo ${UNAME_MACHINE}-pc-mingw32
-       exit ;;
-    *:MSYS*:*)
-       echo ${UNAME_MACHINE}-pc-msys
-       exit ;;
-    i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
-       exit ;;
-    i*:PW*:*)
-       echo ${UNAME_MACHINE}-pc-pw32
-       exit ;;
-    *:Interix*:*)
-       case ${UNAME_MACHINE} in
-           x86)
-               echo i586-pc-interix${UNAME_RELEASE}
-               exit ;;
-           authenticamd | genuineintel | EM64T)
-               echo x86_64-unknown-interix${UNAME_RELEASE}
-               exit ;;
-           IA64)
-               echo ia64-unknown-interix${UNAME_RELEASE}
-               exit ;;
-       esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-       echo i${UNAME_MACHINE}-pc-mks
-       exit ;;
-    8664:Windows_NT:*)
-       echo x86_64-pc-mks
-       exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-       # UNAME_MACHINE based on the output of uname instead of i386?
-       echo i586-pc-interix
-       exit ;;
-    i*:UWIN*:*)
-       echo ${UNAME_MACHINE}-pc-uwin
-       exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-       echo x86_64-unknown-cygwin
-       exit ;;
-    p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin
-       exit ;;
-    prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    *:GNU:*:*)
-       # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit ;;
-    *:GNU/*:*:*)
-       # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
-       exit ;;
-    i*86:Minix:*:*)
-       echo ${UNAME_MACHINE}-pc-minix
-       exit ;;
-    aarch64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    aarch64_be:Linux:*:*)
-       UNAME_MACHINE=aarch64_be
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-         EV5)   UNAME_MACHINE=alphaev5 ;;
-         EV56)  UNAME_MACHINE=alphaev56 ;;
-         PCA56) UNAME_MACHINE=alphapca56 ;;
-         PCA57) UNAME_MACHINE=alphapca56 ;;
-         EV6)   UNAME_MACHINE=alphaev6 ;;
-         EV67)  UNAME_MACHINE=alphaev67 ;;
-         EV68*) UNAME_MACHINE=alphaev68 ;;
-       esac
-       objdump --private-headers /bin/sh | grep -q ld.so.1
-       if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    arc:Linux:*:* | arceb:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    arm*:Linux:*:*)
-       eval $set_cc_for_build
-       if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
-           | grep -q __ARM_EABI__
-       then
-           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       else
-           if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
-               | grep -q __ARM_PCS_VFP
-           then
-               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
-           else
-               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
-           fi
-       fi
-       exit ;;
-    avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    cris:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
-       exit ;;
-    crisv32:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
-       exit ;;
-    e2k:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    frv:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    hexagon:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    i*86:Linux:*:*)
-       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
-       exit ;;
-    ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    mips:Linux:*:* | mips64:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #undef CPU
-       #undef ${UNAME_MACHINE}
-       #undef ${UNAME_MACHINE}el
-       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=${UNAME_MACHINE}el
-       #else
-       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=${UNAME_MACHINE}
-       #else
-       CPU=
-       #endif
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
-       ;;
-    openrisc*:Linux:*:*)
-       echo or1k-unknown-linux-${LIBC}
-       exit ;;
-    or32:Linux:*:* | or1k*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    padre:Linux:*:*)
-       echo sparc-unknown-linux-${LIBC}
-       exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-${LIBC}
-       exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-       # Look for CPU level
-       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
-         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-         *)    echo hppa-unknown-linux-${LIBC} ;;
-       esac
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-${LIBC}
-       exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-${LIBC}
-       exit ;;
-    ppc64le:Linux:*:*)
-       echo powerpc64le-unknown-linux-${LIBC}
-       exit ;;
-    ppcle:Linux:*:*)
-       echo powerpcle-unknown-linux-${LIBC}
-       exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
-       exit ;;
-    sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    tile*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
-       exit ;;
-    x86_64:Linux:*:*)
-       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
-       exit ;;
-    xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
-    i*86:DYNIX/ptx:4*:*)
-       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-       # earlier versions are messed up and put the nodename in both
-       # sysname and nodename.
-       echo i386-sequent-sysv4
-       exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-       # Unixware is an offshoot of SVR4, but it has its own version
-       # number series starting with 2...
-       # I am not positive that other SVR4 systems won't match this,
-       # I just have to hope.  -- rms.
-       # Use sysv4.2uw... so that sysv4* matches it.
-       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-       exit ;;
-    i*86:OS/2:*:*)
-       # If we were able to find `uname', then EMX Unix compatibility
-       # is probably installed.
-       echo ${UNAME_MACHINE}-pc-os2-emx
-       exit ;;
-    i*86:XTS-300:*:STOP)
-       echo ${UNAME_MACHINE}-unknown-stop
-       exit ;;
-    i*86:atheos:*:*)
-       echo ${UNAME_MACHINE}-unknown-atheos
-       exit ;;
-    i*86:syllable:*:*)
-       echo ${UNAME_MACHINE}-pc-syllable
-       exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-       echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    i*86:*DOS:*:*)
-       echo ${UNAME_MACHINE}-pc-msdosdjgpp
-       exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-       else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-       fi
-       exit ;;
-    i*86:*:5:[678]*)
-       # UnixWare 7.x, OpenUNIX and OpenServer 6.
-       case `/bin/uname -X | grep "^Machine"` in
-           *486*)           UNAME_MACHINE=i486 ;;
-           *Pentium)        UNAME_MACHINE=i586 ;;
-           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-       esac
-       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-       exit ;;
-    i*86:*:3.2:*)
-       if test -f /usr/options/cb.name; then
-               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-       elif /bin/uname -X 2>/dev/null >/dev/null ; then
-               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-                       && UNAME_MACHINE=i586
-               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-                       && UNAME_MACHINE=i686
-               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-       else
-               echo ${UNAME_MACHINE}-pc-sysv32
-       fi
-       exit ;;
-    pc:*:*:*)
-       # Left here for compatibility:
-       # uname -m prints for DJGPP always 'pc', but it prints nothing about
-       # the processor, so we play safe by assuming i586.
-       # Note: whatever this is, it MUST be the same as what config.sub
-       # prints for the "djgpp" host, or else GDB configury will decide that
-       # this is a cross-build.
-       echo i586-pc-msdosdjgpp
-       exit ;;
-    Intel:Mach:3*:*)
-       echo i386-pc-mach3
-       exit ;;
-    paragon:*:*:*)
-       echo i860-intel-osf1
-       exit ;;
-    i860:*:4.*:*) # i860-SVR4
-       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-       else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-       fi
-       exit ;;
-    mini*:CTIX:SYS*5:*)
-       # "miniframe"
-       echo m68010-convergent-sysv
-       exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-       echo m68k-convergent-sysv
-       exit ;;
-    M680?0:D-NIX:5.3:*)
-       echo m68k-diab-dnix
-       exit ;;
-    M68*:*:R3V[5678]*:*)
-       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-       OS_REL=''
-       test -r /etc/.relid \
-       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && { echo i486-ncr-sysv4; exit; } ;;
-    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
-       OS_REL='.3'
-       test -r /etc/.relid \
-           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
-       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-       echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-       echo m68k-atari-sysv4
-       exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    rs6000:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-       echo powerpc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv${UNAME_RELEASE}
-       exit ;;
-    RM*:ReliantUNIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    RM*:SINIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
-    *:SINIX-*:*:*)
-       if uname -p 2>/dev/null >/dev/null ; then
-               UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo ${UNAME_MACHINE}-sni-sysv4
-       else
-               echo ns32k-sni-sysv
-       fi
-       exit ;;
-    PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                       # says <Richard.M.Bartel@ccMail.Census.GOV>
-       echo i586-unisys-sysv4
-       exit ;;
-    *:UNIX_System_V:4*:FTX*)
-       # From Gerald Hewes <hewes@openmarket.com>.
-       # How about differentiating between stratus architectures? -djm
-       echo hppa1.1-stratus-sysv4
-       exit ;;
-    *:*:*:FTX*)
-       # From seanf@swdc.stratus.com.
-       echo i860-stratus-sysv4
-       exit ;;
-    i*86:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo ${UNAME_MACHINE}-stratus-vos
-       exit ;;
-    *:VOS:*:*)
-       # From Paul.Green@stratus.com.
-       echo hppa1.1-stratus-vos
-       exit ;;
-    mc68*:A/UX:*:*)
-       echo m68k-apple-aux${UNAME_RELEASE}
-       exit ;;
-    news*:NEWS-OS:6*:*)
-       echo mips-sony-newsos6
-       exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-       if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
-       else
-               echo mips-unknown-sysv${UNAME_RELEASE}
-       fi
-       exit ;;
-    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
-       echo powerpc-be-beos
-       exit ;;
-    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
-       echo powerpc-apple-beos
-       exit ;;
-    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
-       echo i586-pc-beos
-       exit ;;
-    BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
-       echo i586-pc-haiku
-       exit ;;
-    x86_64:Haiku:*:*)
-       echo x86_64-unknown-haiku
-       exit ;;
-    SX-4:SUPER-UX:*:*)
-       echo sx4-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-5:SUPER-UX:*:*)
-       echo sx5-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-6:SUPER-UX:*:*)
-       echo sx6-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-7:SUPER-UX:*:*)
-       echo sx7-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-8:SUPER-UX:*:*)
-       echo sx8-nec-superux${UNAME_RELEASE}
-       exit ;;
-    SX-8R:SUPER-UX:*:*)
-       echo sx8r-nec-superux${UNAME_RELEASE}
-       exit ;;
-    Power*:Rhapsody:*:*)
-       echo powerpc-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Rhapsody:*:*)
-       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
-    *:Darwin:*:*)
-       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       eval $set_cc_for_build
-       if test "$UNAME_PROCESSOR" = unknown ; then
-           UNAME_PROCESSOR=powerpc
-       fi
-       if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
-           if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                   (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-                   grep IS_64BIT_ARCH >/dev/null
-               then
-                   case $UNAME_PROCESSOR in
-                       i386) UNAME_PROCESSOR=x86_64 ;;
-                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
-                   esac
-               fi
-           fi
-       elif test "$UNAME_PROCESSOR" = i386 ; then
-           # Avoid executing cc on OS X 10.9, as it ships with a stub
-           # that puts up a graphical alert prompting to install
-           # developer tools.  Any system running Mac OS X 10.7 or
-           # later (Darwin 11 and later) is required to have a 64-bit
-           # processor. This is not true of the ARM version of Darwin
-           # that Apple uses in portable devices.
-           UNAME_PROCESSOR=x86_64
-       fi
-       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-       exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-       UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = "x86"; then
-               UNAME_PROCESSOR=i386
-               UNAME_MACHINE=pc
-       fi
-       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-       exit ;;
-    *:QNX:*:4*)
-       echo i386-pc-qnx
-       exit ;;
-    NEO-?:NONSTOP_KERNEL:*:*)
-       echo neo-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    NSE-*:NONSTOP_KERNEL:*:*)
-       echo nse-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-       echo nsr-tandem-nsk${UNAME_RELEASE}
-       exit ;;
-    *:NonStop-UX:*:*)
-       echo mips-compaq-nonstopux
-       exit ;;
-    BS2000:POSIX*:*:*)
-       echo bs2000-siemens-sysv
-       exit ;;
-    DS/*:UNIX_System_V:*:*)
-       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-       exit ;;
-    *:Plan9:*:*)
-       # "uname -m" is not consistent, so use $cputype instead. 386
-       # is converted to i386 for consistency with other x86
-       # operating systems.
-       if test "$cputype" = "386"; then
-           UNAME_MACHINE=i386
-       else
-           UNAME_MACHINE="$cputype"
-       fi
-       echo ${UNAME_MACHINE}-unknown-plan9
-       exit ;;
-    *:TOPS-10:*:*)
-       echo pdp10-unknown-tops10
-       exit ;;
-    *:TENEX:*:*)
-       echo pdp10-unknown-tenex
-       exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-       echo pdp10-dec-tops20
-       exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-       echo pdp10-xkl-tops20
-       exit ;;
-    *:TOPS-20:*:*)
-       echo pdp10-unknown-tops20
-       exit ;;
-    *:ITS:*:*)
-       echo pdp10-unknown-its
-       exit ;;
-    SEI:*:*:SEIUX)
-       echo mips-sei-seiux${UNAME_RELEASE}
-       exit ;;
-    *:DragonFly:*:*)
-       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-       exit ;;
-    *:*VMS:*:*)
-       UNAME_MACHINE=`(uname -p) 2>/dev/null`
-       case "${UNAME_MACHINE}" in
-           A*) echo alpha-dec-vms ; exit ;;
-           I*) echo ia64-dec-vms ; exit ;;
-           V*) echo vax-dec-vms ; exit ;;
-       esac ;;
-    *:XENIX:*:SysV)
-       echo i386-pc-xenix
-       exit ;;
-    i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-       exit ;;
-    i*86:rdos:*:*)
-       echo ${UNAME_MACHINE}-pc-rdos
-       exit ;;
-    i*86:AROS:*:*)
-       echo ${UNAME_MACHINE}-pc-aros
-       exit ;;
-    x86_64:VMkernel:*:*)
-       echo ${UNAME_MACHINE}-unknown-esx
-       exit ;;
-esac
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/Cfg/config.sub b/Cfg/config.sub
deleted file mode 100755 (executable)
index 1acc966..0000000
+++ /dev/null
@@ -1,1813 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright 1992-2015 Free Software Foundation, Inc.
-
-timestamp='2015-08-20'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <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 Exception is an additional permission under section 7
-# of the GNU General Public License, version 3 ("GPLv3").
-
-
-# Please send patches to <config-patches@gnu.org>.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright 1992-2015 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )        # Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
-  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
-  kopensolaris*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  android-linux)
-    os=-linux-android
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-       -sun*os*)
-               # Prevent following clause from handling this invalid input.
-               ;;
-       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis | -knuth | -cray | -microblaze*)
-               os=
-               basic_machine=$1
-               ;;
-       -bluegene*)
-               os=-cnk
-               ;;
-       -sim | -cisco | -oki | -wec | -winbond)
-               os=
-               basic_machine=$1
-               ;;
-       -scout)
-               ;;
-       -wrs)
-               os=-vxworks
-               basic_machine=$1
-               ;;
-       -chorusos*)
-               os=-chorusos
-               basic_machine=$1
-               ;;
-       -chorusrdb)
-               os=-chorusrdb
-               basic_machine=$1
-               ;;
-       -hiux*)
-               os=-hiuxwe2
-               ;;
-       -sco6)
-               os=-sco5v6
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5)
-               os=-sco3.2v5
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco4)
-               os=-sco3.2v4
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco3.2v[4-9]*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco5v6*)
-               # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -sco*)
-               os=-sco3.2v2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -udk*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -isc)
-               os=-isc2.2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -clix*)
-               basic_machine=clipper-intergraph
-               ;;
-       -isc*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-               ;;
-       -lynx*178)
-               os=-lynxos178
-               ;;
-       -lynx*5)
-               os=-lynxos5
-               ;;
-       -lynx*)
-               os=-lynxos
-               ;;
-       -ptx*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-               ;;
-       -windowsnt*)
-               os=`echo $os | sed -e 's/windowsnt/winnt/'`
-               ;;
-       -psos*)
-               os=-psos
-               ;;
-       -mint | -mint[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-       # Recognize the basic CPU types without company name.
-       # Some are omitted here because they have special meanings below.
-       1750a | 580 \
-       | a29k \
-       | aarch64 | aarch64_be \
-       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-       | am33_2.0 \
-       | arc | arceb \
-       | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
-       | avr | avr32 \
-       | ba \
-       | be32 | be64 \
-       | bfin \
-       | c4x | c8051 | clipper \
-       | d10v | d30v | dlx | dsp16xx \
-       | e2k | epiphany \
-       | fido | fr30 | frv | ft32 \
-       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-       | hexagon \
-       | i370 | i860 | i960 | ia64 \
-       | ip2k | iq2000 \
-       | k1om \
-       | le32 | le64 \
-       | lm32 \
-       | m32c | m32r | m32rle | m68000 | m68k | m88k \
-       | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
-       | mips | mipsbe | mipseb | mipsel | mipsle \
-       | mips16 \
-       | mips64 | mips64el \
-       | mips64octeon | mips64octeonel \
-       | mips64orion | mips64orionel \
-       | mips64r5900 | mips64r5900el \
-       | mips64vr | mips64vrel \
-       | mips64vr4100 | mips64vr4100el \
-       | mips64vr4300 | mips64vr4300el \
-       | mips64vr5000 | mips64vr5000el \
-       | mips64vr5900 | mips64vr5900el \
-       | mipsisa32 | mipsisa32el \
-       | mipsisa32r2 | mipsisa32r2el \
-       | mipsisa32r6 | mipsisa32r6el \
-       | mipsisa64 | mipsisa64el \
-       | mipsisa64r2 | mipsisa64r2el \
-       | mipsisa64r6 | mipsisa64r6el \
-       | mipsisa64sb1 | mipsisa64sb1el \
-       | mipsisa64sr71k | mipsisa64sr71kel \
-       | mipsr5900 | mipsr5900el \
-       | mipstx39 | mipstx39el \
-       | mn10200 | mn10300 \
-       | moxie \
-       | mt \
-       | msp430 \
-       | nds32 | nds32le | nds32be \
-       | nios | nios2 | nios2eb | nios2el \
-       | ns16k | ns32k \
-       | open8 | or1k | or1knd | or32 \
-       | pdp10 | pdp11 | pj | pjl \
-       | powerpc | powerpc64 | powerpc64le | powerpcle \
-       | pyramid \
-       | riscv32 | riscv64 \
-       | rl78 | rx \
-       | score \
-       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
-       | sh64 | sh64le \
-       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
-       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
-       | spu \
-       | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
-       | ubicom32 \
-       | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
-       | visium \
-       | we32k \
-       | x86 | xc16x | xstormy16 | xtensa \
-       | z8k | z80)
-               basic_machine=$basic_machine-unknown
-               ;;
-       c54x)
-               basic_machine=tic54x-unknown
-               ;;
-       c55x)
-               basic_machine=tic55x-unknown
-               ;;
-       c6x)
-               basic_machine=tic6x-unknown
-               ;;
-       leon|leon[3-9])
-               basic_machine=sparc-$basic_machine
-               ;;
-       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
-               basic_machine=$basic_machine-unknown
-               os=-none
-               ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-               ;;
-       ms1)
-               basic_machine=mt-unknown
-               ;;
-
-       strongarm | thumb | xscale)
-               basic_machine=arm-unknown
-               ;;
-       xgate)
-               basic_machine=$basic_machine-unknown
-               os=-none
-               ;;
-       xscaleeb)
-               basic_machine=armeb-unknown
-               ;;
-
-       xscaleel)
-               basic_machine=armel-unknown
-               ;;
-
-       # We use `pc' rather than `unknown'
-       # because (1) that's what they normally are, and
-       # (2) the word "unknown" tends to confuse beginning users.
-       i*86 | x86_64)
-         basic_machine=$basic_machine-pc
-         ;;
-       # Object if more than one company name word.
-       *-*-*)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-       # Recognize the basic CPU types with company name.
-       580-* \
-       | a29k-* \
-       | aarch64-* | aarch64_be-* \
-       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
-       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-       | avr-* | avr32-* \
-       | ba-* \
-       | be32-* | be64-* \
-       | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* \
-       | c8051-* | clipper-* | craynv-* | cydra-* \
-       | d10v-* | d30v-* | dlx-* \
-       | e2k-* | elxsi-* \
-       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
-       | h8300-* | h8500-* \
-       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-       | hexagon-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* | iq2000-* \
-       | k1om-* \
-       | le32-* | le64-* \
-       | lm32-* \
-       | m32c-* | m32r-* | m32rle-* \
-       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
-       | microblaze-* | microblazeel-* \
-       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-       | mips16-* \
-       | mips64-* | mips64el-* \
-       | mips64octeon-* | mips64octeonel-* \
-       | mips64orion-* | mips64orionel-* \
-       | mips64r5900-* | mips64r5900el-* \
-       | mips64vr-* | mips64vrel-* \
-       | mips64vr4100-* | mips64vr4100el-* \
-       | mips64vr4300-* | mips64vr4300el-* \
-       | mips64vr5000-* | mips64vr5000el-* \
-       | mips64vr5900-* | mips64vr5900el-* \
-       | mipsisa32-* | mipsisa32el-* \
-       | mipsisa32r2-* | mipsisa32r2el-* \
-       | mipsisa32r6-* | mipsisa32r6el-* \
-       | mipsisa64-* | mipsisa64el-* \
-       | mipsisa64r2-* | mipsisa64r2el-* \
-       | mipsisa64r6-* | mipsisa64r6el-* \
-       | mipsisa64sb1-* | mipsisa64sb1el-* \
-       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
-       | mipsr5900-* | mipsr5900el-* \
-       | mipstx39-* | mipstx39el-* \
-       | mmix-* \
-       | mt-* \
-       | msp430-* \
-       | nds32-* | nds32le-* | nds32be-* \
-       | nios-* | nios2-* | nios2eb-* | nios2el-* \
-       | none-* | np1-* | ns16k-* | ns32k-* \
-       | open8-* \
-       | or1k*-* \
-       | orion-* \
-       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
-       | pyramid-* \
-       | riscv32-* | riscv64-* \
-       | rl78-* | romp-* | rs6000-* | rx-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
-       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
-       | sparclite-* \
-       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
-       | tahoe-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-       | tile*-* \
-       | tron-* \
-       | ubicom32-* \
-       | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
-       | vax-* \
-       | visium-* \
-       | we32k-* \
-       | x86-* | x86_64-* | xc16x-* | xps100-* \
-       | xstormy16-* | xtensa*-* \
-       | ymp-* \
-       | z8k-* | z80-*)
-               ;;
-       # Recognize the basic CPU types without company name, with glob match.
-       xtensa*)
-               basic_machine=$basic_machine-unknown
-               ;;
-       # Recognize the various machine names and aliases which stand
-       # for a CPU type and a company and sometimes even an OS.
-       386bsd)
-               basic_machine=i386-unknown
-               os=-bsd
-               ;;
-       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-               basic_machine=m68000-att
-               ;;
-       3b*)
-               basic_machine=we32k-att
-               ;;
-       a29khif)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       abacus)
-               basic_machine=abacus-unknown
-               ;;
-       adobe68k)
-               basic_machine=m68010-adobe
-               os=-scout
-               ;;
-       alliant | fx80)
-               basic_machine=fx80-alliant
-               ;;
-       altos | altos3068)
-               basic_machine=m68k-altos
-               ;;
-       am29k)
-               basic_machine=a29k-none
-               os=-bsd
-               ;;
-       amd64)
-               basic_machine=x86_64-pc
-               ;;
-       amd64-*)
-               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       amdahl)
-               basic_machine=580-amdahl
-               os=-sysv
-               ;;
-       amiga | amiga-*)
-               basic_machine=m68k-unknown
-               ;;
-       amigaos | amigados)
-               basic_machine=m68k-unknown
-               os=-amigaos
-               ;;
-       amigaunix | amix)
-               basic_machine=m68k-unknown
-               os=-sysv4
-               ;;
-       apollo68)
-               basic_machine=m68k-apollo
-               os=-sysv
-               ;;
-       apollo68bsd)
-               basic_machine=m68k-apollo
-               os=-bsd
-               ;;
-       aros)
-               basic_machine=i386-pc
-               os=-aros
-               ;;
-        asmjs)
-               basic_machine=asmjs-unknown
-               ;;
-       aux)
-               basic_machine=m68k-apple
-               os=-aux
-               ;;
-       balance)
-               basic_machine=ns32k-sequent
-               os=-dynix
-               ;;
-       blackfin)
-               basic_machine=bfin-unknown
-               os=-linux
-               ;;
-       blackfin-*)
-               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
-               os=-linux
-               ;;
-       bluegene*)
-               basic_machine=powerpc-ibm
-               os=-cnk
-               ;;
-       c54x-*)
-               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       c55x-*)
-               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       c6x-*)
-               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       c90)
-               basic_machine=c90-cray
-               os=-unicos
-               ;;
-       cegcc)
-               basic_machine=arm-unknown
-               os=-cegcc
-               ;;
-       convex-c1)
-               basic_machine=c1-convex
-               os=-bsd
-               ;;
-       convex-c2)
-               basic_machine=c2-convex
-               os=-bsd
-               ;;
-       convex-c32)
-               basic_machine=c32-convex
-               os=-bsd
-               ;;
-       convex-c34)
-               basic_machine=c34-convex
-               os=-bsd
-               ;;
-       convex-c38)
-               basic_machine=c38-convex
-               os=-bsd
-               ;;
-       cray | j90)
-               basic_machine=j90-cray
-               os=-unicos
-               ;;
-       craynv)
-               basic_machine=craynv-cray
-               os=-unicosmp
-               ;;
-       cr16 | cr16-*)
-               basic_machine=cr16-unknown
-               os=-elf
-               ;;
-       crds | unos)
-               basic_machine=m68k-crds
-               ;;
-       crisv32 | crisv32-* | etraxfs*)
-               basic_machine=crisv32-axis
-               ;;
-       cris | cris-* | etrax*)
-               basic_machine=cris-axis
-               ;;
-       crx)
-               basic_machine=crx-unknown
-               os=-elf
-               ;;
-       da30 | da30-*)
-               basic_machine=m68k-da30
-               ;;
-       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-               basic_machine=mips-dec
-               ;;
-       decsystem10* | dec10*)
-               basic_machine=pdp10-dec
-               os=-tops10
-               ;;
-       decsystem20* | dec20*)
-               basic_machine=pdp10-dec
-               os=-tops20
-               ;;
-       delta | 3300 | motorola-3300 | motorola-delta \
-             | 3300-motorola | delta-motorola)
-               basic_machine=m68k-motorola
-               ;;
-       delta88)
-               basic_machine=m88k-motorola
-               os=-sysv3
-               ;;
-       dicos)
-               basic_machine=i686-pc
-               os=-dicos
-               ;;
-       djgpp)
-               basic_machine=i586-pc
-               os=-msdosdjgpp
-               ;;
-       dpx20 | dpx20-*)
-               basic_machine=rs6000-bull
-               os=-bosx
-               ;;
-       dpx2* | dpx2*-bull)
-               basic_machine=m68k-bull
-               os=-sysv3
-               ;;
-       ebmon29k)
-               basic_machine=a29k-amd
-               os=-ebmon
-               ;;
-       elxsi)
-               basic_machine=elxsi-elxsi
-               os=-bsd
-               ;;
-       encore | umax | mmax)
-               basic_machine=ns32k-encore
-               ;;
-       es1800 | OSE68k | ose68k | ose | OSE)
-               basic_machine=m68k-ericsson
-               os=-ose
-               ;;
-       fx2800)
-               basic_machine=i860-alliant
-               ;;
-       genix)
-               basic_machine=ns32k-ns
-               ;;
-       gmicro)
-               basic_machine=tron-gmicro
-               os=-sysv
-               ;;
-       go32)
-               basic_machine=i386-pc
-               os=-go32
-               ;;
-       h3050r* | hiux*)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       h8300hms)
-               basic_machine=h8300-hitachi
-               os=-hms
-               ;;
-       h8300xray)
-               basic_machine=h8300-hitachi
-               os=-xray
-               ;;
-       h8500hms)
-               basic_machine=h8500-hitachi
-               os=-hms
-               ;;
-       harris)
-               basic_machine=m88k-harris
-               os=-sysv3
-               ;;
-       hp300-*)
-               basic_machine=m68k-hp
-               ;;
-       hp300bsd)
-               basic_machine=m68k-hp
-               os=-bsd
-               ;;
-       hp300hpux)
-               basic_machine=m68k-hp
-               os=-hpux
-               ;;
-       hp3k9[0-9][0-9] | hp9[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k2[0-9][0-9] | hp9k31[0-9])
-               basic_machine=m68000-hp
-               ;;
-       hp9k3[2-9][0-9])
-               basic_machine=m68k-hp
-               ;;
-       hp9k6[0-9][0-9] | hp6[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hp9k7[0-79][0-9] | hp7[0-79][0-9])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k78[0-9] | hp78[0-9])
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-               # FIXME: really hppa2.0-hp
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][13679] | hp8[0-9][13679])
-               basic_machine=hppa1.1-hp
-               ;;
-       hp9k8[0-9][0-9] | hp8[0-9][0-9])
-               basic_machine=hppa1.0-hp
-               ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
-       hppaosf)
-               basic_machine=hppa1.1-hp
-               os=-osf
-               ;;
-       hppro)
-               basic_machine=hppa1.1-hp
-               os=-proelf
-               ;;
-       i370-ibm* | ibm*)
-               basic_machine=i370-ibm
-               ;;
-       i*86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv32
-               ;;
-       i*86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv4
-               ;;
-       i*86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-sysv
-               ;;
-       i*86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-               os=-solaris2
-               ;;
-       i386mach)
-               basic_machine=i386-mach
-               os=-mach
-               ;;
-       i386-vsta | vsta)
-               basic_machine=i386-unknown
-               os=-vsta
-               ;;
-       iris | iris4d)
-               basic_machine=mips-sgi
-               case $os in
-                   -irix*)
-                       ;;
-                   *)
-                       os=-irix4
-                       ;;
-               esac
-               ;;
-       isi68 | isi)
-               basic_machine=m68k-isi
-               os=-sysv
-               ;;
-       leon-*|leon[3-9]-*)
-               basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
-               ;;
-       m68knommu)
-               basic_machine=m68k-unknown
-               os=-linux
-               ;;
-       m68knommu-*)
-               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
-               os=-linux
-               ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
-       magnum | m3230)
-               basic_machine=mips-mips
-               os=-sysv
-               ;;
-       merlin)
-               basic_machine=ns32k-utek
-               os=-sysv
-               ;;
-       microblaze*)
-               basic_machine=microblaze-xilinx
-               ;;
-       mingw64)
-               basic_machine=x86_64-pc
-               os=-mingw64
-               ;;
-       mingw32)
-               basic_machine=i686-pc
-               os=-mingw32
-               ;;
-       mingw32ce)
-               basic_machine=arm-unknown
-               os=-mingw32ce
-               ;;
-       miniframe)
-               basic_machine=m68000-convergent
-               ;;
-       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-               basic_machine=m68k-atari
-               os=-mint
-               ;;
-       mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-               ;;
-       mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-               ;;
-       monitor)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       morphos)
-               basic_machine=powerpc-unknown
-               os=-morphos
-               ;;
-       moxiebox)
-               basic_machine=moxie-unknown
-               os=-moxiebox
-               ;;
-       msdos)
-               basic_machine=i386-pc
-               os=-msdos
-               ;;
-       ms1-*)
-               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-               ;;
-       msys)
-               basic_machine=i686-pc
-               os=-msys
-               ;;
-       mvs)
-               basic_machine=i370-ibm
-               os=-mvs
-               ;;
-       nacl)
-               basic_machine=le32-unknown
-               os=-nacl
-               ;;
-       ncr3000)
-               basic_machine=i486-ncr
-               os=-sysv4
-               ;;
-       netbsd386)
-               basic_machine=i386-unknown
-               os=-netbsd
-               ;;
-       netwinder)
-               basic_machine=armv4l-rebel
-               os=-linux
-               ;;
-       news | news700 | news800 | news900)
-               basic_machine=m68k-sony
-               os=-newsos
-               ;;
-       news1000)
-               basic_machine=m68030-sony
-               os=-newsos
-               ;;
-       news-3600 | risc-news)
-               basic_machine=mips-sony
-               os=-newsos
-               ;;
-       necv70)
-               basic_machine=v70-nec
-               os=-sysv
-               ;;
-       next | m*-next )
-               basic_machine=m68k-next
-               case $os in
-                   -nextstep* )
-                       ;;
-                   -ns2*)
-                     os=-nextstep2
-                       ;;
-                   *)
-                     os=-nextstep3
-                       ;;
-               esac
-               ;;
-       nh3000)
-               basic_machine=m68k-harris
-               os=-cxux
-               ;;
-       nh[45]000)
-               basic_machine=m88k-harris
-               os=-cxux
-               ;;
-       nindy960)
-               basic_machine=i960-intel
-               os=-nindy
-               ;;
-       mon960)
-               basic_machine=i960-intel
-               os=-mon960
-               ;;
-       nonstopux)
-               basic_machine=mips-compaq
-               os=-nonstopux
-               ;;
-       np1)
-               basic_machine=np1-gould
-               ;;
-       neo-tandem)
-               basic_machine=neo-tandem
-               ;;
-       nse-tandem)
-               basic_machine=nse-tandem
-               ;;
-       nsr-tandem)
-               basic_machine=nsr-tandem
-               ;;
-       op50n-* | op60c-*)
-               basic_machine=hppa1.1-oki
-               os=-proelf
-               ;;
-       openrisc | openrisc-*)
-               basic_machine=or32-unknown
-               ;;
-       os400)
-               basic_machine=powerpc-ibm
-               os=-os400
-               ;;
-       OSE68000 | ose68000)
-               basic_machine=m68000-ericsson
-               os=-ose
-               ;;
-       os68k)
-               basic_machine=m68k-none
-               os=-os68k
-               ;;
-       pa-hitachi)
-               basic_machine=hppa1.1-hitachi
-               os=-hiuxwe2
-               ;;
-       paragon)
-               basic_machine=i860-intel
-               os=-osf
-               ;;
-       parisc)
-               basic_machine=hppa-unknown
-               os=-linux
-               ;;
-       parisc-*)
-               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
-               os=-linux
-               ;;
-       pbd)
-               basic_machine=sparc-tti
-               ;;
-       pbb)
-               basic_machine=m68k-tti
-               ;;
-       pc532 | pc532-*)
-               basic_machine=ns32k-pc532
-               ;;
-       pc98)
-               basic_machine=i386-pc
-               ;;
-       pc98-*)
-               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium | p5 | k5 | k6 | nexgen | viac3)
-               basic_machine=i586-pc
-               ;;
-       pentiumpro | p6 | 6x86 | athlon | athlon_*)
-               basic_machine=i686-pc
-               ;;
-       pentiumii | pentium2 | pentiumiii | pentium3)
-               basic_machine=i686-pc
-               ;;
-       pentium4)
-               basic_machine=i786-pc
-               ;;
-       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumpro-* | p6-* | 6x86-* | athlon-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pentium4-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       pn)
-               basic_machine=pn-gould
-               ;;
-       power)  basic_machine=power-ibm
-               ;;
-       ppc | ppcbe)    basic_machine=powerpc-unknown
-               ;;
-       ppc-* | ppcbe-*)
-               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppcle | powerpclittle | ppc-le | powerpc-little)
-               basic_machine=powerpcle-unknown
-               ;;
-       ppcle-* | powerpclittle-*)
-               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64)  basic_machine=powerpc64-unknown
-               ;;
-       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-               basic_machine=powerpc64le-unknown
-               ;;
-       ppc64le-* | powerpc64little-*)
-               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       ps2)
-               basic_machine=i386-ibm
-               ;;
-       pw32)
-               basic_machine=i586-unknown
-               os=-pw32
-               ;;
-       rdos | rdos64)
-               basic_machine=x86_64-pc
-               os=-rdos
-               ;;
-       rdos32)
-               basic_machine=i386-pc
-               os=-rdos
-               ;;
-       rom68k)
-               basic_machine=m68k-rom68k
-               os=-coff
-               ;;
-       rm[46]00)
-               basic_machine=mips-siemens
-               ;;
-       rtpc | rtpc-*)
-               basic_machine=romp-ibm
-               ;;
-       s390 | s390-*)
-               basic_machine=s390-ibm
-               ;;
-       s390x | s390x-*)
-               basic_machine=s390x-ibm
-               ;;
-       sa29200)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       sb1)
-               basic_machine=mipsisa64sb1-unknown
-               ;;
-       sb1el)
-               basic_machine=mipsisa64sb1el-unknown
-               ;;
-       sde)
-               basic_machine=mipsisa32-sde
-               os=-elf
-               ;;
-       sei)
-               basic_machine=mips-sei
-               os=-seiux
-               ;;
-       sequent)
-               basic_machine=i386-sequent
-               ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
-       sh5el)
-               basic_machine=sh5le-unknown
-               ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparclite-wrs | simso-wrs)
-               basic_machine=sparclite-wrs
-               os=-vxworks
-               ;;
-       sps7)
-               basic_machine=m68k-bull
-               os=-sysv2
-               ;;
-       spur)
-               basic_machine=spur-unknown
-               ;;
-       st2000)
-               basic_machine=m68k-tandem
-               ;;
-       stratus)
-               basic_machine=i860-stratus
-               os=-sysv4
-               ;;
-       strongarm-* | thumb-*)
-               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
-               ;;
-       sun2)
-               basic_machine=m68000-sun
-               ;;
-       sun2os3)
-               basic_machine=m68000-sun
-               os=-sunos3
-               ;;
-       sun2os4)
-               basic_machine=m68000-sun
-               os=-sunos4
-               ;;
-       sun3os3)
-               basic_machine=m68k-sun
-               os=-sunos3
-               ;;
-       sun3os4)
-               basic_machine=m68k-sun
-               os=-sunos4
-               ;;
-       sun4os3)
-               basic_machine=sparc-sun
-               os=-sunos3
-               ;;
-       sun4os4)
-               basic_machine=sparc-sun
-               os=-sunos4
-               ;;
-       sun4sol2)
-               basic_machine=sparc-sun
-               os=-solaris2
-               ;;
-       sun3 | sun3-*)
-               basic_machine=m68k-sun
-               ;;
-       sun4)
-               basic_machine=sparc-sun
-               ;;
-       sun386 | sun386i | roadrunner)
-               basic_machine=i386-sun
-               ;;
-       sv1)
-               basic_machine=sv1-cray
-               os=-unicos
-               ;;
-       symmetry)
-               basic_machine=i386-sequent
-               os=-dynix
-               ;;
-       t3e)
-               basic_machine=alphaev5-cray
-               os=-unicos
-               ;;
-       t90)
-               basic_machine=t90-cray
-               os=-unicos
-               ;;
-       tile*)
-               basic_machine=$basic_machine-unknown
-               os=-linux-gnu
-               ;;
-       tx39)
-               basic_machine=mipstx39-unknown
-               ;;
-       tx39el)
-               basic_machine=mipstx39el-unknown
-               ;;
-       toad1)
-               basic_machine=pdp10-xkl
-               os=-tops20
-               ;;
-       tower | tower-32)
-               basic_machine=m68k-ncr
-               ;;
-       tpf)
-               basic_machine=s390x-ibm
-               os=-tpf
-               ;;
-       udi29k)
-               basic_machine=a29k-amd
-               os=-udi
-               ;;
-       ultra3)
-               basic_machine=a29k-nyu
-               os=-sym1
-               ;;
-       v810 | necv810)
-               basic_machine=v810-nec
-               os=-none
-               ;;
-       vaxv)
-               basic_machine=vax-dec
-               os=-sysv
-               ;;
-       vms)
-               basic_machine=vax-dec
-               os=-vms
-               ;;
-       vpp*|vx|vx-*)
-               basic_machine=f301-fujitsu
-               ;;
-       vxworks960)
-               basic_machine=i960-wrs
-               os=-vxworks
-               ;;
-       vxworks68)
-               basic_machine=m68k-wrs
-               os=-vxworks
-               ;;
-       vxworks29k)
-               basic_machine=a29k-wrs
-               os=-vxworks
-               ;;
-       w65*)
-               basic_machine=w65-wdc
-               os=-none
-               ;;
-       w89k-*)
-               basic_machine=hppa1.1-winbond
-               os=-proelf
-               ;;
-       xbox)
-               basic_machine=i686-pc
-               os=-mingw32
-               ;;
-       xps | xps100)
-               basic_machine=xps100-honeywell
-               ;;
-       xscale-* | xscalee[bl]-*)
-               basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
-               ;;
-       ymp)
-               basic_machine=ymp-cray
-               os=-unicos
-               ;;
-       z8k-*-coff)
-               basic_machine=z8k-unknown
-               os=-sim
-               ;;
-       z80-*-coff)
-               basic_machine=z80-unknown
-               os=-sim
-               ;;
-       none)
-               basic_machine=none-none
-               os=-none
-               ;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-       w89k)
-               basic_machine=hppa1.1-winbond
-               ;;
-       op50n)
-               basic_machine=hppa1.1-oki
-               ;;
-       op60c)
-               basic_machine=hppa1.1-oki
-               ;;
-       romp)
-               basic_machine=romp-ibm
-               ;;
-       mmix)
-               basic_machine=mmix-knuth
-               ;;
-       rs6000)
-               basic_machine=rs6000-ibm
-               ;;
-       vax)
-               basic_machine=vax-dec
-               ;;
-       pdp10)
-               # there are many clones, so DEC is not a safe bet
-               basic_machine=pdp10-unknown
-               ;;
-       pdp11)
-               basic_machine=pdp11-dec
-               ;;
-       we32k)
-               basic_machine=we32k-att
-               ;;
-       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
-               basic_machine=sh-unknown
-               ;;
-       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-               basic_machine=sparc-sun
-               ;;
-       cydra)
-               basic_machine=cydra-cydrome
-               ;;
-       orion)
-               basic_machine=orion-highlevel
-               ;;
-       orion105)
-               basic_machine=clipper-highlevel
-               ;;
-       mac | mpw | mac-mpw)
-               basic_machine=m68k-apple
-               ;;
-       pmac | pmac-mpw)
-               basic_machine=powerpc-apple
-               ;;
-       *-unknown)
-               # Make sure to match an already-canonicalized machine name.
-               ;;
-       *)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-       *-digital*)
-               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-               ;;
-       *-commodore*)
-               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-               ;;
-       *)
-               ;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-       # First match some system type aliases
-       # that might get confused with valid system types.
-       # -solaris* is a basic system type, with this one exception.
-       -auroraux)
-               os=-auroraux
-               ;;
-       -solaris1 | -solaris1.*)
-               os=`echo $os | sed -e 's|solaris1|sunos4|'`
-               ;;
-       -solaris)
-               os=-solaris2
-               ;;
-       -svr4*)
-               os=-sysv4
-               ;;
-       -unixware*)
-               os=-sysv4.2uw
-               ;;
-       -gnu/linux*)
-               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-               ;;
-       # First accept the basic system types.
-       # The portable systems comes first.
-       # Each alternative MUST END IN A *, to match a version number.
-       # -sysv* is not here because it comes later, after sysvr4.
-       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-             | -sym* | -kopensolaris* | -plan9* \
-             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* | -aros* | -cloudabi* | -sortix* \
-             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -bitrig* | -openbsd* | -solidbsd* \
-             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* | -cegcc* \
-             | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
-             | -linux-newlib* | -linux-musl* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
-             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
-       -qnx*)
-               case $basic_machine in
-                   x86-* | i*86-*)
-                       ;;
-                   *)
-                       os=-nto$os
-                       ;;
-               esac
-               ;;
-       -nto-qnx*)
-               ;;
-       -nto*)
-               os=`echo $os | sed -e 's|nto|nto-qnx|'`
-               ;;
-       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-               ;;
-       -mac*)
-               os=`echo $os | sed -e 's|mac|macos|'`
-               ;;
-       -linux-dietlibc)
-               os=-linux-dietlibc
-               ;;
-       -linux*)
-               os=`echo $os | sed -e 's|linux|linux-gnu|'`
-               ;;
-       -sunos5*)
-               os=`echo $os | sed -e 's|sunos5|solaris2|'`
-               ;;
-       -sunos6*)
-               os=`echo $os | sed -e 's|sunos6|solaris3|'`
-               ;;
-       -opened*)
-               os=-openedition
-               ;;
-       -os400*)
-               os=-os400
-               ;;
-       -wince*)
-               os=-wince
-               ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
-       -utek*)
-               os=-bsd
-               ;;
-       -dynix*)
-               os=-bsd
-               ;;
-       -acis*)
-               os=-aos
-               ;;
-       -atheos*)
-               os=-atheos
-               ;;
-       -syllable*)
-               os=-syllable
-               ;;
-       -386bsd)
-               os=-bsd
-               ;;
-       -ctix* | -uts*)
-               os=-sysv
-               ;;
-       -nova*)
-               os=-rtmk-nova
-               ;;
-       -ns2 )
-               os=-nextstep2
-               ;;
-       -nsk*)
-               os=-nsk
-               ;;
-       # Preserve the version number of sinix5.
-       -sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
-               ;;
-       -sinix*)
-               os=-sysv4
-               ;;
-       -tpf*)
-               os=-tpf
-               ;;
-       -triton*)
-               os=-sysv3
-               ;;
-       -oss*)
-               os=-sysv3
-               ;;
-       -svr4)
-               os=-sysv4
-               ;;
-       -svr3)
-               os=-sysv3
-               ;;
-       -sysvr4)
-               os=-sysv4
-               ;;
-       # This must come after -sysvr4.
-       -sysv*)
-               ;;
-       -ose*)
-               os=-ose
-               ;;
-       -es1800*)
-               os=-ose
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
-       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-               os=-mint
-               ;;
-       -aros*)
-               os=-aros
-               ;;
-       -zvmoe)
-               os=-zvmoe
-               ;;
-       -dicos*)
-               os=-dicos
-               ;;
-       -nacl*)
-               ;;
-       -none)
-               ;;
-       *)
-               # Get rid of the `-' at the beginning of $os.
-               os=`echo $os | sed 's/[^-]*-//'`
-               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-               exit 1
-               ;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-       score-*)
-               os=-elf
-               ;;
-       spu-*)
-               os=-elf
-               ;;
-       *-acorn)
-               os=-riscix1.2
-               ;;
-       arm*-rebel)
-               os=-linux
-               ;;
-       arm*-semi)
-               os=-aout
-               ;;
-       c4x-* | tic4x-*)
-               os=-coff
-               ;;
-       c8051-*)
-               os=-elf
-               ;;
-       hexagon-*)
-               os=-elf
-               ;;
-       tic54x-*)
-               os=-coff
-               ;;
-       tic55x-*)
-               os=-coff
-               ;;
-       tic6x-*)
-               os=-coff
-               ;;
-       # This must come before the *-dec entry.
-       pdp10-*)
-               os=-tops20
-               ;;
-       pdp11-*)
-               os=-none
-               ;;
-       *-dec | vax-*)
-               os=-ultrix4.2
-               ;;
-       m68*-apollo)
-               os=-domain
-               ;;
-       i386-sun)
-               os=-sunos4.0.2
-               ;;
-       m68000-sun)
-               os=-sunos3
-               ;;
-       m68*-cisco)
-               os=-aout
-               ;;
-       mep-*)
-               os=-elf
-               ;;
-       mips*-cisco)
-               os=-elf
-               ;;
-       mips*-*)
-               os=-elf
-               ;;
-       or32-*)
-               os=-coff
-               ;;
-       *-tti)  # must be before sparc entry or we get the wrong os.
-               os=-sysv3
-               ;;
-       sparc-* | *-sun)
-               os=-sunos4.1.1
-               ;;
-       *-be)
-               os=-beos
-               ;;
-       *-haiku)
-               os=-haiku
-               ;;
-       *-ibm)
-               os=-aix
-               ;;
-       *-knuth)
-               os=-mmixware
-               ;;
-       *-wec)
-               os=-proelf
-               ;;
-       *-winbond)
-               os=-proelf
-               ;;
-       *-oki)
-               os=-proelf
-               ;;
-       *-hp)
-               os=-hpux
-               ;;
-       *-hitachi)
-               os=-hiux
-               ;;
-       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-               os=-sysv
-               ;;
-       *-cbm)
-               os=-amigaos
-               ;;
-       *-dg)
-               os=-dgux
-               ;;
-       *-dolphin)
-               os=-sysv3
-               ;;
-       m68k-ccur)
-               os=-rtu
-               ;;
-       m88k-omron*)
-               os=-luna
-               ;;
-       *-next )
-               os=-nextstep
-               ;;
-       *-sequent)
-               os=-ptx
-               ;;
-       *-crds)
-               os=-unos
-               ;;
-       *-ns)
-               os=-genix
-               ;;
-       i370-*)
-               os=-mvs
-               ;;
-       *-next)
-               os=-nextstep3
-               ;;
-       *-gould)
-               os=-sysv
-               ;;
-       *-highlevel)
-               os=-bsd
-               ;;
-       *-encore)
-               os=-bsd
-               ;;
-       *-sgi)
-               os=-irix
-               ;;
-       *-siemens)
-               os=-sysv4
-               ;;
-       *-masscomp)
-               os=-rtu
-               ;;
-       f30[01]-fujitsu | f700-fujitsu)
-               os=-uxpv
-               ;;
-       *-rom68k)
-               os=-coff
-               ;;
-       *-*bug)
-               os=-coff
-               ;;
-       *-apple)
-               os=-macos
-               ;;
-       *-atari*)
-               os=-mint
-               ;;
-       *)
-               os=-none
-               ;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-       *-unknown)
-               case $os in
-                       -riscix*)
-                               vendor=acorn
-                               ;;
-                       -sunos*)
-                               vendor=sun
-                               ;;
-                       -cnk*|-aix*)
-                               vendor=ibm
-                               ;;
-                       -beos*)
-                               vendor=be
-                               ;;
-                       -hpux*)
-                               vendor=hp
-                               ;;
-                       -mpeix*)
-                               vendor=hp
-                               ;;
-                       -hiux*)
-                               vendor=hitachi
-                               ;;
-                       -unos*)
-                               vendor=crds
-                               ;;
-                       -dgux*)
-                               vendor=dg
-                               ;;
-                       -luna*)
-                               vendor=omron
-                               ;;
-                       -genix*)
-                               vendor=ns
-                               ;;
-                       -mvs* | -opened*)
-                               vendor=ibm
-                               ;;
-                       -os400*)
-                               vendor=ibm
-                               ;;
-                       -ptx*)
-                               vendor=sequent
-                               ;;
-                       -tpf*)
-                               vendor=ibm
-                               ;;
-                       -vxsim* | -vxworks* | -windiss*)
-                               vendor=wrs
-                               ;;
-                       -aux*)
-                               vendor=apple
-                               ;;
-                       -hms*)
-                               vendor=hitachi
-                               ;;
-                       -mpw* | -macos*)
-                               vendor=apple
-                               ;;
-                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-                               vendor=atari
-                               ;;
-                       -vos*)
-                               vendor=stratus
-                               ;;
-               esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-               ;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/Cfg/depcomp b/Cfg/depcomp
deleted file mode 100755 (executable)
index fc98710..0000000
+++ /dev/null
@@ -1,791 +0,0 @@
-#! /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:
diff --git a/Cfg/install-sh b/Cfg/install-sh
deleted file mode 100755 (executable)
index 59990a1..0000000
+++ /dev/null
@@ -1,508 +0,0 @@
-#!/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:
diff --git a/Cfg/ltmain.sh b/Cfg/ltmain.sh
deleted file mode 100644 (file)
index bffda54..0000000
+++ /dev/null
@@ -1,9661 +0,0 @@
-
-# libtool (GNU libtool) 2.4.2
-# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
-# This is free software; see the source for copying conditions.  There is NO
-# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# GNU Libtool 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.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-#       --config             show all configuration variables
-#       --debug              enable verbose shell tracing
-#   -n, --dry-run            display commands without modifying any files
-#       --features           display basic configuration information and exit
-#       --mode=MODE          use operation mode MODE
-#       --preserve-dup-deps  don't remove duplicate dependency libraries
-#       --quiet, --silent    don't print informational messages
-#       --no-quiet, --no-silent
-#                            print informational messages (default)
-#       --no-warn            don't display warning messages
-#       --tag=TAG            use configuration variables from tag TAG
-#   -v, --verbose            print more informational messages than default
-#       --no-verbose         don't print the extra informational messages
-#       --version            print version information
-#   -h, --help, --help-all   print short, long, or detailed help message
-#
-# MODE must be one of the following:
-#
-#         clean              remove files from the build directory
-#         compile            compile a source file into a libtool object
-#         execute            automatically set library path, then run a program
-#         finish             complete the installation of libtool libraries
-#         install            install libraries or executables
-#         link               create a library or an executable
-#         uninstall          remove libraries from an installed directory
-#
-# MODE-ARGS vary depending on the MODE.  When passed as first option,
-# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-#         host-triplet:        $host
-#         shell:               $SHELL
-#         compiler:            $LTCC
-#         compiler flags:              $LTCFLAGS
-#         linker:              $LD (gnu? $with_gnu_ld)
-#         $progname:   (GNU libtool) 2.4.2 Debian-2.4.2-1.11
-#         automake:    $automake_version
-#         autoconf:    $autoconf_version
-#
-# Report bugs to <bug-libtool@gnu.org>.
-# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
-# General help using GNU software: <http://www.gnu.org/gethelp/>.
-
-PROGRAM=libtool
-PACKAGE=libtool
-VERSION="2.4.2 Debian-2.4.2-1.11"
-TIMESTAMP=""
-package_revision=1.3337
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-}
-
-# NLS nuisances: We save the old values to restore during execute mode.
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
-  eval "if test \"\${$lt_var+set}\" = set; then
-          save_$lt_var=\$$lt_var
-          $lt_var=C
-         export $lt_var
-         lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
-         lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
-       fi"
-done
-LC_ALL=C
-LANGUAGE=C
-export LANGUAGE LC_ALL
-
-$lt_unset CDPATH
-
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-
-
-: ${CP="cp -f"}
-test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77     # $? = 77 is used to indicate a skipped test to automake.
-
-exit_status=$EXIT_SUCCESS
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS="  $lt_nl"
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
-    if test "X$func_dirname_result" = "X${1}"; then
-      func_dirname_result="${3}"
-    else
-      func_dirname_result="$func_dirname_result${2}"
-    fi
-} # func_dirname may be replaced by extended shell implementation
-
-
-# func_basename file
-func_basename ()
-{
-    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
-} # func_basename may be replaced by extended shell implementation
-
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-    # Extract subdirectory from the argument.
-    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
-    if test "X$func_dirname_result" = "X${1}"; then
-      func_dirname_result="${3}"
-    else
-      func_dirname_result="$func_dirname_result${2}"
-    fi
-    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
-} # func_dirname_and_basename may be replaced by extended shell implementation
-
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-    case ${2} in
-      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
-    esac
-} # func_stripname may be replaced by extended shell implementation
-
-
-# These SED scripts presuppose an absolute path with a trailing slash.
-pathcar='s,^/\([^/]*\).*$,\1,'
-pathcdr='s,^/[^/]*,,'
-removedotparts=':dotsl
-               s@/\./@/@g
-               t dotsl
-               s,/\.$,/,'
-collapseslashes='s@/\{1,\}@/@g'
-finalslash='s,/*$,/,'
-
-# func_normal_abspath PATH
-# Remove doubled-up and trailing slashes, "." path components,
-# and cancel out any ".." path components in PATH after making
-# it an absolute path.
-#             value returned in "$func_normal_abspath_result"
-func_normal_abspath ()
-{
-  # Start from root dir and reassemble the path.
-  func_normal_abspath_result=
-  func_normal_abspath_tpath=$1
-  func_normal_abspath_altnamespace=
-  case $func_normal_abspath_tpath in
-    "")
-      # Empty path, that just means $cwd.
-      func_stripname '' '/' "`pwd`"
-      func_normal_abspath_result=$func_stripname_result
-      return
-    ;;
-    # The next three entries are used to spot a run of precisely
-    # two leading slashes without using negated character classes;
-    # we take advantage of case's first-match behaviour.
-    ///*)
-      # Unusual form of absolute path, do nothing.
-    ;;
-    //*)
-      # Not necessarily an ordinary path; POSIX reserves leading '//'
-      # and for example Cygwin uses it to access remote file shares
-      # over CIFS/SMB, so we conserve a leading double slash if found.
-      func_normal_abspath_altnamespace=/
-    ;;
-    /*)
-      # Absolute path, do nothing.
-    ;;
-    *)
-      # Relative path, prepend $cwd.
-      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
-    ;;
-  esac
-  # Cancel out all the simple stuff to save iterations.  We also want
-  # the path to end with a slash for ease of parsing, so make sure
-  # there is one (and only one) here.
-  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
-        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
-  while :; do
-    # Processed it all yet?
-    if test "$func_normal_abspath_tpath" = / ; then
-      # If we ascended to the root using ".." the result may be empty now.
-      if test -z "$func_normal_abspath_result" ; then
-        func_normal_abspath_result=/
-      fi
-      break
-    fi
-    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
-        -e "$pathcar"`
-    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
-        -e "$pathcdr"`
-    # Figure out what to do with it
-    case $func_normal_abspath_tcomponent in
-      "")
-        # Trailing empty path component, ignore it.
-      ;;
-      ..)
-        # Parent dir; strip last assembled component from result.
-        func_dirname "$func_normal_abspath_result"
-        func_normal_abspath_result=$func_dirname_result
-      ;;
-      *)
-        # Actual path component, append it.
-        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
-      ;;
-    esac
-  done
-  # Restore leading double-slash if one was found on entry.
-  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
-}
-
-# func_relative_path SRCDIR DSTDIR
-# generates a relative path from SRCDIR to DSTDIR, with a trailing
-# slash if non-empty, suitable for immediately appending a filename
-# without needing to append a separator.
-#             value returned in "$func_relative_path_result"
-func_relative_path ()
-{
-  func_relative_path_result=
-  func_normal_abspath "$1"
-  func_relative_path_tlibdir=$func_normal_abspath_result
-  func_normal_abspath "$2"
-  func_relative_path_tbindir=$func_normal_abspath_result
-
-  # Ascend the tree starting from libdir
-  while :; do
-    # check if we have found a prefix of bindir
-    case $func_relative_path_tbindir in
-      $func_relative_path_tlibdir)
-        # found an exact match
-        func_relative_path_tcancelled=
-        break
-        ;;
-      $func_relative_path_tlibdir*)
-        # found a matching prefix
-        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
-        func_relative_path_tcancelled=$func_stripname_result
-        if test -z "$func_relative_path_result"; then
-          func_relative_path_result=.
-        fi
-        break
-        ;;
-      *)
-        func_dirname $func_relative_path_tlibdir
-        func_relative_path_tlibdir=${func_dirname_result}
-        if test "x$func_relative_path_tlibdir" = x ; then
-          # Have to descend all the way to the root!
-          func_relative_path_result=../$func_relative_path_result
-          func_relative_path_tcancelled=$func_relative_path_tbindir
-          break
-        fi
-        func_relative_path_result=../$func_relative_path_result
-        ;;
-    esac
-  done
-
-  # Now calculate path; take care to avoid doubling-up slashes.
-  func_stripname '' '/' "$func_relative_path_result"
-  func_relative_path_result=$func_stripname_result
-  func_stripname '/' '/' "$func_relative_path_tcancelled"
-  if test "x$func_stripname_result" != x ; then
-    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
-  fi
-
-  # Normalisation. If bindir is libdir, return empty string,
-  # else relative path ending with a slash; either way, target
-  # file name can be directly appended.
-  if test ! -z "$func_relative_path_result"; then
-    func_stripname './' '' "$func_relative_path_result/"
-    func_relative_path_result=$func_stripname_result
-  fi
-}
-
-# The name of this program:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
-
-# Make sure we have an absolute path for reexecution:
-case $progpath in
-  [\\/]*|[A-Za-z]:\\*) ;;
-  *[\\/]*)
-     progdir=$func_dirname_result
-     progdir=`cd "$progdir" && pwd`
-     progpath="$progdir/$progname"
-     ;;
-  *)
-     save_IFS="$IFS"
-     IFS=${PATH_SEPARATOR-:}
-     for progdir in $PATH; do
-       IFS="$save_IFS"
-       test -x "$progdir/$progname" && break
-     done
-     IFS="$save_IFS"
-     test -n "$progdir" || progdir=`pwd`
-     progpath="$progdir/$progname"
-     ;;
-esac
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution that turns a string into a regex matching for the
-# string literally.
-sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
-
-# Sed substitution that converts a w32 file name or path
-# which contains forward slashes, into one that contains
-# (escaped) backslashes.  A very naive implementation.
-lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
-bs='\\'
-bs2='\\\\'
-bs4='\\\\\\\\'
-dollar='\$'
-sed_double_backslash="\
-  s/$bs4/&\\
-/g
-  s/^$bs2$dollar/$bs&/
-  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
-  s/\n//g"
-
-# Standard options:
-opt_dry_run=false
-opt_help=false
-opt_quiet=false
-opt_verbose=false
-opt_warning=:
-
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
-{
-    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
-}
-
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
-    $opt_verbose && func_echo ${1+"$@"}
-
-    # A bug in bash halts the script if the last line of a function
-    # fails when set -e is in force, so we need another command to
-    # work around that:
-    :
-}
-
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
-    $ECHO "$*"
-}
-
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
-    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
-}
-
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
-{
-    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
-
-    # bash bug again:
-    :
-}
-
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
-    func_error ${1+"$@"}
-    exit $EXIT_FAILURE
-}
-
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
-    func_error ${1+"$@"}
-    func_fatal_error "$help"
-}
-help="Try \`$progname --help' for more information."  ## default
-
-
-# func_grep expression filename
-# Check whether EXPRESSION matches any line of FILENAME, without output.
-func_grep ()
-{
-    $GREP "$1" "$2" >/dev/null 2>&1
-}
-
-
-# func_mkdir_p directory-path
-# Make sure the entire path to DIRECTORY-PATH is available.
-func_mkdir_p ()
-{
-    my_directory_path="$1"
-    my_dir_list=
-
-    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
-
-      # Protect directory names starting with `-'
-      case $my_directory_path in
-        -*) my_directory_path="./$my_directory_path" ;;
-      esac
-
-      # While some portion of DIR does not yet exist...
-      while test ! -d "$my_directory_path"; do
-        # ...make a list in topmost first order.  Use a colon delimited
-       # list incase some portion of path contains whitespace.
-        my_dir_list="$my_directory_path:$my_dir_list"
-
-        # If the last portion added has no slash in it, the list is done
-        case $my_directory_path in */*) ;; *) break ;; esac
-
-        # ...otherwise throw away the child directory and loop
-        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
-      done
-      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
-
-      save_mkdir_p_IFS="$IFS"; IFS=':'
-      for my_dir in $my_dir_list; do
-       IFS="$save_mkdir_p_IFS"
-        # mkdir can fail with a `File exist' error if two processes
-        # try to create one of the directories concurrently.  Don't
-        # stop in that case!
-        $MKDIR "$my_dir" 2>/dev/null || :
-      done
-      IFS="$save_mkdir_p_IFS"
-
-      # Bail out if we (or some other process) failed to create a directory.
-      test -d "$my_directory_path" || \
-        func_fatal_error "Failed to create \`$1'"
-    fi
-}
-
-
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible.  If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
-{
-    my_template="${TMPDIR-/tmp}/${1-$progname}"
-
-    if test "$opt_dry_run" = ":"; then
-      # Return a directory name, but don't create it in dry-run mode
-      my_tmpdir="${my_template}-$$"
-    else
-
-      # If mktemp works, use that first and foremost
-      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
-      if test ! -d "$my_tmpdir"; then
-        # Failing that, at least try and use $RANDOM to avoid a race
-        my_tmpdir="${my_template}-${RANDOM-0}$$"
-
-        save_mktempdir_umask=`umask`
-        umask 0077
-        $MKDIR "$my_tmpdir"
-        umask $save_mktempdir_umask
-      fi
-
-      # If we're not in dry-run mode, bomb out on failure
-      test -d "$my_tmpdir" || \
-        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
-    fi
-
-    $ECHO "$my_tmpdir"
-}
-
-
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
-{
-    case $1 in
-      *[\\\`\"\$]*)
-       func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
-      *)
-        func_quote_for_eval_unquoted_result="$1" ;;
-    esac
-
-    case $func_quote_for_eval_unquoted_result in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting, command substitution and and variable
-      # expansion for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
-        ;;
-      *)
-        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
-    esac
-}
-
-
-# func_quote_for_expand arg
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
-    case $1 in
-      *[\\\`\"]*)
-       my_arg=`$ECHO "$1" | $SED \
-           -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
-      *)
-        my_arg="$1" ;;
-    esac
-
-    case $my_arg in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting and command substitution for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-        my_arg="\"$my_arg\""
-        ;;
-    esac
-
-    func_quote_for_expand_result="$my_arg"
-}
-
-
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
-# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.
-func_show_eval ()
-{
-    my_cmd="$1"
-    my_fail_exp="${2-:}"
-
-    ${opt_silent-false} || {
-      func_quote_for_expand "$my_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
-
-    if ${opt_dry_run-false}; then :; else
-      eval "$my_cmd"
-      my_status=$?
-      if test "$my_status" -eq 0; then :; else
-       eval "(exit $my_status); $my_fail_exp"
-      fi
-    fi
-}
-
-
-# func_show_eval_locale cmd [fail_exp]
-# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
-# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.  Use the saved locale for evaluation.
-func_show_eval_locale ()
-{
-    my_cmd="$1"
-    my_fail_exp="${2-:}"
-
-    ${opt_silent-false} || {
-      func_quote_for_expand "$my_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
-
-    if ${opt_dry_run-false}; then :; else
-      eval "$lt_user_locale
-           $my_cmd"
-      my_status=$?
-      eval "$lt_safe_locale"
-      if test "$my_status" -eq 0; then :; else
-       eval "(exit $my_status); $my_fail_exp"
-      fi
-    fi
-}
-
-# func_tr_sh
-# Turn $1 into a string suitable for a shell variable name.
-# Result is stored in $func_tr_sh_result.  All characters
-# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
-# if $1 begins with a digit, a '_' is prepended as well.
-func_tr_sh ()
-{
-  case $1 in
-  [0-9]* | *[!a-zA-Z0-9_]*)
-    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
-    ;;
-  * )
-    func_tr_sh_result=$1
-    ;;
-  esac
-}
-
-
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
-    $opt_debug
-
-    $SED -n '/(C)/!b go
-       :more
-       /\./!{
-         N
-         s/\n# / /
-         b more
-       }
-       :go
-       /^# '$PROGRAM' (GNU /,/# warranty; / {
-        s/^# //
-       s/^# *$//
-        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
-        p
-     }' < "$progpath"
-     exit $?
-}
-
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
-{
-    $opt_debug
-
-    $SED -n '/^# Usage:/,/^#  *.*--help/ {
-        s/^# //
-       s/^# *$//
-       s/\$progname/'$progname'/
-       p
-    }' < "$progpath"
-    echo
-    $ECHO "run \`$progname --help | more' for full usage"
-    exit $?
-}
-
-# func_help [NOEXIT]
-# Echo long help message to standard output and exit,
-# unless 'noexit' is passed as argument.
-func_help ()
-{
-    $opt_debug
-
-    $SED -n '/^# Usage:/,/# Report bugs to/ {
-       :print
-        s/^# //
-       s/^# *$//
-       s*\$progname*'$progname'*
-       s*\$host*'"$host"'*
-       s*\$SHELL*'"$SHELL"'*
-       s*\$LTCC*'"$LTCC"'*
-       s*\$LTCFLAGS*'"$LTCFLAGS"'*
-       s*\$LD*'"$LD"'*
-       s/\$with_gnu_ld/'"$with_gnu_ld"'/
-       s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
-       s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
-       p
-       d
-     }
-     /^# .* home page:/b print
-     /^# General help using/b print
-     ' < "$progpath"
-    ret=$?
-    if test -z "$1"; then
-      exit $ret
-    fi
-}
-
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
-{
-    $opt_debug
-
-    func_error "missing argument for $1."
-    exit_cmd=exit
-}
-
-
-# func_split_short_opt shortopt
-# Set func_split_short_opt_name and func_split_short_opt_arg shell
-# variables after splitting SHORTOPT after the 2nd character.
-func_split_short_opt ()
-{
-    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
-    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
-
-    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
-    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
-} # func_split_short_opt may be replaced by extended shell implementation
-
-
-# func_split_long_opt longopt
-# Set func_split_long_opt_name and func_split_long_opt_arg shell
-# variables after splitting LONGOPT at the `=' sign.
-func_split_long_opt ()
-{
-    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
-    my_sed_long_arg='1s/^--[^=]*=//'
-
-    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
-    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
-} # func_split_long_opt may be replaced by extended shell implementation
-
-exit_cmd=:
-
-
-
-
-
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
-
-# Global variables.
-nonopt=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-    eval "${1}=\$${1}\${2}"
-} # func_append may be replaced by extended shell implementation
-
-# func_append_quoted var value
-# Quote VALUE and append to the end of shell variable VAR, separated
-# by a space.
-func_append_quoted ()
-{
-    func_quote_for_eval "${2}"
-    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
-} # func_append_quoted may be replaced by extended shell implementation
-
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-    func_arith_result=`expr "${@}"`
-} # func_arith may be replaced by extended shell implementation
-
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
-} # func_len may be replaced by extended shell implementation
-
-
-# func_lo2o object
-func_lo2o ()
-{
-    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
-} # func_lo2o may be replaced by extended shell implementation
-
-
-# func_xform libobj-or-source
-func_xform ()
-{
-    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
-} # func_xform may be replaced by extended shell implementation
-
-
-# func_fatal_configuration arg...
-# Echo program name prefixed message to standard error, followed by
-# a configuration failure hint, and exit.
-func_fatal_configuration ()
-{
-    func_error ${1+"$@"}
-    func_error "See the $PACKAGE documentation for more information."
-    func_fatal_error "Fatal configuration error."
-}
-
-
-# func_config
-# Display the configuration for all the tags in this script.
-func_config ()
-{
-    re_begincf='^# ### BEGIN LIBTOOL'
-    re_endcf='^# ### END LIBTOOL'
-
-    # Default configuration.
-    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
-
-    # Now print the configurations for the tags.
-    for tagname in $taglist; do
-      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
-    done
-
-    exit $?
-}
-
-# func_features
-# Display the features supported by this script.
-func_features ()
-{
-    echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
-      echo "enable shared libraries"
-    else
-      echo "disable shared libraries"
-    fi
-    if test "$build_old_libs" = yes; then
-      echo "enable static libraries"
-    else
-      echo "disable static libraries"
-    fi
-
-    exit $?
-}
-
-# func_enable_tag tagname
-# Verify that TAGNAME is valid, and either flag an error and exit, or
-# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
-# variable here.
-func_enable_tag ()
-{
-  # Global variable:
-  tagname="$1"
-
-  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
-  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
-  sed_extractcf="/$re_begincf/,/$re_endcf/p"
-
-  # Validate tagname.
-  case $tagname in
-    *[!-_A-Za-z0-9,/]*)
-      func_fatal_error "invalid tag name: $tagname"
-      ;;
-  esac
-
-  # Don't test for the "default" C tag, as we know it's
-  # there but not specially marked.
-  case $tagname in
-    CC) ;;
-    *)
-      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
-       taglist="$taglist $tagname"
-
-       # Evaluate the configuration.  Be careful to quote the path
-       # and the sed script, to avoid splitting on whitespace, but
-       # also don't use non-portable quotes within backquotes within
-       # quotes we have to do it in 2 steps:
-       extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
-       eval "$extractedcf"
-      else
-       func_error "ignoring unknown tag $tagname"
-      fi
-      ;;
-  esac
-}
-
-# func_check_version_match
-# Ensure that we are using m4 macros, and libtool script from the same
-# release of libtool.
-func_check_version_match ()
-{
-  if test "$package_revision" != "$macro_revision"; then
-    if test "$VERSION" != "$macro_version"; then
-      if test -z "$macro_version"; then
-        cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from an older release.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
-      else
-        cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
-      fi
-    else
-      cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-$progname: of $PACKAGE $VERSION and run autoconf again.
-_LT_EOF
-    fi
-
-    exit $EXIT_MISMATCH
-  fi
-}
-
-
-# Shorthand for --mode=foo, only valid as the first argument
-case $1 in
-clean|clea|cle|cl)
-  shift; set dummy --mode clean ${1+"$@"}; shift
-  ;;
-compile|compil|compi|comp|com|co|c)
-  shift; set dummy --mode compile ${1+"$@"}; shift
-  ;;
-execute|execut|execu|exec|exe|ex|e)
-  shift; set dummy --mode execute ${1+"$@"}; shift
-  ;;
-finish|finis|fini|fin|fi|f)
-  shift; set dummy --mode finish ${1+"$@"}; shift
-  ;;
-install|instal|insta|inst|ins|in|i)
-  shift; set dummy --mode install ${1+"$@"}; shift
-  ;;
-link|lin|li|l)
-  shift; set dummy --mode link ${1+"$@"}; shift
-  ;;
-uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
-  shift; set dummy --mode uninstall ${1+"$@"}; shift
-  ;;
-esac
-
-
-
-# Option defaults:
-opt_debug=:
-opt_dry_run=false
-opt_config=false
-opt_preserve_dup_deps=false
-opt_features=false
-opt_finish=false
-opt_help=false
-opt_help_all=false
-opt_silent=:
-opt_warning=:
-opt_verbose=:
-opt_silent=false
-opt_verbose=false
-
-
-# Parse options once, thoroughly.  This comes as soon as possible in the
-# script to make things like `--version' happen as quickly as we can.
-{
-  # this just eases exit handling
-  while test $# -gt 0; do
-    opt="$1"
-    shift
-    case $opt in
-      --debug|-x)      opt_debug='set -x'
-                       func_echo "enabling shell trace mode"
-                       $opt_debug
-                       ;;
-      --dry-run|--dryrun|-n)
-                       opt_dry_run=:
-                       ;;
-      --config)
-                       opt_config=:
-func_config
-                       ;;
-      --dlopen|-dlopen)
-                       optarg="$1"
-                       opt_dlopen="${opt_dlopen+$opt_dlopen
-}$optarg"
-                       shift
-                       ;;
-      --preserve-dup-deps)
-                       opt_preserve_dup_deps=:
-                       ;;
-      --features)
-                       opt_features=:
-func_features
-                       ;;
-      --finish)
-                       opt_finish=:
-set dummy --mode finish ${1+"$@"}; shift
-                       ;;
-      --help)
-                       opt_help=:
-                       ;;
-      --help-all)
-                       opt_help_all=:
-opt_help=': help-all'
-                       ;;
-      --mode)
-                       test $# = 0 && func_missing_arg $opt && break
-                       optarg="$1"
-                       opt_mode="$optarg"
-case $optarg in
-  # Valid mode arguments:
-  clean|compile|execute|finish|install|link|relink|uninstall) ;;
-
-  # Catch anything else as an error
-  *) func_error "invalid argument for $opt"
-     exit_cmd=exit
-     break
-     ;;
-esac
-                       shift
-                       ;;
-      --no-silent|--no-quiet)
-                       opt_silent=false
-func_append preserve_args " $opt"
-                       ;;
-      --no-warning|--no-warn)
-                       opt_warning=false
-func_append preserve_args " $opt"
-                       ;;
-      --no-verbose)
-                       opt_verbose=false
-func_append preserve_args " $opt"
-                       ;;
-      --silent|--quiet)
-                       opt_silent=:
-func_append preserve_args " $opt"
-        opt_verbose=false
-                       ;;
-      --verbose|-v)
-                       opt_verbose=:
-func_append preserve_args " $opt"
-opt_silent=false
-                       ;;
-      --tag)
-                       test $# = 0 && func_missing_arg $opt && break
-                       optarg="$1"
-                       opt_tag="$optarg"
-func_append preserve_args " $opt $optarg"
-func_enable_tag "$optarg"
-                       shift
-                       ;;
-
-      -\?|-h)          func_usage                              ;;
-      --help)          func_help                               ;;
-      --version)       func_version                            ;;
-
-      # Separate optargs to long options:
-      --*=*)
-                       func_split_long_opt "$opt"
-                       set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
-                       shift
-                       ;;
-
-      # Separate non-argument short options:
-      -\?*|-h*|-n*|-v*)
-                       func_split_short_opt "$opt"
-                       set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
-                       shift
-                       ;;
-
-      --)              break                                   ;;
-      -*)              func_fatal_help "unrecognized option \`$opt'" ;;
-      *)               set dummy "$opt" ${1+"$@"};     shift; break  ;;
-    esac
-  done
-
-  # Validate options:
-
-  # save first non-option argument
-  if test "$#" -gt 0; then
-    nonopt="$opt"
-    shift
-  fi
-
-  # preserve --debug
-  test "$opt_debug" = : || func_append preserve_args " --debug"
-
-  case $host in
-    *cygwin* | *mingw* | *pw32* | *cegcc*)
-      # don't eliminate duplications in $postdeps and $predeps
-      opt_duplicate_compiler_generated_deps=:
-      ;;
-    *)
-      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
-      ;;
-  esac
-
-  $opt_help || {
-    # Sanity checks first:
-    func_check_version_match
-
-    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-      func_fatal_configuration "not configured to build any kind of library"
-    fi
-
-    # Darwin sucks
-    eval std_shrext=\"$shrext_cmds\"
-
-    # Only execute mode is allowed to have -dlopen flags.
-    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
-      func_error "unrecognized option \`-dlopen'"
-      $ECHO "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    # Change the help message to a mode-specific one.
-    generic_help="$help"
-    help="Try \`$progname --help --mode=$opt_mode' for more information."
-  }
-
-
-  # Bail if the options were screwed
-  $exit_cmd $EXIT_FAILURE
-}
-
-
-
-
-## ----------- ##
-##    Main.    ##
-## ----------- ##
-
-# func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_lalib_p ()
-{
-    test -f "$1" &&
-      $SED -e 4q "$1" 2>/dev/null \
-        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
-}
-
-# func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function implements the same check as func_lalib_p without
-# resorting to external programs.  To this end, it redirects stdin and
-# closes it afterwards, without saving the original file descriptor.
-# As a safety measure, use it only where a negative result would be
-# fatal anyway.  Works if `file' does not exist.
-func_lalib_unsafe_p ()
-{
-    lalib_p=no
-    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
-       for lalib_p_l in 1 2 3 4
-       do
-           read lalib_p_line
-           case "$lalib_p_line" in
-               \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
-           esac
-       done
-       exec 0<&5 5<&-
-    fi
-    test "$lalib_p" = yes
-}
-
-# func_ltwrapper_script_p file
-# True iff FILE is a libtool wrapper script
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_script_p ()
-{
-    func_lalib_p "$1"
-}
-
-# func_ltwrapper_executable_p file
-# True iff FILE is a libtool wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_executable_p ()
-{
-    func_ltwrapper_exec_suffix=
-    case $1 in
-    *.exe) ;;
-    *) func_ltwrapper_exec_suffix=.exe ;;
-    esac
-    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
-}
-
-# func_ltwrapper_scriptname file
-# Assumes file is an ltwrapper_executable
-# uses $file to determine the appropriate filename for a
-# temporary ltwrapper_script.
-func_ltwrapper_scriptname ()
-{
-    func_dirname_and_basename "$1" "" "."
-    func_stripname '' '.exe' "$func_basename_result"
-    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
-}
-
-# func_ltwrapper_p file
-# True iff FILE is a libtool wrapper script or wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_p ()
-{
-    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
-}
-
-
-# func_execute_cmds commands fail_cmd
-# Execute tilde-delimited COMMANDS.
-# If FAIL_CMD is given, eval that upon failure.
-# FAIL_CMD may read-access the current command in variable CMD!
-func_execute_cmds ()
-{
-    $opt_debug
-    save_ifs=$IFS; IFS='~'
-    for cmd in $1; do
-      IFS=$save_ifs
-      eval cmd=\"$cmd\"
-      func_show_eval "$cmd" "${2-:}"
-    done
-    IFS=$save_ifs
-}
-
-
-# func_source file
-# Source FILE, adding directory component if necessary.
-# Note that it is not necessary on cygwin/mingw to append a dot to
-# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
-# behavior happens only for exec(3), not for open(2)!  Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
-func_source ()
-{
-    $opt_debug
-    case $1 in
-    */* | *\\*)        . "$1" ;;
-    *)         . "./$1" ;;
-    esac
-}
-
-
-# func_resolve_sysroot PATH
-# Replace a leading = in PATH with a sysroot.  Store the result into
-# func_resolve_sysroot_result
-func_resolve_sysroot ()
-{
-  func_resolve_sysroot_result=$1
-  case $func_resolve_sysroot_result in
-  =*)
-    func_stripname '=' '' "$func_resolve_sysroot_result"
-    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
-    ;;
-  esac
-}
-
-# func_replace_sysroot PATH
-# If PATH begins with the sysroot, replace it with = and
-# store the result into func_replace_sysroot_result.
-func_replace_sysroot ()
-{
-  case "$lt_sysroot:$1" in
-  ?*:"$lt_sysroot"*)
-    func_stripname "$lt_sysroot" '' "$1"
-    func_replace_sysroot_result="=$func_stripname_result"
-    ;;
-  *)
-    # Including no sysroot.
-    func_replace_sysroot_result=$1
-    ;;
-  esac
-}
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
-{
-    $opt_debug
-    if test -n "$available_tags" && test -z "$tagname"; then
-      CC_quoted=
-      for arg in $CC; do
-       func_append_quoted CC_quoted "$arg"
-      done
-      CC_expanded=`func_echo_all $CC`
-      CC_quoted_expanded=`func_echo_all $CC_quoted`
-      case $@ in
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when configure was run.
-      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
-      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
-      # Blanks at the start of $base_compile will cause this to fail
-      # if we don't check for them as well.
-      *)
-       for z in $available_tags; do
-         if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
-           # Evaluate the configuration.
-           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
-           CC_quoted=
-           for arg in $CC; do
-             # Double-quote args containing other shell metacharacters.
-             func_append_quoted CC_quoted "$arg"
-           done
-           CC_expanded=`func_echo_all $CC`
-           CC_quoted_expanded=`func_echo_all $CC_quoted`
-           case "$@ " in
-           " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
-           " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
-             # The compiler in the base compile command matches
-             # the one in the tagged configuration.
-             # Assume this is the tagged configuration we want.
-             tagname=$z
-             break
-             ;;
-           esac
-         fi
-       done
-       # If $tagname still isn't set, then no tagged configuration
-       # was found and let the user know that the "--tag" command
-       # line option must be used.
-       if test -z "$tagname"; then
-         func_echo "unable to infer tagged configuration"
-         func_fatal_error "specify a tag with \`--tag'"
-#      else
-#        func_verbose "using $tagname tagged configuration"
-       fi
-       ;;
-      esac
-    fi
-}
-
-
-
-# func_write_libtool_object output_name pic_name nonpic_name
-# Create a libtool object file (analogous to a ".la" file),
-# but don't create it if we're doing a dry run.
-func_write_libtool_object ()
-{
-    write_libobj=${1}
-    if test "$build_libtool_libs" = yes; then
-      write_lobj=\'${2}\'
-    else
-      write_lobj=none
-    fi
-
-    if test "$build_old_libs" = yes; then
-      write_oldobj=\'${3}\'
-    else
-      write_oldobj=none
-    fi
-
-    $opt_dry_run || {
-      cat >${write_libobj}T <<EOF
-# $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object=$write_lobj
-
-# Name of the non-PIC object
-non_pic_object=$write_oldobj
-
-EOF
-      $MV "${write_libobj}T" "${write_libobj}"
-    }
-}
-
-
-##################################################
-# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
-##################################################
-
-# func_convert_core_file_wine_to_w32 ARG
-# Helper function used by file name conversion functions when $build is *nix,
-# and $host is mingw, cygwin, or some other w32 environment. Relies on a
-# correctly configured wine environment available, with the winepath program
-# in $build's $PATH.
-#
-# ARG is the $build file name to be converted to w32 format.
-# Result is available in $func_convert_core_file_wine_to_w32_result, and will
-# be empty on error (or when ARG is empty)
-func_convert_core_file_wine_to_w32 ()
-{
-  $opt_debug
-  func_convert_core_file_wine_to_w32_result="$1"
-  if test -n "$1"; then
-    # Unfortunately, winepath does not exit with a non-zero error code, so we
-    # are forced to check the contents of stdout. On the other hand, if the
-    # command is not found, the shell will set an exit code of 127 and print
-    # *an error message* to stdout. So we must check for both error code of
-    # zero AND non-empty stdout, which explains the odd construction:
-    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
-    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
-      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
-        $SED -e "$lt_sed_naive_backslashify"`
-    else
-      func_convert_core_file_wine_to_w32_result=
-    fi
-  fi
-}
-# end: func_convert_core_file_wine_to_w32
-
-
-# func_convert_core_path_wine_to_w32 ARG
-# Helper function used by path conversion functions when $build is *nix, and
-# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
-# configured wine environment available, with the winepath program in $build's
-# $PATH. Assumes ARG has no leading or trailing path separator characters.
-#
-# ARG is path to be converted from $build format to win32.
-# Result is available in $func_convert_core_path_wine_to_w32_result.
-# Unconvertible file (directory) names in ARG are skipped; if no directory names
-# are convertible, then the result may be empty.
-func_convert_core_path_wine_to_w32 ()
-{
-  $opt_debug
-  # unfortunately, winepath doesn't convert paths, only file names
-  func_convert_core_path_wine_to_w32_result=""
-  if test -n "$1"; then
-    oldIFS=$IFS
-    IFS=:
-    for func_convert_core_path_wine_to_w32_f in $1; do
-      IFS=$oldIFS
-      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
-      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
-        if test -z "$func_convert_core_path_wine_to_w32_result"; then
-          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
-        else
-          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
-        fi
-      fi
-    done
-    IFS=$oldIFS
-  fi
-}
-# end: func_convert_core_path_wine_to_w32
-
-
-# func_cygpath ARGS...
-# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
-# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
-# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
-# (2), returns the Cygwin file name or path in func_cygpath_result (input
-# file name or path is assumed to be in w32 format, as previously converted
-# from $build's *nix or MSYS format). In case (3), returns the w32 file name
-# or path in func_cygpath_result (input file name or path is assumed to be in
-# Cygwin format). Returns an empty string on error.
-#
-# ARGS are passed to cygpath, with the last one being the file name or path to
-# be converted.
-#
-# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
-# environment variable; do not put it in $PATH.
-func_cygpath ()
-{
-  $opt_debug
-  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
-    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
-    if test "$?" -ne 0; then
-      # on failure, ensure result is empty
-      func_cygpath_result=
-    fi
-  else
-    func_cygpath_result=
-    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
-  fi
-}
-#end: func_cygpath
-
-
-# func_convert_core_msys_to_w32 ARG
-# Convert file name or path ARG from MSYS format to w32 format.  Return
-# result in func_convert_core_msys_to_w32_result.
-func_convert_core_msys_to_w32 ()
-{
-  $opt_debug
-  # awkward: cmd appends spaces to result
-  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
-    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
-}
-#end: func_convert_core_msys_to_w32
-
-
-# func_convert_file_check ARG1 ARG2
-# Verify that ARG1 (a file name in $build format) was converted to $host
-# format in ARG2. Otherwise, emit an error message, but continue (resetting
-# func_to_host_file_result to ARG1).
-func_convert_file_check ()
-{
-  $opt_debug
-  if test -z "$2" && test -n "$1" ; then
-    func_error "Could not determine host file name corresponding to"
-    func_error "  \`$1'"
-    func_error "Continuing, but uninstalled executables may not work."
-    # Fallback:
-    func_to_host_file_result="$1"
-  fi
-}
-# end func_convert_file_check
-
-
-# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
-# Verify that FROM_PATH (a path in $build format) was converted to $host
-# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
-# func_to_host_file_result to a simplistic fallback value (see below).
-func_convert_path_check ()
-{
-  $opt_debug
-  if test -z "$4" && test -n "$3"; then
-    func_error "Could not determine the host path corresponding to"
-    func_error "  \`$3'"
-    func_error "Continuing, but uninstalled executables may not work."
-    # Fallback.  This is a deliberately simplistic "conversion" and
-    # should not be "improved".  See libtool.info.
-    if test "x$1" != "x$2"; then
-      lt_replace_pathsep_chars="s|$1|$2|g"
-      func_to_host_path_result=`echo "$3" |
-        $SED -e "$lt_replace_pathsep_chars"`
-    else
-      func_to_host_path_result="$3"
-    fi
-  fi
-}
-# end func_convert_path_check
-
-
-# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
-# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
-# and appending REPL if ORIG matches BACKPAT.
-func_convert_path_front_back_pathsep ()
-{
-  $opt_debug
-  case $4 in
-  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
-    ;;
-  esac
-  case $4 in
-  $2 ) func_append func_to_host_path_result "$3"
-    ;;
-  esac
-}
-# end func_convert_path_front_back_pathsep
-
-
-##################################################
-# $build to $host FILE NAME CONVERSION FUNCTIONS #
-##################################################
-# invoked via `$to_host_file_cmd ARG'
-#
-# In each case, ARG is the path to be converted from $build to $host format.
-# Result will be available in $func_to_host_file_result.
-
-
-# func_to_host_file ARG
-# Converts the file name ARG from $build format to $host format. Return result
-# in func_to_host_file_result.
-func_to_host_file ()
-{
-  $opt_debug
-  $to_host_file_cmd "$1"
-}
-# end func_to_host_file
-
-
-# func_to_tool_file ARG LAZY
-# converts the file name ARG from $build format to toolchain format. Return
-# result in func_to_tool_file_result.  If the conversion in use is listed
-# in (the comma separated) LAZY, no conversion takes place.
-func_to_tool_file ()
-{
-  $opt_debug
-  case ,$2, in
-    *,"$to_tool_file_cmd",*)
-      func_to_tool_file_result=$1
-      ;;
-    *)
-      $to_tool_file_cmd "$1"
-      func_to_tool_file_result=$func_to_host_file_result
-      ;;
-  esac
-}
-# end func_to_tool_file
-
-
-# func_convert_file_noop ARG
-# Copy ARG to func_to_host_file_result.
-func_convert_file_noop ()
-{
-  func_to_host_file_result="$1"
-}
-# end func_convert_file_noop
-
-
-# func_convert_file_msys_to_w32 ARG
-# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
-# conversion to w32 is not available inside the cwrapper.  Returns result in
-# func_to_host_file_result.
-func_convert_file_msys_to_w32 ()
-{
-  $opt_debug
-  func_to_host_file_result="$1"
-  if test -n "$1"; then
-    func_convert_core_msys_to_w32 "$1"
-    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
-  fi
-  func_convert_file_check "$1" "$func_to_host_file_result"
-}
-# end func_convert_file_msys_to_w32
-
-
-# func_convert_file_cygwin_to_w32 ARG
-# Convert file name ARG from Cygwin to w32 format.  Returns result in
-# func_to_host_file_result.
-func_convert_file_cygwin_to_w32 ()
-{
-  $opt_debug
-  func_to_host_file_result="$1"
-  if test -n "$1"; then
-    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
-    # LT_CYGPATH in this case.
-    func_to_host_file_result=`cygpath -m "$1"`
-  fi
-  func_convert_file_check "$1" "$func_to_host_file_result"
-}
-# end func_convert_file_cygwin_to_w32
-
-
-# func_convert_file_nix_to_w32 ARG
-# Convert file name ARG from *nix to w32 format.  Requires a wine environment
-# and a working winepath. Returns result in func_to_host_file_result.
-func_convert_file_nix_to_w32 ()
-{
-  $opt_debug
-  func_to_host_file_result="$1"
-  if test -n "$1"; then
-    func_convert_core_file_wine_to_w32 "$1"
-    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
-  fi
-  func_convert_file_check "$1" "$func_to_host_file_result"
-}
-# end func_convert_file_nix_to_w32
-
-
-# func_convert_file_msys_to_cygwin ARG
-# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
-# Returns result in func_to_host_file_result.
-func_convert_file_msys_to_cygwin ()
-{
-  $opt_debug
-  func_to_host_file_result="$1"
-  if test -n "$1"; then
-    func_convert_core_msys_to_w32 "$1"
-    func_cygpath -u "$func_convert_core_msys_to_w32_result"
-    func_to_host_file_result="$func_cygpath_result"
-  fi
-  func_convert_file_check "$1" "$func_to_host_file_result"
-}
-# end func_convert_file_msys_to_cygwin
-
-
-# func_convert_file_nix_to_cygwin ARG
-# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
-# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
-# in func_to_host_file_result.
-func_convert_file_nix_to_cygwin ()
-{
-  $opt_debug
-  func_to_host_file_result="$1"
-  if test -n "$1"; then
-    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
-    func_convert_core_file_wine_to_w32 "$1"
-    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
-    func_to_host_file_result="$func_cygpath_result"
-  fi
-  func_convert_file_check "$1" "$func_to_host_file_result"
-}
-# end func_convert_file_nix_to_cygwin
-
-
-#############################################
-# $build to $host PATH CONVERSION FUNCTIONS #
-#############################################
-# invoked via `$to_host_path_cmd ARG'
-#
-# In each case, ARG is the path to be converted from $build to $host format.
-# The result will be available in $func_to_host_path_result.
-#
-# Path separators are also converted from $build format to $host format.  If
-# ARG begins or ends with a path separator character, it is preserved (but
-# converted to $host format) on output.
-#
-# All path conversion functions are named using the following convention:
-#   file name conversion function    : func_convert_file_X_to_Y ()
-#   path conversion function         : func_convert_path_X_to_Y ()
-# where, for any given $build/$host combination the 'X_to_Y' value is the
-# same.  If conversion functions are added for new $build/$host combinations,
-# the two new functions must follow this pattern, or func_init_to_host_path_cmd
-# will break.
-
-
-# func_init_to_host_path_cmd
-# Ensures that function "pointer" variable $to_host_path_cmd is set to the
-# appropriate value, based on the value of $to_host_file_cmd.
-to_host_path_cmd=
-func_init_to_host_path_cmd ()
-{
-  $opt_debug
-  if test -z "$to_host_path_cmd"; then
-    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
-    to_host_path_cmd="func_convert_path_${func_stripname_result}"
-  fi
-}
-
-
-# func_to_host_path ARG
-# Converts the path ARG from $build format to $host format. Return result
-# in func_to_host_path_result.
-func_to_host_path ()
-{
-  $opt_debug
-  func_init_to_host_path_cmd
-  $to_host_path_cmd "$1"
-}
-# end func_to_host_path
-
-
-# func_convert_path_noop ARG
-# Copy ARG to func_to_host_path_result.
-func_convert_path_noop ()
-{
-  func_to_host_path_result="$1"
-}
-# end func_convert_path_noop
-
-
-# func_convert_path_msys_to_w32 ARG
-# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
-# conversion to w32 is not available inside the cwrapper.  Returns result in
-# func_to_host_path_result.
-func_convert_path_msys_to_w32 ()
-{
-  $opt_debug
-  func_to_host_path_result="$1"
-  if test -n "$1"; then
-    # Remove leading and trailing path separator characters from ARG.  MSYS
-    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
-    # and winepath ignores them completely.
-    func_stripname : : "$1"
-    func_to_host_path_tmp1=$func_stripname_result
-    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
-    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
-    func_convert_path_check : ";" \
-      "$func_to_host_path_tmp1" "$func_to_host_path_result"
-    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
-  fi
-}
-# end func_convert_path_msys_to_w32
-
-
-# func_convert_path_cygwin_to_w32 ARG
-# Convert path ARG from Cygwin to w32 format.  Returns result in
-# func_to_host_file_result.
-func_convert_path_cygwin_to_w32 ()
-{
-  $opt_debug
-  func_to_host_path_result="$1"
-  if test -n "$1"; then
-    # See func_convert_path_msys_to_w32:
-    func_stripname : : "$1"
-    func_to_host_path_tmp1=$func_stripname_result
-    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
-    func_convert_path_check : ";" \
-      "$func_to_host_path_tmp1" "$func_to_host_path_result"
-    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
-  fi
-}
-# end func_convert_path_cygwin_to_w32
-
-
-# func_convert_path_nix_to_w32 ARG
-# Convert path ARG from *nix to w32 format.  Requires a wine environment and
-# a working winepath.  Returns result in func_to_host_file_result.
-func_convert_path_nix_to_w32 ()
-{
-  $opt_debug
-  func_to_host_path_result="$1"
-  if test -n "$1"; then
-    # See func_convert_path_msys_to_w32:
-    func_stripname : : "$1"
-    func_to_host_path_tmp1=$func_stripname_result
-    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
-    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
-    func_convert_path_check : ";" \
-      "$func_to_host_path_tmp1" "$func_to_host_path_result"
-    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
-  fi
-}
-# end func_convert_path_nix_to_w32
-
-
-# func_convert_path_msys_to_cygwin ARG
-# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
-# Returns result in func_to_host_file_result.
-func_convert_path_msys_to_cygwin ()
-{
-  $opt_debug
-  func_to_host_path_result="$1"
-  if test -n "$1"; then
-    # See func_convert_path_msys_to_w32:
-    func_stripname : : "$1"
-    func_to_host_path_tmp1=$func_stripname_result
-    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
-    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
-    func_to_host_path_result="$func_cygpath_result"
-    func_convert_path_check : : \
-      "$func_to_host_path_tmp1" "$func_to_host_path_result"
-    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
-  fi
-}
-# end func_convert_path_msys_to_cygwin
-
-
-# func_convert_path_nix_to_cygwin ARG
-# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
-# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
-# func_to_host_file_result.
-func_convert_path_nix_to_cygwin ()
-{
-  $opt_debug
-  func_to_host_path_result="$1"
-  if test -n "$1"; then
-    # Remove leading and trailing path separator characters from
-    # ARG. msys behavior is inconsistent here, cygpath turns them
-    # into '.;' and ';.', and winepath ignores them completely.
-    func_stripname : : "$1"
-    func_to_host_path_tmp1=$func_stripname_result
-    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
-    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
-    func_to_host_path_result="$func_cygpath_result"
-    func_convert_path_check : : \
-      "$func_to_host_path_tmp1" "$func_to_host_path_result"
-    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
-  fi
-}
-# end func_convert_path_nix_to_cygwin
-
-
-# func_mode_compile arg...
-func_mode_compile ()
-{
-    $opt_debug
-    # Get the compilation command and the source file.
-    base_compile=
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
-    suppress_opt=yes
-    suppress_output=
-    arg_mode=normal
-    libobj=
-    later=
-    pie_flag=
-
-    for arg
-    do
-      case $arg_mode in
-      arg  )
-       # do not "continue".  Instead, add this to base_compile
-       lastarg="$arg"
-       arg_mode=normal
-       ;;
-
-      target )
-       libobj="$arg"
-       arg_mode=normal
-       continue
-       ;;
-
-      normal )
-       # Accept any command-line options.
-       case $arg in
-       -o)
-         test -n "$libobj" && \
-           func_fatal_error "you cannot specify \`-o' more than once"
-         arg_mode=target
-         continue
-         ;;
-
-       -pie | -fpie | -fPIE)
-          func_append pie_flag " $arg"
-         continue
-         ;;
-
-       -shared | -static | -prefer-pic | -prefer-non-pic)
-         func_append later " $arg"
-         continue
-         ;;
-
-       -no-suppress)
-         suppress_opt=no
-         continue
-         ;;
-
-       -Xcompiler)
-         arg_mode=arg  #  the next one goes into the "base_compile" arg list
-         continue      #  The current "srcfile" will either be retained or
-         ;;            #  replaced later.  I would guess that would be a bug.
-
-       -Wc,*)
-         func_stripname '-Wc,' '' "$arg"
-         args=$func_stripname_result
-         lastarg=
-         save_ifs="$IFS"; IFS=','
-         for arg in $args; do
-           IFS="$save_ifs"
-           func_append_quoted lastarg "$arg"
-         done
-         IFS="$save_ifs"
-         func_stripname ' ' '' "$lastarg"
-         lastarg=$func_stripname_result
-
-         # Add the arguments to base_compile.
-         func_append base_compile " $lastarg"
-         continue
-         ;;
-
-       *)
-         # Accept the current argument as the source file.
-         # The previous "srcfile" becomes the current argument.
-         #
-         lastarg="$srcfile"
-         srcfile="$arg"
-         ;;
-       esac  #  case $arg
-       ;;
-      esac    #  case $arg_mode
-
-      # Aesthetically quote the previous argument.
-      func_append_quoted base_compile "$lastarg"
-    done # for arg
-
-    case $arg_mode in
-    arg)
-      func_fatal_error "you must specify an argument for -Xcompile"
-      ;;
-    target)
-      func_fatal_error "you must specify a target with \`-o'"
-      ;;
-    *)
-      # Get the name of the library object.
-      test -z "$libobj" && {
-       func_basename "$srcfile"
-       libobj="$func_basename_result"
-      }
-      ;;
-    esac
-
-    # Recognize several different file suffixes.
-    # If the user specifies -o file.o, it is replaced with file.lo
-    case $libobj in
-    *.[cCFSifmso] | \
-    *.ada | *.adb | *.ads | *.asm | \
-    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
-    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
-      func_xform "$libobj"
-      libobj=$func_xform_result
-      ;;
-    esac
-
-    case $libobj in
-    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
-    *)
-      func_fatal_error "cannot determine name of library object from \`$libobj'"
-      ;;
-    esac
-
-    func_infer_tag $base_compile
-
-    for arg in $later; do
-      case $arg in
-      -shared)
-       test "$build_libtool_libs" != yes && \
-         func_fatal_configuration "can not build a shared library"
-       build_old_libs=no
-       continue
-       ;;
-
-      -static)
-       build_libtool_libs=no
-       build_old_libs=yes
-       continue
-       ;;
-
-      -prefer-pic)
-       pic_mode=yes
-       continue
-       ;;
-
-      -prefer-non-pic)
-       pic_mode=no
-       continue
-       ;;
-      esac
-    done
-
-    func_quote_for_eval "$libobj"
-    test "X$libobj" != "X$func_quote_for_eval_result" \
-      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'   &()|`$[]' \
-      && func_warning "libobj name \`$libobj' may not contain shell special characters."
-    func_dirname_and_basename "$obj" "/" ""
-    objname="$func_basename_result"
-    xdir="$func_dirname_result"
-    lobj=${xdir}$objdir/$objname
-
-    test -z "$base_compile" && \
-      func_fatal_help "you must specify a compilation command"
-
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      removelist="$obj $lobj $libobj ${libobj}T"
-    else
-      removelist="$lobj $libobj ${libobj}T"
-    fi
-
-    # On Cygwin there's no "real" PIC flag so we must build both object types
-    case $host_os in
-    cygwin* | mingw* | pw32* | os2* | cegcc*)
-      pic_mode=default
-      ;;
-    esac
-    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
-      # non-PIC code in shared libraries is not supported
-      pic_mode=default
-    fi
-
-    # Calculate the filename of the output object if compiler does
-    # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
-      lockfile="$output_obj.lock"
-    else
-      output_obj=
-      need_locks=no
-      lockfile=
-    fi
-
-    # Lock this critical section if it is needed
-    # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
-      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
-       func_echo "Waiting for $lockfile to be removed"
-       sleep 2
-      done
-    elif test "$need_locks" = warn; then
-      if test -f "$lockfile"; then
-       $ECHO "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-       $opt_dry_run || $RM $removelist
-       exit $EXIT_FAILURE
-      fi
-      func_append removelist " $output_obj"
-      $ECHO "$srcfile" > "$lockfile"
-    fi
-
-    $opt_dry_run || $RM $removelist
-    func_append removelist " $lockfile"
-    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
-
-    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
-    srcfile=$func_to_tool_file_result
-    func_quote_for_eval "$srcfile"
-    qsrcfile=$func_quote_for_eval_result
-
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
-
-      if test "$pic_mode" != no; then
-       command="$base_compile $qsrcfile $pic_flag"
-      else
-       # Don't build PIC code
-       command="$base_compile $qsrcfile"
-      fi
-
-      func_mkdir_p "$xdir$objdir"
-
-      if test -z "$output_obj"; then
-       # Place PIC objects in $objdir
-       func_append command " -o $lobj"
-      fi
-
-      func_show_eval_locale "$command" \
-          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
-
-      if test "$need_locks" = warn &&
-        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-       $ECHO "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-       $opt_dry_run || $RM $removelist
-       exit $EXIT_FAILURE
-      fi
-
-      # Just move the object if needed, then go on to compile the next one
-      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
-       func_show_eval '$MV "$output_obj" "$lobj"' \
-         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
-      fi
-
-      # Allow error messages only from the first compilation.
-      if test "$suppress_opt" = yes; then
-       suppress_output=' >/dev/null 2>&1'
-      fi
-    fi
-
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      if test "$pic_mode" != yes; then
-       # Don't build PIC code
-       command="$base_compile $qsrcfile$pie_flag"
-      else
-       command="$base_compile $qsrcfile $pic_flag"
-      fi
-      if test "$compiler_c_o" = yes; then
-       func_append command " -o $obj"
-      fi
-
-      # Suppress compiler output if we already did a PIC compilation.
-      func_append command "$suppress_output"
-      func_show_eval_locale "$command" \
-        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
-
-      if test "$need_locks" = warn &&
-        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-       $ECHO "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-       $opt_dry_run || $RM $removelist
-       exit $EXIT_FAILURE
-      fi
-
-      # Just move the object if needed
-      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
-       func_show_eval '$MV "$output_obj" "$obj"' \
-         'error=$?; $opt_dry_run || $RM $removelist; exit $error'
-      fi
-    fi
-
-    $opt_dry_run || {
-      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
-
-      # Unlock the critical section if it was locked
-      if test "$need_locks" != no; then
-       removelist=$lockfile
-        $RM "$lockfile"
-      fi
-    }
-
-    exit $EXIT_SUCCESS
-}
-
-$opt_help || {
-  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
-}
-
-func_mode_help ()
-{
-    # We need to display help for each of the modes.
-    case $opt_mode in
-      "")
-        # Generic help is extracted from the usage comments
-        # at the start of this file.
-        func_help
-        ;;
-
-      clean)
-        $ECHO \
-"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
-        ;;
-
-      compile)
-      $ECHO \
-"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
-  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
-  -no-suppress      do not suppress compiler output for multiple passes
-  -prefer-pic       try to build PIC objects only
-  -prefer-non-pic   try to build non-PIC objects only
-  -shared           do not build a \`.o' file suitable for static linking
-  -static           only build a \`.o' file suitable for static linking
-  -Wc,FLAG          pass FLAG directly to the compiler
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-        ;;
-
-      execute)
-        $ECHO \
-"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-        ;;
-
-      finish)
-        $ECHO \
-"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-        ;;
-
-      install)
-        $ECHO \
-"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The following components of INSTALL-COMMAND are treated specially:
-
-  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-        ;;
-
-      link)
-        $ECHO \
-"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -avoid-version    do not add a version suffix if possible
-  -bindir BINDIR    specify path to binaries directory (for systems where
-                    libraries must be found in the PATH setting at runtime)
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -export-symbols SYMFILE
-                    try to export only the symbols listed in SYMFILE
-  -export-symbols-regex REGEX
-                    try to export only the symbols matching REGEX
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -module           build a library that can dlopened
-  -no-fast-install  disable the fast-install mode
-  -no-install       link a not-installable executable
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
-  -precious-files-regex REGEX
-                    don't remove output files matching REGEX
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -shared           only do dynamic linking of libtool libraries
-  -shrext SUFFIX    override the standard shared library file extension
-  -static           do not do any dynamic linking of uninstalled libtool libraries
-  -static-libtool-libs
-                    do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-                    specify library version info [each variable defaults to 0]
-  -weak LIBNAME     declare that the target provides the LIBNAME interface
-  -Wc,FLAG
-  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
-  -Wl,FLAG
-  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
-  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
-        ;;
-
-      uninstall)
-        $ECHO \
-"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-        ;;
-
-      *)
-        func_fatal_help "invalid operation mode \`$opt_mode'"
-        ;;
-    esac
-
-    echo
-    $ECHO "Try \`$progname --help' for more information about other modes."
-}
-
-# Now that we've collected a possible --mode arg, show help if necessary
-if $opt_help; then
-  if test "$opt_help" = :; then
-    func_mode_help
-  else
-    {
-      func_help noexit
-      for opt_mode in compile link execute install finish uninstall clean; do
-       func_mode_help
-      done
-    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
-    {
-      func_help noexit
-      for opt_mode in compile link execute install finish uninstall clean; do
-       echo
-       func_mode_help
-      done
-    } |
-    sed '1d
-      /^When reporting/,/^Report/{
-       H
-       d
-      }
-      $x
-      /information about other modes/d
-      /more detailed .*MODE/d
-      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
-  fi
-  exit $?
-fi
-
-
-# func_mode_execute arg...
-func_mode_execute ()
-{
-    $opt_debug
-    # The first argument is the command name.
-    cmd="$nonopt"
-    test -z "$cmd" && \
-      func_fatal_help "you must specify a COMMAND"
-
-    # Handle -dlopen flags immediately.
-    for file in $opt_dlopen; do
-      test -f "$file" \
-       || func_fatal_help "\`$file' is not a file"
-
-      dir=
-      case $file in
-      *.la)
-       func_resolve_sysroot "$file"
-       file=$func_resolve_sysroot_result
-
-       # Check to see that this really is a libtool archive.
-       func_lalib_unsafe_p "$file" \
-         || func_fatal_help "\`$lib' is not a valid libtool archive"
-
-       # Read the libtool library.
-       dlname=
-       library_names=
-       func_source "$file"
-
-       # Skip this library if it cannot be dlopened.
-       if test -z "$dlname"; then
-         # Warn if it was a shared library.
-         test -n "$library_names" && \
-           func_warning "\`$file' was not linked with \`-export-dynamic'"
-         continue
-       fi
-
-       func_dirname "$file" "" "."
-       dir="$func_dirname_result"
-
-       if test -f "$dir/$objdir/$dlname"; then
-         func_append dir "/$objdir"
-       else
-         if test ! -f "$dir/$dlname"; then
-           func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
-         fi
-       fi
-       ;;
-
-      *.lo)
-       # Just add the directory containing the .lo file.
-       func_dirname "$file" "" "."
-       dir="$func_dirname_result"
-       ;;
-
-      *)
-       func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
-       continue
-       ;;
-      esac
-
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
-
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-       eval "$shlibpath_var=\"\$dir\""
-      else
-       eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
-
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
-
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case $file in
-      -* | *.la | *.lo ) ;;
-      *)
-       # Do a test to see if this is really a libtool program.
-       if func_ltwrapper_script_p "$file"; then
-         func_source "$file"
-         # Transform arg to wrapped name.
-         file="$progdir/$program"
-       elif func_ltwrapper_executable_p "$file"; then
-         func_ltwrapper_scriptname "$file"
-         func_source "$func_ltwrapper_scriptname_result"
-         # Transform arg to wrapped name.
-         file="$progdir/$program"
-       fi
-       ;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      func_append_quoted args "$file"
-    done
-
-    if test "X$opt_dry_run" = Xfalse; then
-      if test -n "$shlibpath_var"; then
-       # Export the shlibpath_var.
-       eval "export $shlibpath_var"
-      fi
-
-      # Restore saved environment variables
-      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-      do
-       eval "if test \"\${save_$lt_var+set}\" = set; then
-                $lt_var=\$save_$lt_var; export $lt_var
-             else
-               $lt_unset $lt_var
-             fi"
-      done
-
-      # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-       eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
-       echo "export $shlibpath_var"
-      fi
-      $ECHO "$cmd$args"
-      exit $EXIT_SUCCESS
-    fi
-}
-
-test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
-
-
-# func_mode_finish arg...
-func_mode_finish ()
-{
-    $opt_debug
-    libs=
-    libdirs=
-    admincmds=
-
-    for opt in "$nonopt" ${1+"$@"}
-    do
-      if test -d "$opt"; then
-       func_append libdirs " $opt"
-
-      elif test -f "$opt"; then
-       if func_lalib_unsafe_p "$opt"; then
-         func_append libs " $opt"
-       else
-         func_warning "\`$opt' is not a valid libtool archive"
-       fi
-
-      else
-       func_fatal_error "invalid argument \`$opt'"
-      fi
-    done
-
-    if test -n "$libs"; then
-      if test -n "$lt_sysroot"; then
-        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
-        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
-      else
-        sysroot_cmd=
-      fi
-
-      # Remove sysroot references
-      if $opt_dry_run; then
-        for lib in $libs; do
-          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
-        done
-      else
-        tmpdir=`func_mktempdir`
-        for lib in $libs; do
-         sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
-           > $tmpdir/tmp-la
-         mv -f $tmpdir/tmp-la $lib
-       done
-        ${RM}r "$tmpdir"
-      fi
-    fi
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for libdir in $libdirs; do
-       if test -n "$finish_cmds"; then
-         # Do each command in the finish commands.
-         func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
-'"$cmd"'"'
-       fi
-       if test -n "$finish_eval"; then
-         # Do the single finish_eval.
-         eval cmds=\"$finish_eval\"
-         $opt_dry_run || eval "$cmds" || func_append admincmds "
-       $cmds"
-       fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    $opt_silent && exit $EXIT_SUCCESS
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      echo "----------------------------------------------------------------------"
-      echo "Libraries have been installed in:"
-      for libdir in $libdirs; do
-       $ECHO "   $libdir"
-      done
-      echo
-      echo "If you ever happen to want to link against installed libraries"
-      echo "in a given directory, LIBDIR, you must either use libtool, and"
-      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
-      echo "flag during linking and do at least one of the following:"
-      if test -n "$shlibpath_var"; then
-       echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-       echo "     during execution"
-      fi
-      if test -n "$runpath_var"; then
-       echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-       echo "     during linking"
-      fi
-      if test -n "$hardcode_libdir_flag_spec"; then
-       libdir=LIBDIR
-       eval flag=\"$hardcode_libdir_flag_spec\"
-
-       $ECHO "   - use the \`$flag' linker flag"
-      fi
-      if test -n "$admincmds"; then
-       $ECHO "   - have your system administrator run these commands:$admincmds"
-      fi
-      if test -f /etc/ld.so.conf; then
-       echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-      fi
-      echo
-
-      echo "See any operating system documentation about shared libraries for"
-      case $host in
-       solaris2.[6789]|solaris2.1[0-9])
-         echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
-         echo "pages."
-         ;;
-       *)
-         echo "more information, such as the ld(1) and ld.so(8) manual pages."
-         ;;
-      esac
-      echo "----------------------------------------------------------------------"
-    fi
-    exit $EXIT_SUCCESS
-}
-
-test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
-
-
-# func_mode_install arg...
-func_mode_install ()
-{
-    $opt_debug
-    # There may be an optional sh(1) argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
-       # Allow the use of GNU shtool's install command.
-       case $nonopt in *shtool*) :;; *) false;; esac; then
-      # Aesthetically quote it.
-      func_quote_for_eval "$nonopt"
-      install_prog="$func_quote_for_eval_result "
-      arg=$1
-      shift
-    else
-      install_prog=
-      arg=$nonopt
-    fi
-
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    func_quote_for_eval "$arg"
-    func_append install_prog "$func_quote_for_eval_result"
-    install_shared_prog=$install_prog
-    case " $install_prog " in
-      *[\\\ /]cp\ *) install_cp=: ;;
-      *) install_cp=false ;;
-    esac
-
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=no
-    stripme=
-    no_mode=:
-    for arg
-    do
-      arg2=
-      if test -n "$dest"; then
-       func_append files " $dest"
-       dest=$arg
-       continue
-      fi
-
-      case $arg in
-      -d) isdir=yes ;;
-      -f)
-       if $install_cp; then :; else
-         prev=$arg
-       fi
-       ;;
-      -g | -m | -o)
-       prev=$arg
-       ;;
-      -s)
-       stripme=" -s"
-       continue
-       ;;
-      -*)
-       ;;
-      *)
-       # If the previous option needed an argument, then skip it.
-       if test -n "$prev"; then
-         if test "x$prev" = x-m && test -n "$install_override_mode"; then
-           arg2=$install_override_mode
-           no_mode=false
-         fi
-         prev=
-       else
-         dest=$arg
-         continue
-       fi
-       ;;
-      esac
-
-      # Aesthetically quote the argument.
-      func_quote_for_eval "$arg"
-      func_append install_prog " $func_quote_for_eval_result"
-      if test -n "$arg2"; then
-       func_quote_for_eval "$arg2"
-      fi
-      func_append install_shared_prog " $func_quote_for_eval_result"
-    done
-
-    test -z "$install_prog" && \
-      func_fatal_help "you must specify an install program"
-
-    test -n "$prev" && \
-      func_fatal_help "the \`$prev' option requires an argument"
-
-    if test -n "$install_override_mode" && $no_mode; then
-      if $install_cp; then :; else
-       func_quote_for_eval "$install_override_mode"
-       func_append install_shared_prog " -m $func_quote_for_eval_result"
-      fi
-    fi
-
-    if test -z "$files"; then
-      if test -z "$dest"; then
-       func_fatal_help "no file or destination specified"
-      else
-       func_fatal_help "you must specify a destination"
-      fi
-    fi
-
-    # Strip any trailing slash from the destination.
-    func_stripname '' '/' "$dest"
-    dest=$func_stripname_result
-
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
-      destname=
-    else
-      func_dirname_and_basename "$dest" "" "."
-      destdir="$func_dirname_result"
-      destname="$func_basename_result"
-
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files; shift
-      test "$#" -gt 1 && \
-       func_fatal_help "\`$dest' is not a directory"
-    fi
-    case $destdir in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
-    *)
-      for file in $files; do
-       case $file in
-       *.lo) ;;
-       *)
-         func_fatal_help "\`$destdir' must be an absolute directory name"
-         ;;
-       esac
-      done
-      ;;
-    esac
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
-
-      # Do each installation.
-      case $file in
-      *.$libext)
-       # Do the static libraries later.
-       func_append staticlibs " $file"
-       ;;
-
-      *.la)
-       func_resolve_sysroot "$file"
-       file=$func_resolve_sysroot_result
-
-       # Check to see that this really is a libtool archive.
-       func_lalib_unsafe_p "$file" \
-         || func_fatal_help "\`$file' is not a valid libtool archive"
-
-       library_names=
-       old_library=
-       relink_command=
-       func_source "$file"
-
-       # Add the libdir to current_libdirs if it is the destination.
-       if test "X$destdir" = "X$libdir"; then
-         case "$current_libdirs " in
-         *" $libdir "*) ;;
-         *) func_append current_libdirs " $libdir" ;;
-         esac
-       else
-         # Note the libdir as a future libdir.
-         case "$future_libdirs " in
-         *" $libdir "*) ;;
-         *) func_append future_libdirs " $libdir" ;;
-         esac
-       fi
-
-       func_dirname "$file" "/" ""
-       dir="$func_dirname_result"
-       func_append dir "$objdir"
-
-       if test -n "$relink_command"; then
-         # Determine the prefix the user has applied to our future dir.
-         inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
-
-         # Don't allow the user to place us outside of our expected
-         # location b/c this prevents finding dependent libraries that
-         # are installed to the same prefix.
-         # At present, this check doesn't affect windows .dll's that
-         # are installed into $libdir/../bin (currently, that works fine)
-         # but it's something to keep an eye on.
-         test "$inst_prefix_dir" = "$destdir" && \
-           func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
-
-         if test -n "$inst_prefix_dir"; then
-           # Stick the inst_prefix_dir data into the link command.
-           relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
-         else
-           relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
-         fi
-
-         func_warning "relinking \`$file'"
-         func_show_eval "$relink_command" \
-           'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
-       fi
-
-       # See the names of the shared library.
-       set dummy $library_names; shift
-       if test -n "$1"; then
-         realname="$1"
-         shift
-
-         srcname="$realname"
-         test -n "$relink_command" && srcname="$realname"T
-
-         # Install the shared library and build the symlinks.
-         func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
-             'exit $?'
-         tstripme="$stripme"
-         case $host_os in
-         cygwin* | mingw* | pw32* | cegcc*)
-           case $realname in
-           *.dll.a)
-             tstripme=""
-             ;;
-           esac
-           ;;
-         esac
-         if test -n "$tstripme" && test -n "$striplib"; then
-           func_show_eval "$striplib $destdir/$realname" 'exit $?'
-         fi
-
-         if test "$#" -gt 0; then
-           # Delete the old symlinks, and create new ones.
-           # Try `ln -sf' first, because the `ln' binary might depend on
-           # the symlink we replace!  Solaris /bin/ln does not understand -f,
-           # so we also need to try rm && ln -s.
-           for linkname
-           do
-             test "$linkname" != "$realname" \
-               && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
-           done
-         fi
-
-         # Do each command in the postinstall commands.
-         lib="$destdir/$realname"
-         func_execute_cmds "$postinstall_cmds" 'exit $?'
-       fi
-
-       # Install the pseudo-library for information purposes.
-       func_basename "$file"
-       name="$func_basename_result"
-       instname="$dir/$name"i
-       func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
-
-       # Maybe install the static library, too.
-       test -n "$old_library" && func_append staticlibs " $dir/$old_library"
-       ;;
-
-      *.lo)
-       # Install (i.e. copy) a libtool object.
-
-       # Figure out destination file name, if it wasn't already specified.
-       if test -n "$destname"; then
-         destfile="$destdir/$destname"
-       else
-         func_basename "$file"
-         destfile="$func_basename_result"
-         destfile="$destdir/$destfile"
-       fi
-
-       # Deduce the name of the destination old-style object file.
-       case $destfile in
-       *.lo)
-         func_lo2o "$destfile"
-         staticdest=$func_lo2o_result
-         ;;
-       *.$objext)
-         staticdest="$destfile"
-         destfile=
-         ;;
-       *)
-         func_fatal_help "cannot copy a libtool object to \`$destfile'"
-         ;;
-       esac
-
-       # Install the libtool object if requested.
-       test -n "$destfile" && \
-         func_show_eval "$install_prog $file $destfile" 'exit $?'
-
-       # Install the old object if enabled.
-       if test "$build_old_libs" = yes; then
-         # Deduce the name of the old-style object file.
-         func_lo2o "$file"
-         staticobj=$func_lo2o_result
-         func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
-       fi
-       exit $EXIT_SUCCESS
-       ;;
-
-      *)
-       # Figure out destination file name, if it wasn't already specified.
-       if test -n "$destname"; then
-         destfile="$destdir/$destname"
-       else
-         func_basename "$file"
-         destfile="$func_basename_result"
-         destfile="$destdir/$destfile"
-       fi
-
-       # If the file is missing, and there is a .exe on the end, strip it
-       # because it is most likely a libtool script we actually want to
-       # install
-       stripped_ext=""
-       case $file in
-         *.exe)
-           if test ! -f "$file"; then
-             func_stripname '' '.exe' "$file"
-             file=$func_stripname_result
-             stripped_ext=".exe"
-           fi
-           ;;
-       esac
-
-       # Do a test to see if this is really a libtool program.
-       case $host in
-       *cygwin* | *mingw*)
-           if func_ltwrapper_executable_p "$file"; then
-             func_ltwrapper_scriptname "$file"
-             wrapper=$func_ltwrapper_scriptname_result
-           else
-             func_stripname '' '.exe' "$file"
-             wrapper=$func_stripname_result
-           fi
-           ;;
-       *)
-           wrapper=$file
-           ;;
-       esac
-       if func_ltwrapper_script_p "$wrapper"; then
-         notinst_deplibs=
-         relink_command=
-
-         func_source "$wrapper"
-
-         # Check the variables that should have been set.
-         test -z "$generated_by_libtool_version" && \
-           func_fatal_error "invalid libtool wrapper script \`$wrapper'"
-
-         finalize=yes
-         for lib in $notinst_deplibs; do
-           # Check to see that each library is installed.
-           libdir=
-           if test -f "$lib"; then
-             func_source "$lib"
-           fi
-           libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
-           if test -n "$libdir" && test ! -f "$libfile"; then
-             func_warning "\`$lib' has not been installed in \`$libdir'"
-             finalize=no
-           fi
-         done
-
-         relink_command=
-         func_source "$wrapper"
-
-         outputname=
-         if test "$fast_install" = no && test -n "$relink_command"; then
-           $opt_dry_run || {
-             if test "$finalize" = yes; then
-               tmpdir=`func_mktempdir`
-               func_basename "$file$stripped_ext"
-               file="$func_basename_result"
-               outputname="$tmpdir/$file"
-               # Replace the output file specification.
-               relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
-
-               $opt_silent || {
-                 func_quote_for_expand "$relink_command"
-                 eval "func_echo $func_quote_for_expand_result"
-               }
-               if eval "$relink_command"; then :
-                 else
-                 func_error "error: relink \`$file' with the above command before installing it"
-                 $opt_dry_run || ${RM}r "$tmpdir"
-                 continue
-               fi
-               file="$outputname"
-             else
-               func_warning "cannot relink \`$file'"
-             fi
-           }
-         else
-           # Install the binary that we compiled earlier.
-           file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
-         fi
-       fi
-
-       # remove .exe since cygwin /usr/bin/install will append another
-       # one anyway
-       case $install_prog,$host in
-       */usr/bin/install*,*cygwin*)
-         case $file:$destfile in
-         *.exe:*.exe)
-           # this is ok
-           ;;
-         *.exe:*)
-           destfile=$destfile.exe
-           ;;
-         *:*.exe)
-           func_stripname '' '.exe' "$destfile"
-           destfile=$func_stripname_result
-           ;;
-         esac
-         ;;
-       esac
-       func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
-       $opt_dry_run || if test -n "$outputname"; then
-         ${RM}r "$tmpdir"
-       fi
-       ;;
-      esac
-    done
-
-    for file in $staticlibs; do
-      func_basename "$file"
-      name="$func_basename_result"
-
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
-      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
-      tool_oldlib=$func_to_tool_file_result
-
-      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
-
-      if test -n "$stripme" && test -n "$old_striplib"; then
-       func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
-      fi
-
-      # Do each command in the postinstall commands.
-      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
-    done
-
-    test -n "$future_libdirs" && \
-      func_warning "remember to run \`$progname --finish$future_libdirs'"
-
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      $opt_dry_run && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
-    else
-      exit $EXIT_SUCCESS
-    fi
-}
-
-test "$opt_mode" = install && func_mode_install ${1+"$@"}
-
-
-# func_generate_dlsyms outputname originator pic_p
-# Extract symbols from dlprefiles and create ${outputname}S.o with
-# a dlpreopen symbol table.
-func_generate_dlsyms ()
-{
-    $opt_debug
-    my_outputname="$1"
-    my_originator="$2"
-    my_pic_p="${3-no}"
-    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
-    my_dlsyms=
-
-    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-      if test -n "$NM" && test -n "$global_symbol_pipe"; then
-       my_dlsyms="${my_outputname}S.c"
-      else
-       func_error "not configured to extract global symbols from dlpreopened files"
-      fi
-    fi
-
-    if test -n "$my_dlsyms"; then
-      case $my_dlsyms in
-      "") ;;
-      *.c)
-       # Discover the nlist of each of the dlfiles.
-       nlist="$output_objdir/${my_outputname}.nm"
-
-       func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
-
-       # Parse the name list into a source file.
-       func_verbose "creating $output_objdir/$my_dlsyms"
-
-       $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
-#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
-#endif
-
-/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
-   relocations are performed -- see ld's documentation on pseudo-relocs.  */
-# define LT_DLSYM_CONST
-#elif defined(__osf__)
-/* This system does not cope well with relocations in const data.  */
-# define LT_DLSYM_CONST
-#else
-# define LT_DLSYM_CONST const
-#endif
-
-/* External symbol declarations for the compiler. */\
-"
-
-       if test "$dlself" = yes; then
-         func_verbose "generating symbol list for \`$output'"
-
-         $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
-
-         # Add our own program objects to the symbol list.
-         progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
-         for progfile in $progfiles; do
-           func_to_tool_file "$progfile" func_convert_file_msys_to_w32
-           func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
-           $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
-         done
-
-         if test -n "$exclude_expsyms"; then
-           $opt_dry_run || {
-             eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-             eval '$MV "$nlist"T "$nlist"'
-           }
-         fi
-
-         if test -n "$export_symbols_regex"; then
-           $opt_dry_run || {
-             eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-             eval '$MV "$nlist"T "$nlist"'
-           }
-         fi
-
-         # Prepare the list of exported symbols
-         if test -z "$export_symbols"; then
-           export_symbols="$output_objdir/$outputname.exp"
-           $opt_dry_run || {
-             $RM $export_symbols
-             eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-             case $host in
-             *cygwin* | *mingw* | *cegcc* )
-                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
-               ;;
-             esac
-           }
-         else
-           $opt_dry_run || {
-             eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
-             eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
-             eval '$MV "$nlist"T "$nlist"'
-             case $host in
-               *cygwin* | *mingw* | *cegcc* )
-                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-                 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
-                 ;;
-             esac
-           }
-         fi
-       fi
-
-       for dlprefile in $dlprefiles; do
-         func_verbose "extracting global C symbols from \`$dlprefile'"
-         func_basename "$dlprefile"
-         name="$func_basename_result"
-          case $host in
-           *cygwin* | *mingw* | *cegcc* )
-             # if an import library, we need to obtain dlname
-             if func_win32_import_lib_p "$dlprefile"; then
-               func_tr_sh "$dlprefile"
-               eval "curr_lafile=\$libfile_$func_tr_sh_result"
-               dlprefile_dlbasename=""
-               if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
-                 # Use subshell, to avoid clobbering current variable values
-                 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
-                 if test -n "$dlprefile_dlname" ; then
-                   func_basename "$dlprefile_dlname"
-                   dlprefile_dlbasename="$func_basename_result"
-                 else
-                   # no lafile. user explicitly requested -dlpreopen <import library>.
-                   $sharedlib_from_linklib_cmd "$dlprefile"
-                   dlprefile_dlbasename=$sharedlib_from_linklib_result
-                 fi
-               fi
-               $opt_dry_run || {
-                 if test -n "$dlprefile_dlbasename" ; then
-                   eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
-                 else
-                   func_warning "Could not compute DLL name from $name"
-                   eval '$ECHO ": $name " >> "$nlist"'
-                 fi
-                 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
-                 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
-                   $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
-               }
-             else # not an import lib
-               $opt_dry_run || {
-                 eval '$ECHO ": $name " >> "$nlist"'
-                 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
-                 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
-               }
-             fi
-           ;;
-           *)
-             $opt_dry_run || {
-               eval '$ECHO ": $name " >> "$nlist"'
-               func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
-               eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
-             }
-           ;;
-          esac
-       done
-
-       $opt_dry_run || {
-         # Make sure we have at least an empty file.
-         test -f "$nlist" || : > "$nlist"
-
-         if test -n "$exclude_expsyms"; then
-           $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-           $MV "$nlist"T "$nlist"
-         fi
-
-         # Try sorting and uniquifying the output.
-         if $GREP -v "^: " < "$nlist" |
-             if sort -k 3 </dev/null >/dev/null 2>&1; then
-               sort -k 3
-             else
-               sort +2
-             fi |
-             uniq > "$nlist"S; then
-           :
-         else
-           $GREP -v "^: " < "$nlist" > "$nlist"S
-         fi
-
-         if test -f "$nlist"S; then
-           eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
-         else
-           echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
-         fi
-
-         echo >> "$output_objdir/$my_dlsyms" "\
-
-/* The mapping between symbol names and symbols.  */
-typedef struct {
-  const char *name;
-  void *address;
-} lt_dlsymlist;
-extern LT_DLSYM_CONST lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];
-LT_DLSYM_CONST lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
-  { \"$my_originator\", (void *) 0 },"
-
-         case $need_lib_prefix in
-         no)
-           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
-           ;;
-         *)
-           eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
-           ;;
-         esac
-         echo >> "$output_objdir/$my_dlsyms" "\
-  {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_${my_prefix}_LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
-       } # !$opt_dry_run
-
-       pic_flag_for_symtable=
-       case "$compile_command " in
-       *" -static "*) ;;
-       *)
-         case $host in
-         # compiling the symbol table file with pic_flag works around
-         # a FreeBSD bug that causes programs to crash when -lm is
-         # linked before any other PIC object.  But we must not use
-         # pic_flag when linking with -static.  The problem exists in
-         # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-         *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
-           pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
-         *-*-hpux*)
-           pic_flag_for_symtable=" $pic_flag"  ;;
-         *)
-           if test "X$my_pic_p" != Xno; then
-             pic_flag_for_symtable=" $pic_flag"
-           fi
-           ;;
-         esac
-         ;;
-       esac
-       symtab_cflags=
-       for arg in $LTCFLAGS; do
-         case $arg in
-         -pie | -fpie | -fPIE) ;;
-         *) func_append symtab_cflags " $arg" ;;
-         esac
-       done
-
-       # Now compile the dynamic symbol file.
-       func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
-
-       # Clean up the generated files.
-       func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
-
-       # Transform the symbol file into the correct name.
-       symfileobj="$output_objdir/${my_outputname}S.$objext"
-       case $host in
-       *cygwin* | *mingw* | *cegcc* )
-         if test -f "$output_objdir/$my_outputname.def"; then
-           compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-           finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-         else
-           compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
-           finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
-         fi
-         ;;
-       *)
-         compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
-         finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
-         ;;
-       esac
-       ;;
-      *)
-       func_fatal_error "unknown suffix for \`$my_dlsyms'"
-       ;;
-      esac
-    else
-      # We keep going just in case the user didn't refer to
-      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
-      # really was required.
-
-      # Nullify the symbol file.
-      compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
-      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
-    fi
-}
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-# Despite the name, also deal with 64 bit binaries.
-func_win32_libid ()
-{
-  $opt_debug
-  win32_libid_type="unknown"
-  win32_fileres=`file -L $1 2>/dev/null`
-  case $win32_fileres in
-  *ar\ archive\ import\ library*) # definitely import
-    win32_libid_type="x86 archive import"
-    ;;
-  *ar\ archive*) # could be an import, or static
-    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
-    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
-       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
-      func_to_tool_file "$1" func_convert_file_msys_to_w32
-      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
-       $SED -n -e '
-           1,100{
-               / I /{
-                   s,.*,import,
-                   p
-                   q
-               }
-           }'`
-      case $win32_nmres in
-      import*)  win32_libid_type="x86 archive import";;
-      *)        win32_libid_type="x86 archive static";;
-      esac
-    fi
-    ;;
-  *DLL*)
-    win32_libid_type="x86 DLL"
-    ;;
-  *executable*) # but shell scripts are "executable" too...
-    case $win32_fileres in
-    *MS\ Windows\ PE\ Intel*)
-      win32_libid_type="x86 DLL"
-      ;;
-    esac
-    ;;
-  esac
-  $ECHO "$win32_libid_type"
-}
-
-# func_cygming_dll_for_implib ARG
-#
-# Platform-specific function to extract the
-# name of the DLL associated with the specified
-# import library ARG.
-# Invoked by eval'ing the libtool variable
-#    $sharedlib_from_linklib_cmd
-# Result is available in the variable
-#    $sharedlib_from_linklib_result
-func_cygming_dll_for_implib ()
-{
-  $opt_debug
-  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
-}
-
-# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
-#
-# The is the core of a fallback implementation of a
-# platform-specific function to extract the name of the
-# DLL associated with the specified import library LIBNAME.
-#
-# SECTION_NAME is either .idata$6 or .idata$7, depending
-# on the platform and compiler that created the implib.
-#
-# Echos the name of the DLL associated with the
-# specified import library.
-func_cygming_dll_for_implib_fallback_core ()
-{
-  $opt_debug
-  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
-  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
-    $SED '/^Contents of section '"$match_literal"':/{
-      # Place marker at beginning of archive member dllname section
-      s/.*/====MARK====/
-      p
-      d
-    }
-    # These lines can sometimes be longer than 43 characters, but
-    # are always uninteresting
-    /:[         ]*file format pe[i]\{,1\}-/d
-    /^In archive [^:]*:/d
-    # Ensure marker is printed
-    /^====MARK====/p
-    # Remove all lines with less than 43 characters
-    /^.\{43\}/!d
-    # From remaining lines, remove first 43 characters
-    s/^.\{43\}//' |
-    $SED -n '
-      # Join marker and all lines until next marker into a single line
-      /^====MARK====/ b para
-      H
-      $ b para
-      b
-      :para
-      x
-      s/\n//g
-      # Remove the marker
-      s/^====MARK====//
-      # Remove trailing dots and whitespace
-      s/[\. \t]*$//
-      # Print
-      /./p' |
-    # we now have a list, one entry per line, of the stringified
-    # contents of the appropriate section of all members of the
-    # archive which possess that section. Heuristic: eliminate
-    # all those which have a first or second character that is
-    # a '.' (that is, objdump's representation of an unprintable
-    # character.) This should work for all archives with less than
-    # 0x302f exports -- but will fail for DLLs whose name actually
-    # begins with a literal '.' or a single character followed by
-    # a '.'.
-    #
-    # Of those that remain, print the first one.
-    $SED -e '/^\./d;/^.\./d;q'
-}
-
-# func_cygming_gnu_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is a GNU/binutils-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_gnu_implib_p ()
-{
-  $opt_debug
-  func_to_tool_file "$1" func_convert_file_msys_to_w32
-  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
-  test -n "$func_cygming_gnu_implib_tmp"
-}
-
-# func_cygming_ms_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is an MS-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_ms_implib_p ()
-{
-  $opt_debug
-  func_to_tool_file "$1" func_convert_file_msys_to_w32
-  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
-  test -n "$func_cygming_ms_implib_tmp"
-}
-
-# func_cygming_dll_for_implib_fallback ARG
-# Platform-specific function to extract the
-# name of the DLL associated with the specified
-# import library ARG.
-#
-# This fallback implementation is for use when $DLLTOOL
-# does not support the --identify-strict option.
-# Invoked by eval'ing the libtool variable
-#    $sharedlib_from_linklib_cmd
-# Result is available in the variable
-#    $sharedlib_from_linklib_result
-func_cygming_dll_for_implib_fallback ()
-{
-  $opt_debug
-  if func_cygming_gnu_implib_p "$1" ; then
-    # binutils import library
-    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
-  elif func_cygming_ms_implib_p "$1" ; then
-    # ms-generated import library
-    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
-  else
-    # unknown
-    sharedlib_from_linklib_result=""
-  fi
-}
-
-
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
-    $opt_debug
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
-    if test "$lock_old_archive_extraction" = yes; then
-      lockfile=$f_ex_an_ar_oldlib.lock
-      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
-       func_echo "Waiting for $lockfile to be removed"
-       sleep 2
-      done
-    fi
-    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
-                  'stat=$?; rm -f "$lockfile"; exit $stat'
-    if test "$lock_old_archive_extraction" = yes; then
-      $opt_dry_run || rm -f "$lockfile"
-    fi
-    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
-     :
-    else
-      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
-    fi
-}
-
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
-    $opt_debug
-    my_gentop="$1"; shift
-    my_oldlibs=${1+"$@"}
-    my_oldobjs=""
-    my_xlib=""
-    my_xabs=""
-    my_xdir=""
-
-    for my_xlib in $my_oldlibs; do
-      # Extract the objects.
-      case $my_xlib in
-       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
-       *) my_xabs=`pwd`"/$my_xlib" ;;
-      esac
-      func_basename "$my_xlib"
-      my_xlib="$func_basename_result"
-      my_xlib_u=$my_xlib
-      while :; do
-        case " $extracted_archives " in
-       *" $my_xlib_u "*)
-         func_arith $extracted_serial + 1
-         extracted_serial=$func_arith_result
-         my_xlib_u=lt$extracted_serial-$my_xlib ;;
-       *) break ;;
-       esac
-      done
-      extracted_archives="$extracted_archives $my_xlib_u"
-      my_xdir="$my_gentop/$my_xlib_u"
-
-      func_mkdir_p "$my_xdir"
-
-      case $host in
-      *-darwin*)
-       func_verbose "Extracting $my_xabs"
-       # Do not bother doing anything if just a dry run
-       $opt_dry_run || {
-         darwin_orig_dir=`pwd`
-         cd $my_xdir || exit $?
-         darwin_archive=$my_xabs
-         darwin_curdir=`pwd`
-         darwin_base_archive=`basename "$darwin_archive"`
-         darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
-         if test -n "$darwin_arches"; then
-           darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
-           darwin_arch=
-           func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
-           for darwin_arch in  $darwin_arches ; do
-             func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-             $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
-             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
-             cd "$darwin_curdir"
-             $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
-           done # $darwin_arches
-            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
-           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
-           darwin_file=
-           darwin_files=
-           for darwin_file in $darwin_filelist; do
-             darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
-             $LIPO -create -output "$darwin_file" $darwin_files
-           done # $darwin_filelist
-           $RM -rf unfat-$$
-           cd "$darwin_orig_dir"
-         else
-           cd $darwin_orig_dir
-           func_extract_an_archive "$my_xdir" "$my_xabs"
-         fi # $darwin_arches
-       } # !$opt_dry_run
-       ;;
-      *)
-        func_extract_an_archive "$my_xdir" "$my_xabs"
-       ;;
-      esac
-      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
-    done
-
-    func_extract_archives_result="$my_oldobjs"
-}
-
-
-# func_emit_wrapper [arg=no]
-#
-# Emit a libtool wrapper script on stdout.
-# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable.  Must ONLY be called from within
-# func_mode_link because it depends on a number of variables
-# set therein.
-#
-# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take.  If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the $objdir directory.  This is a cygwin/mingw-specific
-# behavior.
-func_emit_wrapper ()
-{
-       func_emit_wrapper_arg1=${1-no}
-
-       $ECHO "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='$sed_quote_subst'
-
-# Be Bourne compatible
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variables:
-  generated_by_libtool_version='$macro_version'
-  notinst_deplibs='$notinst_deplibs'
-else
-  # When we are sourced in execute mode, \$file and \$ECHO are already set.
-  if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    file=\"\$0\""
-
-    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
-    $ECHO "\
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-\$1
-_LTECHO_EOF'
-}
-    ECHO=\"$qECHO\"
-  fi
-
-# Very basic option parsing. These options are (a) specific to
-# the libtool wrapper, (b) are identical between the wrapper
-# /script/ and the wrapper /executable/ which is used only on
-# windows platforms, and (c) all begin with the string "--lt-"
-# (application programs are unlikely to have options which match
-# this pattern).
-#
-# There are only two supported options: --lt-debug and
-# --lt-dump-script. There is, deliberately, no --lt-help.
-#
-# The first argument to this parsing function should be the
-# script's $0 value, followed by "$@".
-lt_option_debug=
-func_parse_lt_options ()
-{
-  lt_script_arg0=\$0
-  shift
-  for lt_opt
-  do
-    case \"\$lt_opt\" in
-    --lt-debug) lt_option_debug=1 ;;
-    --lt-dump-script)
-        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
-        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
-        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
-        cat \"\$lt_dump_D/\$lt_dump_F\"
-        exit 0
-      ;;
-    --lt-*)
-        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
-        exit 1
-      ;;
-    esac
-  done
-
-  # Print the debug banner immediately:
-  if test -n \"\$lt_option_debug\"; then
-    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
-  fi
-}
-
-# Used when --lt-debug. Prints its arguments to stdout
-# (redirection is the responsibility of the caller)
-func_lt_dump_args ()
-{
-  lt_dump_args_N=1;
-  for lt_arg
-  do
-    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
-    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
-  done
-}
-
-# Core function for launching the target application
-func_exec_program_core ()
-{
-"
-  case $host in
-  # Backslashes separate directories on plain windows
-  *-*-mingw | *-*-os2* | *-cegcc*)
-    $ECHO "\
-      if test -n \"\$lt_option_debug\"; then
-        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
-        func_lt_dump_args \${1+\"\$@\"} 1>&2
-      fi
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
-    ;;
-
-  *)
-    $ECHO "\
-      if test -n \"\$lt_option_debug\"; then
-        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
-        func_lt_dump_args \${1+\"\$@\"} 1>&2
-      fi
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
-    ;;
-  esac
-  $ECHO "\
-      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
-      exit 1
-}
-
-# A function to encapsulate launching the target application
-# Strips options in the --lt-* namespace from \$@ and
-# launches target application with the remaining arguments.
-func_exec_program ()
-{
-  case \" \$* \" in
-  *\\ --lt-*)
-    for lt_wr_arg
-    do
-      case \$lt_wr_arg in
-      --lt-*) ;;
-      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
-      esac
-      shift
-    done ;;
-  esac
-  func_exec_program_core \${1+\"\$@\"}
-}
-
-  # Parse options
-  func_parse_lt_options \"\$0\" \${1+\"\$@\"}
-
-  # Find the directory that this script lives in.
-  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
-
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
-
-    file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
-  done
-
-  # Usually 'no', except on cygwin/mingw when embedded into
-  # the cwrapper.
-  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
-  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
-    # special case for '.'
-    if test \"\$thisdir\" = \".\"; then
-      thisdir=\`pwd\`
-    fi
-    # remove .libs from thisdir
-    case \"\$thisdir\" in
-    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
-    $objdir )   thisdir=. ;;
-    esac
-  fi
-
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
-       if test "$fast_install" = yes; then
-         $ECHO "\
-  program=lt-'$outputname'$exeext
-  progdir=\"\$thisdir/$objdir\"
-
-  if test ! -f \"\$progdir/\$program\" ||
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
-    file=\"\$\$-\$program\"
-
-    if test ! -d \"\$progdir\"; then
-      $MKDIR \"\$progdir\"
-    else
-      $RM \"\$progdir/\$file\"
-    fi"
-
-         $ECHO "\
-
-    # relink executable if necessary
-    if test -n \"\$relink_command\"; then
-      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
-      else
-       $ECHO \"\$relink_command_output\" >&2
-       $RM \"\$progdir/\$file\"
-       exit 1
-      fi
-    fi
-
-    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-    { $RM \"\$progdir/\$program\";
-      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-    $RM \"\$progdir/\$file\"
-  fi"
-       else
-         $ECHO "\
-  program='$outputname'
-  progdir=\"\$thisdir/$objdir\"
-"
-       fi
-
-       $ECHO "\
-
-  if test -f \"\$progdir/\$program\"; then"
-
-       # fixup the dll searchpath if we need to.
-       #
-       # Fix the DLL searchpath if we need to.  Do this before prepending
-       # to shlibpath, because on Windows, both are PATH and uninstalled
-       # libraries must come first.
-       if test -n "$dllsearchpath"; then
-         $ECHO "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-       fi
-
-       # Export our shlibpath_var if we have one.
-       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-         $ECHO "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
-
-    export $shlibpath_var
-"
-       fi
-
-       $ECHO "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-      func_exec_program \${1+\"\$@\"}
-    fi
-  else
-    # The program doesn't exist.
-    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
-    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
-    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit 1
-  fi
-fi\
-"
-}
-
-
-# func_emit_cwrapperexe_src
-# emit the source code for a wrapper executable on stdout
-# Must ONLY be called from within func_mode_link because
-# it depends on a number of variable set therein.
-func_emit_cwrapperexe_src ()
-{
-       cat <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-
-   The $output program cannot be directly executed until all the libtool
-   libraries that it depends on are installed.
-
-   This wrapper executable should never be moved out of the build directory.
-   If it is, it will not operate correctly.
-*/
-EOF
-           cat <<"EOF"
-#ifdef _MSC_VER
-# define _CRT_SECURE_NO_DEPRECATE 1
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef _MSC_VER
-# include <direct.h>
-# include <process.h>
-# include <io.h>
-#else
-# include <unistd.h>
-# include <stdint.h>
-# ifdef __CYGWIN__
-#  include <io.h>
-# endif
-#endif
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-/* declarations of non-ANSI functions */
-#if defined(__MINGW32__)
-# ifdef __STRICT_ANSI__
-int _putenv (const char *);
-# endif
-#elif defined(__CYGWIN__)
-# ifdef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int putenv (char *);
-int setenv (const char *, const char *, int);
-# endif
-/* #elif defined (other platforms) ... */
-#endif
-
-/* portability defines, excluding path handling macros */
-#if defined(_MSC_VER)
-# define setmode _setmode
-# define stat    _stat
-# define chmod   _chmod
-# define getcwd  _getcwd
-# define putenv  _putenv
-# define S_IXUSR _S_IEXEC
-# ifndef _INTPTR_T_DEFINED
-#  define _INTPTR_T_DEFINED
-#  define intptr_t int
-# endif
-#elif defined(__MINGW32__)
-# define setmode _setmode
-# define stat    _stat
-# define chmod   _chmod
-# define getcwd  _getcwd
-# define putenv  _putenv
-#elif defined(__CYGWIN__)
-# define HAVE_SETENV
-# define FOPEN_WB "wb"
-/* #elif defined (other platforms) ... */
-#endif
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef S_IXOTH
-# define S_IXOTH 0
-#endif
-#ifndef S_IXGRP
-# define S_IXGRP 0
-#endif
-
-/* path handling portability macros */
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# define FOPEN_WB "wb"
-# ifndef DIR_SEPARATOR_2
-#  define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-#  define PATH_SEPARATOR_2 ';'
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
-       (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
-
-#ifndef FOPEN_WB
-# define FOPEN_WB "w"
-#endif
-#ifndef _O_BINARY
-# define _O_BINARY 0
-#endif
-
-#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-#if defined(LT_DEBUGWRAPPER)
-static int lt_debug = 1;
-#else
-static int lt_debug = 0;
-#endif
-
-const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
-
-void *xmalloc (size_t num);
-char *xstrdup (const char *string);
-const char *base_name (const char *name);
-char *find_executable (const char *wrapper);
-char *chase_symlinks (const char *pathspec);
-int make_executable (const char *path);
-int check_executable (const char *path);
-char *strendzap (char *str, const char *pat);
-void lt_debugprintf (const char *file, int line, const char *fmt, ...);
-void lt_fatal (const char *file, int line, const char *message, ...);
-static const char *nonnull (const char *s);
-static const char *nonempty (const char *s);
-void lt_setenv (const char *name, const char *value);
-char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-void lt_update_exe_path (const char *name, const char *value);
-void lt_update_lib_path (const char *name, const char *value);
-char **prepare_spawn (char **argv);
-void lt_dump_script (FILE *f);
-EOF
-
-           cat <<EOF
-volatile const char * MAGIC_EXE = "$magic_exe";
-const char * LIB_PATH_VARNAME = "$shlibpath_var";
-EOF
-
-           if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-              func_to_host_path "$temp_rpath"
-             cat <<EOF
-const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
-EOF
-           else
-             cat <<"EOF"
-const char * LIB_PATH_VALUE   = "";
-EOF
-           fi
-
-           if test -n "$dllsearchpath"; then
-              func_to_host_path "$dllsearchpath:"
-             cat <<EOF
-const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
-EOF
-           else
-             cat <<"EOF"
-const char * EXE_PATH_VARNAME = "";
-const char * EXE_PATH_VALUE   = "";
-EOF
-           fi
-
-           if test "$fast_install" = yes; then
-             cat <<EOF
-const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
-EOF
-           else
-             cat <<EOF
-const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
-EOF
-           fi
-
-
-           cat <<"EOF"
-
-#define LTWRAPPER_OPTION_PREFIX         "--lt-"
-
-static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
-static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
-
-int
-main (int argc, char *argv[])
-{
-  char **newargz;
-  int  newargc;
-  char *tmp_pathspec;
-  char *actual_cwrapper_path;
-  char *actual_cwrapper_name;
-  char *target_name;
-  char *lt_argv_zero;
-  intptr_t rval = 127;
-
-  int i;
-
-  program_name = (char *) xstrdup (base_name (argv[0]));
-  newargz = XMALLOC (char *, argc + 1);
-
-  /* very simple arg parsing; don't want to rely on getopt
-   * also, copy all non cwrapper options to newargz, except
-   * argz[0], which is handled differently
-   */
-  newargc=0;
-  for (i = 1; i < argc; i++)
-    {
-      if (strcmp (argv[i], dumpscript_opt) == 0)
-       {
-EOF
-           case "$host" in
-             *mingw* | *cygwin* )
-               # make stdout use "unix" line endings
-               echo "          setmode(1,_O_BINARY);"
-               ;;
-             esac
-
-           cat <<"EOF"
-         lt_dump_script (stdout);
-         return 0;
-       }
-      if (strcmp (argv[i], debug_opt) == 0)
-       {
-          lt_debug = 1;
-          continue;
-       }
-      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
-        {
-          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
-             namespace, but it is not one of the ones we know about and
-             have already dealt with, above (inluding dump-script), then
-             report an error. Otherwise, targets might begin to believe
-             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
-             namespace. The first time any user complains about this, we'll
-             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
-             or a configure.ac-settable value.
-           */
-          lt_fatal (__FILE__, __LINE__,
-                   "unrecognized %s option: '%s'",
-                    ltwrapper_option_prefix, argv[i]);
-        }
-      /* otherwise ... */
-      newargz[++newargc] = xstrdup (argv[i]);
-    }
-  newargz[++newargc] = NULL;
-
-EOF
-           cat <<EOF
-  /* The GNU banner must be the first non-error debug message */
-  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
-EOF
-           cat <<"EOF"
-  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
-  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
-
-  tmp_pathspec = find_executable (argv[0]);
-  if (tmp_pathspec == NULL)
-    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
-  lt_debugprintf (__FILE__, __LINE__,
-                  "(main) found exe (before symlink chase) at: %s\n",
-                 tmp_pathspec);
-
-  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
-  lt_debugprintf (__FILE__, __LINE__,
-                  "(main) found exe (after symlink chase) at: %s\n",
-                 actual_cwrapper_path);
-  XFREE (tmp_pathspec);
-
-  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
-  strendzap (actual_cwrapper_path, actual_cwrapper_name);
-
-  /* wrapper name transforms */
-  strendzap (actual_cwrapper_name, ".exe");
-  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
-  XFREE (actual_cwrapper_name);
-  actual_cwrapper_name = tmp_pathspec;
-  tmp_pathspec = 0;
-
-  /* target_name transforms -- use actual target program name; might have lt- prefix */
-  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
-  strendzap (target_name, ".exe");
-  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
-  XFREE (target_name);
-  target_name = tmp_pathspec;
-  tmp_pathspec = 0;
-
-  lt_debugprintf (__FILE__, __LINE__,
-                 "(main) libtool target name: %s\n",
-                 target_name);
-EOF
-
-           cat <<EOF
-  newargz[0] =
-    XMALLOC (char, (strlen (actual_cwrapper_path) +
-                   strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
-  strcpy (newargz[0], actual_cwrapper_path);
-  strcat (newargz[0], "$objdir");
-  strcat (newargz[0], "/");
-EOF
-
-           cat <<"EOF"
-  /* stop here, and copy so we don't have to do this twice */
-  tmp_pathspec = xstrdup (newargz[0]);
-
-  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
-  strcat (newargz[0], actual_cwrapper_name);
-
-  /* DO want the lt- prefix here if it exists, so use target_name */
-  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
-  XFREE (tmp_pathspec);
-  tmp_pathspec = NULL;
-EOF
-
-           case $host_os in
-             mingw*)
-           cat <<"EOF"
-  {
-    char* p;
-    while ((p = strchr (newargz[0], '\\')) != NULL)
-      {
-       *p = '/';
-      }
-    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
-      {
-       *p = '/';
-      }
-  }
-EOF
-           ;;
-           esac
-
-           cat <<"EOF"
-  XFREE (target_name);
-  XFREE (actual_cwrapper_path);
-  XFREE (actual_cwrapper_name);
-
-  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
-  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
-  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
-     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
-     because on Windows, both *_VARNAMEs are PATH but uninstalled
-     libraries must come first. */
-  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
-  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
-
-  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
-                 nonnull (lt_argv_zero));
-  for (i = 0; i < newargc; i++)
-    {
-      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
-                     i, nonnull (newargz[i]));
-    }
-
-EOF
-
-           case $host_os in
-             mingw*)
-               cat <<"EOF"
-  /* execv doesn't actually work on mingw as expected on unix */
-  newargz = prepare_spawn (newargz);
-  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
-  if (rval == -1)
-    {
-      /* failed to start process */
-      lt_debugprintf (__FILE__, __LINE__,
-                     "(main) failed to launch target \"%s\": %s\n",
-                     lt_argv_zero, nonnull (strerror (errno)));
-      return 127;
-    }
-  return rval;
-EOF
-               ;;
-             *)
-               cat <<"EOF"
-  execv (lt_argv_zero, newargz);
-  return rval; /* =127, but avoids unused variable warning */
-EOF
-               ;;
-           esac
-
-           cat <<"EOF"
-}
-
-void *
-xmalloc (size_t num)
-{
-  void *p = (void *) malloc (num);
-  if (!p)
-    lt_fatal (__FILE__, __LINE__, "memory exhausted");
-
-  return p;
-}
-
-char *
-xstrdup (const char *string)
-{
-  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
-                         string) : NULL;
-}
-
-const char *
-base_name (const char *name)
-{
-  const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
-    name += 2;
-#endif
-
-  for (base = name; *name; name++)
-    if (IS_DIR_SEPARATOR (*name))
-      base = name + 1;
-  return base;
-}
-
-int
-check_executable (const char *path)
-{
-  struct stat st;
-
-  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
-                  nonempty (path));
-  if ((!path) || (!*path))
-    return 0;
-
-  if ((stat (path, &st) >= 0)
-      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
-    return 1;
-  else
-    return 0;
-}
-
-int
-make_executable (const char *path)
-{
-  int rval = 0;
-  struct stat st;
-
-  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
-                  nonempty (path));
-  if ((!path) || (!*path))
-    return 0;
-
-  if (stat (path, &st) >= 0)
-    {
-      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
-    }
-  return rval;
-}
-
-/* Searches for the full path of the wrapper.  Returns
-   newly allocated full path name if found, NULL otherwise
-   Does not chase symlinks, even on platforms that support them.
-*/
-char *
-find_executable (const char *wrapper)
-{
-  int has_slash = 0;
-  const char *p;
-  const char *p_next;
-  /* static buffer for getcwd */
-  char tmp[LT_PATHMAX + 1];
-  int tmp_len;
-  char *concat_name;
-
-  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
-                  nonempty (wrapper));
-
-  if ((wrapper == NULL) || (*wrapper == '\0'))
-    return NULL;
-
-  /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
-    {
-      concat_name = xstrdup (wrapper);
-      if (check_executable (concat_name))
-       return concat_name;
-      XFREE (concat_name);
-    }
-  else
-    {
-#endif
-      if (IS_DIR_SEPARATOR (wrapper[0]))
-       {
-         concat_name = xstrdup (wrapper);
-         if (check_executable (concat_name))
-           return concat_name;
-         XFREE (concat_name);
-       }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-    }
-#endif
-
-  for (p = wrapper; *p; p++)
-    if (*p == '/')
-      {
-       has_slash = 1;
-       break;
-      }
-  if (!has_slash)
-    {
-      /* no slashes; search PATH */
-      const char *path = getenv ("PATH");
-      if (path != NULL)
-       {
-         for (p = path; *p; p = p_next)
-           {
-             const char *q;
-             size_t p_len;
-             for (q = p; *q; q++)
-               if (IS_PATH_SEPARATOR (*q))
-                 break;
-             p_len = q - p;
-             p_next = (*q == '\0' ? q : q + 1);
-             if (p_len == 0)
-               {
-                 /* empty path: current directory */
-                 if (getcwd (tmp, LT_PATHMAX) == NULL)
-                   lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
-                              nonnull (strerror (errno)));
-                 tmp_len = strlen (tmp);
-                 concat_name =
-                   XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
-                 memcpy (concat_name, tmp, tmp_len);
-                 concat_name[tmp_len] = '/';
-                 strcpy (concat_name + tmp_len + 1, wrapper);
-               }
-             else
-               {
-                 concat_name =
-                   XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
-                 memcpy (concat_name, p, p_len);
-                 concat_name[p_len] = '/';
-                 strcpy (concat_name + p_len + 1, wrapper);
-               }
-             if (check_executable (concat_name))
-               return concat_name;
-             XFREE (concat_name);
-           }
-       }
-      /* not found in PATH; assume curdir */
-    }
-  /* Relative path | not found in path: prepend cwd */
-  if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
-              nonnull (strerror (errno)));
-  tmp_len = strlen (tmp);
-  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
-  memcpy (concat_name, tmp, tmp_len);
-  concat_name[tmp_len] = '/';
-  strcpy (concat_name + tmp_len + 1, wrapper);
-
-  if (check_executable (concat_name))
-    return concat_name;
-  XFREE (concat_name);
-  return NULL;
-}
-
-char *
-chase_symlinks (const char *pathspec)
-{
-#ifndef S_ISLNK
-  return xstrdup (pathspec);
-#else
-  char buf[LT_PATHMAX];
-  struct stat s;
-  char *tmp_pathspec = xstrdup (pathspec);
-  char *p;
-  int has_symlinks = 0;
-  while (strlen (tmp_pathspec) && !has_symlinks)
-    {
-      lt_debugprintf (__FILE__, __LINE__,
-                     "checking path component for symlinks: %s\n",
-                     tmp_pathspec);
-      if (lstat (tmp_pathspec, &s) == 0)
-       {
-         if (S_ISLNK (s.st_mode) != 0)
-           {
-             has_symlinks = 1;
-             break;
-           }
-
-         /* search backwards for last DIR_SEPARATOR */
-         p = tmp_pathspec + strlen (tmp_pathspec) - 1;
-         while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
-           p--;
-         if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
-           {
-             /* no more DIR_SEPARATORS left */
-             break;
-           }
-         *p = '\0';
-       }
-      else
-       {
-         lt_fatal (__FILE__, __LINE__,
-                   "error accessing file \"%s\": %s",
-                   tmp_pathspec, nonnull (strerror (errno)));
-       }
-    }
-  XFREE (tmp_pathspec);
-
-  if (!has_symlinks)
-    {
-      return xstrdup (pathspec);
-    }
-
-  tmp_pathspec = realpath (pathspec, buf);
-  if (tmp_pathspec == 0)
-    {
-      lt_fatal (__FILE__, __LINE__,
-               "could not follow symlinks for %s", pathspec);
-    }
-  return xstrdup (tmp_pathspec);
-#endif
-}
-
-char *
-strendzap (char *str, const char *pat)
-{
-  size_t len, patlen;
-
-  assert (str != NULL);
-  assert (pat != NULL);
-
-  len = strlen (str);
-  patlen = strlen (pat);
-
-  if (patlen <= len)
-    {
-      str += len - patlen;
-      if (strcmp (str, pat) == 0)
-       *str = '\0';
-    }
-  return str;
-}
-
-void
-lt_debugprintf (const char *file, int line, const char *fmt, ...)
-{
-  va_list args;
-  if (lt_debug)
-    {
-      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
-      va_start (args, fmt);
-      (void) vfprintf (stderr, fmt, args);
-      va_end (args);
-    }
-}
-
-static void
-lt_error_core (int exit_status, const char *file,
-              int line, const char *mode,
-              const char *message, va_list ap)
-{
-  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
-  vfprintf (stderr, message, ap);
-  fprintf (stderr, ".\n");
-
-  if (exit_status >= 0)
-    exit (exit_status);
-}
-
-void
-lt_fatal (const char *file, int line, const char *message, ...)
-{
-  va_list ap;
-  va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
-  va_end (ap);
-}
-
-static const char *
-nonnull (const char *s)
-{
-  return s ? s : "(null)";
-}
-
-static const char *
-nonempty (const char *s)
-{
-  return (s && !*s) ? "(empty)" : nonnull (s);
-}
-
-void
-lt_setenv (const char *name, const char *value)
-{
-  lt_debugprintf (__FILE__, __LINE__,
-                 "(lt_setenv) setting '%s' to '%s'\n",
-                  nonnull (name), nonnull (value));
-  {
-#ifdef HAVE_SETENV
-    /* always make a copy, for consistency with !HAVE_SETENV */
-    char *str = xstrdup (value);
-    setenv (name, str, 1);
-#else
-    int len = strlen (name) + 1 + strlen (value) + 1;
-    char *str = XMALLOC (char, len);
-    sprintf (str, "%s=%s", name, value);
-    if (putenv (str) != EXIT_SUCCESS)
-      {
-        XFREE (str);
-      }
-#endif
-  }
-}
-
-char *
-lt_extend_str (const char *orig_value, const char *add, int to_end)
-{
-  char *new_value;
-  if (orig_value && *orig_value)
-    {
-      int orig_value_len = strlen (orig_value);
-      int add_len = strlen (add);
-      new_value = XMALLOC (char, add_len + orig_value_len + 1);
-      if (to_end)
-        {
-          strcpy (new_value, orig_value);
-          strcpy (new_value + orig_value_len, add);
-        }
-      else
-        {
-          strcpy (new_value, add);
-          strcpy (new_value + add_len, orig_value);
-        }
-    }
-  else
-    {
-      new_value = xstrdup (add);
-    }
-  return new_value;
-}
-
-void
-lt_update_exe_path (const char *name, const char *value)
-{
-  lt_debugprintf (__FILE__, __LINE__,
-                 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
-                  nonnull (name), nonnull (value));
-
-  if (name && *name && value && *value)
-    {
-      char *new_value = lt_extend_str (getenv (name), value, 0);
-      /* some systems can't cope with a ':'-terminated path #' */
-      int len = strlen (new_value);
-      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
-        {
-          new_value[len-1] = '\0';
-        }
-      lt_setenv (name, new_value);
-      XFREE (new_value);
-    }
-}
-
-void
-lt_update_lib_path (const char *name, const char *value)
-{
-  lt_debugprintf (__FILE__, __LINE__,
-                 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
-                  nonnull (name), nonnull (value));
-
-  if (name && *name && value && *value)
-    {
-      char *new_value = lt_extend_str (getenv (name), value, 0);
-      lt_setenv (name, new_value);
-      XFREE (new_value);
-    }
-}
-
-EOF
-           case $host_os in
-             mingw*)
-               cat <<"EOF"
-
-/* Prepares an argument vector before calling spawn().
-   Note that spawn() does not by itself call the command interpreter
-     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
-      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-         GetVersionEx(&v);
-         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
-      }) ? "cmd.exe" : "command.com").
-   Instead it simply concatenates the arguments, separated by ' ', and calls
-   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
-   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
-   special way:
-   - Space and tab are interpreted as delimiters. They are not treated as
-     delimiters if they are surrounded by double quotes: "...".
-   - Unescaped double quotes are removed from the input. Their only effect is
-     that within double quotes, space and tab are treated like normal
-     characters.
-   - Backslashes not followed by double quotes are not special.
-   - But 2*n+1 backslashes followed by a double quote become
-     n backslashes followed by a double quote (n >= 0):
-       \" -> "
-       \\\" -> \"
-       \\\\\" -> \\"
- */
-#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
-#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
-char **
-prepare_spawn (char **argv)
-{
-  size_t argc;
-  char **new_argv;
-  size_t i;
-
-  /* Count number of arguments.  */
-  for (argc = 0; argv[argc] != NULL; argc++)
-    ;
-
-  /* Allocate new argument vector.  */
-  new_argv = XMALLOC (char *, argc + 1);
-
-  /* Put quoted arguments into the new argument vector.  */
-  for (i = 0; i < argc; i++)
-    {
-      const char *string = argv[i];
-
-      if (string[0] == '\0')
-       new_argv[i] = xstrdup ("\"\"");
-      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
-       {
-         int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
-         size_t length;
-         unsigned int backslashes;
-         const char *s;
-         char *quoted_string;
-         char *p;
-
-         length = 0;
-         backslashes = 0;
-         if (quote_around)
-           length++;
-         for (s = string; *s != '\0'; s++)
-           {
-             char c = *s;
-             if (c == '"')
-               length += backslashes + 1;
-             length++;
-             if (c == '\\')
-               backslashes++;
-             else
-               backslashes = 0;
-           }
-         if (quote_around)
-           length += backslashes + 1;
-
-         quoted_string = XMALLOC (char, length + 1);
-
-         p = quoted_string;
-         backslashes = 0;
-         if (quote_around)
-           *p++ = '"';
-         for (s = string; *s != '\0'; s++)
-           {
-             char c = *s;
-             if (c == '"')
-               {
-                 unsigned int j;
-                 for (j = backslashes + 1; j > 0; j--)
-                   *p++ = '\\';
-               }
-             *p++ = c;
-             if (c == '\\')
-               backslashes++;
-             else
-               backslashes = 0;
-           }
-         if (quote_around)
-           {
-             unsigned int j;
-             for (j = backslashes; j > 0; j--)
-               *p++ = '\\';
-             *p++ = '"';
-           }
-         *p = '\0';
-
-         new_argv[i] = quoted_string;
-       }
-      else
-       new_argv[i] = (char *) string;
-    }
-  new_argv[argc] = NULL;
-
-  return new_argv;
-}
-EOF
-               ;;
-           esac
-
-            cat <<"EOF"
-void lt_dump_script (FILE* f)
-{
-EOF
-           func_emit_wrapper yes |
-             $SED -n -e '
-s/^\(.\{79\}\)\(..*\)/\1\
-\2/
-h
-s/\([\\"]\)/\\\1/g
-s/$/\\n/
-s/\([^\n]*\).*/  fputs ("\1", f);/p
-g
-D'
-            cat <<"EOF"
-}
-EOF
-}
-# end: func_emit_cwrapperexe_src
-
-# func_win32_import_lib_p ARG
-# True if ARG is an import lib, as indicated by $file_magic_cmd
-func_win32_import_lib_p ()
-{
-    $opt_debug
-    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
-    *import*) : ;;
-    *) false ;;
-    esac
-}
-
-# func_mode_link arg...
-func_mode_link ()
-{
-    $opt_debug
-    case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-      # It is impossible to link a dll without this setting, and
-      # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
-      # flag for every libtool invocation.
-      # allow_undefined=no
-
-      # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
-      # even a static library is built.  For now, we need to specify
-      # -no-undefined on the libtool link line when we can be certain
-      # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
-      ;;
-    *)
-      allow_undefined=yes
-      ;;
-    esac
-    libtool_args=$nonopt
-    base_compile="$nonopt $@"
-    compile_command=$nonopt
-    finalize_command=$nonopt
-
-    compile_rpath=
-    finalize_rpath=
-    compile_shlibpath=
-    finalize_shlibpath=
-    convenience=
-    old_convenience=
-    deplibs=
-    old_deplibs=
-    compiler_flags=
-    linker_flags=
-    dllsearchpath=
-    lib_search_path=`pwd`
-    inst_prefix_dir=
-    new_inherited_linker_flags=
-
-    avoid_version=no
-    bindir=
-    dlfiles=
-    dlprefiles=
-    dlself=no
-    export_dynamic=no
-    export_symbols=
-    export_symbols_regex=
-    generated=
-    libobjs=
-    ltlibs=
-    module=no
-    no_install=no
-    objs=
-    non_pic_objects=
-    precious_files_regex=
-    prefer_static_libs=no
-    preload=no
-    prev=
-    prevarg=
-    release=
-    rpath=
-    xrpath=
-    perm_rpath=
-    temp_rpath=
-    thread_safe=no
-    vinfo=
-    vinfo_number=no
-    weak_libs=
-    single_module="${wl}-single_module"
-    func_infer_tag $base_compile
-
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case $arg in
-      -shared)
-       test "$build_libtool_libs" != yes && \
-         func_fatal_configuration "can not build a shared library"
-       build_old_libs=no
-       break
-       ;;
-      -all-static | -static | -static-libtool-libs)
-       case $arg in
-       -all-static)
-         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-           func_warning "complete static linking is impossible in this configuration"
-         fi
-         if test -n "$link_static_flag"; then
-           dlopen_self=$dlopen_self_static
-         fi
-         prefer_static_libs=yes
-         ;;
-       -static)
-         if test -z "$pic_flag" && test -n "$link_static_flag"; then
-           dlopen_self=$dlopen_self_static
-         fi
-         prefer_static_libs=built
-         ;;
-       -static-libtool-libs)
-         if test -z "$pic_flag" && test -n "$link_static_flag"; then
-           dlopen_self=$dlopen_self_static
-         fi
-         prefer_static_libs=yes
-         ;;
-       esac
-       build_libtool_libs=no
-       build_old_libs=yes
-       break
-       ;;
-      esac
-    done
-
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
-    # Go through the arguments, transforming them on the way.
-    while test "$#" -gt 0; do
-      arg="$1"
-      shift
-      func_quote_for_eval "$arg"
-      qarg=$func_quote_for_eval_unquoted_result
-      func_append libtool_args " $func_quote_for_eval_result"
-
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-       case $prev in
-       output)
-         func_append compile_command " @OUTPUT@"
-         func_append finalize_command " @OUTPUT@"
-         ;;
-       esac
-
-       case $prev in
-       bindir)
-         bindir="$arg"
-         prev=
-         continue
-         ;;
-       dlfiles|dlprefiles)
-         if test "$preload" = no; then
-           # Add the symbol object into the linking commands.
-           func_append compile_command " @SYMFILE@"
-           func_append finalize_command " @SYMFILE@"
-           preload=yes
-         fi
-         case $arg in
-         *.la | *.lo) ;;  # We handle these cases below.
-         force)
-           if test "$dlself" = no; then
-             dlself=needless
-             export_dynamic=yes
-           fi
-           prev=
-           continue
-           ;;
-         self)
-           if test "$prev" = dlprefiles; then
-             dlself=yes
-           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
-             dlself=yes
-           else
-             dlself=needless
-             export_dynamic=yes
-           fi
-           prev=
-           continue
-           ;;
-         *)
-           if test "$prev" = dlfiles; then
-             func_append dlfiles " $arg"
-           else
-             func_append dlprefiles " $arg"
-           fi
-           prev=
-           continue
-           ;;
-         esac
-         ;;
-       expsyms)
-         export_symbols="$arg"
-         test -f "$arg" \
-           || func_fatal_error "symbol file \`$arg' does not exist"
-         prev=
-         continue
-         ;;
-       expsyms_regex)
-         export_symbols_regex="$arg"
-         prev=
-         continue
-         ;;
-       framework)
-         case $host in
-           *-*-darwin*)
-             case "$deplibs " in
-               *" $qarg.ltframework "*) ;;
-               *) func_append deplibs " $qarg.ltframework" # this is fixed later
-                  ;;
-             esac
-             ;;
-         esac
-         prev=
-         continue
-         ;;
-       inst_prefix)
-         inst_prefix_dir="$arg"
-         prev=
-         continue
-         ;;
-       objectlist)
-         if test -f "$arg"; then
-           save_arg=$arg
-           moreargs=
-           for fil in `cat "$save_arg"`
-           do
-#            func_append moreargs " $fil"
-             arg=$fil
-             # A libtool-controlled object.
-
-             # Check to see that this really is a libtool object.
-             if func_lalib_unsafe_p "$arg"; then
-               pic_object=
-               non_pic_object=
-
-               # Read the .lo file
-               func_source "$arg"
-
-               if test -z "$pic_object" ||
-                  test -z "$non_pic_object" ||
-                  test "$pic_object" = none &&
-                  test "$non_pic_object" = none; then
-                 func_fatal_error "cannot find name of object for \`$arg'"
-               fi
-
-               # Extract subdirectory from the argument.
-               func_dirname "$arg" "/" ""
-               xdir="$func_dirname_result"
-
-               if test "$pic_object" != none; then
-                 # Prepend the subdirectory the object is found in.
-                 pic_object="$xdir$pic_object"
-
-                 if test "$prev" = dlfiles; then
-                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-                     func_append dlfiles " $pic_object"
-                     prev=
-                     continue
-                   else
-                     # If libtool objects are unsupported, then we need to preload.
-                     prev=dlprefiles
-                   fi
-                 fi
-
-                 # CHECK ME:  I think I busted this.  -Ossama
-                 if test "$prev" = dlprefiles; then
-                   # Preload the old-style object.
-                   func_append dlprefiles " $pic_object"
-                   prev=
-                 fi
-
-                 # A PIC object.
-                 func_append libobjs " $pic_object"
-                 arg="$pic_object"
-               fi
-
-               # Non-PIC object.
-               if test "$non_pic_object" != none; then
-                 # Prepend the subdirectory the object is found in.
-                 non_pic_object="$xdir$non_pic_object"
-
-                 # A standard non-PIC object
-                 func_append non_pic_objects " $non_pic_object"
-                 if test -z "$pic_object" || test "$pic_object" = none ; then
-                   arg="$non_pic_object"
-                 fi
-               else
-                 # If the PIC object exists, use it instead.
-                 # $xdir was prepended to $pic_object above.
-                 non_pic_object="$pic_object"
-                 func_append non_pic_objects " $non_pic_object"
-               fi
-             else
-               # Only an error if not doing a dry-run.
-               if $opt_dry_run; then
-                 # Extract subdirectory from the argument.
-                 func_dirname "$arg" "/" ""
-                 xdir="$func_dirname_result"
-
-                 func_lo2o "$arg"
-                 pic_object=$xdir$objdir/$func_lo2o_result
-                 non_pic_object=$xdir$func_lo2o_result
-                 func_append libobjs " $pic_object"
-                 func_append non_pic_objects " $non_pic_object"
-               else
-                 func_fatal_error "\`$arg' is not a valid libtool object"
-               fi
-             fi
-           done
-         else
-           func_fatal_error "link input file \`$arg' does not exist"
-         fi
-         arg=$save_arg
-         prev=
-         continue
-         ;;
-       precious_regex)
-         precious_files_regex="$arg"
-         prev=
-         continue
-         ;;
-       release)
-         release="-$arg"
-         prev=
-         continue
-         ;;
-       rpath | xrpath)
-         # We need an absolute path.
-         case $arg in
-         [\\/]* | [A-Za-z]:[\\/]*) ;;
-         *)
-           func_fatal_error "only absolute run-paths are allowed"
-           ;;
-         esac
-         if test "$prev" = rpath; then
-           case "$rpath " in
-           *" $arg "*) ;;
-           *) func_append rpath " $arg" ;;
-           esac
-         else
-           case "$xrpath " in
-           *" $arg "*) ;;
-           *) func_append xrpath " $arg" ;;
-           esac
-         fi
-         prev=
-         continue
-         ;;
-       shrext)
-         shrext_cmds="$arg"
-         prev=
-         continue
-         ;;
-       weak)
-         func_append weak_libs " $arg"
-         prev=
-         continue
-         ;;
-       xcclinker)
-         func_append linker_flags " $qarg"
-         func_append compiler_flags " $qarg"
-         prev=
-         func_append compile_command " $qarg"
-         func_append finalize_command " $qarg"
-         continue
-         ;;
-       xcompiler)
-         func_append compiler_flags " $qarg"
-         prev=
-         func_append compile_command " $qarg"
-         func_append finalize_command " $qarg"
-         continue
-         ;;
-       xlinker)
-         func_append linker_flags " $qarg"
-         func_append compiler_flags " $wl$qarg"
-         prev=
-         func_append compile_command " $wl$qarg"
-         func_append finalize_command " $wl$qarg"
-         continue
-         ;;
-       *)
-         eval "$prev=\"\$arg\""
-         prev=
-         continue
-         ;;
-       esac
-      fi # test -n "$prev"
-
-      prevarg="$arg"
-
-      case $arg in
-      -all-static)
-       if test -n "$link_static_flag"; then
-         # See comment for -static flag below, for more details.
-         func_append compile_command " $link_static_flag"
-         func_append finalize_command " $link_static_flag"
-       fi
-       continue
-       ;;
-
-      -allow-undefined)
-       # FIXME: remove this flag sometime in the future.
-       func_fatal_error "\`-allow-undefined' must not be used because it is the default"
-       ;;
-
-      -avoid-version)
-       avoid_version=yes
-       continue
-       ;;
-
-      -bindir)
-       prev=bindir
-       continue
-       ;;
-
-      -dlopen)
-       prev=dlfiles
-       continue
-       ;;
-
-      -dlpreopen)
-       prev=dlprefiles
-       continue
-       ;;
-
-      -export-dynamic)
-       export_dynamic=yes
-       continue
-       ;;
-
-      -export-symbols | -export-symbols-regex)
-       if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-         func_fatal_error "more than one -exported-symbols argument is not allowed"
-       fi
-       if test "X$arg" = "X-export-symbols"; then
-         prev=expsyms
-       else
-         prev=expsyms_regex
-       fi
-       continue
-       ;;
-
-      -framework)
-       prev=framework
-       continue
-       ;;
-
-      -inst-prefix-dir)
-       prev=inst_prefix
-       continue
-       ;;
-
-      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
-      # so, if we see these flags be careful not to treat them like -L
-      -L[A-Z][A-Z]*:*)
-       case $with_gcc/$host in
-       no/*-*-irix* | /*-*-irix*)
-         func_append compile_command " $arg"
-         func_append finalize_command " $arg"
-         ;;
-       esac
-       continue
-       ;;
-
-      -L*)
-       func_stripname "-L" '' "$arg"
-       if test -z "$func_stripname_result"; then
-         if test "$#" -gt 0; then
-           func_fatal_error "require no space between \`-L' and \`$1'"
-         else
-           func_fatal_error "need path for \`-L' option"
-         fi
-       fi
-       func_resolve_sysroot "$func_stripname_result"
-       dir=$func_resolve_sysroot_result
-       # We need an absolute path.
-       case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
-       *)
-         absdir=`cd "$dir" && pwd`
-         test -z "$absdir" && \
-           func_fatal_error "cannot determine absolute directory name of \`$dir'"
-         dir="$absdir"
-         ;;
-       esac
-       case "$deplibs " in
-       *" -L$dir "* | *" $arg "*)
-         # Will only happen for absolute or sysroot arguments
-         ;;
-       *)
-         # Preserve sysroot, but never include relative directories
-         case $dir in
-           [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
-           *) func_append deplibs " -L$dir" ;;
-         esac
-         func_append lib_search_path " $dir"
-         ;;
-       esac
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-         testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
-         case :$dllsearchpath: in
-         *":$dir:"*) ;;
-         ::) dllsearchpath=$dir;;
-         *) func_append dllsearchpath ":$dir";;
-         esac
-         case :$dllsearchpath: in
-         *":$testbindir:"*) ;;
-         ::) dllsearchpath=$testbindir;;
-         *) func_append dllsearchpath ":$testbindir";;
-         esac
-         ;;
-       esac
-       continue
-       ;;
-
-      -l*)
-       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
-         case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
-           # These systems don't actually have a C or math library (as such)
-           continue
-           ;;
-         *-*-os2*)
-           # These systems don't actually have a C library (as such)
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-           # Do not include libc due to us having libc/libc_r.
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
-           # Rhapsody C and math libraries are in the System framework
-           func_append deplibs " System.ltframework"
-           continue
-           ;;
-         *-*-sco3.2v5* | *-*-sco5v6*)
-           # Causes problems with __ctype
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
-           # Compiler inserts libc in the correct place for threads to work
-           test "X$arg" = "X-lc" && continue
-           ;;
-         esac
-       elif test "X$arg" = "X-lc_r"; then
-        case $host in
-        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-          # Do not include libc_r directly, use -pthread flag.
-          continue
-          ;;
-        esac
-       fi
-       func_append deplibs " $arg"
-       continue
-       ;;
-
-      -module)
-       module=yes
-       continue
-       ;;
-
-      # Tru64 UNIX uses -model [arg] to determine the layout of C++
-      # classes, name mangling, and exception handling.
-      # Darwin uses the -arch flag to determine output architecture.
-      -model|-arch|-isysroot|--sysroot)
-       func_append compiler_flags " $arg"
-       func_append compile_command " $arg"
-       func_append finalize_command " $arg"
-       prev=xcompiler
-       continue
-       ;;
-
-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
-      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
-       func_append compiler_flags " $arg"
-       func_append compile_command " $arg"
-       func_append finalize_command " $arg"
-       case "$new_inherited_linker_flags " in
-           *" $arg "*) ;;
-           * ) func_append new_inherited_linker_flags " $arg" ;;
-       esac
-       continue
-       ;;
-
-      -multi_module)
-       single_module="${wl}-multi_module"
-       continue
-       ;;
-
-      -no-fast-install)
-       fast_install=no
-       continue
-       ;;
-
-      -no-install)
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
-         # The PATH hackery in wrapper scripts is required on Windows
-         # and Darwin in order for the loader to find any dlls it needs.
-         func_warning "\`-no-install' is ignored for $host"
-         func_warning "assuming \`-no-fast-install' instead"
-         fast_install=no
-         ;;
-       *) no_install=yes ;;
-       esac
-       continue
-       ;;
-
-      -no-undefined)
-       allow_undefined=no
-       continue
-       ;;
-
-      -objectlist)
-       prev=objectlist
-       continue
-       ;;
-
-      -o) prev=output ;;
-
-      -precious-files-regex)
-       prev=precious_regex
-       continue
-       ;;
-
-      -release)
-       prev=release
-       continue
-       ;;
-
-      -rpath)
-       prev=rpath
-       continue
-       ;;
-
-      -R)
-       prev=xrpath
-       continue
-       ;;
-
-      -R*)
-       func_stripname '-R' '' "$arg"
-       dir=$func_stripname_result
-       # We need an absolute path.
-       case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
-       =*)
-         func_stripname '=' '' "$dir"
-         dir=$lt_sysroot$func_stripname_result
-         ;;
-       *)
-         func_fatal_error "only absolute run-paths are allowed"
-         ;;
-       esac
-       case "$xrpath " in
-       *" $dir "*) ;;
-       *) func_append xrpath " $dir" ;;
-       esac
-       continue
-       ;;
-
-      -shared)
-       # The effects of -shared are defined in a previous loop.
-       continue
-       ;;
-
-      -shrext)
-       prev=shrext
-       continue
-       ;;
-
-      -static | -static-libtool-libs)
-       # The effects of -static are defined in a previous loop.
-       # We used to do the same as -all-static on platforms that
-       # didn't have a PIC flag, but the assumption that the effects
-       # would be equivalent was wrong.  It would break on at least
-       # Digital Unix and AIX.
-       continue
-       ;;
-
-      -thread-safe)
-       thread_safe=yes
-       continue
-       ;;
-
-      -version-info)
-       prev=vinfo
-       continue
-       ;;
-
-      -version-number)
-       prev=vinfo
-       vinfo_number=yes
-       continue
-       ;;
-
-      -weak)
-        prev=weak
-       continue
-       ;;
-
-      -Wc,*)
-       func_stripname '-Wc,' '' "$arg"
-       args=$func_stripname_result
-       arg=
-       save_ifs="$IFS"; IFS=','
-       for flag in $args; do
-         IFS="$save_ifs"
-          func_quote_for_eval "$flag"
-         func_append arg " $func_quote_for_eval_result"
-         func_append compiler_flags " $func_quote_for_eval_result"
-       done
-       IFS="$save_ifs"
-       func_stripname ' ' '' "$arg"
-       arg=$func_stripname_result
-       ;;
-
-      -Wl,*)
-       func_stripname '-Wl,' '' "$arg"
-       args=$func_stripname_result
-       arg=
-       save_ifs="$IFS"; IFS=','
-       for flag in $args; do
-         IFS="$save_ifs"
-          func_quote_for_eval "$flag"
-         func_append arg " $wl$func_quote_for_eval_result"
-         func_append compiler_flags " $wl$func_quote_for_eval_result"
-         func_append linker_flags " $func_quote_for_eval_result"
-       done
-       IFS="$save_ifs"
-       func_stripname ' ' '' "$arg"
-       arg=$func_stripname_result
-       ;;
-
-      -Xcompiler)
-       prev=xcompiler
-       continue
-       ;;
-
-      -Xlinker)
-       prev=xlinker
-       continue
-       ;;
-
-      -XCClinker)
-       prev=xcclinker
-       continue
-       ;;
-
-      # -msg_* for osf cc
-      -msg_*)
-       func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
-       ;;
-
-      # Flags to be passed through unchanged, with rationale:
-      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
-      # -r[0-9][0-9]*        specify processor for the SGI compiler
-      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
-      # +DA*, +DD*           enable 64-bit mode for the HP compiler
-      # -q*                  compiler args for the IBM compiler
-      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
-      # -F/path              path to uninstalled frameworks, gcc on darwin
-      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
-      # @file                GCC response files
-      # -tp=*                Portland pgcc target processor selection
-      # --sysroot=*          for sysroot support
-      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
-        func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
-        func_append compile_command " $arg"
-        func_append finalize_command " $arg"
-        func_append compiler_flags " $arg"
-        continue
-        ;;
-
-      # Some other compiler flag.
-      -* | +*)
-        func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
-       ;;
-
-      *.$objext)
-       # A standard object.
-       func_append objs " $arg"
-       ;;
-
-      *.lo)
-       # A libtool-controlled object.
-
-       # Check to see that this really is a libtool object.
-       if func_lalib_unsafe_p "$arg"; then
-         pic_object=
-         non_pic_object=
-
-         # Read the .lo file
-         func_source "$arg"
-
-         if test -z "$pic_object" ||
-            test -z "$non_pic_object" ||
-            test "$pic_object" = none &&
-            test "$non_pic_object" = none; then
-           func_fatal_error "cannot find name of object for \`$arg'"
-         fi
-
-         # Extract subdirectory from the argument.
-         func_dirname "$arg" "/" ""
-         xdir="$func_dirname_result"
-
-         if test "$pic_object" != none; then
-           # Prepend the subdirectory the object is found in.
-           pic_object="$xdir$pic_object"
-
-           if test "$prev" = dlfiles; then
-             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-               func_append dlfiles " $pic_object"
-               prev=
-               continue
-             else
-               # If libtool objects are unsupported, then we need to preload.
-               prev=dlprefiles
-             fi
-           fi
-
-           # CHECK ME:  I think I busted this.  -Ossama
-           if test "$prev" = dlprefiles; then
-             # Preload the old-style object.
-             func_append dlprefiles " $pic_object"
-             prev=
-           fi
-
-           # A PIC object.
-           func_append libobjs " $pic_object"
-           arg="$pic_object"
-         fi
-
-         # Non-PIC object.
-         if test "$non_pic_object" != none; then
-           # Prepend the subdirectory the object is found in.
-           non_pic_object="$xdir$non_pic_object"
-
-           # A standard non-PIC object
-           func_append non_pic_objects " $non_pic_object"
-           if test -z "$pic_object" || test "$pic_object" = none ; then
-             arg="$non_pic_object"
-           fi
-         else
-           # If the PIC object exists, use it instead.
-           # $xdir was prepended to $pic_object above.
-           non_pic_object="$pic_object"
-           func_append non_pic_objects " $non_pic_object"
-         fi
-       else
-         # Only an error if not doing a dry-run.
-         if $opt_dry_run; then
-           # Extract subdirectory from the argument.
-           func_dirname "$arg" "/" ""
-           xdir="$func_dirname_result"
-
-           func_lo2o "$arg"
-           pic_object=$xdir$objdir/$func_lo2o_result
-           non_pic_object=$xdir$func_lo2o_result
-           func_append libobjs " $pic_object"
-           func_append non_pic_objects " $non_pic_object"
-         else
-           func_fatal_error "\`$arg' is not a valid libtool object"
-         fi
-       fi
-       ;;
-
-      *.$libext)
-       # An archive.
-       func_append deplibs " $arg"
-       func_append old_deplibs " $arg"
-       continue
-       ;;
-
-      *.la)
-       # A libtool-controlled library.
-
-       func_resolve_sysroot "$arg"
-       if test "$prev" = dlfiles; then
-         # This library was specified with -dlopen.
-         func_append dlfiles " $func_resolve_sysroot_result"
-         prev=
-       elif test "$prev" = dlprefiles; then
-         # The library was specified with -dlpreopen.
-         func_append dlprefiles " $func_resolve_sysroot_result"
-         prev=
-       else
-         func_append deplibs " $func_resolve_sysroot_result"
-       fi
-       continue
-       ;;
-
-      # Some other compiler argument.
-      *)
-       # Unknown arguments in both finalize_command and compile_command need
-       # to be aesthetically quoted because they are evaled later.
-       func_quote_for_eval "$arg"
-       arg="$func_quote_for_eval_result"
-       ;;
-      esac # arg
-
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-       func_append compile_command " $arg"
-       func_append finalize_command " $arg"
-      fi
-    done # argument parsing loop
-
-    test -n "$prev" && \
-      func_fatal_help "the \`$prevarg' option requires an argument"
-
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
-      eval arg=\"$export_dynamic_flag_spec\"
-      func_append compile_command " $arg"
-      func_append finalize_command " $arg"
-    fi
-
-    oldlibs=
-    # calculate the name of the file, without its directory
-    func_basename "$output"
-    outputname="$func_basename_result"
-    libobjs_save="$libobjs"
-
-    if test -n "$shlibpath_var"; then
-      # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
-    else
-      shlib_search_path=
-    fi
-    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
-    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
-    func_dirname "$output" "/" ""
-    output_objdir="$func_dirname_result$objdir"
-    func_to_tool_file "$output_objdir/"
-    tool_output_objdir=$func_to_tool_file_result
-    # Create the object directory.
-    func_mkdir_p "$output_objdir"
-
-    # Determine the type of output
-    case $output in
-    "")
-      func_fatal_help "you must specify an output file"
-      ;;
-    *.$libext) linkmode=oldlib ;;
-    *.lo | *.$objext) linkmode=obj ;;
-    *.la) linkmode=lib ;;
-    *) linkmode=prog ;; # Anything else should be a program.
-    esac
-
-    specialdeplibs=
-
-    libs=
-    # Find all interdependent deplibs by searching for libraries
-    # that are linked more than once (e.g. -la -lb -la)
-    for deplib in $deplibs; do
-      if $opt_preserve_dup_deps ; then
-       case "$libs " in
-       *" $deplib "*) func_append specialdeplibs " $deplib" ;;
-       esac
-      fi
-      func_append libs " $deplib"
-    done
-
-    if test "$linkmode" = lib; then
-      libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
-      # Compute libraries that are listed more than once in $predeps
-      # $postdeps and mark them as special (i.e., whose duplicates are
-      # not to be eliminated).
-      pre_post_deps=
-      if $opt_duplicate_compiler_generated_deps; then
-       for pre_post_dep in $predeps $postdeps; do
-         case "$pre_post_deps " in
-         *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
-         esac
-         func_append pre_post_deps " $pre_post_dep"
-       done
-      fi
-      pre_post_deps=
-    fi
-
-    deplibs=
-    newdependency_libs=
-    newlib_search_path=
-    need_relink=no # whether we're linking any uninstalled libtool libraries
-    notinst_deplibs= # not-installed libtool libraries
-    notinst_path= # paths that contain not-installed libtool libraries
-
-    case $linkmode in
-    lib)
-       passes="conv dlpreopen link"
-       for file in $dlfiles $dlprefiles; do
-         case $file in
-         *.la) ;;
-         *)
-           func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
-           ;;
-         esac
-       done
-       ;;
-    prog)
-       compile_deplibs=
-       finalize_deplibs=
-       alldeplibs=no
-       newdlfiles=
-       newdlprefiles=
-       passes="conv scan dlopen dlpreopen link"
-       ;;
-    *)  passes="conv"
-       ;;
-    esac
-
-    for pass in $passes; do
-      # The preopen pass in lib mode reverses $deplibs; put it back here
-      # so that -L comes before libs that need it for instance...
-      if test "$linkmode,$pass" = "lib,link"; then
-       ## FIXME: Find the place where the list is rebuilt in the wrong
-       ##        order, and fix it there properly
-        tmp_deplibs=
-       for deplib in $deplibs; do
-         tmp_deplibs="$deplib $tmp_deplibs"
-       done
-       deplibs="$tmp_deplibs"
-      fi
-
-      if test "$linkmode,$pass" = "lib,link" ||
-        test "$linkmode,$pass" = "prog,scan"; then
-       libs="$deplibs"
-       deplibs=
-      fi
-      if test "$linkmode" = prog; then
-       case $pass in
-       dlopen) libs="$dlfiles" ;;
-       dlpreopen) libs="$dlprefiles" ;;
-       link)
-         libs="$deplibs %DEPLIBS%"
-         test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
-         ;;
-       esac
-      fi
-      if test "$linkmode,$pass" = "lib,dlpreopen"; then
-       # Collect and forward deplibs of preopened libtool libs
-       for lib in $dlprefiles; do
-         # Ignore non-libtool-libs
-         dependency_libs=
-         func_resolve_sysroot "$lib"
-         case $lib in
-         *.la) func_source "$func_resolve_sysroot_result" ;;
-         esac
-
-         # Collect preopened libtool deplibs, except any this library
-         # has declared as weak libs
-         for deplib in $dependency_libs; do
-           func_basename "$deplib"
-            deplib_base=$func_basename_result
-           case " $weak_libs " in
-           *" $deplib_base "*) ;;
-           *) func_append deplibs " $deplib" ;;
-           esac
-         done
-       done
-       libs="$dlprefiles"
-      fi
-      if test "$pass" = dlopen; then
-       # Collect dlpreopened libraries
-       save_deplibs="$deplibs"
-       deplibs=
-      fi
-
-      for deplib in $libs; do
-       lib=
-       found=no
-       case $deplib in
-       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
-        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
-         if test "$linkmode,$pass" = "prog,link"; then
-           compile_deplibs="$deplib $compile_deplibs"
-           finalize_deplibs="$deplib $finalize_deplibs"
-         else
-           func_append compiler_flags " $deplib"
-           if test "$linkmode" = lib ; then
-               case "$new_inherited_linker_flags " in
-                   *" $deplib "*) ;;
-                   * ) func_append new_inherited_linker_flags " $deplib" ;;
-               esac
-           fi
-         fi
-         continue
-         ;;
-       -l*)
-         if test "$linkmode" != lib && test "$linkmode" != prog; then
-           func_warning "\`-l' is ignored for archives/objects"
-           continue
-         fi
-         func_stripname '-l' '' "$deplib"
-         name=$func_stripname_result
-         if test "$linkmode" = lib; then
-           searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
-         else
-           searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
-         fi
-         for searchdir in $searchdirs; do
-           for search_ext in .la $std_shrext .so .a; do
-             # Search the libtool library
-             lib="$searchdir/lib${name}${search_ext}"
-             if test -f "$lib"; then
-               if test "$search_ext" = ".la"; then
-                 found=yes
-               else
-                 found=no
-               fi
-               break 2
-             fi
-           done
-         done
-         if test "$found" != yes; then
-           # deplib doesn't seem to be a libtool library
-           if test "$linkmode,$pass" = "prog,link"; then
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           else
-             deplibs="$deplib $deplibs"
-             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-           fi
-           continue
-         else # deplib is a libtool library
-           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
-           # We need to do some special things here, and not later.
-           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-             case " $predeps $postdeps " in
-             *" $deplib "*)
-               if func_lalib_p "$lib"; then
-                 library_names=
-                 old_library=
-                 func_source "$lib"
-                 for l in $old_library $library_names; do
-                   ll="$l"
-                 done
-                 if test "X$ll" = "X$old_library" ; then # only static version available
-                   found=no
-                   func_dirname "$lib" "" "."
-                   ladir="$func_dirname_result"
-                   lib=$ladir/$old_library
-                   if test "$linkmode,$pass" = "prog,link"; then
-                     compile_deplibs="$deplib $compile_deplibs"
-                     finalize_deplibs="$deplib $finalize_deplibs"
-                   else
-                     deplibs="$deplib $deplibs"
-                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-                   fi
-                   continue
-                 fi
-               fi
-               ;;
-             *) ;;
-             esac
-           fi
-         fi
-         ;; # -l
-       *.ltframework)
-         if test "$linkmode,$pass" = "prog,link"; then
-           compile_deplibs="$deplib $compile_deplibs"
-           finalize_deplibs="$deplib $finalize_deplibs"
-         else
-           deplibs="$deplib $deplibs"
-           if test "$linkmode" = lib ; then
-               case "$new_inherited_linker_flags " in
-                   *" $deplib "*) ;;
-                   * ) func_append new_inherited_linker_flags " $deplib" ;;
-               esac
-           fi
-         fi
-         continue
-         ;;
-       -L*)
-         case $linkmode in
-         lib)
-           deplibs="$deplib $deplibs"
-           test "$pass" = conv && continue
-           newdependency_libs="$deplib $newdependency_libs"
-           func_stripname '-L' '' "$deplib"
-           func_resolve_sysroot "$func_stripname_result"
-           func_append newlib_search_path " $func_resolve_sysroot_result"
-           ;;
-         prog)
-           if test "$pass" = conv; then
-             deplibs="$deplib $deplibs"
-             continue
-           fi
-           if test "$pass" = scan; then
-             deplibs="$deplib $deplibs"
-           else
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           fi
-           func_stripname '-L' '' "$deplib"
-           func_resolve_sysroot "$func_stripname_result"
-           func_append newlib_search_path " $func_resolve_sysroot_result"
-           ;;
-         *)
-           func_warning "\`-L' is ignored for archives/objects"
-           ;;
-         esac # linkmode
-         continue
-         ;; # -L
-       -R*)
-         if test "$pass" = link; then
-           func_stripname '-R' '' "$deplib"
-           func_resolve_sysroot "$func_stripname_result"
-           dir=$func_resolve_sysroot_result
-           # Make sure the xrpath contains only unique directories.
-           case "$xrpath " in
-           *" $dir "*) ;;
-           *) func_append xrpath " $dir" ;;
-           esac
-         fi
-         deplibs="$deplib $deplibs"
-         continue
-         ;;
-       *.la)
-         func_resolve_sysroot "$deplib"
-         lib=$func_resolve_sysroot_result
-         ;;
-       *.$libext)
-         if test "$pass" = conv; then
-           deplibs="$deplib $deplibs"
-           continue
-         fi
-         case $linkmode in
-         lib)
-           # Linking convenience modules into shared libraries is allowed,
-           # but linking other static libraries is non-portable.
-           case " $dlpreconveniencelibs " in
-           *" $deplib "*) ;;
-           *)
-             valid_a_lib=no
-             case $deplibs_check_method in
-               match_pattern*)
-                 set dummy $deplibs_check_method; shift
-                 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
-                 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
-                   | $EGREP "$match_pattern_regex" > /dev/null; then
-                   valid_a_lib=yes
-                 fi
-               ;;
-               pass_all)
-                 valid_a_lib=yes
-               ;;
-             esac
-             if test "$valid_a_lib" != yes; then
-               echo
-               $ECHO "*** Warning: Trying to link with static lib archive $deplib."
-               echo "*** I have the capability to make that library automatically link in when"
-               echo "*** you link to this library.  But I can only do this if you have a"
-               echo "*** shared version of the library, which you do not appear to have"
-               echo "*** because the file extensions .$libext of this argument makes me believe"
-               echo "*** that it is just a static archive that I should not use here."
-             else
-               echo
-               $ECHO "*** Warning: Linking the shared library $output against the"
-               $ECHO "*** static library $deplib is not portable!"
-               deplibs="$deplib $deplibs"
-             fi
-             ;;
-           esac
-           continue
-           ;;
-         prog)
-           if test "$pass" != link; then
-             deplibs="$deplib $deplibs"
-           else
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           fi
-           continue
-           ;;
-         esac # linkmode
-         ;; # *.$libext
-       *.lo | *.$objext)
-         if test "$pass" = conv; then
-           deplibs="$deplib $deplibs"
-         elif test "$linkmode" = prog; then
-           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
-             # If there is no dlopen support or we're linking statically,
-             # we need to preload.
-             func_append newdlprefiles " $deplib"
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           else
-             func_append newdlfiles " $deplib"
-           fi
-         fi
-         continue
-         ;;
-       %DEPLIBS%)
-         alldeplibs=yes
-         continue
-         ;;
-       esac # case $deplib
-
-       if test "$found" = yes || test -f "$lib"; then :
-       else
-         func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
-       fi
-
-       # Check to see that this really is a libtool archive.
-       func_lalib_unsafe_p "$lib" \
-         || func_fatal_error "\`$lib' is not a valid libtool archive"
-
-       func_dirname "$lib" "" "."
-       ladir="$func_dirname_result"
-
-       dlname=
-       dlopen=
-       dlpreopen=
-       libdir=
-       library_names=
-       old_library=
-       inherited_linker_flags=
-       # If the library was installed with an old release of libtool,
-       # it will not redefine variables installed, or shouldnotlink
-       installed=yes
-       shouldnotlink=no
-       avoidtemprpath=
-
-
-       # Read the .la file
-       func_source "$lib"
-
-       # Convert "-framework foo" to "foo.ltframework"
-       if test -n "$inherited_linker_flags"; then
-         tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
-         for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
-           case " $new_inherited_linker_flags " in
-             *" $tmp_inherited_linker_flag "*) ;;
-             *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
-           esac
-         done
-       fi
-       dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-       if test "$linkmode,$pass" = "lib,link" ||
-          test "$linkmode,$pass" = "prog,scan" ||
-          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-         test -n "$dlopen" && func_append dlfiles " $dlopen"
-         test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
-       fi
-
-       if test "$pass" = conv; then
-         # Only check for convenience libraries
-         deplibs="$lib $deplibs"
-         if test -z "$libdir"; then
-           if test -z "$old_library"; then
-             func_fatal_error "cannot find name of link library for \`$lib'"
-           fi
-           # It is a libtool convenience library, so add in its objects.
-           func_append convenience " $ladir/$objdir/$old_library"
-           func_append old_convenience " $ladir/$objdir/$old_library"
-           tmp_libs=
-           for deplib in $dependency_libs; do
-             deplibs="$deplib $deplibs"
-             if $opt_preserve_dup_deps ; then
-               case "$tmp_libs " in
-               *" $deplib "*) func_append specialdeplibs " $deplib" ;;
-               esac
-             fi
-             func_append tmp_libs " $deplib"
-           done
-         elif test "$linkmode" != prog && test "$linkmode" != lib; then
-           func_fatal_error "\`$lib' is not a convenience library"
-         fi
-         continue
-       fi # $pass = conv
-
-
-       # Get the name of the library we link against.
-       linklib=
-       if test -n "$old_library" &&
-          { test "$prefer_static_libs" = yes ||
-            test "$prefer_static_libs,$installed" = "built,no"; }; then
-         linklib=$old_library
-       else
-         for l in $old_library $library_names; do
-           linklib="$l"
-         done
-       fi
-       if test -z "$linklib"; then
-         func_fatal_error "cannot find name of link library for \`$lib'"
-       fi
-
-       # This library was specified with -dlopen.
-       if test "$pass" = dlopen; then
-         if test -z "$libdir"; then
-           func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
-         fi
-         if test -z "$dlname" ||
-            test "$dlopen_support" != yes ||
-            test "$build_libtool_libs" = no; then
-           # If there is no dlname, no dlopen support or we're linking
-           # statically, we need to preload.  We also need to preload any
-           # dependent libraries so libltdl's deplib preloader doesn't
-           # bomb out in the load deplibs phase.
-           func_append dlprefiles " $lib $dependency_libs"
-         else
-           func_append newdlfiles " $lib"
-         fi
-         continue
-       fi # $pass = dlopen
-
-       # We need an absolute path.
-       case $ladir in
-       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
-       *)
-         abs_ladir=`cd "$ladir" && pwd`
-         if test -z "$abs_ladir"; then
-           func_warning "cannot determine absolute directory name of \`$ladir'"
-           func_warning "passing it literally to the linker, although it might fail"
-           abs_ladir="$ladir"
-         fi
-         ;;
-       esac
-       func_basename "$lib"
-       laname="$func_basename_result"
-
-       # Find the relevant object directory and library name.
-       if test "X$installed" = Xyes; then
-         if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-           func_warning "library \`$lib' was moved."
-           dir="$ladir"
-           absdir="$abs_ladir"
-           libdir="$abs_ladir"
-         else
-           dir="$lt_sysroot$libdir"
-           absdir="$lt_sysroot$libdir"
-         fi
-         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
-       else
-         if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-           dir="$ladir"
-           absdir="$abs_ladir"
-           # Remove this search path later
-           func_append notinst_path " $abs_ladir"
-         else
-           dir="$ladir/$objdir"
-           absdir="$abs_ladir/$objdir"
-           # Remove this search path later
-           func_append notinst_path " $abs_ladir"
-         fi
-       fi # $installed = yes
-       func_stripname 'lib' '.la' "$laname"
-       name=$func_stripname_result
-
-       # This library was specified with -dlpreopen.
-       if test "$pass" = dlpreopen; then
-         if test -z "$libdir" && test "$linkmode" = prog; then
-           func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
-         fi
-         case "$host" in
-           # special handling for platforms with PE-DLLs.
-           *cygwin* | *mingw* | *cegcc* )
-             # Linker will automatically link against shared library if both
-             # static and shared are present.  Therefore, ensure we extract
-             # symbols from the import library if a shared library is present
-             # (otherwise, the dlopen module name will be incorrect).  We do
-             # this by putting the import library name into $newdlprefiles.
-             # We recover the dlopen module name by 'saving' the la file
-             # name in a special purpose variable, and (later) extracting the
-             # dlname from the la file.
-             if test -n "$dlname"; then
-               func_tr_sh "$dir/$linklib"
-               eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
-               func_append newdlprefiles " $dir/$linklib"
-             else
-               func_append newdlprefiles " $dir/$old_library"
-               # Keep a list of preopened convenience libraries to check
-               # that they are being used correctly in the link pass.
-               test -z "$libdir" && \
-                 func_append dlpreconveniencelibs " $dir/$old_library"
-             fi
-           ;;
-           * )
-             # Prefer using a static library (so that no silly _DYNAMIC symbols
-             # are required to link).
-             if test -n "$old_library"; then
-               func_append newdlprefiles " $dir/$old_library"
-               # Keep a list of preopened convenience libraries to check
-               # that they are being used correctly in the link pass.
-               test -z "$libdir" && \
-                 func_append dlpreconveniencelibs " $dir/$old_library"
-             # Otherwise, use the dlname, so that lt_dlopen finds it.
-             elif test -n "$dlname"; then
-               func_append newdlprefiles " $dir/$dlname"
-             else
-               func_append newdlprefiles " $dir/$linklib"
-             fi
-           ;;
-         esac
-       fi # $pass = dlpreopen
-
-       if test -z "$libdir"; then
-         # Link the convenience library
-         if test "$linkmode" = lib; then
-           deplibs="$dir/$old_library $deplibs"
-         elif test "$linkmode,$pass" = "prog,link"; then
-           compile_deplibs="$dir/$old_library $compile_deplibs"
-           finalize_deplibs="$dir/$old_library $finalize_deplibs"
-         else
-           deplibs="$lib $deplibs" # used for prog,scan pass
-         fi
-         continue
-       fi
-
-
-       if test "$linkmode" = prog && test "$pass" != link; then
-         func_append newlib_search_path " $ladir"
-         deplibs="$lib $deplibs"
-
-         linkalldeplibs=no
-         if test "$link_all_deplibs" != no || test -z "$library_names" ||
-            test "$build_libtool_libs" = no; then
-           linkalldeplibs=yes
-         fi
-
-         tmp_libs=
-         for deplib in $dependency_libs; do
-           case $deplib in
-           -L*) func_stripname '-L' '' "$deplib"
-                func_resolve_sysroot "$func_stripname_result"
-                func_append newlib_search_path " $func_resolve_sysroot_result"
-                ;;
-           esac
-           # Need to link against all dependency_libs?
-           if test "$linkalldeplibs" = yes; then
-             deplibs="$deplib $deplibs"
-           else
-             # Need to hardcode shared library paths
-             # or/and link against static libraries
-             newdependency_libs="$deplib $newdependency_libs"
-           fi
-           if $opt_preserve_dup_deps ; then
-             case "$tmp_libs " in
-             *" $deplib "*) func_append specialdeplibs " $deplib" ;;
-             esac
-           fi
-           func_append tmp_libs " $deplib"
-         done # for deplib
-         continue
-       fi # $linkmode = prog...
-
-       if test "$linkmode,$pass" = "prog,link"; then
-         if test -n "$library_names" &&
-            { { test "$prefer_static_libs" = no ||
-                test "$prefer_static_libs,$installed" = "built,yes"; } ||
-              test -z "$old_library"; }; then
-           # We need to hardcode the library path
-           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
-             # Make sure the rpath contains only unique directories.
-             case "$temp_rpath:" in
-             *"$absdir:"*) ;;
-             *) func_append temp_rpath "$absdir:" ;;
-             esac
-           fi
-
-           # Hardcode the library path.
-           # Skip directories that are in the system default run-time
-           # search path.
-           case " $sys_lib_dlsearch_path " in
-           *" $absdir "*) ;;
-           *)
-             case "$compile_rpath " in
-             *" $absdir "*) ;;
-             *) func_append compile_rpath " $absdir" ;;
-             esac
-             ;;
-           esac
-           case " $sys_lib_dlsearch_path " in
-           *" $libdir "*) ;;
-           *)
-             case "$finalize_rpath " in
-             *" $libdir "*) ;;
-             *) func_append finalize_rpath " $libdir" ;;
-             esac
-             ;;
-           esac
-         fi # $linkmode,$pass = prog,link...
-
-         if test "$alldeplibs" = yes &&
-            { test "$deplibs_check_method" = pass_all ||
-              { test "$build_libtool_libs" = yes &&
-                test -n "$library_names"; }; }; then
-           # We only need to search for static libraries
-           continue
-         fi
-       fi
-
-       link_static=no # Whether the deplib will be linked statically
-       use_static_libs=$prefer_static_libs
-       if test "$use_static_libs" = built && test "$installed" = yes; then
-         use_static_libs=no
-       fi
-       if test -n "$library_names" &&
-          { test "$use_static_libs" = no || test -z "$old_library"; }; then
-         case $host in
-         *cygwin* | *mingw* | *cegcc*)
-             # No point in relinking DLLs because paths are not encoded
-             func_append notinst_deplibs " $lib"
-             need_relink=no
-           ;;
-         *)
-           if test "$installed" = no; then
-             func_append notinst_deplibs " $lib"
-             need_relink=yes
-           fi
-           ;;
-         esac
-         # This is a shared library
-
-         # Warn about portability, can't link against -module's on some
-         # systems (darwin).  Don't bleat about dlopened modules though!
-         dlopenmodule=""
-         for dlpremoduletest in $dlprefiles; do
-           if test "X$dlpremoduletest" = "X$lib"; then
-             dlopenmodule="$dlpremoduletest"
-             break
-           fi
-         done
-         if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
-           echo
-           if test "$linkmode" = prog; then
-             $ECHO "*** Warning: Linking the executable $output against the loadable module"
-           else
-             $ECHO "*** Warning: Linking the shared library $output against the loadable module"
-           fi
-           $ECHO "*** $linklib is not portable!"
-         fi
-         if test "$linkmode" = lib &&
-            test "$hardcode_into_libs" = yes; then
-           # Hardcode the library path.
-           # Skip directories that are in the system default run-time
-           # search path.
-           case " $sys_lib_dlsearch_path " in
-           *" $absdir "*) ;;
-           *)
-             case "$compile_rpath " in
-             *" $absdir "*) ;;
-             *) func_append compile_rpath " $absdir" ;;
-             esac
-             ;;
-           esac
-           case " $sys_lib_dlsearch_path " in
-           *" $libdir "*) ;;
-           *)
-             case "$finalize_rpath " in
-             *" $libdir "*) ;;
-             *) func_append finalize_rpath " $libdir" ;;
-             esac
-             ;;
-           esac
-         fi
-
-         if test -n "$old_archive_from_expsyms_cmds"; then
-           # figure out the soname
-           set dummy $library_names
-           shift
-           realname="$1"
-           shift
-           libname=`eval "\\$ECHO \"$libname_spec\""`
-           # use dlname if we got it. it's perfectly good, no?
-           if test -n "$dlname"; then
-             soname="$dlname"
-           elif test -n "$soname_spec"; then
-             # bleh windows
-             case $host in
-             *cygwin* | mingw* | *cegcc*)
-               func_arith $current - $age
-               major=$func_arith_result
-               versuffix="-$major"
-               ;;
-             esac
-             eval soname=\"$soname_spec\"
-           else
-             soname="$realname"
-           fi
-
-           # Make a new name for the extract_expsyms_cmds to use
-           soroot="$soname"
-           func_basename "$soroot"
-           soname="$func_basename_result"
-           func_stripname 'lib' '.dll' "$soname"
-           newlib=libimp-$func_stripname_result.a
-
-           # If the library has no export list, then create one now
-           if test -f "$output_objdir/$soname-def"; then :
-           else
-             func_verbose "extracting exported symbol list from \`$soname'"
-             func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
-           fi
-
-           # Create $newlib
-           if test -f "$output_objdir/$newlib"; then :; else
-             func_verbose "generating import library for \`$soname'"
-             func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
-           fi
-           # make sure the library variables are pointing to the new library
-           dir=$output_objdir
-           linklib=$newlib
-         fi # test -n "$old_archive_from_expsyms_cmds"
-
-         if test "$linkmode" = prog || test "$opt_mode" != relink; then
-           add_shlibpath=
-           add_dir=
-           add=
-           lib_linked=yes
-           case $hardcode_action in
-           immediate | unsupported)
-             if test "$hardcode_direct" = no; then
-               add="$dir/$linklib"
-               case $host in
-                 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
-                 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
-                 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
-                   *-*-unixware7*) add_dir="-L$dir" ;;
-                 *-*-darwin* )
-                   # if the lib is a (non-dlopened) module then we can not
-                   # link against it, someone is ignoring the earlier warnings
-                   if /usr/bin/file -L $add 2> /dev/null |
-                        $GREP ": [^:]* bundle" >/dev/null ; then
-                     if test "X$dlopenmodule" != "X$lib"; then
-                       $ECHO "*** Warning: lib $linklib is a module, not a shared library"
-                       if test -z "$old_library" ; then
-                         echo
-                         echo "*** And there doesn't seem to be a static archive available"
-                         echo "*** The link will probably fail, sorry"
-                       else
-                         add="$dir/$old_library"
-                       fi
-                     elif test -n "$old_library"; then
-                       add="$dir/$old_library"
-                     fi
-                   fi
-               esac
-             elif test "$hardcode_minus_L" = no; then
-               case $host in
-               *-*-sunos*) add_shlibpath="$dir" ;;
-               esac
-               add_dir="-L$dir"
-               add="-l$name"
-             elif test "$hardcode_shlibpath_var" = no; then
-               add_shlibpath="$dir"
-               add="-l$name"
-             else
-               lib_linked=no
-             fi
-             ;;
-           relink)
-             if test "$hardcode_direct" = yes &&
-                test "$hardcode_direct_absolute" = no; then
-               add="$dir/$linklib"
-             elif test "$hardcode_minus_L" = yes; then
-               add_dir="-L$absdir"
-               # Try looking first in the location we're being installed to.
-               if test -n "$inst_prefix_dir"; then
-                 case $libdir in
-                   [\\/]*)
-                     func_append add_dir " -L$inst_prefix_dir$libdir"
-                     ;;
-                 esac
-               fi
-               add="-l$name"
-             elif test "$hardcode_shlibpath_var" = yes; then
-               add_shlibpath="$dir"
-               add="-l$name"
-             else
-               lib_linked=no
-             fi
-             ;;
-           *) lib_linked=no ;;
-           esac
-
-           if test "$lib_linked" != yes; then
-             func_fatal_configuration "unsupported hardcode properties"
-           fi
-
-           if test -n "$add_shlibpath"; then
-             case :$compile_shlibpath: in
-             *":$add_shlibpath:"*) ;;
-             *) func_append compile_shlibpath "$add_shlibpath:" ;;
-             esac
-           fi
-           if test "$linkmode" = prog; then
-             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
-             test -n "$add" && compile_deplibs="$add $compile_deplibs"
-           else
-             test -n "$add_dir" && deplibs="$add_dir $deplibs"
-             test -n "$add" && deplibs="$add $deplibs"
-             if test "$hardcode_direct" != yes &&
-                test "$hardcode_minus_L" != yes &&
-                test "$hardcode_shlibpath_var" = yes; then
-               case :$finalize_shlibpath: in
-               *":$libdir:"*) ;;
-               *) func_append finalize_shlibpath "$libdir:" ;;
-               esac
-             fi
-           fi
-         fi
-
-         if test "$linkmode" = prog || test "$opt_mode" = relink; then
-           add_shlibpath=
-           add_dir=
-           add=
-           # Finalize command for both is simple: just hardcode it.
-           if test "$hardcode_direct" = yes &&
-              test "$hardcode_direct_absolute" = no; then
-             add="$libdir/$linklib"
-           elif test "$hardcode_minus_L" = yes; then
-             add_dir="-L$libdir"
-             add="-l$name"
-           elif test "$hardcode_shlibpath_var" = yes; then
-             case :$finalize_shlibpath: in
-             *":$libdir:"*) ;;
-             *) func_append finalize_shlibpath "$libdir:" ;;
-             esac
-             add="-l$name"
-           elif test "$hardcode_automatic" = yes; then
-             if test -n "$inst_prefix_dir" &&
-                test -f "$inst_prefix_dir$libdir/$linklib" ; then
-               add="$inst_prefix_dir$libdir/$linklib"
-             else
-               add="$libdir/$linklib"
-             fi
-           else
-             # We cannot seem to hardcode it, guess we'll fake it.
-             add_dir="-L$libdir"
-             # Try looking first in the location we're being installed to.
-             if test -n "$inst_prefix_dir"; then
-               case $libdir in
-                 [\\/]*)
-                   func_append add_dir " -L$inst_prefix_dir$libdir"
-                   ;;
-               esac
-             fi
-             add="-l$name"
-           fi
-
-           if test "$linkmode" = prog; then
-             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
-             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
-           else
-             test -n "$add_dir" && deplibs="$add_dir $deplibs"
-             test -n "$add" && deplibs="$add $deplibs"
-           fi
-         fi
-       elif test "$linkmode" = prog; then
-         # Here we assume that one of hardcode_direct or hardcode_minus_L
-         # is not unsupported.  This is valid on all known static and
-         # shared platforms.
-         if test "$hardcode_direct" != unsupported; then
-           test -n "$old_library" && linklib="$old_library"
-           compile_deplibs="$dir/$linklib $compile_deplibs"
-           finalize_deplibs="$dir/$linklib $finalize_deplibs"
-         else
-           compile_deplibs="-l$name -L$dir $compile_deplibs"
-           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
-         fi
-       elif test "$build_libtool_libs" = yes; then
-         # Not a shared library
-         if test "$deplibs_check_method" != pass_all; then
-           # We're trying link a shared library against a static one
-           # but the system doesn't support it.
-
-           # Just print a warning and add the library to dependency_libs so
-           # that the program can be linked against the static library.
-           echo
-           $ECHO "*** Warning: This system can not link to static lib archive $lib."
-           echo "*** I have the capability to make that library automatically link in when"
-           echo "*** you link to this library.  But I can only do this if you have a"
-           echo "*** shared version of the library, which you do not appear to have."
-           if test "$module" = yes; then
-             echo "*** But as you try to build a module library, libtool will still create "
-             echo "*** a static module, that should work as long as the dlopening application"
-             echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
-             if test -z "$global_symbol_pipe"; then
-               echo
-               echo "*** However, this would only work if libtool was able to extract symbol"
-               echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-               echo "*** not find such a program.  So, this module is probably useless."
-               echo "*** \`nm' from GNU binutils and a full rebuild may help."
-             fi
-             if test "$build_old_libs" = no; then
-               build_libtool_libs=module
-               build_old_libs=yes
-             else
-               build_libtool_libs=no
-             fi
-           fi
-         else
-           deplibs="$dir/$old_library $deplibs"
-           link_static=yes
-         fi
-       fi # link shared/static library?
-
-       if test "$linkmode" = lib; then
-         if test -n "$dependency_libs" &&
-            { test "$hardcode_into_libs" != yes ||
-              test "$build_old_libs" = yes ||
-              test "$link_static" = yes; }; then
-           # Extract -R from dependency_libs
-           temp_deplibs=
-           for libdir in $dependency_libs; do
-             case $libdir in
-             -R*) func_stripname '-R' '' "$libdir"
-                  temp_xrpath=$func_stripname_result
-                  case " $xrpath " in
-                  *" $temp_xrpath "*) ;;
-                  *) func_append xrpath " $temp_xrpath";;
-                  esac;;
-             *) func_append temp_deplibs " $libdir";;
-             esac
-           done
-           dependency_libs="$temp_deplibs"
-         fi
-
-         func_append newlib_search_path " $absdir"
-         # Link against this library
-         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
-         # ... and its dependency_libs
-         tmp_libs=
-         for deplib in $dependency_libs; do
-           newdependency_libs="$deplib $newdependency_libs"
-           case $deplib in
-              -L*) func_stripname '-L' '' "$deplib"
-                   func_resolve_sysroot "$func_stripname_result";;
-              *) func_resolve_sysroot "$deplib" ;;
-            esac
-           if $opt_preserve_dup_deps ; then
-             case "$tmp_libs " in
-             *" $func_resolve_sysroot_result "*)
-                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
-             esac
-           fi
-           func_append tmp_libs " $func_resolve_sysroot_result"
-         done
-
-         if test "$link_all_deplibs" != no; then
-           # Add the search paths of all dependency libraries
-           for deplib in $dependency_libs; do
-             path=
-             case $deplib in
-             -L*) path="$deplib" ;;
-             *.la)
-               func_resolve_sysroot "$deplib"
-               deplib=$func_resolve_sysroot_result
-               func_dirname "$deplib" "" "."
-               dir=$func_dirname_result
-               # We need an absolute path.
-               case $dir in
-               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-               *)
-                 absdir=`cd "$dir" && pwd`
-                 if test -z "$absdir"; then
-                   func_warning "cannot determine absolute directory name of \`$dir'"
-                   absdir="$dir"
-                 fi
-                 ;;
-               esac
-               if $GREP "^installed=no" $deplib > /dev/null; then
-               case $host in
-               *-*-darwin*)
-                 depdepl=
-                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-                 if test -n "$deplibrary_names" ; then
-                   for tmp in $deplibrary_names ; do
-                     depdepl=$tmp
-                   done
-                   if test -f "$absdir/$objdir/$depdepl" ; then
-                     depdepl="$absdir/$objdir/$depdepl"
-                     darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
-                      if test -z "$darwin_install_name"; then
-                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
-                      fi
-                     func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
-                     func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
-                     path=
-                   fi
-                 fi
-                 ;;
-               *)
-                 path="-L$absdir/$objdir"
-                 ;;
-               esac
-               else
-                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-                 test -z "$libdir" && \
-                   func_fatal_error "\`$deplib' is not a valid libtool archive"
-                 test "$absdir" != "$libdir" && \
-                   func_warning "\`$deplib' seems to be moved"
-
-                 path="-L$absdir"
-               fi
-               ;;
-             esac
-             case " $deplibs " in
-             *" $path "*) ;;
-             *) deplibs="$path $deplibs" ;;
-             esac
-           done
-         fi # link_all_deplibs != no
-       fi # linkmode = lib
-      done # for deplib in $libs
-      if test "$pass" = link; then
-       if test "$linkmode" = "prog"; then
-         compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
-         finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
-       else
-         compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-       fi
-      fi
-      dependency_libs="$newdependency_libs"
-      if test "$pass" = dlpreopen; then
-       # Link the dlpreopened libraries before other libraries
-       for deplib in $save_deplibs; do
-         deplibs="$deplib $deplibs"
-       done
-      fi
-      if test "$pass" != dlopen; then
-       if test "$pass" != conv; then
-         # Make sure lib_search_path contains only unique directories.
-         lib_search_path=
-         for dir in $newlib_search_path; do
-           case "$lib_search_path " in
-           *" $dir "*) ;;
-           *) func_append lib_search_path " $dir" ;;
-           esac
-         done
-         newlib_search_path=
-       fi
-
-       if test "$linkmode,$pass" != "prog,link"; then
-         vars="deplibs"
-       else
-         vars="compile_deplibs finalize_deplibs"
-       fi
-       for var in $vars dependency_libs; do
-         # Add libraries to $var in reverse order
-         eval tmp_libs=\"\$$var\"
-         new_libs=
-         for deplib in $tmp_libs; do
-           # FIXME: Pedantically, this is the right thing to do, so
-           #        that some nasty dependency loop isn't accidentally
-           #        broken:
-           #new_libs="$deplib $new_libs"
-           # Pragmatically, this seems to cause very few problems in
-           # practice:
-           case $deplib in
-           -L*) new_libs="$deplib $new_libs" ;;
-           -R*) ;;
-           *)
-             # And here is the reason: when a library appears more
-             # than once as an explicit dependence of a library, or
-             # is implicitly linked in more than once by the
-             # compiler, it is considered special, and multiple
-             # occurrences thereof are not removed.  Compare this
-             # with having the same library being listed as a
-             # dependency of multiple other libraries: in this case,
-             # we know (pedantically, we assume) the library does not
-             # need to be listed more than once, so we keep only the
-             # last copy.  This is not always right, but it is rare
-             # enough that we require users that really mean to play
-             # such unportable linking tricks to link the library
-             # using -Wl,-lname, so that libtool does not consider it
-             # for duplicate removal.
-             case " $specialdeplibs " in
-             *" $deplib "*) new_libs="$deplib $new_libs" ;;
-             *)
-               case " $new_libs " in
-               *" $deplib "*) ;;
-               *) new_libs="$deplib $new_libs" ;;
-               esac
-               ;;
-             esac
-             ;;
-           esac
-         done
-         tmp_libs=
-         for deplib in $new_libs; do
-           case $deplib in
-           -L*)
-             case " $tmp_libs " in
-             *" $deplib "*) ;;
-             *) func_append tmp_libs " $deplib" ;;
-             esac
-             ;;
-           *) func_append tmp_libs " $deplib" ;;
-           esac
-         done
-         eval $var=\"$tmp_libs\"
-       done # for var
-      fi
-      # Last step: remove runtime libs from dependency_libs
-      # (they stay in deplibs)
-      tmp_libs=
-      for i in $dependency_libs ; do
-       case " $predeps $postdeps $compiler_lib_search_path " in
-       *" $i "*)
-         i=""
-         ;;
-       esac
-       if test -n "$i" ; then
-         func_append tmp_libs " $i"
-       fi
-      done
-      dependency_libs=$tmp_libs
-    done # for pass
-    if test "$linkmode" = prog; then
-      dlfiles="$newdlfiles"
-    fi
-    if test "$linkmode" = prog || test "$linkmode" = lib; then
-      dlprefiles="$newdlprefiles"
-    fi
-
-    case $linkmode in
-    oldlib)
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       func_warning "\`-dlopen' is ignored for archives"
-      fi
-
-      case " $deplibs" in
-      *\ -l* | *\ -L*)
-       func_warning "\`-l' and \`-L' are ignored for archives" ;;
-      esac
-
-      test -n "$rpath" && \
-       func_warning "\`-rpath' is ignored for archives"
-
-      test -n "$xrpath" && \
-       func_warning "\`-R' is ignored for archives"
-
-      test -n "$vinfo" && \
-       func_warning "\`-version-info/-version-number' is ignored for archives"
-
-      test -n "$release" && \
-       func_warning "\`-release' is ignored for archives"
-
-      test -n "$export_symbols$export_symbols_regex" && \
-       func_warning "\`-export-symbols' is ignored for archives"
-
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      func_append objs "$old_deplibs"
-      ;;
-
-    lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case $outputname in
-      lib*)
-       func_stripname 'lib' '.la' "$outputname"
-       name=$func_stripname_result
-       eval shared_ext=\"$shrext_cmds\"
-       eval libname=\"$libname_spec\"
-       ;;
-      *)
-       test "$module" = no && \
-         func_fatal_help "libtool library \`$output' must begin with \`lib'"
-
-       if test "$need_lib_prefix" != no; then
-         # Add the "lib" prefix for modules if required
-         func_stripname '' '.la' "$outputname"
-         name=$func_stripname_result
-         eval shared_ext=\"$shrext_cmds\"
-         eval libname=\"$libname_spec\"
-       else
-         func_stripname '' '.la' "$outputname"
-         libname=$func_stripname_result
-       fi
-       ;;
-      esac
-
-      if test -n "$objs"; then
-       if test "$deplibs_check_method" != pass_all; then
-         func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
-       else
-         echo
-         $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
-         $ECHO "*** objects $objs is not portable!"
-         func_append libobjs " $objs"
-       fi
-      fi
-
-      test "$dlself" != no && \
-       func_warning "\`-dlopen self' is ignored for libtool libraries"
-
-      set dummy $rpath
-      shift
-      test "$#" -gt 1 && \
-       func_warning "ignoring multiple \`-rpath's for a libtool library"
-
-      install_libdir="$1"
-
-      oldlibs=
-      if test -z "$rpath"; then
-       if test "$build_libtool_libs" = yes; then
-         # Building a libtool convenience library.
-         # Some compilers have problems with a `.al' extension so
-         # convenience libraries should have the same extension an
-         # archive normally would.
-         oldlibs="$output_objdir/$libname.$libext $oldlibs"
-         build_libtool_libs=convenience
-         build_old_libs=yes
-       fi
-
-       test -n "$vinfo" && \
-         func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
-
-       test -n "$release" && \
-         func_warning "\`-release' is ignored for convenience libraries"
-      else
-
-       # Parse the version information argument.
-       save_ifs="$IFS"; IFS=':'
-       set dummy $vinfo 0 0 0
-       shift
-       IFS="$save_ifs"
-
-       test -n "$7" && \
-         func_fatal_help "too many parameters to \`-version-info'"
-
-       # convert absolute version numbers to libtool ages
-       # this retains compatibility with .la files and attempts
-       # to make the code below a bit more comprehensible
-
-       case $vinfo_number in
-       yes)
-         number_major="$1"
-         number_minor="$2"
-         number_revision="$3"
-         #
-         # There are really only two kinds -- those that
-         # use the current revision as the major version
-         # and those that subtract age and use age as
-         # a minor version.  But, then there is irix
-         # which has an extra 1 added just for fun
-         #
-         case $version_type in
-         # correct linux to gnu/linux during the next big refactor
-         darwin|linux|osf|windows|none)
-           func_arith $number_major + $number_minor
-           current=$func_arith_result
-           age="$number_minor"
-           revision="$number_revision"
-           ;;
-         freebsd-aout|freebsd-elf|qnx|sunos)
-           current="$number_major"
-           revision="$number_minor"
-           age="0"
-           ;;
-         irix|nonstopux)
-           func_arith $number_major + $number_minor
-           current=$func_arith_result
-           age="$number_minor"
-           revision="$number_minor"
-           lt_irix_increment=no
-           ;;
-         *)
-           func_fatal_configuration "$modename: unknown library version type \`$version_type'"
-           ;;
-         esac
-         ;;
-       no)
-         current="$1"
-         revision="$2"
-         age="$3"
-         ;;
-       esac
-
-       # Check that each of the things are valid numbers.
-       case $current in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         func_error "CURRENT \`$current' must be a nonnegative integer"
-         func_fatal_error "\`$vinfo' is not valid version information"
-         ;;
-       esac
-
-       case $revision in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         func_error "REVISION \`$revision' must be a nonnegative integer"
-         func_fatal_error "\`$vinfo' is not valid version information"
-         ;;
-       esac
-
-       case $age in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         func_error "AGE \`$age' must be a nonnegative integer"
-         func_fatal_error "\`$vinfo' is not valid version information"
-         ;;
-       esac
-
-       if test "$age" -gt "$current"; then
-         func_error "AGE \`$age' is greater than the current interface number \`$current'"
-         func_fatal_error "\`$vinfo' is not valid version information"
-       fi
-
-       # Calculate the version variables.
-       major=
-       versuffix=
-       verstring=
-       case $version_type in
-       none) ;;
-
-       darwin)
-         # Like Linux, but with the current version available in
-         # verstring for coding it into the library header
-         func_arith $current - $age
-         major=.$func_arith_result
-         versuffix="$major.$age.$revision"
-         # Darwin ld doesn't like 0 for these options...
-         func_arith $current + 1
-         minor_current=$func_arith_result
-         xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
-         verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
-         ;;
-
-       freebsd-aout)
-         major=".$current"
-         versuffix=".$current.$revision";
-         ;;
-
-       freebsd-elf)
-         major=".$current"
-         versuffix=".$current"
-         ;;
-
-       irix | nonstopux)
-         if test "X$lt_irix_increment" = "Xno"; then
-           func_arith $current - $age
-         else
-           func_arith $current - $age + 1
-         fi
-         major=$func_arith_result
-
-         case $version_type in
-           nonstopux) verstring_prefix=nonstopux ;;
-           *)         verstring_prefix=sgi ;;
-         esac
-         verstring="$verstring_prefix$major.$revision"
-
-         # Add in all the interfaces that we are compatible with.
-         loop=$revision
-         while test "$loop" -ne 0; do
-           func_arith $revision - $loop
-           iface=$func_arith_result
-           func_arith $loop - 1
-           loop=$func_arith_result
-           verstring="$verstring_prefix$major.$iface:$verstring"
-         done
-
-         # Before this point, $major must not contain `.'.
-         major=.$major
-         versuffix="$major.$revision"
-         ;;
-
-       linux) # correct to gnu/linux during the next big refactor
-         func_arith $current - $age
-         major=.$func_arith_result
-         versuffix="$major.$age.$revision"
-         ;;
-
-       osf)
-         func_arith $current - $age
-         major=.$func_arith_result
-         versuffix=".$current.$age.$revision"
-         verstring="$current.$age.$revision"
-
-         # Add in all the interfaces that we are compatible with.
-         loop=$age
-         while test "$loop" -ne 0; do
-           func_arith $current - $loop
-           iface=$func_arith_result
-           func_arith $loop - 1
-           loop=$func_arith_result
-           verstring="$verstring:${iface}.0"
-         done
-
-         # Make executables depend on our current version.
-         func_append verstring ":${current}.0"
-         ;;
-
-       qnx)
-         major=".$current"
-         versuffix=".$current"
-         ;;
-
-       sunos)
-         major=".$current"
-         versuffix=".$current.$revision"
-         ;;
-
-       windows)
-         # Use '-' rather than '.', since we only want one
-         # extension on DOS 8.3 filesystems.
-         func_arith $current - $age
-         major=$func_arith_result
-         versuffix="-$major"
-         ;;
-
-       *)
-         func_fatal_configuration "unknown library version type \`$version_type'"
-         ;;
-       esac
-
-       # Clear the version info if we defaulted, and they specified a release.
-       if test -z "$vinfo" && test -n "$release"; then
-         major=
-         case $version_type in
-         darwin)
-           # we can't check for "0.0" in archive_cmds due to quoting
-           # problems, so we reset it completely
-           verstring=
-           ;;
-         *)
-           verstring="0.0"
-           ;;
-         esac
-         if test "$need_version" = no; then
-           versuffix=
-         else
-           versuffix=".0.0"
-         fi
-       fi
-
-       # Remove version info from name if versioning should be avoided
-       if test "$avoid_version" = yes && test "$need_version" = no; then
-         major=
-         versuffix=
-         verstring=""
-       fi
-
-       # Check to see if the archive will have undefined symbols.
-       if test "$allow_undefined" = yes; then
-         if test "$allow_undefined_flag" = unsupported; then
-           func_warning "undefined symbols not allowed in $host shared libraries"
-           build_libtool_libs=no
-           build_old_libs=yes
-         fi
-       else
-         # Don't allow undefined symbols.
-         allow_undefined_flag="$no_undefined_flag"
-       fi
-
-      fi
-
-      func_generate_dlsyms "$libname" "$libname" "yes"
-      func_append libobjs " $symfileobj"
-      test "X$libobjs" = "X " && libobjs=
-
-      if test "$opt_mode" != relink; then
-       # Remove our outputs, but don't remove object files since they
-       # may have been created when compiling PIC objects.
-       removelist=
-       tempremovelist=`$ECHO "$output_objdir/*"`
-       for p in $tempremovelist; do
-         case $p in
-           *.$objext | *.gcno)
-              ;;
-           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
-              if test "X$precious_files_regex" != "X"; then
-                if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
-                then
-                  continue
-                fi
-              fi
-              func_append removelist " $p"
-              ;;
-           *) ;;
-         esac
-       done
-       test -n "$removelist" && \
-         func_show_eval "${RM}r \$removelist"
-      fi
-
-      # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-       func_append oldlibs " $output_objdir/$libname.$libext"
-
-       # Transform .lo files to .o files.
-       oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
-      fi
-
-      # Eliminate all temporary directories.
-      #for path in $notinst_path; do
-      #        lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
-      #        deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
-      #        dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
-      #done
-
-      if test -n "$xrpath"; then
-       # If the user specified any rpath flags, then add them.
-       temp_xrpath=
-       for libdir in $xrpath; do
-         func_replace_sysroot "$libdir"
-         func_append temp_xrpath " -R$func_replace_sysroot_result"
-         case "$finalize_rpath " in
-         *" $libdir "*) ;;
-         *) func_append finalize_rpath " $libdir" ;;
-         esac
-       done
-       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
-         dependency_libs="$temp_xrpath $dependency_libs"
-       fi
-      fi
-
-      # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles="$dlfiles"
-      dlfiles=
-      for lib in $old_dlfiles; do
-       case " $dlprefiles $dlfiles " in
-       *" $lib "*) ;;
-       *) func_append dlfiles " $lib" ;;
-       esac
-      done
-
-      # Make sure dlprefiles contains only unique files
-      old_dlprefiles="$dlprefiles"
-      dlprefiles=
-      for lib in $old_dlprefiles; do
-       case "$dlprefiles " in
-       *" $lib "*) ;;
-       *) func_append dlprefiles " $lib" ;;
-       esac
-      done
-
-      if test "$build_libtool_libs" = yes; then
-       if test -n "$rpath"; then
-         case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
-           # these systems don't actually have a c library (as such)!
-           ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
-           # Rhapsody C library is in the System framework
-           func_append deplibs " System.ltframework"
-           ;;
-         *-*-netbsd*)
-           # Don't link with libc until the a.out ld.so is fixed.
-           ;;
-         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-           # Do not include libc due to us having libc/libc_r.
-           ;;
-         *-*-sco3.2v5* | *-*-sco5v6*)
-           # Causes problems with __ctype
-           ;;
-         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
-           # Compiler inserts libc in the correct place for threads to work
-           ;;
-         *)
-           # Add libc to deplibs on all other systems if necessary.
-           if test "$build_libtool_need_lc" = "yes"; then
-             func_append deplibs " -lc"
-           fi
-           ;;
-         esac
-       fi
-
-       # Transform deplibs into only deplibs that can be linked in shared.
-       name_save=$name
-       libname_save=$libname
-       release_save=$release
-       versuffix_save=$versuffix
-       major_save=$major
-       # I'm not sure if I'm treating the release correctly.  I think
-       # release should show up in the -l (ie -lgmp5) so we don't want to
-       # add it in twice.  Is that correct?
-       release=""
-       versuffix=""
-       major=""
-       newdeplibs=
-       droppeddeps=no
-       case $deplibs_check_method in
-       pass_all)
-         # Don't check for shared/static.  Everything works.
-         # This might be a little naive.  We might want to check
-         # whether the library exists or not.  But this is on
-         # osf3 & osf4 and I'm not really sure... Just
-         # implementing what was already the behavior.
-         newdeplibs=$deplibs
-         ;;
-       test_compile)
-         # This code stresses the "libraries are programs" paradigm to its
-         # limits. Maybe even breaks it.  We compile a program, linking it
-         # against the deplibs as a proxy for the library.  Then we can check
-         # whether they linked in statically or dynamically with ldd.
-         $opt_dry_run || $RM conftest.c
-         cat > conftest.c <<EOF
-         int main() { return 0; }
-EOF
-         $opt_dry_run || $RM conftest
-         if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
-           ldd_output=`ldd conftest`
-           for i in $deplibs; do
-             case $i in
-             -l*)
-               func_stripname -l '' "$i"
-               name=$func_stripname_result
-               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-                 case " $predeps $postdeps " in
-                 *" $i "*)
-                   func_append newdeplibs " $i"
-                   i=""
-                   ;;
-                 esac
-               fi
-               if test -n "$i" ; then
-                 libname=`eval "\\$ECHO \"$libname_spec\""`
-                 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
-                 set dummy $deplib_matches; shift
-                 deplib_match=$1
-                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                   func_append newdeplibs " $i"
-                 else
-                   droppeddeps=yes
-                   echo
-                   $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-                   echo "*** I have the capability to make that library automatically link in when"
-                   echo "*** you link to this library.  But I can only do this if you have a"
-                   echo "*** shared version of the library, which I believe you do not have"
-                   echo "*** because a test_compile did reveal that the linker did not use it for"
-                   echo "*** its dynamic dependency list that programs get resolved with at runtime."
-                 fi
-               fi
-               ;;
-             *)
-               func_append newdeplibs " $i"
-               ;;
-             esac
-           done
-         else
-           # Error occurred in the first compile.  Let's try to salvage
-           # the situation: Compile a separate program for each library.
-           for i in $deplibs; do
-             case $i in
-             -l*)
-               func_stripname -l '' "$i"
-               name=$func_stripname_result
-               $opt_dry_run || $RM conftest
-               if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
-                 ldd_output=`ldd conftest`
-                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-                   case " $predeps $postdeps " in
-                   *" $i "*)
-                     func_append newdeplibs " $i"
-                     i=""
-                     ;;
-                   esac
-                 fi
-                 if test -n "$i" ; then
-                   libname=`eval "\\$ECHO \"$libname_spec\""`
-                   deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
-                   set dummy $deplib_matches; shift
-                   deplib_match=$1
-                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                     func_append newdeplibs " $i"
-                   else
-                     droppeddeps=yes
-                     echo
-                     $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-                     echo "*** I have the capability to make that library automatically link in when"
-                     echo "*** you link to this library.  But I can only do this if you have a"
-                     echo "*** shared version of the library, which you do not appear to have"
-                     echo "*** because a test_compile did reveal that the linker did not use this one"
-                     echo "*** as a dynamic dependency that programs can get resolved with at runtime."
-                   fi
-                 fi
-               else
-                 droppeddeps=yes
-                 echo
-                 $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
-                 echo "*** make it link in!  You will probably need to install it or some"
-                 echo "*** library that it depends on before this library will be fully"
-                 echo "*** functional.  Installing it before continuing would be even better."
-               fi
-               ;;
-             *)
-               func_append newdeplibs " $i"
-               ;;
-             esac
-           done
-         fi
-         ;;
-       file_magic*)
-         set dummy $deplibs_check_method; shift
-         file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
-         for a_deplib in $deplibs; do
-           case $a_deplib in
-           -l*)
-             func_stripname -l '' "$a_deplib"
-             name=$func_stripname_result
-             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-               case " $predeps $postdeps " in
-               *" $a_deplib "*)
-                 func_append newdeplibs " $a_deplib"
-                 a_deplib=""
-                 ;;
-               esac
-             fi
-             if test -n "$a_deplib" ; then
-               libname=`eval "\\$ECHO \"$libname_spec\""`
-               if test -n "$file_magic_glob"; then
-                 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
-               else
-                 libnameglob=$libname
-               fi
-               test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
-               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-                 if test "$want_nocaseglob" = yes; then
-                   shopt -s nocaseglob
-                   potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
-                   $nocaseglob
-                 else
-                   potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
-                 fi
-                 for potent_lib in $potential_libs; do
-                     # Follow soft links.
-                     if ls -lLd "$potent_lib" 2>/dev/null |
-                        $GREP " -> " >/dev/null; then
-                       continue
-                     fi
-                     # The statement above tries to avoid entering an
-                     # endless loop below, in case of cyclic links.
-                     # We might still enter an endless loop, since a link
-                     # loop can be closed while we follow links,
-                     # but so what?
-                     potlib="$potent_lib"
-                     while test -h "$potlib" 2>/dev/null; do
-                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
-                       case $potliblink in
-                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-                       *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
-                       esac
-                     done
-                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
-                        $SED -e 10q |
-                        $EGREP "$file_magic_regex" > /dev/null; then
-                       func_append newdeplibs " $a_deplib"
-                       a_deplib=""
-                       break 2
-                     fi
-                 done
-               done
-             fi
-             if test -n "$a_deplib" ; then
-               droppeddeps=yes
-               echo
-               $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
-               echo "*** I have the capability to make that library automatically link in when"
-               echo "*** you link to this library.  But I can only do this if you have a"
-               echo "*** shared version of the library, which you do not appear to have"
-               echo "*** because I did check the linker path looking for a file starting"
-               if test -z "$potlib" ; then
-                 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
-               else
-                 $ECHO "*** with $libname and none of the candidates passed a file format test"
-                 $ECHO "*** using a file magic. Last file checked: $potlib"
-               fi
-             fi
-             ;;
-           *)
-             # Add a -L argument.
-             func_append newdeplibs " $a_deplib"
-             ;;
-           esac
-         done # Gone through all deplibs.
-         ;;
-       match_pattern*)
-         set dummy $deplibs_check_method; shift
-         match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
-         for a_deplib in $deplibs; do
-           case $a_deplib in
-           -l*)
-             func_stripname -l '' "$a_deplib"
-             name=$func_stripname_result
-             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-               case " $predeps $postdeps " in
-               *" $a_deplib "*)
-                 func_append newdeplibs " $a_deplib"
-                 a_deplib=""
-                 ;;
-               esac
-             fi
-             if test -n "$a_deplib" ; then
-               libname=`eval "\\$ECHO \"$libname_spec\""`
-               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-                 for potent_lib in $potential_libs; do
-                   potlib="$potent_lib" # see symlink-check above in file_magic test
-                   if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
-                      $EGREP "$match_pattern_regex" > /dev/null; then
-                     func_append newdeplibs " $a_deplib"
-                     a_deplib=""
-                     break 2
-                   fi
-                 done
-               done
-             fi
-             if test -n "$a_deplib" ; then
-               droppeddeps=yes
-               echo
-               $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
-               echo "*** I have the capability to make that library automatically link in when"
-               echo "*** you link to this library.  But I can only do this if you have a"
-               echo "*** shared version of the library, which you do not appear to have"
-               echo "*** because I did check the linker path looking for a file starting"
-               if test -z "$potlib" ; then
-                 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
-               else
-                 $ECHO "*** with $libname and none of the candidates passed a file format test"
-                 $ECHO "*** using a regex pattern. Last file checked: $potlib"
-               fi
-             fi
-             ;;
-           *)
-             # Add a -L argument.
-             func_append newdeplibs " $a_deplib"
-             ;;
-           esac
-         done # Gone through all deplibs.
-         ;;
-       none | unknown | *)
-         newdeplibs=""
-         tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
-         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-           for i in $predeps $postdeps ; do
-             # can't use Xsed below, because $i might contain '/'
-             tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
-           done
-         fi
-         case $tmp_deplibs in
-         *[!\  \ ]*)
-           echo
-           if test "X$deplibs_check_method" = "Xnone"; then
-             echo "*** Warning: inter-library dependencies are not supported in this platform."
-           else
-             echo "*** Warning: inter-library dependencies are not known to be supported."
-           fi
-           echo "*** All declared inter-library dependencies are being dropped."
-           droppeddeps=yes
-           ;;
-         esac
-         ;;
-       esac
-       versuffix=$versuffix_save
-       major=$major_save
-       release=$release_save
-       libname=$libname_save
-       name=$name_save
-
-       case $host in
-       *-*-rhapsody* | *-*-darwin1.[012])
-         # On Rhapsody replace the C library with the System framework
-         newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
-         ;;
-       esac
-
-       if test "$droppeddeps" = yes; then
-         if test "$module" = yes; then
-           echo
-           echo "*** Warning: libtool could not satisfy all declared inter-library"
-           $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
-           echo "*** a static module, that should work as long as the dlopening"
-           echo "*** application is linked with the -dlopen flag."
-           if test -z "$global_symbol_pipe"; then
-             echo
-             echo "*** However, this would only work if libtool was able to extract symbol"
-             echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-             echo "*** not find such a program.  So, this module is probably useless."
-             echo "*** \`nm' from GNU binutils and a full rebuild may help."
-           fi
-           if test "$build_old_libs" = no; then
-             oldlibs="$output_objdir/$libname.$libext"
-             build_libtool_libs=module
-             build_old_libs=yes
-           else
-             build_libtool_libs=no
-           fi
-         else
-           echo "*** The inter-library dependencies that have been dropped here will be"
-           echo "*** automatically added whenever a program is linked with this library"
-           echo "*** or is declared to -dlopen it."
-
-           if test "$allow_undefined" = no; then
-             echo
-             echo "*** Since this library must not contain undefined symbols,"
-             echo "*** because either the platform does not support them or"
-             echo "*** it was explicitly requested with -no-undefined,"
-             echo "*** libtool will only create a static version of it."
-             if test "$build_old_libs" = no; then
-               oldlibs="$output_objdir/$libname.$libext"
-               build_libtool_libs=module
-               build_old_libs=yes
-             else
-               build_libtool_libs=no
-             fi
-           fi
-         fi
-       fi
-       # Done checking deplibs!
-       deplibs=$newdeplibs
-      fi
-      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
-      case $host in
-       *-*-darwin*)
-         newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-         new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-         deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-         ;;
-      esac
-
-      # move library search paths that coincide with paths to not yet
-      # installed libraries to the beginning of the library search list
-      new_libs=
-      for path in $notinst_path; do
-       case " $new_libs " in
-       *" -L$path/$objdir "*) ;;
-       *)
-         case " $deplibs " in
-         *" -L$path/$objdir "*)
-           func_append new_libs " -L$path/$objdir" ;;
-         esac
-         ;;
-       esac
-      done
-      for deplib in $deplibs; do
-       case $deplib in
-       -L*)
-         case " $new_libs " in
-         *" $deplib "*) ;;
-         *) func_append new_libs " $deplib" ;;
-         esac
-         ;;
-       *) func_append new_libs " $deplib" ;;
-       esac
-      done
-      deplibs="$new_libs"
-
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
-
-      # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-       # Remove ${wl} instances when linking with ld.
-       # FIXME: should test the right _cmds variable.
-       case $archive_cmds in
-         *\$LD\ *) wl= ;;
-        esac
-       if test "$hardcode_into_libs" = yes; then
-         # Hardcode the library paths
-         hardcode_libdirs=
-         dep_rpath=
-         rpath="$finalize_rpath"
-         test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
-         for libdir in $rpath; do
-           if test -n "$hardcode_libdir_flag_spec"; then
-             if test -n "$hardcode_libdir_separator"; then
-               func_replace_sysroot "$libdir"
-               libdir=$func_replace_sysroot_result
-               if test -z "$hardcode_libdirs"; then
-                 hardcode_libdirs="$libdir"
-               else
-                 # Just accumulate the unique libdirs.
-                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-                   ;;
-                 *)
-                   func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
-                   ;;
-                 esac
-               fi
-             else
-               eval flag=\"$hardcode_libdir_flag_spec\"
-               func_append dep_rpath " $flag"
-             fi
-           elif test -n "$runpath_var"; then
-             case "$perm_rpath " in
-             *" $libdir "*) ;;
-             *) func_append perm_rpath " $libdir" ;;
-             esac
-           fi
-         done
-         # Substitute the hardcoded libdirs into the rpath.
-         if test -n "$hardcode_libdir_separator" &&
-            test -n "$hardcode_libdirs"; then
-           libdir="$hardcode_libdirs"
-           eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
-         fi
-         if test -n "$runpath_var" && test -n "$perm_rpath"; then
-           # We should set the runpath_var.
-           rpath=
-           for dir in $perm_rpath; do
-             func_append rpath "$dir:"
-           done
-           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
-         fi
-         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
-       fi
-
-       shlibpath="$finalize_shlibpath"
-       test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
-       if test -n "$shlibpath"; then
-         eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
-       fi
-
-       # Get the real and link names of the library.
-       eval shared_ext=\"$shrext_cmds\"
-       eval library_names=\"$library_names_spec\"
-       set dummy $library_names
-       shift
-       realname="$1"
-       shift
-
-       if test -n "$soname_spec"; then
-         eval soname=\"$soname_spec\"
-       else
-         soname="$realname"
-       fi
-       if test -z "$dlname"; then
-         dlname=$soname
-       fi
-
-       lib="$output_objdir/$realname"
-       linknames=
-       for link
-       do
-         func_append linknames " $link"
-       done
-
-       # Use standard objects if they are pic
-       test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
-       test "X$libobjs" = "X " && libobjs=
-
-       delfiles=
-       if test -n "$export_symbols" && test -n "$include_expsyms"; then
-         $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
-         export_symbols="$output_objdir/$libname.uexp"
-         func_append delfiles " $export_symbols"
-       fi
-
-       orig_export_symbols=
-       case $host_os in
-       cygwin* | mingw* | cegcc*)
-         if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
-           # exporting using user supplied symfile
-           if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
-             # and it's NOT already a .def file. Must figure out
-             # which of the given symbols are data symbols and tag
-             # them as such. So, trigger use of export_symbols_cmds.
-             # export_symbols gets reassigned inside the "prepare
-             # the list of exported symbols" if statement, so the
-             # include_expsyms logic still works.
-             orig_export_symbols="$export_symbols"
-             export_symbols=
-             always_export_symbols=yes
-           fi
-         fi
-         ;;
-       esac
-
-       # Prepare the list of exported symbols
-       if test -z "$export_symbols"; then
-         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-           func_verbose "generating symbol list for \`$libname.la'"
-           export_symbols="$output_objdir/$libname.exp"
-           $opt_dry_run || $RM $export_symbols
-           cmds=$export_symbols_cmds
-           save_ifs="$IFS"; IFS='~'
-           for cmd1 in $cmds; do
-             IFS="$save_ifs"
-             # Take the normal branch if the nm_file_list_spec branch
-             # doesn't work or if tool conversion is not needed.
-             case $nm_file_list_spec~$to_tool_file_cmd in
-               *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
-                 try_normal_branch=yes
-                 eval cmd=\"$cmd1\"
-                 func_len " $cmd"
-                 len=$func_len_result
-                 ;;
-               *)
-                 try_normal_branch=no
-                 ;;
-             esac
-             if test "$try_normal_branch" = yes \
-                && { test "$len" -lt "$max_cmd_len" \
-                     || test "$max_cmd_len" -le -1; }
-             then
-               func_show_eval "$cmd" 'exit $?'
-               skipped_export=false
-             elif test -n "$nm_file_list_spec"; then
-               func_basename "$output"
-               output_la=$func_basename_result
-               save_libobjs=$libobjs
-               save_output=$output
-               output=${output_objdir}/${output_la}.nm
-               func_to_tool_file "$output"
-               libobjs=$nm_file_list_spec$func_to_tool_file_result
-               func_append delfiles " $output"
-               func_verbose "creating $NM input file list: $output"
-               for obj in $save_libobjs; do
-                 func_to_tool_file "$obj"
-                 $ECHO "$func_to_tool_file_result"
-               done > "$output"
-               eval cmd=\"$cmd1\"
-               func_show_eval "$cmd" 'exit $?'
-               output=$save_output
-               libobjs=$save_libobjs
-               skipped_export=false
-             else
-               # The command line is too long to execute in one step.
-               func_verbose "using reloadable object file for export list..."
-               skipped_export=:
-               # Break out early, otherwise skipped_export may be
-               # set to false by a later but shorter cmd.
-               break
-             fi
-           done
-           IFS="$save_ifs"
-           if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
-             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
-           fi
-         fi
-       fi
-
-       if test -n "$export_symbols" && test -n "$include_expsyms"; then
-         tmp_export_symbols="$export_symbols"
-         test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
-         $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
-       fi
-
-       if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
-         # The given exports_symbols file has to be filtered, so filter it.
-         func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
-         # FIXME: $output_objdir/$libname.filter potentially contains lots of
-         # 's' commands which not all seds can handle. GNU sed should be fine
-         # though. Also, the filter scales superlinearly with the number of
-         # global variables. join(1) would be nice here, but unfortunately
-         # isn't a blessed tool.
-         $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
-         func_append delfiles " $export_symbols $output_objdir/$libname.filter"
-         export_symbols=$output_objdir/$libname.def
-         $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
-       fi
-
-       tmp_deplibs=
-       for test_deplib in $deplibs; do
-         case " $convenience " in
-         *" $test_deplib "*) ;;
-         *)
-           func_append tmp_deplibs " $test_deplib"
-           ;;
-         esac
-       done
-       deplibs="$tmp_deplibs"
-
-       if test -n "$convenience"; then
-         if test -n "$whole_archive_flag_spec" &&
-           test "$compiler_needs_object" = yes &&
-           test -z "$libobjs"; then
-           # extract the archives, so we have objects to list.
-           # TODO: could optimize this to just extract one archive.
-           whole_archive_flag_spec=
-         fi
-         if test -n "$whole_archive_flag_spec"; then
-           save_libobjs=$libobjs
-           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-           test "X$libobjs" = "X " && libobjs=
-         else
-           gentop="$output_objdir/${outputname}x"
-           func_append generated " $gentop"
-
-           func_extract_archives $gentop $convenience
-           func_append libobjs " $func_extract_archives_result"
-           test "X$libobjs" = "X " && libobjs=
-         fi
-       fi
-
-       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
-         eval flag=\"$thread_safe_flag_spec\"
-         func_append linker_flags " $flag"
-       fi
-
-       # Make a backup of the uninstalled library when relinking
-       if test "$opt_mode" = relink; then
-         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
-       fi
-
-       # Do each of the archive commands.
-       if test "$module" = yes && test -n "$module_cmds" ; then
-         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-           eval test_cmds=\"$module_expsym_cmds\"
-           cmds=$module_expsym_cmds
-         else
-           eval test_cmds=\"$module_cmds\"
-           cmds=$module_cmds
-         fi
-       else
-         if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-           eval test_cmds=\"$archive_expsym_cmds\"
-           cmds=$archive_expsym_cmds
-         else
-           eval test_cmds=\"$archive_cmds\"
-           cmds=$archive_cmds
-         fi
-       fi
-
-       if test "X$skipped_export" != "X:" &&
-          func_len " $test_cmds" &&
-          len=$func_len_result &&
-          test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-         :
-       else
-         # The command line is too long to link in one step, link piecewise
-         # or, if using GNU ld and skipped_export is not :, use a linker
-         # script.
-
-         # Save the value of $output and $libobjs because we want to
-         # use them later.  If we have whole_archive_flag_spec, we
-         # want to use save_libobjs as it was before
-         # whole_archive_flag_spec was expanded, because we can't
-         # assume the linker understands whole_archive_flag_spec.
-         # This may have to be revisited, in case too many
-         # convenience libraries get linked in and end up exceeding
-         # the spec.
-         if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
-           save_libobjs=$libobjs
-         fi
-         save_output=$output
-         func_basename "$output"
-         output_la=$func_basename_result
-
-         # Clear the reloadable object creation command queue and
-         # initialize k to one.
-         test_cmds=
-         concat_cmds=
-         objlist=
-         last_robj=
-         k=1
-
-         if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
-           output=${output_objdir}/${output_la}.lnkscript
-           func_verbose "creating GNU ld script: $output"
-           echo 'INPUT (' > $output
-           for obj in $save_libobjs
-           do
-             func_to_tool_file "$obj"
-             $ECHO "$func_to_tool_file_result" >> $output
-           done
-           echo ')' >> $output
-           func_append delfiles " $output"
-           func_to_tool_file "$output"
-           output=$func_to_tool_file_result
-         elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
-           output=${output_objdir}/${output_la}.lnk
-           func_verbose "creating linker input file list: $output"
-           : > $output
-           set x $save_libobjs
-           shift
-           firstobj=
-           if test "$compiler_needs_object" = yes; then
-             firstobj="$1 "
-             shift
-           fi
-           for obj
-           do
-             func_to_tool_file "$obj"
-             $ECHO "$func_to_tool_file_result" >> $output
-           done
-           func_append delfiles " $output"
-           func_to_tool_file "$output"
-           output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
-         else
-           if test -n "$save_libobjs"; then
-             func_verbose "creating reloadable object files..."
-             output=$output_objdir/$output_la-${k}.$objext
-             eval test_cmds=\"$reload_cmds\"
-             func_len " $test_cmds"
-             len0=$func_len_result
-             len=$len0
-
-             # Loop over the list of objects to be linked.
-             for obj in $save_libobjs
-             do
-               func_len " $obj"
-               func_arith $len + $func_len_result
-               len=$func_arith_result
-               if test "X$objlist" = X ||
-                  test "$len" -lt "$max_cmd_len"; then
-                 func_append objlist " $obj"
-               else
-                 # The command $test_cmds is almost too long, add a
-                 # command to the queue.
-                 if test "$k" -eq 1 ; then
-                   # The first file doesn't have a previous command to add.
-                   reload_objs=$objlist
-                   eval concat_cmds=\"$reload_cmds\"
-                 else
-                   # All subsequent reloadable object files will link in
-                   # the last one created.
-                   reload_objs="$objlist $last_robj"
-                   eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
-                 fi
-                 last_robj=$output_objdir/$output_la-${k}.$objext
-                 func_arith $k + 1
-                 k=$func_arith_result
-                 output=$output_objdir/$output_la-${k}.$objext
-                 objlist=" $obj"
-                 func_len " $last_robj"
-                 func_arith $len0 + $func_len_result
-                 len=$func_arith_result
-               fi
-             done
-             # Handle the remaining objects by creating one last
-             # reloadable object file.  All subsequent reloadable object
-             # files will link in the last one created.
-             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             reload_objs="$objlist $last_robj"
-             eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
-             if test -n "$last_robj"; then
-               eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
-             fi
-             func_append delfiles " $output"
-
-           else
-             output=
-           fi
-
-           if ${skipped_export-false}; then
-             func_verbose "generating symbol list for \`$libname.la'"
-             export_symbols="$output_objdir/$libname.exp"
-             $opt_dry_run || $RM $export_symbols
-             libobjs=$output
-             # Append the command to create the export file.
-             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
-             if test -n "$last_robj"; then
-               eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
-             fi
-           fi
-
-           test -n "$save_libobjs" &&
-             func_verbose "creating a temporary reloadable object file: $output"
-
-           # Loop through the commands generated above and execute them.
-           save_ifs="$IFS"; IFS='~'
-           for cmd in $concat_cmds; do
-             IFS="$save_ifs"
-             $opt_silent || {
-                 func_quote_for_expand "$cmd"
-                 eval "func_echo $func_quote_for_expand_result"
-             }
-             $opt_dry_run || eval "$cmd" || {
-               lt_exit=$?
-
-               # Restore the uninstalled library and exit
-               if test "$opt_mode" = relink; then
-                 ( cd "$output_objdir" && \
-                   $RM "${realname}T" && \
-                   $MV "${realname}U" "$realname" )
-               fi
-
-               exit $lt_exit
-             }
-           done
-           IFS="$save_ifs"
-
-           if test -n "$export_symbols_regex" && ${skipped_export-false}; then
-             func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-             func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
-           fi
-         fi
-
-          if ${skipped_export-false}; then
-           if test -n "$export_symbols" && test -n "$include_expsyms"; then
-             tmp_export_symbols="$export_symbols"
-             test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
-             $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
-           fi
-
-           if test -n "$orig_export_symbols"; then
-             # The given exports_symbols file has to be filtered, so filter it.
-             func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
-             # FIXME: $output_objdir/$libname.filter potentially contains lots of
-             # 's' commands which not all seds can handle. GNU sed should be fine
-             # though. Also, the filter scales superlinearly with the number of
-             # global variables. join(1) would be nice here, but unfortunately
-             # isn't a blessed tool.
-             $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
-             func_append delfiles " $export_symbols $output_objdir/$libname.filter"
-             export_symbols=$output_objdir/$libname.def
-             $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
-           fi
-         fi
-
-         libobjs=$output
-         # Restore the value of output.
-         output=$save_output
-
-         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
-           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-           test "X$libobjs" = "X " && libobjs=
-         fi
-         # Expand the library linking commands again to reset the
-         # value of $libobjs for piecewise linking.
-
-         # Do each of the archive commands.
-         if test "$module" = yes && test -n "$module_cmds" ; then
-           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-             cmds=$module_expsym_cmds
-           else
-             cmds=$module_cmds
-           fi
-         else
-           if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-             cmds=$archive_expsym_cmds
-           else
-             cmds=$archive_cmds
-           fi
-         fi
-       fi
-
-       if test -n "$delfiles"; then
-         # Append the command to remove temporary files to $cmds.
-         eval cmds=\"\$cmds~\$RM $delfiles\"
-       fi
-
-       # Add any objects from preloaded convenience libraries
-       if test -n "$dlprefiles"; then
-         gentop="$output_objdir/${outputname}x"
-         func_append generated " $gentop"
-
-         func_extract_archives $gentop $dlprefiles
-         func_append libobjs " $func_extract_archives_result"
-         test "X$libobjs" = "X " && libobjs=
-       fi
-
-       save_ifs="$IFS"; IFS='~'
-       for cmd in $cmds; do
-         IFS="$save_ifs"
-         eval cmd=\"$cmd\"
-         $opt_silent || {
-           func_quote_for_expand "$cmd"
-           eval "func_echo $func_quote_for_expand_result"
-         }
-         $opt_dry_run || eval "$cmd" || {
-           lt_exit=$?
-
-           # Restore the uninstalled library and exit
-           if test "$opt_mode" = relink; then
-             ( cd "$output_objdir" && \
-               $RM "${realname}T" && \
-               $MV "${realname}U" "$realname" )
-           fi
-
-           exit $lt_exit
-         }
-       done
-       IFS="$save_ifs"
-
-       # Restore the uninstalled library and exit
-       if test "$opt_mode" = relink; then
-         $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
-
-         if test -n "$convenience"; then
-           if test -z "$whole_archive_flag_spec"; then
-             func_show_eval '${RM}r "$gentop"'
-           fi
-         fi
-
-         exit $EXIT_SUCCESS
-       fi
-
-       # Create links to the real library.
-       for linkname in $linknames; do
-         if test "$realname" != "$linkname"; then
-           func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
-         fi
-       done
-
-       # If -module or -export-dynamic was specified, set the dlname.
-       if test "$module" = yes || test "$export_dynamic" = yes; then
-         # On all known operating systems, these are identical.
-         dlname="$soname"
-       fi
-      fi
-      ;;
-
-    obj)
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       func_warning "\`-dlopen' is ignored for objects"
-      fi
-
-      case " $deplibs" in
-      *\ -l* | *\ -L*)
-       func_warning "\`-l' and \`-L' are ignored for objects" ;;
-      esac
-
-      test -n "$rpath" && \
-       func_warning "\`-rpath' is ignored for objects"
-
-      test -n "$xrpath" && \
-       func_warning "\`-R' is ignored for objects"
-
-      test -n "$vinfo" && \
-       func_warning "\`-version-info' is ignored for objects"
-
-      test -n "$release" && \
-       func_warning "\`-release' is ignored for objects"
-
-      case $output in
-      *.lo)
-       test -n "$objs$old_deplibs" && \
-         func_fatal_error "cannot build library object \`$output' from non-libtool objects"
-
-       libobj=$output
-       func_lo2o "$libobj"
-       obj=$func_lo2o_result
-       ;;
-      *)
-       libobj=
-       obj="$output"
-       ;;
-      esac
-
-      # Delete the old objects.
-      $opt_dry_run || $RM $obj $libobj
-
-      # Objects from convenience libraries.  This assumes
-      # single-version convenience libraries.  Whenever we create
-      # different ones for PIC/non-PIC, this we'll have to duplicate
-      # the extraction.
-      reload_conv_objs=
-      gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec and hope we can get by with
-      # turning comma into space..
-      wl=
-
-      if test -n "$convenience"; then
-       if test -n "$whole_archive_flag_spec"; then
-         eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-         reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
-       else
-         gentop="$output_objdir/${obj}x"
-         func_append generated " $gentop"
-
-         func_extract_archives $gentop $convenience
-         reload_conv_objs="$reload_objs $func_extract_archives_result"
-       fi
-      fi
-
-      # If we're not building shared, we need to use non_pic_objs
-      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
-
-      # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
-      output="$obj"
-      func_execute_cmds "$reload_cmds" 'exit $?'
-
-      # Exit if we aren't doing a library object file.
-      if test -z "$libobj"; then
-       if test -n "$gentop"; then
-         func_show_eval '${RM}r "$gentop"'
-       fi
-
-       exit $EXIT_SUCCESS
-      fi
-
-      if test "$build_libtool_libs" != yes; then
-       if test -n "$gentop"; then
-         func_show_eval '${RM}r "$gentop"'
-       fi
-
-       # Create an invalid libtool object if no PIC, so that we don't
-       # accidentally link it into a program.
-       # $show "echo timestamp > $libobj"
-       # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
-       exit $EXIT_SUCCESS
-      fi
-
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
-       # Only do commands if we really have different PIC objects.
-       reload_objs="$libobjs $reload_conv_objs"
-       output="$libobj"
-       func_execute_cmds "$reload_cmds" 'exit $?'
-      fi
-
-      if test -n "$gentop"; then
-       func_show_eval '${RM}r "$gentop"'
-      fi
-
-      exit $EXIT_SUCCESS
-      ;;
-
-    prog)
-      case $host in
-       *cygwin*) func_stripname '' '.exe' "$output"
-                 output=$func_stripname_result.exe;;
-      esac
-      test -n "$vinfo" && \
-       func_warning "\`-version-info' is ignored for programs"
-
-      test -n "$release" && \
-       func_warning "\`-release' is ignored for programs"
-
-      test "$preload" = yes \
-        && test "$dlopen_support" = unknown \
-       && test "$dlopen_self" = unknown \
-       && test "$dlopen_self_static" = unknown && \
-         func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
-
-      case $host in
-      *-*-rhapsody* | *-*-darwin1.[012])
-       # On Rhapsody replace the C library is the System framework
-       compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
-       finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
-       ;;
-      esac
-
-      case $host in
-      *-*-darwin*)
-       # Don't allow lazy linking, it breaks C++ global constructors
-       # But is supposedly fixed on 10.4 or later (yay!).
-       if test "$tagname" = CXX ; then
-         case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
-           10.[0123])
-             func_append compile_command " ${wl}-bind_at_load"
-             func_append finalize_command " ${wl}-bind_at_load"
-           ;;
-         esac
-       fi
-       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
-       compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-       finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-       ;;
-      esac
-
-
-      # move library search paths that coincide with paths to not yet
-      # installed libraries to the beginning of the library search list
-      new_libs=
-      for path in $notinst_path; do
-       case " $new_libs " in
-       *" -L$path/$objdir "*) ;;
-       *)
-         case " $compile_deplibs " in
-         *" -L$path/$objdir "*)
-           func_append new_libs " -L$path/$objdir" ;;
-         esac
-         ;;
-       esac
-      done
-      for deplib in $compile_deplibs; do
-       case $deplib in
-       -L*)
-         case " $new_libs " in
-         *" $deplib "*) ;;
-         *) func_append new_libs " $deplib" ;;
-         esac
-         ;;
-       *) func_append new_libs " $deplib" ;;
-       esac
-      done
-      compile_deplibs="$new_libs"
-
-
-      func_append compile_command " $compile_deplibs"
-      func_append finalize_command " $finalize_deplibs"
-
-      if test -n "$rpath$xrpath"; then
-       # If the user specified any rpath flags, then add them.
-       for libdir in $rpath $xrpath; do
-         # This is the magic to use -rpath.
-         case "$finalize_rpath " in
-         *" $libdir "*) ;;
-         *) func_append finalize_rpath " $libdir" ;;
-         esac
-       done
-      fi
-
-      # Now hardcode the library paths
-      rpath=
-      hardcode_libdirs=
-      for libdir in $compile_rpath $finalize_rpath; do
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
-           else
-             # Just accumulate the unique libdirs.
-             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-               ;;
-             *)
-               func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
-               ;;
-             esac
-           fi
-         else
-           eval flag=\"$hardcode_libdir_flag_spec\"
-           func_append rpath " $flag"
-         fi
-       elif test -n "$runpath_var"; then
-         case "$perm_rpath " in
-         *" $libdir "*) ;;
-         *) func_append perm_rpath " $libdir" ;;
-         esac
-       fi
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-         testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
-         case :$dllsearchpath: in
-         *":$libdir:"*) ;;
-         ::) dllsearchpath=$libdir;;
-         *) func_append dllsearchpath ":$libdir";;
-         esac
-         case :$dllsearchpath: in
-         *":$testbindir:"*) ;;
-         ::) dllsearchpath=$testbindir;;
-         *) func_append dllsearchpath ":$testbindir";;
-         esac
-         ;;
-       esac
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-        test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
-       eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      compile_rpath="$rpath"
-
-      rpath=
-      hardcode_libdirs=
-      for libdir in $finalize_rpath; do
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
-           else
-             # Just accumulate the unique libdirs.
-             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-               ;;
-             *)
-               func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
-               ;;
-             esac
-           fi
-         else
-           eval flag=\"$hardcode_libdir_flag_spec\"
-           func_append rpath " $flag"
-         fi
-       elif test -n "$runpath_var"; then
-         case "$finalize_perm_rpath " in
-         *" $libdir "*) ;;
-         *) func_append finalize_perm_rpath " $libdir" ;;
-         esac
-       fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-        test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
-       eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      finalize_rpath="$rpath"
-
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-       # Transform all the library objects into standard objects.
-       compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
-       finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
-      fi
-
-      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
-
-      # template prelinking step
-      if test -n "$prelink_cmds"; then
-       func_execute_cmds "$prelink_cmds" 'exit $?'
-      fi
-
-      wrappers_required=yes
-      case $host in
-      *cegcc* | *mingw32ce*)
-        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
-        wrappers_required=no
-        ;;
-      *cygwin* | *mingw* )
-        if test "$build_libtool_libs" != yes; then
-          wrappers_required=no
-        fi
-        ;;
-      *)
-        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-          wrappers_required=no
-        fi
-        ;;
-      esac
-      if test "$wrappers_required" = no; then
-       # Replace the output file specification.
-       compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
-       link_command="$compile_command$compile_rpath"
-
-       # We have no uninstalled library dependencies, so finalize right now.
-       exit_status=0
-       func_show_eval "$link_command" 'exit_status=$?'
-
-       if test -n "$postlink_cmds"; then
-         func_to_tool_file "$output"
-         postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
-         func_execute_cmds "$postlink_cmds" 'exit $?'
-       fi
-
-       # Delete the generated files.
-       if test -f "$output_objdir/${outputname}S.${objext}"; then
-         func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
-       fi
-
-       exit $exit_status
-      fi
-
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
-       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-       finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
-      fi
-
-      compile_var=
-      finalize_var=
-      if test -n "$runpath_var"; then
-       if test -n "$perm_rpath"; then
-         # We should set the runpath_var.
-         rpath=
-         for dir in $perm_rpath; do
-           func_append rpath "$dir:"
-         done
-         compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
-       fi
-       if test -n "$finalize_perm_rpath"; then
-         # We should set the runpath_var.
-         rpath=
-         for dir in $finalize_perm_rpath; do
-           func_append rpath "$dir:"
-         done
-         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
-       fi
-      fi
-
-      if test "$no_install" = yes; then
-       # We don't need to create a wrapper script.
-       link_command="$compile_var$compile_command$compile_rpath"
-       # Replace the output file specification.
-       link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
-       # Delete the old output file.
-       $opt_dry_run || $RM $output
-       # Link the executable and exit
-       func_show_eval "$link_command" 'exit $?'
-
-       if test -n "$postlink_cmds"; then
-         func_to_tool_file "$output"
-         postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
-         func_execute_cmds "$postlink_cmds" 'exit $?'
-       fi
-
-       exit $EXIT_SUCCESS
-      fi
-
-      if test "$hardcode_action" = relink; then
-       # Fast installation is not supported
-       link_command="$compile_var$compile_command$compile_rpath"
-       relink_command="$finalize_var$finalize_command$finalize_rpath"
-
-       func_warning "this platform does not like uninstalled shared libraries"
-       func_warning "\`$output' will be relinked during installation"
-      else
-       if test "$fast_install" != no; then
-         link_command="$finalize_var$compile_command$finalize_rpath"
-         if test "$fast_install" = yes; then
-           relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
-         else
-           # fast_install is set to needless
-           relink_command=
-         fi
-       else
-         link_command="$compile_var$compile_command$compile_rpath"
-         relink_command="$finalize_var$finalize_command$finalize_rpath"
-       fi
-      fi
-
-      # Replace the output file specification.
-      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
-      # Delete the old output files.
-      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
-      func_show_eval "$link_command" 'exit $?'
-
-      if test -n "$postlink_cmds"; then
-       func_to_tool_file "$output_objdir/$outputname"
-       postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
-       func_execute_cmds "$postlink_cmds" 'exit $?'
-      fi
-
-      # Now create the wrapper script.
-      func_verbose "creating $output"
-
-      # Quote the relink command for shipping.
-      if test -n "$relink_command"; then
-       # Preserve any variables that may affect compiler behavior
-       for var in $variables_saved_for_relink; do
-         if eval test -z \"\${$var+set}\"; then
-           relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
-         elif eval var_value=\$$var; test -z "$var_value"; then
-           relink_command="$var=; export $var; $relink_command"
-         else
-           func_quote_for_eval "$var_value"
-           relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
-         fi
-       done
-       relink_command="(cd `pwd`; $relink_command)"
-       relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
-      fi
-
-      # Only actually do things if not in dry run mode.
-      $opt_dry_run || {
-       # win32 will think the script is a binary if it has
-       # a .exe suffix, so we strip it off here.
-       case $output in
-         *.exe) func_stripname '' '.exe' "$output"
-                output=$func_stripname_result ;;
-       esac
-       # test for cygwin because mv fails w/o .exe extensions
-       case $host in
-         *cygwin*)
-           exeext=.exe
-           func_stripname '' '.exe' "$outputname"
-           outputname=$func_stripname_result ;;
-         *) exeext= ;;
-       esac
-       case $host in
-         *cygwin* | *mingw* )
-           func_dirname_and_basename "$output" "" "."
-           output_name=$func_basename_result
-           output_path=$func_dirname_result
-           cwrappersource="$output_path/$objdir/lt-$output_name.c"
-           cwrapper="$output_path/$output_name.exe"
-           $RM $cwrappersource $cwrapper
-           trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
-           func_emit_cwrapperexe_src > $cwrappersource
-
-           # The wrapper executable is built using the $host compiler,
-           # because it contains $host paths and files. If cross-
-           # compiling, it, like the target executable, must be
-           # executed on the $host or under an emulation environment.
-           $opt_dry_run || {
-             $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
-             $STRIP $cwrapper
-           }
-
-           # Now, create the wrapper script for func_source use:
-           func_ltwrapper_scriptname $cwrapper
-           $RM $func_ltwrapper_scriptname_result
-           trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
-           $opt_dry_run || {
-             # note: this script will not be executed, so do not chmod.
-             if test "x$build" = "x$host" ; then
-               $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
-             else
-               func_emit_wrapper no > $func_ltwrapper_scriptname_result
-             fi
-           }
-         ;;
-         * )
-           $RM $output
-           trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
-
-           func_emit_wrapper no > $output
-           chmod +x $output
-         ;;
-       esac
-      }
-      exit $EXIT_SUCCESS
-      ;;
-    esac
-
-    # See if we need to build an old-fashioned archive.
-    for oldlib in $oldlibs; do
-
-      if test "$build_libtool_libs" = convenience; then
-       oldobjs="$libobjs_save $symfileobj"
-       addlibs="$convenience"
-       build_libtool_libs=no
-      else
-       if test "$build_libtool_libs" = module; then
-         oldobjs="$libobjs_save"
-         build_libtool_libs=no
-       else
-         oldobjs="$old_deplibs $non_pic_objects"
-         if test "$preload" = yes && test -f "$symfileobj"; then
-           func_append oldobjs " $symfileobj"
-         fi
-       fi
-       addlibs="$old_convenience"
-      fi
-
-      if test -n "$addlibs"; then
-       gentop="$output_objdir/${outputname}x"
-       func_append generated " $gentop"
-
-       func_extract_archives $gentop $addlibs
-       func_append oldobjs " $func_extract_archives_result"
-      fi
-
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-       cmds=$old_archive_from_new_cmds
-      else
-
-       # Add any objects from preloaded convenience libraries
-       if test -n "$dlprefiles"; then
-         gentop="$output_objdir/${outputname}x"
-         func_append generated " $gentop"
-
-         func_extract_archives $gentop $dlprefiles
-         func_append oldobjs " $func_extract_archives_result"
-       fi
-
-       # POSIX demands no paths to be encoded in archives.  We have
-       # to avoid creating archives with duplicate basenames if we
-       # might have to extract them afterwards, e.g., when creating a
-       # static archive out of a convenience library, or when linking
-       # the entirety of a libtool archive into another (currently
-       # not supported by libtool).
-       if (for obj in $oldobjs
-           do
-             func_basename "$obj"
-             $ECHO "$func_basename_result"
-           done | sort | sort -uc >/dev/null 2>&1); then
-         :
-       else
-         echo "copying selected object files to avoid basename conflicts..."
-         gentop="$output_objdir/${outputname}x"
-         func_append generated " $gentop"
-         func_mkdir_p "$gentop"
-         save_oldobjs=$oldobjs
-         oldobjs=
-         counter=1
-         for obj in $save_oldobjs
-         do
-           func_basename "$obj"
-           objbase="$func_basename_result"
-           case " $oldobjs " in
-           " ") oldobjs=$obj ;;
-           *[\ /]"$objbase "*)
-             while :; do
-               # Make sure we don't pick an alternate name that also
-               # overlaps.
-               newobj=lt$counter-$objbase
-               func_arith $counter + 1
-               counter=$func_arith_result
-               case " $oldobjs " in
-               *[\ /]"$newobj "*) ;;
-               *) if test ! -f "$gentop/$newobj"; then break; fi ;;
-               esac
-             done
-             func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
-             func_append oldobjs " $gentop/$newobj"
-             ;;
-           *) func_append oldobjs " $obj" ;;
-           esac
-         done
-       fi
-       func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
-       tool_oldlib=$func_to_tool_file_result
-       eval cmds=\"$old_archive_cmds\"
-
-       func_len " $cmds"
-       len=$func_len_result
-       if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-         cmds=$old_archive_cmds
-       elif test -n "$archiver_list_spec"; then
-         func_verbose "using command file archive linking..."
-         for obj in $oldobjs
-         do
-           func_to_tool_file "$obj"
-           $ECHO "$func_to_tool_file_result"
-         done > $output_objdir/$libname.libcmd
-         func_to_tool_file "$output_objdir/$libname.libcmd"
-         oldobjs=" $archiver_list_spec$func_to_tool_file_result"
-         cmds=$old_archive_cmds
-       else
-         # the command line is too long to link in one step, link in parts
-         func_verbose "using piecewise archive linking..."
-         save_RANLIB=$RANLIB
-         RANLIB=:
-         objlist=
-         concat_cmds=
-         save_oldobjs=$oldobjs
-         oldobjs=
-         # Is there a better way of finding the last object in the list?
-         for obj in $save_oldobjs
-         do
-           last_oldobj=$obj
-         done
-         eval test_cmds=\"$old_archive_cmds\"
-         func_len " $test_cmds"
-         len0=$func_len_result
-         len=$len0
-         for obj in $save_oldobjs
-         do
-           func_len " $obj"
-           func_arith $len + $func_len_result
-           len=$func_arith_result
-           func_append objlist " $obj"
-           if test "$len" -lt "$max_cmd_len"; then
-             :
-           else
-             # the above command should be used before it gets too long
-             oldobjs=$objlist
-             if test "$obj" = "$last_oldobj" ; then
-               RANLIB=$save_RANLIB
-             fi
-             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
-             objlist=
-             len=$len0
-           fi
-         done
-         RANLIB=$save_RANLIB
-         oldobjs=$objlist
-         if test "X$oldobjs" = "X" ; then
-           eval cmds=\"\$concat_cmds\"
-         else
-           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
-         fi
-       fi
-      fi
-      func_execute_cmds "$cmds" 'exit $?'
-    done
-
-    test -n "$generated" && \
-      func_show_eval "${RM}r$generated"
-
-    # Now create the libtool archive.
-    case $output in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      func_verbose "creating $output"
-
-      # Preserve any variables that may affect compiler behavior
-      for var in $variables_saved_for_relink; do
-       if eval test -z \"\${$var+set}\"; then
-         relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
-       elif eval var_value=\$$var; test -z "$var_value"; then
-         relink_command="$var=; export $var; $relink_command"
-       else
-         func_quote_for_eval "$var_value"
-         relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
-       fi
-      done
-      # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
-      if test "$hardcode_automatic" = yes ; then
-       relink_command=
-      fi
-
-      # Only create the output if not a dry run.
-      $opt_dry_run || {
-       for installed in no yes; do
-         if test "$installed" = yes; then
-           if test -z "$install_libdir"; then
-             break
-           fi
-           output="$output_objdir/$outputname"i
-           # Replace all uninstalled libtool libraries with the installed ones
-           newdependency_libs=
-           for deplib in $dependency_libs; do
-             case $deplib in
-             *.la)
-               func_basename "$deplib"
-               name="$func_basename_result"
-               func_resolve_sysroot "$deplib"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
-               test -z "$libdir" && \
-                 func_fatal_error "\`$deplib' is not a valid libtool archive"
-               func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
-               ;;
-             -L*)
-               func_stripname -L '' "$deplib"
-               func_replace_sysroot "$func_stripname_result"
-               func_append newdependency_libs " -L$func_replace_sysroot_result"
-               ;;
-             -R*)
-               func_stripname -R '' "$deplib"
-               func_replace_sysroot "$func_stripname_result"
-               func_append newdependency_libs " -R$func_replace_sysroot_result"
-               ;;
-             *) func_append newdependency_libs " $deplib" ;;
-             esac
-           done
-           dependency_libs="$newdependency_libs"
-           newdlfiles=
-
-           for lib in $dlfiles; do
-             case $lib in
-             *.la)
-               func_basename "$lib"
-               name="$func_basename_result"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-               test -z "$libdir" && \
-                 func_fatal_error "\`$lib' is not a valid libtool archive"
-               func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
-               ;;
-             *) func_append newdlfiles " $lib" ;;
-             esac
-           done
-           dlfiles="$newdlfiles"
-           newdlprefiles=
-           for lib in $dlprefiles; do
-             case $lib in
-             *.la)
-               # Only pass preopened files to the pseudo-archive (for
-               # eventual linking with the app. that links it) if we
-               # didn't already link the preopened objects directly into
-               # the library:
-               func_basename "$lib"
-               name="$func_basename_result"
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-               test -z "$libdir" && \
-                 func_fatal_error "\`$lib' is not a valid libtool archive"
-               func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
-               ;;
-             esac
-           done
-           dlprefiles="$newdlprefiles"
-         else
-           newdlfiles=
-           for lib in $dlfiles; do
-             case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-               *) abs=`pwd`"/$lib" ;;
-             esac
-             func_append newdlfiles " $abs"
-           done
-           dlfiles="$newdlfiles"
-           newdlprefiles=
-           for lib in $dlprefiles; do
-             case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-               *) abs=`pwd`"/$lib" ;;
-             esac
-             func_append newdlprefiles " $abs"
-           done
-           dlprefiles="$newdlprefiles"
-         fi
-         $RM $output
-         # place dlname in correct position for cygwin
-         # In fact, it would be nice if we could use this code for all target
-         # systems that can't hard-code library paths into their executables
-         # and that have no shared library path variable independent of PATH,
-         # but it turns out we can't easily determine that from inspecting
-         # libtool variables, so we have to hard-code the OSs to which it
-         # applies here; at the moment, that means platforms that use the PE
-         # object format with DLL files.  See the long comment at the top of
-         # tests/bindir.at for full details.
-         tdlname=$dlname
-         case $host,$output,$installed,$module,$dlname in
-           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
-             # If a -bindir argument was supplied, place the dll there.
-             if test "x$bindir" != x ;
-             then
-               func_relative_path "$install_libdir" "$bindir"
-               tdlname=$func_relative_path_result$dlname
-             else
-               # Otherwise fall back on heuristic.
-               tdlname=../bin/$dlname
-             fi
-             ;;
-         esac
-         $ECHO > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags='$new_inherited_linker_flags'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Names of additional weak libraries provided by this library
-weak_library_names='$weak_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
-         if test "$installed" = no && test "$need_relink" = yes; then
-           $ECHO >> $output "\
-relink_command=\"$relink_command\""
-         fi
-       done
-      }
-
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
-      ;;
-    esac
-    exit $EXIT_SUCCESS
-}
-
-{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
-    func_mode_link ${1+"$@"}
-
-
-# func_mode_uninstall arg...
-func_mode_uninstall ()
-{
-    $opt_debug
-    RM="$nonopt"
-    files=
-    rmforce=
-    exit_status=0
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    for arg
-    do
-      case $arg in
-      -f) func_append RM " $arg"; rmforce=yes ;;
-      -*) func_append RM " $arg" ;;
-      *) func_append files " $arg" ;;
-      esac
-    done
-
-    test -z "$RM" && \
-      func_fatal_help "you must specify an RM program"
-
-    rmdirs=
-
-    for file in $files; do
-      func_dirname "$file" "" "."
-      dir="$func_dirname_result"
-      if test "X$dir" = X.; then
-       odir="$objdir"
-      else
-       odir="$dir/$objdir"
-      fi
-      func_basename "$file"
-      name="$func_basename_result"
-      test "$opt_mode" = uninstall && odir="$dir"
-
-      # Remember odir for removal later, being careful to avoid duplicates
-      if test "$opt_mode" = clean; then
-       case " $rmdirs " in
-         *" $odir "*) ;;
-         *) func_append rmdirs " $odir" ;;
-       esac
-      fi
-
-      # Don't error if the file doesn't exist and rm -f was used.
-      if { test -L "$file"; } >/dev/null 2>&1 ||
-        { test -h "$file"; } >/dev/null 2>&1 ||
-        test -f "$file"; then
-       :
-      elif test -d "$file"; then
-       exit_status=1
-       continue
-      elif test "$rmforce" = yes; then
-       continue
-      fi
-
-      rmfiles="$file"
-
-      case $name in
-      *.la)
-       # Possibly a libtool archive, so verify it.
-       if func_lalib_p "$file"; then
-         func_source $dir/$name
-
-         # Delete the libtool libraries and symlinks.
-         for n in $library_names; do
-           func_append rmfiles " $odir/$n"
-         done
-         test -n "$old_library" && func_append rmfiles " $odir/$old_library"
-
-         case "$opt_mode" in
-         clean)
-           case " $library_names " in
-           *" $dlname "*) ;;
-           *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
-           esac
-           test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
-           ;;
-         uninstall)
-           if test -n "$library_names"; then
-             # Do each command in the postuninstall commands.
-             func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
-           fi
-
-           if test -n "$old_library"; then
-             # Do each command in the old_postuninstall commands.
-             func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
-           fi
-           # FIXME: should reinstall the best remaining shared library.
-           ;;
-         esac
-       fi
-       ;;
-
-      *.lo)
-       # Possibly a libtool object, so verify it.
-       if func_lalib_p "$file"; then
-
-         # Read the .lo file
-         func_source $dir/$name
-
-         # Add PIC object to the list of files to remove.
-         if test -n "$pic_object" &&
-            test "$pic_object" != none; then
-           func_append rmfiles " $dir/$pic_object"
-         fi
-
-         # Add non-PIC object to the list of files to remove.
-         if test -n "$non_pic_object" &&
-            test "$non_pic_object" != none; then
-           func_append rmfiles " $dir/$non_pic_object"
-         fi
-       fi
-       ;;
-
-      *)
-       if test "$opt_mode" = clean ; then
-         noexename=$name
-         case $file in
-         *.exe)
-           func_stripname '' '.exe' "$file"
-           file=$func_stripname_result
-           func_stripname '' '.exe' "$name"
-           noexename=$func_stripname_result
-           # $file with .exe has already been added to rmfiles,
-           # add $file without .exe
-           func_append rmfiles " $file"
-           ;;
-         esac
-         # Do a test to see if this is a libtool program.
-         if func_ltwrapper_p "$file"; then
-           if func_ltwrapper_executable_p "$file"; then
-             func_ltwrapper_scriptname "$file"
-             relink_command=
-             func_source $func_ltwrapper_scriptname_result
-             func_append rmfiles " $func_ltwrapper_scriptname_result"
-           else
-             relink_command=
-             func_source $dir/$noexename
-           fi
-
-           # note $name still contains .exe if it was in $file originally
-           # as does the version of $file that was added into $rmfiles
-           func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
-           if test "$fast_install" = yes && test -n "$relink_command"; then
-             func_append rmfiles " $odir/lt-$name"
-           fi
-           if test "X$noexename" != "X$name" ; then
-             func_append rmfiles " $odir/lt-${noexename}.c"
-           fi
-         fi
-       fi
-       ;;
-      esac
-      func_show_eval "$RM $rmfiles" 'exit_status=1'
-    done
-
-    # Try to remove the ${objdir}s in the directories where we deleted files
-    for dir in $rmdirs; do
-      if test -d "$dir"; then
-       func_show_eval "rmdir $dir >/dev/null 2>&1"
-      fi
-    done
-
-    exit $exit_status
-}
-
-{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
-    func_mode_uninstall ${1+"$@"}
-
-test -z "$opt_mode" && {
-  help="$generic_help"
-  func_fatal_help "you must specify a MODE"
-}
-
-test -z "$exec_cmd" && \
-  func_fatal_help "invalid operation mode \`$opt_mode'"
-
-if test -n "$exec_cmd"; then
-  eval exec "$exec_cmd"
-  exit $EXIT_FAILURE
-fi
-
-exit $exit_status
-
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries.  Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them.  This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration.  But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
-# vi:sw=2
-
diff --git a/Cfg/missing b/Cfg/missing
deleted file mode 100755 (executable)
index f62bbae..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-#! /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:
diff --git a/INSTALL b/INSTALL
deleted file mode 100644 (file)
index b42a17a..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,182 +0,0 @@
-Basic Installation
-==================
-
-   These are generic installation instructions.
-
-   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, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
-
-   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 at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
-
-   The file `configure.in' is used to create `configure' by a program
-called `autoconf'.  You only need `configure.in' 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.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
-
-     Running `configure' takes awhile.  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.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. 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.
-
-Compilers and Options
-=====================
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  You can give `configure'
-initial values for variables by setting them in the environment.  Using
-a Bourne-compatible shell, you can do that on the command line like
-this:
-     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-
-Or on systems that have the `env' program, you can do it like this:
-     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
-
-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 must use a version of `make' that
-supports the `VPATH' variable, such as 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 `..'.
-
-   If you have to use a `make' that does not supports the `VPATH'
-variable, you have 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.
-
-Installation Names
-==================
-
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' 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.
-
-   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'.
-
-Optional Features
-=================
-
-   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.
-
-Specifying the System Type
-==========================
-
-   There may be some features `configure' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on.  Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
-     CPU-COMPANY-SYSTEM
-
-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 host type.
-
-   If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
-
-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.
-
-Operation Controls
-==================
-
-   `configure' recognizes the following options to control how it
-operates.
-
-`--cache-file=FILE'
-     Use and save the results of the tests in FILE instead of
-     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
-     debugging `configure'.
-
-`--help'
-     Print a summary of the options to `configure', and exit.
-
-`--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.
-
-`--version'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`configure' also accepts some other, not widely useful, options.
index e2d984a..7dd1a3f 100644 (file)
@@ -1,5 +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
+       flexible_array.m4 llrint.m4 lrint.m4 lrintf.m4 octave.m4 extra_pkg.m4 visibility.m4
 
diff --git a/M4/Makefile.in b/M4/Makefile.in
deleted file mode 100644 (file)
index 1e61adb..0000000
+++ /dev/null
@@ -1,508 +0,0 @@
-# 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/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)/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@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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
-
-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:
diff --git a/M4/ax_add_fortify_source.m4 b/M4/ax_add_fortify_source.m4
new file mode 100644 (file)
index 0000000..d443814
--- /dev/null
@@ -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])
+    ])
+])
diff --git a/M4/libtool.m4 b/M4/libtool.m4
deleted file mode 100644 (file)
index d7c043f..0000000
+++ /dev/null
@@ -1,7997 +0,0 @@
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-#                 Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-# 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.
-
-m4_define([_LT_COPYING], [dnl
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-#                 Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 57 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
-       [m4_default([$3],
-                  [m4_fatal([Libtool version $1 or higher is required],
-                            63)])],
-       [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
-  *\ * | *\    *)
-    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
-
-_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
-dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_WITH_SYSROOT])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    _LT_PATH_MAGIC
-  fi
-  ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PREPARE_SED_QUOTE_VARS
-# --------------------------
-# Define a few sed substitution that help us do robust quoting.
-m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
-[# Backslashify metacharacters that are still active within
-# double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-])
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-## ------------------------------------- ##
-## Accumulate code for creating libtool. ##
-## ------------------------------------- ##
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
-          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
-                     [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
-              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-## ------------------------ ##
-## FIXME: Eliminate VARNAME ##
-## ------------------------ ##
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME.  Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
-    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
-       [m4_ifval([$1], [$1], [$2])])
-    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
-    m4_ifval([$4],
-       [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
-    lt_dict_add_subkey([lt_decl_dict], [$2],
-       [tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
-  [0], [m4_fatal([$0: too few arguments: $#])],
-  [1], [m4_fatal([$0: too few arguments: $#: $1])],
-  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
-  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
-  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
-    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
-    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
-     m4_if([$2], [],
-          m4_quote(lt_decl_varnames),
-       m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
-                       lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'.  VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly.  In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
-    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-#    # Some comment about what VAR is for.
-#    visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
-                                          [description])))[]dnl
-m4_pushdef([_libtool_name],
-    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
-    [0], [_libtool_name=[$]$1],
-    [1], [_libtool_name=$lt_[]$1],
-    [2], [_libtool_name=$lt_[]$1],
-    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
-    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
-    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'.  Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
-       dnl If the libtool generation code has been placed in $CONFIG_LT,
-       dnl instead of duplicating it all over again into config.status,
-       dnl then we will have config.status run $CONFIG_LT later, so it
-       dnl needs to know what name is stored there:
-        [AC_CONFIG_COMMANDS([libtool],
-            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
-    dnl If the libtool generation code is destined for config.status,
-    dnl expand the accumulated commands and init code now:
-    [AC_CONFIG_COMMANDS([libtool],
-        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-\$[]1
-_LTECHO_EOF'
-}
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
-    *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
-# ------------------------------------
-# Generate a child script FILE with all initialization necessary to
-# reuse the environment learned by the parent script, and make the
-# file executable.  If COMMENT is supplied, it is inserted after the
-# `#!' sequence but before initialization text begins.  After this
-# macro, additional text can be appended to FILE to form the body of
-# the child script.  The macro ends with non-zero status if the
-# file could not be fully written (such as if the disk is full).
-m4_ifdef([AS_INIT_GENERATED],
-[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
-[m4_defun([_LT_GENERATED_FILE_INIT],
-[m4_require([AS_PREPARE])]dnl
-[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
-[lt_write_fail=0
-cat >$1 <<_ASEOF || lt_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-$2
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$1 <<\_ASEOF || lt_write_fail=1
-AS_SHELL_SANITIZE
-_AS_PREPARE
-exec AS_MESSAGE_FD>&1
-_ASEOF
-test $lt_write_fail = 0 && chmod +x $1[]dnl
-m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
-[# Run this file to recreate a libtool stub with the current configuration.])
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-lt_cl_silent=false
-exec AS_MESSAGE_LOG_FD>>config.log
-{
-  echo
-  AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
-  -h, --help      print this help, then exit
-  -V, --version   print version number, then exit
-  -q, --quiet     do not print progress messages
-  -d, --debug     don't remove temporary files
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2011 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
-  case $[1] in
-    --version | --v* | -V )
-      echo "$lt_cl_version"; exit 0 ;;
-    --help | --h* | -h )
-      echo "$lt_cl_help"; exit 0 ;;
-    --debug | --d* | -d )
-      debug=: ;;
-    --quiet | --q* | --silent | --s* | -q )
-      lt_cl_silent=: ;;
-
-    -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
-    *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
-  esac
-  shift
-done
-
-if $lt_cl_silent; then
-  exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure.  Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-lt_cl_success=:
-test "$silent" = yes &&
-  lt_config_lt_args="$lt_config_lt_args --quiet"
-exec AS_MESSAGE_LOG_FD>/dev/null
-$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-exec AS_MESSAGE_LOG_FD>>config.log
-$lt_cl_success || AS_EXIT(1)
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars.  Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
-  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
-  m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
-    # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
-      setopt NO_GLOB_SUBST
-    fi
-
-    cfgfile="${ofile}T"
-    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
-    $RM "$cfgfile"
-
-    cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
-  case $host_os in
-  aix3*)
-    cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-_LT_EOF
-    ;;
-  esac
-
-  _LT_PROG_LTMAIN
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
-     || (rm -f "$cfgfile"; exit 1)
-
-  _LT_PROG_REPLACE_SHELLFNS
-
-   mv -f "$cfgfile" "$ofile" ||
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
-    PACKAGE='$PACKAGE'
-    VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
-    RM='$RM'
-    ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
-  [C],                 [_LT_LANG(C)],
-  [C++],               [_LT_LANG(CXX)],
-  [Go],                        [_LT_LANG(GO)],
-  [Java],              [_LT_LANG(GCJ)],
-  [Fortran 77],                [_LT_LANG(F77)],
-  [Fortran],           [_LT_LANG(FC)],
-  [Windows Resource],  [_LT_LANG(RC)],
-  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
-    [_LT_LANG($1)],
-    [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
-  [LT_SUPPORTED_TAG([$1])dnl
-  m4_append([_LT_TAGS], [$1 ])dnl
-  m4_define([_LT_LANG_]$1[_enabled], [])dnl
-  _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-m4_ifndef([AC_PROG_GO], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-############################################################
-m4_defun([AC_PROG_GO],
-[AC_LANG_PUSH(Go)dnl
-AC_ARG_VAR([GOC],     [Go compiler command])dnl
-AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
-_AC_ARG_VAR_LDFLAGS()dnl
-AC_CHECK_TOOL(GOC, gccgo)
-if test -z "$GOC"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
-  fi
-fi
-if test -z "$GOC"; then
-  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
-fi
-])#m4_defun
-])#m4_ifndef
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
-  [LT_LANG(CXX)],
-  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
-  [LT_LANG(F77)],
-  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
-  [LT_LANG(FC)],
-  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-  [LT_LANG(GCJ)],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-    [LT_LANG(GCJ)],
-    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
-      [LT_LANG(GCJ)],
-      [m4_ifdef([AC_PROG_GCJ],
-       [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([A][M_PROG_GCJ],
-       [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
-       m4_ifdef([LT_PROG_GCJ],
-       [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([AC_PROG_GO],
-  [LT_LANG(GO)],
-  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
-  [LT_LANG(RC)],
-  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-dnl AC_DEFUN([AC_LIBTOOL_RC], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
-  case $host_os in
-    rhapsody* | darwin*)
-    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
-    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
-    AC_CHECK_TOOL([LIPO], [lipo], [:])
-    AC_CHECK_TOOL([OTOOL], [otool], [:])
-    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
-    _LT_DECL([], [DSYMUTIL], [1],
-      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
-    _LT_DECL([], [NMEDIT], [1],
-      [Tool to change global to local symbols on Mac OS X])
-    _LT_DECL([], [LIPO], [1],
-      [Tool to manipulate fat objects and archives on Mac OS X])
-    _LT_DECL([], [OTOOL], [1],
-      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
-    _LT_DECL([], [OTOOL64], [1],
-      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
-    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
-      [lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
-       # By default we will add the -single_module flag. You can override
-       # by either setting the environment variable LT_MULTI_MODULE
-       # non-empty at configure time, or by adding -multi_module to the
-       # link flags.
-       rm -rf libconftest.dylib*
-       echo "int foo(void){return 1;}" > conftest.c
-       echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
-       $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-         -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
-        _lt_result=$?
-       # If there is a non-empty error log, and "single_module"
-       # appears in it, assume the flag caused a linker warning
-        if test -s conftest.err && $GREP single_module conftest.err; then
-         cat conftest.err >&AS_MESSAGE_LOG_FD
-       # Otherwise, if the output was created with a 0 exit code from
-       # the compiler, it worked.
-       elif test -f libconftest.dylib && test $_lt_result -eq 0; then
-         lt_cv_apple_cc_single_mod=yes
-       else
-         cat conftest.err >&AS_MESSAGE_LOG_FD
-       fi
-       rm -rf libconftest.dylib*
-       rm -f conftest.*
-      fi])
-
-    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
-      [lt_cv_ld_exported_symbols_list],
-      [lt_cv_ld_exported_symbols_list=no
-      save_LDFLAGS=$LDFLAGS
-      echo "_main" > conftest.sym
-      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
-      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-       [lt_cv_ld_exported_symbols_list=yes],
-       [lt_cv_ld_exported_symbols_list=no])
-       LDFLAGS="$save_LDFLAGS"
-    ])
-
-    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
-      [lt_cv_ld_force_load=no
-      cat > conftest.c << _LT_EOF
-int forced_loaded() { return 2;}
-_LT_EOF
-      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
-      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
-      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
-      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
-      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
-      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
-      cat > conftest.c << _LT_EOF
-int main() { return 0;}
-_LT_EOF
-      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
-      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
-      _lt_result=$?
-      if test -s conftest.err && $GREP force_load conftest.err; then
-       cat conftest.err >&AS_MESSAGE_LOG_FD
-      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
-       lt_cv_ld_force_load=yes
-      else
-       cat conftest.err >&AS_MESSAGE_LOG_FD
-      fi
-        rm -f conftest.err libconftest.a conftest conftest.c
-        rm -rf conftest.dSYM
-    ])
-    case $host_os in
-    rhapsody* | darwin1.[[012]])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-       10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-       10.[[012]]*)
-         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-       10.*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
-    ;;
-  esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
-      _lt_dar_single_mod='$single_module'
-    fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
-    else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
-      _lt_dsymutil='~$DSYMUTIL $lib || :'
-    else
-      _lt_dsymutil=
-    fi
-    ;;
-  esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES([TAG])
-# ---------------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
-  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
-  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-  _LT_TAGVAR(hardcode_direct, $1)=no
-  _LT_TAGVAR(hardcode_automatic, $1)=yes
-  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  if test "$lt_cv_ld_force_load" = "yes"; then
-    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
-    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
-                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
-  else
-    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
-  fi
-  _LT_TAGVAR(link_all_deplibs, $1)=yes
-  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
-  case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
-     *) _lt_dar_can_shared=$GCC ;;
-  esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=func_echo_all
-    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-    m4_if([$1], [CXX],
-[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
-    fi
-],[])
-  else
-  _LT_TAGVAR(ld_shlibs, $1)=no
-  fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
-# ----------------------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-# Store the results from the different compilers for each TAGNAME.
-# Allow to override them for all tags through lt_cv_aix_libpath.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-if test "${lt_cv_aix_libpath+set}" = set; then
-  aix_libpath=$lt_cv_aix_libpath
-else
-  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
-  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
-  lt_aix_libpath_sed='[
-      /Import File Strings/,/^$/ {
-         /^0/ {
-             s/^0  *\([^ ]*\) *$/\1/
-             p
-         }
-      }]'
-  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  # Check for a 64-bit object if we didn't find anything.
-  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
-    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  fi],[])
-  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
-    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
-  fi
-  ])
-  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
-fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[m4_divert_text([M4SH-INIT], [$1
-])])# _LT_SHELL_INIT
-
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Find how we can fake an echo command that does not interpret backslash.
-# In particular, with Autoconf 2.60 or later we add some code to the start
-# of the generated configure script which will find a shell with a builtin
-# printf (which we can use as an echo command).
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-
-AC_MSG_CHECKING([how to print strings])
-# Test print first, because it will be a builtin if present.
-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
-   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
-  ECHO='print -r --'
-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-  ECHO='printf %s\n'
-else
-  # Use this function as a fallback that always works.
-  func_fallback_echo ()
-  {
-    eval 'cat <<_LTECHO_EOF
-$[]1
-_LTECHO_EOF'
-  }
-  ECHO='func_fallback_echo'
-fi
-
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
-    $ECHO "$*" 
-}
-
-case "$ECHO" in
-  printf*) AC_MSG_RESULT([printf]) ;;
-  print*) AC_MSG_RESULT([print -r]) ;;
-  *) AC_MSG_RESULT([cat]) ;;
-esac
-
-m4_ifdef([_AS_DETECT_SUGGESTED],
-[_AS_DETECT_SUGGESTED([
-  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
-    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-    PATH=/empty FPATH=/empty; export PATH FPATH
-    test "X`printf %s $ECHO`" = "X$ECHO" \
-      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
-
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_WITH_SYSROOT
-# ----------------
-AC_DEFUN([_LT_WITH_SYSROOT],
-[AC_MSG_CHECKING([for sysroot])
-AC_ARG_WITH([sysroot],
-[  --with-sysroot[=DIR] Search for dependent libraries within DIR
-                        (or the compiler's sysroot if not specified).],
-[], [with_sysroot=no])
-
-dnl lt_sysroot will always be passed unquoted.  We quote it here
-dnl in case the user passed a directory name.
-lt_sysroot=
-case ${with_sysroot} in #(
- yes)
-   if test "$GCC" = yes; then
-     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
-   fi
-   ;; #(
- /*)
-   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
-   ;; #(
- no|'')
-   ;; #(
- *)
-   AC_MSG_RESULT([${with_sysroot}])
-   AC_MSG_ERROR([The sysroot must be an absolute path.])
-   ;;
-esac
-
- AC_MSG_RESULT([${lt_sysroot:-no}])
-_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
-[dependent libraries, and in which our libraries should be installed.])])
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-  [AS_HELP_STRING([--disable-libtool-lock],
-    [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-      *ELF-32*)
-       HPUX_IA64_MODE="32"
-       ;;
-      *ELF-64*)
-       HPUX_IA64_MODE="64"
-       ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
-      case `/usr/bin/file conftest.$ac_objext` in
-       *32-bit*)
-         LD="${LD-ld} -melf32bsmip"
-         ;;
-       *N32*)
-         LD="${LD-ld} -melf32bmipn32"
-         ;;
-       *64-bit*)
-         LD="${LD-ld} -melf64bmip"
-       ;;
-      esac
-    else
-      case `/usr/bin/file conftest.$ac_objext` in
-       *32-bit*)
-         LD="${LD-ld} -32"
-         ;;
-       *N32*)
-         LD="${LD-ld} -n32"
-         ;;
-       *64-bit*)
-         LD="${LD-ld} -64"
-         ;;
-      esac
-    fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-      *32-bit*)
-       case $host in
-         x86_64-*kfreebsd*-gnu)
-           LD="${LD-ld} -m elf_i386_fbsd"
-           ;;
-         x86_64-*linux*)
-           case `/usr/bin/file conftest.o` in
-             *x86-64*)
-               LD="${LD-ld} -m elf32_x86_64"
-               ;;
-             *)
-               LD="${LD-ld} -m elf_i386"
-               ;;
-           esac
-           ;;
-         powerpc64le-*)
-           LD="${LD-ld} -m elf32lppclinux"
-           ;;
-         powerpc64-*)
-           LD="${LD-ld} -m elf32ppclinux"
-           ;;
-         s390x-*linux*)
-           LD="${LD-ld} -m elf_s390"
-           ;;
-         sparc64-*linux*)
-           LD="${LD-ld} -m elf32_sparc"
-           ;;
-       esac
-       ;;
-      *64-bit*)
-       case $host in
-         x86_64-*kfreebsd*-gnu)
-           LD="${LD-ld} -m elf_x86_64_fbsd"
-           ;;
-         x86_64-*linux*)
-           LD="${LD-ld} -m elf_x86_64"
-           ;;
-         powerpcle-*)
-           LD="${LD-ld} -m elf64lppc"
-           ;;
-         powerpc-*)
-           LD="${LD-ld} -m elf64ppc"
-           ;;
-         s390*-*linux*|s390*-*tpf*)
-           LD="${LD-ld} -m elf64_s390"
-           ;;
-         sparc*-*linux*)
-           LD="${LD-ld} -m elf64_sparc"
-           ;;
-       esac
-       ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*)
-        case $host in
-        i?86-*-solaris*)
-          LD="${LD-ld} -m elf_x86_64"
-          ;;
-        sparc*-*-solaris*)
-          LD="${LD-ld} -m elf64_sparc"
-          ;;
-        esac
-        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
-        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
-          LD="${LD-ld}_sol2"
-        fi
-        ;;
-      *)
-       if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
-         LD="${LD-ld} -64"
-       fi
-       ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_PROG_AR
-# -----------
-m4_defun([_LT_PROG_AR],
-[AC_CHECK_TOOLS(AR, [ar], false)
-: ${AR=ar}
-: ${AR_FLAGS=cru}
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
-
-AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
-  [lt_cv_ar_at_file=no
-   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
-     [echo conftest.$ac_objext > conftest.lst
-      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
-      AC_TRY_EVAL([lt_ar_try])
-      if test "$ac_status" -eq 0; then
-       # Ensure the archiver fails upon bogus file names.
-       rm -f conftest.$ac_objext libconftest.a
-       AC_TRY_EVAL([lt_ar_try])
-       if test "$ac_status" -ne 0; then
-          lt_cv_ar_at_file=@
-        fi
-      fi
-      rm -f conftest.* libconftest.a
-     ])
-  ])
-
-if test "x$lt_cv_ar_at_file" = xno; then
-  archiver_list_spec=
-else
-  archiver_list_spec=$lt_cv_ar_at_file
-fi
-_LT_DECL([], [archiver_list_spec], [1],
-  [How to feed a file listing to the archiver])
-])# _LT_PROG_AR
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[_LT_PROG_AR
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
-    [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
-fi
-
-case $host_os in
-  darwin*)
-    lock_old_archive_extraction=yes ;;
-  *)
-    lock_old_archive_extraction=no ;;
-esac
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
-    [Commands used to build an old-style archive])
-_LT_DECL([], [lock_old_archive_extraction], [0],
-    [Whether to use a lock for old archive extraction])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#              [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       $2=yes
-     fi
-   fi
-   $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
-    m4_if([$5], , :, [$5])
-else
-    m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                  [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         $2=yes
-       fi
-     else
-       $2=yes
-     fi
-   fi
-   $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
-    m4_if([$4], , :, [$4])
-else
-    m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw* | cegcc*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  mint*)
-    # On MiNT this can take a long time and run out of memory.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  os2*)
-    # The test takes a long time on OS/2.
-    lt_cv_sys_max_cmd_len=8192
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len" && \
-       test undefined != "$lt_cv_sys_max_cmd_len"; then
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    else
-      # Make teststring a little bigger before we do anything with it.
-      # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
-        teststring=$teststring$teststring
-      done
-      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-      # If test is not a shell built-in, we'll probably end up computing a
-      # maximum length that is only half of the actual maximum length, but
-      # we can't tell.
-      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
-                = "X$teststring$teststring"; } >/dev/null 2>&1 &&
-             test $i != 17 # 1/2 MB should be enough
-      do
-        i=`expr $i + 1`
-        teststring=$teststring$teststring
-      done
-      # Only check the string length outside the loop.
-      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
-      teststring=
-      # Add a significant safety factor because C++ compilers can tack on
-      # massive amounts of additional arguments before passing them to the
-      # linker.  It appears as though 1/2 is a usable value.
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    fi
-    ;;
-  esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
-    [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-[#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-/* When -fvisbility=hidden is used, assume the code has been annotated
-   correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
-
-int fnord () { return 42; }
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else
-        {
-         if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
-          else puts (dlerror ());
-       }
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-  return status;
-}]
-_LT_EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_dlunknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-    ;;
-
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-    ;;
-
-  darwin*)
-  # if libdl is installed we need to link against it
-    AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ])
-    ;;
-
-  *)
-    AC_CHECK_FUNC([shl_load],
-         [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-           [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
-       [AC_CHECK_FUNC([dlopen],
-             [lt_cv_dlopen="dlopen"],
-         [AC_CHECK_LIB([dl], [dlopen],
-               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-           [AC_CHECK_LIB([svld], [dlopen],
-                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-             [AC_CHECK_LIB([dld], [dld_link],
-                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
-             ])
-           ])
-         ])
-       ])
-      ])
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-         lt_cv_dlopen_self, [dnl
-         _LT_TRY_DLOPEN_SELF(
-           lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-           lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-         lt_cv_dlopen_self_static, [dnl
-         _LT_TRY_DLOPEN_SELF(
-           lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-           lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
-        [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
-        [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
-        [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   chmod u+w . 2>&AS_MESSAGE_LOG_FD
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
-       [Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $RM conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
-         [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
-  [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
-   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
-   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
-  # We can hardcode non-existent directories.
-  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_TAGVAR(hardcode_action, $1)=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_TAGVAR(hardcode_action, $1)=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
-   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
-    [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP" ; then
-      striplib="$STRIP -x"
-      old_striplib="$STRIP -S"
-      AC_MSG_RESULT([yes])
-    else
-      AC_MSG_RESULT([no])
-    fi
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-  esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
-       [], [
-if test "$GCC" = yes; then
-  case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
-  esac
-  case $host_os in
-    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
-    *) lt_sed_strip_eq="s,=/,/,g" ;;
-  esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
-  case $lt_search_path_spec in
-  *\;*)
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
-    ;;
-  *)
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
-    ;;
-  esac
-  # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
-  lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
-      test -d "$lt_sys_path" && \
-       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
-    fi
-  done
-  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
-  for (lt_i = NF; lt_i > 0; lt_i--) {
-    if ($lt_i != "" && $lt_i != ".") {
-      if ($lt_i == "..") {
-        lt_count++;
-      } else {
-        if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
-        } else {
-          lt_count--;
-        }
-      }
-    }
-  }
-  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
-  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
-  # AWK program above erroneously prepends '/' to C:/dos/paths
-  # for these hosts.
-  case $host_os in
-    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
-      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
-  esac
-  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix[[4-9]]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  case $host_cpu in
-  powerpc)
-    # Since July 2007 AmigaOS4 officially supports .so libraries.
-    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    ;;
-  m68k)
-    library_names_spec='$libname.ixlibrary $libname.a'
-    # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-    ;;
-  esac
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[[45]]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$cc_basename in
-  yes,*)
-    # gcc
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname~
-      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-      fi'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-m4_if([$1], [],[
-      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
-      ;;
-    mingw* | cegcc*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    dynamic_linker='Win32 ld.exe'
-    ;;
-
-  *,cl*)
-    # Native MSVC
-    libname_spec='$name'
-    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-    library_names_spec='${libname}.dll.lib'
-
-    case $build_os in
-    mingw*)
-      sys_lib_search_path_spec=
-      lt_save_ifs=$IFS
-      IFS=';'
-      for lt_path in $LIB
-      do
-        IFS=$lt_save_ifs
-        # Let DOS variable expansion print the short 8.3 style file name.
-        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
-        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
-      done
-      IFS=$lt_save_ifs
-      # Convert to MSYS style.
-      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
-      ;;
-    cygwin*)
-      # Convert to unix form, then to dos form, then back to unix form
-      # but this time dos style (no spaces!) so that the unix form looks
-      # like /cygdrive/c/PROGRA~1:/cygdr...
-      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
-      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
-      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
-      ;;
-    *)
-      sys_lib_search_path_spec="$LIB"
-      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      # FIXME: find the short name or the path components, as spaces are
-      # common. (e.g. "Program Files" -> "PROGRA~1")
-      ;;
-    esac
-
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-    dynamic_linker='Win32 link.exe'
-    ;;
-
-  *)
-    # Assume MSVC wrapper
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    dynamic_linker='Win32 ld.exe'
-    ;;
-  esac
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[[23]].*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2.*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
-  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  *) # from 4.6 on, and DragonFly
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-haiku*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  dynamic_linker="$host_os runtime_loader"
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  hppa*64*)
-    shrext_cmds='.sl'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
-  postinstall_cmds='chmod 555 $lib'
-  # or fails outright, so override atomically:
-  install_override_mode=555
-  ;;
-
-interix[[3-9]]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux # correct to gnu/linux during the next big refactor
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-
-  # Some binutils ld are patched to set DT_RUNPATH
-  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
-    [lt_cv_shlibpath_overrides_runpath=no
-    save_LDFLAGS=$LDFLAGS
-    save_libdir=$libdir
-    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
-        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
-        [lt_cv_shlibpath_overrides_runpath=yes])])
-    LDFLAGS=$save_LDFLAGS
-    libdir=$save_libdir
-    ])
-  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-*nto* | *qnx*)
-  version_type=qnx
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='ldqnx.so'
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-rdos*)
-  dynamic_linker=no
-  ;;
-
-solaris*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux # correct to gnu/linux during the next big refactor
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-uts4*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
-    [Variables whose values should be saved in libtool wrapper scripts and
-    restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
-    [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
-    [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
-    [[List of archive names.  First name is the real one, the rest are links.
-    The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
-    [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [install_override_mode], [1],
-    [Permission mode override for installation of shared libraries])
-_LT_DECL([], [postinstall_cmds], [2],
-    [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
-    [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
-    [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
-    [[As "finish_cmds", except a single script fragment to be evaled but
-    not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
-    [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
-    [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
-    [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="m4_if([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
-         fi ;;
-       esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
-        [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
-
-AC_ARG_WITH([gnu-ld],
-    [AS_HELP_STRING([--with-gnu-ld],
-       [assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])dnl
-
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by $CC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
-      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-      *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    if test "$GCC" != yes; then
-      reload_cmds=false
-    fi
-    ;;
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_TAGDECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi[[45]]*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
-
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump',
-  # unless we find 'file', for example because we are cross-compiling.
-  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
-  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
-    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-    lt_cv_file_magic_cmd='func_win32_libid'
-  else
-    # Keep this pattern in sync with the one in func_win32_libid.
-    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
-    lt_cv_file_magic_cmd='$OBJDUMP -f'
-  fi
-  ;;
-
-cegcc*)
-  # use the weaker test based on 'objdump'. See mingw*.
-  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-freebsd* | dragonfly*)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-haiku*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix[[3-9]]*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd* | netbsdelf*-gnu)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-*nto* | *qnx*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-rdos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
-
-tpf*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-])
-
-file_magic_glob=
-want_nocaseglob=no
-if test "$build" = "$host"; then
-  case $host_os in
-  mingw* | pw32*)
-    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
-      want_nocaseglob=yes
-    else
-      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
-    fi
-    ;;
-  esac
-fi
-
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
-    [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
-    [Command to use when deplibs_check_method = "file_magic"])
-_LT_DECL([], [file_magic_glob], [1],
-    [How to find potential files when deplibs_check_method = "file_magic"])
-_LT_DECL([], [want_nocaseglob], [1],
-    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-       # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-       #   nm: unknown option "B" ignored
-       # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
-         lt_cv_path_NM="$tmp_nm -B"
-         break
-         ;;
-       *)
-         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-         */dev/null*)
-           lt_cv_path_NM="$tmp_nm -p"
-           break
-           ;;
-         *)
-           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-           continue # so that we can try to find one that supports BSD flags
-           ;;
-         esac
-         ;;
-       esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
-else
-  # Didn't find any BSD compatible name lister, look for dumpbin.
-  if test -n "$DUMPBIN"; then :
-    # Let the user override the test.
-  else
-    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
-    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
-    *COFF*)
-      DUMPBIN="$DUMPBIN -symbols"
-      ;;
-    *)
-      DUMPBIN=:
-      ;;
-    esac
-  fi
-  AC_SUBST([DUMPBIN])
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
-  fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
-  [lt_cv_nm_interface="BSD nm"
-  echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
-  (eval "$ac_compile" 2>conftest.err)
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
-  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
-  cat conftest.out >&AS_MESSAGE_LOG_FD
-  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
-    lt_cv_nm_interface="MS dumpbin"
-  fi
-  rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
-# --------------------------------
-# how to determine the name of the shared library
-# associated with a specific link library.
-#  -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-m4_require([_LT_DECL_DLLTOOL])
-AC_CACHE_CHECK([how to associate runtime and link libraries],
-lt_cv_sharedlib_from_linklib_cmd,
-[lt_cv_sharedlib_from_linklib_cmd='unknown'
-
-case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
-  # two different shell functions defined in ltmain.sh
-  # decide which to use based on capabilities of $DLLTOOL
-  case `$DLLTOOL --help 2>&1` in
-  *--identify-strict*)
-    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
-    ;;
-  *)
-    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
-    ;;
-  esac
-  ;;
-*)
-  # fallback: assume linklib IS sharedlib
-  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
-  ;;
-esac
-])
-sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
-test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
-
-_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
-    [Command to associate shared and link libraries])
-])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
-
-
-# _LT_PATH_MANIFEST_TOOL
-# ----------------------
-# locate the manifest tool
-m4_defun([_LT_PATH_MANIFEST_TOOL],
-[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
-test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
-  [lt_cv_path_mainfest_tool=no
-  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
-  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
-  cat conftest.err >&AS_MESSAGE_LOG_FD
-  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
-    lt_cv_path_mainfest_tool=yes
-  fi
-  rm -f conftest*])
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
-  MANIFEST_TOOL=:
-fi
-_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
-])# _LT_PATH_MANIFEST_TOOL
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
-  # These system don't have libm, or don't need it
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
-  ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
-  case $cc_basename in
-  nvcc*)
-    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
-  *)
-    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
-  esac
-
-  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions], [],
-    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
-       [Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32* | cegcc*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-osf*)
-  symcode='[[BCDEGQRST]]'
-  ;;
-solaris*)
-  symcode='[[BDRT]]'
-  ;;
-sco3.2v5*)
-  symcode='[[DT]]'
-  ;;
-sysv4.2uw2*)
-  symcode='[[DT]]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[[ABDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
-
-  # Write the raw and C identifiers.
-  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
-    # which start with @ or ?.
-    lt_cv_sys_global_symbol_pipe="$AWK ['"\
-"     {last_section=section; section=\$ 3};"\
-"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
-"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-"     \$ 0!~/External *\|/{next};"\
-"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-"     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-"     ' prfx=^$ac_symprfx]"
-  else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[    ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-  fi
-  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-       mv -f "$nlist"T "$nlist"
-      else
-       rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
-       if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
-         cat <<_LT_EOF > conftest.$ac_ext
-/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
-   relocations are performed -- see ld's documentation on pseudo-relocs.  */
-# define LT@&t@_DLSYM_CONST
-#elif defined(__osf__)
-/* This system does not cope well with relocations in const data.  */
-# define LT@&t@_DLSYM_CONST
-#else
-# define LT@&t@_DLSYM_CONST const
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
-         # Now generate the symbol file.
-         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
-         cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols.  */
-LT@&t@_DLSYM_CONST struct {
-  const char *name;
-  void       *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
-  { "@PROGRAM@", (void *) 0 },
-_LT_EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
-         cat <<\_LT_EOF >> conftest.$ac_ext
-  {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
-         # Now try linking the two files.
-         mv conftest.$ac_objext conftstm.$ac_objext
-         lt_globsym_save_LIBS=$LIBS
-         lt_globsym_save_CFLAGS=$CFLAGS
-         LIBS="conftstm.$ac_objext"
-         CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-         if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-           pipe_works=yes
-         fi
-         LIBS=$lt_globsym_save_LIBS
-         CFLAGS=$lt_globsym_save_CFLAGS
-       else
-         echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-       fi
-      else
-       echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
-  else
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
-  fi
-  rm -rf conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-
-# Response file support.
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-  nm_file_list_spec='@'
-elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
-  nm_file_list_spec='@'
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
-    [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
-    [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
-    [lt_cv_sys_global_symbol_to_c_name_address], [1],
-    [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
-    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
-    [Transform the output of nm in a C name address pair when lib prefix is needed])
-_LT_DECL([], [nm_file_list_spec], [1],
-    [Specify filename containing input files for $NM])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-m4_if([$1], [CXX], [
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | cygwin* | os2* | pw32* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      m4_if([$1], [GCJ], [],
-       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    haiku*)
-      # PIC is the default for Haiku.
-      # The "-static" flag exists, but is broken.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)=
-      ;;
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-       ;;
-      *)
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-       ;;
-      esac
-      ;;
-    *qnx* | *nto*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-    *)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix[[4-9]]*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-         # AIX 5 now supports IA64 processor
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-       else
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-       fi
-       ;;
-      chorus*)
-       case $cc_basename in
-       cxch68*)
-         # Green Hills C++ Compiler
-         # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-         ;;
-       esac
-       ;;
-      mingw* | cygwin* | os2* | pw32* | cegcc*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       m4_if([$1], [GCJ], [],
-         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-       ;;
-      dgux*)
-       case $cc_basename in
-         ec++*)
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           ;;
-         ghcx*)
-           # Green Hills C++ Compiler
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      freebsd* | dragonfly*)
-       # FreeBSD uses GNU C++
-       ;;
-      hpux9* | hpux10* | hpux11*)
-       case $cc_basename in
-         CC*)
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-           if test "$host_cpu" != ia64; then
-             _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-           fi
-           ;;
-         aCC*)
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-           case $host_cpu in
-           hppa*64*|ia64*)
-             # +Z the default
-             ;;
-           *)
-             _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-             ;;
-           esac
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      interix*)
-       # This is c89, which is MS Visual C++ (no shared libs)
-       # Anyone wants to do a port?
-       ;;
-      irix5* | irix6* | nonstopux*)
-       case $cc_basename in
-         CC*)
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           # CC pic flag -KPIC is the default.
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-       case $cc_basename in
-         KCC*)
-           # KAI C++ Compiler
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-           ;;
-         ecpc* )
-           # old Intel C++ for x86_64 which still supported -KPIC.
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-           ;;
-         icpc* )
-           # Intel C++, used to be incompatible with GCC.
-           # ICC 10 doesn't accept -KPIC any more.
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-           ;;
-         pgCC* | pgcpp*)
-           # Portland Group C++ compiler
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-         cxx*)
-           # Compaq C++
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           ;;
-         xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
-           # IBM XL 8.0, 9.0 on PPC and BlueGene
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
-           ;;
-         *)
-           case `$CC -V 2>&1 | sed 5q` in
-           *Sun\ C*)
-             # Sun C++ 5.9
-             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-             ;;
-           esac
-           ;;
-       esac
-       ;;
-      lynxos*)
-       ;;
-      m88k*)
-       ;;
-      mvs*)
-       case $cc_basename in
-         cxx*)
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      netbsd* | netbsdelf*-gnu)
-       ;;
-      *qnx* | *nto*)
-        # QNX uses GNU C++, but need to define -shared option too, otherwise
-        # it will coredump.
-        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-        ;;
-      osf3* | osf4* | osf5*)
-       case $cc_basename in
-         KCC*)
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-           ;;
-         RCC*)
-           # Rational C++ 2.4.1
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         cxx*)
-           # Digital/Compaq C++
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      psos*)
-       ;;
-      solaris*)
-       case $cc_basename in
-         CC* | sunCC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-           ;;
-         gcx*)
-           # Green Hills C++ Compiler
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sunos4*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.x
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-         lcc*)
-           # Lucid
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-       case $cc_basename in
-         CC*)
-           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-           ;;
-       esac
-       ;;
-      tandem*)
-       case $cc_basename in
-         NCC*)
-           # NonStop-UX NCC 3.20
-           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      vxworks*)
-       ;;
-      *)
-       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-       ;;
-    esac
-  fi
-],
-[
-  if test "$GCC" = yes; then
-    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      m4_if([$1], [GCJ], [],
-       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-
-    haiku*)
-      # PIC is the default for Haiku.
-      # The "-static" flag exists, but is broken.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)=
-      ;;
-
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-       # +Z the default
-       ;;
-      *)
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-       ;;
-      esac
-      ;;
-
-    interix[[3-9]]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-
-    *)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-
-    case $cc_basename in
-    nvcc*) # Cuda Compiler Driver 2.2
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
-      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
-        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
-      fi
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      m4_if([$1], [GCJ], [],
-       [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-      case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
-      ecc*)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      # icc used to be incompatible with GCC.
-      # ICC 10 doesn't accept -KPIC any more.
-      icc* | ifort*)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      # Lahey Fortran 8.1.
-      lf95*)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
-       ;;
-      nagfor*)
-       # NAG Fortran compiler
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-       ;;
-      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-        ;;
-      ccc*)
-        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-        # All Alpha code is PIC.
-        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-        ;;
-      xl* | bgxl* | bgf* | mpixl*)
-       # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
-       ;;
-      *)
-       case `$CC -V 2>&1 | sed 5q` in
-       *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
-         # Sun Fortran 8.3 passes all unrecognized flags to the linker
-         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-         _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
-         ;;
-       *Sun\ F* | *Sun*Fortran*)
-         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-         ;;
-       *Sun\ C*)
-         # Sun C 5.9
-         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-         ;;
-        *Intel*\ [[CF]]*Compiler*)
-         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-         ;;
-       *Portland\ Group*)
-         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-         ;;
-       esac
-       ;;
-      esac
-      ;;
-
-    newsos6)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    rdos*)
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
-
-    solaris*)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
-      *)
-       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    unicos*)
-      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-
-    uts4*)
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
-
-    *)
-      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
-    ;;
-esac
-
-AC_CACHE_CHECK([for $compiler option to produce PIC],
-  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
-  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
-    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
-    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
-    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
-       [Additional compiler flags for building library objects])
-
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-       [How to pass a linker flag through the compiler])
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
-  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
-  $lt_tmp_static_flag,
-  [],
-  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
-       [Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
-  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-  case $host_os in
-  aix[[4-9]]*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    # Also, AIX nm treats weak defined symbols like other global defined
-    # symbols, whereas GNU nm marks them as "W".
-    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    else
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-    ;;
-  cygwin* | mingw* | cegcc*)
-    case $cc_basename in
-    cl*)
-      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
-      ;;
-    *)
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
-      ;;
-    esac
-    ;;
-  linux* | k*bsd*-gnu | gnu*)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-    ;;
-  *)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-    ;;
-  esac
-], [
-  runpath_var=
-  _LT_TAGVAR(allow_undefined_flag, $1)=
-  _LT_TAGVAR(always_export_symbols, $1)=no
-  _LT_TAGVAR(archive_cmds, $1)=
-  _LT_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_TAGVAR(compiler_needs_object, $1)=no
-  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  _LT_TAGVAR(hardcode_automatic, $1)=no
-  _LT_TAGVAR(hardcode_direct, $1)=no
-  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
-  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(inherit_rpath, $1)=no
-  _LT_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_TAGVAR(module_cmds, $1)=
-  _LT_TAGVAR(module_expsym_cmds, $1)=
-  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
-  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
-  extract_expsyms_cmds=
-
-  case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  linux* | k*bsd*-gnu | gnu*)
-    _LT_TAGVAR(link_all_deplibs, $1)=no
-    ;;
-  esac
-
-  _LT_TAGVAR(ld_shlibs, $1)=yes
-
-  # On some targets, GNU ld is compatible enough with the native linker
-  # that we're better off using the native interface for both.
-  lt_use_gnu_ld_interface=no
-  if test "$with_gnu_ld" = yes; then
-    case $host_os in
-      aix*)
-       # The AIX port of GNU ld has always aspired to compatibility
-       # with the native linker.  However, as the warning in the GNU ld
-       # block says, versions before 2.19.5* couldn't really create working
-       # shared libraries, regardless of the interface used.
-       case `$LD -v 2>&1` in
-         *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
-         *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
-         *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
-         *)
-           lt_use_gnu_ld_interface=yes
-           ;;
-       esac
-       ;;
-      *)
-       lt_use_gnu_ld_interface=yes
-       ;;
-    esac
-  fi
-
-  if test "$lt_use_gnu_ld_interface" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>&1` in
-      *GNU\ gold*) supports_anon_versioning=yes ;;
-      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix[[3-9]]*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.19, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to install binutils
-*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
-*** You will then need to restart the configuration process.
-
-_LT_EOF
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            _LT_TAGVAR(archive_expsym_cmds, $1)=''
-        ;;
-      m68k)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes
-        ;;
-      esac
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-      # as there is no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(always_export_symbols, $1)=no
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
-
-      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    haiku*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    interix[[3-9]]*)
-      _LT_TAGVAR(hardcode_direct, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
-      tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
-       case $cc_basename in
-         diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
-       esac
-      fi
-      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-        && test "$tmp_diet" = no
-      then
-       tmp_addflag=' $pic_flag'
-       tmp_sharedflag='-shared'
-       case $cc_basename,$host_cpu in
-        pgcc*)                         # Portland Group C compiler
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95* | pgfortran*)
-                                       # Portland Group f77 and f90 compilers
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       lf95*)                          # Lahey Fortran 8.1
-         _LT_TAGVAR(whole_archive_flag_spec, $1)=
-         tmp_sharedflag='--shared' ;;
-       xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
-         tmp_sharedflag='-qmkshrobj'
-         tmp_addflag= ;;
-       nvcc*)  # Cuda Compiler Driver 2.2
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-         _LT_TAGVAR(compiler_needs_object, $1)=yes
-         ;;
-       esac
-       case `$CC -V 2>&1 | sed 5q` in
-       *Sun\ C*)                       # Sun C 5.9
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-         _LT_TAGVAR(compiler_needs_object, $1)=yes
-         tmp_sharedflag='-G' ;;
-       *Sun\ F*)                       # Sun Fortran 8.3
-         tmp_sharedflag='-G' ;;
-       esac
-       _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-        if test "x$supports_anon_versioning" = xyes; then
-          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-           echo "local: *; };" >> $output_objdir/$libname.ver~
-           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-        fi
-
-       case $cc_basename in
-       xlf* | bgf* | bgxlf* | mpixlf*)
-         # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-         _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
-         if test "x$supports_anon_versioning" = xyes; then
-           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-             echo "local: *; };" >> $output_objdir/$libname.ver~
-             $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
-         fi
-         ;;
-       esac
-      else
-        _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-       ;;
-       *)
-         # For security reasons, it is highly recommended that you always
-         # use absolute paths for naming shared libraries, and exclude the
-         # DT_RUNPATH tag from executables and libraries.  But doing so
-         # requires that you compile everything twice, which is a pain.
-         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         else
-           _LT_TAGVAR(ld_shlibs, $1)=no
-         fi
-       ;;
-      esac
-      ;;
-
-    sunos4*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-
-    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
-      runpath_var=
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
-      _LT_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(always_export_symbols, $1)=yes
-      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       _LT_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
-      ;;
-
-    aix[[4-9]]*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       # Also, AIX nm treats weak defined symbols like other global
-       # defined symbols, whereas GNU nm marks them as "W".
-       if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-       else
-         _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
-
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
-
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      _LT_TAGVAR(archive_cmds, $1)=''
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[[012]]|aix4.[[012]].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" &&
-          strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         :
-         else
-         # We have old collect2
-         _LT_TAGVAR(hardcode_direct, $1)=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         _LT_TAGVAR(hardcode_minus_L, $1)=yes
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-         _LT_TAGVAR(hardcode_libdir_separator, $1)=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-       _LT_TAGVAR(link_all_deplibs, $1)=no
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
-
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      _LT_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        _LT_SYS_MODULE_PATH_AIX([$1])
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-      else
-       if test "$host_cpu" = ia64; then
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-         _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        _LT_SYS_MODULE_PATH_AIX([$1])
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-         if test "$with_gnu_ld" = yes; then
-           # We only use this code for GNU lds that support --whole-archive.
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-         else
-           # Exported symbols can be pulled into shared objects from archives
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-         fi
-         _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            _LT_TAGVAR(archive_expsym_cmds, $1)=''
-        ;;
-      m68k)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes
-        ;;
-      esac
-      ;;
-
-    bsdi[[45]]*)
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      case $cc_basename in
-      cl*)
-       # Native MSVC
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-       _LT_TAGVAR(always_export_symbols, $1)=yes
-       _LT_TAGVAR(file_list_spec, $1)='@'
-       # Tell ltmain to make .lib files, not .a files.
-       libext=lib
-       # Tell ltmain to make .dll files, not .so files.
-       shrext_cmds=".dll"
-       # FIXME: Setting linknames here is a bad hack.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-       _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-           sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-         else
-           sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-         fi~
-         $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-         linknames='
-       # The linker will not automatically build a static lib if we build a DLL.
-       # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
-       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
-       # Don't use ranlib
-       _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
-       _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-         lt_tool_outputfile="@TOOL_OUTPUT@"~
-         case $lt_outputfile in
-           *.exe|*.EXE) ;;
-           *)
-             lt_outputfile="$lt_outputfile.exe"
-             lt_tool_outputfile="$lt_tool_outputfile.exe"
-             ;;
-         esac~
-         if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-           $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-           $RM "$lt_outputfile.manifest";
-         fi'
-       ;;
-      *)
-       # Assume MSVC wrapper
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-       # Tell ltmain to make .lib files, not .a files.
-       libext=lib
-       # Tell ltmain to make .dll files, not .so files.
-       shrext_cmds=".dll"
-       # FIXME: Setting linknames here is a bad hack.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
-       # The linker will automatically build a .lib file if we build a DLL.
-       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-       # FIXME: Should let the user specify the lib program.
-       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-       ;;
-      esac
-      ;;
-
-    darwin* | rhapsody*)
-      _LT_DARWIN_LINKER_FEATURES($1)
-      ;;
-
-    dgux*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2.*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-       _LT_TAGVAR(hardcode_direct, $1)=yes
-       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-       m4_if($1, [], [
-         # Older versions of the 11.00 compiler do not understand -b yet
-         # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
-         _LT_LINKER_OPTION([if $CC understands -b],
-           _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
-           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
-           [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
-         [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-       case $host_cpu in
-       hppa*64*|ia64*)
-         _LT_TAGVAR(hardcode_direct, $1)=no
-         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-         ;;
-       *)
-         _LT_TAGVAR(hardcode_direct, $1)=yes
-         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         _LT_TAGVAR(hardcode_minus_L, $1)=yes
-         ;;
-       esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       # Try to use the -exported_symbol ld option, if it does not
-       # work, assume that -exports_file does not work either and
-       # implicitly export all symbols.
-       # This should be the same for all languages, so no per-tag cache variable.
-       AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
-         [lt_cv_irix_exported_symbol],
-         [save_LDFLAGS="$LDFLAGS"
-          LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-          AC_LINK_IFELSE(
-            [AC_LANG_SOURCE(
-               [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
-                             [C++], [[int foo (void) { return 0; }]],
-                             [Fortran 77], [[
-      subroutine foo
-      end]],
-                             [Fortran], [[
-      subroutine foo
-      end]])])],
-             [lt_cv_irix_exported_symbol=yes],
-             [lt_cv_irix_exported_symbol=no])
-           LDFLAGS="$save_LDFLAGS"])
-       if test "$lt_cv_irix_exported_symbol" = yes; then
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-       fi
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(inherit_rpath, $1)=yes
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    newsos6)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *nto* | *qnx*)
-      ;;
-
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-       _LT_TAGVAR(hardcode_direct, $1)=yes
-       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-       else
-         case $host_os in
-          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-            _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-            ;;
-          *)
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-            ;;
-         esac
-       fi
-      else
-       _LT_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-
-    os2*)
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      else
-       _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
-       # Both c and cxx compiler support -rpath directly
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-      fi
-      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
-
-    solaris*)
-      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-      else
-       case `$CC -V 2>&1` in
-       *"Compilers 5.0"*)
-         wlarc=''
-         _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
-         ;;
-       *)
-         wlarc='${wl}'
-         _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-         ;;
-       esac
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *)
-       # The compiler driver will combine and reorder linker options,
-       # but understands `-z linker_flag'.  GCC discards it without `$wl',
-       # but is careful enough not to reorder.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       if test "$GCC" = yes; then
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-       else
-         _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
-       fi
-       ;;
-      esac
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-       sni)
-         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
-         _LT_TAGVAR(hardcode_direct, $1)=no
-        ;;
-       motorola)
-         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    sysv4.3*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       _LT_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
-      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-
-    *)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-
-    if test x$host_vendor = xsni; then
-      case $host in
-      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
-       ;;
-      esac
-    fi
-  fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
-    [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
-  # Assume -lc should be added
-  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $_LT_TAGVAR(archive_cmds, $1) in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
-       [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
-       [$RM conftest*
-       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-         soname=conftest
-         lib=conftest
-         libobjs=conftest.$ac_objext
-         deplibs=
-         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
-         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
-         compiler_flags=-v
-         linker_flags=-v
-         verstring=
-         output_objdir=.
-         libname=conftest
-         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
-         _LT_TAGVAR(allow_undefined_flag, $1)=
-         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
-         then
-           lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-         else
-           lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-         fi
-         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-       else
-         cat conftest.err 1>&5
-       fi
-       $RM conftest*
-       ])
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
-    [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
-    [enable_shared_with_static_runtimes], [0],
-    [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
-    [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
-    [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
-    [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
-    [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
-    [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
-    [Commands used to build a loadable module if different from building
-    a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
-    [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
-    [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
-    [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
-    [Flag to hardcode $libdir into a binary during linking.
-    This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
-    [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
-    DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
-    DIR into the resulting binary and the resulting library dependency is
-    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
-    library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
-    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-    into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
-    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-    into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
-    [Set to "yes" if building a shared library automatically hardcodes DIR
-    into the library and all subsequent libraries and executables linked
-    against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
-    [Set to yes if linker adds runtime paths of dependent libraries
-    to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
-    [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [always_export_symbols], [0],
-    [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
-    [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
-    [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
-    [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
-    [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [postlink_cmds], [2],
-    [Commands necessary for finishing linking programs])
-_LT_TAGDECL([], [file_list_spec], [1],
-    [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl    [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_SYS_DYNAMIC_LINKER($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-  LT_SYS_DLOPEN_SELF
-  _LT_CMD_STRIPLIB
-
-  # Report which library types will actually be built
-  AC_MSG_CHECKING([if libtool supports shared libraries])
-  AC_MSG_RESULT([$can_build_shared])
-
-  AC_MSG_CHECKING([whether to build shared libraries])
-  test "$can_build_shared" = "no" && enable_shared=no
-
-  # On AIX, shared libraries and static libraries use the same namespace, and
-  # are all built from PIC.
-  case $host_os in
-  aix3*)
-    test "$enable_shared" = yes && enable_static=no
-    if test -n "$RANLIB"; then
-      archive_cmds="$archive_cmds~\$RANLIB \$lib"
-      postinstall_cmds='$RANLIB $lib'
-    fi
-    ;;
-
-  aix[[4-9]]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
-    fi
-    ;;
-  esac
-  AC_MSG_RESULT([$enable_shared])
-
-  AC_MSG_CHECKING([whether to build static libraries])
-  # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
-  AC_MSG_RESULT([$enable_static])
-
-  _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="int some_variable = 0;"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC=$CC
-  lt_save_CFLAGS=$CFLAGS
-  lt_save_LD=$LD
-  lt_save_GCC=$GCC
-  GCC=$GXX
-  lt_save_with_gnu_ld=$with_gnu_ld
-  lt_save_path_LD=$lt_cv_path_LD
-  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-  else
-    $as_unset lt_cv_prog_gnu_ld
-  fi
-  if test -n "${lt_cv_path_LDCXX+set}"; then
-    lt_cv_path_LD=$lt_cv_path_LDCXX
-  else
-    $as_unset lt_cv_path_LD
-  fi
-  test -z "${LDCXX+set}" || LD=$LDCXX
-  CC=${CXX-"c++"}
-  CFLAGS=$CXXFLAGS
-  compiler=$CC
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-
-  if test -n "$compiler"; then
-    # We don't want -fno-exception when compiling C++ code, so set the
-    # no_builtin_flag separately
-    if test "$GXX" = yes; then
-      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-    else
-      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-    fi
-
-    if test "$GXX" = yes; then
-      # Set up default GNU C++ configuration
-
-      LT_PATH_LD
-
-      # Check if GNU C++ uses GNU ld as the underlying linker, since the
-      # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-        # If archive_cmds runs LD, not CC, wlarc should be empty
-        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-        #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
-
-        # ancient GNU ld didn't support --whole-archive et. al.
-        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
-         $GREP 'no-whole-archive' > /dev/null; then
-          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-        else
-          _LT_TAGVAR(whole_archive_flag_spec, $1)=
-        fi
-      else
-        with_gnu_ld=no
-        wlarc=
-
-        # A generic and very simple default shared library creation
-        # command for GNU C++ for the case where it uses the native
-        # linker, instead of GNU ld.  If possible, this setting should
-        # overridden to take advantage of the native linker features on
-        # the platform it is being used on.
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-      fi
-
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-
-    else
-      GXX=no
-      with_gnu_ld=no
-      wlarc=
-    fi
-
-    # PORTME: fill in a description of your system's C++ link characteristics
-    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-    _LT_TAGVAR(ld_shlibs, $1)=yes
-    case $host_os in
-      aix3*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-      aix[[4-9]]*)
-        if test "$host_cpu" = ia64; then
-          # On IA64, the linker does run time linking by default, so we don't
-          # have to do anything special.
-          aix_use_runtimelinking=no
-          exp_sym_flag='-Bexport'
-          no_entry_flag=""
-        else
-          aix_use_runtimelinking=no
-
-          # Test if we are trying to use run time linking or normal
-          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
-          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
-           for ld_flag in $LDFLAGS; do
-             case $ld_flag in
-             *-brtl*)
-               aix_use_runtimelinking=yes
-               break
-               ;;
-             esac
-           done
-           ;;
-          esac
-
-          exp_sym_flag='-bexport'
-          no_entry_flag='-bnoentry'
-        fi
-
-        # When large executables or shared objects are built, AIX ld can
-        # have problems creating the table of contents.  If linking a library
-        # or program results in "error TOC overflow" add -mminimal-toc to
-        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-        _LT_TAGVAR(archive_cmds, $1)=''
-        _LT_TAGVAR(hardcode_direct, $1)=yes
-        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-        _LT_TAGVAR(link_all_deplibs, $1)=yes
-        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
-        if test "$GXX" = yes; then
-          case $host_os in aix4.[[012]]|aix4.[[012]].*)
-          # We only want to do this on AIX 4.2 and lower, the check
-          # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" &&
-            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-         then
-           # We have reworked collect2
-           :
-         else
-           # We have old collect2
-           _LT_TAGVAR(hardcode_direct, $1)=unsupported
-           # It fails to find uninstalled libraries when the uninstalled
-           # path is not listed in the libpath.  Setting hardcode_minus_L
-           # to unsupported forces relinking
-           _LT_TAGVAR(hardcode_minus_L, $1)=yes
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-           _LT_TAGVAR(hardcode_libdir_separator, $1)=
-         fi
-          esac
-          shared_flag='-shared'
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag="$shared_flag "'${wl}-G'
-         fi
-        else
-          # not using gcc
-          if test "$host_cpu" = ia64; then
-         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-         # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-          else
-           if test "$aix_use_runtimelinking" = yes; then
-             shared_flag='${wl}-G'
-           else
-             shared_flag='${wl}-bM:SRE'
-           fi
-          fi
-        fi
-
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
-        # It seems that -bexpall does not export symbols beginning with
-        # underscore (_), so it is better to generate a list of symbols to
-       # export.
-        _LT_TAGVAR(always_export_symbols, $1)=yes
-        if test "$aix_use_runtimelinking" = yes; then
-          # Warning - without using the other runtime loading flags (-brtl),
-          # -berok will link without error, but may produce a broken library.
-          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
-          # Determine the default libpath from the value encoded in an empty
-          # executable.
-          _LT_SYS_MODULE_PATH_AIX([$1])
-          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-        else
-          if test "$host_cpu" = ia64; then
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-          else
-           # Determine the default libpath from the value encoded in an
-           # empty executable.
-           _LT_SYS_MODULE_PATH_AIX([$1])
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-           # Warning - without using the other run time loading flags,
-           # -berok will link without error, but may produce a broken library.
-           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-           if test "$with_gnu_ld" = yes; then
-             # We only use this code for GNU lds that support --whole-archive.
-             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-           else
-             # Exported symbols can be pulled into shared objects from archives
-             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-           fi
-           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-           # This is similar to how AIX traditionally builds its shared
-           # libraries.
-           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-          fi
-        fi
-        ;;
-
-      beos*)
-       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-         # support --undefined.  This deserves some investigation.  FIXME
-         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       else
-         _LT_TAGVAR(ld_shlibs, $1)=no
-       fi
-       ;;
-
-      chorus*)
-        case $cc_basename in
-          *)
-         # FIXME: insert proper C++ library support
-         _LT_TAGVAR(ld_shlibs, $1)=no
-         ;;
-        esac
-        ;;
-
-      cygwin* | mingw* | pw32* | cegcc*)
-       case $GXX,$cc_basename in
-       ,cl* | no,cl*)
-         # Native MSVC
-         # hardcode_libdir_flag_spec is actually meaningless, as there is
-         # no search path for DLLs.
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-         _LT_TAGVAR(always_export_symbols, $1)=yes
-         _LT_TAGVAR(file_list_spec, $1)='@'
-         # Tell ltmain to make .lib files, not .a files.
-         libext=lib
-         # Tell ltmain to make .dll files, not .so files.
-         shrext_cmds=".dll"
-         # FIXME: Setting linknames here is a bad hack.
-         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-             $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-           else
-             $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-           fi~
-           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-           linknames='
-         # The linker will not automatically build a static lib if we build a DLL.
-         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-         # Don't use ranlib
-         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
-         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-           lt_tool_outputfile="@TOOL_OUTPUT@"~
-           case $lt_outputfile in
-             *.exe|*.EXE) ;;
-             *)
-               lt_outputfile="$lt_outputfile.exe"
-               lt_tool_outputfile="$lt_tool_outputfile.exe"
-               ;;
-           esac~
-           func_to_tool_file "$lt_outputfile"~
-           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-             $RM "$lt_outputfile.manifest";
-           fi'
-         ;;
-       *)
-         # g++
-         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-         # as there is no search path for DLLs.
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
-         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-         _LT_TAGVAR(always_export_symbols, $1)=no
-         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-           # If the export-symbols file already is a .def file (1st line
-           # is EXPORTS), use it as is; otherwise, prepend...
-           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-             cp $export_symbols $output_objdir/$soname.def;
-           else
-             echo EXPORTS > $output_objdir/$soname.def;
-             cat $export_symbols >> $output_objdir/$soname.def;
-           fi~
-           $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-         else
-           _LT_TAGVAR(ld_shlibs, $1)=no
-         fi
-         ;;
-       esac
-       ;;
-      darwin* | rhapsody*)
-        _LT_DARWIN_LINKER_FEATURES($1)
-       ;;
-
-      dgux*)
-        case $cc_basename in
-          ec++*)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          ghcx*)
-           # Green Hills C++ Compiler
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          *)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-        esac
-        ;;
-
-      freebsd2.*)
-        # C++ shared libraries reported to be fairly broken before
-       # switch to ELF
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      freebsd-elf*)
-        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        ;;
-
-      freebsd* | dragonfly*)
-        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-        # conventions
-        _LT_TAGVAR(ld_shlibs, $1)=yes
-        ;;
-
-      haiku*)
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(link_all_deplibs, $1)=yes
-        ;;
-
-      hpux9*)
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-        _LT_TAGVAR(hardcode_direct, $1)=yes
-        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-                                            # but as the default
-                                            # location of the library.
-
-        case $cc_basename in
-          CC*)
-            # FIXME: insert proper C++ library support
-            _LT_TAGVAR(ld_shlibs, $1)=no
-            ;;
-          aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            # Commands to make compiler produce verbose output that lists
-            # what "hidden" libraries, object files and flags are used when
-            # linking a shared library.
-            #
-            # There doesn't appear to be a way to prevent this compiler from
-            # explicitly linking system object files so we need to strip them
-            # from the output so that they don't get included in the library
-            # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-            ;;
-          *)
-            if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            else
-              # FIXME: insert proper C++ library support
-              _LT_TAGVAR(ld_shlibs, $1)=no
-            fi
-            ;;
-        esac
-        ;;
-
-      hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-          case $host_cpu in
-            hppa*64*|ia64*)
-              ;;
-            *)
-             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-              ;;
-          esac
-        fi
-        case $host_cpu in
-          hppa*64*|ia64*)
-            _LT_TAGVAR(hardcode_direct, $1)=no
-            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-            ;;
-          *)
-            _LT_TAGVAR(hardcode_direct, $1)=yes
-            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-                                                # but as the default
-                                                # location of the library.
-            ;;
-        esac
-
-        case $cc_basename in
-          CC*)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          aCC*)
-           case $host_cpu in
-             hppa*64*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-               ;;
-             ia64*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-               ;;
-             *)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-               ;;
-           esac
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-           ;;
-          *)
-           if test "$GXX" = yes; then
-             if test $with_gnu_ld = no; then
-               case $host_cpu in
-                 hppa*64*)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-                   ;;
-                 ia64*)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-                   ;;
-                 *)
-                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-                   ;;
-               esac
-             fi
-           else
-             # FIXME: insert proper C++ library support
-             _LT_TAGVAR(ld_shlibs, $1)=no
-           fi
-           ;;
-        esac
-        ;;
-
-      interix[[3-9]]*)
-       _LT_TAGVAR(hardcode_direct, $1)=no
-       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-       # Instead, shared libraries are loaded at an image base (0x10000000 by
-       # default) and relocated if they conflict, which is a slow very memory
-       # consuming and fragmenting process.  To avoid this, we pick a random,
-       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-       ;;
-      irix5* | irix6*)
-        case $cc_basename in
-          CC*)
-           # SGI C++
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-
-           # Archives containing C++ object files must be created using
-           # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-           # necessary to make sure instantiated templates are included
-           # in the archive.
-           _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-           ;;
-          *)
-           if test "$GXX" = yes; then
-             if test "$with_gnu_ld" = no; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-             else
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
-             fi
-           fi
-           _LT_TAGVAR(link_all_deplibs, $1)=yes
-           ;;
-        esac
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(inherit_rpath, $1)=yes
-        ;;
-
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-        case $cc_basename in
-          KCC*)
-           # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-           # KCC will only create a shared library if the output file
-           # ends with ".so" (or ".sl" for HP-UX), so rename the library
-           # to its proper name (with version) after linking.
-           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-           # Archives containing C++ object files must be created using
-           # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-           _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-           ;;
-         icpc* | ecpc* )
-           # Intel C++
-           with_gnu_ld=yes
-           # version 8.0 and above of icpc choke on multiply defined symbols
-           # if we add $predep_objects and $postdep_objects, however 7.1 and
-           # earlier do not add the objects themselves.
-           case `$CC -V 2>&1` in
-             *"Version 7."*)
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-               ;;
-             *)  # Version 8.0 or newer
-               tmp_idyn=
-               case $host_cpu in
-                 ia64*) tmp_idyn=' -i_dynamic';;
-               esac
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-               ;;
-           esac
-           _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-           ;;
-          pgCC* | pgcpp*)
-            # Portland Group C++ compiler
-           case `$CC -V` in
-           *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
-             _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
-             _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
-               $RANLIB $oldlib'
-             _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-             _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-             ;;
-           *) # Version 6 and above use weak symbols
-             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-             ;;
-           esac
-
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-            ;;
-         cxx*)
-           # Compaq C++
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-           runpath_var=LD_RUN_PATH
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
-           ;;
-         xl* | mpixl* | bgxl*)
-           # IBM XL 8.0 on PPC, with GNU ld
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           if test "x$supports_anon_versioning" = xyes; then
-             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-               echo "local: *; };" >> $output_objdir/$libname.ver~
-               $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-           fi
-           ;;
-         *)
-           case `$CC -V 2>&1 | sed 5q` in
-           *Sun\ C*)
-             # Sun C++ 5.9
-             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-             _LT_TAGVAR(compiler_needs_object, $1)=yes
-
-             # Not sure whether something based on
-             # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
-             # would be better.
-             output_verbose_link_cmd='func_echo_all'
-
-             # Archives containing C++ object files must be created using
-             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-             # necessary to make sure instantiated templates are included
-             # in the archive.
-             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-             ;;
-           esac
-           ;;
-       esac
-       ;;
-
-      lynxos*)
-        # FIXME: insert proper C++ library support
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       ;;
-
-      m88k*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-       ;;
-
-      mvs*)
-        case $cc_basename in
-          cxx*)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-         *)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-       esac
-       ;;
-
-      netbsd*)
-        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-         wlarc=
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-         _LT_TAGVAR(hardcode_direct, $1)=yes
-         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       fi
-       # Workaround some broken pre-1.5 toolchains
-       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-       ;;
-
-      *nto* | *qnx*)
-        _LT_TAGVAR(ld_shlibs, $1)=yes
-       ;;
-
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-       _LT_TAGVAR(ld_shlibs, $1)=no
-       ;;
-
-      openbsd*)
-       if test -f /usr/libexec/ld.so; then
-         _LT_TAGVAR(hardcode_direct, $1)=yes
-         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-         fi
-         output_verbose_link_cmd=func_echo_all
-       else
-         _LT_TAGVAR(ld_shlibs, $1)=no
-       fi
-       ;;
-
-      osf3* | osf4* | osf5*)
-        case $cc_basename in
-          KCC*)
-           # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-           # KCC will only create a shared library if the output file
-           # ends with ".so" (or ".sl" for HP-UX), so rename the library
-           # to its proper name (with version) after linking.
-           _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-           # Archives containing C++ object files must be created using
-           # the KAI C++ compiler.
-           case $host in
-             osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
-             *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
-           esac
-           ;;
-          RCC*)
-           # Rational C++ 2.4.1
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          cxx*)
-           case $host in
-             osf3*)
-               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-               ;;
-             *)
-               _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-                 echo "-hidden">> $lib.exp~
-                 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
-                 $RM $lib.exp'
-               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-               ;;
-           esac
-
-           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-           ;;
-         *)
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-             case $host in
-               osf3*)
-                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-                 ;;
-               *)
-                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-                 ;;
-             esac
-
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
-             # Commands to make compiler produce verbose output that lists
-             # what "hidden" libraries, object files and flags are used when
-             # linking a shared library.
-             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-
-           else
-             # FIXME: insert proper C++ library support
-             _LT_TAGVAR(ld_shlibs, $1)=no
-           fi
-           ;;
-        esac
-        ;;
-
-      psos*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      sunos4*)
-        case $cc_basename in
-          CC*)
-           # Sun C++ 4.x
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          lcc*)
-           # Lucid
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          *)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-        esac
-        ;;
-
-      solaris*)
-        case $cc_basename in
-          CC* | sunCC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
-           _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-             $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-           case $host_os in
-             solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-             *)
-               # The compiler driver will combine and reorder linker options,
-               # but understands `-z linker_flag'.
-               # Supported since Solaris 2.6 (maybe 2.5.1?)
-               _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
-               ;;
-           esac
-           _LT_TAGVAR(link_all_deplibs, $1)=yes
-
-           output_verbose_link_cmd='func_echo_all'
-
-           # Archives containing C++ object files must be created using
-           # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-           # necessary to make sure instantiated templates are included
-           # in the archive.
-           _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-           ;;
-          gcx*)
-           # Green Hills C++ Compiler
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-           # The C++ compiler must be used to create the archive.
-           _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-           ;;
-          *)
-           # GNU C++ compiler with Solaris linker
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-             if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-               # Commands to make compiler produce verbose output that lists
-               # what "hidden" libraries, object files and flags are used when
-               # linking a shared library.
-               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-             else
-               # g++ 2.7 appears to require `-G' NOT `-shared' on this
-               # platform.
-               _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-               # Commands to make compiler produce verbose output that lists
-               # what "hidden" libraries, object files and flags are used when
-               # linking a shared library.
-               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-             fi
-
-             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-             case $host_os in
-               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-               *)
-                 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-                 ;;
-             esac
-           fi
-           ;;
-        esac
-        ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
-
-      case $cc_basename in
-        CC*)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-      esac
-      ;;
-
-      sysv5* | sco3.2v5* | sco5v6*)
-       # Note: We can NOT use -z defs as we might desire, because we do not
-       # link with -lc, and that would cause any symbols used from libc to
-       # always be unresolved, which means just about no library would
-       # ever link correctly.  If we're not using GNU ld we use -z text
-       # though, which does catch some bad symbols but isn't as heavy-handed
-       # as -z defs.
-       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
-       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
-       _LT_TAGVAR(link_all_deplibs, $1)=yes
-       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-       runpath_var='LD_RUN_PATH'
-
-       case $cc_basename in
-          CC*)
-           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
-             '"$_LT_TAGVAR(old_archive_cmds, $1)"
-           _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
-             '"$_LT_TAGVAR(reload_cmds, $1)"
-           ;;
-         *)
-           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           ;;
-       esac
-      ;;
-
-      tandem*)
-        case $cc_basename in
-          NCC*)
-           # NonStop-UX NCC 3.20
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-          *)
-           # FIXME: insert proper C++ library support
-           _LT_TAGVAR(ld_shlibs, $1)=no
-           ;;
-        esac
-        ;;
-
-      vxworks*)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-
-      *)
-        # FIXME: insert proper C++ library support
-        _LT_TAGVAR(ld_shlibs, $1)=no
-        ;;
-    esac
-
-    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-    _LT_TAGVAR(GCC, $1)="$GXX"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_SYS_HIDDEN_LIBDEPS($1)
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  CC=$lt_save_CC
-  CFLAGS=$lt_save_CFLAGS
-  LDCXX=$LD
-  LD=$lt_save_LD
-  GCC=$lt_save_GCC
-  with_gnu_ld=$lt_save_with_gnu_ld
-  lt_cv_path_LDCXX=$lt_cv_path_LD
-  lt_cv_path_LD=$lt_save_path_LD
-  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_FUNC_STRIPNAME_CNF
-# ----------------------
-# func_stripname_cnf prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-#
-# This function is identical to the (non-XSI) version of func_stripname,
-# except this one can be used by m4 code that may be executed by configure,
-# rather than the libtool script.
-m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
-AC_REQUIRE([_LT_DECL_SED])
-AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
-func_stripname_cnf ()
-{
-  case ${2} in
-  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
-  esac
-} # func_stripname_cnf
-])# _LT_FUNC_STRIPNAME_CNF
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library.  It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
-      subroutine foo
-      implicit none
-      integer*4 a
-      a=0
-      return
-      end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
-      subroutine foo
-      implicit none
-      integer a
-      a=0
-      return
-      end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
-  private int a;
-  public void bar (void) {
-    a = 0;
-  }
-};
-_LT_EOF
-], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
-package foo
-func foo() {
-}
-_LT_EOF
-])
-
-_lt_libdeps_save_CFLAGS=$CFLAGS
-case "$CC $CFLAGS " in #(
-*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
-*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
-*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
-esac
-
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  for p in `eval "$output_verbose_link_cmd"`; do
-    case ${prev}${p} in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
-        prev=$p
-        continue
-       fi
-
-       # Expand the sysroot to ease extracting the directories later.
-       if test -z "$prev"; then
-         case $p in
-         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
-         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
-         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
-         esac
-       fi
-       case $p in
-       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
-       esac
-       if test "$pre_test_object_deps_done" = no; then
-        case ${prev} in
-        -L | -R)
-          # Internal compiler library paths should come after those
-          # provided the user.  The postdeps already come after the
-          # user supplied libs so there is no need to process them.
-          if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
-            _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-          else
-            _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-          fi
-          ;;
-        # The "-l" case would never come before the object being
-        # linked, so don't bother handling this case.
-        esac
-       else
-        if test -z "$_LT_TAGVAR(postdeps, $1)"; then
-          _LT_TAGVAR(postdeps, $1)="${prev}${p}"
-        else
-          _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
-        fi
-       fi
-       prev=
-       ;;
-
-    *.lto.$objext) ;; # Ignore GCC LTO objects
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-        pre_test_object_deps_done=yes
-        continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
-          _LT_TAGVAR(predep_objects, $1)="$p"
-        else
-          _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
-        fi
-       else
-        if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
-          _LT_TAGVAR(postdep_objects, $1)="$p"
-        else
-          _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
-        fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-CFLAGS=$_lt_libdeps_save_CFLAGS
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  _LT_TAGVAR(predep_objects,$1)=
-  _LT_TAGVAR(postdep_objects,$1)=
-  _LT_TAGVAR(postdeps,$1)=
-  ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC* | sunCC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
-    [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
-    [Dependencies to place before and after the objects being linked to
-    create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
-    [The library search path used internally by the compiler when linking
-    a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_LANG_PUSH(Fortran 77)
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code="\
-      program t
-      end
-"
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
-  lt_save_GCC=$GCC
-  lt_save_CFLAGS=$CFLAGS
-  CC=${F77-"f77"}
-  CFLAGS=$FFLAGS
-  compiler=$CC
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-  GCC=$G77
-  if test -n "$compiler"; then
-    AC_MSG_CHECKING([if libtool supports shared libraries])
-    AC_MSG_RESULT([$can_build_shared])
-
-    AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
-
-    # On AIX, shared libraries and static libraries use the same namespace, and
-    # are all built from PIC.
-    case $host_os in
-      aix3*)
-        test "$enable_shared" = yes && enable_static=no
-        if test -n "$RANLIB"; then
-          archive_cmds="$archive_cmds~\$RANLIB \$lib"
-          postinstall_cmds='$RANLIB $lib'
-        fi
-        ;;
-      aix[[4-9]]*)
-       if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-         test "$enable_shared" = yes && enable_static=no
-       fi
-        ;;
-    esac
-    AC_MSG_RESULT([$enable_shared])
-
-    AC_MSG_CHECKING([whether to build static libraries])
-    # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
-    AC_MSG_RESULT([$enable_static])
-
-    _LT_TAGVAR(GCC, $1)="$G77"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-  CFLAGS="$lt_save_CFLAGS"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_LANG_PUSH(Fortran)
-
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="\
-      subroutine t
-      return
-      end
-"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code="\
-      program t
-      end
-"
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-  _LT_TAG_COMPILER
-
-  # save warnings/boilerplate of simple test code
-  _LT_COMPILER_BOILERPLATE
-  _LT_LINKER_BOILERPLATE
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
-  lt_save_GCC=$GCC
-  lt_save_CFLAGS=$CFLAGS
-  CC=${FC-"f95"}
-  CFLAGS=$FCFLAGS
-  compiler=$CC
-  GCC=$ac_cv_fc_compiler_gnu
-
-  _LT_TAGVAR(compiler, $1)=$CC
-  _LT_CC_BASENAME([$compiler])
-
-  if test -n "$compiler"; then
-    AC_MSG_CHECKING([if libtool supports shared libraries])
-    AC_MSG_RESULT([$can_build_shared])
-
-    AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
-
-    # On AIX, shared libraries and static libraries use the same namespace, and
-    # are all built from PIC.
-    case $host_os in
-      aix3*)
-        test "$enable_shared" = yes && enable_static=no
-        if test -n "$RANLIB"; then
-          archive_cmds="$archive_cmds~\$RANLIB \$lib"
-          postinstall_cmds='$RANLIB $lib'
-        fi
-        ;;
-      aix[[4-9]]*)
-       if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-         test "$enable_shared" = yes && enable_static=no
-       fi
-        ;;
-    esac
-    AC_MSG_RESULT([$enable_shared])
-
-    AC_MSG_CHECKING([whether to build static libraries])
-    # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
-    AC_MSG_RESULT([$enable_static])
-
-    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
-    _LT_TAGVAR(LD, $1)="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    _LT_SYS_HIDDEN_LIBDEPS($1)
-    _LT_COMPILER_PIC($1)
-    _LT_COMPILER_C_O($1)
-    _LT_COMPILER_FILE_LOCKS($1)
-    _LT_LINKER_SHLIBS($1)
-    _LT_SYS_DYNAMIC_LINKER($1)
-    _LT_LINKER_HARDCODE_LIBPATH($1)
-
-    _LT_CONFIG($1)
-  fi # test -n "$compiler"
-
-  GCC=$lt_save_GCC
-  CC=$lt_save_CC
-  CFLAGS=$lt_save_CFLAGS
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-CFLAGS=$GCJFLAGS
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-
-  _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_GO_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Go compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GO_CONFIG],
-[AC_REQUIRE([LT_PROG_GO])dnl
-AC_LANG_SAVE
-
-# Source file extension for Go test sources.
-ac_ext=go
-
-# Object file extension for compiled Go test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="package main; func main() { }"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='package main; func main() { }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GOC-"gccgo"}
-CFLAGS=$GOFLAGS
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# Go did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(reload_flag, $1)=$reload_flag
-_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-  _LT_COMPILER_NO_RTTI($1)
-  _LT_COMPILER_PIC($1)
-  _LT_COMPILER_C_O($1)
-  _LT_COMPILER_FILE_LOCKS($1)
-  _LT_LINKER_SHLIBS($1)
-  _LT_LINKER_HARDCODE_LIBPATH($1)
-
-  _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-])# _LT_LANG_GO_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-CFLAGS=
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
-  :
-  _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
-  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
-    [AC_CHECK_TOOL(GCJ, gcj,)
-      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-      AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_GO
-# ----------
-AC_DEFUN([LT_PROG_GO],
-[AC_CHECK_TOOL(GOC, gccgo,)
-])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-# _LT_DECL_DLLTOOL
-# ----------------
-# Ensure DLLTOOL variable is set.
-m4_defun([_LT_DECL_DLLTOOL],
-[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
-AC_SUBST([DLLTOOL])
-])
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
-    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-############################################################
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
-  cat /dev/null > conftest.in
-  lt_ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
-  # Check for GNU sed and select it if it is found.
-  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
-    lt_cv_path_SED=$lt_ac_sed
-    break
-  fi
-  while true; do
-    cat conftest.in conftest.in >conftest.tmp
-    mv conftest.tmp conftest.in
-    cp conftest.in conftest.nl
-    echo >>conftest.nl
-    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
-    cmp -s conftest.out conftest.nl || break
-    # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
-    lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
-      lt_ac_max=$lt_ac_count
-      lt_cv_path_SED=$lt_ac_sed
-    fi
-  done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,b/c, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  lt_unset=unset
-else
-  lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  lt_SP2NL='tr \040 \012'
-  lt_NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  lt_SP2NL='tr \100 \n'
-  lt_NL2SP='tr \r\n \100\100'
-  ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
-# ------------------------------------------------------
-# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
-# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
-m4_defun([_LT_PROG_FUNCTION_REPLACE],
-[dnl {
-sed -e '/^$1 ()$/,/^} # $1 /c\
-$1 ()\
-{\
-m4_bpatsubsts([$2], [$], [\\], [^\([    ]\)], [\\\1])
-} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-])
-
-
-# _LT_PROG_REPLACE_SHELLFNS
-# -------------------------
-# Replace existing portable implementations of several shell functions with
-# equivalent extended shell implementations where those features are available..
-m4_defun([_LT_PROG_REPLACE_SHELLFNS],
-[if test x"$xsi_shell" = xyes; then
-  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
-    case ${1} in
-      */*) func_dirname_result="${1%/*}${2}" ;;
-      *  ) func_dirname_result="${3}" ;;
-    esac])
-
-  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
-    func_basename_result="${1##*/}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
-    case ${1} in
-      */*) func_dirname_result="${1%/*}${2}" ;;
-      *  ) func_dirname_result="${3}" ;;
-    esac
-    func_basename_result="${1##*/}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
-    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-    # positional parameters, so assign one to ordinary parameter first.
-    func_stripname_result=${3}
-    func_stripname_result=${func_stripname_result#"${1}"}
-    func_stripname_result=${func_stripname_result%"${2}"}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
-    func_split_long_opt_name=${1%%=*}
-    func_split_long_opt_arg=${1#*=}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
-    func_split_short_opt_arg=${1#??}
-    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
-    case ${1} in
-      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-      *)    func_lo2o_result=${1} ;;
-    esac])
-
-  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
-
-  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
-
-  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
-fi
-
-if test x"$lt_shell_append" = xyes; then
-  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
-    func_quote_for_eval "${2}"
-dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
-    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
-
-  # Save a `func_append' function call where possible by direct use of '+='
-  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-else
-  # Save a `func_append' function call even when '+=' is not available
-  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
-  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
-fi
-])
-
-# _LT_PATH_CONVERSION_FUNCTIONS
-# -----------------------------
-# Determine which file name conversion functions should be used by
-# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
-# for certain cross-compile configurations and native mingw.
-m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_MSG_CHECKING([how to convert $build file names to $host format])
-AC_CACHE_VAL(lt_cv_to_host_file_cmd,
-[case $host in
-  *-*-mingw* )
-    case $build in
-      *-*-mingw* ) # actually msys
-        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
-        ;;
-      *-*-cygwin* )
-        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
-        ;;
-      * ) # otherwise, assume *nix
-        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
-        ;;
-    esac
-    ;;
-  *-*-cygwin* )
-    case $build in
-      *-*-mingw* ) # actually msys
-        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
-        ;;
-      *-*-cygwin* )
-        lt_cv_to_host_file_cmd=func_convert_file_noop
-        ;;
-      * ) # otherwise, assume *nix
-        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
-        ;;
-    esac
-    ;;
-  * ) # unhandled hosts (and "normal" native builds)
-    lt_cv_to_host_file_cmd=func_convert_file_noop
-    ;;
-esac
-])
-to_host_file_cmd=$lt_cv_to_host_file_cmd
-AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
-_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
-         [0], [convert $build file names to $host format])dnl
-
-AC_MSG_CHECKING([how to convert $build file names to toolchain format])
-AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
-[#assume ordinary cross tools, or native build.
-lt_cv_to_tool_file_cmd=func_convert_file_noop
-case $host in
-  *-*-mingw* )
-    case $build in
-      *-*-mingw* ) # actually msys
-        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
-        ;;
-    esac
-    ;;
-esac
-])
-to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
-_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
-         [0], [convert $build files to toolchain format])dnl
-])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/M4/ltoptions.m4 b/M4/ltoptions.m4
deleted file mode 100644 (file)
index 5d9acd8..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-# Helper functions for option handling.                    -*- Autoconf -*-
-#
-#   Copyright (C) 2004, 2005, 2007, 2008, 2009 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 7 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_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_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=default])
-
-test -z "$pic_mode" && 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])])
diff --git a/M4/ltsugar.m4 b/M4/ltsugar.m4
deleted file mode 100644 (file)
index 9000a05..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 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
-])
diff --git a/M4/ltversion.m4 b/M4/ltversion.m4
deleted file mode 100644 (file)
index 07a8602..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# ltversion.m4 -- version numbers                      -*- Autoconf -*-
-#
-#   Copyright (C) 2004 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 3337 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.4.2])
-m4_define([LT_PACKAGE_REVISION], [1.3337])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.2'
-macro_revision='1.3337'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
diff --git a/M4/lt~obsolete.m4 b/M4/lt~obsolete.m4
deleted file mode 100644 (file)
index c573da9..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
-#
-#   Copyright (C) 2004, 2005, 2007, 2009 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])])
diff --git a/M4/visibility.m4 b/M4/visibility.m4
new file mode 100644 (file)
index 0000000..ce00e72
--- /dev/null
@@ -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.])
+])
index 65f397f..181f580 100644 (file)
@@ -8,11 +8,20 @@ if BUILD_OCTAVE_MOD
 octave_dir = Octave
 endif
 
-SUBDIRS = M4 man doc Win32 src $(octave_dir) examples regtest tests programs
+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
+       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 = *~
 
@@ -25,20 +34,16 @@ m4datadir = $(datadir)/aclocal
 test: check-recursive
 
 # Target to make autogenerated files.
-genfiles :
-       (cd src ; make genfiles)
-       (cd tests ; make genfiles)
-
 checkprograms :
-       (cd src ; make libsndfile.la checkprograms)
-       (cd tests ; make checkprograms)
+       (cd src ; $(MAKE) libsndfile.la checkprograms)
+       (cd tests ; $(MAKE) checkprograms)
 
 testprogs :
-       (cd src ; make testprogs)
-       (cd tests ; make 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
+       (cd src ; $(MAKE) all libsndfile.la checkprograms)
+       (cd tests ; $(MAKE) all checkprograms)
+       $(MAKE) -f Scripts/build-test-tarball.mk
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644 (file)
index 0910005..0000000
+++ /dev/null
@@ -1,964 +0,0 @@
-# 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 = .
-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/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)/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/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/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@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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 man doc Win32 src $(octave_dir) examples regtest tests programs
-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
-
-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.
-genfiles :
-       (cd src ; make genfiles)
-       (cd tests ; make genfiles)
-
-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:
diff --git a/NEWS b/NEWS
index c8acbe6..d8f549f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,23 @@
+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, AIIF heap write overflow.
+  * 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.
diff --git a/Octave/Makefile.in b/Octave/Makefile.in
deleted file mode 100644 (file)
index 8a49a5d..0000000
+++ /dev/null
@@ -1,627 +0,0 @@
-# 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/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)/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@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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:
diff --git a/Octave/Readme.txt b/Octave/Readme.txt
new file mode 100644 (file)
index 0000000..c38605b
--- /dev/null
@@ -0,0 +1,23 @@
+The libsndfile Modules for GNU Octave
+=====================================
+
+These modules are currently known to work with version 3.0 of GNU Octave on
+Linux. They have not been tested elsewhere.
+
+
+Build Requirements
+------------------
+
+In order to build these libsndfile related modules for GNU Octave on a Debian
+GNU/Linux (or Debian derived) system, you will need (on top of what is normally
+required to build libsndfile) the package:
+
+       octaveX.Y-headers
+
+where X.Y matches the version number of your installation of GNU Octave.
+
+The configure script in the top level libsndfile directory will detect the 
+presence and correct versions of the Octave build tools. The building of these
+modules will only go ahead if everything is correct.
+
+
similarity index 63%
rename from src/macbinary3.c
rename to Octave/format.h
index 3ad71e6..ce769b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2003-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** 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
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
-#include       "sfconfig.h"
-
-#include       <stdlib.h>
-#include       <string.h>
-
-#include       "sndfile.h"
-#include       "sfendian.h"
-#include       "common.h"
-
-#if (OSX_DARWIN_VERSION >= 1)
-
-int
-macbinary3_open (SF_PRIVATE * UNUSED (psf))
-{
-       return 0 ;
-} /* macbinary3_open */
-
-#else
-
-int
-macbinary3_open (SF_PRIVATE * UNUSED (psf))
-{
-       return 0 ;
-} /* macbinary3_open */
-
-#endif /* OSX_DARWIN_VERSION */
+int format_of_str (const std::string & fmt) ;
 
+void string_of_format (std::string & fmt, int format) ;
diff --git a/README b/README
index 5a0f15b..4718e58 100644 (file)
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-This is libsndfile, 1.0.26
+This is libsndfile, 1.0.28
 
 libsndfile is a library of C routines for reading and writing
 files containing sampled audio data.
diff --git a/README.md b/README.md
new file mode 100644 (file)
index 0000000..569df34
--- /dev/null
+++ b/README.md
@@ -0,0 +1,65 @@
+# libsndfile
+
+[![Build Status](https://secure.travis-ci.org/erikd/libsndfile.svg?branch=master)](http://travis-ci.org/erikd/libsndfile)
+
+libsndfile is a C library for reading and writing files containing sampled audio
+data.
+
+## Hacking
+
+The canonical source code repository for libsndfile is at
+[https://github.com/erikd/libsndfile/][github].
+
+You can grab the source code using:
+
+    $ git clone git://github.com/erikd/libsndfile.git
+
+For building for Android see [BuildingForAndroid][BuildingForAndroid].
+
+There are currently two build systems; the official GNU autotool based one and
+a more limited and experimental CMake based build system. Use of the CMake build
+system is documented below.
+
+Setting up a build environment for libsndfile on Debian or Ubuntu is as simple as:
+```
+sudo apt install autoconf autogen automake build-essential libasound2-dev \
+    libflac-dev libogg-dev libtool libvorbis-dev pkg-config python
+````
+For other Linux distributions or any of the *BSDs, the setup should be similar
+although the package install tools and package names may be slightly different.
+
+Similarly on Mac OS X, assuming [brew] is already installed:
+```
+brew install autoconf autogen automake flac libogg libtool libvorbis pkg-config
+```
+Once the build environment has been set up, building and testing libsndfile is
+as simple as:
+
+    $ ./autogen.sh
+    $ ./configure --enable-werror
+    $ make
+    $ make check
+
+
+## The CMake build system.
+
+The CMake build system is still experimental and probably only works on linux
+because it still relies on GNU autotools for bootstrapping. Using it as simple
+as:
+
+    $ Scripts/cmake-build.sh
+
+I would be happy to accept patches to make the CMake build system more portable.
+
+
+## Submitting Patches.
+
+See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
+
+
+
+
+
+[brew]: http://brew.sh/
+[github]: https://github.com/erikd/libsndfile/
+[BuildingForAndroid]: https://github.com/erikd/libsndfile/blob/master/Building-for-Android.md
index c981d49..accb386 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash -e
 
-# Copyright (C) 2013 Erik de Castro Lopo <erikd@mega-nerd.com>
+# Copyright (C) 2013-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 #
 # All rights reserved.
 #
 # 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 r8e, r9 etc
-ANDROID_NDK_VER=r9
+# Android NDK version number; eg r10, r10b  etc
+ANDROID_NDK_VER=${ANDROID_NDK_VER:-r10}
 
-# Android NDK gcc version; eg 4.7, 4.9 etc.
-ANDROID_GCC_VER=4.8
+# Android NDK gcc version; eg 4.8, 4.9 etc.
+ANDROID_GCC_VER=${ANDROID_GCC_VER:-4.9}
 
-# Android API version; eg 9 (Android 2.3), 14 (Android 4.0) etc.
-ANDROID_API_VER=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.
@@ -45,14 +53,10 @@ function die_with {
        exit 1
 }
 
-export CROSS_COMPILE=arm-linux-androideabi
-
-# I put all my dev stuff in here
-export DEV_PREFIX=$HOME/Android
-test -d ${DEV_PREFIX} || die_with "Error : DEV_PREFIX '$DEV_PREFIX' does not exist."
+export CROSS_COMPILE=${ANDROID_TARGET}
 
 # Don't forget to adjust this to your NDK path
-export ANDROID_NDK=${DEV_PREFIX}/android-ndk-${ANDROID_NDK_VER}
+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}
diff --git a/Scripts/clang-sanitize.sh b/Scripts/clang-sanitize.sh
new file mode 100755 (executable)
index 0000000..2898883
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# This is known to work with clang-3.4 from Debian testing/unstable.
+# 2013/07/14
+
+export CC=clang
+export CXX=clang++
+export CFLAGS="-O3 -fsanitize=address,integer,undefined"
+export CXXFLAGS="-O3 -fsanitize=address,integer,undefined"
+
+./configure --enable-gcc-werror
+
+make clean all check
diff --git a/Scripts/cmake-build.sh b/Scripts/cmake-build.sh
new file mode 100755 (executable)
index 0000000..e2d09f9
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash -e
+
+rm -rf CMakeCache.txt CMakeFiles/
+
+cmake -DWerror=on -Werror=dev -Werror=deprecated .
+
+make clean
+make
+make check
diff --git a/Scripts/cstyle.py b/Scripts/cstyle.py
new file mode 100755 (executable)
index 0000000..94a969c
--- /dev/null
@@ -0,0 +1,246 @@
+#!/usr/bin/python -tt
+#
+# Copyright (C) 2005-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+#
+# Released under the 2 clause BSD license.
+
+"""
+This program checks C code for compliance to coding standards used in
+libsndfile and other projects I run.
+"""
+
+import re
+import sys
+
+
+class Preprocessor:
+       """
+       Preprocess lines of C code to make it easier for the CStyleChecker class to
+       test for correctness. Preprocessing works on a single line at a time but
+       maintains state between consecutive lines so it can preprocessess multi-line
+       comments.
+       Preprocessing involves:
+         - Strip C++ style comments from a line.
+         - Strip C comments from a series of lines. When a C comment starts and
+           ends on the same line it will be replaced with 'comment'.
+         - Replace arbitrary C strings with the zero length string.
+         - Replace '#define f(x)' with '#define f (c)' (The C #define requires that
+           there be no space between defined macro name and the open paren of the
+           argument list).
+       Used by the CStyleChecker class.
+       """
+       def __init__ (self):
+               self.comment_nest = 0
+               self.leading_space_re = re.compile ('^(\t+| )')
+               self.trailing_space_re = re.compile ('(\t+| )$')
+               self.define_hack_re = re.compile ("(#\s*define\s+[a-zA-Z0-9_]+)\(")
+
+       def comment_nesting (self):
+               """
+               Return the currect comment nesting. At the start and end of the file,
+               this value should be zero. Inside C comments it should be 1 or
+               (possibly) more.
+               """
+               return self.comment_nest
+
+       def __call__ (self, line):
+               """
+               Strip the provided line of C and C++ comments. Stripping of multi-line
+               C comments works as expected.
+               """
+
+               line = self.define_hack_re.sub (r'\1 (', line)
+
+               line = self.process_strings (line)
+
+               # Strip C++ style comments.
+               if self.comment_nest == 0:
+                       line = re.sub ("( |\t*)//.*", '', line)
+
+               # Strip C style comments.
+               open_comment = line.find ('/*')
+               close_comment = line.find ('*/')
+
+               if self.comment_nest > 0 and close_comment < 0:
+                       # Inside a comment block that does not close on this line.
+                       return ""
+
+               if open_comment >= 0 and close_comment < 0:
+                       # A comment begins on this line but doesn't close on this line.
+                       self.comment_nest += 1
+                       return self.trailing_space_re.sub ('', line [:open_comment])
+
+               if open_comment < 0 and close_comment >= 0:
+                       # Currently open comment ends on this line.
+                       self.comment_nest -= 1
+                       return self.trailing_space_re.sub ('', line [close_comment + 2:])
+
+               if open_comment >= 0 and close_comment > 0 and self.comment_nest == 0:
+                       # Comment begins and ends on this line. Replace it with 'comment'
+                       # so we don't need to check whitespace before and after the comment
+                       # we're removing.
+                       newline = line [:open_comment] + "comment" + line [close_comment + 2:]
+                       return self.__call__ (newline)
+
+               return line
+
+       def process_strings (self, line):
+               """
+               Given a line of C code, return a string where all literal C strings have
+               been replaced with the empty string literal "".
+               """
+               for k in range (0, len (line)):
+                       if line [k] == '"':
+                               start = k
+                               for k in range (start + 1, len (line)):
+                                       if line [k] == '"' and line [k - 1] != '\\':
+                                               return line [:start + 1] + '"' + self.process_strings (line [k + 1:])
+               return line
+
+
+class CStyleChecker:
+       """
+       A class for checking the whitespace and layout of a C code.
+       """
+       def __init__ (self, debug):
+               self.debug = debug
+               self.filename = None
+               self.error_count = 0
+               self.line_num = 1
+               self.orig_line = ''
+               self.trailing_newline_re = re.compile ('[\r\n]+$')
+               self.indent_re = re.compile ("^\s*")
+               self.last_line_indent = ""
+               self.last_line_indent_curly = False
+               self.re_checks = \
+                       [ ( re.compile ("  "),          "multiple space instead of tab" )
+                       , ( re.compile ("\t "),         "space after tab" )
+                       , ( re.compile ("[^ ];"),       "missing space before semi-colon" )
+                       , ( re.compile ("{[^\s}]"),     "missing space after open brace" )
+                       , ( re.compile ("[^{\s]}"),     "missing space before close brace" )
+                       , ( re.compile ("[ \t]+$"),     "contains trailing whitespace" )
+
+                       , ( re.compile (",[^\s\n]"),            "missing space after comma" )
+                       , ( re.compile (";[a-zA-Z0-9]"),        "missing space after semi-colon" )
+                       , ( re.compile ("=[^\s\"'=]"),          "missing space after assignment" )
+
+                       # Open and close parenthesis.
+                       , ( re.compile ("[^\s\(\[\*&']\("),                             "missing space before open parenthesis" )
+                       , ( re.compile ("\)(-[^>]|[^,'\s\n\)\]-])"),    "missing space after close parenthesis" )
+                       , ( re.compile ("\s(do|for|if|when)\s.*{$"),    "trailing open parenthesis at end of line" )
+                       , ( re.compile ("\( [^;]"),                                             "space after open parenthesis" )
+                       , ( re.compile ("[^;] \)"),                                             "space before close parenthesis" )
+
+                       # Open and close square brace.
+                       , ( re.compile ("[^\s\(\]]\["),                 "missing space before open square brace" )
+                       , ( re.compile ("\][^,\)\]\[\s\.-]"),   "missing space after close square brace" )
+                       , ( re.compile ("\[ "),                                 "space after open square brace" )
+                       , ( re.compile (" \]"),                                 "space before close square brace" )
+
+                       # Space around operators.
+                       , ( re.compile ("[^\s][\*/%+-][=][^\s]"),               "missing space around opassign" )
+                       , ( re.compile ("[^\s][<>!=^/][=]{1,2}[^\s]"),  "missing space around comparison" )
+
+                       # Parens around single argument to return.
+                       , ( re.compile ("\s+return\s+\([a-zA-Z0-9_]+\)\s+;"),   "parens around return value" )
+                       ]
+
+       def get_error_count (self):
+               """
+               Return the current error count for this CStyleChecker object.
+               """
+               return self.error_count
+
+       def check_files (self, files):
+               """
+               Run the style checker on all the specified files.
+               """
+               for filename in files:
+                       self.check_file (filename)
+
+       def check_file (self, filename):
+               """
+               Run the style checker on the specified file.
+               """
+               self.filename = filename
+               cfile = open (filename, "r")
+
+               self.line_num = 1
+
+               preprocess = Preprocessor ()
+               while 1:
+                       line = cfile.readline ()
+                       if not line:
+                               break
+
+                       line = self.trailing_newline_re.sub ('', line)
+                       self.orig_line = line
+
+                       self.line_checks (preprocess (line))
+
+                       self.line_num += 1
+
+               cfile.close ()
+               self.filename = None
+
+               # Check for errors finding comments.
+               if preprocess.comment_nesting () != 0:
+                       print ("Weird, comments nested incorrectly.")
+                       sys.exit (1)
+
+               return
+
+       def line_checks (self, line):
+               """
+               Run the style checker on provided line of text, but within the context
+               of how the line fits within the file.
+               """
+
+               indent = len (self.indent_re.search (line).group ())
+               if re.search ("^\s+}", line):
+                       if not self.last_line_indent_curly and indent != self.last_line_indent:
+                               None    # self.error ("bad indent on close curly brace")
+                       self.last_line_indent_curly = True
+               else:
+                       self.last_line_indent_curly = False
+
+               # Now all the regex checks.
+               for (check_re, msg) in self.re_checks:
+                       if check_re.search (line):
+                               self.error (msg)
+
+               if re.search ("[a-zA-Z0-9][<>!=^/&\|]{1,2}[a-zA-Z0-9]", line):
+                       if not re.search (".*#include.*[a-zA-Z0-9]/[a-zA-Z]", line):
+                               self.error ("missing space around operator")
+
+               self.last_line_indent = indent
+               return
+
+       def error (self, msg):
+               """
+               Print an error message and increment the error count.
+               """
+               print ("%s (%d) : %s" % (self.filename, self.line_num, msg))
+               if self.debug:
+                       print ("'" + self.orig_line + "'")
+               self.error_count += 1
+
+#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+if len (sys.argv) < 1:
+       print ("Usage : yada yada")
+       sys.exit (1)
+
+# Create a new CStyleChecker object
+if sys.argv [1] == '-d' or sys.argv [1] == '--debug':
+       cstyle = CStyleChecker (True)
+       cstyle.check_files (sys.argv [2:])
+else:
+       cstyle = CStyleChecker (False)
+       cstyle.check_files (sys.argv [1:])
+
+
+if cstyle.get_error_count ():
+       sys.exit (1)
+
+sys.exit (0)
diff --git a/Scripts/git-pre-commit-hook b/Scripts/git-pre-commit-hook
new file mode 100755 (executable)
index 0000000..f967f3b
--- /dev/null
@@ -0,0 +1,84 @@
+#!/bin/sh
+#
+
+if git rev-parse --verify HEAD >/dev/null 2>&1 ; then
+       against=HEAD
+else
+       # Initial commit: diff against an empty tree object
+       against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
+       fi
+
+SED="sed -r "  # BSD sed
+if test $(sed --version | grep -c GNU) -gt 0 ; then
+       SED="sed -E "
+       fi
+
+files=$(git diff-index --name-status --cached HEAD | grep -v ^D | ${SED} "s/^[A-Z]+[A-Z0-9]*[ \t]+/ /")
+
+# Redirect output to stderr.
+exec 1>&2
+
+#-------------------------------------------------------------------------------
+# Prevent files with non-ascii filenames from being committed.
+
+if test $(git diff --cached --name-only --diff-filter=A -z $against | LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 ; then
+       echo "Error: Attempt to add a non-ascii file name."
+       echo
+       echo "This can cause problems if you want to work"
+       echo "with people on other platforms."
+       echo
+       echo "To be portable it is advisable to rename the file ..."
+       echo
+       echo "Commit aborted."
+       exit 1
+       fi
+
+#-------------------------------------------------------------------------------
+# Check the formatting of all C files.
+
+cfiles=""
+for f in $files ; do
+       if test `dirname $f` = "src/ALAC" ; then
+               echo "Skipping cstyle checking on $f"
+       elif test `echo $f | grep -c "\.[ch]$"` -gt 0 ; then
+               cfiles="$cfiles $f"
+               fi
+       done
+
+if test -n "$cfiles" ; then
+       Scripts/cstyle.py $cfiles
+       if test $? -ne 0 ; then
+               echo
+               echo "Commit aborted. Fix the above error before trying again."
+               exit 1
+               fi
+       fi
+
+#-------------------------------------------------------------------------------
+# Check the copyright notice of all files to be commited.
+
+user=`git config --global user.email`
+year=`date +"%Y"`
+
+missing_copyright_year=""
+if test $user = "erikd@mega-nerd.com" ; then
+       for f in $files ; do
+               if test `head -5 $f | grep -i copyright | grep -c -i $user` -gt 0 ; then
+                       user_copyright=`grep -i copyright $f | grep $user | grep -c $year`
+                       if test $user_copyright -lt 1 ; then
+                               missing_copyright_year="$missing_copyright_year $f"
+                               fi
+                       fi
+               done
+       fi
+
+if test -n "$missing_copyright_year" ; then
+       echo "Missing current year in the copyright notice of the following files:"
+       for f in $missing_copyright_year ; do
+               echo "    $f"
+               done
+       echo "Commit aborted."
+       exit 1
+       fi
+
+exit 0
diff --git a/Scripts/static-deps-build.mk b/Scripts/static-deps-build.mk
new file mode 100755 (executable)
index 0000000..b185d58
--- /dev/null
@@ -0,0 +1,99 @@
+#!/usr/bin/make -f
+
+# Build libsndfile as a dynamic/shared library, but statically link to
+# libFLAC, libogg and libvorbis
+
+ogg_version = libogg-1.3.2
+ogg_md5sum = 5c3a34309d8b98640827e5d0991a4015
+
+vorbis_version = libvorbis-1.3.5
+vorbis_md5sum = 28cb28097c07a735d6af56e598e1c90f
+
+flac_version = flac-1.3.2
+flac_md5sum = 454f1bfa3f93cc708098d7890d0499bd
+
+#-------------------------------------------------------------------------------
+# Code follows.
+
+ogg_tarball = $(ogg_version).tar.xz
+vorbis_tarball = $(vorbis_version).tar.xz
+flac_tarball = $(flac_version).tar.xz
+
+download_url = http://downloads.xiph.org/releases/
+tarball_dir = Build/Tarballs
+stamp_dir = Build/Stamp
+
+build_dir = $(shell pwd)/Build
+config_options = --prefix=$(build_dir) --disable-shared
+
+pwd = $(shell pwd)
+
+help :
+       @echo
+       @echo "This script will build libsndfile as a dynamic/shared library but statically linked"
+       @echo "to libFLAC, libogg and libvorbis. It should work on Linux and Mac OS X. It might"
+       @echo "work on Windows with a correctly set up MinGW."
+       @echo
+       @echo "It requires all the normal build tools require to build libsndfile plus wget."
+       @echo
+
+config : Build/Stamp/configure
+
+build : Build/Stamp/build
+
+clean :
+       rm -rf Build/flac-* Build/libogg-* Build/libvorbis-*
+       rm -rf Build/bin Build/include Build/lib Build/share
+       rm -f Build/Stamp/install Build/Stamp/extract Build/Stamp/md5sum
+
+Build/Stamp/init :
+       mkdir -p $(stamp_dir) $(tarball_dir)
+       touch $@
+
+Build/Tarballs/$(flac_tarball) : Build/Stamp/init
+       (cd $(tarball_dir) && wget $(download_url)flac/$(flac_tarball) -O $(flac_tarball))
+       touch $@
+
+Build/Tarballs/$(ogg_tarball) : Build/Stamp/init
+       (cd $(tarball_dir) && wget $(download_url)ogg/$(ogg_tarball) -O $(ogg_tarball))
+       touch $@
+
+Build/Tarballs/$(vorbis_tarball) : Build/Stamp/init
+       (cd $(tarball_dir) && wget $(download_url)vorbis/$(vorbis_tarball) -O $(vorbis_tarball))
+       touch $@
+
+Build/Stamp/tarballs : Build/Tarballs/$(flac_tarball) Build/Tarballs/$(ogg_tarball) Build/Tarballs/$(vorbis_tarball)
+       touch $@
+
+Build/Stamp/md5sum : Build/Stamp/tarballs
+       test `md5sum $(tarball_dir)/$(ogg_tarball) | sed "s/ .*//"` = $(ogg_md5sum)
+       test `md5sum $(tarball_dir)/$(vorbis_tarball) | sed "s/ .*//"` = $(vorbis_md5sum)
+       test `md5sum $(tarball_dir)/$(flac_tarball) | sed "s/ .*//"` = $(flac_md5sum)
+       touch $@
+
+Build/Stamp/extract : Build/Stamp/md5sum
+       (cd Build && tar xf Tarballs/$(ogg_tarball))
+       (cd Build && tar xf Tarballs/$(flac_tarball))
+       (cd Build && tar xf Tarballs/$(vorbis_tarball))
+       touch $@
+
+Build/Stamp/install-libs : Build/Stamp/extract
+       (cd Build/$(ogg_version) && CFLAGS=-fPIC ./configure $(config_options) && make all install)
+       (cd Build/$(vorbis_version) && CFLAGS=-fPIC ./configure $(config_options) && make all install)
+       (cd Build/$(flac_version) && CFLAGS=-fPIC ./configure $(config_options) && make all install)
+       touch $@
+
+configure : configure.ac
+       ./autogen.sh
+
+Build/Stamp/configure : Build/Stamp/install-libs configure
+       PKG_CONFIG_LIBDIR=Build/lib/pkgconfig ./configure
+       sed -i 's#^EXTERNAL_XIPH_CFLAGS.*#EXTERNAL_XIPH_CFLAGS = -I$(pwd)/Build/include#' src/Makefile
+       sed -i 's#^EXTERNAL_XIPH_LIBS.*#EXTERNAL_XIPH_LIBS = -static $(pwd)/Build/lib/libFLAC.la $(pwd)/Build/lib/libogg.la $(pwd)/Build/lib/libvorbis.la $(pwd)/Build/lib/libvorbisenc.la -dynamic #' src/Makefile
+       make clean
+       touch $@
+
+Build/Stamp/build : Build/Stamp/configure
+       make all check
+       touch $@
+
diff --git a/Win32/Makefile.in b/Win32/Makefile.in
deleted file mode 100644 (file)
index 7aeae44..0000000
+++ /dev/null
@@ -1,506 +0,0 @@
-# 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/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)/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@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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:
diff --git a/aclocal.m4 b/aclocal.m4
deleted file mode 100644 (file)
index cbe000e..0000000
+++ /dev/null
@@ -1,1446 +0,0 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
-
-# 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.
-
-# 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.
-
-m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
-[m4_warning([this file was generated for autoconf 2.69.
-You have another version of autoconf.  It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-
-dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
-dnl serial 11 (pkg-config-0.29)
-dnl
-dnl Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
-dnl Copyright Â© 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful, but
-dnl WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-dnl 02111-1307, USA.
-dnl
-dnl As a special exception to the GNU General Public License, if you
-dnl distribute this file as part of a program that contains a
-dnl configuration script generated by Autoconf, you may include it under
-dnl the same distribution terms that you use for the rest of that
-dnl program.
-
-dnl PKG_PREREQ(MIN-VERSION)
-dnl -----------------------
-dnl Since: 0.29
-dnl
-dnl Verify that the version of the pkg-config macros are at least
-dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
-dnl installed version of pkg-config, this checks the developer's version
-dnl of pkg.m4 when generating configure.
-dnl
-dnl To ensure that this macro is defined, also add:
-dnl m4_ifndef([PKG_PREREQ],
-dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
-dnl
-dnl See the "Since" comment for each macro you use to see what version
-dnl of the macros you require.
-m4_defun([PKG_PREREQ],
-[m4_define([PKG_MACROS_VERSION], [0.29])
-m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
-    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
-])dnl PKG_PREREQ
-
-dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
-dnl ----------------------------------
-dnl Since: 0.16
-dnl
-dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
-dnl first found in the path. Checks that the version of pkg-config found
-dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
-dnl used since that's the first version where most current features of
-dnl pkg-config existed.
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
-m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
-AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
-AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-fi[]dnl
-])dnl PKG_PROG_PKG_CONFIG
-
-dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-dnl -------------------------------------------------------------------
-dnl Since: 0.18
-dnl
-dnl Check to see whether a particular set of modules exists. Similar to
-dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
-dnl
-dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-dnl only at the first occurence in configure.ac, so if the first place
-dnl it's called might be skipped (such as if it is within an "if", you
-dnl have to call PKG_CHECK_EXISTS manually
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_default([$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-dnl ---------------------------------------------
-dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
-dnl pkg_failed based on the result.
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes ],
-                    [pkg_failed=yes])
- else
-    pkg_failed=untried
-fi[]dnl
-])dnl _PKG_CONFIG
-
-dnl _PKG_SHORT_ERRORS_SUPPORTED
-dnl ---------------------------
-dnl Internal check to see if pkg-config supports short errors.
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])dnl _PKG_SHORT_ERRORS_SUPPORTED
-
-
-dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-dnl   [ACTION-IF-NOT-FOUND])
-dnl --------------------------------------------------------------
-dnl Since: 0.4.0
-dnl
-dnl Note that if there is a possibility the first call to
-dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
-dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-AC_DEFUN([PKG_CHECK_MODULES],
-[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 $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-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
-       AC_MSG_RESULT([no])
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
-        else 
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-       m4_default([$4], [AC_MSG_ERROR(
-[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])[]dnl
-        ])
-elif test $pkg_failed = untried; then
-       AC_MSG_RESULT([no])
-       m4_default([$4], [AC_MSG_FAILURE(
-[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/>.])[]dnl
-        ])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       $3
-fi[]dnl
-])dnl PKG_CHECK_MODULES
-
-
-dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-dnl   [ACTION-IF-NOT-FOUND])
-dnl ---------------------------------------------------------------------
-dnl Since: 0.29
-dnl
-dnl Checks for existence of MODULES and gathers its build flags with
-dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
-dnl and VARIABLE-PREFIX_LIBS from --libs.
-dnl
-dnl Note that if there is a possibility the first call to
-dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
-dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
-dnl configure.ac.
-AC_DEFUN([PKG_CHECK_MODULES_STATIC],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-_save_PKG_CONFIG=$PKG_CONFIG
-PKG_CONFIG="$PKG_CONFIG --static"
-PKG_CHECK_MODULES($@)
-PKG_CONFIG=$_save_PKG_CONFIG[]dnl
-])dnl PKG_CHECK_MODULES_STATIC
-
-
-dnl PKG_INSTALLDIR([DIRECTORY])
-dnl -------------------------
-dnl Since: 0.27
-dnl
-dnl Substitutes the variable pkgconfigdir as the location where a module
-dnl should install pkg-config .pc files. By default the directory is
-dnl $libdir/pkgconfig, but the default can be changed by passing
-dnl DIRECTORY. The user can override through the --with-pkgconfigdir
-dnl parameter.
-AC_DEFUN([PKG_INSTALLDIR],
-[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
-m4_pushdef([pkg_description],
-    [pkg-config installation directory @<:@]pkg_default[@:>@])
-AC_ARG_WITH([pkgconfigdir],
-    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
-    [with_pkgconfigdir=]pkg_default)
-AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
-m4_popdef([pkg_default])
-m4_popdef([pkg_description])
-])dnl PKG_INSTALLDIR
-
-
-dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
-dnl --------------------------------
-dnl Since: 0.27
-dnl
-dnl Substitutes the variable noarch_pkgconfigdir as the location where a
-dnl module should install arch-independent pkg-config .pc files. By
-dnl default the directory is $datadir/pkgconfig, but the default can be
-dnl changed by passing DIRECTORY. The user can override through the
-dnl --with-noarch-pkgconfigdir parameter.
-AC_DEFUN([PKG_NOARCH_INSTALLDIR],
-[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
-m4_pushdef([pkg_description],
-    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
-AC_ARG_WITH([noarch-pkgconfigdir],
-    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
-    [with_noarch_pkgconfigdir=]pkg_default)
-AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
-m4_popdef([pkg_default])
-m4_popdef([pkg_description])
-])dnl PKG_NOARCH_INSTALLDIR
-
-
-dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
-dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-dnl -------------------------------------------
-dnl Since: 0.28
-dnl
-dnl Retrieves the value of the pkg-config variable for the given module.
-AC_DEFUN([PKG_CHECK_VAR],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
-
-_PKG_CONFIG([$1], [variable="][$3]["], [$2])
-AS_VAR_COPY([$1], [pkg_cv_][$1])
-
-AS_VAR_IF([$1], [""], [$5], [$4])dnl
-])dnl PKG_CHECK_VAR
-
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.15'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
-      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too.  Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
-  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
-# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory.  The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run.  This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-#    fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-#    fails if $ac_aux_dir is absolute,
-#    fails when called from a subdirectory in a VPATH build with
-#          a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir.  In an in-source build this is usually
-# harmless because $srcdir is '.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
-#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-#   MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH.  The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
-])
-
-# AM_CONDITIONAL                                            -*- Autoconf -*-
-
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ([2.52])dnl
- m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
-       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
-  $1_TRUE=
-  $1_FALSE='#'
-else
-  $1_TRUE='#'
-  $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
-  AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-
-# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery.  Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
-      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
-      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
-      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
-      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
-      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
-                    [depcc="$$1"   am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
-               [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named 'D' -- because '-MD' means "put the output
-  # in D".
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_$1_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
-  fi
-  am__universal=false
-  m4_case([$1], [CC],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac],
-    [CXX],
-    [case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac])
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
-      # Solaris 10 /bin/sh.
-      echo '/* dummy */' > sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with '-c' and '-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs.
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # After this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested.
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok '-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_$1_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE([dependency-tracking], [dnl
-AS_HELP_STRING(
-  [--enable-dependency-tracking],
-  [do not reject slow dependency extractors])
-AS_HELP_STRING(
-  [--disable-dependency-tracking],
-  [speeds up one-time build])])
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-  am__nodep='_no'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-AC_SUBST([am__nodep])dnl
-_AM_SUBST_NOTMAKE([am__nodep])dnl
-])
-
-# Generate code to set up dependency tracking.              -*- Autoconf -*-
-
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
-  # Older Autoconf quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "$am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each '.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
-     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Do all the work for Automake.                             -*- Autoconf -*-
-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
-
-dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
-m4_define([AC_PROG_CC],
-m4_defn([AC_PROG_CC])
-[_AM_PROG_CC_C_O
-])
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out.  PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition.  After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.65])dnl
-dnl Autoconf wants to disallow AM_ names.  We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[AC_DIAGNOSE([obsolete],
-             [$0: two- and three-arguments forms are deprecated.])
-m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(
-  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
-  [ok:ok],,
-  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
- AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
-AM_MISSING_PROG([AUTOCONF], [autoconf])
-AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
-AM_MISSING_PROG([AUTOHEADER], [autoheader])
-AM_MISSING_PROG([MAKEINFO], [makeinfo])
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-# For better backward compatibility.  To be removed once Automake 1.9.x
-# dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target (and possibly the TAP driver).  The
-# system "awk" is bad on some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
-                 [_AM_DEPENDENCIES([CC])],
-                 [m4_define([AC_PROG_CC],
-                            m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                 [_AM_DEPENDENCIES([CXX])],
-                 [m4_define([AC_PROG_CXX],
-                            m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                 [_AM_DEPENDENCIES([OBJC])],
-                 [m4_define([AC_PROG_OBJC],
-                            m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
-                 [_AM_DEPENDENCIES([OBJCXX])],
-                 [m4_define([AC_PROG_OBJCXX],
-                            m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
-])
-AC_REQUIRE([AM_SILENT_RULES])dnl
-dnl The testsuite driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
-dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
-  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes.  So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
-  cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present.  This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
-
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message.  This
-can help us improve future automake versions.
-
-END
-  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
-    echo 'Configuration will proceed anyway, since you have set the' >&2
-    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
-    echo >&2
-  else
-    cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
-    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
-  fi
-fi
-dnl The trailing newline in this macro's definition is deliberate, for
-dnl backward compatibility and to allow trailing 'dnl'-style comments
-dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
-])
-
-dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated.  The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
-fi
-AC_SUBST([install_sh])])
-
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot.  For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Check to see how 'make' treats includes.                 -*- Autoconf -*-
-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
-
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it is modern enough.
-# If it is, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --is-lightweight"; then
-  am_missing_run="$MISSING "
-else
-  am_missing_run=
-  AC_MSG_WARN(['missing' script is too old or missing])
-fi
-])
-
-# Helper functions for option handling.                     -*- Autoconf -*-
-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# --------------------
-# Set option NAME.  Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# _AM_PROG_CC_C_O
-# ---------------
-# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
-# to automatically call this.
-AC_DEFUN([_AM_PROG_CC_C_O],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-AC_LANG_PUSH([C])dnl
-AC_CACHE_CHECK(
-  [whether $CC understands -c and -o together],
-  [am_cv_prog_cc_c_o],
-  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
-  # Make sure it works both with $CC and with simple cc.
-  # Following AC_PROG_CC_C_O, we do the test twice because some
-  # compilers refuse to overwrite an existing .o file with -o,
-  # though they will create one.
-  am_cv_prog_cc_c_o=yes
-  for am_i in 1 2; do
-    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
-         && test -f conftest2.$ac_objext; then
-      : OK
-    else
-      am_cv_prog_cc_c_o=no
-      break
-    fi
-  done
-  rm -f core conftest*
-  unset am_i])
-if test "$am_cv_prog_cc_c_o" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-AC_LANG_POP([C])])
-
-# For backward compatibility.
-AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# AM_RUN_LOG(COMMAND)
-# -------------------
-# Run COMMAND, save the exit status in ac_status, and log it.
-# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
-AC_DEFUN([AM_RUN_LOG],
-[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
-   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   (exit $ac_status); }])
-
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[[\\\"\#\$\&\'\`$am_lf]]*)
-    AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
-  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
-    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
-esac
-
-# Do 'set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   am_has_slept=no
-   for am_try in 1 2; do
-     echo "timestamp, slept: $am_has_slept" > conftest.file
-     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-     if test "$[*]" = "X"; then
-       # -L didn't work.
-       set X `ls -t "$srcdir/configure" conftest.file`
-     fi
-     if test "$[*]" != "X $srcdir/configure conftest.file" \
-       && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
-       # If neither matched, then we have a broken ls.  This can happen
-       # if, for instance, CONFIG_SHELL is bash and it inherits a
-       # broken ls alias from the environment.  This has actually
-       # happened.  Such a system could not be considered "sane".
-       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-  alias in your environment])
-     fi
-     if test "$[2]" = conftest.file || test $am_try -eq 2; then
-       break
-     fi
-     # Just in case.
-     sleep 1
-     am_has_slept=yes
-   done
-   test "$[2]" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT([yes])
-# If we didn't sleep, we still need to ensure time stamps of config.status and
-# generated files are strictly newer.
-am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
-  ( sleep 1 ) &
-  am_sleep_pid=$!
-fi
-AC_CONFIG_COMMANDS_PRE(
-  [AC_MSG_CHECKING([that generated files are newer than configure])
-   if test -n "$am_sleep_pid"; then
-     # Hide warnings about reused PIDs.
-     wait $am_sleep_pid 2>/dev/null
-   fi
-   AC_MSG_RESULT([done])])
-rm -f conftest.file
-])
-
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# ("yes" being less verbose, "no" or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules], [dnl
-AS_HELP_STRING(
-  [--enable-silent-rules],
-  [less verbose build output (undo: "make V=1")])
-AS_HELP_STRING(
-  [--disable-silent-rules],
-  [verbose build output (undo: "make V=0")])dnl
-])
-case $enable_silent_rules in @%:@ (((
-  yes) AM_DEFAULT_VERBOSITY=0;;
-   no) AM_DEFAULT_VERBOSITY=1;;
-    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
-esac
-dnl
-dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
-dnl do not support nested variable expansions.
-dnl See automake bug#9928 and bug#10237.
-am_make=${MAKE-make}
-AC_CACHE_CHECK([whether $am_make supports nested variables],
-   [am_cv_make_support_nested_variables],
-   [if AS_ECHO([['TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
-am__doit:
-       @$(TRUE)
-.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
-  am_cv_make_support_nested_variables=yes
-else
-  am_cv_make_support_nested_variables=no
-fi])
-if test $am_cv_make_support_nested_variables = yes; then
-  dnl Using '$V' instead of '$(V)' breaks IRIX make.
-  AM_V='$(V)'
-  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
-  AM_V=$AM_DEFAULT_VERBOSITY
-  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
-AC_SUBST([AM_V])dnl
-AM_SUBST_NOTMAKE([AM_V])dnl
-AC_SUBST([AM_DEFAULT_V])dnl
-AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
-AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
-AM_BACKSLASH='\'
-AC_SUBST([AM_BACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
-])
-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# AM_PROG_INSTALL_STRIP
-# ---------------------
-# One issue with vendor 'install' (even GNU) is that you can't
-# specify the program used to strip binaries.  This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in "make install-strip", and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using 'strip' when the user
-# run "make install-strip".  However 'strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the 'STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
-if test "$cross_compiling" != no; then
-  AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# AM_SUBST_NOTMAKE(VARIABLE)
-# --------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
-
-# Check how to create a tarball.                            -*- Autoconf -*-
-
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
-#
-# 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.
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of 'v7', 'ustar', or 'pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-#     tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-#     $(am__untar) < result.tar
-#
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.  Yes, it's still used
-# in the wild :-(  We should find a proper way to deprecate it ...
-AC_SUBST([AMTAR], ['$${TAR-tar}'])
-
-# We'll loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-
-m4_if([$1], [v7],
-  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-
-  [m4_case([$1],
-    [ustar],
-     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
-      # There is notably a 21 bits limit for the UID and the GID.  In fact,
-      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
-      # and bug#13588).
-      am_max_uid=2097151 # 2^21 - 1
-      am_max_gid=$am_max_uid
-      # The $UID and $GID variables are not portable, so we need to resort
-      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
-      # below are definitely unexpected, so allow the users to see them
-      # (that is, avoid stderr redirection).
-      am_uid=`id -u || echo unknown`
-      am_gid=`id -g || echo unknown`
-      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
-      if test $am_uid -le $am_max_uid; then
-         AC_MSG_RESULT([yes])
-      else
-         AC_MSG_RESULT([no])
-         _am_tools=none
-      fi
-      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
-      if test $am_gid -le $am_max_gid; then
-         AC_MSG_RESULT([yes])
-      else
-        AC_MSG_RESULT([no])
-        _am_tools=none
-      fi],
-
-  [pax],
-    [],
-
-  [m4_fatal([Unknown tar format])])
-
-  AC_MSG_CHECKING([how to create a $1 tar archive])
-
-  # Go ahead even if we have the value already cached.  We do so because we
-  # need to set the values for the 'am__tar' and 'am__untar' variables.
-  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
-
-  for _am_tool in $_am_tools; do
-    case $_am_tool in
-    gnutar)
-      for _am_tar in tar gnutar gtar; do
-        AM_RUN_LOG([$_am_tar --version]) && break
-      done
-      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-      am__untar="$_am_tar -xf -"
-      ;;
-    plaintar)
-      # Must skip GNU tar: if it does not support --format= it doesn't create
-      # ustar tarball either.
-      (tar --version) >/dev/null 2>&1 && continue
-      am__tar='tar chf - "$$tardir"'
-      am__tar_='tar chf - "$tardir"'
-      am__untar='tar xf -'
-      ;;
-    pax)
-      am__tar='pax -L -x $1 -w "$$tardir"'
-      am__tar_='pax -L -x $1 -w "$tardir"'
-      am__untar='pax -r'
-      ;;
-    cpio)
-      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-      am__untar='cpio -i -H $1 -d'
-      ;;
-    none)
-      am__tar=false
-      am__tar_=false
-      am__untar=false
-      ;;
-    esac
-
-    # If the value was cached, stop now.  We just wanted to have am__tar
-    # and am__untar set.
-    test -n "${am_cv_prog_tar_$1}" && break
-
-    # tar/untar a dummy directory, and stop if the command works.
-    rm -rf conftest.dir
-    mkdir conftest.dir
-    echo GrepMe > conftest.dir/file
-    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-    rm -rf conftest.dir
-    if test -s conftest.tar; then
-      AM_RUN_LOG([$am__untar <conftest.tar])
-      AM_RUN_LOG([cat conftest.dir/file])
-      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-    fi
-  done
-  rm -rf conftest.dir
-
-  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
-m4_include([M4/add_cflags.m4])
-m4_include([M4/add_cxxflags.m4])
-m4_include([M4/clang.m4])
-m4_include([M4/clip_mode.m4])
-m4_include([M4/endian.m4])
-m4_include([M4/extra_pkg.m4])
-m4_include([M4/gcc_version.m4])
-m4_include([M4/libtool.m4])
-m4_include([M4/lrint.m4])
-m4_include([M4/lrintf.m4])
-m4_include([M4/ltoptions.m4])
-m4_include([M4/ltsugar.m4])
-m4_include([M4/ltversion.m4])
-m4_include([M4/lt~obsolete.m4])
-m4_include([M4/mkoctfile_version.m4])
-m4_include([M4/octave.m4])
-m4_include([M4/really_gcc.m4])
-m4_include([M4/stack_protect.m4])
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..4f98f96
--- /dev/null
@@ -0,0 +1,183 @@
+#!/bin/sh
+# Run this to set up the build system: configure, makefiles, etc.
+# (based on the version in enlightenment's cvs)
+
+package="libsndfile"
+
+ACLOCAL_FLAGS="-I M4"
+
+olddir=`pwd`
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+cd "$srcdir"
+DIE=0
+
+printf "checking for autogen ... "
+result="yes"
+(autogen --version) < /dev/null > /dev/null 2>&1 || {
+        echo
+        echo "You must have GNU autogen installed to compile $package."
+        echo "Download the appropriate package for your distribution,"
+        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+               result="no"
+        DIE=1
+}
+echo $result
+
+printf "checking for autoconf ... "
+result="yes"
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+        echo
+        echo "You must have autoconf installed to compile $package."
+        echo "Download the appropriate package for your distribution,"
+        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+               result="no"
+        DIE=1
+}
+echo $result
+
+VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/"
+VERSIONMKMAJ="sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/"
+VERSIONMKMIN="sed -e s/.*[0-9][0-9]*\.//"
+
+# do we need automake?
+if test -r Makefile.am; then
+  AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am`
+  AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP`
+  if test x"$AM_NEEDED" = "x$AM_OPTIONS"; then
+    AM_NEEDED=""
+  fi
+  if test -z $AM_NEEDED; then
+    printf "checking for automake ... "
+    AUTOMAKE=automake
+    ACLOCAL=aclocal
+    if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then
+      echo "yes"
+    else
+      echo "no"
+      AUTOMAKE=
+    fi
+  else
+    printf "checking for automake $AM_NEEDED or later ... "
+    majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ`
+    minneeded=`echo $AM_NEEDED | $VERSIONMKMIN`
+    for am in automake-$AM_NEEDED automake$AM_NEEDED \
+       automake automake-1.7 automake-1.8 automake-1.9 automake-1.10; do
+      ($am --version < /dev/null > /dev/null 2>&1) || continue
+      ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP`
+      maj=`echo $ver | $VERSIONMKMAJ`
+      min=`echo $ver | $VERSIONMKMIN`
+      if test $maj -eq $majneeded -a $min -ge $minneeded; then
+        AUTOMAKE=$am
+        echo $AUTOMAKE
+        break
+      fi
+    done
+    test -z $AUTOMAKE &&  echo "no"
+    printf "checking for aclocal $AM_NEEDED or later ... "
+    for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED \
+       aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do
+      ($ac --version < /dev/null > /dev/null 2>&1) || continue
+      ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP`
+      maj=`echo $ver | $VERSIONMKMAJ`
+      min=`echo $ver | $VERSIONMKMIN`
+      if test $maj -eq $majneeded -a $min -ge $minneeded; then
+        ACLOCAL=$ac
+        echo $ACLOCAL
+        break
+      fi
+    done
+    test -z $ACLOCAL && echo "no"
+  fi
+  test -z $AUTOMAKE || test -z $ACLOCAL && {
+        echo
+        echo "You must have automake installed to compile $package."
+        echo "Download the appropriate package for your distribution,"
+        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+        exit 1
+  }
+fi
+
+printf "checking for libtool ... "
+for LIBTOOLIZE in libtoolize glibtoolize nope; do
+  ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
+done
+if test x$LIBTOOLIZE = xnope; then
+  echo "nope."
+  LIBTOOLIZE=libtoolize
+else
+  echo $LIBTOOLIZE
+fi
+($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       echo "You must have libtool installed to compile $package."
+       echo "Download the appropriate package for your system,"
+       echo "or get the source from one of the GNU ftp sites"
+       echo "listed in http://www.gnu.org/order/ftp.html"
+       DIE=1
+}
+
+printf "checking for pkg-config ... "
+result="yes"
+(pkg-config --version) < /dev/null > /dev/null 2>&1 || {
+        echo
+        echo "You must have pkg-config installed to compile $package."
+        echo "Download the appropriate package for your distribution."
+               result="no"
+        DIE=1
+}
+echo $result
+
+
+printf "checking for python ... "
+result="yes"
+(python --version) < /dev/null > /dev/null 2>&1 || {
+        echo
+        echo "You must have Python installed to compile $package."
+        echo "Download the appropriate package for your distribution,"
+        echo "or get the source tarball at http://python.org/"
+               result="no"
+        DIE=1
+}
+echo $result
+
+if test "$DIE" -eq 1; then
+        exit 1
+fi
+
+if test ! -d Cfg ; then
+       echo "Creating 'Cfg' directory."
+       mkdir Cfg
+fi
+
+echo "Generating configuration files for $package, please wait ... "
+
+echo "  $ACLOCAL $ACLOCAL_FLAGS"
+$ACLOCAL $ACLOCAL_FLAGS || exit 1
+echo "  $LIBTOOLIZE --automake --force"
+$LIBTOOLIZE --automake --force || exit 1
+echo "  autoheader"
+autoheader || exit 1
+echo "  $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
+$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1
+echo "  autoconf"
+autoconf || exit 1
+
+# Generate the src/cmake-config.h.in from src/config.h.in.
+# CMake process src/cmake-config.h to create src/config.h.
+rm -f src/config.h src/cmake-config.h
+
+cd $olddir
+
+if test -d .git/ ; then
+       fprecommit=.git/hooks/pre-commit
+       if test ! -f $fprecommit ; then
+               echo
+               echo "Installing git pre-commit hook for this project."
+               printf "#/bin/sh\nexec Scripts/git-pre-commit-hook\n" > $fprecommit
+               chmod u+x $fprecommit
+               echo
+               fi
+       fi
+
diff --git a/configure b/configure
deleted file mode 100755 (executable)
index f5c83c3..0000000
--- a/configure
+++ /dev/null
@@ -1,23271 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libsndfile 1.0.26.
-#
-# Report bugs to <sndfile@mega-nerd.com>.
-#
-#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-       expr "X$arg" : "X\\(.*\\)$as_nl";
-       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# Use a proper internal environment variable to ensure we don't fall
-  # into an infinite loop, continuously re-executing ourselves.
-  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
-    _as_can_reexec=no; export _as_can_reexec;
-    # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
-  fi
-  # We don't want this to propagate to other subprocesses.
-          { _as_can_reexec=; unset _as_can_reexec;}
-if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-"
-  as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
-  exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1
-test -x / || exit 1"
-  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
-  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
-  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1
-
-  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
-    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
-    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
-    PATH=/empty FPATH=/empty; export PATH FPATH
-    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
-      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  as_found=:
-  case $as_dir in #(
-        /*)
-          for as_base in sh bash ksh sh5; do
-            # Try only shells that exist, to save several forks.
-            as_shell=$as_dir/$as_base
-            if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  CONFIG_SHELL=$as_shell as_have_required=yes
-                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  break 2
-fi
-fi
-          done;;
-       esac
-  as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
-      if test "x$CONFIG_SHELL" != x; then :
-  export CONFIG_SHELL
-             # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-exit 255
-fi
-
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
-  else
-    $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: sndfile@mega-nerd.com about your system, including any
-$0: error possibly output before this message. Then install
-$0: a modern shell, or manually run the script under such a
-$0: shell if you do have one."
-  fi
-  exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
-  as_lineno_1=$LINENO as_lineno_1a=$LINENO
-  as_lineno_2=$LINENO as_lineno_2a=$LINENO
-  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
-  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
-  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
-  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
-  # already done that, so ensure we don't try to do so again and fall
-  # in an infinite loop.  This has already happened in practice.
-  _as_can_reexec=no; export _as_can_reexec
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='        ';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='libsndfile'
-PACKAGE_TARNAME='libsndfile'
-PACKAGE_VERSION='1.0.26'
-PACKAGE_STRING='libsndfile 1.0.26'
-PACKAGE_BUGREPORT='sndfile@mega-nerd.com'
-PACKAGE_URL='http://www.mega-nerd.com/libsndfile/'
-
-ac_unique_file="src/sndfile.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='am__EXEEXT_FALSE
-am__EXEEXT_TRUE
-LTLIBOBJS
-LIBOBJS
-LIBTOOL_DEPS
-TEST_BINDIR
-SRC_BINDIR
-EXTERNAL_LIBS
-EXTERNAL_CFLAGS
-SNDIO_LIBS
-ALSA_LIBS
-OS_SPECIFIC_LINKS
-OS_SPECIFIC_CFLAGS
-HAVE_EXTERNAL_LIBS
-WIN_RC_VERSION
-CLEAN_VERSION
-SHARED_VERSION_INFO
-SHLIB_VERSION_ARG
-HTML_FGCOLOUR
-HTML_BGCOLOUR
-HOST_TRIPLET
-GCC_MINOR_VERSION
-GCC_MAJOR_VERSION
-GCC_VERSION
-USE_WIN_VERSION_FILE_FALSE
-USE_WIN_VERSION_FILE_TRUE
-SQLITE3_LIBS
-SQLITE3_CFLAGS
-VORBISENC_LIBS
-VORBISENC_CFLAGS
-VORBIS_LIBS
-VORBIS_CFLAGS
-SPEEX_LIBS
-SPEEX_CFLAGS
-OGG_LIBS
-OGG_CFLAGS
-FLAC_LIBS
-FLAC_CFLAGS
-pkgconfigdir
-PKG_CONFIG_LIBDIR
-PKG_CONFIG_PATH
-PKG_CONFIG
-OCTAVE_DEST_MDIR
-OCTAVE_DEST_ODIR
-OCTAVE_CONFIG_VERSION
-OCTAVE_CONFIG
-HAVE_OCTAVE_CONFIG
-MKOCTFILE_VERSION
-MKOCTFILE
-HAVE_MKOCTFILE
-OCTAVE
-OCTAVE_VERSION
-HAVE_OCTAVE
-BUILD_OCTAVE_MOD_FALSE
-BUILD_OCTAVE_MOD_TRUE
-SF_COUNT_MAX
-SIZEOF_SF_COUNT_T
-TYPEOF_SF_COUNT_T
-ENABLE_TEST_COVERAGE_FALSE
-ENABLE_TEST_COVERAGE_TRUE
-LINUX_MINGW_CROSS_TEST_FALSE
-LINUX_MINGW_CROSS_TEST_TRUE
-HAVE_XCODE_SELECT
-HAVE_WINE
-HAVE_AUTOGEN
-RC
-CXXCPP
-OTOOL64
-OTOOL
-LIPO
-NMEDIT
-DSYMUTIL
-MANIFEST_TOOL
-RANLIB
-ac_ct_AR
-AR
-DLLTOOL
-OBJDUMP
-LN_S
-NM
-ac_ct_DUMPBIN
-DUMPBIN
-LD
-FGREP
-LIBTOOL
-SED
-am__fastdepCXX_FALSE
-am__fastdepCXX_TRUE
-CXXDEPMODE
-ac_ct_CXX
-CXXFLAGS
-CXX
-EGREP
-GREP
-CPP
-am__fastdepCC_FALSE
-am__fastdepCC_TRUE
-CCDEPMODE
-am__nodep
-AMDEPBACKSLASH
-AMDEP_FALSE
-AMDEP_TRUE
-am__quote
-am__include
-DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
-AM_DEFAULT_V
-AM_V
-am__untar
-am__tar
-AMTAR
-am__leading_dot
-SET_MAKE
-AWK
-mkdir_p
-MKDIR_P
-INSTALL_STRIP_PROGRAM
-STRIP
-install_sh
-MAKEINFO
-AUTOHEADER
-AUTOMAKE
-AUTOCONF
-ACLOCAL
-VERSION
-PACKAGE
-CYGPATH_W
-am__isrc
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-target_os
-target_vendor
-target_cpu
-target
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-runstatedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_silent_rules
-enable_dependency_tracking
-enable_shared
-enable_static
-with_pic
-enable_fast_install
-with_gnu_ld
-with_sysroot
-enable_libtool_lock
-enable_experimental
-enable_werror
-enable_stack_smash_protection
-enable_gcc_pipe
-enable_gcc_opt
-enable_cpu_clip
-enable_bow_docs
-enable_sqlite
-enable_alsa
-enable_external_libs
-enable_octave
-enable_test_coverage
-enable_largefile
-with_octave
-with_mkoctfile
-with_octave_config
-with_pkgconfigdir
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP
-CXX
-CXXFLAGS
-CCC
-CXXCPP
-PKG_CONFIG
-PKG_CONFIG_PATH
-PKG_CONFIG_LIBDIR
-FLAC_CFLAGS
-FLAC_LIBS
-OGG_CFLAGS
-OGG_LIBS
-SPEEX_CFLAGS
-SPEEX_LIBS
-VORBIS_CFLAGS
-VORBIS_LIBS
-VORBISENC_CFLAGS
-VORBISENC_LIBS
-SQLITE3_CFLAGS
-SQLITE3_LIBS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *=)   ac_optarg= ;;
-  *)    ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-        ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-        ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$ac_optarg ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -runstatedir | --runstatedir | --runstatedi | --runstated \
-  | --runstate | --runstat | --runsta | --runst | --runs \
-  | --run | --ru | --r)
-    ac_prev=runstatedir ;;
-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-  | --run=* | --ru=* | --r=*)
-    runstatedir=$ac_optarg ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-        ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-        ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=no ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    case $ac_envvar in #(
-      '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
-    esac
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
-               datadir sysconfdir sharedstatedir localstatedir includedir \
-               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir runstatedir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_myself" : 'X\(//\)[^/]' \| \
-        X"$as_myself" : 'X\(//\)$' \| \
-        X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
-       pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures libsndfile 1.0.26 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking ...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/libsndfile]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-Program names:
-  --program-prefix=PREFIX            prepend PREFIX to installed program names
-  --program-suffix=SUFFIX            append SUFFIX to installed program names
-  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of libsndfile 1.0.26:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-silent-rules   less verbose build output (undo: "make V=1")
-  --disable-silent-rules  verbose build output (undo: "make V=0")
-  --enable-dependency-tracking
-                          do not reject slow dependency extractors
-  --disable-dependency-tracking
-                          speeds up one-time build
-  --enable-shared[=PKGS]  build shared libraries [default=yes]
-  --enable-static[=PKGS]  build static libraries [default=yes]
-  --enable-fast-install[=PKGS]
-                          optimize for fast installation [default=yes]
-  --disable-libtool-lock  avoid locking (might break parallel builds)
-  --enable-experimental   enable experimental code
-  --enable-werror         enable -Werror in all Makefiles
-  --enable-stack-smash-protection
-                          Enable GNU GCC stack smash protection
-  --disable-gcc-pipe      disable gcc -pipe option
-  --disable-gcc-opt       disable gcc optimisations
-  --disable-cpu-clip      disable tricky cpu specific clipper
-  --enable-bow-docs       enable black-on-white html docs
-  --disable-sqlite        disable use of sqlite
-  --disable-alsa          disable use of ALSA
-  --disable-external-libs disable use of FLAC, Ogg and Vorbis [[default=no]]
-  --enable-octave         disable building of GNU Octave module
-  --enable-test-coverage  enable test coverage
-  --disable-largefile     omit support for large files
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
-                          both]
-  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
-  --with-sysroot=DIR Search for dependent libraries within DIR
-                        (or the compiler's sysroot if not specified).
-  --with-octave           choose the octave version
-  --with-mkoctfile        choose the mkoctfile version
-  --with-octave-config    choose the octave-config version
-  --with-pkgconfigdir     pkg-config installation directory
-                          ['${libdir}/pkgconfig']
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-  CXX         C++ compiler command
-  CXXFLAGS    C++ compiler flags
-  CXXCPP      C++ preprocessor
-  PKG_CONFIG  path to pkg-config utility
-  PKG_CONFIG_PATH
-              directories to add to pkg-config's search path
-  PKG_CONFIG_LIBDIR
-              path overriding pkg-config's built-in search path
-  FLAC_CFLAGS C compiler flags for FLAC, overriding pkg-config
-  FLAC_LIBS   linker flags for FLAC, overriding pkg-config
-  OGG_CFLAGS  C compiler flags for OGG, overriding pkg-config
-  OGG_LIBS    linker flags for OGG, overriding pkg-config
-  SPEEX_CFLAGS
-              C compiler flags for SPEEX, overriding pkg-config
-  SPEEX_LIBS  linker flags for SPEEX, overriding pkg-config
-  VORBIS_CFLAGS
-              C compiler flags for VORBIS, overriding pkg-config
-  VORBIS_LIBS linker flags for VORBIS, overriding pkg-config
-  VORBISENC_CFLAGS
-              C compiler flags for VORBISENC, overriding pkg-config
-  VORBISENC_LIBS
-              linker flags for VORBISENC, overriding pkg-config
-  SQLITE3_CFLAGS
-              C compiler flags for SQLITE3, overriding pkg-config
-  SQLITE3_LIBS
-              linker flags for SQLITE3, overriding pkg-config
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <sndfile@mega-nerd.com>.
-libsndfile home page: <http://www.mega-nerd.com/libsndfile/>.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-libsndfile configure 1.0.26
-generated by GNU Autoconf 2.69
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval \${$3+:} false; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ------------------------------------ ##
-## Report this to sndfile@mega-nerd.com ##
-## ------------------------------------ ##"
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-       $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
-# ac_fn_cxx_try_compile LINENO
-# ----------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-        test -z "$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_compile
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        test -x conftest$ac_exeext
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=1
-fi
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-  # interfere with the next link command; also delete a directory that is
-  # left behind by Apple's compiler.  We do this before executing the actions.
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_func
-
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_cpp
-
-# ac_fn_cxx_try_link LINENO
-# -------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_link ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-        test -z "$ac_cxx_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        test -x conftest$ac_exeext
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=1
-fi
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-  # interfere with the next link command; also delete a directory that is
-  # left behind by Apple's compiler.  We do this before executing the actions.
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_link
-
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
-# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  as_decl_name=`echo $2|sed 's/ *(.*//'`
-  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-#ifndef $as_decl_name
-#ifdef __cplusplus
-  (void) $as_decl_use;
-#else
-  (void) $as_decl_name;
-#endif
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_decl
-
-# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
-# --------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_c_compute_int ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if test "$cross_compiling" = yes; then
-    # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid; break
-else
-  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
-                       if test $ac_lo -le $ac_mid; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_lo=$ac_mid; break
-else
-  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
-                       if test $ac_mid -le $ac_hi; then
-                         ac_lo= ac_hi=
-                         break
-                       fi
-                       as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  ac_lo= ac_hi=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid
-else
-  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in #((
-?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
-'') ac_retval=1 ;;
-esac
-  else
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (($2) < 0)
-    {
-      long int i = longval ();
-      if (i != ($2))
-       return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ($2))
-       return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
-  ac_retval=1
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-rm -f conftest.val
-
-  fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_compute_int
-
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=no"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof ($2))
-        return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
-           return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_type
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by libsndfile $as_me 1.0.26, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
-  done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
-    2)
-      as_fn_append ac_configure_args1 " '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-       ac_must_keep_next=false # Got value, back to normal.
-      else
-       case $ac_arg in
-         *=* | --config-cache | -C | -disable-* | --disable-* \
-         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-         | -with-* | --with-* | -without-* | --without-* | --x)
-           case "$ac_configure_args0 " in
-             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-           esac
-           ;;
-         -* ) ac_must_keep_next=true ;;
-       esac
-      fi
-      as_fn_append ac_configure_args " '$ac_arg'"
-      ;;
-    esac
-  done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-       "s/'\''/'\''\\\\'\'''\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
-      echo
-      for ac_var in $ac_subst_files
-      do
-       eval ac_val=\$$ac_var
-       case $ac_val in
-       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-       esac
-       $as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  # We do not want a PATH search for config.site.
-  case $CONFIG_SITE in #((
-    -*)  ac_site_file1=./$CONFIG_SITE;;
-    */*) ac_site_file1=$CONFIG_SITE;;
-    *)   ac_site_file1=./$CONFIG_SITE;;
-  esac
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file" \
-      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special files
-  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
-  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-       # differences in whitespace do not lead to failure.
-       ac_old_val_w=`echo x $ac_old_val`
-       ac_new_val_w=`echo x $ac_new_val`
-       if test "$ac_old_val_w" != "$ac_new_val_w"; then
-         { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-         ac_cache_corrupted=:
-       else
-         { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-         eval $ac_var=\$ac_old_val
-       fi
-       { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-# Put config stuff in Cfg.
-ac_aux_dir=
-for ac_dir in Cfg "$srcdir"/Cfg; do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error $? "cannot find install-sh, install.sh, or shtool in Cfg \"$srcdir\"/Cfg" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if ${ac_cv_target+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$target_alias" = x; then
-  ac_cv_target=$ac_cv_host
-else
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-
-ac_config_headers="$ac_config_headers src/config.h"
-
-
-am__api_version='1.15'
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
-  ./ | .// | /[cC]/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-       if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-         if test $ac_prog = install &&
-           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-           # AIX install.  It has an incompatible calling convention.
-           :
-         elif test $ac_prog = install &&
-           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-           # program-specific install script used by HP pwplus--don't use.
-           :
-         else
-           rm -rf conftest.one conftest.two conftest.dir
-           echo one > conftest.one
-           echo two > conftest.two
-           mkdir conftest.dir
-           if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-             test -s conftest.one && test -s conftest.two &&
-             test -s conftest.dir/conftest.one &&
-             test -s conftest.dir/conftest.two
-           then
-             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-             break 3
-           fi
-         fi
-       fi
-      done
-    done
-    ;;
-esac
-
-  done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name.  Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
-  *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
-esac
-case $srcdir in
-  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
-esac
-
-# Do 'set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   am_has_slept=no
-   for am_try in 1 2; do
-     echo "timestamp, slept: $am_has_slept" > conftest.file
-     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
-     if test "$*" = "X"; then
-       # -L didn't work.
-       set X `ls -t "$srcdir/configure" conftest.file`
-     fi
-     if test "$*" != "X $srcdir/configure conftest.file" \
-       && test "$*" != "X conftest.file $srcdir/configure"; then
-
-       # If neither matched, then we have a broken ls.  This can happen
-       # if, for instance, CONFIG_SHELL is bash and it inherits a
-       # broken ls alias from the environment.  This has actually
-       # happened.  Such a system could not be considered "sane".
-       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
-  alias in your environment" "$LINENO" 5
-     fi
-     if test "$2" = conftest.file || test $am_try -eq 2; then
-       break
-     fi
-     # Just in case.
-     sleep 1
-     am_has_slept=yes
-   done
-   test "$2" = conftest.file
-   )
-then
-   # Ok.
-   :
-else
-   as_fn_error $? "newly created file is older than distributed files!
-Check your system clock" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-# If we didn't sleep, we still need to ensure time stamps of config.status and
-# generated files are strictly newer.
-am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
-  ( sleep 1 ) &
-  am_sleep_pid=$!
-fi
-
-rm -f conftest.file
-
-test "$program_prefix" != NONE &&
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
-
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --is-lightweight"; then
-  am_missing_run="$MISSING "
-else
-  am_missing_run=
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
-fi
-
-if test x"${install_sh+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
-  *)
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
-  esac
-fi
-
-# Installed binaries are usually stripped using 'strip' when the user
-# run "make install-strip".  However 'strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the 'STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-if test -z "$MKDIR_P"; then
-  if ${ac_cv_path_mkdir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in mkdir gmkdir; do
-        for ac_exec_ext in '' $ac_executable_extensions; do
-          as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
-          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
-            'mkdir (GNU coreutils) '* | \
-            'mkdir (coreutils) '* | \
-            'mkdir (fileutils) '4.1*)
-              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
-              break 3;;
-          esac
-        done
-       done
-  done
-IFS=$as_save_IFS
-
-fi
-
-  test -d ./--version && rmdir ./--version
-  if test "${ac_cv_path_mkdir+set}" = set; then
-    MKDIR_P="$ac_cv_path_mkdir -p"
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for MKDIR_P within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    MKDIR_P="$ac_install_sh -d"
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
-$as_echo "$MKDIR_P" >&6; }
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-       @echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
-  am__leading_dot=.
-else
-  am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
-  enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in # (((
-  yes) AM_DEFAULT_VERBOSITY=0;;
-   no) AM_DEFAULT_VERBOSITY=1;;
-    *) AM_DEFAULT_VERBOSITY=1;;
-esac
-am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if $as_echo 'TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
-am__doit:
-       @$(TRUE)
-.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
-  am_cv_make_support_nested_variables=yes
-else
-  am_cv_make_support_nested_variables=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
-    AM_V='$(V)'
-  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
-  AM_V=$AM_DEFAULT_VERBOSITY
-  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
-AM_BACKSLASH='\'
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
-  # is not polluted with repeated "-I."
-  am__isrc=' -I$(srcdir)'
-  # test to see if srcdir already configured
-  if test -f $srcdir/config.status; then
-    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
-  fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
-  if (cygpath --version) >/dev/null 2>/dev/null; then
-    CYGPATH_W='cygpath -w'
-  else
-    CYGPATH_W=echo
-  fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='libsndfile'
- VERSION='1.0.26'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-# For better backward compatibility.  To be removed once Automake 1.9.x
-# dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-mkdir_p='$(MKDIR_P)'
-
-# We need awk for the "check" target (and possibly the TAP driver).  The
-# system "awk" is bad on some platforms.
-# Always define AMTAR for backward compatibility.  Yes, it's still used
-# in the wild :-(  We should find a proper way to deprecate it ...
-AMTAR='$${TAR-tar}'
-
-
-# We'll loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar  pax cpio none'
-
-am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
-
-
-
-
-
-
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes.  So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
-  cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present.  This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
-
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message.  This
-can help us improve future automake versions.
-
-END
-  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
-    echo 'Configuration will proceed anyway, since you have set the' >&2
-    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
-    echo >&2
-  else
-    cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
-    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
-  fi
-fi
-
-# Check whether --enable-silent-rules was given.
-if test "${enable_silent_rules+set}" = set; then :
-  enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in # (((
-  yes) AM_DEFAULT_VERBOSITY=0;;
-   no) AM_DEFAULT_VERBOSITY=1;;
-    *) AM_DEFAULT_VERBOSITY=0;;
-esac
-am_make=${MAKE-make}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
-if ${am_cv_make_support_nested_variables+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if $as_echo 'TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
-am__doit:
-       @$(TRUE)
-.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
-  am_cv_make_support_nested_variables=yes
-else
-  am_cv_make_support_nested_variables=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
-    AM_V='$(V)'
-  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
-  AM_V=$AM_DEFAULT_VERBOSITY
-  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
-AM_BACKSLASH='\'
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
-       @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
-  enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
-  am_depcomp="$ac_aux_dir/depcomp"
-  AMDEPBACKSLASH='\'
-  am__nodep='_no'
-fi
- if test "x$enable_dependency_tracking" != xno; then
-  AMDEP_TRUE=
-  AMDEP_FALSE='#'
-else
-  AMDEP_TRUE='#'
-  AMDEP_FALSE=
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-       ;;
-    [ab].out )
-       # We found the default executable, but exeext='' is most
-       # certainly right.
-       break;;
-    *.* )
-       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-       then :; else
-          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-       fi
-       # We set ac_cv_exeext here because the later test for it is not
-       # safe: cross compilers may not add the suffix if given an `-o'
-       # argument, so we may need to know it at that point already.
-       # Even if this section looks crufty: it has the advantage of
-       # actually working.
-       break;;
-    * )
-       break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-         break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
-  { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-  if { ac_try='./conftest$ac_cv_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-       cross_compiling=yes
-    else
-       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-        CFLAGS="-g"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-  # Make sure it works both with $CC and with simple cc.
-  # Following AC_PROG_CC_C_O, we do the test twice because some
-  # compilers refuse to overwrite an existing .o file with -o,
-  # though they will create one.
-  am_cv_prog_cc_c_o=yes
-  for am_i in 1 2; do
-    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
-   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); } \
-         && test -f conftest2.$ac_objext; then
-      : OK
-    else
-      am_cv_prog_cc_c_o=no
-      break
-    fi
-  done
-  rm -f core conftest*
-  unset am_i
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
-if test "$am_cv_prog_cc_c_o" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-depcc="$CC"   am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CC_dependencies_compiler_type+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named 'D' -- because '-MD' means "put the output
-  # in D".
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CC_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  am__universal=false
-  case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
-      # Solaris 10 /bin/sh.
-      echo '/* dummy */' > sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with '-c' and '-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs.
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # After this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested.
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok '-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CC_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-  am__fastdepCC_TRUE=
-  am__fastdepCC_FALSE='#'
-else
-  am__fastdepCC_TRUE='#'
-  am__fastdepCC_FALSE=
-fi
-
-
-   case $ac_cv_prog_cc_stdc in #(
-  no) :
-    ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
-  *) :
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
-if ${ac_cv_prog_cc_c99+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c99=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros.  These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
-  int x = 1234;
-  int y = 5678;
-  debug ("Flag");
-  debug ("X = %d\n", x);
-  showlist (The first, second, and third items.);
-  report (x>y, "x is %d but y is %d", x, y);
-}
-
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
-  your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
-  your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-
-struct incomplete_array
-{
-  int datasize;
-  double data[];
-};
-
-struct named_init {
-  int number;
-  const wchar_t *name;
-  double average;
-};
-
-typedef const char *ccp;
-
-static inline int
-test_restrict (ccp restrict text)
-{
-  // See if C++-style comments work.
-  // Iterate through items via the restricted pointer.
-  // Also check for declarations in for loops.
-  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
-    continue;
-  return 0;
-}
-
-// Check varargs and va_copy.
-static void
-test_varargs (const char *format, ...)
-{
-  va_list args;
-  va_start (args, format);
-  va_list args_copy;
-  va_copy (args_copy, args);
-
-  const char *str;
-  int number;
-  float fnumber;
-
-  while (*format)
-    {
-      switch (*format++)
-       {
-       case 's': // string
-         str = va_arg (args_copy, const char *);
-         break;
-       case 'd': // int
-         number = va_arg (args_copy, int);
-         break;
-       case 'f': // float
-         fnumber = va_arg (args_copy, double);
-         break;
-       default:
-         break;
-       }
-    }
-  va_end (args_copy);
-  va_end (args);
-}
-
-int
-main ()
-{
-
-  // Check bool.
-  _Bool success = false;
-
-  // Check restrict.
-  if (test_restrict ("String literal") == 0)
-    success = true;
-  char *restrict newvar = "Another string";
-
-  // Check varargs.
-  test_varargs ("s, d' f .", "string", 65, 34.234);
-  test_varargs_macros ();
-
-  // Check flexible array members.
-  struct incomplete_array *ia =
-    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
-  ia->datasize = 10;
-  for (int i = 0; i < ia->datasize; ++i)
-    ia->data[i] = i * 1.234;
-
-  // Check named initializers.
-  struct named_init ni = {
-    .number = 34,
-    .name = L"Test wide string",
-    .average = 543.34343,
-  };
-
-  ni.number = 58;
-
-  int dynamic_array[ni.number];
-  dynamic_array[ni.number - 1] = 543;
-
-  // work around unused variable warnings
-  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
-         || dynamic_array[ni.number - 1] != 543);
-
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c99=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c99" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c99" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c99"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno; then :
-  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
-else
-  ac_cv_prog_cc_stdc=no
-fi
-
-fi
- ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
-$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
-  if ${ac_cv_prog_cc_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-
-  case $ac_cv_prog_cc_stdc in #(
-  no) :
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;; #(
-  '') :
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;; #(
-  *) :
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
-$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
-esac
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if ${ac_cv_prog_CPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                 inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
-  MINIX=yes
-else
-  MINIX=
-fi
-
-
-  if test "$MINIX" = yes; then
-
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
-
-
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
-
-
-$as_echo "#define _MINIX 1" >>confdefs.h
-
-  fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if ${ac_cv_safe_to_define___extensions__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#         define __EXTENSIONS__ 1
-          $ac_includes_default
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_define___extensions__=yes
-else
-  ac_cv_safe_to_define___extensions__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
-  test $ac_cv_safe_to_define___extensions__ = yes &&
-    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
-  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
-  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
-  if test -n "$CCC"; then
-    CXX=$CCC
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CXX" && break
-  done
-fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CXX"; then
-  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CXX="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CXX" && break
-done
-
-  if test "x$ac_ct_CXX" = x; then
-    CXX="g++"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CXX=$ac_ct_CXX
-  fi
-fi
-
-  fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if ${ac_cv_cxx_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GXX=yes
-else
-  GXX=
-fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if ${ac_cv_prog_cxx_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
-   ac_cxx_werror_flag=yes
-   ac_cv_prog_cxx_g=no
-   CXXFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cxx_g=yes
-else
-  CXXFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-else
-  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-        CXXFLAGS="-g"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cxx_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
-else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-depcc="$CXX"  am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
-  # We make a subdir and do the tests there.  Otherwise we can end up
-  # making bogus files that we don't know about and never remove.  For
-  # instance it was reported that on HP-UX the gcc test will end up
-  # making a dummy file named 'D' -- because '-MD' means "put the output
-  # in D".
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  # Copy depcomp to subdir because otherwise we won't find it if we're
-  # using a relative directory.
-  cp "$am_depcomp" conftest.dir
-  cd conftest.dir
-  # We will build objects and dependencies in a subdirectory because
-  # it helps to detect inapplicable dependency modes.  For instance
-  # both Tru64's cc and ICC support -MD to output dependencies as a
-  # side effect of compilation, but ICC will put the dependencies in
-  # the current directory while Tru64 will put them in the object
-  # directory.
-  mkdir sub
-
-  am_cv_CXX_dependencies_compiler_type=none
-  if test "$am_compiler_list" = ""; then
-     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
-  fi
-  am__universal=false
-  case " $depcc " in #(
-     *\ -arch\ *\ -arch\ *) am__universal=true ;;
-     esac
-
-  for depmode in $am_compiler_list; do
-    # Setup a source with many dependencies, because some compilers
-    # like to wrap large dependency lists on column 80 (with \), and
-    # we should not choose a depcomp mode which is confused by this.
-    #
-    # We need to recreate these files for each test, as the compiler may
-    # overwrite some of them when testing with obscure command lines.
-    # This happens at least with the AIX C compiler.
-    : > sub/conftest.c
-    for i in 1 2 3 4 5 6; do
-      echo '#include "conftst'$i'.h"' >> sub/conftest.c
-      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
-      # Solaris 10 /bin/sh.
-      echo '/* dummy */' > sub/conftst$i.h
-    done
-    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
-    # We check with '-c' and '-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs.
-    am__obj=sub/conftest.${OBJEXT-o}
-    am__minus_obj="-o $am__obj"
-    case $depmode in
-    gcc)
-      # This depmode causes a compiler race in universal mode.
-      test "$am__universal" = false || continue
-      ;;
-    nosideeffect)
-      # After this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested.
-      if test "x$enable_dependency_tracking" = xyes; then
-       continue
-      else
-       break
-      fi
-      ;;
-    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
-      # This compiler won't grok '-c -o', but also, the minuso test has
-      # not run yet.  These depmodes are late enough in the game, and
-      # so weak that their functioning should not be impacted.
-      am__obj=conftest.${OBJEXT-o}
-      am__minus_obj=
-      ;;
-    none) break ;;
-    esac
-    if depmode=$depmode \
-       source=sub/conftest.c object=$am__obj \
-       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
-         >/dev/null 2>conftest.err &&
-       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
-       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-      # icc doesn't choke on unknown options, it will just issue warnings
-      # or remarks (even with -Werror).  So we grep stderr for any message
-      # that says an option was ignored or not supported.
-      # When given -MP, icc 7.0 and 7.1 complain thusly:
-      #   icc: Command line warning: ignoring option '-M'; no argument required
-      # The diagnosis changed in icc 8.0:
-      #   icc: Command line remark: option '-MP' not supported
-      if (grep 'ignoring option' conftest.err ||
-          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
-        am_cv_CXX_dependencies_compiler_type=$depmode
-        break
-      fi
-    fi
-  done
-
-  cd ..
-  rm -rf conftest.dir
-else
-  am_cv_CXX_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
-CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
-
- if
-  test "x$enable_dependency_tracking" != xno \
-  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
-  am__fastdepCXX_TRUE=
-  am__fastdepCXX_FALSE='#'
-else
-  am__fastdepCXX_TRUE='#'
-  am__fastdepCXX_FALSE=
-fi
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the CLANG C compiler" >&5
-$as_echo_n "checking whether we are using the CLANG C compiler... " >&6; }
-if ${mn_cv_c_compiler_clang+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-
-                       #ifndef __clang__
-                               This is not clang!
-                       #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  mn_cv_c_compiler_clang=yes
-else
-  mn_cv_c_compiler_clang=no
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mn_cv_c_compiler_clang" >&5
-$as_echo "$mn_cv_c_compiler_clang" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-
-       if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-
-                       #ifdef __clang__
-                               This is clang!
-                       #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_c_compiler_gnu=yes
-else
-  ac_cv_c_compiler_gnu=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-               fi
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
-     for ac_i in 1 2 3 4 5 6 7; do
-       ac_script="$ac_script$as_nl$ac_script"
-     done
-     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
-     { ac_script=; unset ac_script;}
-     if test -z "$SED"; then
-  ac_path_SED_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_SED" || continue
-# Check for GNU ac_path_SED and select it if it is found.
-  # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
-  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo '' >> "conftest.nl"
-    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_SED_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_SED="$ac_path_SED"
-      ac_path_SED_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_SED_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_SED"; then
-    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
-  fi
-else
-  ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
-  rm -f conftest.sed
-
-
-# Do not check for F77.
-
-case `pwd` in
-  *\ * | *\    *)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
-esac
-
-
-
-macro_version='2.4.2'
-macro_revision='1.3337'
-
-
-
-
-
-
-
-
-
-
-
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-# Backslashify metacharacters that are still active within
-# double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
-$as_echo_n "checking how to print strings... " >&6; }
-# Test print first, because it will be a builtin if present.
-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
-   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
-  ECHO='print -r --'
-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-  ECHO='printf %s\n'
-else
-  # Use this function as a fallback that always works.
-  func_fallback_echo ()
-  {
-    eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-  }
-  ECHO='func_fallback_echo'
-fi
-
-# func_echo_all arg...
-# Invoke $ECHO with all args, space-separated.
-func_echo_all ()
-{
-    $ECHO ""
-}
-
-case "$ECHO" in
-  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
-$as_echo "printf" >&6; } ;;
-  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
-$as_echo "print -r" >&6; } ;;
-  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
-$as_echo "cat" >&6; } ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if ${ac_cv_path_SED+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
-     for ac_i in 1 2 3 4 5 6 7; do
-       ac_script="$ac_script$as_nl$ac_script"
-     done
-     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
-     { ac_script=; unset ac_script;}
-     if test -z "$SED"; then
-  ac_path_SED_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_SED" || continue
-# Check for GNU ac_path_SED and select it if it is found.
-  # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
-  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo '' >> "conftest.nl"
-    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_SED_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_SED="$ac_path_SED"
-      ac_path_SED_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_SED_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_SED"; then
-    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
-  fi
-else
-  ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
-  rm -f conftest.sed
-
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if ${ac_cv_path_FGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
-   then ac_cv_path_FGREP="$GREP -F"
-   else
-     if test -z "$FGREP"; then
-  ac_path_FGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in fgrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_FGREP" || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
-  # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'FGREP' >> "conftest.nl"
-    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_FGREP="$ac_path_FGREP"
-      ac_path_FGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_FGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_FGREP"; then
-    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_FGREP=$FGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
-
-
-test -z "$GREP" && GREP=grep
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | ?:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
-      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if ${lt_cv_path_LD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-      *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if ${lt_cv_path_NM+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
-    lt_nm_to_check="$lt_nm_to_check nm"
-  fi
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-       # Check to see if the nm accepts a BSD-compat flag.
-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-       #   nm: unknown option "B" ignored
-       # Tru64's nm complains that /dev/null is an invalid object file
-       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-       */dev/null* | *'Invalid file or object type'*)
-         lt_cv_path_NM="$tmp_nm -B"
-         break
-         ;;
-       *)
-         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-         */dev/null*)
-           lt_cv_path_NM="$tmp_nm -p"
-           break
-           ;;
-         *)
-           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-           continue # so that we can try to find one that supports BSD flags
-           ;;
-         esac
-         ;;
-       esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  : ${lt_cv_path_NM=no}
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
-else
-  # Didn't find any BSD compatible name lister, look for dumpbin.
-  if test -n "$DUMPBIN"; then :
-    # Let the user override the test.
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in dumpbin "link -dump"
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DUMPBIN+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DUMPBIN"; then
-  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$DUMPBIN" && break
-  done
-fi
-if test -z "$DUMPBIN"; then
-  ac_ct_DUMPBIN=$DUMPBIN
-  for ac_prog in dumpbin "link -dump"
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_DUMPBIN"; then
-  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
-if test -n "$ac_ct_DUMPBIN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_DUMPBIN" && break
-done
-
-  if test "x$ac_ct_DUMPBIN" = x; then
-    DUMPBIN=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    DUMPBIN=$ac_ct_DUMPBIN
-  fi
-fi
-
-    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
-    *COFF*)
-      DUMPBIN="$DUMPBIN -symbols"
-      ;;
-    *)
-      DUMPBIN=:
-      ;;
-    esac
-  fi
-
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
-  fi
-fi
-test -z "$NM" && NM=nm
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if ${lt_cv_nm_interface+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_nm_interface="BSD nm"
-  echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
-  (eval "$ac_compile" 2>conftest.err)
-  cat conftest.err >&5
-  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
-  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
-  cat conftest.err >&5
-  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
-  cat conftest.out >&5
-  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
-    lt_cv_nm_interface="MS dumpbin"
-  fi
-  rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-# find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if ${lt_cv_sys_max_cmd_len+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-    i=0
-  teststring="ABCD"
-
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
-
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
-
-  cygwin* | mingw* | cegcc*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  mint*)
-    # On MiNT this can take a long time and run out of memory.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  amigaos*)
-    # On AmigaOS with pdksh, this test takes hours, literally.
-    # So we just punt and use a minimum line length of 8192.
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
-
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
-    # This has been around since 386BSD, at least.  Likely further.
-    if test -x /sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
-    elif test -x /usr/sbin/sysctl; then
-      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
-    else
-      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
-    fi
-    # And add a safety zone
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    ;;
-
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
-
-  os2*)
-    # The test takes a long time on OS/2.
-    lt_cv_sys_max_cmd_len=8192
-    ;;
-
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[         ]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len" && \
-       test undefined != "$lt_cv_sys_max_cmd_len"; then
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
-    else
-      # Make teststring a little bigger before we do anything with it.
-      # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
-        teststring=$teststring$teststring
-      done
-      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-      # If test is not a shell built-in, we'll probably end up computing a
-      # maximum length that is only half of the actual maximum length, but
-      # we can't tell.
-      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
-                = "X$teststring$teststring"; } >/dev/null 2>&1 &&
-             test $i != 17 # 1/2 MB should be enough
-      do
-        i=`expr $i + 1`
-        teststring=$teststring$teststring
-      done
-      # Only check the string length outside the loop.
-      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
-      teststring=
-      # Add a significant safety factor because C++ compilers can tack on
-      # massive amounts of additional arguments before passing them to the
-      # linker.  It appears as though 1/2 is a usable value.
-      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
-    fi
-    ;;
-  esac
-
-fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-
-
-
-
-
-: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,b/c, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  lt_unset=unset
-else
-  lt_unset=false
-fi
-
-
-
-
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  lt_SP2NL='tr \040 \012'
-  lt_NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  lt_SP2NL='tr \100 \n'
-  lt_NL2SP='tr \r\n \100\100'
-  ;;
-esac
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
-$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
-if ${lt_cv_to_host_file_cmd+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $host in
-  *-*-mingw* )
-    case $build in
-      *-*-mingw* ) # actually msys
-        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
-        ;;
-      *-*-cygwin* )
-        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
-        ;;
-      * ) # otherwise, assume *nix
-        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
-        ;;
-    esac
-    ;;
-  *-*-cygwin* )
-    case $build in
-      *-*-mingw* ) # actually msys
-        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
-        ;;
-      *-*-cygwin* )
-        lt_cv_to_host_file_cmd=func_convert_file_noop
-        ;;
-      * ) # otherwise, assume *nix
-        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
-        ;;
-    esac
-    ;;
-  * ) # unhandled hosts (and "normal" native builds)
-    lt_cv_to_host_file_cmd=func_convert_file_noop
-    ;;
-esac
-
-fi
-
-to_host_file_cmd=$lt_cv_to_host_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
-$as_echo "$lt_cv_to_host_file_cmd" >&6; }
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
-$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
-if ${lt_cv_to_tool_file_cmd+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  #assume ordinary cross tools, or native build.
-lt_cv_to_tool_file_cmd=func_convert_file_noop
-case $host in
-  *-*-mingw* )
-    case $build in
-      *-*-mingw* ) # actually msys
-        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
-        ;;
-    esac
-    ;;
-esac
-
-fi
-
-to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
-$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if ${lt_cv_ld_reload_flag+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_ld_reload_flag='-r'
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    if test "$GCC" != yes; then
-      reload_cmds=false
-    fi
-    ;;
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OBJDUMP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$OBJDUMP"; then
-  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
-  ac_ct_OBJDUMP=$OBJDUMP
-  # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_OBJDUMP"; then
-  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_OBJDUMP="objdump"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_OBJDUMP" = x; then
-    OBJDUMP="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    OBJDUMP=$ac_ct_OBJDUMP
-  fi
-else
-  OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if ${lt_cv_deplibs_check_method+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[4-9]*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi[45]*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin*)
-  # func_win32_libid is a shell function defined in ltmain.sh
-  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-  lt_cv_file_magic_cmd='func_win32_libid'
-  ;;
-
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump',
-  # unless we find 'file', for example because we are cross-compiling.
-  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
-  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
-    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
-    lt_cv_file_magic_cmd='func_win32_libid'
-  else
-    # Keep this pattern in sync with the one in func_win32_libid.
-    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
-    lt_cv_file_magic_cmd='$OBJDUMP -f'
-  fi
-  ;;
-
-cegcc*)
-  # use the weaker test based on 'objdump'. See mingw*.
-  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-freebsd* | dragonfly*)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-haiku*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
-
-interix[3-9]*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-netbsd* | netbsdelf*-gnu)
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-*nto* | *qnx*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-rdos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.3*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  esac
-  ;;
-
-tpf*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
-
-file_magic_glob=
-want_nocaseglob=no
-if test "$build" = "$host"; then
-  case $host_os in
-  mingw* | pw32*)
-    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
-      want_nocaseglob=yes
-    else
-      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
-    fi
-    ;;
-  esac
-fi
-
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DLLTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DLLTOOL"; then
-  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
-  ac_ct_DLLTOOL=$DLLTOOL
-  # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_DLLTOOL"; then
-  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_DLLTOOL" = x; then
-    DLLTOOL="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    DLLTOOL=$ac_ct_DLLTOOL
-  fi
-else
-  DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
-$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
-if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_sharedlib_from_linklib_cmd='unknown'
-
-case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
-  # two different shell functions defined in ltmain.sh
-  # decide which to use based on capabilities of $DLLTOOL
-  case `$DLLTOOL --help 2>&1` in
-  *--identify-strict*)
-    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
-    ;;
-  *)
-    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
-    ;;
-  esac
-  ;;
-*)
-  # fallback: assume linklib IS sharedlib
-  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
-  ;;
-esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
-$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
-sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
-test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in ar
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$AR" && break
-  done
-fi
-if test -z "$AR"; then
-  ac_ct_AR=$AR
-  for ac_prog in ar
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_AR="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_AR" && break
-done
-
-  if test "x$ac_ct_AR" = x; then
-    AR="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
-  fi
-fi
-
-: ${AR=ar}
-: ${AR_FLAGS=cru}
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
-$as_echo_n "checking for archiver @FILE support... " >&6; }
-if ${lt_cv_ar_at_file+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_ar_at_file=no
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  echo conftest.$ac_objext > conftest.lst
-      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
-      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
-  (eval $lt_ar_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-      if test "$ac_status" -eq 0; then
-       # Ensure the archiver fails upon bogus file names.
-       rm -f conftest.$ac_objext libconftest.a
-       { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
-  (eval $lt_ar_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-       if test "$ac_status" -ne 0; then
-          lt_cv_ar_at_file=@
-        fi
-      fi
-      rm -f conftest.* libconftest.a
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
-$as_echo "$lt_cv_ar_at_file" >&6; }
-
-if test "x$lt_cv_ar_at_file" = xno; then
-  archiver_list_spec=
-else
-  archiver_list_spec=$lt_cv_ar_at_file
-fi
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-test -z "$STRIP" && STRIP=:
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-test -z "$RANLIB" && RANLIB=:
-
-
-
-
-
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
-fi
-
-case $host_os in
-  darwin*)
-    lock_old_archive_extraction=yes ;;
-  *)
-    lock_old_archive_extraction=no ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if ${lt_cv_sys_global_symbol_pipe+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[BCDT]'
-  ;;
-cygwin* | mingw* | pw32* | cegcc*)
-  symcode='[ABCDGISTW]'
-  ;;
-hpux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[ABCDEGRST]'
-  fi
-  ;;
-irix* | nonstopux*)
-  symcode='[BCDEGRST]'
-  ;;
-osf*)
-  symcode='[BCDEGQRST]'
-  ;;
-solaris*)
-  symcode='[BDRT]'
-  ;;
-sco3.2v5*)
-  symcode='[DT]'
-  ;;
-sysv4.2uw2*)
-  symcode='[DT]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[ABDT]'
-  ;;
-sysv4)
-  symcode='[DFNSTU]'
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
-
-  # Write the raw and C identifiers.
-  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
-    # Also find C++ and __fastcall symbols from MSVC++,
-    # which start with @ or ?.
-    lt_cv_sys_global_symbol_pipe="$AWK '"\
-"     {last_section=section; section=\$ 3};"\
-"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
-"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-"     \$ 0!~/External *\|/{next};"\
-"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-"     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-"     ' prfx=^$ac_symprfx"
-  else
-    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[     ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
-  fi
-  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-
-  rm -f conftest*
-  cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
-  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
-  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-       mv -f "$nlist"T "$nlist"
-      else
-       rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
-       if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
-         cat <<_LT_EOF > conftest.$ac_ext
-/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
-   relocations are performed -- see ld's documentation on pseudo-relocs.  */
-# define LT_DLSYM_CONST
-#elif defined(__osf__)
-/* This system does not cope well with relocations in const data.  */
-# define LT_DLSYM_CONST
-#else
-# define LT_DLSYM_CONST const
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
-         # Now generate the symbol file.
-         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
-         cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols.  */
-LT_DLSYM_CONST struct {
-  const char *name;
-  void       *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[] =
-{
-  { "@PROGRAM@", (void *) 0 },
-_LT_EOF
-         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
-         cat <<\_LT_EOF >> conftest.$ac_ext
-  {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
-         # Now try linking the two files.
-         mv conftest.$ac_objext conftstm.$ac_objext
-         lt_globsym_save_LIBS=$LIBS
-         lt_globsym_save_CFLAGS=$CFLAGS
-         LIBS="conftstm.$ac_objext"
-         CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
-         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
-           pipe_works=yes
-         fi
-         LIBS=$lt_globsym_save_LIBS
-         CFLAGS=$lt_globsym_save_CFLAGS
-       else
-         echo "cannot find nm_test_func in $nlist" >&5
-       fi
-      else
-       echo "cannot find nm_test_var in $nlist" >&5
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
-    fi
-  else
-    echo "$progname: failed program was:" >&5
-    cat conftest.$ac_ext >&5
-  fi
-  rm -rf conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-
-fi
-
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-fi
-
-# Response file support.
-if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-  nm_file_list_spec='@'
-elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
-  nm_file_list_spec='@'
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
-$as_echo_n "checking for sysroot... " >&6; }
-
-# Check whether --with-sysroot was given.
-if test "${with_sysroot+set}" = set; then :
-  withval=$with_sysroot;
-else
-  with_sysroot=no
-fi
-
-
-lt_sysroot=
-case ${with_sysroot} in #(
- yes)
-   if test "$GCC" = yes; then
-     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
-   fi
-   ;; #(
- /*)
-   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
-   ;; #(
- no|'')
-   ;; #(
- *)
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
-$as_echo "${with_sysroot}" >&6; }
-   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
-   ;;
-esac
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
-$as_echo "${lt_sysroot:-no}" >&6; }
-
-
-
-
-
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
-  enableval=$enable_libtool_lock;
-fi
-
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.$ac_objext` in
-      *ELF-32*)
-       HPUX_IA64_MODE="32"
-       ;;
-      *ELF-64*)
-       HPUX_IA64_MODE="64"
-       ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
-  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
-      case `/usr/bin/file conftest.$ac_objext` in
-       *32-bit*)
-         LD="${LD-ld} -melf32bsmip"
-         ;;
-       *N32*)
-         LD="${LD-ld} -melf32bmipn32"
-         ;;
-       *64-bit*)
-         LD="${LD-ld} -melf64bmip"
-       ;;
-      esac
-    else
-      case `/usr/bin/file conftest.$ac_objext` in
-       *32-bit*)
-         LD="${LD-ld} -32"
-         ;;
-       *N32*)
-         LD="${LD-ld} -n32"
-         ;;
-       *64-bit*)
-         LD="${LD-ld} -64"
-         ;;
-      esac
-    fi
-  fi
-  rm -rf conftest*
-  ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.o` in
-      *32-bit*)
-       case $host in
-         x86_64-*kfreebsd*-gnu)
-           LD="${LD-ld} -m elf_i386_fbsd"
-           ;;
-         x86_64-*linux*)
-           case `/usr/bin/file conftest.o` in
-             *x86-64*)
-               LD="${LD-ld} -m elf32_x86_64"
-               ;;
-             *)
-               LD="${LD-ld} -m elf_i386"
-               ;;
-           esac
-           ;;
-         powerpc64le-*)
-           LD="${LD-ld} -m elf32lppclinux"
-           ;;
-         powerpc64-*)
-           LD="${LD-ld} -m elf32ppclinux"
-           ;;
-         s390x-*linux*)
-           LD="${LD-ld} -m elf_s390"
-           ;;
-         sparc64-*linux*)
-           LD="${LD-ld} -m elf32_sparc"
-           ;;
-       esac
-       ;;
-      *64-bit*)
-       case $host in
-         x86_64-*kfreebsd*-gnu)
-           LD="${LD-ld} -m elf_x86_64_fbsd"
-           ;;
-         x86_64-*linux*)
-           LD="${LD-ld} -m elf_x86_64"
-           ;;
-         powerpcle-*)
-           LD="${LD-ld} -m elf64lppc"
-           ;;
-         powerpc-*)
-           LD="${LD-ld} -m elf64ppc"
-           ;;
-         s390*-*linux*|s390*-*tpf*)
-           LD="${LD-ld} -m elf64_s390"
-           ;;
-         sparc*-*linux*)
-           LD="${LD-ld} -m elf64_sparc"
-           ;;
-       esac
-       ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if ${lt_cv_cc_needs_belf+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  lt_cv_cc_needs_belf=yes
-else
-  lt_cv_cc_needs_belf=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-     ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*)
-        case $host in
-        i?86-*-solaris*)
-          LD="${LD-ld} -m elf_x86_64"
-          ;;
-        sparc*-*-solaris*)
-          LD="${LD-ld} -m elf64_sparc"
-          ;;
-        esac
-        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
-        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
-          LD="${LD-ld}_sol2"
-        fi
-        ;;
-      *)
-       if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
-         LD="${LD-ld} -64"
-       fi
-       ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-esac
-
-need_locks="$enable_libtool_lock"
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
-set dummy ${ac_tool_prefix}mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$MANIFEST_TOOL"; then
-  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
-if test -n "$MANIFEST_TOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
-$as_echo "$MANIFEST_TOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
-  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
-  # Extract the first word of "mt", so it can be a program name with args.
-set dummy mt; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_MANIFEST_TOOL"; then
-  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
-if test -n "$ac_ct_MANIFEST_TOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
-$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_MANIFEST_TOOL" = x; then
-    MANIFEST_TOOL=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
-  fi
-else
-  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
-fi
-
-test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
-$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-if ${lt_cv_path_mainfest_tool+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_path_mainfest_tool=no
-  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
-  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
-  cat conftest.err >&5
-  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
-    lt_cv_path_mainfest_tool=yes
-  fi
-  rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
-$as_echo "$lt_cv_path_mainfest_tool" >&6; }
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
-  MANIFEST_TOOL=:
-fi
-
-
-
-
-
-
-  case $host_os in
-    rhapsody* | darwin*)
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DSYMUTIL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DSYMUTIL"; then
-  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-DSYMUTIL=$ac_cv_prog_DSYMUTIL
-if test -n "$DSYMUTIL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DSYMUTIL"; then
-  ac_ct_DSYMUTIL=$DSYMUTIL
-  # Extract the first word of "dsymutil", so it can be a program name with args.
-set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_DSYMUTIL"; then
-  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
-if test -n "$ac_ct_DSYMUTIL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_DSYMUTIL" = x; then
-    DSYMUTIL=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    DSYMUTIL=$ac_ct_DSYMUTIL
-  fi
-else
-  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
-fi
-
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_NMEDIT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$NMEDIT"; then
-  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-NMEDIT=$ac_cv_prog_NMEDIT
-if test -n "$NMEDIT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NMEDIT"; then
-  ac_ct_NMEDIT=$NMEDIT
-  # Extract the first word of "nmedit", so it can be a program name with args.
-set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_NMEDIT"; then
-  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_NMEDIT="nmedit"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
-if test -n "$ac_ct_NMEDIT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_NMEDIT" = x; then
-    NMEDIT=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    NMEDIT=$ac_ct_NMEDIT
-  fi
-else
-  NMEDIT="$ac_cv_prog_NMEDIT"
-fi
-
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
-set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LIPO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$LIPO"; then
-  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-LIPO=$ac_cv_prog_LIPO
-if test -n "$LIPO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_LIPO"; then
-  ac_ct_LIPO=$LIPO
-  # Extract the first word of "lipo", so it can be a program name with args.
-set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_LIPO"; then
-  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_LIPO="lipo"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
-if test -n "$ac_ct_LIPO"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_LIPO" = x; then
-    LIPO=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    LIPO=$ac_ct_LIPO
-  fi
-else
-  LIPO="$ac_cv_prog_LIPO"
-fi
-
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$OTOOL"; then
-  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL=$ac_cv_prog_OTOOL
-if test -n "$OTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL"; then
-  ac_ct_OTOOL=$OTOOL
-  # Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_OTOOL"; then
-  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_OTOOL="otool"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
-if test -n "$ac_ct_OTOOL"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_OTOOL" = x; then
-    OTOOL=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    OTOOL=$ac_ct_OTOOL
-  fi
-else
-  OTOOL="$ac_cv_prog_OTOOL"
-fi
-
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_OTOOL64+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$OTOOL64"; then
-  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL64=$ac_cv_prog_OTOOL64
-if test -n "$OTOOL64"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL64"; then
-  ac_ct_OTOOL64=$OTOOL64
-  # Extract the first word of "otool64", so it can be a program name with args.
-set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_OTOOL64"; then
-  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_OTOOL64="otool64"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
-if test -n "$ac_ct_OTOOL64"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_OTOOL64" = x; then
-    OTOOL64=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    OTOOL64=$ac_ct_OTOOL64
-  fi
-else
-  OTOOL64="$ac_cv_prog_OTOOL64"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if ${lt_cv_apple_cc_single_mod+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
-       # By default we will add the -single_module flag. You can override
-       # by either setting the environment variable LT_MULTI_MODULE
-       # non-empty at configure time, or by adding -multi_module to the
-       # link flags.
-       rm -rf libconftest.dylib*
-       echo "int foo(void){return 1;}" > conftest.c
-       echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&5
-       $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
-         -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
-        _lt_result=$?
-       # If there is a non-empty error log, and "single_module"
-       # appears in it, assume the flag caused a linker warning
-        if test -s conftest.err && $GREP single_module conftest.err; then
-         cat conftest.err >&5
-       # Otherwise, if the output was created with a 0 exit code from
-       # the compiler, it worked.
-       elif test -f libconftest.dylib && test $_lt_result -eq 0; then
-         lt_cv_apple_cc_single_mod=yes
-       else
-         cat conftest.err >&5
-       fi
-       rm -rf libconftest.dylib*
-       rm -f conftest.*
-      fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if ${lt_cv_ld_exported_symbols_list+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_ld_exported_symbols_list=no
-      save_LDFLAGS=$LDFLAGS
-      echo "_main" > conftest.sym
-      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  lt_cv_ld_exported_symbols_list=yes
-else
-  lt_cv_ld_exported_symbols_list=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-       LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
-$as_echo_n "checking for -force_load linker flag... " >&6; }
-if ${lt_cv_ld_force_load+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_ld_force_load=no
-      cat > conftest.c << _LT_EOF
-int forced_loaded() { return 2;}
-_LT_EOF
-      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
-      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
-      echo "$AR cru libconftest.a conftest.o" >&5
-      $AR cru libconftest.a conftest.o 2>&5
-      echo "$RANLIB libconftest.a" >&5
-      $RANLIB libconftest.a 2>&5
-      cat > conftest.c << _LT_EOF
-int main() { return 0;}
-_LT_EOF
-      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
-      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
-      _lt_result=$?
-      if test -s conftest.err && $GREP force_load conftest.err; then
-       cat conftest.err >&5
-      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
-       lt_cv_ld_force_load=yes
-      else
-       cat conftest.err >&5
-      fi
-        rm -f conftest.err libconftest.a conftest conftest.c
-        rm -rf conftest.dSYM
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
-$as_echo "$lt_cv_ld_force_load" >&6; }
-    case $host_os in
-    rhapsody* | darwin1.[012])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
-    darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-       10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-       10.[012]*)
-         _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
-       10.*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-      esac
-    ;;
-  esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
-      _lt_dar_single_mod='$single_module'
-    fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
-    else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    fi
-    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
-      _lt_dsymutil='~$DSYMUTIL $lib || :'
-    else
-      _lt_dsymutil=
-    fi
-    ;;
-  esac
-
-for ac_header in dlfcn.h
-do :
-  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-func_stripname_cnf ()
-{
-  case ${2} in
-  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
-  esac
-} # func_stripname_cnf
-
-
-
-
-
-# Set options
-
-
-
-        enable_dlopen=no
-
-
-  enable_win32_dll=no
-
-
-            # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
-  enableval=$enable_shared; 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
-else
-  enable_shared=yes
-fi
-
-
-
-
-
-
-
-
-
-  # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
-  enableval=$enable_static; 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
-else
-  enable_static=yes
-fi
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
-  withval=$with_pic; 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
-else
-  pic_mode=default
-fi
-
-
-test -z "$pic_mode" && pic_mode=default
-
-
-
-
-
-
-
-  # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
-  enableval=$enable_fast_install; 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
-else
-  enable_fast_install=yes
-fi
-
-
-
-
-
-
-
-
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-test -z "$LN_S" && LN_S="ln -s"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if ${lt_cv_objdir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
-
-
-
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
-         fi ;;
-       esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if ${lt_cv_path_MAGIC_CMD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
-      if test -n "$file_magic_test_file"; then
-       case $deplibs_check_method in
-       "file_magic "*)
-         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-           $EGREP "$file_magic_regex" > /dev/null; then
-           :
-         else
-           cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
-         fi ;;
-       esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  else
-    MAGIC_CMD=:
-  fi
-fi
-
-  fi
-  ;;
-esac
-
-# Use C for the default configuration in the libtool script
-
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-
-
-## CAVEAT EMPTOR:
-## There is no encapsulation within the following macros, do not change
-## the running order or otherwise move them around unless you know exactly
-## what you are doing...
-if test -n "$compiler"; then
-
-lt_prog_compiler_no_builtin_flag=
-
-if test "$GCC" = yes; then
-  case $cc_basename in
-  nvcc*)
-    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
-  *)
-    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
-  esac
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_rtti_exceptions=no
-   ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
-else
-    :
-fi
-
-fi
-
-
-
-
-
-
-  lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl='-Wl,'
-    lt_prog_compiler_static='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            lt_prog_compiler_pic='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
-
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic='-fno-common'
-      ;;
-
-    haiku*)
-      # PIC is the default for Haiku.
-      # The "-static" flag exists, but is broken.
-      lt_prog_compiler_static=
-      ;;
-
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic='-fPIC'
-       ;;
-      esac
-      ;;
-
-    interix[3-9]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared=no
-      enable_shared=no
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      lt_prog_compiler_pic='-fPIC -shared'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       lt_prog_compiler_pic=-Kconform_pic
-      fi
-      ;;
-
-    *)
-      lt_prog_compiler_pic='-fPIC'
-      ;;
-    esac
-
-    case $cc_basename in
-    nvcc*) # Cuda Compiler Driver 2.2
-      lt_prog_compiler_wl='-Xlinker '
-      if test -n "$lt_prog_compiler_pic"; then
-        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
-      fi
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static='-Bstatic'
-      else
-       lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    mingw* | cygwin* | pw32* | os2* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-       # +Z the default
-       ;;
-      *)
-       lt_prog_compiler_pic='+Z'
-       ;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static='-non_shared'
-      ;;
-
-    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-      case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
-      ecc*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-KPIC'
-       lt_prog_compiler_static='-static'
-        ;;
-      # icc used to be incompatible with GCC.
-      # ICC 10 doesn't accept -KPIC any more.
-      icc* | ifort*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-fPIC'
-       lt_prog_compiler_static='-static'
-        ;;
-      # Lahey Fortran 8.1.
-      lf95*)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='--shared'
-       lt_prog_compiler_static='--static'
-       ;;
-      nagfor*)
-       # NAG Fortran compiler
-       lt_prog_compiler_wl='-Wl,-Wl,,'
-       lt_prog_compiler_pic='-PIC'
-       lt_prog_compiler_static='-Bstatic'
-       ;;
-      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-       # which looks to be a dead project)
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-fpic'
-       lt_prog_compiler_static='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static='-non_shared'
-        ;;
-      xl* | bgxl* | bgf* | mpixl*)
-       # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
-       lt_prog_compiler_wl='-Wl,'
-       lt_prog_compiler_pic='-qpic'
-       lt_prog_compiler_static='-qstaticlink'
-       ;;
-      *)
-       case `$CC -V 2>&1 | sed 5q` in
-       *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
-         # Sun Fortran 8.3 passes all unrecognized flags to the linker
-         lt_prog_compiler_pic='-KPIC'
-         lt_prog_compiler_static='-Bstatic'
-         lt_prog_compiler_wl=''
-         ;;
-       *Sun\ F* | *Sun*Fortran*)
-         lt_prog_compiler_pic='-KPIC'
-         lt_prog_compiler_static='-Bstatic'
-         lt_prog_compiler_wl='-Qoption ld '
-         ;;
-       *Sun\ C*)
-         # Sun C 5.9
-         lt_prog_compiler_pic='-KPIC'
-         lt_prog_compiler_static='-Bstatic'
-         lt_prog_compiler_wl='-Wl,'
-         ;;
-        *Intel*\ [CF]*Compiler*)
-         lt_prog_compiler_wl='-Wl,'
-         lt_prog_compiler_pic='-fPIC'
-         lt_prog_compiler_static='-static'
-         ;;
-       *Portland\ Group*)
-         lt_prog_compiler_wl='-Wl,'
-         lt_prog_compiler_pic='-fpic'
-         lt_prog_compiler_static='-Bstatic'
-         ;;
-       esac
-       ;;
-      esac
-      ;;
-
-    newsos6)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    *nto* | *qnx*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      lt_prog_compiler_pic='-fPIC -shared'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static='-non_shared'
-      ;;
-
-    rdos*)
-      lt_prog_compiler_static='-non_shared'
-      ;;
-
-    solaris*)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
-       lt_prog_compiler_wl='-Qoption ld ';;
-      *)
-       lt_prog_compiler_wl='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      lt_prog_compiler_wl='-Qoption ld '
-      lt_prog_compiler_pic='-PIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-       lt_prog_compiler_pic='-Kconform_pic'
-       lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    unicos*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_can_build_shared=no
-      ;;
-
-    uts4*)
-      lt_prog_compiler_pic='-pic'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
-
-    *)
-      lt_prog_compiler_can_build_shared=no
-      ;;
-    esac
-  fi
-
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic=
-    ;;
-  *)
-    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
-    ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-if ${lt_cv_prog_compiler_pic+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
-$as_echo "$lt_cv_prog_compiler_pic" >&6; }
-lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if ${lt_cv_prog_compiler_pic_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_pic_works=no
-   ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_pic_works=yes
-     fi
-   fi
-   $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
-    case $lt_prog_compiler_pic in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
-     esac
-else
-    lt_prog_compiler_pic=
-     lt_prog_compiler_can_build_shared=no
-fi
-
-fi
-
-
-
-
-
-
-
-
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if ${lt_cv_prog_compiler_static_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_cv_prog_compiler_static_works=yes
-       fi
-     else
-       lt_cv_prog_compiler_static_works=yes
-     fi
-   fi
-   $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
-    :
-else
-    lt_prog_compiler_static=
-fi
-
-
-
-
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_c_o=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_c_o=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
-  hard_links=yes
-  $RM conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-
-
-
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-
-  runpath_var=
-  allow_undefined_flag=
-  always_export_symbols=no
-  archive_cmds=
-  archive_expsym_cmds=
-  compiler_needs_object=no
-  enable_shared_with_static_runtimes=no
-  export_dynamic_flag_spec=
-  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  hardcode_automatic=no
-  hardcode_direct=no
-  hardcode_direct_absolute=no
-  hardcode_libdir_flag_spec=
-  hardcode_libdir_separator=
-  hardcode_minus_L=no
-  hardcode_shlibpath_var=unsupported
-  inherit_rpath=no
-  link_all_deplibs=unknown
-  module_cmds=
-  module_expsym_cmds=
-  old_archive_from_new_cmds=
-  old_archive_from_expsyms_cmds=
-  thread_safe_flag_spec=
-  whole_archive_flag_spec=
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  # Exclude shared library initialization/finalization symbols.
-  extract_expsyms_cmds=
-
-  case $host_os in
-  cygwin* | mingw* | pw32* | cegcc*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  linux* | k*bsd*-gnu | gnu*)
-    link_all_deplibs=no
-    ;;
-  esac
-
-  ld_shlibs=yes
-
-  # On some targets, GNU ld is compatible enough with the native linker
-  # that we're better off using the native interface for both.
-  lt_use_gnu_ld_interface=no
-  if test "$with_gnu_ld" = yes; then
-    case $host_os in
-      aix*)
-       # The AIX port of GNU ld has always aspired to compatibility
-       # with the native linker.  However, as the warning in the GNU ld
-       # block says, versions before 2.19.5* couldn't really create working
-       # shared libraries, regardless of the interface used.
-       case `$LD -v 2>&1` in
-         *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
-         *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
-         *\ \(GNU\ Binutils\)\ [3-9]*) ;;
-         *)
-           lt_use_gnu_ld_interface=yes
-           ;;
-       esac
-       ;;
-      *)
-       lt_use_gnu_ld_interface=yes
-       ;;
-    esac
-  fi
-
-  if test "$lt_use_gnu_ld_interface" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
-
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      whole_archive_flag_spec=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>&1` in
-      *GNU\ gold*) supports_anon_versioning=yes ;;
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
-
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix[3-9]*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-       ld_shlibs=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.19, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to install binutils
-*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
-*** You will then need to restart the configuration process.
-
-_LT_EOF
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            archive_expsym_cmds=''
-        ;;
-      m68k)
-            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            hardcode_libdir_flag_spec='-L$libdir'
-            hardcode_minus_L=yes
-        ;;
-      esac
-      ;;
-
-    beos*)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       allow_undefined_flag=unsupported
-       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-       # support --undefined.  This deserves some investigation.  FIXME
-       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      export_dynamic_flag_spec='${wl}--export-all-symbols'
-      allow_undefined_flag=unsupported
-      always_export_symbols=no
-      enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
-      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
-
-      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-       # If the export-symbols file already is a .def file (1st line
-       # is EXPORTS), use it as is; otherwise, prepend...
-       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-         cp $export_symbols $output_objdir/$soname.def;
-       else
-         echo EXPORTS > $output_objdir/$soname.def;
-         cat $export_symbols >> $output_objdir/$soname.def;
-       fi~
-       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
-
-    haiku*)
-      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      link_all_deplibs=yes
-      ;;
-
-    interix[3-9]*)
-      hardcode_direct=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
-
-    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
-      tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
-       case $cc_basename in
-         diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
-       esac
-      fi
-      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-        && test "$tmp_diet" = no
-      then
-       tmp_addflag=' $pic_flag'
-       tmp_sharedflag='-shared'
-       case $cc_basename,$host_cpu in
-        pgcc*)                         # Portland Group C compiler
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag'
-         ;;
-       pgf77* | pgf90* | pgf95* | pgfortran*)
-                                       # Portland Group f77 and f90 compilers
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-         tmp_addflag=' $pic_flag -Mnomain' ;;
-       ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
-         tmp_addflag=' -i_dynamic' ;;
-       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
-         tmp_addflag=' -i_dynamic -nofor_main' ;;
-       ifc* | ifort*)                  # Intel Fortran compiler
-         tmp_addflag=' -nofor_main' ;;
-       lf95*)                          # Lahey Fortran 8.1
-         whole_archive_flag_spec=
-         tmp_sharedflag='--shared' ;;
-       xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
-         tmp_sharedflag='-qmkshrobj'
-         tmp_addflag= ;;
-       nvcc*)  # Cuda Compiler Driver 2.2
-         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-         compiler_needs_object=yes
-         ;;
-       esac
-       case `$CC -V 2>&1 | sed 5q` in
-       *Sun\ C*)                       # Sun C 5.9
-         whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-         compiler_needs_object=yes
-         tmp_sharedflag='-G' ;;
-       *Sun\ F*)                       # Sun Fortran 8.3
-         tmp_sharedflag='-G' ;;
-       esac
-       archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
-        if test "x$supports_anon_versioning" = xyes; then
-          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-           cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-           echo "local: *; };" >> $output_objdir/$libname.ver~
-           $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-        fi
-
-       case $cc_basename in
-       xlf* | bgf* | bgxlf* | mpixlf*)
-         # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
-         whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
-         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-         archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
-         if test "x$supports_anon_versioning" = xyes; then
-           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-             echo "local: *; };" >> $output_objdir/$libname.ver~
-             $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
-         fi
-         ;;
-       esac
-      else
-        ld_shlibs=no
-      fi
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-       wlarc=
-      else
-       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
-
-    solaris*)
-      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
-       ld_shlibs=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-       ld_shlibs=no
-       cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-       ;;
-       *)
-         # For security reasons, it is highly recommended that you always
-         # use absolute paths for naming shared libraries, and exclude the
-         # DT_RUNPATH tag from executables and libraries.  But doing so
-         # requires that you compile everything twice, which is a pain.
-         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-           hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-         else
-           ld_shlibs=no
-         fi
-       ;;
-      esac
-      ;;
-
-    sunos4*)
-      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-       ld_shlibs=no
-      fi
-      ;;
-    esac
-
-    if test "$ld_shlibs" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec=
-      export_dynamic_flag_spec=
-      whole_archive_flag_spec=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag=unsupported
-      always_export_symbols=yes
-      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-       # Neither direct hardcoding nor static linking is supported with a
-       # broken collect2.
-       hardcode_direct=unsupported
-      fi
-      ;;
-
-    aix[4-9]*)
-      if test "$host_cpu" = ia64; then
-       # On IA64, the linker does run time linking by default, so we don't
-       # have to do anything special.
-       aix_use_runtimelinking=no
-       exp_sym_flag='-Bexport'
-       no_entry_flag=""
-      else
-       # If we're using GNU nm, then we don't want the "-C" option.
-       # -C means demangle to AIX nm, but means don't demangle with GNU nm
-       # Also, AIX nm treats weak defined symbols like other global
-       # defined symbols, whereas GNU nm marks them as "W".
-       if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-       else
-         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-       fi
-       aix_use_runtimelinking=no
-
-       # Test if we are trying to use run time linking or normal
-       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-       # need to do runtime linking.
-       case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
-         for ld_flag in $LDFLAGS; do
-         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-           aix_use_runtimelinking=yes
-           break
-         fi
-         done
-         ;;
-       esac
-
-       exp_sym_flag='-bexport'
-       no_entry_flag='-bnoentry'
-      fi
-
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-      archive_cmds=''
-      hardcode_direct=yes
-      hardcode_direct_absolute=yes
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-      file_list_spec='${wl}-f,'
-
-      if test "$GCC" = yes; then
-       case $host_os in aix4.[012]|aix4.[012].*)
-       # We only want to do this on AIX 4.2 and lower, the check
-       # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" &&
-          strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-         then
-         # We have reworked collect2
-         :
-         else
-         # We have old collect2
-         hardcode_direct=unsupported
-         # It fails to find uninstalled libraries when the uninstalled
-         # path is not listed in the libpath.  Setting hardcode_minus_L
-         # to unsupported forces relinking
-         hardcode_minus_L=yes
-         hardcode_libdir_flag_spec='-L$libdir'
-         hardcode_libdir_separator=
-         fi
-         ;;
-       esac
-       shared_flag='-shared'
-       if test "$aix_use_runtimelinking" = yes; then
-         shared_flag="$shared_flag "'${wl}-G'
-       fi
-       link_all_deplibs=no
-      else
-       # not using gcc
-       if test "$host_cpu" = ia64; then
-       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-       # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-       else
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag='${wl}-G'
-         else
-           shared_flag='${wl}-bM:SRE'
-         fi
-       fi
-      fi
-
-      export_dynamic_flag_spec='${wl}-bexpall'
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols=yes
-      if test "$aix_use_runtimelinking" = yes; then
-       # Warning - without using the other runtime loading flags (-brtl),
-       # -berok will link without error, but may produce a broken library.
-       allow_undefined_flag='-berok'
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        if test "${lt_cv_aix_libpath+set}" = set; then
-  aix_libpath=$lt_cv_aix_libpath
-else
-  if ${lt_cv_aix_libpath_+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-  lt_aix_libpath_sed='
-      /Import File Strings/,/^$/ {
-         /^0/ {
-             s/^0  *\([^ ]*\) *$/\1/
-             p
-         }
-      }'
-  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  # Check for a 64-bit object if we didn't find anything.
-  if test -z "$lt_cv_aix_libpath_"; then
-    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  if test -z "$lt_cv_aix_libpath_"; then
-    lt_cv_aix_libpath_="/usr/lib:/lib"
-  fi
-
-fi
-
-  aix_libpath=$lt_cv_aix_libpath_
-fi
-
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-      else
-       if test "$host_cpu" = ia64; then
-         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-         allow_undefined_flag="-z nodefs"
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-       else
-        # Determine the default libpath from the value encoded in an
-        # empty executable.
-        if test "${lt_cv_aix_libpath+set}" = set; then
-  aix_libpath=$lt_cv_aix_libpath
-else
-  if ${lt_cv_aix_libpath_+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-  lt_aix_libpath_sed='
-      /Import File Strings/,/^$/ {
-         /^0/ {
-             s/^0  *\([^ ]*\) *$/\1/
-             p
-         }
-      }'
-  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  # Check for a 64-bit object if we didn't find anything.
-  if test -z "$lt_cv_aix_libpath_"; then
-    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  if test -z "$lt_cv_aix_libpath_"; then
-    lt_cv_aix_libpath_="/usr/lib:/lib"
-  fi
-
-fi
-
-  aix_libpath=$lt_cv_aix_libpath_
-fi
-
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-         # Warning - without using the other run time loading flags,
-         # -berok will link without error, but may produce a broken library.
-         no_undefined_flag=' ${wl}-bernotok'
-         allow_undefined_flag=' ${wl}-berok'
-         if test "$with_gnu_ld" = yes; then
-           # We only use this code for GNU lds that support --whole-archive.
-           whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-         else
-           # Exported symbols can be pulled into shared objects from archives
-           whole_archive_flag_spec='$convenience'
-         fi
-         archive_cmds_need_lc=yes
-         # This is similar to how AIX traditionally builds its shared libraries.
-         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-       fi
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-            archive_expsym_cmds=''
-        ;;
-      m68k)
-            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-            hardcode_libdir_flag_spec='-L$libdir'
-            hardcode_minus_L=yes
-        ;;
-      esac
-      ;;
-
-    bsdi[45]*)
-      export_dynamic_flag_spec=-rdynamic
-      ;;
-
-    cygwin* | mingw* | pw32* | cegcc*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      case $cc_basename in
-      cl*)
-       # Native MSVC
-       hardcode_libdir_flag_spec=' '
-       allow_undefined_flag=unsupported
-       always_export_symbols=yes
-       file_list_spec='@'
-       # Tell ltmain to make .lib files, not .a files.
-       libext=lib
-       # Tell ltmain to make .dll files, not .so files.
-       shrext_cmds=".dll"
-       # FIXME: Setting linknames here is a bad hack.
-       archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-           sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-         else
-           sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-         fi~
-         $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-         linknames='
-       # The linker will not automatically build a static lib if we build a DLL.
-       # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
-       enable_shared_with_static_runtimes=yes
-       exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
-       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
-       # Don't use ranlib
-       old_postinstall_cmds='chmod 644 $oldlib'
-       postlink_cmds='lt_outputfile="@OUTPUT@"~
-         lt_tool_outputfile="@TOOL_OUTPUT@"~
-         case $lt_outputfile in
-           *.exe|*.EXE) ;;
-           *)
-             lt_outputfile="$lt_outputfile.exe"
-             lt_tool_outputfile="$lt_tool_outputfile.exe"
-             ;;
-         esac~
-         if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-           $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-           $RM "$lt_outputfile.manifest";
-         fi'
-       ;;
-      *)
-       # Assume MSVC wrapper
-       hardcode_libdir_flag_spec=' '
-       allow_undefined_flag=unsupported
-       # Tell ltmain to make .lib files, not .a files.
-       libext=lib
-       # Tell ltmain to make .dll files, not .so files.
-       shrext_cmds=".dll"
-       # FIXME: Setting linknames here is a bad hack.
-       archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
-       # The linker will automatically build a .lib file if we build a DLL.
-       old_archive_from_new_cmds='true'
-       # FIXME: Should let the user specify the lib program.
-       old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
-       enable_shared_with_static_runtimes=yes
-       ;;
-      esac
-      ;;
-
-    darwin* | rhapsody*)
-
-
-  archive_cmds_need_lc=no
-  hardcode_direct=no
-  hardcode_automatic=yes
-  hardcode_shlibpath_var=unsupported
-  if test "$lt_cv_ld_force_load" = "yes"; then
-    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
-
-  else
-    whole_archive_flag_spec=''
-  fi
-  link_all_deplibs=yes
-  allow_undefined_flag="$_lt_dar_allow_undefined"
-  case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
-     *) _lt_dar_can_shared=$GCC ;;
-  esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-
-  else
-  ld_shlibs=no
-  fi
-
-      ;;
-
-    dgux*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
-
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2.*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | dragonfly*)
-      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    hpux9*)
-      if test "$GCC" = yes; then
-       archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-       archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_direct=yes
-
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
-      ;;
-
-    hpux10*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
-       archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator=:
-       hardcode_direct=yes
-       hardcode_direct_absolute=yes
-       export_dynamic_flag_spec='${wl}-E'
-       # hardcode_minus_L: Not really in the search PATH,
-       # but as the default location of the library.
-       hardcode_minus_L=yes
-      fi
-      ;;
-
-    hpux11*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       esac
-      else
-       case $host_cpu in
-       hppa*64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       ia64*)
-         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-
-         # Older versions of the 11.00 compiler do not understand -b yet
-         # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
-$as_echo_n "checking if $CC understands -b... " >&6; }
-if ${lt_cv_prog_compiler__b+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler__b=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS -b"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_cv_prog_compiler__b=yes
-       fi
-     else
-       lt_cv_prog_compiler__b=yes
-     fi
-   fi
-   $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
-$as_echo "$lt_cv_prog_compiler__b" >&6; }
-
-if test x"$lt_cv_prog_compiler__b" = xyes; then
-    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-else
-    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-fi
-
-         ;;
-       esac
-      fi
-      if test "$with_gnu_ld" = no; then
-       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-       hardcode_libdir_separator=:
-
-       case $host_cpu in
-       hppa*64*|ia64*)
-         hardcode_direct=no
-         hardcode_shlibpath_var=no
-         ;;
-       *)
-         hardcode_direct=yes
-         hardcode_direct_absolute=yes
-         export_dynamic_flag_spec='${wl}-E'
-
-         # hardcode_minus_L: Not really in the search PATH,
-         # but as the default location of the library.
-         hardcode_minus_L=yes
-         ;;
-       esac
-      fi
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       # Try to use the -exported_symbol ld option, if it does not
-       # work, assume that -exports_file does not work either and
-       # implicitly export all symbols.
-       # This should be the same for all languages, so no per-tag cache variable.
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
-$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
-if ${lt_cv_irix_exported_symbol+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  save_LDFLAGS="$LDFLAGS"
-          LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int foo (void) { return 0; }
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  lt_cv_irix_exported_symbol=yes
-else
-  lt_cv_irix_exported_symbol=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-           LDFLAGS="$save_LDFLAGS"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
-$as_echo "$lt_cv_irix_exported_symbol" >&6; }
-       if test "$lt_cv_irix_exported_symbol" = yes; then
-          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-       fi
-      else
-       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-      fi
-      archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      inherit_rpath=yes
-      link_all_deplibs=yes
-      ;;
-
-    netbsd* | netbsdelf*-gnu)
-      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    newsos6)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_shlibpath_var=no
-      ;;
-
-    *nto* | *qnx*)
-      ;;
-
-    openbsd*)
-      if test -f /usr/libexec/ld.so; then
-       hardcode_direct=yes
-       hardcode_shlibpath_var=no
-       hardcode_direct_absolute=yes
-       if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-         export_dynamic_flag_spec='${wl}-E'
-       else
-         case $host_os in
-          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-            hardcode_libdir_flag_spec='-R$libdir'
-            ;;
-          *)
-            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-            ;;
-         esac
-       fi
-      else
-       ld_shlibs=no
-      fi
-      ;;
-
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      allow_undefined_flag=unsupported
-      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
-
-    osf3*)
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-       allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
-
-    osf4* | osf5*)     # as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-       allow_undefined_flag=' -expect_unresolved \*'
-       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-       $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
-       # Both c and cxx compiler support -rpath directly
-       hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      archive_cmds_need_lc='no'
-      hardcode_libdir_separator=:
-      ;;
-
-    solaris*)
-      no_undefined_flag=' -z defs'
-      if test "$GCC" = yes; then
-       wlarc='${wl}'
-       archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-      else
-       case `$CC -V 2>&1` in
-       *"Compilers 5.0"*)
-         wlarc=''
-         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
-         ;;
-       *)
-         wlarc='${wl}'
-         archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
-         archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-         $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
-         ;;
-       esac
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_shlibpath_var=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
-       # The compiler driver will combine and reorder linker options,
-       # but understands `-z linker_flag'.  GCC discards it without `$wl',
-       # but is careful enough not to reorder.
-       # Supported since Solaris 2.6 (maybe 2.5.1?)
-       if test "$GCC" = yes; then
-         whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-       else
-         whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
-       fi
-       ;;
-      esac
-      link_all_deplibs=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-       # Use $CC to link under sequent, because it throws in some extra .o
-       # files that make .init and .fini sections work.
-       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-       sni)
-         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct=yes # is this really true???
-       ;;
-       siemens)
-         ## LD is ld it makes a PLAMLIB
-         ## CC just makes a GrossModule.
-         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-         reload_cmds='$CC -r -o $output$reload_objs'
-         hardcode_direct=no
-        ;;
-       motorola)
-         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-       ;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var=no
-      ;;
-
-    sysv4.3*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var=no
-      export_dynamic_flag_spec='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-       hardcode_shlibpath_var=no
-       runpath_var=LD_RUN_PATH
-       hardcode_runpath_var=yes
-       ld_shlibs=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag='${wl}-z,text'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-R,$libdir'
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
-
-    uts4*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
-
-    *)
-      ld_shlibs=no
-      ;;
-    esac
-
-    if test x$host_vendor = xsni; then
-      case $host in
-      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-       export_dynamic_flag_spec='${wl}-Blargedynsym'
-       ;;
-      esac
-    fi
-  fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
-
-with_gnu_ld=$with_gnu_ld
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-if ${lt_cv_archive_cmds_need_lc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  $RM conftest*
-       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } 2>conftest.err; then
-         soname=conftest
-         lib=conftest
-         libobjs=conftest.$ac_objext
-         deplibs=
-         wl=$lt_prog_compiler_wl
-         pic_flag=$lt_prog_compiler_pic
-         compiler_flags=-v
-         linker_flags=-v
-         verstring=
-         output_objdir=.
-         libname=conftest
-         lt_save_allow_undefined_flag=$allow_undefined_flag
-         allow_undefined_flag=
-         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
-  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-         then
-           lt_cv_archive_cmds_need_lc=no
-         else
-           lt_cv_archive_cmds_need_lc=yes
-         fi
-         allow_undefined_flag=$lt_save_allow_undefined_flag
-       else
-         cat conftest.err 1>&5
-       fi
-       $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
-$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
-      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
-
-if test "$GCC" = yes; then
-  case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
-  esac
-  case $host_os in
-    mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
-    *) lt_sed_strip_eq="s,=/,/,g" ;;
-  esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
-  case $lt_search_path_spec in
-  *\;*)
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
-    ;;
-  *)
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
-    ;;
-  esac
-  # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
-  lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
-      test -d "$lt_sys_path" && \
-       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
-    fi
-  done
-  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
-  for (lt_i = NF; lt_i > 0; lt_i--) {
-    if ($lt_i != "" && $lt_i != ".") {
-      if ($lt_i == "..") {
-        lt_count++;
-      } else {
-        if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
-        } else {
-          lt_count--;
-        }
-      }
-    }
-  }
-  if (lt_foo != "") { lt_freq[lt_foo]++; }
-  if (lt_freq[lt_foo] == 1) { print lt_foo; }
-}'`
-  # AWK program above erroneously prepends '/' to C:/dos/paths
-  # for these hosts.
-  case $host_os in
-    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
-      $SED 's,/\([A-Za-z]:\),\1,g'` ;;
-  esac
-  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix[4-9]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  case $host_cpu in
-  powerpc)
-    # Since July 2007 AmigaOS4 officially supports .so libraries.
-    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    ;;
-  m68k)
-    library_names_spec='$libname.ixlibrary $libname.a'
-    # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-    ;;
-  esac
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[45]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$cc_basename in
-  yes,*)
-    # gcc
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname~
-      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-      fi'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-
-      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
-      ;;
-    mingw* | cegcc*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    dynamic_linker='Win32 ld.exe'
-    ;;
-
-  *,cl*)
-    # Native MSVC
-    libname_spec='$name'
-    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-    library_names_spec='${libname}.dll.lib'
-
-    case $build_os in
-    mingw*)
-      sys_lib_search_path_spec=
-      lt_save_ifs=$IFS
-      IFS=';'
-      for lt_path in $LIB
-      do
-        IFS=$lt_save_ifs
-        # Let DOS variable expansion print the short 8.3 style file name.
-        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
-        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
-      done
-      IFS=$lt_save_ifs
-      # Convert to MSYS style.
-      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
-      ;;
-    cygwin*)
-      # Convert to unix form, then to dos form, then back to unix form
-      # but this time dos style (no spaces!) so that the unix form looks
-      # like /cygdrive/c/PROGRA~1:/cygdr...
-      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
-      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
-      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
-      ;;
-    *)
-      sys_lib_search_path_spec="$LIB"
-      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      # FIXME: find the short name or the path components, as spaces are
-      # common. (e.g. "Program Files" -> "PROGRA~1")
-      ;;
-    esac
-
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-    dynamic_linker='Win32 link.exe'
-    ;;
-
-  *)
-    # Assume MSVC wrapper
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    dynamic_linker='Win32 ld.exe'
-    ;;
-  esac
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
-  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[23].*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2.*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  *) # from 4.6 on, and DragonFly
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-haiku*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  dynamic_linker="$host_os runtime_loader"
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  hppa*64*)
-    shrext_cmds='.sl'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
-  postinstall_cmds='chmod 555 $lib'
-  # or fails outright, so override atomically:
-  install_override_mode=555
-  ;;
-
-interix[3-9]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux # correct to gnu/linux during the next big refactor
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-
-  # Some binutils ld are patched to set DT_RUNPATH
-  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_shlibpath_overrides_runpath=no
-    save_LDFLAGS=$LDFLAGS
-    save_libdir=$libdir
-    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
-        LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
-  lt_cv_shlibpath_overrides_runpath=yes
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LDFLAGS=$save_LDFLAGS
-    libdir=$save_libdir
-
-fi
-
-  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-*nto* | *qnx*)
-  version_type=qnx
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='ldqnx.so'
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-rdos*)
-  dynamic_linker=no
-  ;;
-
-solaris*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux # correct to gnu/linux during the next big refactor
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-uts4*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
-   test -n "$runpath_var" ||
-   test "X$hardcode_automatic" = "Xyes" ; then
-
-  # We can hardcode non-existent directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
-
-if test "$hardcode_action" = relink ||
-   test "$inherit_rpath" = yes; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-
-
-
-
-
-  if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-    ;;
-
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-    ;;
-
-  darwin*)
-  # if libdl is installed we need to link against it
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dl_dlopen=yes
-else
-  ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-
-fi
-
-    ;;
-
-  *)
-    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = xyes; then :
-  lt_cv_dlopen="shl_load"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if ${ac_cv_lib_dld_shl_load+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load ();
-int
-main ()
-{
-return shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dld_shl_load=yes
-else
-  ac_cv_lib_dld_shl_load=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
-  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dl_dlopen=yes
-else
-  ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if ${ac_cv_lib_svld_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_svld_dlopen=yes
-else
-  ac_cv_lib_svld_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if ${ac_cv_lib_dld_dld_link+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link ();
-int
-main ()
-{
-return dld_link ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dld_dld_link=yes
-else
-  ac_cv_lib_dld_dld_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-         if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-/* When -fvisbility=hidden is used, assume the code has been annotated
-   correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
-
-int fnord () { return 42; }
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else
-        {
-         if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
-          else puts (dlerror ());
-       }
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-  return status;
-}
-_LT_EOF
-  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self=no
-  fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if ${lt_cv_dlopen_self_static+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-         if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self_static=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<_LT_EOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL          RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL                DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL                0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW         DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW       RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW     DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW     0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-/* When -fvisbility=hidden is used, assume the code has been annotated
-   correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
-#endif
-
-int fnord () { return 42; }
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else
-        {
-         if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
-          else puts (dlerror ());
-       }
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
-
-  return status;
-}
-_LT_EOF
-  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self_static=no
-  fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-striplib=
-old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-  darwin*)
-    if test -n "$STRIP" ; then
-      striplib="$STRIP -x"
-      old_striplib="$STRIP -S"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    fi
-    ;;
-  *)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    ;;
-  esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-  # Report which library types will actually be built
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
-  test "$can_build_shared" = "no" && enable_shared=no
-
-  # On AIX, shared libraries and static libraries use the same namespace, and
-  # are all built from PIC.
-  case $host_os in
-  aix3*)
-    test "$enable_shared" = yes && enable_static=no
-    if test -n "$RANLIB"; then
-      archive_cmds="$archive_cmds~\$RANLIB \$lib"
-      postinstall_cmds='$RANLIB $lib'
-    fi
-    ;;
-
-  aix[4-9]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
-    fi
-    ;;
-  esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
-  # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
-
-
-
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-      if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
-if test -z "$CXXCPP"; then
-  if ${ac_cv_prog_CXXCPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
-$as_echo "$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-else
-  _lt_caught_CXX_error=yes
-fi
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-archive_cmds_need_lc_CXX=no
-allow_undefined_flag_CXX=
-always_export_symbols_CXX=no
-archive_expsym_cmds_CXX=
-compiler_needs_object_CXX=no
-export_dynamic_flag_spec_CXX=
-hardcode_direct_CXX=no
-hardcode_direct_absolute_CXX=no
-hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_separator_CXX=
-hardcode_minus_L_CXX=no
-hardcode_shlibpath_var_CXX=unsupported
-hardcode_automatic_CXX=no
-inherit_rpath_CXX=no
-module_cmds_CXX=
-module_expsym_cmds_CXX=
-link_all_deplibs_CXX=unknown
-old_archive_cmds_CXX=$old_archive_cmds
-reload_flag_CXX=$reload_flag
-reload_cmds_CXX=$reload_cmds
-no_undefined_flag_CXX=
-whole_archive_flag_spec_CXX=
-enable_shared_with_static_runtimes_CXX=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-objext_CXX=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working.  Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
-  # Code to be used in simple compile tests
-  lt_simple_compile_test_code="int some_variable = 0;"
-
-  # Code to be used in simple link tests
-  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
-
-  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-  # save warnings/boilerplate of simple test code
-  ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-  ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-
-
-  # Allow CC to be a program name with arguments.
-  lt_save_CC=$CC
-  lt_save_CFLAGS=$CFLAGS
-  lt_save_LD=$LD
-  lt_save_GCC=$GCC
-  GCC=$GXX
-  lt_save_with_gnu_ld=$with_gnu_ld
-  lt_save_path_LD=$lt_cv_path_LD
-  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-  else
-    $as_unset lt_cv_prog_gnu_ld
-  fi
-  if test -n "${lt_cv_path_LDCXX+set}"; then
-    lt_cv_path_LD=$lt_cv_path_LDCXX
-  else
-    $as_unset lt_cv_path_LD
-  fi
-  test -z "${LDCXX+set}" || LD=$LDCXX
-  CC=${CXX-"c++"}
-  CFLAGS=$CXXFLAGS
-  compiler=$CC
-  compiler_CXX=$CC
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-
-
-  if test -n "$compiler"; then
-    # We don't want -fno-exception when compiling C++ code, so set the
-    # no_builtin_flag separately
-    if test "$GXX" = yes; then
-      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
-    else
-      lt_prog_compiler_no_builtin_flag_CXX=
-    fi
-
-    if test "$GXX" = yes; then
-      # Set up default GNU C++ configuration
-
-
-
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then :
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
-
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&6; }
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | ?:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
-      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
-       ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if ${lt_cv_path_LD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-       test "$with_gnu_ld" != no && break
-       ;;
-      *)
-       test "$with_gnu_ld" != yes && break
-       ;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if ${lt_cv_prog_gnu_ld+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
-      # Check if GNU C++ uses GNU ld as the underlying linker, since the
-      # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
-        # If archive_cmds runs LD, not CC, wlarc should be empty
-        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-        #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
-
-        # ancient GNU ld didn't support --whole-archive et. al.
-        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
-         $GREP 'no-whole-archive' > /dev/null; then
-          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-        else
-          whole_archive_flag_spec_CXX=
-        fi
-      else
-        with_gnu_ld=no
-        wlarc=
-
-        # A generic and very simple default shared library creation
-        # command for GNU C++ for the case where it uses the native
-        # linker, instead of GNU ld.  If possible, this setting should
-        # overridden to take advantage of the native linker features on
-        # the platform it is being used on.
-        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-      fi
-
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-
-    else
-      GXX=no
-      with_gnu_ld=no
-      wlarc=
-    fi
-
-    # PORTME: fill in a description of your system's C++ link characteristics
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-    ld_shlibs_CXX=yes
-    case $host_os in
-      aix3*)
-        # FIXME: insert proper C++ library support
-        ld_shlibs_CXX=no
-        ;;
-      aix[4-9]*)
-        if test "$host_cpu" = ia64; then
-          # On IA64, the linker does run time linking by default, so we don't
-          # have to do anything special.
-          aix_use_runtimelinking=no
-          exp_sym_flag='-Bexport'
-          no_entry_flag=""
-        else
-          aix_use_runtimelinking=no
-
-          # Test if we are trying to use run time linking or normal
-          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
-          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
-           for ld_flag in $LDFLAGS; do
-             case $ld_flag in
-             *-brtl*)
-               aix_use_runtimelinking=yes
-               break
-               ;;
-             esac
-           done
-           ;;
-          esac
-
-          exp_sym_flag='-bexport'
-          no_entry_flag='-bnoentry'
-        fi
-
-        # When large executables or shared objects are built, AIX ld can
-        # have problems creating the table of contents.  If linking a library
-        # or program results in "error TOC overflow" add -mminimal-toc to
-        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-        archive_cmds_CXX=''
-        hardcode_direct_CXX=yes
-        hardcode_direct_absolute_CXX=yes
-        hardcode_libdir_separator_CXX=':'
-        link_all_deplibs_CXX=yes
-        file_list_spec_CXX='${wl}-f,'
-
-        if test "$GXX" = yes; then
-          case $host_os in aix4.[012]|aix4.[012].*)
-          # We only want to do this on AIX 4.2 and lower, the check
-          # below for broken collect2 doesn't work under 4.3+
-         collect2name=`${CC} -print-prog-name=collect2`
-         if test -f "$collect2name" &&
-            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
-         then
-           # We have reworked collect2
-           :
-         else
-           # We have old collect2
-           hardcode_direct_CXX=unsupported
-           # It fails to find uninstalled libraries when the uninstalled
-           # path is not listed in the libpath.  Setting hardcode_minus_L
-           # to unsupported forces relinking
-           hardcode_minus_L_CXX=yes
-           hardcode_libdir_flag_spec_CXX='-L$libdir'
-           hardcode_libdir_separator_CXX=
-         fi
-          esac
-          shared_flag='-shared'
-         if test "$aix_use_runtimelinking" = yes; then
-           shared_flag="$shared_flag "'${wl}-G'
-         fi
-        else
-          # not using gcc
-          if test "$host_cpu" = ia64; then
-         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-         # chokes on -Wl,-G. The following line is correct:
-         shared_flag='-G'
-          else
-           if test "$aix_use_runtimelinking" = yes; then
-             shared_flag='${wl}-G'
-           else
-             shared_flag='${wl}-bM:SRE'
-           fi
-          fi
-        fi
-
-        export_dynamic_flag_spec_CXX='${wl}-bexpall'
-        # It seems that -bexpall does not export symbols beginning with
-        # underscore (_), so it is better to generate a list of symbols to
-       # export.
-        always_export_symbols_CXX=yes
-        if test "$aix_use_runtimelinking" = yes; then
-          # Warning - without using the other runtime loading flags (-brtl),
-          # -berok will link without error, but may produce a broken library.
-          allow_undefined_flag_CXX='-berok'
-          # Determine the default libpath from the value encoded in an empty
-          # executable.
-          if test "${lt_cv_aix_libpath+set}" = set; then
-  aix_libpath=$lt_cv_aix_libpath
-else
-  if ${lt_cv_aix_libpath__CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-  lt_aix_libpath_sed='
-      /Import File Strings/,/^$/ {
-         /^0/ {
-             s/^0  *\([^ ]*\) *$/\1/
-             p
-         }
-      }'
-  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  # Check for a 64-bit object if we didn't find anything.
-  if test -z "$lt_cv_aix_libpath__CXX"; then
-    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  if test -z "$lt_cv_aix_libpath__CXX"; then
-    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
-  fi
-
-fi
-
-  aix_libpath=$lt_cv_aix_libpath__CXX
-fi
-
-          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-        else
-          if test "$host_cpu" = ia64; then
-           hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
-           allow_undefined_flag_CXX="-z nodefs"
-           archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-          else
-           # Determine the default libpath from the value encoded in an
-           # empty executable.
-           if test "${lt_cv_aix_libpath+set}" = set; then
-  aix_libpath=$lt_cv_aix_libpath
-else
-  if ${lt_cv_aix_libpath__CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-
-  lt_aix_libpath_sed='
-      /Import File Strings/,/^$/ {
-         /^0/ {
-             s/^0  *\([^ ]*\) *$/\1/
-             p
-         }
-      }'
-  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  # Check for a 64-bit object if we didn't find anything.
-  if test -z "$lt_cv_aix_libpath__CXX"; then
-    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-  fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  if test -z "$lt_cv_aix_libpath__CXX"; then
-    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
-  fi
-
-fi
-
-  aix_libpath=$lt_cv_aix_libpath__CXX
-fi
-
-           hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-           # Warning - without using the other run time loading flags,
-           # -berok will link without error, but may produce a broken library.
-           no_undefined_flag_CXX=' ${wl}-bernotok'
-           allow_undefined_flag_CXX=' ${wl}-berok'
-           if test "$with_gnu_ld" = yes; then
-             # We only use this code for GNU lds that support --whole-archive.
-             whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-           else
-             # Exported symbols can be pulled into shared objects from archives
-             whole_archive_flag_spec_CXX='$convenience'
-           fi
-           archive_cmds_need_lc_CXX=yes
-           # This is similar to how AIX traditionally builds its shared
-           # libraries.
-           archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-          fi
-        fi
-        ;;
-
-      beos*)
-       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-         allow_undefined_flag_CXX=unsupported
-         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
-         # support --undefined.  This deserves some investigation.  FIXME
-         archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-       else
-         ld_shlibs_CXX=no
-       fi
-       ;;
-
-      chorus*)
-        case $cc_basename in
-          *)
-         # FIXME: insert proper C++ library support
-         ld_shlibs_CXX=no
-         ;;
-        esac
-        ;;
-
-      cygwin* | mingw* | pw32* | cegcc*)
-       case $GXX,$cc_basename in
-       ,cl* | no,cl*)
-         # Native MSVC
-         # hardcode_libdir_flag_spec is actually meaningless, as there is
-         # no search path for DLLs.
-         hardcode_libdir_flag_spec_CXX=' '
-         allow_undefined_flag_CXX=unsupported
-         always_export_symbols_CXX=yes
-         file_list_spec_CXX='@'
-         # Tell ltmain to make .lib files, not .a files.
-         libext=lib
-         # Tell ltmain to make .dll files, not .so files.
-         shrext_cmds=".dll"
-         # FIXME: Setting linknames here is a bad hack.
-         archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-         archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-             $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-           else
-             $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-           fi~
-           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-           linknames='
-         # The linker will not automatically build a static lib if we build a DLL.
-         # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
-         enable_shared_with_static_runtimes_CXX=yes
-         # Don't use ranlib
-         old_postinstall_cmds_CXX='chmod 644 $oldlib'
-         postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
-           lt_tool_outputfile="@TOOL_OUTPUT@"~
-           case $lt_outputfile in
-             *.exe|*.EXE) ;;
-             *)
-               lt_outputfile="$lt_outputfile.exe"
-               lt_tool_outputfile="$lt_tool_outputfile.exe"
-               ;;
-           esac~
-           func_to_tool_file "$lt_outputfile"~
-           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-             $RM "$lt_outputfile.manifest";
-           fi'
-         ;;
-       *)
-         # g++
-         # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
-         # as there is no search path for DLLs.
-         hardcode_libdir_flag_spec_CXX='-L$libdir'
-         export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
-         allow_undefined_flag_CXX=unsupported
-         always_export_symbols_CXX=no
-         enable_shared_with_static_runtimes_CXX=yes
-
-         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-           # If the export-symbols file already is a .def file (1st line
-           # is EXPORTS), use it as is; otherwise, prepend...
-           archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-             cp $export_symbols $output_objdir/$soname.def;
-           else
-             echo EXPORTS > $output_objdir/$soname.def;
-             cat $export_symbols >> $output_objdir/$soname.def;
-           fi~
-           $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-         else
-           ld_shlibs_CXX=no
-         fi
-         ;;
-       esac
-       ;;
-      darwin* | rhapsody*)
-
-
-  archive_cmds_need_lc_CXX=no
-  hardcode_direct_CXX=no
-  hardcode_automatic_CXX=yes
-  hardcode_shlibpath_var_CXX=unsupported
-  if test "$lt_cv_ld_force_load" = "yes"; then
-    whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
-
-  else
-    whole_archive_flag_spec_CXX=''
-  fi
-  link_all_deplibs_CXX=yes
-  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
-  case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
-     *) _lt_dar_can_shared=$GCC ;;
-  esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=func_echo_all
-    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
-    fi
-
-  else
-  ld_shlibs_CXX=no
-  fi
-
-       ;;
-
-      dgux*)
-        case $cc_basename in
-          ec++*)
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-          ghcx*)
-           # Green Hills C++ Compiler
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-          *)
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-        esac
-        ;;
-
-      freebsd2.*)
-        # C++ shared libraries reported to be fairly broken before
-       # switch to ELF
-        ld_shlibs_CXX=no
-        ;;
-
-      freebsd-elf*)
-        archive_cmds_need_lc_CXX=no
-        ;;
-
-      freebsd* | dragonfly*)
-        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-        # conventions
-        ld_shlibs_CXX=yes
-        ;;
-
-      haiku*)
-        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        link_all_deplibs_CXX=yes
-        ;;
-
-      hpux9*)
-        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-        hardcode_libdir_separator_CXX=:
-        export_dynamic_flag_spec_CXX='${wl}-E'
-        hardcode_direct_CXX=yes
-        hardcode_minus_L_CXX=yes # Not in the search PATH,
-                                            # but as the default
-                                            # location of the library.
-
-        case $cc_basename in
-          CC*)
-            # FIXME: insert proper C++ library support
-            ld_shlibs_CXX=no
-            ;;
-          aCC*)
-            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            # Commands to make compiler produce verbose output that lists
-            # what "hidden" libraries, object files and flags are used when
-            # linking a shared library.
-            #
-            # There doesn't appear to be a way to prevent this compiler from
-            # explicitly linking system object files so we need to strip them
-            # from the output so that they don't get included in the library
-            # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-            ;;
-          *)
-            if test "$GXX" = yes; then
-              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-            else
-              # FIXME: insert proper C++ library support
-              ld_shlibs_CXX=no
-            fi
-            ;;
-        esac
-        ;;
-
-      hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-         hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-         hardcode_libdir_separator_CXX=:
-
-          case $host_cpu in
-            hppa*64*|ia64*)
-              ;;
-            *)
-             export_dynamic_flag_spec_CXX='${wl}-E'
-              ;;
-          esac
-        fi
-        case $host_cpu in
-          hppa*64*|ia64*)
-            hardcode_direct_CXX=no
-            hardcode_shlibpath_var_CXX=no
-            ;;
-          *)
-            hardcode_direct_CXX=yes
-            hardcode_direct_absolute_CXX=yes
-            hardcode_minus_L_CXX=yes # Not in the search PATH,
-                                                # but as the default
-                                                # location of the library.
-            ;;
-        esac
-
-        case $cc_basename in
-          CC*)
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-          aCC*)
-           case $host_cpu in
-             hppa*64*)
-               archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-               ;;
-             ia64*)
-               archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-               ;;
-             *)
-               archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-               ;;
-           esac
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-           ;;
-          *)
-           if test "$GXX" = yes; then
-             if test $with_gnu_ld = no; then
-               case $host_cpu in
-                 hppa*64*)
-                   archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-                   ;;
-                 ia64*)
-                   archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-                   ;;
-                 *)
-                   archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-                   ;;
-               esac
-             fi
-           else
-             # FIXME: insert proper C++ library support
-             ld_shlibs_CXX=no
-           fi
-           ;;
-        esac
-        ;;
-
-      interix[3-9]*)
-       hardcode_direct_CXX=no
-       hardcode_shlibpath_var_CXX=no
-       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-       export_dynamic_flag_spec_CXX='${wl}-E'
-       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-       # Instead, shared libraries are loaded at an image base (0x10000000 by
-       # default) and relocated if they conflict, which is a slow very memory
-       # consuming and fragmenting process.  To avoid this, we pick a random,
-       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-       archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-       archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-       ;;
-      irix5* | irix6*)
-        case $cc_basename in
-          CC*)
-           # SGI C++
-           archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-
-           # Archives containing C++ object files must be created using
-           # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-           # necessary to make sure instantiated templates are included
-           # in the archive.
-           old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
-           ;;
-          *)
-           if test "$GXX" = yes; then
-             if test "$with_gnu_ld" = no; then
-               archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-             else
-               archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
-             fi
-           fi
-           link_all_deplibs_CXX=yes
-           ;;
-        esac
-        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-        hardcode_libdir_separator_CXX=:
-        inherit_rpath_CXX=yes
-        ;;
-
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-        case $cc_basename in
-          KCC*)
-           # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-           # KCC will only create a shared library if the output file
-           # ends with ".so" (or ".sl" for HP-UX), so rename the library
-           # to its proper name (with version) after linking.
-           archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-           archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-
-           hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-           export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
-           # Archives containing C++ object files must be created using
-           # "CC -Bstatic", where "CC" is the KAI C++ compiler.
-           old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
-           ;;
-         icpc* | ecpc* )
-           # Intel C++
-           with_gnu_ld=yes
-           # version 8.0 and above of icpc choke on multiply defined symbols
-           # if we add $predep_objects and $postdep_objects, however 7.1 and
-           # earlier do not add the objects themselves.
-           case `$CC -V 2>&1` in
-             *"Version 7."*)
-               archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-               archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-               ;;
-             *)  # Version 8.0 or newer
-               tmp_idyn=
-               case $host_cpu in
-                 ia64*) tmp_idyn=' -i_dynamic';;
-               esac
-               archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-               archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-               ;;
-           esac
-           archive_cmds_need_lc_CXX=no
-           hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-           export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-           whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-           ;;
-          pgCC* | pgcpp*)
-            # Portland Group C++ compiler
-           case `$CC -V` in
-           *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
-             prelink_cmds_CXX='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
-             old_archive_cmds_CXX='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-               $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
-               $RANLIB $oldlib'
-             archive_cmds_CXX='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-             archive_expsym_cmds_CXX='tpldir=Template.dir~
-               rm -rf $tpldir~
-               $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-               $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-             ;;
-           *) # Version 6 and above use weak symbols
-             archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-             archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-             ;;
-           esac
-
-           hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-           export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-           whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-            ;;
-         cxx*)
-           # Compaq C++
-           archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
-           runpath_var=LD_RUN_PATH
-           hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-           hardcode_libdir_separator_CXX=:
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
-           ;;
-         xl* | mpixl* | bgxl*)
-           # IBM XL 8.0 on PPC, with GNU ld
-           hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-           export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-           archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-           if test "x$supports_anon_versioning" = xyes; then
-             archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
-               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-               echo "local: *; };" >> $output_objdir/$libname.ver~
-               $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-           fi
-           ;;
-         *)
-           case `$CC -V 2>&1 | sed 5q` in
-           *Sun\ C*)
-             # Sun C++ 5.9
-             no_undefined_flag_CXX=' -zdefs'
-             archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-             archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
-             hardcode_libdir_flag_spec_CXX='-R$libdir'
-             whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
-             compiler_needs_object_CXX=yes
-
-             # Not sure whether something based on
-             # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
-             # would be better.
-             output_verbose_link_cmd='func_echo_all'
-
-             # Archives containing C++ object files must be created using
-             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-             # necessary to make sure instantiated templates are included
-             # in the archive.
-             old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
-             ;;
-           esac
-           ;;
-       esac
-       ;;
-
-      lynxos*)
-        # FIXME: insert proper C++ library support
-       ld_shlibs_CXX=no
-       ;;
-
-      m88k*)
-        # FIXME: insert proper C++ library support
-        ld_shlibs_CXX=no
-       ;;
-
-      mvs*)
-        case $cc_basename in
-          cxx*)
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-         *)
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-       esac
-       ;;
-
-      netbsd*)
-        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-         archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-         wlarc=
-         hardcode_libdir_flag_spec_CXX='-R$libdir'
-         hardcode_direct_CXX=yes
-         hardcode_shlibpath_var_CXX=no
-       fi
-       # Workaround some broken pre-1.5 toolchains
-       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-       ;;
-
-      *nto* | *qnx*)
-        ld_shlibs_CXX=yes
-       ;;
-
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-       ld_shlibs_CXX=no
-       ;;
-
-      openbsd*)
-       if test -f /usr/libexec/ld.so; then
-         hardcode_direct_CXX=yes
-         hardcode_shlibpath_var_CXX=no
-         hardcode_direct_absolute_CXX=yes
-         archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-         hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-           archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-           export_dynamic_flag_spec_CXX='${wl}-E'
-           whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-         fi
-         output_verbose_link_cmd=func_echo_all
-       else
-         ld_shlibs_CXX=no
-       fi
-       ;;
-
-      osf3* | osf4* | osf5*)
-        case $cc_basename in
-          KCC*)
-           # Kuck and Associates, Inc. (KAI) C++ Compiler
-
-           # KCC will only create a shared library if the output file
-           # ends with ".so" (or ".sl" for HP-UX), so rename the library
-           # to its proper name (with version) after linking.
-           archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-           hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-           hardcode_libdir_separator_CXX=:
-
-           # Archives containing C++ object files must be created using
-           # the KAI C++ compiler.
-           case $host in
-             osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
-             *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
-           esac
-           ;;
-          RCC*)
-           # Rational C++ 2.4.1
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-          cxx*)
-           case $host in
-             osf3*)
-               allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-               archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-               hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-               ;;
-             *)
-               allow_undefined_flag_CXX=' -expect_unresolved \*'
-               archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-               archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-                 echo "-hidden">> $lib.exp~
-                 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
-                 $RM $lib.exp'
-               hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-               ;;
-           esac
-
-           hardcode_libdir_separator_CXX=:
-
-           # Commands to make compiler produce verbose output that lists
-           # what "hidden" libraries, object files and flags are used when
-           # linking a shared library.
-           #
-           # There doesn't appear to be a way to prevent this compiler from
-           # explicitly linking system object files so we need to strip them
-           # from the output so that they don't get included in the library
-           # dependencies.
-           output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
-           ;;
-         *)
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-             case $host in
-               osf3*)
-                 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-                 ;;
-               *)
-                 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-                 ;;
-             esac
-
-             hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-             hardcode_libdir_separator_CXX=:
-
-             # Commands to make compiler produce verbose output that lists
-             # what "hidden" libraries, object files and flags are used when
-             # linking a shared library.
-             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-
-           else
-             # FIXME: insert proper C++ library support
-             ld_shlibs_CXX=no
-           fi
-           ;;
-        esac
-        ;;
-
-      psos*)
-        # FIXME: insert proper C++ library support
-        ld_shlibs_CXX=no
-        ;;
-
-      sunos4*)
-        case $cc_basename in
-          CC*)
-           # Sun C++ 4.x
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-          lcc*)
-           # Lucid
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-          *)
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-        esac
-        ;;
-
-      solaris*)
-        case $cc_basename in
-          CC* | sunCC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-            archive_cmds_need_lc_CXX=yes
-           no_undefined_flag_CXX=' -zdefs'
-           archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-           archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-             $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-           hardcode_libdir_flag_spec_CXX='-R$libdir'
-           hardcode_shlibpath_var_CXX=no
-           case $host_os in
-             solaris2.[0-5] | solaris2.[0-5].*) ;;
-             *)
-               # The compiler driver will combine and reorder linker options,
-               # but understands `-z linker_flag'.
-               # Supported since Solaris 2.6 (maybe 2.5.1?)
-               whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
-               ;;
-           esac
-           link_all_deplibs_CXX=yes
-
-           output_verbose_link_cmd='func_echo_all'
-
-           # Archives containing C++ object files must be created using
-           # "CC -xar", where "CC" is the Sun C++ compiler.  This is
-           # necessary to make sure instantiated templates are included
-           # in the archive.
-           old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
-           ;;
-          gcx*)
-           # Green Hills C++ Compiler
-           archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
-           # The C++ compiler must be used to create the archive.
-           old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-           ;;
-          *)
-           # GNU C++ compiler with Solaris linker
-           if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-             no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
-             if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-               archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-               archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-               # Commands to make compiler produce verbose output that lists
-               # what "hidden" libraries, object files and flags are used when
-               # linking a shared library.
-               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-             else
-               # g++ 2.7 appears to require `-G' NOT `-shared' on this
-               # platform.
-               archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-               archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
-               # Commands to make compiler produce verbose output that lists
-               # what "hidden" libraries, object files and flags are used when
-               # linking a shared library.
-               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
-             fi
-
-             hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
-             case $host_os in
-               solaris2.[0-5] | solaris2.[0-5].*) ;;
-               *)
-                 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
-                 ;;
-             esac
-           fi
-           ;;
-        esac
-        ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag_CXX='${wl}-z,text'
-      archive_cmds_need_lc_CXX=no
-      hardcode_shlibpath_var_CXX=no
-      runpath_var='LD_RUN_PATH'
-
-      case $cc_basename in
-        CC*)
-         archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-       *)
-         archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-         ;;
-      esac
-      ;;
-
-      sysv5* | sco3.2v5* | sco5v6*)
-       # Note: We can NOT use -z defs as we might desire, because we do not
-       # link with -lc, and that would cause any symbols used from libc to
-       # always be unresolved, which means just about no library would
-       # ever link correctly.  If we're not using GNU ld we use -z text
-       # though, which does catch some bad symbols but isn't as heavy-handed
-       # as -z defs.
-       no_undefined_flag_CXX='${wl}-z,text'
-       allow_undefined_flag_CXX='${wl}-z,nodefs'
-       archive_cmds_need_lc_CXX=no
-       hardcode_shlibpath_var_CXX=no
-       hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
-       hardcode_libdir_separator_CXX=':'
-       link_all_deplibs_CXX=yes
-       export_dynamic_flag_spec_CXX='${wl}-Bexport'
-       runpath_var='LD_RUN_PATH'
-
-       case $cc_basename in
-          CC*)
-           archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
-             '"$old_archive_cmds_CXX"
-           reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
-             '"$reload_cmds_CXX"
-           ;;
-         *)
-           archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-           ;;
-       esac
-      ;;
-
-      tandem*)
-        case $cc_basename in
-          NCC*)
-           # NonStop-UX NCC 3.20
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-          *)
-           # FIXME: insert proper C++ library support
-           ld_shlibs_CXX=no
-           ;;
-        esac
-        ;;
-
-      vxworks*)
-        # FIXME: insert proper C++ library support
-        ld_shlibs_CXX=no
-        ;;
-
-      *)
-        # FIXME: insert proper C++ library support
-        ld_shlibs_CXX=no
-        ;;
-    esac
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
-$as_echo "$ld_shlibs_CXX" >&6; }
-    test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-    GCC_CXX="$GXX"
-    LD_CXX="$LD"
-
-    ## CAVEAT EMPTOR:
-    ## There is no encapsulation within the following macros, do not change
-    ## the running order or otherwise move them around unless you know exactly
-    ## what you are doing...
-    # Dependencies to place before and after the object being linked:
-predep_objects_CXX=
-postdep_objects_CXX=
-predeps_CXX=
-postdeps_CXX=
-compiler_lib_search_path_CXX=
-
-cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-_LT_EOF
-
-
-_lt_libdeps_save_CFLAGS=$CFLAGS
-case "$CC $CFLAGS " in #(
-*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
-*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
-*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
-esac
-
-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  for p in `eval "$output_verbose_link_cmd"`; do
-    case ${prev}${p} in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
-        prev=$p
-        continue
-       fi
-
-       # Expand the sysroot to ease extracting the directories later.
-       if test -z "$prev"; then
-         case $p in
-         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
-         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
-         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
-         esac
-       fi
-       case $p in
-       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
-       esac
-       if test "$pre_test_object_deps_done" = no; then
-        case ${prev} in
-        -L | -R)
-          # Internal compiler library paths should come after those
-          # provided the user.  The postdeps already come after the
-          # user supplied libs so there is no need to process them.
-          if test -z "$compiler_lib_search_path_CXX"; then
-            compiler_lib_search_path_CXX="${prev}${p}"
-          else
-            compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
-          fi
-          ;;
-        # The "-l" case would never come before the object being
-        # linked, so don't bother handling this case.
-        esac
-       else
-        if test -z "$postdeps_CXX"; then
-          postdeps_CXX="${prev}${p}"
-        else
-          postdeps_CXX="${postdeps_CXX} ${prev}${p}"
-        fi
-       fi
-       prev=
-       ;;
-
-    *.lto.$objext) ;; # Ignore GCC LTO objects
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-        pre_test_object_deps_done=yes
-        continue
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-        if test -z "$predep_objects_CXX"; then
-          predep_objects_CXX="$p"
-        else
-          predep_objects_CXX="$predep_objects_CXX $p"
-        fi
-       else
-        if test -z "$postdep_objects_CXX"; then
-          postdep_objects_CXX="$p"
-        else
-          postdep_objects_CXX="$postdep_objects_CXX $p"
-        fi
-       fi
-       ;;
-
-    *) ;; # Ignore the rest.
-
-    esac
-  done
-
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling CXX test program"
-fi
-
-$RM -f confest.$objext
-CFLAGS=$_lt_libdeps_save_CFLAGS
-
-# PORTME: override above test on systems where it is broken
-case $host_os in
-interix[3-9]*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  predep_objects_CXX=
-  postdep_objects_CXX=
-  postdeps_CXX=
-  ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      postdeps_CXX='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC* | sunCC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      postdeps_CXX='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-esac
-
-
-case " $postdeps_CXX " in
-*" -lc "*) archive_cmds_need_lc_CXX=no ;;
-esac
- compiler_lib_search_dirs_CXX=
-if test -n "${compiler_lib_search_path_CXX}"; then
- compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    lt_prog_compiler_wl_CXX=
-lt_prog_compiler_pic_CXX=
-lt_prog_compiler_static_CXX=
-
-
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    lt_prog_compiler_wl_CXX='-Wl,'
-    lt_prog_compiler_static_CXX='-static'
-
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-       # AIX 5 now supports IA64 processor
-       lt_prog_compiler_static_CXX='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      case $host_cpu in
-      powerpc)
-            # see comment about AmigaOS4 .so support
-            lt_prog_compiler_pic_CXX='-fPIC'
-        ;;
-      m68k)
-            # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
-            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
-        ;;
-      esac
-      ;;
-
-    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | cygwin* | os2* | pw32* | cegcc*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      # Although the cygwin gcc ignores -fPIC, still need this for old-style
-      # (--disable-auto-import) libraries
-      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_CXX='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      lt_prog_compiler_pic_CXX=
-      ;;
-    haiku*)
-      # PIC is the default for Haiku.
-      # The "-static" flag exists, but is broken.
-      lt_prog_compiler_static_CXX=
-      ;;
-    interix[3-9]*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-       lt_prog_compiler_pic_CXX=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
-      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
-      # sets the default TLS model and affects inlining.
-      case $host_cpu in
-      hppa*64*)
-       ;;
-      *)
-       lt_prog_compiler_pic_CXX='-fPIC'
-       ;;
-      esac
-      ;;
-    *qnx* | *nto*)
-      # QNX uses GNU C++, but need to define -shared option too, otherwise
-      # it will coredump.
-      lt_prog_compiler_pic_CXX='-fPIC -shared'
-      ;;
-    *)
-      lt_prog_compiler_pic_CXX='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix[4-9]*)
-       # All AIX code is PIC.
-       if test "$host_cpu" = ia64; then
-         # AIX 5 now supports IA64 processor
-         lt_prog_compiler_static_CXX='-Bstatic'
-       else
-         lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
-       fi
-       ;;
-      chorus*)
-       case $cc_basename in
-       cxch68*)
-         # Green Hills C++ Compiler
-         # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-         ;;
-       esac
-       ;;
-      mingw* | cygwin* | os2* | pw32* | cegcc*)
-       # This hack is so that the source file can tell whether it is being
-       # built for inclusion in a dll (and should export symbols for example).
-       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
-       ;;
-      dgux*)
-       case $cc_basename in
-         ec++*)
-           lt_prog_compiler_pic_CXX='-KPIC'
-           ;;
-         ghcx*)
-           # Green Hills C++ Compiler
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      freebsd* | dragonfly*)
-       # FreeBSD uses GNU C++
-       ;;
-      hpux9* | hpux10* | hpux11*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-           if test "$host_cpu" != ia64; then
-             lt_prog_compiler_pic_CXX='+Z'
-           fi
-           ;;
-         aCC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-           case $host_cpu in
-           hppa*64*|ia64*)
-             # +Z the default
-             ;;
-           *)
-             lt_prog_compiler_pic_CXX='+Z'
-             ;;
-           esac
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      interix*)
-       # This is c89, which is MS Visual C++ (no shared libs)
-       # Anyone wants to do a port?
-       ;;
-      irix5* | irix6* | nonstopux*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_static_CXX='-non_shared'
-           # CC pic flag -KPIC is the default.
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-       case $cc_basename in
-         KCC*)
-           # KAI C++ Compiler
-           lt_prog_compiler_wl_CXX='--backend -Wl,'
-           lt_prog_compiler_pic_CXX='-fPIC'
-           ;;
-         ecpc* )
-           # old Intel C++ for x86_64 which still supported -KPIC.
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-static'
-           ;;
-         icpc* )
-           # Intel C++, used to be incompatible with GCC.
-           # ICC 10 doesn't accept -KPIC any more.
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-fPIC'
-           lt_prog_compiler_static_CXX='-static'
-           ;;
-         pgCC* | pgcpp*)
-           # Portland Group C++ compiler
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-fpic'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-         cxx*)
-           # Compaq C++
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           lt_prog_compiler_pic_CXX=
-           lt_prog_compiler_static_CXX='-non_shared'
-           ;;
-         xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
-           # IBM XL 8.0, 9.0 on PPC and BlueGene
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-qpic'
-           lt_prog_compiler_static_CXX='-qstaticlink'
-           ;;
-         *)
-           case `$CC -V 2>&1 | sed 5q` in
-           *Sun\ C*)
-             # Sun C++ 5.9
-             lt_prog_compiler_pic_CXX='-KPIC'
-             lt_prog_compiler_static_CXX='-Bstatic'
-             lt_prog_compiler_wl_CXX='-Qoption ld '
-             ;;
-           esac
-           ;;
-       esac
-       ;;
-      lynxos*)
-       ;;
-      m88k*)
-       ;;
-      mvs*)
-       case $cc_basename in
-         cxx*)
-           lt_prog_compiler_pic_CXX='-W c,exportall'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      netbsd* | netbsdelf*-gnu)
-       ;;
-      *qnx* | *nto*)
-        # QNX uses GNU C++, but need to define -shared option too, otherwise
-        # it will coredump.
-        lt_prog_compiler_pic_CXX='-fPIC -shared'
-        ;;
-      osf3* | osf4* | osf5*)
-       case $cc_basename in
-         KCC*)
-           lt_prog_compiler_wl_CXX='--backend -Wl,'
-           ;;
-         RCC*)
-           # Rational C++ 2.4.1
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         cxx*)
-           # Digital/Compaq C++
-           lt_prog_compiler_wl_CXX='-Wl,'
-           # Make sure the PIC flag is empty.  It appears that all Alpha
-           # Linux and Compaq Tru64 Unix objects are PIC.
-           lt_prog_compiler_pic_CXX=
-           lt_prog_compiler_static_CXX='-non_shared'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      psos*)
-       ;;
-      solaris*)
-       case $cc_basename in
-         CC* | sunCC*)
-           # Sun C++ 4.2, 5.x and Centerline C++
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           lt_prog_compiler_wl_CXX='-Qoption ld '
-           ;;
-         gcx*)
-           # Green Hills C++ Compiler
-           lt_prog_compiler_pic_CXX='-PIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sunos4*)
-       case $cc_basename in
-         CC*)
-           # Sun C++ 4.x
-           lt_prog_compiler_pic_CXX='-pic'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-         lcc*)
-           # Lucid
-           lt_prog_compiler_pic_CXX='-pic'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-       case $cc_basename in
-         CC*)
-           lt_prog_compiler_wl_CXX='-Wl,'
-           lt_prog_compiler_pic_CXX='-KPIC'
-           lt_prog_compiler_static_CXX='-Bstatic'
-           ;;
-       esac
-       ;;
-      tandem*)
-       case $cc_basename in
-         NCC*)
-           # NonStop-UX NCC 3.20
-           lt_prog_compiler_pic_CXX='-KPIC'
-           ;;
-         *)
-           ;;
-       esac
-       ;;
-      vxworks*)
-       ;;
-      *)
-       lt_prog_compiler_can_build_shared_CXX=no
-       ;;
-    esac
-  fi
-
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_CXX=
-    ;;
-  *)
-    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
-    ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
-lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
-if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_pic_works_CXX=no
-   ac_outfile=conftest.$ac_objext
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_pic_works_CXX=yes
-     fi
-   fi
-   $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
-    case $lt_prog_compiler_pic_CXX in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
-     esac
-else
-    lt_prog_compiler_pic_CXX=
-     lt_prog_compiler_can_build_shared_CXX=no
-fi
-
-fi
-
-
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_static_works_CXX=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   echo "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_cv_prog_compiler_static_works_CXX=yes
-       fi
-     else
-       lt_cv_prog_compiler_static_works_CXX=yes
-     fi
-   fi
-   $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
-
-if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
-    :
-else
-    lt_prog_compiler_static_CXX=
-fi
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_c_o_CXX=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_CXX=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_prog_compiler_c_o_CXX=no
-   $RM -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_CXX=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $RM conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
-   $RM out/* && rmdir out
-   cd ..
-   $RM -r conftest
-   $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
-  hard_links=yes
-  $RM conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-
-  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
-  case $host_os in
-  aix[4-9]*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    # Also, AIX nm treats weak defined symbols like other global defined
-    # symbols, whereas GNU nm marks them as "W".
-    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    else
-      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    export_symbols_cmds_CXX="$ltdll_cmds"
-    ;;
-  cygwin* | mingw* | cegcc*)
-    case $cc_basename in
-    cl*)
-      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
-      ;;
-    *)
-      export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
-      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
-      ;;
-    esac
-    ;;
-  linux* | k*bsd*-gnu | gnu*)
-    link_all_deplibs_CXX=no
-    ;;
-  *)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-    ;;
-  esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
-$as_echo "$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
-
-with_gnu_ld_CXX=$with_gnu_ld
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_CXX" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_CXX=yes
-
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_CXX in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  $RM conftest*
-       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } 2>conftest.err; then
-         soname=conftest
-         lib=conftest
-         libobjs=conftest.$ac_objext
-         deplibs=
-         wl=$lt_prog_compiler_wl_CXX
-         pic_flag=$lt_prog_compiler_pic_CXX
-         compiler_flags=-v
-         linker_flags=-v
-         verstring=
-         output_objdir=.
-         libname=conftest
-         lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
-         allow_undefined_flag_CXX=
-         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
-  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-         then
-           lt_cv_archive_cmds_need_lc_CXX=no
-         else
-           lt_cv_archive_cmds_need_lc_CXX=yes
-         fi
-         allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
-       else
-         cat conftest.err 1>&5
-       fi
-       $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
-$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
-      archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
-      ;;
-    esac
-  fi
-  ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
-
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
-
-aix[4-9]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-          echo ' yes '
-          echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
-       :
-      else
-       can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  case $host_cpu in
-  powerpc)
-    # Since July 2007 AmigaOS4 officially supports .so libraries.
-    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    ;;
-  m68k)
-    library_names_spec='$libname.ixlibrary $libname.a'
-    # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-    ;;
-  esac
-  ;;
-
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi[45]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
-
-  case $GCC,$cc_basename in
-  yes,*)
-    # gcc
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname~
-      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
-        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
-      fi'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-
-      ;;
-    mingw* | cegcc*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    dynamic_linker='Win32 ld.exe'
-    ;;
-
-  *,cl*)
-    # Native MSVC
-    libname_spec='$name'
-    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-    library_names_spec='${libname}.dll.lib'
-
-    case $build_os in
-    mingw*)
-      sys_lib_search_path_spec=
-      lt_save_ifs=$IFS
-      IFS=';'
-      for lt_path in $LIB
-      do
-        IFS=$lt_save_ifs
-        # Let DOS variable expansion print the short 8.3 style file name.
-        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
-        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
-      done
-      IFS=$lt_save_ifs
-      # Convert to MSYS style.
-      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
-      ;;
-    cygwin*)
-      # Convert to unix form, then to dos form, then back to unix form
-      # but this time dos style (no spaces!) so that the unix form looks
-      # like /cygdrive/c/PROGRA~1:/cygdr...
-      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
-      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
-      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
-      ;;
-    *)
-      sys_lib_search_path_spec="$LIB"
-      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH.
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      # FIXME: find the short name or the path components, as spaces are
-      # common. (e.g. "Program Files" -> "PROGRA~1")
-      ;;
-    esac
-
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $RM \$dlpath'
-    shlibpath_overrides_runpath=yes
-    dynamic_linker='Win32 link.exe'
-    ;;
-
-  *)
-    # Assume MSVC wrapper
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    dynamic_linker='Win32 ld.exe'
-    ;;
-  esac
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
-
-dgux*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[23].*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2.*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  *) # from 4.6 on, and DragonFly
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-haiku*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  dynamic_linker="$host_os runtime_loader"
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  hppa*64*)
-    shrext_cmds='.sl'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-  *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
-  postinstall_cmds='chmod 555 $lib'
-  # or fails outright, so override atomically:
-  install_override_mode=555
-  ;;
-
-interix[3-9]*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-       if test "$lt_cv_prog_gnu_ld" = yes; then
-               version_type=linux # correct to gnu/linux during the next big refactor
-       else
-               version_type=irix
-       fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
-
-# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-
-  # Some binutils ld are patched to set DT_RUNPATH
-  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  lt_cv_shlibpath_overrides_runpath=no
-    save_LDFLAGS=$LDFLAGS
-    save_libdir=$libdir
-    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
-        LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
-  lt_cv_shlibpath_overrides_runpath=yes
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LDFLAGS=$save_LDFLAGS
-    libdir=$save_libdir
-
-fi
-
-  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
-
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[      ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
-  fi
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsdelf*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='NetBSD ld.elf_so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-*nto* | *qnx*)
-  version_type=qnx
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='ldqnx.so'
-  ;;
-
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-       shlibpath_overrides_runpath=no
-       ;;
-      *)
-       shlibpath_overrides_runpath=yes
-       ;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
-
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-rdos*)
-  dynamic_linker=no
-  ;;
-
-solaris*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux # correct to gnu/linux during the next big refactor
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-       ;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-tpf*)
-  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-uts4*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action_CXX=
-if test -n "$hardcode_libdir_flag_spec_CXX" ||
-   test -n "$runpath_var_CXX" ||
-   test "X$hardcode_automatic_CXX" = "Xyes" ; then
-
-  # We can hardcode non-existent directories.
-  if test "$hardcode_direct_CXX" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
-     test "$hardcode_minus_L_CXX" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_CXX=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_CXX=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_CXX=unsupported
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
-$as_echo "$hardcode_action_CXX" >&6; }
-
-if test "$hardcode_action_CXX" = relink ||
-   test "$inherit_rpath_CXX" = yes; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-
-
-
-
-
-
-  fi # test -n "$compiler"
-
-  CC=$lt_save_CC
-  CFLAGS=$lt_save_CFLAGS
-  LDCXX=$LD
-  LD=$lt_save_LD
-  GCC=$lt_save_GCC
-  with_gnu_ld=$lt_save_with_gnu_ld
-  lt_cv_path_LDCXX=$lt_cv_path_LD
-  lt_cv_path_LD=$lt_save_path_LD
-  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-        ac_config_commands="$ac_config_commands libtool"
-
-
-
-
-# Only expand once:
-
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RC"; then
-  ac_cv_prog_RC="$RC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_RC="${ac_tool_prefix}windres"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-RC=$ac_cv_prog_RC
-if test -n "$RC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
-$as_echo "$RC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RC"; then
-  ac_ct_RC=$RC
-  # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RC"; then
-  ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_RC="windres"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RC=$ac_cv_prog_ac_ct_RC
-if test -n "$ac_ct_RC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
-$as_echo "$ac_ct_RC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_RC" = x; then
-    RC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RC=$ac_ct_RC
-  fi
-else
-  RC="$ac_cv_prog_RC"
-fi
-
-
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-objext_RC=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_CFLAGS=$CFLAGS
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-CFLAGS=
-compiler=$CC
-compiler_RC=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
-
-lt_cv_prog_compiler_c_o_RC=yes
-
-if test -n "$compiler"; then
-  :
-
-
-
-fi
-
-GCC=$lt_save_GCC
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC=$lt_save_CC
-CFLAGS=$lt_save_CFLAGS
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-
-# Extract the first word of "autogen", so it can be a program name with args.
-set dummy autogen; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_HAVE_AUTOGEN+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$HAVE_AUTOGEN"; then
-  ac_cv_prog_HAVE_AUTOGEN="$HAVE_AUTOGEN" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_HAVE_AUTOGEN="yes"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_HAVE_AUTOGEN" && ac_cv_prog_HAVE_AUTOGEN="no"
-fi
-fi
-HAVE_AUTOGEN=$ac_cv_prog_HAVE_AUTOGEN
-if test -n "$HAVE_AUTOGEN"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_AUTOGEN" >&5
-$as_echo "$HAVE_AUTOGEN" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "wine", so it can be a program name with args.
-set dummy wine; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_HAVE_WINE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$HAVE_WINE"; then
-  ac_cv_prog_HAVE_WINE="$HAVE_WINE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_HAVE_WINE="yes"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_HAVE_WINE" && ac_cv_prog_HAVE_WINE="no"
-fi
-fi
-HAVE_WINE=$ac_cv_prog_HAVE_WINE
-if test -n "$HAVE_WINE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_WINE" >&5
-$as_echo "$HAVE_WINE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-# Extract the first word of "xcode-select", so it can be a program name with args.
-set dummy xcode-select; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_HAVE_XCODE_SELECT+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$HAVE_XCODE_SELECT"; then
-  ac_cv_prog_HAVE_XCODE_SELECT="$HAVE_XCODE_SELECT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_HAVE_XCODE_SELECT="yes"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_HAVE_XCODE_SELECT" && ac_cv_prog_HAVE_XCODE_SELECT="no"
-fi
-fi
-HAVE_XCODE_SELECT=$ac_cv_prog_HAVE_XCODE_SELECT
-if test -n "$HAVE_XCODE_SELECT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XCODE_SELECT" >&5
-$as_echo "$HAVE_XCODE_SELECT" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-#------------------------------------------------------------------------------------
-# 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"
-
-#------------------------------------------------------------------------------------
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-                  (('a' <= (c) && (c) <= 'i') \
-                    || ('j' <= (c) && (c) <= 'r') \
-                    || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-       || toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-
-for ac_header in endian.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default"
-if test "x$ac_cv_header_endian_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_ENDIAN_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in byteswap.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
-if test "x$ac_cv_header_byteswap_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_BYTESWAP_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in locale.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
-if test "x$ac_cv_header_locale_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LOCALE_H 1
-_ACEOF
-
-fi
-
-done
-
-for ac_header in sys/time.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_time_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_TIME_H 1
-_ACEOF
-
-fi
-
-done
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
-$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
-if ${ac_cv_header_sys_wait_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif
-
-int
-main ()
-{
-  int s;
-  wait (&s);
-  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_sys_wait_h=yes
-else
-  ac_cv_header_sys_wait_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
-$as_echo "$ac_cv_header_sys_wait_h" >&6; }
-if test $ac_cv_header_sys_wait_h = yes; then
-
-$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
-
-fi
-
-
-ac_fn_c_check_decl "$LINENO" "S_IRGRP" "ac_cv_have_decl_S_IRGRP" "$ac_includes_default"
-if test "x$ac_cv_have_decl_S_IRGRP" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_S_IRGRP $ac_have_decl
-_ACEOF
-
-if test x$ac_cv_have_decl_S_IRGRP = xyes ; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_S_IRGRP 1
-_ACEOF
-
-else
-       cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_S_IRGRP 0
-_ACEOF
-
-       fi
-
- if test "$build_os:$target_os:$host_os:$HAVE_WINE" = "linux-gnu:mingw32msvc:mingw32msvc:yes"; then
-  LINUX_MINGW_CROSS_TEST_TRUE=
-  LINUX_MINGW_CROSS_TEST_FALSE='#'
-else
-  LINUX_MINGW_CROSS_TEST_TRUE='#'
-  LINUX_MINGW_CROSS_TEST_FALSE=
-fi
-
-
-#====================================================================================
-# Couple of initializations here. Fill in real values later.
-
-SHLIB_VERSION_ARG=""
-
-#====================================================================================
-# Finished checking, handle options.
-
-# Check whether --enable-experimental was given.
-if test "${enable_experimental+set}" = set; then :
-  enableval=$enable_experimental;
-fi
-
-
-EXPERIMENTAL_CODE=0
-if test x$enable_experimental = xyes ; then
-       EXPERIMENTAL_CODE=1
-       fi
-
-cat >>confdefs.h <<_ACEOF
-#define ENABLE_EXPERIMENTAL_CODE ${EXPERIMENTAL_CODE}
-_ACEOF
-
-
-# Check whether --enable-werror was given.
-if test "${enable_werror+set}" = set; then :
-  enableval=$enable_werror;
-fi
-
-
-# Check whether --enable-stack-smash-protection was given.
-if test "${enable_stack_smash_protection+set}" = set; then :
-  enableval=$enable_stack_smash_protection;
-fi
-
-
-# Check whether --enable-gcc-pipe was given.
-if test "${enable_gcc_pipe+set}" = set; then :
-  enableval=$enable_gcc_pipe;
-fi
-
-
-# Check whether --enable-gcc-opt was given.
-if test "${enable_gcc_opt+set}" = set; then :
-  enableval=$enable_gcc_opt;
-fi
-
-
-# Check whether --enable-cpu-clip was given.
-if test "${enable_cpu_clip+set}" = set; then :
-  enableval=$enable_cpu_clip;
-fi
-
-
-# Check whether --enable-bow-docs was given.
-if test "${enable_bow_docs+set}" = set; then :
-  enableval=$enable_bow_docs;
-fi
-
-
-# Check whether --enable-sqlite was given.
-if test "${enable_sqlite+set}" = set; then :
-  enableval=$enable_sqlite;
-fi
-
-
-# Check whether --enable-alsa was given.
-if test "${enable_alsa+set}" = set; then :
-  enableval=$enable_alsa;
-fi
-
-
-# Check whether --enable-external-libs was given.
-if test "${enable_external_libs+set}" = set; then :
-  enableval=$enable_external_libs;
-fi
-
-
-# Check whether --enable-octave was given.
-if test "${enable_octave+set}" = set; then :
-  enableval=$enable_octave;
-fi
-
-
-# Check whether --enable-test-coverage was given.
-if test "${enable_test_coverage+set}" = set; then :
-  enableval=$enable_test_coverage;
-fi
-
- if test "$enable_test_coverage" = yes; then
-  ENABLE_TEST_COVERAGE_TRUE=
-  ENABLE_TEST_COVERAGE_FALSE='#'
-else
-  ENABLE_TEST_COVERAGE_TRUE='#'
-  ENABLE_TEST_COVERAGE_FALSE=
-fi
-
-
-#====================================================================================
-# Check types and their sizes.
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
-$as_echo_n "checking size of wchar_t... " >&6; }
-if ${ac_cv_sizeof_wchar_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_wchar_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (wchar_t)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_wchar_t=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
-$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
-if ${ac_cv_sizeof_short+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_short" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (short)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_short=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
-if ${ac_cv_sizeof_int+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_int" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_int=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if ${ac_cv_sizeof_long+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_long=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
-$as_echo_n "checking size of float... " >&6; }
-if ${ac_cv_sizeof_float+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_float" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (float)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_float=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
-$as_echo "$ac_cv_sizeof_float" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_FLOAT $ac_cv_sizeof_float
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
-$as_echo_n "checking size of double... " >&6; }
-if ${ac_cv_sizeof_double+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_double" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (double)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_double=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
-$as_echo "$ac_cv_sizeof_double" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_DOUBLE $ac_cv_sizeof_double
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5
-$as_echo_n "checking size of void*... " >&6; }
-if ${ac_cv_sizeof_voidp+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_voidp" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (void*)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_voidp=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5
-$as_echo "$ac_cv_sizeof_voidp" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_VOIDP $ac_cv_sizeof_voidp
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
-$as_echo_n "checking size of size_t... " >&6; }
-if ${ac_cv_sizeof_size_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_size_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (size_t)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_size_t=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
-$as_echo "$ac_cv_sizeof_size_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int64_t" >&5
-$as_echo_n "checking size of int64_t... " >&6; }
-if ${ac_cv_sizeof_int64_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int64_t))" "ac_cv_sizeof_int64_t"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_int64_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (int64_t)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_int64_t=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int64_t" >&5
-$as_echo "$ac_cv_sizeof_int64_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT64_T $ac_cv_sizeof_int64_t
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
-$as_echo_n "checking size of long long... " >&6; }
-if ${ac_cv_sizeof_long_long+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_long_long" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (long long)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_long_long=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
-$as_echo "$ac_cv_sizeof_long_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
-
-
-
-#====================================================================================
-# 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.
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
-$as_echo_n "checking size of off_t... " >&6; }
-if ${ac_cv_sizeof_off_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_off_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (off_t)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_off_t=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
-$as_echo "$ac_cv_sizeof_off_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of loff_t" >&5
-$as_echo_n "checking size of loff_t... " >&6; }
-if ${ac_cv_sizeof_loff_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (loff_t))" "ac_cv_sizeof_loff_t"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_loff_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (loff_t)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_loff_t=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_loff_t" >&5
-$as_echo "$ac_cv_sizeof_loff_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LOFF_T $ac_cv_sizeof_loff_t
-_ACEOF
-
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off64_t" >&5
-$as_echo_n "checking size of off64_t... " >&6; }
-if ${ac_cv_sizeof_off64_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off64_t))" "ac_cv_sizeof_off64_t"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_off64_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (off64_t)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_off64_t=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off64_t" >&5
-$as_echo "$ac_cv_sizeof_off64_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_OFF64_T $ac_cv_sizeof_off64_t
-_ACEOF
-
-
-
-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
-
-$as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
-
-               ;;
-       *)
-               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
-               elif test "x$ac_cv_sizeof_loff_t" = "x8" ; then
-                       TYPEOF_SF_COUNT_T="int64_t"
-                       SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
-                       SIZEOF_SF_COUNT_T=8
-               elif test "x$ac_cv_sizeof_off64_t" = "x8" ; then
-                       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
-
-                       # Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then :
-  enableval=$enable_largefile;
-fi
-
-if test "$enable_largefile" != no; then
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
-$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if ${ac_cv_sys_largefile_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_sys_largefile_CC=no
-     if test "$GCC" != yes; then
-       ac_save_CC=$CC
-       while :; do
-        # IRIX 6.2 and later do not support large files by default,
-        # so use the C compiler's -n32 option if that helps.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-        if ac_fn_c_try_compile "$LINENO"; then :
-  break
-fi
-rm -f core conftest.err conftest.$ac_objext
-        CC="$CC -n32"
-        if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_largefile_CC=' -n32'; break
-fi
-rm -f core conftest.err conftest.$ac_objext
-        break
-       done
-       CC=$ac_save_CC
-       rm -f conftest.$ac_ext
-    fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
-$as_echo "$ac_cv_sys_largefile_CC" >&6; }
-  if test "$ac_cv_sys_largefile_CC" != no; then
-    CC=$CC$ac_cv_sys_largefile_CC
-  fi
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if ${ac_cv_sys_file_offset_bits+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  while :; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_file_offset_bits=no; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_file_offset_bits=64; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_cv_sys_file_offset_bits=unknown
-  break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
-case $ac_cv_sys_file_offset_bits in #(
-  no | unknown) ;;
-  *)
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
-;;
-esac
-rm -rf conftest*
-  if test $ac_cv_sys_file_offset_bits = unknown; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if ${ac_cv_sys_large_files+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  while :; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_large_files=no; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#define _LARGE_FILES 1
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_large_files=1; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_cv_sys_large_files=unknown
-  break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
-$as_echo "$ac_cv_sys_large_files" >&6; }
-case $ac_cv_sys_large_files in #(
-  no | unknown) ;;
-  *)
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
-;;
-esac
-rm -rf conftest*
-  fi
-
-
-fi
-
-
-                       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
-
-                       # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
-$as_echo_n "checking size of off_t... " >&6; }
-if ${ac_cv_sizeof_off_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_off_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (off_t)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_off_t=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
-$as_echo "$ac_cv_sizeof_off_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
-_ACEOF
-
-
-
-                       if test "x$ac_cv_sizeof_off_t" = "x8" ; then
-                               TYPEOF_SF_COUNT_T="int64_t"
-                               SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
-                       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
-                               as_fn_error $? "Bad file offset type." "$LINENO" 5
-                               fi
-                       fi
-               ;;
-       esac
-
-if test $SIZEOF_SF_COUNT_T = 4 ; then
-       SF_COUNT_MAX="0x7FFFFFFF"
-       fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define TYPEOF_SF_COUNT_T ${TYPEOF_SF_COUNT_T}
-_ACEOF
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SF_COUNT_T ${SIZEOF_SF_COUNT_T}
-_ACEOF
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SF_COUNT_MAX ${SF_COUNT_MAX}
-_ACEOF
-
-
-
-ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
-if test "x$ac_cv_type_ssize_t" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SSIZE_T 1
-_ACEOF
-
-
-fi
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of ssize_t" >&5
-$as_echo_n "checking size of ssize_t... " >&6; }
-if ${ac_cv_sizeof_ssize_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (ssize_t))" "ac_cv_sizeof_ssize_t"        "$ac_includes_default"; then :
-
-else
-  if test "$ac_cv_type_ssize_t" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (ssize_t)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_ssize_t=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_ssize_t" >&5
-$as_echo "$ac_cv_sizeof_ssize_t" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t
-_ACEOF
-
-
-
-#====================================================================================
-# Determine endian-ness of target processor.
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking processor byte ordering" >&5
-$as_echo_n "checking processor byte ordering... " >&6; }
-if ${ac_cv_c_byte_order+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  # 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.
-
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-               #include <endian.h>
-               #if BYTE_ORDER != LITTLE_ENDIAN
-                       not big endian
-               #endif
-
-int
-main ()
-{
-return 0 ;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_c_byte_order=little
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-               #include <endian.h>
-               #if BYTE_ORDER != BIG_ENDIAN
-                       not big endian
-               #endif
-
-int
-main ()
-{
-return 0 ;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_c_byte_order=big
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-       fi
-
-if test $ac_cv_c_byte_order = unknown ; then
-
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-               #include <sys/types.h>
-               #include <sys/param.h>
-               #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
-                       bogus endian macros
-               #endif
-
-int
-main ()
-{
-return 0 ;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <sys/types.h>
-                       #include <sys/param.h>
-                       #if BYTE_ORDER != LITTLE_ENDIAN
-                               not big endian
-                       #endif
-
-int
-main ()
-{
-return 0 ;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_c_byte_order=little
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <sys/types.h>
-                       #include <sys/param.h>
-                       #if BYTE_ORDER != LITTLE_ENDIAN
-                               not big endian
-                       #endif
-
-int
-main ()
-{
-return 0 ;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_c_byte_order=little
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-       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
-               if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-               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);
-                       }
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_c_byte_order=big
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-               if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-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);
-                       }
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_c_byte_order=little
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-               fi
-       fi
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_byte_order" >&5
-$as_echo "$ac_cv_c_byte_order" >&6; }
-
-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
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *****************************************************************" >&5
-$as_echo "$as_me: WARNING: *****************************************************************" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Not able to determine endian-ness of target processor.       " >&5
-$as_echo "$as_me: WARNING: *** Not able to determine endian-ness of target processor.       " >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in  " >&5
-$as_echo "$as_me: WARNING: *** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in  " >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** src/config.h may need to be hand editied.                    " >&5
-$as_echo "$as_me: WARNING: *** src/config.h may need to be hand editied.                    " >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *****************************************************************" >&5
-$as_echo "$as_me: WARNING: *****************************************************************" >&2;}
-       fi
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define CPU_IS_BIG_ENDIAN ${ac_cv_c_big_endian}
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define CPU_IS_LITTLE_ENDIAN ${ac_cv_c_little_endian}
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define WORDS_BIGENDIAN ${ac_cv_c_big_endian}
-_ACEOF
-
-
-#====================================================================================
-# Check for functions.
-
-for ac_func in malloc calloc realloc free
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-for ac_func in open read write lseek lseek64
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-for ac_func in fstat fstat64 ftruncate fsync
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-for ac_func in snprintf vsnprintf
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-for ac_func in gmtime gmtime_r localtime localtime_r gettimeofday
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-for ac_func in mmap getpagesize
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-for ac_func in setlocale
-do :
-  ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
-if test "x$ac_cv_func_setlocale" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SETLOCALE 1
-_ACEOF
-
-fi
-done
-
-for ac_func in pipe waitpid
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for floor in -lm" >&5
-$as_echo_n "checking for floor in -lm... " >&6; }
-if ${ac_cv_lib_m_floor+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char floor ();
-int
-main ()
-{
-return floor ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_m_floor=yes
-else
-  ac_cv_lib_m_floor=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_floor" >&5
-$as_echo "$ac_cv_lib_m_floor" >&6; }
-if test "x$ac_cv_lib_m_floor" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
-
-  LIBS="-lm $LIBS"
-
-fi
-
-for ac_func in floor ceil fmod lround
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lrint" >&5
-$as_echo_n "checking for lrint... " >&6; }
-if ${ac_cv_c99_lrint+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-lrint_save_CFLAGS=$CFLAGS
-CFLAGS="-lm"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define                _ISOC9X_SOURCE  1
-#define        _ISOC99_SOURCE  1
-#define                __USE_ISOC99    1
-#define        __USE_ISOC9X    1
-
-#include <math.h>
-
-int
-main ()
-{
-if (!lrint(3.14159)) lrint(2.7183);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_c99_lrint=yes
-else
-  ac_cv_c99_lrint=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-CFLAGS=$lrint_save_CFLAGS
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c99_lrint" >&5
-$as_echo "$ac_cv_c99_lrint" >&6; }
-
-if test "$ac_cv_c99_lrint" = yes; then
-
-$as_echo "#define HAVE_LRINT 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lrintf" >&5
-$as_echo_n "checking for lrintf... " >&6; }
-if ${ac_cv_c99_lrintf+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-lrintf_save_CFLAGS=$CFLAGS
-CFLAGS="-lm"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define                _ISOC9X_SOURCE  1
-#define        _ISOC99_SOURCE  1
-#define                __USE_ISOC99    1
-#define        __USE_ISOC9X    1
-
-#include <math.h>
-
-int
-main ()
-{
-if (!lrintf(3.14159)) lrintf(2.7183);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_c99_lrintf=yes
-else
-  ac_cv_c99_lrintf=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-CFLAGS=$lrintf_save_CFLAGS
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c99_lrintf" >&5
-$as_echo "$ac_cv_c99_lrintf" >&6; }
-
-if test "$ac_cv_c99_lrintf" = yes; then
-
-$as_echo "#define HAVE_LRINTF 1" >>confdefs.h
-
-fi
-
-
-#====================================================================================
-# Check for requirements for building plugins for other languages/enviroments.
-
-if test x$cross_compiling = xno ; then
-       if test x$enable_octave = xno ; then
-                if false; then
-  BUILD_OCTAVE_MOD_TRUE=
-  BUILD_OCTAVE_MOD_FALSE='#'
-else
-  BUILD_OCTAVE_MOD_TRUE='#'
-  BUILD_OCTAVE_MOD_FALSE=
-fi
-
-       else
-
-
-OCTAVE_BUILD=no
-
-
-
-
-# Check whether --with-octave was given.
-if test "${with_octave+set}" = set; then :
-  withval=$with_octave;  with_octave=$withval
-fi
-
-
-test -z "$with_octave" && with_octave=octave
-
-# Extract the first word of "$with_octave", so it can be a program name with args.
-set dummy $with_octave; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_HAVE_OCTAVE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$HAVE_OCTAVE"; then
-  ac_cv_prog_HAVE_OCTAVE="$HAVE_OCTAVE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_HAVE_OCTAVE="yes"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_HAVE_OCTAVE" && ac_cv_prog_HAVE_OCTAVE="no"
-fi
-fi
-HAVE_OCTAVE=$ac_cv_prog_HAVE_OCTAVE
-if test -n "$HAVE_OCTAVE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_OCTAVE" >&5
-$as_echo "$HAVE_OCTAVE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-if test "x$ac_cv_prog_HAVE_OCTAVE" = "xyes" ; then
-       OCTAVE=$with_octave
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCTAVE_VERSION in $OCTAVE" >&5
-$as_echo_n "checking for OCTAVE_VERSION in $OCTAVE... " >&6; }
-OCTAVE_VERSION=`TERM=;$OCTAVE -qfH --eval "disp(OCTAVE_VERSION)"`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCTAVE_VERSION" >&5
-$as_echo "$OCTAVE_VERSION" >&6; }
-
-
-       fi
-
-
-
-
-
-
-
-
-
-# Check whether --with-mkoctfile was given.
-if test "${with_mkoctfile+set}" = set; then :
-  withval=$with_mkoctfile;  with_mkoctfile=$withval
-fi
-
-
-test -z "$with_mkoctfile" && with_mkoctfile=mkoctfile
-
-# Extract the first word of "$with_mkoctfile", so it can be a program name with args.
-set dummy $with_mkoctfile; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_HAVE_MKOCTFILE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$HAVE_MKOCTFILE"; then
-  ac_cv_prog_HAVE_MKOCTFILE="$HAVE_MKOCTFILE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_HAVE_MKOCTFILE="yes"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_HAVE_MKOCTFILE" && ac_cv_prog_HAVE_MKOCTFILE="no"
-fi
-fi
-HAVE_MKOCTFILE=$ac_cv_prog_HAVE_MKOCTFILE
-if test -n "$HAVE_MKOCTFILE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_MKOCTFILE" >&5
-$as_echo "$HAVE_MKOCTFILE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-if test "x$ac_cv_prog_HAVE_MKOCTFILE" = "xyes" ; then
-       MKOCTFILE=$with_mkoctfile
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version of $MKOCTFILE" >&5
-$as_echo_n "checking for version of $MKOCTFILE... " >&6; }
-       MKOCTFILE_VERSION=`$with_mkoctfile --version 2>&1 | sed 's/mkoctfile, version //g'`
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKOCTFILE_VERSION" >&5
-$as_echo "$MKOCTFILE_VERSION" >&6; }
-       fi
-
-
-
-
-
-
-
-
-# Check whether --with-octave-config was given.
-if test "${with_octave_config+set}" = set; then :
-  withval=$with_octave_config;  with_octave_config=$withval
-fi
-
-
-test -z "$with_octave_config" && with_octave_config=octave-config
-
-# Extract the first word of "$with_octave_config", so it can be a program name with args.
-set dummy $with_octave_config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_HAVE_OCTAVE_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$HAVE_OCTAVE_CONFIG"; then
-  ac_cv_prog_HAVE_OCTAVE_CONFIG="$HAVE_OCTAVE_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_HAVE_OCTAVE_CONFIG="yes"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_HAVE_OCTAVE_CONFIG" && ac_cv_prog_HAVE_OCTAVE_CONFIG="no"
-fi
-fi
-HAVE_OCTAVE_CONFIG=$ac_cv_prog_HAVE_OCTAVE_CONFIG
-if test -n "$HAVE_OCTAVE_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_OCTAVE_CONFIG" >&5
-$as_echo "$HAVE_OCTAVE_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-if test "x$ac_cv_prog_HAVE_OCTAVE_CONFIG" = "xyes" ; then
-       OCTAVE_CONFIG=$with_octave_config
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version of $OCTAVE_CONFIG" >&5
-$as_echo_n "checking for version of $OCTAVE_CONFIG... " >&6; }
-       OCTAVE_CONFIG_VERSION=`$OCTAVE_CONFIG --version`
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCTAVE_CONFIG_VERSION" >&5
-$as_echo "$OCTAVE_CONFIG_VERSION" >&6; }
-       fi
-
-
-
-
-
-
-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
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Mismatch between versions of octave and mkoctfile. **" >&5
-$as_echo "$as_me: WARNING: ** Mismatch between versions of octave and mkoctfile. **" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Octave libsndfile modules will not be built.       **" >&5
-$as_echo "$as_me: WARNING: ** Octave libsndfile modules will not be built.       **" >&2;}
-       elif test "x$OCTAVE_VERSION" != "x$OCTAVE_CONFIG_VERSION" ; then
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Mismatch between versions of octave and octave-config. **" >&5
-$as_echo "$as_me: WARNING: ** Mismatch between versions of octave and octave-config. **" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Octave libsndfile modules will not be built.           **" >&5
-$as_echo "$as_me: WARNING: ** Octave libsndfile modules will not be built.           **" >&2;}
-       else
-               case "$MKOCTFILE_VERSION" in
-                       2.*)
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Octave version 2.X is not supported." >&5
-$as_echo "$as_me: WARNING: Octave version 2.X is not supported." >&2;}
-                               ;;
-                       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
-                               ;;
-                       *)
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Octave version $MKOCTFILE_VERSION is not supported." >&5
-$as_echo "$as_me: WARNING: Octave version $MKOCTFILE_VERSION is not supported." >&2;}
-                               ;;
-                               esac
-               fi
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: building octave libsndfile module... $OCTAVE_BUILD" >&5
-$as_echo "building octave libsndfile module... $OCTAVE_BUILD" >&6; }
-       fi
-
-
-
-
-
-
- if test "x$OCTAVE_BUILD" = xyes; then
-  BUILD_OCTAVE_MOD_TRUE=
-  BUILD_OCTAVE_MOD_FALSE='#'
-else
-  BUILD_OCTAVE_MOD_TRUE='#'
-  BUILD_OCTAVE_MOD_FALSE=
-fi
-
-
-
-               fi
-else
-        if false; then
-  BUILD_OCTAVE_MOD_TRUE=
-  BUILD_OCTAVE_MOD_FALSE='#'
-else
-  BUILD_OCTAVE_MOD_TRUE='#'
-  BUILD_OCTAVE_MOD_FALSE=
-fi
-
-       fi
-
-#====================================================================================
-# Check for Ogg, Vorbis and FLAC.
-
-HAVE_EXTERNAL_LIBS=0
-EXTERNAL_CFLAGS=""
-EXTERNAL_LIBS=""
-
-# Check for pkg-config outside the if statement.
-
-
-
-
-
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=0.9.0
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       else
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               PKG_CONFIG=""
-       fi
-fi
-
-
-
-# Check whether --with-pkgconfigdir was given.
-if test "${with_pkgconfigdir+set}" = set; then :
-  withval=$with_pkgconfigdir;
-else
-  with_pkgconfigdir='${libdir}/pkgconfig'
-fi
-
-pkgconfigdir=$with_pkgconfigdir
-
-
-
-
-
-if test -n "$PKG_CONFIG" ; then
-       if test x$enable_external_libs = xno ; then
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** External libs (FLAC, Ogg, Vorbis) disabled. ***" >&5
-$as_echo "$as_me: WARNING: *** External libs (FLAC, Ogg, Vorbis) disabled. ***" >&2;}
-       else
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flac >= 1.3.1 " >&5
-$as_echo_n "checking for flac >= 1.3.1 ... " >&6; }
-
-if test -n "$FLAC_CFLAGS"; then
-    pkg_cv_FLAC_CFLAGS="$FLAC_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flac >= 1.3.1\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "flac >= 1.3.1") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_FLAC_CFLAGS=`$PKG_CONFIG --cflags "flac >= 1.3.1" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$FLAC_LIBS"; then
-    pkg_cv_FLAC_LIBS="$FLAC_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flac >= 1.3.1\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "flac >= 1.3.1") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_FLAC_LIBS=`$PKG_CONFIG --libs "flac >= 1.3.1" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-pkg_link_saved_CFLAGS=$CFLAGS
-pkg_link_saved_LIBS=$LIBS
-
-eval "pkg_CFLAGS=\${pkg_cv_FLAC_CFLAGS}"
-eval "pkg_LIBS=\${pkg_cv_FLAC_LIBS}"
-
-CFLAGS="$CFLAGS $pkg_CFLAGS"
-LIBS="$LIBS $pkg_LIBS"
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-puts ("");
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pkg_link=yes
-else
-  pkg_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-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
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               FLAC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "flac >= 1.3.1"`
-        else
-               FLAC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "flac >= 1.3.1"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$FLAC_PKG_ERRORS" >&5
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                ac_cv_flac=no
-elif test $pkg_failed = untried; then
-       ac_cv_flac=no
-else
-       FLAC_CFLAGS=$pkg_cv_FLAC_CFLAGS
-       FLAC_LIBS=$pkg_cv_FLAC_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       ac_cv_flac=yes
-fi
-
-               # Make sure the FLAC_CFLAGS value is sane.
-               FLAC_CFLAGS=`echo $FLAC_CFLAGS | $SED "s|include/FLAC|include|"`
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ogg >= 1.1.3 " >&5
-$as_echo_n "checking for ogg >= 1.1.3 ... " >&6; }
-
-if test -n "$OGG_CFLAGS"; then
-    pkg_cv_OGG_CFLAGS="$OGG_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ogg >= 1.1.3\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "ogg >= 1.1.3") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_OGG_CFLAGS=`$PKG_CONFIG --cflags "ogg >= 1.1.3" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$OGG_LIBS"; then
-    pkg_cv_OGG_LIBS="$OGG_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ogg >= 1.1.3\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "ogg >= 1.1.3") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_OGG_LIBS=`$PKG_CONFIG --libs "ogg >= 1.1.3" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-pkg_link_saved_CFLAGS=$CFLAGS
-pkg_link_saved_LIBS=$LIBS
-
-eval "pkg_CFLAGS=\${pkg_cv_OGG_CFLAGS}"
-eval "pkg_LIBS=\${pkg_cv_OGG_LIBS}"
-
-CFLAGS="$CFLAGS $pkg_CFLAGS"
-LIBS="$LIBS $pkg_LIBS"
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-puts ("");
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pkg_link=yes
-else
-  pkg_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-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
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               OGG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ogg >= 1.1.3"`
-        else
-               OGG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ogg >= 1.1.3"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$OGG_PKG_ERRORS" >&5
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                ac_cv_ogg=no
-elif test $pkg_failed = untried; then
-       ac_cv_ogg=no
-else
-       OGG_CFLAGS=$pkg_cv_OGG_CFLAGS
-       OGG_LIBS=$pkg_cv_OGG_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       ac_cv_ogg=yes
-fi
-
-               if test x$enable_experimental = xyes ; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speex >= 1.2 " >&5
-$as_echo_n "checking for speex >= 1.2 ... " >&6; }
-
-if test -n "$SPEEX_CFLAGS"; then
-    pkg_cv_SPEEX_CFLAGS="$SPEEX_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"speex >= 1.2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "speex >= 1.2") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SPEEX_CFLAGS=`$PKG_CONFIG --cflags "speex >= 1.2" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$SPEEX_LIBS"; then
-    pkg_cv_SPEEX_LIBS="$SPEEX_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"speex >= 1.2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "speex >= 1.2") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SPEEX_LIBS=`$PKG_CONFIG --libs "speex >= 1.2" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-pkg_link_saved_CFLAGS=$CFLAGS
-pkg_link_saved_LIBS=$LIBS
-
-eval "pkg_CFLAGS=\${pkg_cv_SPEEX_CFLAGS}"
-eval "pkg_LIBS=\${pkg_cv_SPEEX_LIBS}"
-
-CFLAGS="$CFLAGS $pkg_CFLAGS"
-LIBS="$LIBS $pkg_LIBS"
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-puts ("");
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pkg_link=yes
-else
-  pkg_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-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
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               SPEEX_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "speex >= 1.2"`
-        else
-               SPEEX_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "speex >= 1.2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$SPEEX_PKG_ERRORS" >&5
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                ac_cv_speex=no
-elif test $pkg_failed = untried; then
-       ac_cv_speex=no
-else
-       SPEEX_CFLAGS=$pkg_cv_SPEEX_CFLAGS
-       SPEEX_LIBS=$pkg_cv_SPEEX_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       ac_cv_speex=yes
-fi
-               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_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vorbis >= 1.2.3 " >&5
-$as_echo_n "checking for vorbis >= 1.2.3 ... " >&6; }
-
-if test -n "$VORBIS_CFLAGS"; then
-    pkg_cv_VORBIS_CFLAGS="$VORBIS_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbis >= 1.2.3\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "vorbis >= 1.2.3") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_VORBIS_CFLAGS=`$PKG_CONFIG --cflags "vorbis >= 1.2.3" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$VORBIS_LIBS"; then
-    pkg_cv_VORBIS_LIBS="$VORBIS_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbis >= 1.2.3\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "vorbis >= 1.2.3") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_VORBIS_LIBS=`$PKG_CONFIG --libs "vorbis >= 1.2.3" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-pkg_link_saved_CFLAGS=$CFLAGS
-pkg_link_saved_LIBS=$LIBS
-
-eval "pkg_CFLAGS=\${pkg_cv_VORBIS_CFLAGS}"
-eval "pkg_LIBS=\${pkg_cv_VORBIS_LIBS}"
-
-CFLAGS="$CFLAGS $pkg_CFLAGS"
-LIBS="$LIBS $pkg_LIBS"
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-puts ("");
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pkg_link=yes
-else
-  pkg_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-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
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               VORBIS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "vorbis >= 1.2.3"`
-        else
-               VORBIS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "vorbis >= 1.2.3"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$VORBIS_PKG_ERRORS" >&5
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                ac_cv_vorbis=no
-elif test $pkg_failed = untried; then
-       ac_cv_vorbis=no
-else
-       VORBIS_CFLAGS=$pkg_cv_VORBIS_CFLAGS
-       VORBIS_LIBS=$pkg_cv_VORBIS_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       ac_cv_vorbis=yes
-fi
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vorbisenc >= 1.2.3 " >&5
-$as_echo_n "checking for vorbisenc >= 1.2.3 ... " >&6; }
-
-if test -n "$VORBISENC_CFLAGS"; then
-    pkg_cv_VORBISENC_CFLAGS="$VORBISENC_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbisenc >= 1.2.3\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "vorbisenc >= 1.2.3") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_VORBISENC_CFLAGS=`$PKG_CONFIG --cflags "vorbisenc >= 1.2.3" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$VORBISENC_LIBS"; then
-    pkg_cv_VORBISENC_LIBS="$VORBISENC_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vorbisenc >= 1.2.3\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "vorbisenc >= 1.2.3") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_VORBISENC_LIBS=`$PKG_CONFIG --libs "vorbisenc >= 1.2.3" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-pkg_link_saved_CFLAGS=$CFLAGS
-pkg_link_saved_LIBS=$LIBS
-
-eval "pkg_CFLAGS=\${pkg_cv_VORBISENC_CFLAGS}"
-eval "pkg_LIBS=\${pkg_cv_VORBISENC_LIBS}"
-
-CFLAGS="$CFLAGS $pkg_CFLAGS"
-LIBS="$LIBS $pkg_LIBS"
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-puts ("");
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pkg_link=yes
-else
-  pkg_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-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
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               VORBISENC_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "vorbisenc >= 1.2.3"`
-        else
-               VORBISENC_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "vorbisenc >= 1.2.3"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$VORBISENC_PKG_ERRORS" >&5
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                ac_cv_vorbisenc=no
-elif test $pkg_failed = untried; then
-       ac_cv_vorbisenc=no
-else
-       VORBISENC_CFLAGS=$pkg_cv_VORBISENC_CFLAGS
-       VORBISENC_LIBS=$pkg_cv_VORBISENC_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       ac_cv_vorbisenc=yes
-fi
-               enable_external_libs=yes
-               fi
-
-       if test x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc = "xyesyesyesyes" ; then
-               HAVE_EXTERNAL_LIBS=1
-               enable_external_libs=yes
-
-               EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS"
-               EXTERNAL_LIBS="$FLAC_LIBS $OGG_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS "
-       else
-               echo
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** One or more of the external libraries (ie libflac, libogg and" >&5
-$as_echo "$as_me: WARNING: *** One or more of the external libraries (ie libflac, libogg and" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** libvorbis) is either missing (possibly only the development" >&5
-$as_echo "$as_me: WARNING: *** libvorbis) is either missing (possibly only the development" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** headers) or is of an unsupported version." >&5
-$as_echo "$as_me: WARNING: *** headers) or is of an unsupported version." >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ***" >&5
-$as_echo "$as_me: WARNING: ***" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Unfortunately, for ease of maintenance, the external libs" >&5
-$as_echo "$as_me: WARNING: *** Unfortunately, for ease of maintenance, the external libs" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** are an all or nothing affair." >&5
-$as_echo "$as_me: WARNING: *** are an all or nothing affair." >&2;}
-               echo
-               enable_external_libs=no
-               fi
-       fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_EXTERNAL_LIBS $HAVE_EXTERNAL_LIBS
-_ACEOF
-
-
-#====================================================================================
-# Check for libsqlite3 (only used in regtest).
-
-ac_cv_sqlite3=no
-if test x$enable_sqlite != xno ; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3 >= 3.2 " >&5
-$as_echo_n "checking for sqlite3 >= 3.2 ... " >&6; }
-
-if test -n "$SQLITE3_CFLAGS"; then
-    pkg_cv_SQLITE3_CFLAGS="$SQLITE3_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3 >= 3.2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "sqlite3 >= 3.2") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SQLITE3_CFLAGS=`$PKG_CONFIG --cflags "sqlite3 >= 3.2" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$SQLITE3_LIBS"; then
-    pkg_cv_SQLITE3_LIBS="$SQLITE3_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sqlite3 >= 3.2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "sqlite3 >= 3.2") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_SQLITE3_LIBS=`$PKG_CONFIG --libs "sqlite3 >= 3.2" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-pkg_link_saved_CFLAGS=$CFLAGS
-pkg_link_saved_LIBS=$LIBS
-
-eval "pkg_CFLAGS=\${pkg_cv_SQLITE3_CFLAGS}"
-eval "pkg_LIBS=\${pkg_cv_SQLITE3_LIBS}"
-
-CFLAGS="$CFLAGS $pkg_CFLAGS"
-LIBS="$LIBS $pkg_LIBS"
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-puts ("");
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pkg_link=yes
-else
-  pkg_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-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
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               SQLITE3_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "sqlite3 >= 3.2"`
-        else
-               SQLITE3_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "sqlite3 >= 3.2"`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$SQLITE3_PKG_ERRORS" >&5
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                ac_cv_sqlite3=no
-elif test $pkg_failed = untried; then
-       ac_cv_sqlite3=no
-else
-       SQLITE3_CFLAGS=$pkg_cv_SQLITE3_CFLAGS
-       SQLITE3_LIBS=$pkg_cv_SQLITE3_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-       ac_cv_sqlite3=yes
-fi
-       fi
-
-if test x$ac_cv_sqlite3 = "xyes" ; then
-       HAVE_SQLITE3=1
-else
-       HAVE_SQLITE3=0
-       fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SQLITE3 $HAVE_SQLITE3
-_ACEOF
-
-
-#====================================================================================
-# Determine if the processor can do clipping on float to int conversions.
-
-if test x$enable_cpu_clip != "xno" ; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking processor clipping capabilities" >&5
-$as_echo_n "checking processor clipping capabilities... " >&6; }
-if ${ac_cv_c_clip_type+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  # Initialize to unknown
-ac_cv_c_clip_positive=unknown
-ac_cv_c_clip_negative=unknown
-
-
-if test $ac_cv_c_clip_positive = unknown ; then
-       if test "$cross_compiling" = yes; then :
-  ac_cv_c_clip_positive=unknown
-
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-       #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 ;
-               }
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_c_clip_positive=yes
-else
-  ac_cv_c_clip_positive=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-       if test "$cross_compiling" = yes; then :
-  ac_cv_c_clip_negative=unknown
-
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-       #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 ;
-               }
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_c_clip_negative=yes
-else
-  ac_cv_c_clip_negative=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-       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
-
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_clip_type" >&5
-$as_echo "$ac_cv_c_clip_type" >&6; }
-
-
-
-else
-       echo "checking processor clipping capabilities... disabled"
-       ac_cv_c_clip_positive=0
-       ac_cv_c_clip_negative=0
-       fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define CPU_CLIPS_POSITIVE ${ac_cv_c_clip_positive}
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define CPU_CLIPS_NEGATIVE ${ac_cv_c_clip_negative}
-_ACEOF
-
-
-#====================================================================================
-# Target OS specific stuff.
-
-OS_SPECIFIC_CFLAGS=""
-OS_SPECIFIC_LINKS=""
-os_is_win32=0
-os_is_openbsd=0
-use_windows_api=0
-osx_darwin_version=0
-
-case "$host_os" in
-       darwin* | rhapsody*)
-               osx_darwin_version=$(echo "$host_os" | sed 's/\..*//;s/darwin//g')
-               if test x$HAVE_XCODE_SELECT = xyes ; then
-                       developer_path=`xcode-select --print-path`
-               else
-                       developer_path="/Developer"
-                       fi
-               OS_SPECIFIC_CFLAGS="-I${developer_path}/Headers/FlatCarbon"
-               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
-
-
-cat >>confdefs.h <<_ACEOF
-#define OS_IS_WIN32 ${os_is_win32}
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define OS_IS_OPENBSD ${os_is_openbsd}
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define USE_WINDOWS_API ${use_windows_api}
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define OSX_DARWIN_VERSION ${osx_darwin_version}
-_ACEOF
-
- if test ${use_windows_api} -eq 1; then
-  USE_WIN_VERSION_FILE_TRUE=
-  USE_WIN_VERSION_FILE_FALSE='#'
-else
-  USE_WIN_VERSION_FILE_TRUE='#'
-  USE_WIN_VERSION_FILE_FALSE=
-fi
-
-
-#====================================================================================
-# Check for ALSA.
-
-ALSA_LIBS=""
-
-if test x$enable_alsa != xno ; then
-       for ac_header in alsa/asoundlib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_ALSA_ASOUNDLIB_H 1
-_ACEOF
-
-fi
-
-done
-
-       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*)
-               for ac_header in sndio.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "sndio.h" "ac_cv_header_sndio_h" "$ac_includes_default"
-if test "x$ac_cv_header_sndio_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SNDIO_H 1
-_ACEOF
-
-fi
-
-done
-
-               if test x$ac_cv_header_sndio_h = xyes ; then
-                       SNDIO_LIBS="-lsndio"
-                       HAVE_SNDIO_H=1
-                       fi
-               ;;
-       *)
-               ;;
-       esac
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SNDIO_H ${HAVE_SNDIO_H}
-_ACEOF
-
-
-#====================================================================================
-# Test for sanity when cross-compiling.
-
-if test $ac_cv_sizeof_short != 2 ; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ******************************************************************" >&5
-$as_echo "$as_me: WARNING: ******************************************************************" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** sizeof (short) != 2.                                          " >&5
-$as_echo "$as_me: WARNING: *** sizeof (short) != 2.                                          " >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ******************************************************************" >&5
-$as_echo "$as_me: WARNING: ******************************************************************" >&2;}
-       fi
-
-if test $ac_cv_sizeof_int != 4 ; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ******************************************************************" >&5
-$as_echo "$as_me: WARNING: ******************************************************************" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** sizeof (int) != 4                                             " >&5
-$as_echo "$as_me: WARNING: *** sizeof (int) != 4                                             " >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ******************************************************************" >&5
-$as_echo "$as_me: WARNING: ******************************************************************" >&2;}
-       fi
-
-if test $ac_cv_sizeof_float != 4 ; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ******************************************************************" >&5
-$as_echo "$as_me: WARNING: ******************************************************************" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** sizeof (float) != 4.                                          " >&5
-$as_echo "$as_me: WARNING: *** sizeof (float) != 4.                                          " >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ******************************************************************" >&5
-$as_echo "$as_me: WARNING: ******************************************************************" >&2;}
-       fi
-
-if test $ac_cv_sizeof_double != 8 ; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ******************************************************************" >&5
-$as_echo "$as_me: WARNING: ******************************************************************" >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** sizeof (double) != 8.                                         " >&5
-$as_echo "$as_me: WARNING: *** sizeof (double) != 8.                                         " >&2;}
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ******************************************************************" >&5
-$as_echo "$as_me: WARNING: ******************************************************************" >&2;}
-       fi
-
-if test x"$ac_cv_prog_HAVE_AUTOGEN" = "xno" ; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Touching files in directory tests/." >&5
-$as_echo "$as_me: WARNING: Touching files in directory tests/." >&2;}
-       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
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -std=gnu99" >&5
-$as_echo_n "checking if $CC accepts -std=gnu99... " >&6; }
-       ac_add_cflags__old_cflags="$CFLAGS"
-       CFLAGS="-std=gnu99"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags -std=gnu99"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-
-
-if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version of $CC" >&5
-$as_echo_n "checking for version of $CC... " >&6; }
-       GCC_VERSION=`$CC -dumpversion`
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VERSION" >&5
-$as_echo "$GCC_VERSION" >&6; }
-
-               GCC_MAJOR_VERSION=`echo $GCC_VERSION | sed "s/\..*//"`
-       GCC_MINOR_VERSION=`echo $GCC_VERSION | sed "s/$GCC_MAJOR_VERSION\.//" | sed "s/\..*//"`
-               fi
-
-
-
-
-
-
-
-       if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****************************************************************" >&5
-$as_echo "$as_me: WARNING: ****************************************************************" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** GCC version 4.2 warns about the inline keyword for no good **" >&5
-$as_echo "$as_me: WARNING: ** GCC version 4.2 warns about the inline keyword for no good **" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** reason but the maintainers do not see it as a bug.         **" >&5
-$as_echo "$as_me: WARNING: ** reason but the maintainers do not see it as a bug.         **" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33995      **" >&5
-$as_echo "$as_me: WARNING: ** See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33995      **" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Using -fgnu-inline to avoid this stupidity.                **" >&5
-$as_echo "$as_me: WARNING: ** Using -fgnu-inline to avoid this stupidity.                **" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****************************************************************" >&5
-$as_echo "$as_me: WARNING: ****************************************************************" >&2;}
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fgnu89-inline" >&5
-$as_echo_n "checking if $CC accepts -fgnu89-inline... " >&6; }
-       ac_add_cflags__old_cflags="$CFLAGS"
-       CFLAGS="-fgnu89-inline"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags -fgnu89-inline"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-               fi
-
-       CFLAGS="$CFLAGS -Wall"
-       CXXFLAGS="$CXXFLAGS -Wall"
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wextra" >&5
-$as_echo_n "checking if $CC accepts -Wextra... " >&6; }
-       ac_add_cflags__old_cflags="$CFLAGS"
-       CFLAGS="-Wextra"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags -Wextra"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wdeclaration-after-statement" >&5
-$as_echo_n "checking if $CC accepts -Wdeclaration-after-statement... " >&6; }
-       ac_add_cflags__old_cflags="$CFLAGS"
-       CFLAGS="-Wdeclaration-after-statement"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags -Wdeclaration-after-statement"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wpointer-arith" >&5
-$as_echo_n "checking if $CC accepts -Wpointer-arith... " >&6; }
-       ac_add_cflags__old_cflags="$CFLAGS"
-       CFLAGS="-Wpointer-arith"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags -Wpointer-arith"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -funsigned-char" >&5
-$as_echo_n "checking if $CC accepts -funsigned-char... " >&6; }
-       ac_add_cflags__old_cflags="$CFLAGS"
-       CFLAGS="-funsigned-char"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags -funsigned-char"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-
-       ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Wextra" >&5
-$as_echo_n "checking if $CXX accepts -Wextra... " >&6; }
-
-       ac_add_cxxflags__old_cxxflags="$CXXFLAGS"
-       CXXFLAGS="-Wextra"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <cstdio>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CXXFLAGS="$ac_add_cxxflags__old_cxxflags -Wextra"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CXXFLAGS="$ac_add_cxxflags__old_cxxflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Wpointer-arith" >&5
-$as_echo_n "checking if $CXX accepts -Wpointer-arith... " >&6; }
-
-       ac_add_cxxflags__old_cxxflags="$CXXFLAGS"
-       CXXFLAGS="-Wpointer-arith"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <cstdio>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CXXFLAGS="$ac_add_cxxflags__old_cxxflags -Wpointer-arith"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CXXFLAGS="$ac_add_cxxflags__old_cxxflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -funsigned-char" >&5
-$as_echo_n "checking if $CXX accepts -funsigned-char... " >&6; }
-
-       ac_add_cxxflags__old_cxxflags="$CXXFLAGS"
-       CXXFLAGS="-funsigned-char"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <cstdio>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CXXFLAGS="$ac_add_cxxflags__old_cxxflags -funsigned-char"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CXXFLAGS="$ac_add_cxxflags__old_cxxflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-       ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -D_FORTIFY_SOURCE=2" >&5
-$as_echo_n "checking if $CC accepts -D_FORTIFY_SOURCE=2... " >&6; }
-       ac_add_cflags__old_cflags="$CFLAGS"
-       CFLAGS="-D_FORTIFY_SOURCE=2"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags -D_FORTIFY_SOURCE=2"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-
-       if test x$enable_stack_smash_protection = "xyes" ; then
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports stack smash protection" >&5
-$as_echo_n "checking if $CC supports stack smash protection... " >&6; }
-       xiph_stack_check_old_cflags="$CFLAGS"
-       SSP_FLAGS="-fstack-protector --param ssp-buffer-size=4"
-       CFLAGS=$SSP_FLAGS
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$xiph_stack_check_old_cflags $SSP_FLAGS"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$xiph_stack_check_old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-               ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX supports stack smash protection" >&5
-$as_echo_n "checking if $CXX supports stack smash protection... " >&6; }
-       xiph_stack_check_old_cflags="$CFLAGS"
-       SSP_FLAGS="-fstack-protector --param ssp-buffer-size=4"
-       CFLAGS=$SSP_FLAGS
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <cstdio>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$xiph_stack_check_old_cflags $SSP_FLAGS"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$xiph_stack_check_old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-       ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-               fi
-
-       if test x$enable_test_coverage = "xyes" ; then
-               # MN_ADD_CFLAGS([-ftest-coverage])
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -coverage" >&5
-$as_echo_n "checking if $CC accepts -coverage... " >&6; }
-       ac_add_cflags__old_cflags="$CFLAGS"
-       CFLAGS="-coverage"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags -coverage"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-               fi
-
-       CFLAGS="$CFLAGS     -Wcast-align -Wcast-qual -Wshadow -Wbad-function-cast -Wwrite-strings -Wundef -Wuninitialized -Winit-self -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Waggregate-return"
-       # -Winline -Wconversion  -Wunreachable-code"
-       CXXFLAGS="$CXXFLAGS -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo -Wundef -Wuninitialized -Winit-self"
-
-       if test "x$enable_gcc_opt" = "xno" ; then
-               temp_CFLAGS=`echo $CFLAGS | $SED "s/O2/O0/"`
-               CFLAGS=$temp_CFLAGS
-               { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Compiler optimisations switched off. ***" >&5
-$as_echo "$as_me: WARNING: *** Compiler optimisations switched off. ***" >&2;}
-               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
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Werror" >&5
-$as_echo_n "checking if $CC accepts -Werror... " >&6; }
-       ac_add_cflags__old_cflags="$CFLAGS"
-       CFLAGS="-Werror"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <stdio.h>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags -Werror"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CFLAGS="$ac_add_cflags__old_cflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-
-       ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Werror" >&5
-$as_echo_n "checking if $CXX accepts -Werror... " >&6; }
-
-       ac_add_cxxflags__old_cxxflags="$CXXFLAGS"
-       CXXFLAGS="-Werror"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-                       #include <cstdio>
-
-int
-main ()
-{
-puts("Hello, World!"); return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       CXXFLAGS="$ac_add_cxxflags__old_cxxflags -Werror"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                       CXXFLAGS="$ac_add_cxxflags__old_cxxflags"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-       ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-       fi
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define WIN32_TARGET_DLL ${win32_target_dll}
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define COMPILER_IS_GCC ${COMPILER_IS_GCC}
-_ACEOF
-
-
-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}"
-
-
-cat >>confdefs.h <<_ACEOF
-#define HOST_TRIPLET "${HOST_TRIPLET}"
-_ACEOF
-
-
-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_config_files="$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"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes: double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \.
-      sed -n \
-       "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    if test "x$cache_file" != "x/dev/null"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-      if test ! -f "$cache_file" || test -h "$cache_file"; then
-       cat confcache >"$cache_file"
-      else
-        case $cache_file in #(
-        */* | ?:*)
-         mv -f confcache "$cache_file"$$ &&
-         mv -f "$cache_file"$$ "$cache_file" ;; #(
-        *)
-         mv -f confcache "$cache_file" ;;
-       esac
-      fi
-    fi
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
-$as_echo_n "checking that generated files are newer than configure... " >&6; }
-   if test -n "$am_sleep_pid"; then
-     # Hide warnings about reused PIDs.
-     wait $am_sleep_pid 2>/dev/null
-   fi
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
-$as_echo "done" >&6; }
- if test -n "$EXEEXT"; then
-  am__EXEEXT_TRUE=
-  am__EXEEXT_FALSE='#'
-else
-  am__EXEEXT_TRUE='#'
-  am__EXEEXT_FALSE=
-fi
-
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  as_fn_error $? "conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
-  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${LINUX_MINGW_CROSS_TEST_TRUE}" && test -z "${LINUX_MINGW_CROSS_TEST_FALSE}"; then
-  as_fn_error $? "conditional \"LINUX_MINGW_CROSS_TEST\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${ENABLE_TEST_COVERAGE_TRUE}" && test -z "${ENABLE_TEST_COVERAGE_FALSE}"; then
-  as_fn_error $? "conditional \"ENABLE_TEST_COVERAGE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_OCTAVE_MOD_TRUE}" && test -z "${BUILD_OCTAVE_MOD_FALSE}"; then
-  as_fn_error $? "conditional \"BUILD_OCTAVE_MOD\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_OCTAVE_MOD_TRUE}" && test -z "${BUILD_OCTAVE_MOD_FALSE}"; then
-  as_fn_error $? "conditional \"BUILD_OCTAVE_MOD\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_OCTAVE_MOD_TRUE}" && test -z "${BUILD_OCTAVE_MOD_FALSE}"; then
-  as_fn_error $? "conditional \"BUILD_OCTAVE_MOD\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${USE_WIN_VERSION_FILE_TRUE}" && test -z "${USE_WIN_VERSION_FILE_FALSE}"; then
-  as_fn_error $? "conditional \"USE_WIN_VERSION_FILE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-       expr "X$arg" : "X\\(.*\\)$as_nl";
-       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""       $as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\/\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='        ';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by libsndfile $as_me 1.0.26, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-config_commands="$ac_config_commands"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration.  Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-      --config     print configuration, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-      --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Configuration commands:
-$config_commands
-
-Report bugs to <sndfile@mega-nerd.com>.
-libsndfile home page: <http://www.mega-nerd.com/libsndfile/>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-libsndfile config.status 1.0.26
-configured by $0, generated by GNU Autoconf 2.69,
-  with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-MKDIR_P='$MKDIR_P'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=?*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  --*=)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    '') as_fn_error $? "missing file argument" ;;
-    esac
-    as_fn_append CONFIG_FILES " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
-  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
-  *) as_fn_append ac_config_targets " $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-#
-# INIT-COMMANDS
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
-enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
-SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
-ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
-PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
-host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
-host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
-host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
-build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
-build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
-build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
-SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
-Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
-GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
-EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
-FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
-LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
-NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
-LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
-exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
-lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
-lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
-file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
-want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
-DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
-sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
-AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
-archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
-STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
-lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
-CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
-compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
-GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
-nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
-lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
-objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
-need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
-MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
-LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
-libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
-postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
-version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
-install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
-striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
-compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
-predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
-postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
-predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
-postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
-compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
-LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
-LD_RC='`$ECHO "$LD_RC" | $SED "$delay_single_quote_subst"`'
-reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
-reload_flag_RC='`$ECHO "$reload_flag_RC" | $SED "$delay_single_quote_subst"`'
-reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-reload_cmds_RC='`$ECHO "$reload_cmds_RC" | $SED "$delay_single_quote_subst"`'
-old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-old_archive_cmds_RC='`$ECHO "$old_archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
-compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
-compiler_RC='`$ECHO "$compiler_RC" | $SED "$delay_single_quote_subst"`'
-GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
-GCC_RC='`$ECHO "$GCC_RC" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag_RC='`$ECHO "$lt_prog_compiler_no_builtin_flag_RC" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_pic_RC='`$ECHO "$lt_prog_compiler_pic_RC" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
-lt_prog_compiler_static_RC='`$ECHO "$lt_prog_compiler_static_RC" | $SED "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o_RC='`$ECHO "$lt_cv_prog_compiler_c_o_RC" | $SED "$delay_single_quote_subst"`'
-archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
-archive_cmds_need_lc_RC='`$ECHO "$archive_cmds_need_lc_RC" | $SED "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes_RC='`$ECHO "$enable_shared_with_static_runtimes_RC" | $SED "$delay_single_quote_subst"`'
-export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
-export_dynamic_flag_spec_RC='`$ECHO "$export_dynamic_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
-whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
-whole_archive_flag_spec_RC='`$ECHO "$whole_archive_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
-compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
-compiler_needs_object_RC='`$ECHO "$compiler_needs_object_RC" | $SED "$delay_single_quote_subst"`'
-old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-old_archive_from_new_cmds_RC='`$ECHO "$old_archive_from_new_cmds_RC" | $SED "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds_RC='`$ECHO "$old_archive_from_expsyms_cmds_RC" | $SED "$delay_single_quote_subst"`'
-archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-archive_cmds_RC='`$ECHO "$archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
-archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-archive_expsym_cmds_RC='`$ECHO "$archive_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
-module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-module_cmds_RC='`$ECHO "$module_cmds_RC" | $SED "$delay_single_quote_subst"`'
-module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-module_expsym_cmds_RC='`$ECHO "$module_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
-with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
-with_gnu_ld_RC='`$ECHO "$with_gnu_ld_RC" | $SED "$delay_single_quote_subst"`'
-allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
-allow_undefined_flag_RC='`$ECHO "$allow_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
-no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
-no_undefined_flag_RC='`$ECHO "$no_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_RC='`$ECHO "$hardcode_libdir_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_separator_RC='`$ECHO "$hardcode_libdir_separator_RC" | $SED "$delay_single_quote_subst"`'
-hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_direct_RC='`$ECHO "$hardcode_direct_RC" | $SED "$delay_single_quote_subst"`'
-hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_direct_absolute_RC='`$ECHO "$hardcode_direct_absolute_RC" | $SED "$delay_single_quote_subst"`'
-hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_minus_L_RC='`$ECHO "$hardcode_minus_L_RC" | $SED "$delay_single_quote_subst"`'
-hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_shlibpath_var_RC='`$ECHO "$hardcode_shlibpath_var_RC" | $SED "$delay_single_quote_subst"`'
-hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_automatic_RC='`$ECHO "$hardcode_automatic_RC" | $SED "$delay_single_quote_subst"`'
-inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
-inherit_rpath_RC='`$ECHO "$inherit_rpath_RC" | $SED "$delay_single_quote_subst"`'
-link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
-link_all_deplibs_RC='`$ECHO "$link_all_deplibs_RC" | $SED "$delay_single_quote_subst"`'
-always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
-always_export_symbols_RC='`$ECHO "$always_export_symbols_RC" | $SED "$delay_single_quote_subst"`'
-export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-export_symbols_cmds_RC='`$ECHO "$export_symbols_cmds_RC" | $SED "$delay_single_quote_subst"`'
-exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
-exclude_expsyms_RC='`$ECHO "$exclude_expsyms_RC" | $SED "$delay_single_quote_subst"`'
-include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
-include_expsyms_RC='`$ECHO "$include_expsyms_RC" | $SED "$delay_single_quote_subst"`'
-prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-prelink_cmds_RC='`$ECHO "$prelink_cmds_RC" | $SED "$delay_single_quote_subst"`'
-postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
-postlink_cmds_RC='`$ECHO "$postlink_cmds_RC" | $SED "$delay_single_quote_subst"`'
-file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
-file_list_spec_RC='`$ECHO "$file_list_spec_RC" | $SED "$delay_single_quote_subst"`'
-hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_action_RC='`$ECHO "$hardcode_action_RC" | $SED "$delay_single_quote_subst"`'
-compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
-compiler_lib_search_dirs_RC='`$ECHO "$compiler_lib_search_dirs_RC" | $SED "$delay_single_quote_subst"`'
-predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
-predep_objects_RC='`$ECHO "$predep_objects_RC" | $SED "$delay_single_quote_subst"`'
-postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
-postdep_objects_RC='`$ECHO "$postdep_objects_RC" | $SED "$delay_single_quote_subst"`'
-predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
-predeps_RC='`$ECHO "$predeps_RC" | $SED "$delay_single_quote_subst"`'
-postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
-postdeps_RC='`$ECHO "$postdeps_RC" | $SED "$delay_single_quote_subst"`'
-compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
-compiler_lib_search_path_RC='`$ECHO "$compiler_lib_search_path_RC" | $SED "$delay_single_quote_subst"`'
-
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-\$1
-_LTECHO_EOF'
-}
-
-# Quote evaled strings.
-for var in SHELL \
-ECHO \
-PATH_SEPARATOR \
-SED \
-GREP \
-EGREP \
-FGREP \
-LD \
-NM \
-LN_S \
-lt_SP2NL \
-lt_NL2SP \
-reload_flag \
-OBJDUMP \
-deplibs_check_method \
-file_magic_cmd \
-file_magic_glob \
-want_nocaseglob \
-DLLTOOL \
-sharedlib_from_linklib_cmd \
-AR \
-AR_FLAGS \
-archiver_list_spec \
-STRIP \
-RANLIB \
-CC \
-CFLAGS \
-compiler \
-lt_cv_sys_global_symbol_pipe \
-lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_c_name_address \
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-nm_file_list_spec \
-lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_pic \
-lt_prog_compiler_wl \
-lt_prog_compiler_static \
-lt_cv_prog_compiler_c_o \
-need_locks \
-MANIFEST_TOOL \
-DSYMUTIL \
-NMEDIT \
-LIPO \
-OTOOL \
-OTOOL64 \
-shrext_cmds \
-export_dynamic_flag_spec \
-whole_archive_flag_spec \
-compiler_needs_object \
-with_gnu_ld \
-allow_undefined_flag \
-no_undefined_flag \
-hardcode_libdir_flag_spec \
-hardcode_libdir_separator \
-exclude_expsyms \
-include_expsyms \
-file_list_spec \
-variables_saved_for_relink \
-libname_spec \
-library_names_spec \
-soname_spec \
-install_override_mode \
-finish_eval \
-old_striplib \
-striplib \
-compiler_lib_search_dirs \
-predep_objects \
-postdep_objects \
-predeps \
-postdeps \
-compiler_lib_search_path \
-LD_CXX \
-LD_RC \
-reload_flag_CXX \
-reload_flag_RC \
-compiler_CXX \
-compiler_RC \
-lt_prog_compiler_no_builtin_flag_CXX \
-lt_prog_compiler_no_builtin_flag_RC \
-lt_prog_compiler_pic_CXX \
-lt_prog_compiler_pic_RC \
-lt_prog_compiler_wl_CXX \
-lt_prog_compiler_wl_RC \
-lt_prog_compiler_static_CXX \
-lt_prog_compiler_static_RC \
-lt_cv_prog_compiler_c_o_CXX \
-lt_cv_prog_compiler_c_o_RC \
-export_dynamic_flag_spec_CXX \
-export_dynamic_flag_spec_RC \
-whole_archive_flag_spec_CXX \
-whole_archive_flag_spec_RC \
-compiler_needs_object_CXX \
-compiler_needs_object_RC \
-with_gnu_ld_CXX \
-with_gnu_ld_RC \
-allow_undefined_flag_CXX \
-allow_undefined_flag_RC \
-no_undefined_flag_CXX \
-no_undefined_flag_RC \
-hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_RC \
-hardcode_libdir_separator_CXX \
-hardcode_libdir_separator_RC \
-exclude_expsyms_CXX \
-exclude_expsyms_RC \
-include_expsyms_CXX \
-include_expsyms_RC \
-file_list_spec_CXX \
-file_list_spec_RC \
-compiler_lib_search_dirs_CXX \
-compiler_lib_search_dirs_RC \
-predep_objects_CXX \
-predep_objects_RC \
-postdep_objects_CXX \
-postdep_objects_RC \
-predeps_CXX \
-predeps_RC \
-postdeps_CXX \
-postdeps_RC \
-compiler_lib_search_path_CXX \
-compiler_lib_search_path_RC; do
-    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
-    *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-# Double-quote double-evaled strings.
-for var in reload_cmds \
-old_postinstall_cmds \
-old_postuninstall_cmds \
-old_archive_cmds \
-extract_expsyms_cmds \
-old_archive_from_new_cmds \
-old_archive_from_expsyms_cmds \
-archive_cmds \
-archive_expsym_cmds \
-module_cmds \
-module_expsym_cmds \
-export_symbols_cmds \
-prelink_cmds \
-postlink_cmds \
-postinstall_cmds \
-postuninstall_cmds \
-finish_cmds \
-sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec \
-reload_cmds_CXX \
-reload_cmds_RC \
-old_archive_cmds_CXX \
-old_archive_cmds_RC \
-old_archive_from_new_cmds_CXX \
-old_archive_from_new_cmds_RC \
-old_archive_from_expsyms_cmds_CXX \
-old_archive_from_expsyms_cmds_RC \
-archive_cmds_CXX \
-archive_cmds_RC \
-archive_expsym_cmds_CXX \
-archive_expsym_cmds_RC \
-module_cmds_CXX \
-module_cmds_RC \
-module_expsym_cmds_CXX \
-module_expsym_cmds_RC \
-export_symbols_cmds_CXX \
-export_symbols_cmds_RC \
-prelink_cmds_CXX \
-prelink_cmds_RC \
-postlink_cmds_CXX \
-postlink_cmds_RC; do
-    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
-    *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-      ;;
-    *)
-      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
-      ;;
-    esac
-done
-
-ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
-   setopt NO_GLOB_SUBST
-fi
-
-
-    PACKAGE='$PACKAGE'
-    VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
-    RM='$RM'
-    ofile='$ofile'
-
-
-
-
-
-
-
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
-    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
-    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
-    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
-    "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
-    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
-    "regtest/Makefile") CONFIG_FILES="$CONFIG_FILES regtest/Makefile" ;;
-    "M4/Makefile") CONFIG_FILES="$CONFIG_FILES M4/Makefile" ;;
-    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
-    "Win32/Makefile") CONFIG_FILES="$CONFIG_FILES Win32/Makefile" ;;
-    "Octave/Makefile") CONFIG_FILES="$CONFIG_FILES Octave/Makefile" ;;
-    "programs/Makefile") CONFIG_FILES="$CONFIG_FILES programs/Makefile" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "src/version-metadata.rc") CONFIG_FILES="$CONFIG_FILES src/version-metadata.rc" ;;
-    "tests/test_wrapper.sh") CONFIG_FILES="$CONFIG_FILES tests/test_wrapper.sh" ;;
-    "tests/pedantic-header-test.sh") CONFIG_FILES="$CONFIG_FILES tests/pedantic-header-test.sh" ;;
-    "doc/libsndfile.css") CONFIG_FILES="$CONFIG_FILES doc/libsndfile.css" ;;
-    "Scripts/build-test-tarball.mk") CONFIG_FILES="$CONFIG_FILES Scripts/build-test-tarball.mk" ;;
-    "libsndfile.spec") CONFIG_FILES="$CONFIG_FILES libsndfile.spec" ;;
-    "sndfile.pc") CONFIG_FILES="$CONFIG_FILES sndfile.pc" ;;
-    "src/sndfile.h") CONFIG_FILES="$CONFIG_FILES src/sndfile.h" ;;
-    "echo-install-dirs") CONFIG_FILES="$CONFIG_FILES echo-install-dirs" ;;
-
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp= ac_tmp=
-  trap 'exit_status=$?
-  : "${ac_tmp:=$tmp}"
-  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
-  trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
-  eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = "\a"
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
-  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
-h
-s///
-s/^/:/
-s/[     ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[  ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[      ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
-  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_tt"; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any.  Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[    ]*#[    ]*define[       ][      ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[    ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[        ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = "\a"
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
-  line = \$ 0
-  split(line, arg, " ")
-  if (arg[1] == "#") {
-    defundef = arg[2]
-    mac1 = arg[3]
-  } else {
-    defundef = substr(arg[1], 2)
-    mac1 = arg[2]
-  }
-  split(mac1, mac2, "(") #)
-  macro = mac2[1]
-  prefix = substr(line, 1, index(line, defundef) - 1)
-  if (D_is_set[macro]) {
-    # Preserve the white space surrounding the "#".
-    print prefix "define", macro P[macro] D[macro]
-    next
-  } else {
-    # Replace #undef with comments.  This is necessary, for example,
-    # in the case of _POSIX_SOURCE, which is predefined and required
-    # on some systems where configure will not decide to define it.
-    if (defundef == "undef") {
-      print "/*", prefix defundef, macro, "*/"
-      next
-    }
-  }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$ac_tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-        # (if the path is not absolute).  The absolute path cannot be DOS-style,
-        # because $ac_f cannot contain `:'.
-        test -f "$ac_f" ||
-          case $ac_f in
-          [\\/$]*) false;;
-          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-          esac ||
-          as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      as_fn_append ac_file_inputs " '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-       `' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$ac_tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$ac_file" : 'X\(//\)[^/]' \| \
-        X"$ac_file" : 'X\(//\)$' \| \
-        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-  as_dir="$ac_dir"; as_fn_mkdir_p
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-  ac_MKDIR_P=$MKDIR_P
-  case $MKDIR_P in
-  [\\/$]* | ?:[\\/]* ) ;;
-  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-  s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-s&@MKDIR_P@&$ac_MKDIR_P&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
-  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' \
-      "$ac_tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&2;}
-
-  rm -f "$ac_tmp/stdin"
-  case $ac_file in
-  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
-  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
-  esac \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-  if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
-    } >"$ac_tmp/config.h" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f "$ac_file"
-      mv "$ac_tmp/config.h" "$ac_file" \
-       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    fi
-  else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error $? "could not create -" "$LINENO" 5
-  fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_arg="$ac_file"
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $_am_arg | $_am_arg:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$_am_arg" : 'X\(//\)[^/]' \| \
-        X"$_am_arg" : 'X\(//\)$' \| \
-        X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
-  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
-  esac
-
-
-  case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
-  # Older Autoconf quotes --file arguments for eval, but not when files
-  # are listed without --file.  Let's play safe and only enable the eval
-  # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
-  shift
-  for mf
-  do
-    # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
-    # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$mf" : 'X\(//\)[^/]' \| \
-        X"$mf" : 'X\(//\)$' \| \
-        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "$am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$file" : 'X\(//\)[^/]' \| \
-        X"$file" : 'X\(//\)$' \| \
-        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\).*/{
-           s//\1/
-           q
-         }
-         s/.*/./; q'`
-      as_dir=$dirpart/$fdir; as_fn_mkdir_p
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
-  done
-}
- ;;
-    "libtool":C)
-
-    # See if we are running on zsh, and set the options which allow our
-    # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
-      setopt NO_GLOB_SUBST
-    fi
-
-    cfgfile="${ofile}T"
-    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
-    $RM "$cfgfile"
-
-    cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-#                 Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-
-# The names of the tagged configurations supported by this script.
-available_tags="CXX RC "
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Which release of libtool.m4 was used?
-macro_version=$macro_version
-macro_revision=$macro_revision
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# What type of objects to build.
-pic_mode=$pic_mode
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# An echo program that protects backslashes.
-ECHO=$lt_ECHO
-
-# The PATH separator for the build system.
-PATH_SEPARATOR=$lt_PATH_SEPARATOR
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="\$SED -e 1s/^X//"
-
-# A grep program that handles long lines.
-GREP=$lt_GREP
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# A literal string matcher.
-FGREP=$lt_FGREP
-
-# A BSD- or MS-compatible name lister.
-NM=$lt_NM
-
-# Whether we need soft or hard links.
-LN_S=$lt_LN_S
-
-# What is the maximum length of a command?
-max_cmd_len=$max_cmd_len
-
-# Object file suffix (normally "o").
-objext=$ac_objext
-
-# Executable file suffix (normally "").
-exeext=$exeext
-
-# whether the shell understands "unset".
-lt_unset=$lt_unset
-
-# turn spaces into newlines.
-SP2NL=$lt_lt_SP2NL
-
-# turn newlines into spaces.
-NL2SP=$lt_lt_NL2SP
-
-# convert \$build file names to \$host format.
-to_host_file_cmd=$lt_cv_to_host_file_cmd
-
-# convert \$build files to toolchain format.
-to_tool_file_cmd=$lt_cv_to_tool_file_cmd
-
-# An object symbol dumper.
-OBJDUMP=$lt_OBJDUMP
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method = "file_magic".
-file_magic_cmd=$lt_file_magic_cmd
-
-# How to find potential files when deplibs_check_method = "file_magic".
-file_magic_glob=$lt_file_magic_glob
-
-# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
-want_nocaseglob=$lt_want_nocaseglob
-
-# DLL creation program.
-DLLTOOL=$lt_DLLTOOL
-
-# Command to associate shared and link libraries.
-sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
-
-# The archiver.
-AR=$lt_AR
-
-# Flags to create an archive.
-AR_FLAGS=$lt_AR_FLAGS
-
-# How to feed a file listing to the archiver.
-archiver_list_spec=$lt_archiver_list_spec
-
-# A symbol stripping program.
-STRIP=$lt_STRIP
-
-# Commands used to install an old-style archive.
-RANLIB=$lt_RANLIB
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Whether to use a lock for old archive extraction.
-lock_old_archive_extraction=$lock_old_archive_extraction
-
-# A C compiler.
-LTCC=$lt_CC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_CFLAGS
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration.
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair.
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# Transform the output of nm in a C name address pair when lib prefix is needed.
-global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
-
-# Specify filename containing input files for \$NM.
-nm_file_list_spec=$lt_nm_file_list_spec
-
-# The root where to search for dependent libraries,and in which our libraries should be installed.
-lt_sysroot=$lt_sysroot
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# Used to examine libraries when file_magic_cmd begins with "file".
-MAGIC_CMD=$MAGIC_CMD
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Manifest tool.
-MANIFEST_TOOL=$lt_MANIFEST_TOOL
-
-# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
-DSYMUTIL=$lt_DSYMUTIL
-
-# Tool to change global to local symbols on Mac OS X.
-NMEDIT=$lt_NMEDIT
-
-# Tool to manipulate fat objects and archives on Mac OS X.
-LIPO=$lt_LIPO
-
-# ldd/readelf like tool for Mach-O binaries on Mac OS X.
-OTOOL=$lt_OTOOL
-
-# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
-OTOOL64=$lt_OTOOL64
-
-# Old archive suffix (normally "a").
-libext=$libext
-
-# Shared library suffix (normally ".so").
-shrext_cmds=$lt_shrext_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at link time.
-variables_saved_for_relink=$lt_variables_saved_for_relink
-
-# Do we need the "lib" prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Library versioning type.
-version_type=$version_type
-
-# Shared library runtime path variable.
-runpath_var=$runpath_var
-
-# Shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Permission mode override for installation of shared libraries.
-install_override_mode=$lt_install_override_mode
-
-# Command to use after installation of a shared archive.
-postinstall_cmds=$lt_postinstall_cmds
-
-# Command to use after uninstallation of a shared archive.
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# As "finish_cmds", except a single script fragment to be evaled but
-# not shown.
-finish_eval=$lt_finish_eval
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Compile-time system search path for libraries.
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds
-
-# A language specific compiler.
-CC=$lt_compiler
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds
-
-# Commands necessary for finishing linking programs.
-postlink_cmds=$lt_postlink_cmds
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# The directories searched by this compiler when creating a shared library.
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
-
-# Dependencies to place before and after the objects being linked to
-# create a shared library.
-predep_objects=$lt_predep_objects
-postdep_objects=$lt_postdep_objects
-predeps=$lt_predeps
-postdeps=$lt_postdeps
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path
-
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
-  case $host_os in
-  aix3*)
-    cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-_LT_EOF
-    ;;
-  esac
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" \
-     || (rm -f "$cfgfile"; exit 1)
-
-  if test x"$xsi_shell" = xyes; then
-  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
-func_dirname ()\
-{\
-\    case ${1} in\
-\      */*) func_dirname_result="${1%/*}${2}" ;;\
-\      *  ) func_dirname_result="${3}" ;;\
-\    esac\
-} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_basename ()$/,/^} # func_basename /c\
-func_basename ()\
-{\
-\    func_basename_result="${1##*/}"\
-} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
-func_dirname_and_basename ()\
-{\
-\    case ${1} in\
-\      */*) func_dirname_result="${1%/*}${2}" ;;\
-\      *  ) func_dirname_result="${3}" ;;\
-\    esac\
-\    func_basename_result="${1##*/}"\
-} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
-func_stripname ()\
-{\
-\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
-\    # positional parameters, so assign one to ordinary parameter first.\
-\    func_stripname_result=${3}\
-\    func_stripname_result=${func_stripname_result#"${1}"}\
-\    func_stripname_result=${func_stripname_result%"${2}"}\
-} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
-func_split_long_opt ()\
-{\
-\    func_split_long_opt_name=${1%%=*}\
-\    func_split_long_opt_arg=${1#*=}\
-} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
-func_split_short_opt ()\
-{\
-\    func_split_short_opt_arg=${1#??}\
-\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
-} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
-func_lo2o ()\
-{\
-\    case ${1} in\
-\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
-\      *)    func_lo2o_result=${1} ;;\
-\    esac\
-} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_xform ()$/,/^} # func_xform /c\
-func_xform ()\
-{\
-    func_xform_result=${1%.*}.lo\
-} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_arith ()$/,/^} # func_arith /c\
-func_arith ()\
-{\
-    func_arith_result=$(( $* ))\
-} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_len ()$/,/^} # func_len /c\
-func_len ()\
-{\
-    func_len_result=${#1}\
-} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-fi
-
-if test x"$lt_shell_append" = xyes; then
-  sed -e '/^func_append ()$/,/^} # func_append /c\
-func_append ()\
-{\
-    eval "${1}+=\\${2}"\
-} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
-func_append_quoted ()\
-{\
-\    func_quote_for_eval "${2}"\
-\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
-} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  # Save a `func_append' function call where possible by direct use of '+='
-  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-else
-  # Save a `func_append' function call even when '+=' is not available
-  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
-$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
-fi
-
-
-   mv -f "$cfgfile" "$ofile" ||
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-
-
-    cat <<_LT_EOF >> "$ofile"
-
-# ### BEGIN LIBTOOL TAG CONFIG: CXX
-
-# The linker used to build libraries.
-LD=$lt_LD_CXX
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag_CXX
-reload_cmds=$lt_reload_cmds_CXX
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds_CXX
-
-# A language specific compiler.
-CC=$lt_compiler_CXX
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC_CXX
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_CXX
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_CXX
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_CXX
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_CXX
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object_CXX
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds_CXX
-archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds_CXX
-module_expsym_cmds=$lt_module_expsym_cmds_CXX
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld_CXX
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_CXX
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_CXX
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct_CXX
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute_CXX
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L_CXX
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic_CXX
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath_CXX
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_CXX
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols_CXX
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_CXX
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_CXX
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_CXX
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds_CXX
-
-# Commands necessary for finishing linking programs.
-postlink_cmds=$lt_postlink_cmds_CXX
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec_CXX
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_CXX
-
-# The directories searched by this compiler when creating a shared library.
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
-
-# Dependencies to place before and after the objects being linked to
-# create a shared library.
-predep_objects=$lt_predep_objects_CXX
-postdep_objects=$lt_postdep_objects_CXX
-predeps=$lt_predeps_CXX
-postdeps=$lt_postdeps_CXX
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
-
-# ### END LIBTOOL TAG CONFIG: CXX
-_LT_EOF
-
-
-    cat <<_LT_EOF >> "$ofile"
-
-# ### BEGIN LIBTOOL TAG CONFIG: RC
-
-# The linker used to build libraries.
-LD=$lt_LD_RC
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag_RC
-reload_cmds=$lt_reload_cmds_RC
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds_RC
-
-# A language specific compiler.
-CC=$lt_compiler_RC
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC_RC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_RC
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_RC
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_RC
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_RC
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object_RC
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds_RC
-archive_expsym_cmds=$lt_archive_expsym_cmds_RC
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds_RC
-module_expsym_cmds=$lt_module_expsym_cmds_RC
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld_RC
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_RC
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_RC
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct_RC
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute_RC
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L_RC
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic_RC
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath_RC
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_RC
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols_RC
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_RC
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_RC
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_RC
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds_RC
-
-# Commands necessary for finishing linking programs.
-postlink_cmds=$lt_postlink_cmds_RC
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec_RC
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_RC
-
-# The directories searched by this compiler when creating a shared library.
-compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC
-
-# Dependencies to place before and after the objects being linked to
-# create a shared library.
-predep_objects=$lt_predep_objects_RC
-postdep_objects=$lt_postdep_objects_RC
-predeps=$lt_predeps_RC
-postdeps=$lt_postdeps_RC
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$lt_compiler_lib_search_path_RC
-
-# ### END LIBTOOL TAG CONFIG: RC
-_LT_EOF
-
- ;;
-
-  esac
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-# Make sure these are executable.
-chmod u+x tests/test_wrapper.sh Scripts/build-test-tarball.mk echo-install-dirs
-
-#====================================================================================
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: 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}
-" >&5
-$as_echo "
--=-=-=-=-=-=-=-=-=-= 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}
-" >&6; }
-
-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.
-test -h gdbclient && rm -f gdbclient
-
-(cd src && make genfiles)
-(cd tests && make genfiles)
index ef14780..f4ec6c4 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 1999-2015  Erik de Castro Lopo <erikd@mega-nerd.com>.
+# 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.26],[sndfile@mega-nerd.com],
+AC_INIT([libsndfile],[1.0.28],[sndfile@mega-nerd.com],
                [libsndfile],[http://www.mega-nerd.com/libsndfile/])
 
 # Put config stuff in Cfg.
@@ -13,7 +13,6 @@ AC_CONFIG_MACRO_DIR([M4])
 AC_CONFIG_SRCDIR([src/sndfile.c])
 AC_CANONICAL_TARGET([])
 
-AC_CONFIG_MACRO_DIR([M4])
 AC_CONFIG_HEADERS([src/config.h])
 
 AM_INIT_AUTOMAKE
@@ -30,11 +29,9 @@ MN_C_COMPILER_IS_CLANG
 MN_GCC_REALLY_IS_GCC
 
 AC_PROG_SED
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 
-# Do not check for F77.
-define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
-
-AM_PROG_LIBTOOL
+LT_INIT
 LT_PROG_RC
 
 AC_PROG_INSTALL
@@ -86,6 +83,8 @@ else
 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.
 
@@ -95,7 +94,7 @@ SHLIB_VERSION_ARG=""
 # Finished checking, handle options.
 
 AC_ARG_ENABLE(experimental,
-       AC_HELP_STRING([--enable-experimental], [enable experimental code]))
+       AS_HELP_STRING([--enable-experimental], [enable experimental code]))
 
 EXPERIMENTAL_CODE=0
 if test x$enable_experimental = xyes ; then
@@ -104,37 +103,41 @@ if test x$enable_experimental = xyes ; then
 AC_DEFINE_UNQUOTED([ENABLE_EXPERIMENTAL_CODE],${EXPERIMENTAL_CODE}, [Set to 1 to enable experimental code.])
 
 AC_ARG_ENABLE(werror,
-       AC_HELP_STRING([--enable-werror], [enable -Werror in all Makefiles]))
+       AS_HELP_STRING([--enable-werror], [enable -Werror in all Makefiles]))
 
 AC_ARG_ENABLE(stack-smash-protection,
-       AC_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection]))
+       AS_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection]))
 
 AC_ARG_ENABLE(gcc-pipe,
-       AC_HELP_STRING([--disable-gcc-pipe], [disable gcc -pipe option]))
+       AS_HELP_STRING([--disable-gcc-pipe], [disable gcc -pipe option]))
 
 AC_ARG_ENABLE(gcc-opt,
-       AC_HELP_STRING([--disable-gcc-opt], [disable gcc optimisations]))
+       AS_HELP_STRING([--disable-gcc-opt], [disable gcc optimisations]))
 
 AC_ARG_ENABLE(cpu-clip,
-       AC_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper]))
+       AS_HELP_STRING([--disable-cpu-clip], [disable tricky cpu specific clipper]))
 
 AC_ARG_ENABLE(bow-docs,
-       AC_HELP_STRING([--enable-bow-docs], [enable black-on-white html docs]))
+       AS_HELP_STRING([--enable-bow-docs], [enable black-on-white html docs]))
 
 AC_ARG_ENABLE(sqlite,
-       AC_HELP_STRING([--disable-sqlite], [disable use of sqlite]))
+       AS_HELP_STRING([--disable-sqlite], [disable use of sqlite]))
 
 AC_ARG_ENABLE(alsa,
-       AC_HELP_STRING([--disable-alsa], [disable use of ALSA]))
+       AS_HELP_STRING([--disable-alsa], [disable use of ALSA]))
 
 AC_ARG_ENABLE(external-libs,
-       AC_HELP_STRING([--disable-external-libs], [disable use of FLAC, Ogg and Vorbis [[default=no]]]))
+       AS_HELP_STRING([--disable-external-libs], [disable use of FLAC, Ogg and Vorbis [[default=no]]]))
 
 AC_ARG_ENABLE(octave,
-       AC_HELP_STRING([--enable-octave], [disable building of GNU Octave module]))
+       AS_HELP_STRING([--enable-octave], [disable building of GNU Octave module]))
+
+AC_ARG_ENABLE([full-suite],
+       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,
-       AC_HELP_STRING([--enable-test-coverage], [enable test coverage]))
+       AS_HELP_STRING([--enable-test-coverage], [enable test coverage]))
 AM_CONDITIONAL([ENABLE_TEST_COVERAGE], [test "$enable_test_coverage" = yes])
 
 #====================================================================================
@@ -159,8 +162,6 @@ AC_CHECK_SIZEOF(long long,8)
 
 # Check for common 64 bit file offset types.
 AC_CHECK_SIZEOF(off_t,1)
-AC_CHECK_SIZEOF(loff_t,1)
-AC_CHECK_SIZEOF(off64_t,1)
 
 if test "$enable_largefile:$ac_cv_sizeof_off_t" = "no:8" ; then
        echo
@@ -169,7 +170,6 @@ if test "$enable_largefile:$ac_cv_sizeof_off_t" = "no:8" ; then
        exit 1
        fi
 
-
 case "$host_os" in
        mingw32*)
                TYPEOF_SF_COUNT_T="__int64"
@@ -184,14 +184,6 @@ case "$host_os" in
                        TYPEOF_SF_COUNT_T="int64_t"
                        SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
                        SIZEOF_SF_COUNT_T=8
-               elif test "x$ac_cv_sizeof_loff_t" = "x8" ; then
-                       TYPEOF_SF_COUNT_T="int64_t"
-                       SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL"
-                       SIZEOF_SF_COUNT_T=8
-               elif test "x$ac_cv_sizeof_off64_t" = "x8" ; then
-                       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.
@@ -199,7 +191,6 @@ case "$host_os" in
                        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
@@ -215,6 +206,7 @@ case "$host_os" in
                        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"
@@ -241,8 +233,7 @@ 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_CHECK_TYPES(ssize_t)
-AC_CHECK_SIZEOF(ssize_t,4)
+AC_TYPE_SSIZE_T
 
 #====================================================================================
 # Determine endian-ness of target processor.
@@ -291,9 +282,9 @@ else
 #====================================================================================
 # Check for Ogg, Vorbis and FLAC.
 
-HAVE_EXTERNAL_LIBS=0
-EXTERNAL_CFLAGS=""
-EXTERNAL_LIBS=""
+HAVE_EXTERNAL_XIPH_LIBS=0
+EXTERNAL_XIPH_CFLAGS=""
+EXTERNAL_XIPH_LIBS=""
 
 # Check for pkg-config outside the if statement.
 PKG_PROG_PKG_CONFIG
@@ -326,11 +317,11 @@ if test -n "$PKG_CONFIG" ; then
                fi
 
        if test x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc = "xyesyesyesyes" ; then
-               HAVE_EXTERNAL_LIBS=1
+               HAVE_EXTERNAL_XIPH_LIBS=1
                enable_external_libs=yes
 
-               EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS"
-               EXTERNAL_LIBS="$FLAC_LIBS $OGG_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS "
+               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]])
@@ -344,7 +335,7 @@ if test -n "$PKG_CONFIG" ; then
                fi
        fi
 
-AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_LIBS], $HAVE_EXTERNAL_LIBS, [Will be set to 1 if flac, ogg and vorbis are available.])
+AC_DEFINE_UNQUOTED([HAVE_EXTERNAL_XIPH_LIBS], $HAVE_EXTERNAL_XIPH_LIBS, [Will be set to 1 if flac, ogg and vorbis are available.])
 
 #====================================================================================
 # Check for libsqlite3 (only used in regtest).
@@ -361,6 +352,7 @@ else
        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.
@@ -386,17 +378,13 @@ OS_SPECIFIC_LINKS=""
 os_is_win32=0
 os_is_openbsd=0
 use_windows_api=0
-osx_darwin_version=0
-
 case "$host_os" in
        darwin* | rhapsody*)
-               osx_darwin_version=$(echo "$host_os" | sed 's/\..*//;s/darwin//g')
                if test x$HAVE_XCODE_SELECT = xyes ; then
                        developer_path=`xcode-select --print-path`
                else
                        developer_path="/Developer"
                        fi
-               OS_SPECIFIC_CFLAGS="-I${developer_path}/Headers/FlatCarbon"
                OS_SPECIFIC_LINKS="-framework CoreAudio -framework AudioToolbox -framework CoreFoundation"
                ;;
        mingw*)
@@ -412,7 +400,6 @@ case "$host_os" in
 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])
-AC_DEFINE_UNQUOTED(OSX_DARWIN_VERSION, ${osx_darwin_version}, [The darwin version, no-zero is valid])
 AM_CONDITIONAL(USE_WIN_VERSION_FILE, test ${use_windows_api} -eq 1)
 
 #====================================================================================
@@ -517,17 +504,12 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
        MN_ADD_CFLAGS([-Wextra])
        MN_ADD_CFLAGS([-Wdeclaration-after-statement])
        MN_ADD_CFLAGS([-Wpointer-arith])
-       MN_ADD_CFLAGS([-funsigned-char])
 
        AC_LANG_PUSH([C++])
        MN_ADD_CXXFLAGS([-Wextra])
        MN_ADD_CXXFLAGS([-Wpointer-arith])
-       MN_ADD_CXXFLAGS([-funsigned-char])
        AC_LANG_POP([C++])
 
-
-       MN_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
-
        if test x$enable_stack_smash_protection = "xyes" ; then
                XIPH_GCC_STACK_PROTECTOR
                XIPH_GXX_STACK_PROTECTOR
@@ -538,9 +520,16 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
                MN_ADD_CFLAGS([-coverage])
                fi
 
-       CFLAGS="$CFLAGS     -Wcast-align -Wcast-qual -Wshadow -Wbad-function-cast -Wwrite-strings -Wundef -Wuninitialized -Winit-self -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Waggregate-return"
-       # -Winline -Wconversion  -Wunreachable-code"
-       CXXFLAGS="$CXXFLAGS -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wreorder -Wsign-promo -Wundef -Wuninitialized -Winit-self"
+       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/"`
@@ -630,14 +619,14 @@ AC_SUBST(SHARED_VERSION_INFO)
 AC_SUBST(CLEAN_VERSION)
 AC_SUBST(WIN_RC_VERSION)
 
-AC_SUBST(HAVE_EXTERNAL_LIBS)
+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_CFLAGS)
-AC_SUBST(EXTERNAL_LIBS)
+AC_SUBST(EXTERNAL_XIPH_CFLAGS)
+AC_SUBST(EXTERNAL_XIPH_LIBS)
 AC_SUBST(SRC_BINDIR)
 AC_SUBST(TEST_BINDIR)
 
@@ -706,7 +695,4 @@ echo "    Stack smash protection : .............. ${enable_stack_smash_protectio
 ./echo-install-dirs
 
 # Remove symlink created by Scripts/android-configure.sh.
-test -h gdbclient && rm -f gdbclient
-
-(cd src && make genfiles)
-(cd tests && make genfiles)
+rm -f gdbclient
index 45ec409..24ccc9d 100644 (file)
@@ -844,7 +844,7 @@ the top level of the extracted tarball.
                <A HREF="http://www.mega-nerd.com/libsndfile/">
                        http://www.mega-nerd.com/libsndfile/</A>.
 <BR/>
-Version : 1.0.26
+Version : 1.0.28
 </P>
 
 </BODY>
index b89f145..5e2ed3b 100644 (file)
@@ -3,7 +3,7 @@
 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 \
-                       dither.html tutorial.html
+                       tutorial.html
 
 EXTRA_DIST = $(html_DATA)
 
diff --git a/doc/Makefile.in b/doc/Makefile.in
deleted file mode 100644 (file)
index 0705745..0000000
+++ /dev/null
@@ -1,567 +0,0 @@
-# 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/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)/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
-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@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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 \
-                       dither.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:
index 832a355..ec4305e 100644 (file)
@@ -537,7 +537,7 @@ SFM_READ no action is taken.
 
 
 <A NAME="read"></A>
-<H2><BR><B>File Read Functions (Items)</B></H2>
+<H2><BR><B>File Read Functions</B></H2>
 
 <PRE>
       sf_count_t  sf_read_short   (SNDFILE *sndfile, short *ptr, sf_count_t items) ;
@@ -546,32 +546,7 @@ SFM_READ no action is taken.
       sf_count_t  sf_read_double  (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
 </PRE>
 
-<P>
-The file read items functions fill the array pointed to by ptr with the requested
-number of items. The items parameter must be an integer product of the number
-of channels or an error will occur.
-</P>
-<!-- pepper -->
-<P>
-It is important to note that 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 functions return the number of items read.
-Unless the end of the file was reached during the read, the return value should
-equal the number of items requested.
-Attempts to read beyond the end of the file will not result in an error but will
-cause the sf_read_XXXX functions to return less than the number of items requested
-or 0 if already at the end of the file.
-</P>
-
 <A NAME="readf"></A>
-<H2><BR><B>File Read Functions (Frames)</B></H2>
-
 <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) ;
@@ -580,57 +555,65 @@ or 0 if already at the end of the file.
 </PRE>
 <!-- pepper -->
 <P>
-The file read frames functions fill the array pointed to by ptr with the requested
-number of frames of data. The array must be large enough to hold the product of
-frames and the number of channels.
+The file read functions fill the array pointed to by ptr with the
+requested number of items or frames.
 </P>
 
-<P><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).
+<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>
-The sf_readf_XXXX functions return the number of frames read.
-Unless the end of the file was reached during the read, the return value should equal
-the number of frames requested.
-Attempts to read beyond the end of the file will not result in an error but will cause
-the sf_readf_XXXX functions to return less than the number of frames requested or 0 if
-already at the end of the file.
+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>
 
-<A NAME="write"></A>
-<H2><BR><B>File Write Functions (Items)</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>
-
 <P>
-The file write items functions write the data in the array pointed to by ptr to the file.
-The items parameter must be an integer product of the number of channels or an error
-will occur.
+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>
-It is important to note that 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 write the data using sf_write_float(). The library
-seamlessly converts between the two formats on-the-fly. See
+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_write_XXXX functions return the number of items written (which should be the
-same as the items parameter).
+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="writef"></A>
-<H2><BR><B>File Write Functions (Frames)</B></H2>
+<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) ;
@@ -638,14 +621,35 @@ same as the items parameter).
 </PRE>
 
 <P>
-The file write frames functions write the data in the array pointed to by ptr to the file.
-The array must be large enough to hold the product of frames and the number of channels.
+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_writef_XXXX functions return the number of frames written (which should be the
-same as the frames parameter).
+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 -->
@@ -795,7 +799,7 @@ and a parameter of SF_TRUE to force correct scaling.
                <A HREF="http://www.mega-nerd.com/libsndfile/">here</A>.
 </P>
 <P>
-Version : 1.0.26
+Version : 1.0.28
 </P>
 <!-- pepper -->
 <!-- pepper -->
index 9cdeb8c..a00f7ea 100644 (file)
 </TR>
 
 <TR>
+       <TD><A HREF="#SFC_GET_CUE_COUNT">SFC_GET_CUE_COUNT</A></TD>
+       <TD>Get the cue marker count</TD>
+</TR>
+
+<TR>
+       <TD><A HREF="#SFC_GET_CUE">SFC_GET_CUE</A></TD>
+       <TD>Get cue marker info</TD>
+</TR>
+
+<TR>
+       <TD><A HREF="#SFC_SET_CUE">SFC_SET_CUE</A></TD>
+       <TD>Set cue marker info</TD>
+</TR>
+
+<TR>
        <TD><A HREF="#SFC_RF64_AUTO_DOWNGRADE">SFC_RF64_AUTO_DOWNGRADE</A></TD>
        <TD>Enable auto downgrade from RF64 to WAV</TD>
 </TR>
@@ -1659,7 +1674,7 @@ Parameters:
 </p>
 <PRE>
          sndfile  : A valid SNDFILE* pointer
-         cmd      : SFC_GET_INSTRUMENT
+         cmd      : SFC_SET_INSTRUMENT
          data     : a pointer to an SF_INSTRUMENT struct
          datasize : sizeof (SF_INSTRUMENT)
 </PRE>
@@ -1679,6 +1694,124 @@ Example:
 
 <!-- ========================================================================= -->
 
+<A NAME="SFC_GET_CUE"></A>
+<H2><BR><B>SFC_GET_CUE_COUNT</B></H2>
+<P>
+Retrieve the number of cue markers available for retrieval using the
+SFC_GET_CUE command.
+</P>
+<P>
+Parameters:
+</P>
+<PRE>
+         sndfile  : A valid SNDFILE* pointer
+         cmd      : SFC_GET_CUE
+         data     : a pointer to a uint32_t
+         datasize : sizeof (uint32_t)
+</PRE>
+
+
+<P>
+Example:
+</P>
+<PRE>
+         uint32_t cue_count ;
+         sf_command (sndfile, SFC_GET_CUE_COUNT, &amp;cue_count, sizeof (cue_count)) ;
+</PRE>
+<DL>
+<DT>Return value:</DT>
+       <dd>SF_TRUE if the file header contains cue marker information for the
+    file. SF_FALSE otherwise.
+</DL>
+
+<!-- ========================================================================= -->
+
+<A NAME="SFC_GET_CUE"></A>
+<H2><BR><B>SFC_GET_CUE</B></H2>
+<P>
+Retrieve cue marker information from file.
+</P>
+<P>
+Parameters:
+</P>
+<PRE>
+         sndfile  : A valid SNDFILE* pointer
+         cmd      : SFC_GET_CUE
+         data     : a pointer to an SF_CUES struct
+         datasize : sizeof (SF_CUES)
+</PRE>
+
+<P>
+The SF_CUES struct is defined in &lt;sndfile.h&gt; as:
+</P>
+<PRE>
+    typedef struct
+    {  int cue_count ;
+
+       struct
+       {       int32_t   indx ;
+               uint32_t  position ;
+               int32_t   fcc_chunk ;
+               int32_t   chunk_start ;
+               int32_t   block_start ;
+               uint32_t  sample_offset ;
+               char name [256] ;
+       } cue_points [100] ;
+    } SF_CUES ;
+</PRE>
+
+<P>
+There is also an SF_CUES_VAR #define that allows reading/writing more than 100
+cue markers.
+</P>
+
+<P>
+Example:
+</P>
+<PRE>
+         SF_CUES cues ;
+         sf_command (sndfile, SFC_GET_CUE, &amp;cues, sizeof (cues)) ;
+</PRE>
+<DL>
+<DT>Return value:</DT>
+       <dd>SF_TRUE if the file header contains cue marker information for the
+    file. SF_FALSE otherwise.
+</DL>
+
+
+<!-- ========================================================================= -->
+
+
+<A NAME="SFC_SET_CUE"></A>
+<H2><BR><B>SFC_SET_CUE</B></H2>
+<P>
+Set the cue marker information for the file.
+</P>
+<P>
+Parameters:
+</P>
+<PRE>
+         sndfile  : A valid SNDFILE* pointer
+         cmd      : SFC_SET_CUE
+         data     : a pointer to an SF_CUES struct
+         datasize : sizeof (SF_CUES)
+</PRE>
+<P>
+Example:
+</P>
+<PRE>
+         SF_CUES cues ;
+         sf_command (sndfile, SFC_SET_CUE, &amp;cues, sizeof (cues)) ;
+</PRE>
+<DL>
+<DT>Return value:</DT>
+       <dd>SF_TRUE if the file header contains cue marker information for the
+       file. SF_FALSE otherwise.
+</DL>
+
+
+<!-- ========================================================================= -->
+
 
 <A NAME="SFC_RF64_AUTO_DOWNGRADE"></A>
 <H2><BR><B>SFC_RF64_AUTO_DOWNGRADE</B></H2>
diff --git a/doc/development.html b/doc/development.html
new file mode 100644 (file)
index 0000000..abd13b3
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+
+<HEAD>
+       <TITLE>
+       libsndfile Development
+       </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 Development</H1>
+<!-- pepper -->
+<P>
+libsndfile is being developed by a small community of users and hackers.
+People interested in helping can join the libsndfile-devel
+       <A HREF="lists.html">mailing list</A>
+or raise an issue on Github.
+</P>
+<!-- pepper -->
+<P>
+The main repository can be found on Github:
+</P>
+<!-- pepper -->
+<center>
+<A HREF="https://github.com/erikd/libsndfile/">
+                       https://github.com/erikd/libsndfile/</A>
+</center>
+<!-- pepper -->
+<P>
+and includes
+       <a href="https://github.com/erikd/libsndfile/blob/master/README.md">
+       instuctions</a>
+on how to build libsndfile from the Git repo.
+</P>
+<!-- pepper -->
+</BODY>
+</HTML>
+
diff --git a/doc/dither.html b/doc/dither.html
deleted file mode 100644 (file)
index a3bea79..0000000
+++ /dev/null
@@ -1,1017 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<HTML>
-
-<HEAD>
-       <TITLE>
-       libsndfile : the sf_command function.
-       </TITLE>
-       <META NAME="Author"      CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
-       <!-- Another version at the bottom of the page.  -->
-       <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>
-
-<H1><B>sf_command</B></H1>
-<PRE>
-
-        int    sf_command (SNDFILE *sndfile, int cmd, void *data, int datasize) ;
-</PRE>
-<P>
-       This function allows the caller to retrieve information from or change aspects of the
-       library behaviour.
-       Examples include retrieving a string containing the library version or changing the
-       scaling applied to floating point sample data during read and write.
-       Most of these operations are performed on a per-file basis.
-</P>
-<P>
-       The cmd parameter is a integer identifier which is defined in &lt;sndfile.h&gt;.
-       All of the valid command identifiers have names begining with "SFC_".
-       Data is passed to and returned from the library by use of a void pointer.
-       The library will not read or write more than datasize bytes from the void pointer.
-       For some calls no data is required in which case data should be NULL and datasize
-       may be used for some other purpose.
-</P>
-<P>
-       The available commands are as follows:
-</P>
-
-<CENTER>
-<TABLE BORDER="0" WIDTH="90%" CELLPADDING="4">
-<TR>
-       <TD><A HREF="#SFC_GET_LIB_VERSION">SFC_GET_LIB_VERSION</A></TD>
-       <TD>Retrieve the version of the library.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_GET_LOG_INFO">SFC_GET_LOG_INFO</A></TD>
-       <TD>Retrieve the internal per-file operation log.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_CALC_SIGNAL_MAX">SFC_CALC_SIGNAL_MAX</A></TD>
-       <TD>Retrieve the measured maximum signal value.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_CALC_NORM_SIGNAL_MAX">SFC_CALC_NORM_SIGNAL_MAX</A></TD>
-       <TD>Retrieve the measured normalised maximum signal value.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_CALC_MAX_ALL_CHANNELS">SFC_CALC_MAX_ALL_CHANNELS</A></TD>
-       <TD>Calculate peaks for all channels.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_CALC_NORM_MAX_ALL_CHANNELS">SFC_CALC_NORM_MAX_ALL_CHANNELS</A></TD>
-       <TD>Calculate normalised peaks for all channels.</TD>
-</TR>
-
-<TR>
-       <TD><A HREF="#SFC_SET_NORM_FLOAT">SFC_SET_NORM_FLOAT</A></TD>
-       <TD>Modify the normalisation behaviour of the floating point reading and writing functions.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_SET_NORM_DOUBLE">SFC_SET_NORM_DOUBLE</A></TD>
-       <TD>Modify the normalisation behaviour of the double precision floating point reading and writing functions.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_GET_NORM_FLOAT">SFC_GET_NORM_FLOAT</A></TD>
-       <TD>Retrieve the current normalisation behaviour of the floating point reading and writing functions.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_GET_NORM_DOUBLE">SFC_GET_NORM_DOUBLE</A></TD>
-       <TD>Retrieve the current normalisation behaviour of the double precision floating point reading and writing functions.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_GET_SIMPLE_FORMAT_COUNT">SFC_GET_SIMPLE_FORMAT_COUNT</A></TD>
-       <TD>Retrieve the number of simple formats supported by libsndfile.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_GET_SIMPLE_FORMAT">SFC_GET_SIMPLE_FORMAT</A></TD>
-       <TD>Retrieve information about a simple format.</TD>
-</TR>
-
-<TR>
-       <TD><A HREF="#SFC_GET_FORMAT_INFO">SFC_GET_FORMAT_INFO</A></TD>
-       <TD>Retrieve information about a major or subtype format.</TD>
-</TR>
-
-<TR>
-       <TD><A HREF="#SFC_GET_FORMAT_MAJOR_COUNT">SFC_GET_FORMAT_MAJOR_COUNT</A></TD>
-       <TD>Retrieve the number of major formats.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_GET_FORMAT_MAJOR">SFC_GET_FORMAT_MAJOR</A></TD>
-       <TD>Retrieve information about a major format type.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_GET_FORMAT_SUBTYPE_COUNT">SFC_GET_FORMAT_SUBTYPE_COUNT</A></TD>
-       <TD>Retrieve the number of subformats.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_GET_FORMAT_SUBTYPE">SFC_GET_FORMAT_SUBTYPE</A></TD>
-       <TD>Retrieve information about a subformat.</TD>
-</TR>
-
-<TR>
-       <TD><A HREF="#SFC_SET_ADD_PEAK_CHUNK">SFC_SET_ADD_PEAK_CHUNK</A></TD>
-       <TD>Switch the code for adding the PEAK chunk to WAV and AIFF files on or off.</TD>
-</TR>
-
-<TR>
-       <TD><A HREF="#SFC_UPDATE_HEADER_NOW">SFC_UPDATE_HEADER_NOW</A></TD>
-       <TD>Used when a file is open for write, this command will update the file
-               header to reflect the data written so far.</TD>
-</TR>
-<TR>
-       <TD><A HREF="#SFC_SET_UPDATE_HEADER_AUTO">SFC_SET_UPDATE_HEADER_AUTO</A></TD>
-       <TD>Used when a file is open for write, this command will cause the file header
-               to be updated after each write to the file.</TD>
-</TR>
-
-<TR>
-       <TD><A HREF="#SFC_FILE_TRUNCATE">SFC_FILE_TRUNCATE</A></TD>
-       <TD>Truncate a file open for write or for read/write.</TD>
-</TR>
-
-<TR>
-       <TD><A HREF="#SFC_SET_RAW_START_OFFSET">SFC_SET_RAW_START_OFFSET</A></TD>
-       <TD>Change the data start offset for files opened up as SF_FORMAT_RAW.</TD>
-</TR>
-
-
-
-<!--
-<TR>
-       <TD><A HREF="#add-dither">add dither</A></TD>
-       <TD>Add dither to output on write.</TD>
-</TR>
--->
-</TABLE>
-</CENTER>
-
-<BR><BR>
-
-<HR>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_LIB_VERSION"></A>
-<H2><BR><B>SFC_GET_LIB_VERSION</B></H2>
-<P>
-Retrieve the version of the library as a string.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : Not used
-        cmd      : SFC_GET_LIB_VERSION
-        data     : A pointer to a char buffer
-        datasize : The size of the buffer
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        char  buffer [128] ;
-        sf_command (NULL, SFC_GET_LIB_VERSION, buffer, sizeof (buffer)) ;
-</PRE>
-
-<DL>
-<DT>Return value:</DT>
-       <DD><DD>This call will return the length of the retrieved version string.
-</DL>
-<DL>
-<DT>Notes:</DT>
-<DD>
-The string returned in the buffer passed to this function will not overflow
-the buffer and will always be null terminated .
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_LOG_INFO"></A>
-<H2><BR><B>SFC_GET_LOG_INFO</B></H2>
-<P>
-Retrieve the log buffer generated when opening a file as a string. This log
-buffer can often contain a good reason for why libsndfile failed to open a
-particular file.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_GET_LOG_INFO
-        data     : A pointer to a char buffer
-        datasize : The size of the buffer
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        char  buffer [2048] ;
-        sf_command (sndfile, SFC_GET_LOG_INFO, buffer, sizeof (buffer)) ;
-</PRE>
-
-<DL>
-<DT>Return value:</DT>
-       <DD><DD>This call will return the length of the retrieved version string.
-</DL>
-<DL>
-<DT>Notes:</DT>
-<DD>
-The string returned in the buffer passed to this function will not overflow
-the buffer and will always be null terminated .
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_CALC_SIGNAL_MAX"></A>
-<H2><BR><B>SFC_CALC_SIGNAL_MAX</B></H2>
-<P>
-Retrieve the measured maximum signal value. This involves reading through
-the whole file which can be slow on large files.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_CALC_SIGNAL_MAX
-        data     : A pointer to a double
-        datasize : sizeof (double)
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        double   max_val ;
-        sf_command (sndfile, SFC_CALC_SIGNAL_MAX, &amp;max_val, sizeof (max_val)) ;
-</PRE>
-
-<DL>
-<DT>Return value:</DT>
-       <DD><DD>Zero on success, non-zero otherwise.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_CALC_NORM_SIGNAL_MAX"></A>
-<H2><BR><B>SFC_CALC_NORM_SIGNAL_MAX</B></H2>
-<P>
-Retrieve the measured normailised maximum signal value. This involves reading
-through the whole file which can be slow on large files.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_CALC_NORM_SIGNAL_MAX
-        data     : A pointer to a double
-        datasize : sizeof (double)
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        double   max_val ;
-        sf_command (sndfile, SFC_CALC_NORM_SIGNAL_MAX, &amp;max_val, sizeof (max_val)) ;
-</PRE>
-
-<DL>
-<DT>Return value:</DT>
-       <DD><DD>Zero on success, non-zero otherwise.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_CALC_MAX_ALL_CHANNELS"></A>
-<H2><BR><B>SFC_CALC_MAX_ALL_CHANNELS</B></H2>
-<P>
-Calculate peaks for all channels. This involves reading through
-the whole file which can be slow on large files.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_CALC_MAX_ALL_CHANNELS
-        data     : A pointer to a double
-        datasize : sizeof (double) * number_of_channels
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        double   peaks [number_of_channels] ;
-        sf_command (sndfile, SFC_CALC_MAX_ALL_CHANNELS, peaks, sizeof (peaks)) ;
-</PRE>
-<DL>
-<DT>Return value:</DT>
-       <DD>Zero if peaks have been calculated successfully and non-zero otherwise.
-</DL>
-
-
-<!-- ========================================================================= -->
-<A NAME="SFC_CALC_NORM_MAX_ALL_CHANNELS"></A>
-<H2><BR><B>SFC_CALC_NORM_MAX_ALL_CHANNELS</B></H2>
-<P>
-Calculate normalised peaks for all channels. This involves reading through
-the whole file which can be slow on large files.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_CALC_NORM_MAX_ALL_CHANNELS
-        data     : A pointer to a double
-        datasize : sizeof (double) * number_of_channels
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        double   peaks [number_of_channels] ;
-        sf_command (sndfile, SFC_CALC_NORM_MAX_ALL_CHANNELS, peaks, sizeof (peaks)) ;
-</PRE>
-<DL>
-<DT>Return value:</DT>
-       <DD>Zero if peaks have been calculated successfully and non-zero otherwise.
-</DL>
-
-
-
-
-
-<!-- ========================================================================= -->
-<!--
-<A NAME="read-text"></A>
-<H2><BR><B>Read text</B></H2>
-<P>
-Many sound file formats contain allow the inclusion of a text string describing the nature
-of the file. If a file contains such a string, this functions will return it to the caller.
-</P>
-<P>
-It should be noted that the way the string is added to the file is file format dependant
-but that any string added with <A HREF="#write-text">write text</A> will be returned by
-<A HREF="#read-text">read text</A>.
-</P>
-<P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : The text string "read text".
-        data     : A pointer to a char buffer.
-        datasize : The size of the buffer.
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-       char  buffer [128] ;
-        sf_command (sndfile, "read text", buffer, sizeof (buffer)) ;
-</PRE>
-<DL>
-<DT>Return value:</DT>
-<DD>If a text string is found, this call will return the length of the retrieved text
-       string.
-       <DD>If no text string is found, zero will be returned and the first element in the
-       buffer will be set to the null character.
-<DT>Notes:</DT>
-<DD>The string returned in the buffer passed to this function will not overflow
-       the buffer and will be correctly null terminated .
-</DL>
-
-<A NAME="write-text"></A>
-<H2><BR><B>Write text</B></H2>
-<P>
-Add a text string to a file. The text string added can be retrieved when the file is
-read using <A HREF="#read-text">read text</A>.
-</P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : The text string "write text".
-        data     : A pointer to the string to be added.
-        datasize : Not used.
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-       char  text = "The sound of one hand clapping." ;
-        sf_command (sndfile, "write text", text, strlen (text)) ;
-</PRE>
-<DL>
-<DT>Return value: </DT>
-       <DD>If the current file format allows the addition of text strings, the string will
-               be added and the length of the string will be returned.
-       <DD>If the file format does not allow the addition of text strings zero will be returned.
-       <DD>If this function is called after the file is openned but before
-</DL>
--->
-
-
-<!-- ========================================================================= -->
-<A NAME="SFC_SET_NORM_FLOAT"></A>
-<H2><BR><B>SFC_SET_NORM_FLOAT</B></H2>
-<P>
-This command only affects data read from or written to using the floating point functions:
-</P>
-<PRE>
-       size_t    <A HREF="api.html#read">sf_read_float</A>    (SNDFILE *sndfile, float *ptr, size_t items) ;
-       size_t    <A HREF="api.html#readf">sf_readf_float</A>   (SNDFILE *sndfile, float *ptr, size_t frames) ;
-
-       size_t    <A HREF="api.html#write">sf_write_float</A>   (SNDFILE *sndfile, float *ptr, size_t items) ;
-       size_t    <A HREF="api.html#writef">sf_writef_float</A>  (SNDFILE *sndfile, float *ptr, size_t frames) ;
-</PRE>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_SET_NORM_FLOAT
-        data     : NULL
-        datasize : SF_TRUE or SF_FALSE
-</PRE>
-<P>
-For read operations setting normalisation to SF_TRUE means that the data from all
-subsequent reads will be be normalised to the range [-1.0, 1.0].
-</P>
-<P>
-For write operations, setting normalisation to SF_TRUE means than all data supplied
-to the float write functions should be in the range [-1.0, 1.0] and will be scaled
-for the file format as necessary.
-</P>
-<P>
-For both cases, setting normalisation to SF_FALSE means that no scaling will take place.
-</P>
-<P>
-Example:
-</P>
-<PRE>
-        sf_command (sndfile, SFC_SET_NORM_FLOAT, NULL, SF_TRUE) ;
-
-        sf_command (sndfile, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-</PRE>
-<DL>
-<DT>Return value: </DT>
-       <DD>Returns 1 on success or 0 for failure.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_SET_NORM_DOUBLE"></A>
-<H2><BR><B>SFC_SET_NORM_DOUBLE</B></H2>
-<P>
-This command only affects data read from or written to using the double precision
-floating point functions:
-</P>
-<PRE>
-       size_t    <A HREF="api.html#read">sf_read_double</A>    (SNDFILE *sndfile, double *ptr, size_t items) ;
-       size_t    <A HREF="api.html#readf">sf_readf_double</A>   (SNDFILE *sndfile, double *ptr, size_t frames) ;
-
-       size_t    <A HREF="api.html#write">sf_write_double</A>   (SNDFILE *sndfile, double *ptr, size_t items) ;
-       size_t    <A HREF="api.html#writef">sf_writef_double</A>  (SNDFILE *sndfile, double *ptr, size_t frames) ;
-</PRE>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_SET_NORM_DOUBLE
-        data     : NULL
-        datasize : SF_TRUE or SF_FALSE
-</PRE>
-<P>
-For read operations setting normalisation to SF_TRUE means that the data
-from all subsequent reads will be be normalised to the range [-1.0, 1.0].
-</P>
-<P>
-For write operations, setting normalisation to SF_TRUE means than all data supplied
-to the double write functions should be in the range [-1.0, 1.0] and will be scaled
-for the file format as necessary.
-</P>
-<P>
-For both cases, setting normalisation to SF_FALSE means that no scaling will take place.
-</P>
-<P>
-Example:
-</P>
-<PRE>
-        sf_command (sndfile, SFC_SET_NORM_DOUBLE, NULL, SF_TRUE) ;
-
-        sf_command (sndfile, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-</PRE>
-<DL>
-<DT>Return value: </DT>
-       <DD>Returns 1 on success or 0 for failure.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_NORM_FLOAT"></A>
-<H2><BR><B>SFC_GET_NORM_FLOAT</B></H2>
-<P>
-Retrieve the current float normalisation mode.
-</P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_GET_NORM_FLOAT
-        data     : NULL
-        datasize : anything
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        normalisation = sf_command (sndfile, SFC_GET_NORM_FLOAT, NULL, 0) ;
-</PRE>
-<DL>
-<DT>Return value: </DT>
-       <DD>Returns TRUE if normaisation is on and FALSE otherwise.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_NORM_DOUBLE"></A>
-<H2><BR><B>SFC_GET_NORM_DOUBLE</B></H2>
-<P>
-Retrieve the current float normalisation mode.
-</P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_GET_NORM_DOUBLE
-        data     : NULL
-        datasize : anything
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        normalisation = sf_command (sndfile, SFC_GET_NORM_DOUBLE, NULL, 0) ;
-</PRE>
-<DL>
-<DT>Return value: </DT>
-       <DD>Returns TRUE if normalisation is on and FALSE otherwise.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_SIMPLE_FORMAT_COUNT"></A>
-<H2><BR><B>SFC_GET_SIMPLE_FORMAT_COUNT</B></H2>
-<P>
-Retrieve the number of simple formats supported by libsndfile.
-</P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : Not used.
-        cmd      : SFC_GET_SIMPLE_FORMAT_COUNT
-        data     : a pointer to an int
-        datasize : sizeof (int)
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        int  count ;
-        sf_command (sndfile, SFC_GET_SIMPLE_FORMAT_COUNT, &amp;count, sizeof (int)) ;
-</PRE>
-<DL>
-<DT>Return value: </DT>
-       <DD>0
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_SIMPLE_FORMAT"></A>
-<H2><BR><B>SFC_GET_SIMPLE_FORMAT</B></H2>
-<P>
-Retrieve information about a simple format.
-</P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : Not used.
-        cmd      : SFC_GET_SIMPLE_FORMAT
-        data     : a pointer to an  SF_FORMAT_INFO struct
-        datasize : sizeof (SF_FORMAT_INFO)
-</PRE>
-<P>
-The SF_FORMAT_INFO struct is defined in &lt;sndfile.h&gt; as:
-</P>
-<PRE>
-        typedef struct
-        {   int         format ;
-            const char  *name ;
-            const char  *extension ;
-        } SF_FORMAT_INFO ;
-</PRE>
-<P>
-When sf_command() is called with SF_GET_SIMPLE_FORMAT, the value of the format
-field should be the format number (ie 0 <= format <= count value obtained using
-SF_GET_SIMPLE_FORMAT_COUNT).
-</P>
-<P>
-Example:
-</P>
-<PRE>
-        SF_FORMAT_INFO format_info ;
-        int             k, count ;
-
-        sf_command (sndfile, SFC_GET_SIMPLE_FORMAT_COUNT, &amp;count, sizeof (int)) ;
-
-        for (k = 0 ; k < count ; k++)
-        {   format_info.format = k ;
-            sf_command (sndfile, SFC_GET_SIMPLE_FORMAT, &amp;format_info, sizeof (format_info)) ;
-            printf ("%08x  %s %s\n", format_info.format, format_info.name, format_info.extension) ;
-            } ;
-</PRE>
-<DL>
-<DT>Return value: </DT>
-       <DD>0 on success and non-zero otherwise.
-       <DD>The value of the format field of the SF_FORMAT_INFO struct will be an value which
-               can be placed in the format field of an SF_INFO struct when a file is to be opened
-               for write.
-       <DD>The name field will contain a char* pointer to the name of the string ie "WAV (Microsoft 16 bit PCM)".
-       <DD>The extention field will contain the most commonly used file extension for that file type.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_FORMAT_INFO"></A>
-<H2><BR><B>SFC_GET_FORMAT_INFO</B></H2>
-<P>
-Retrieve information about a major or subtype format.
-</P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : Not used.
-        cmd      : SFC_GET_FORMAT_INFO
-        data     : a pointer to an SF_FORMAT_INFO struct
-        datasize : sizeof (SF_FORMAT_INFO)
-</PRE>
-<P>
-The SF_FORMAT_INFO struct is defined in &lt;sndfile.h&gt; as:
-</P>
-<PRE>
-        typedef struct
-        {   int         format ;
-            const char  *name ;
-            const char  *extension ;
-        } SF_FORMAT_INFO ;
-</PRE>
-<P>
-When sf_command() is called with SF_GET_FORMAT_INFO, the format field is
-examined and if (format & SF_FORMAT_TYPEMASK) is a valid format then the struct
-is filled in with information about the given major type.
-If (format & SF_FORMAT_TYPEMASK) is FALSE and (format & SF_FORMAT_SUBMASK) is a
-valid subtype format then the struct is filled in with information about the given
-subtype.
-</P>
-<P>
-Example:
-</P>
-<PRE>
-        SF_FORMAT_INFO format_info ;
-
-        format_info.format = SF_FORMAT_WAV ;
-        sf_command (sndfile, SFC_GET_FORMAT_INFO, &amp;format_info, sizeof (format_info)) ;
-        printf ("%08x  %s %s\n", format_info.format, format_info.name, format_info.extension) ;
-
-        format_info.format = SF_FORMAT_ULAW ;
-        sf_command (sndfile, SFC_GET_FORMAT_INFO, &amp;format_info, sizeof (format_info)) ;
-        printf ("%08x  %s\n", format_info.format, format_info.name) ;
-</PRE>
-<DL>
-<DT>Return value: </DT>
-       <DD>0 on success and non-zero otherwise.
-</DL>
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_FORMAT_MAJOR_COUNT"></A>
-<H2><BR><B>SFC_GET_FORMAT_MAJOR_COUNT</B></H2>
-<P>
-Retrieve the number of major formats.
-</P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : Not used.
-        cmd      : SFC_GET_FORMAT_MAJOR_COUNT
-        data     : a pointer to an int
-        datasize : sizeof (int)
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        int  count ;
-        sf_command (sndfile, SFC_GET_FORMAT_MAJOR_COUNT, &amp;count, sizeof (int)) ;
-</PRE>
-<DL>
-<DT>Return value: </DT>
-       <DD>0
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_FORMAT_MAJOR"></A>
-<H2><BR><B>SFC_GET_FORMAT_MAJOR</B></H2>
-<P>
-Retrieve information about a major format type.
-</P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : Not used.
-        cmd      : SFC_GET_FORMAT_MAJOR
-        data     : a pointer to an  SF_FORMAT_INFO struct
-        datasize : sizeof (SF_FORMAT_INFO)
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        SF_FORMAT_INFO format_info ;
-        int             k, count ;
-
-        sf_command (sndfile, SFC_GET_FORMAT_MAJOR_COUNT, &amp;count, sizeof (int)) ;
-
-        for (k = 0 ; k < count ; k++)
-        {   format_info.format = k ;
-            sf_command (sndfile, SFC_GET_FORMAT_MAJOR, &amp;format_info, sizeof (format_info)) ;
-            printf ("%08x  %s %s\n", format_info.format, format_info.name, format_info.extension) ;
-            } ;
-</PRE>
-<P>
-For a more comprehensive example, see the program list_formats.c in the examples/
-directory of the libsndfile source code distribution.
-</P>
-<DL>
-<DT>Return value: </DT>
-       <DD>0 on success and non-zero otherwise.
-       <DD>The value of the format field will one of the major format identifiers suc as SF_FORMAT_WAV
-               SF_FORMAT_AIFF.
-       <DD>The name field will contain a char* pointer to the name of the string ie "WAV (Microsoft)".
-       <DD>The extention field will contain the most commonly used file extension for that file type.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_FORMAT_SUBTYPE_COUNT"></A>
-<H2><BR><B>SFC_GET_FORMAT_SUBTYPE_COUNT</B></H2>
-<P>
-Retrieve the number of subformats.
-</P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : Not used.
-        cmd      : SFC_GET_FORMAT_SUBTYPE_COUNT
-        data     : a pointer to an int
-        datasize : sizeof (int)
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        int   count ;
-        sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE_COUNT, &amp;count, sizeof (int)) ;
-</PRE>
-<DL>
-<DT>Return value: </DT>
-       <DD>0
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_GET_FORMAT_SUBTYPE"></A>
-<H2><BR><B>SFC_GET_FORMAT_SUBTYPE</B></H2>
-<P>
-Retrieve information about a subformat.
-</P>
-<P>
-Parameters:
-</P>
-<PRE>
-        sndfile  : Not used.
-        cmd      : SFC_GET_FORMAT_SUBTYPE
-        data     : a pointer to an SF_FORMAT_INFO struct
-        datasize : sizeof (SF_FORMAT_INFO)
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        SF_FORMAT_INFO format_info ;
-        int             k, count ;
-
-        sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE_COUNT, &amp;count, sizeof (int)) ;
-
-        /* Retrieve all the subtypes supported by the WAV format. */
-        for (k = 0 ; k < count ; k++)
-        {   format_info.format = k ;
-            sf_command (sndfile, SFC_GET_FORMAT_SUBTYPE, &amp;format_info, sizeof (format_info)) ;
-            if (! sf_format_check (format.info | SF_FORMAT_WAV))
-               continue ;
-            printf ("%08x  %s\n", format_info.format, format_info.name) ;
-            } ;
-</PRE>
-<P>
-For a more comprehensive example, see the program list_formats.c in the examples/
-directory of the libsndfile source code distribution.
-</P>
-<DL>
-<DT>Return value: </DT>
-       <DD>0 on success and non-zero otherwise.
-       <DD>The value of the format field will one of the major format identifiers such as SF_FORMAT_WAV
-               SF_FORMAT_AIFF.
-       <DD>The name field will contain a char* pointer to the name of the string; for instance
-               "WAV (Microsoft)" or "AIFF (Apple/SGI)".
-       <DD>The extention field will be a NULL pointer.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_SET_ADD_PEAK_CHUNK"></A>
-<H2><BR><B>SFC_SET_ADD_PEAK_CHUNK</B></H2>
-<P>
-By default, WAV and AIFF files which contain floating point data (subtype SF_FORMAT_FLOAT
-or SF_FORMAT_DOUBLE) have a PEAK chunk.
-By using this command, the addition of a PEAK chunk can be turned on or off.
-</P>
-<P>
-Note : This call must be made before any data is written to the file.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_SET_ADD_PEAK_CHUNK
-        data     : Not used (should be NULL)
-        datasize : TRUE or FALSE.
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        /* Turn on the PEAK chunk. */
-        sf_command (sndfile, SFC_SET_ADD_PEAK_CHUNK, NULL, SF_TRUE) ;
-
-        /* Turn off the PEAK chunk. */
-        sf_command (sndfile, SFC_SET_ADD_PEAK_CHUNK, NULL, SF_FALSE) ;
-</PRE>
-<DL>
-<DT>Return value:</DT>
-<DD>Returns SF_TRUE if the peak chunk will be written after this call.
-<DD>Returns SF_FALSE if the peak chunk will not be written after this call.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_UPDATE_HEADER_NOW"></A>
-<H2><BR><B>SFC_UPDATE_HEADER_NOW</B></H2>
-<P>
-The header of an audio file is normally written by libsndfile when the file is
-closed using <B>sf_close()</B>.
-</P>
-<P>
-There are however situations where large files are being generated and it would
-be nice to have valid data in the header before the file is complete.
-Using this command will update the file header to reflect the amount of data written
-to the file so far.
-Other programs opening the file for read (before any more data is written) will
-then read a valid sound file header.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_UPDATE_HEADER_NOW
-        data     : Not used (should be NULL)
-        datasize : Not used.
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        /* Update the header now. */
-        sf_command (sndfile, SFC_UPDATE_HEADER_NOW, NULL, 0) ;
-</PRE>
-<DL>
-<DT>Return value:</DT>
-<DD>0
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_SET_UPDATE_HEADER_AUTO"></A>
-<H2><BR><B>SFC_SET_UPDATE_HEADER_AUTO</B></H2>
-<P>
-Similar to SFC_UPDATE_HEADER_NOW but updates the header at the end of every call
-to the <B>sf_write*</B> functions.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_UPDATE_HEADER_NOW
-        data     : Not used (should be NULL)
-        datasize : SF_TRUE or SF_FALSE
-</PRE>
-<P>
-Example:
-</P>
-<PRE>
-        /* Turn on auto header update. */
-        sf_command (sndfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) ;
-
-        /* Turn off auto header update. */
-        sf_command (sndfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_FALSE) ;
-</PRE>
-<DL>
-<DT>Return value:</DT>
-<DD>TRUE if auto update header is now on; FALSE otherwise.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_FILE_TRUNCATE"></A>
-<H2><BR><B>SFC_FILE_TRUNCATE</B></H2>
-<P>
-Truncate a file open for write or for read/write.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_FILE_TRUNCATE
-        data     : A pointer to an sf_count_t.
-        datasize : sizeof (sf_count_t)
-</PRE>
-
-<P>
-Truncate the file to the number of frames specified by the sf_count_t pointed
-to by data.
-After this command, both the read and the write pointer will be
-at the new end of the file.
-This command will fail (returning non-zero) if the requested truncate position
-is beyond the end of the file.
-</P>
-<P>
-Example:
-</P>
-<PRE>
-        /* Truncate the file to a length of 20 frames. */
-        sf_count_t  frames = 20 ;
-        sf_command (sndfile, SFC_FILE_TRUNCATE, &amp;frames, sizeof (frames)) ;
-</PRE>
-<DL>
-<DT>Return value:</DT>
-       <DD>Zero on sucess, non-zero otherwise.
-</DL>
-
-<!-- ========================================================================= -->
-<A NAME="SFC_SET_RAW_START_OFFSET"></A>
-<H2><BR><B>SFC_SET_RAW_START_OFFSET</B></H2>
-<P>
-Change the data start offset for files opened up as SF_FORMAT_RAW.
-</P>
-<P>
-Parameters:
-<PRE>
-        sndfile  : A valid SNDFILE* pointer
-        cmd      : SFC_SET_RAW_START_OFFSET
-        data     : A pointer to an sf_count_t.
-        datasize : sizeof (sf_count_t)
-</PRE>
-
-<P>
-For a file opened as format SF_FORMAT_RAW, set the data offset to the value
-given by data.
-</P>
-<P>
-Example:
-</P>
-<PRE>
-        /* Reset the data offset to 5 bytes from the start of the file. */
-        sf_count_t  offset = 5 ;
-        sf_command (sndfile, SFC_SET_RAW_START_OFFSET, &amp;offset, sizeof (offset)) ;
-</PRE>
-<DL>
-<DT>Return value:</DT>
-       <DD>Zero on sucess, non-zero otherwise.
-</DL>
-
-<!-- ========================================================================= -->
-
-<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.26
-</P>
-
-</BODY>
-</HTML>
diff --git a/doc/donate.html b/doc/donate.html
new file mode 100644 (file)
index 0000000..c611f47
--- /dev/null
@@ -0,0 +1,112 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+
+<HEAD>
+       <TITLE>
+       libsndfile : donate.
+       </TITLE>
+       <META NAME="Author"      CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
+       <!-- Another version at the bottom of the page.  -->
+       <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/>
+<!-- pepper -->
+<center>
+       <IMG SRC="libsndfile.jpg" HEIGHT=98 WIDTH=367 ALT="libsndfile.jpg">
+</center>
+<!-- pepper -->
+<br/>
+
+<p>
+Dear libsndfile user,
+</p>
+<!-- pepper -->
+<p>
+This library was developed on Linux for Linux. I am not a Windows user and
+maintaining this library for Windows costs me significant amounts of time above
+and beyond the time taken to make it work on Linux and Unix-like systems.
+</p>
+<!-- pepper -->
+<p>
+I therefore ask Windows users of libsndfile to donate to ensure that libsndfile's
+support for Windows continues. As long as donations continue to flow in at a decent
+rate, I will continue to release precompiled Windows binaries in sync with the
+Linux/Unix version. If donations are poor, support for windows will fall behind.
+</p>
+<!-- pepper -->
+
+<p>
+You are free to donate any amount you chose.
+As a guideline:
+</p>
+<!-- pepper -->
+<ul>
+<li>If you are simply a user of libsndfile that would like to ensure that
+       the development of libsndfile continues, a donation of $10US would be more
+       than adequate.
+       </li>
+<li>If you are shareware author that distributes libsndfile with your app and
+       makes more than $1000 a year from your shareware, a one off donation of $50
+       would be appropriate.
+       </li>
+<li>If your company is a commercial software house that distributes one or more
+       products that ship with libsndfile, a donation of $100 every second or third
+       year would be appropriate.
+       </li>
+</ul>
+
+<!-- pepper -->
+<p>
+Donations can be made in Bitcoin to the Bitcoin address
+       <b>15hVWemFiH6DLJ22SBYPk9b4fgWtxBEvfQ</b>
+
+which can be verified by checking the following GPG signature.
+</p>
+
+<pre>
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+libsndfile Bitcoin address : 15hVWemFiH6DLJ22SBYPk9b4fgWtxBEvfQ
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+iQIcBAEBCAAGBQJSK7MUAAoJEEXYQ7zIiotIgXEP/R8hy65tlV7TiPw9bY9BklXS
+/Vl8FU2RhDkBt61ZmxbfDTybyQ5Vce/3wWph15L4RvpoX1OyeintQFmwwuPjOGiq
+eIz0nT9vDorG37Xdo5NZNBu9Tp1Od9MNtxFaAsRWFrDfvKEKljBHrcfM972cYrAp
+DaFd0Ik+bHKom9iQXFB7TFd0w2V4uszVMQDUGqb/vRNeRURZS7ypeMNwc8tZyTKR
+waEGMTa5sxxRjs7MqGRxSovnFT7JV3TNfdkBInUliIR/XvrudFR9J4Fiv+8Dk9P8
+WNjm6uFxvgIqiu1G9bjrwwr+DsBju93ljGNcZoayAKw5vwbX6KTcCbc31k9dP8Hf
+p6YdmPlZVKZmva+P3nLSJBTlxNu24Jm+ha+ZM/svDXTaPFWC8l5FP17kK0Bj8wCq
+N7pDz6RchEn10u+HdhfT1XiUjxj0zNXrr0GGj9apjl0RlT0O49eBttV0oXIdBRLi
+nTEaOWITpCgu7ggw1kWXHIWEncuiaSuJy/iH8PgNepWVj/6PxQRMrTqG4ux2Snk8
+Ua4vO8YHLMZX/XvSUS7eMtgfM7AO6YjJ/ac9bQif9bh6LsYEVVklysMUin6ZRS7Z
+Cms23FnqeQKtJOzdvqSJiV06lK6fP+tYdM4WSYn+AfL4IfYl2v48xXVU8XOOK9BH
+bJPKMDcz1ZvfYtX5mSW1
+=WXGB
+-----END PGP SIGNATURE-----
+</pre>
+
+<p>
+Thanks and regards,
+<br/>
+Erik de Castro Lopo
+<br/>
+Main libsndfile author and maintainer
+</p>
+
+<!-- pepper -->
+
+       <img src=
+       "/cgi-bin/Count.cgi?ft=6|frgb=55;55;55|tr=0|trgb=0;0;0|wxh=15;20|md=6|dd=B|st=1|sh=1|df=libsndfile-donate.dat"
+       HEIGHT=0 WIDTH=0 ALT="">
+
+
+</BODY>
+</HTML>
index f694db5..b802e8f 100644 (file)
@@ -6,7 +6,7 @@
        libsndfile
        </TITLE>
        <META NAME="Author"      CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
-    <META NAME="Version"     CONTENT="libsndfile-1.0.26">
+    <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">
@@ -370,6 +370,10 @@ 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>
@@ -431,22 +435,28 @@ and
 </P>
        <UL>
        <LI>Source code as a .tar.gz :
-                       <A HREF="files/libsndfile-1.0.26.tar.gz">libsndfile-1.0.26.tar.gz</A>
+                       <A HREF="files/libsndfile-1.0.28.tar.gz">libsndfile-1.0.28.tar.gz</A>
                        and
-                       <A HREF="files/libsndfile-1.0.26.tar.gz.asc">(GPG signature)</A>.
+                       <A HREF="files/libsndfile-1.0.28.tar.gz.asc">GPG signature</A>.
        <LI>Win32 installer:
-                       <A HREF="files/libsndfile-1.0.26-w32-setup.exe">
-                       libsndfile-1.0.26-w32-setup.exe</A> (thoroughly tested under
-                       <a href="http://www.winehq.com/">Wine</a> and Windows XP).
+                       <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.26-w64-setup.exe">
-                       libsndfile-1.0.26-w64-setup.exe</A>
-                       (thoroughly tested on 64 bit Windows 7).
+                       <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 Win32 installer was compiled for Windows XP but should also work on Windows
-2000, Vista and Windows 7.
+    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>
diff --git a/doc/libsndfile.css b/doc/libsndfile.css
deleted file mode 100644 (file)
index 6c58e57..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-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 ; }
diff --git a/doc/linux_games_programming.txt b/doc/linux_games_programming.txt
new file mode 100644 (file)
index 0000000..747f59d
--- /dev/null
@@ -0,0 +1,434 @@
+# Here are some some emails I exchanged with a guy trying to use 
+# libsndfile version 1 with code from the book "Linux Games Programming"
+# by John Hall. The email addresses have been changed to foil the spam
+# bots.
+
+Date: Tue, 20 Jul 2004 22:49:21 +0100
+From: Paul <paul@fake-domain-name.co.uk>
+To: erikd@fake-domain-name.com
+Subject: Can you help with a problem?
+Date: Tue, 20 Jul 2004 22:49:21 +0100
+
+Hi,
+
+I'm trying to get the source examples in the "Programming Linux Games" 
+(NoStarch, Loki Software + John R. Hall) which use sndfile.h/libsndfile.
+
+While I can guess some of the newer versions of function calls and 
+enumerations, there are some which I cannot guess.
+
+Would you be able to translate them to the current version of 
+enumeration and function calls so that I can update the source?
+
+These are the three currently failing me:
+
+    sf_open_read(filename, SF_INFO *sfinfo) (guess: sf_open(filename,SFM_READ, &sfinfo))
+    SF_FORMAT_PCM (guess: either SF_FORMAT_PCM_U8 or _RAW)
+    SF_INFO.pcmbitwidth (guess: no idea!)
+
+There are probably more. I'm happy to send you the source files for 
+sound calls, scan the pages or anything else. Failing that, is there 
+somewhere with the changes listed so I can try and fix the code for myself?
+
+Thanks
+
+TTFN
+
+Paul
+
+================================================================================
+
+Date: Wed, 21 Jul 2004 17:38:08 +1000
+From: Erik de Castro Lopo <erikd@fake-domain-name.com>
+To: Paul <paul@fake-domain-name.co.uk>
+Subject: Re: Can you help with a problem?
+
+On Tue, 20 Jul 2004 22:49:21 +0100
+Paul <paul@fake-domain-name.co.uk> wrote:
+
+> Hi,
+> 
+> I'm trying to get the source examples in the "Programming Linux Games" 
+> (NoStarch, Loki Software + John R. Hall) which use sndfile.h/libsndfile.
+> 
+> While I can guess some of the newer versions of function calls and 
+> enumerations, there are some which I cannot guess.
+> 
+> Would you be able to translate them to the current version of 
+> enumeration and function calls so that I can update the source?
+> 
+> These are the three currently failing me:
+> 
+> sf_open_read(filename, SF_INFO *sfinfo) (guess: sf_open(filename, 
+> SFM_READ, &sfinfo))
+
+yes.
+
+> SF_FORMAT_PCM (guess: either SF_FORMAT_PCM_U8 or _RAW)
+
+Actually this list:
+
+    SF_FORMAT_PCM_U8
+    SF_FORMAT_PCM_S8
+    SF_FORMAT_PCM_16
+    SF_FORMAT_PCM_24
+    SF_FORMAT_PCM_32
+
+> SF_INFO.pcmbitwidth (guess: no idea!)
+
+WIth the above change, pcmbitwidth becomes redundant.
+
+> There are probably more. I'm happy to send you the source files for 
+> sound calls, scan the pages or anything else. Failing that, is there 
+> somewhere with the changes listed so I can try and fix the code for
+> myself?
+
+Version 1.0.0 came out some time ago, but I think this:
+
+    http://www.mega-nerd.com/libsndfile/version-1.html
+
+lists most of the changes. You should also look at the API docs:
+
+    http://www.mega-nerd.com/libsndfile/api.html
+
+HTH,
+Erik
+-- 
++-----------------------------------------------------------+
+  Erik de Castro Lopo      nospam@fake-domain-name.com
++-----------------------------------------------------------+
+"There is no reason why anyone would want a computer in their home"
+Ken Olson, DEC, 1977
+
+================================================================================
+
+From: PFJ <paul@fake-domain-name.co.uk>
+To: Erik de Castro Lopo <erikd@fake-domain-name.com>
+Subject: Re: Can you help with a problem?
+Date: Wed, 21 Jul 2004 09:07:39 +0100
+
+
+Hi Erik,
+
+Thanks for getting back to me.
+
+> > sf_open_read(filename, SF_INFO *sfinfo) (guess: sf_open(filename, SFM_READ, &sfinfo))
+>
+> yes.
+
+Yay!
+
+> > SF_FORMAT_PCM (guess: either SF_FORMAT_PCM_U8 or _RAW)
+>
+> Actually this list:
+>
+>     SF_FORMAT_PCM_U8
+>     SF_FORMAT_PCM_S8
+>     SF_FORMAT_PCM_16
+>     SF_FORMAT_PCM_24
+>     SF_FORMAT_PCM_32
+
+I know, but the source code explicitly has SF_FORMAT_PCM which given the
+code afterwards would equate to one of the above, but given that PCM
+files can have a varied bitwidth the author probably wanted to cover all
+bases.
+
+> Version 1.0.0 came out some time ago, but I think this:
+>
+>     http://www.mega-nerd.com/libsndfile/version-1.html
+>
+> lists most of the changes. You should also look at the API docs:
+>
+>     http://www.mega-nerd.com/libsndfile/api.html
+
+I'll download them and see what I can gleen.
+
+Thanks again for getting back to me
+
+TTFN
+
+Paul
+
+================================================================================
+
+Date: Wed, 21 Jul 2004 18:20:29 +1000
+From: Erik de Castro Lopo <erikd@fake-domain-name.com>
+To: PFJ <paul@fake-domain-name.co.uk>
+Subject: Re: Can you help with a problem?
+
+On Wed, 21 Jul 2004 09:07:39 +0100
+PFJ <paul@fake-domain-name.co.uk> wrote:
+
+> I know, but the source code explicitly has SF_FORMAT_PCM which given the
+> code afterwards would equate to one of the above, but given that PCM
+> files can have a varied bitwidth the author probably wanted to cover all
+> bases.
+
+But surely the existing code does something like:
+
+    sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM;
+    sfinfo.pcmbitwidth = 16;
+
+which can be directly translated to:
+
+    sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16;
+
+and the same for pcmbitwitdhs of 24 and 32. For pcmbitwidth of 8
+you need to know that WAV files use SF_FORMAT_PCM_U8 and AIFF
+files use SF_FORMAT_PCM_S8. Thats all there is to it.
+
+Erik
+-- 
++-----------------------------------------------------------+
+  Erik de Castro Lopo      nospam@fake-domain-name.com
++-----------------------------------------------------------+
+"Python addresses true pseudocode's two major failings: that it
+isn't standardized, and it isn't executable."
+- Grant R. Griffin  in comp.dsp
+
+================================================================================
+
+Subject: Re: Can you help with a problem?
+From: PFJ <paul@fake-domain-name.co.uk>
+To: Erik de Castro Lopo <erikd@fake-domain-name.com>
+Date: Wed, 21 Jul 2004 09:50:55 +0100
+
+Hi Erik,
+
+> > I know, but the source code explicitly has SF_FORMAT_PCM which given the
+> > code afterwards would equate to one of the above, but given that PCM
+> > files can have a varied bitwidth the author probably wanted to cover all
+> > bases.
+>
+> But surely the existing code does something like:
+>
+>     sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM;
+>     sfinfo.pcmbitwidth = 16;
+
+If only!
+
+The actual code is this
+
+int LoadSoundFile(char *filename, sound_p sound)
+{
+    SNDFILE *file;
+    SF_INFO file_info;
+    short *buffer_short = NULL;
+    u_int8_t *buffer_8 = NULL;
+    int16_t *buffer_16 = NULL;
+    unsigned int i;
+
+    /* Open the file and retrieve sample information. */
+    file = sf_open_read(filename, &file_info);
+    // I've sorted this one already - PFJ
+
+    /* Make sure the format is acceptable. */
+    if ((file_info.format & 0x0F) != SF_FORMAT_PCM) {
+               printf("'%s' is not a PCM-based audio file.\n", filename);
+               sf_close(file);
+               return -1;
+    }
+
+    if ((file_info.pcmbitwidth == 8) && (file_info.channels == 1)) {
+               sound->format = AL_FORMAT_MONO8;
+    } else if ((file_info.pcmbitwidth == 8) && (file_info.channels == 2)) {
+               sound->format = AL_FORMAT_STEREO8;
+    } else if ((file_info.pcmbitwidth == 16) && (file_info.channels == 1)) {
+               sound->format = AL_FORMAT_MONO16;
+    } else if ((file_info.pcmbitwidth == 16) && (file_info.channels == 2)) {
+               sound->format = AL_FORMAT_STEREO16;
+    } else {
+               printf("Unknown sample format in %s.\n", filename);
+               sf_close(file);
+               return -1;
+    }
+
+    /* Allocate buffers. */
+    buffer_short = (short *)malloc(file_info.samples * file_info.channels * sizeof (short));
+
+    buffer_8 = (u_int8_t *)malloc(file_info.samples * file_info.channels * file_info.pcmbitwidth / 8);
+
+    buffer_16 = (int16_t *)buffer_8;
+
+    if (buffer_short == NULL || buffer_8 == NULL) {
+               printf("Unable to allocate enough memory for '%s'.\n", filename);
+               goto error_cleanup;
+    }
+
+    /* Read the entire sound file. */
+    if (sf_readf_short(file,buffer_short,file_info.samples) == (size_t)-1) {
+               printf("Error while reading samples from '%s'.\n", filename);
+               goto error_cleanup;
+    }
+
+<minor snip>
+
+    /* Fill in the sound data structure. */
+    sound->freq = file_info.samplerate;
+    sound->size = file_info.samples * file_info.channels * file_info.pcmbitwidth / 8;
+
+    /* Give our sound data to OpenAL. */
+    alGenBuffers(1, &sound->name);
+    if (alGetError() != AL_NO_ERROR) {
+               printf("Error creating an AL buffer name for %s.\n", filename);
+               goto error_cleanup;
+    }
+
+    alBufferData(sound->name, sound->format, buffer_8, sound->size,sound->freq);
+    if (alGetError() != AL_NO_ERROR) {
+               printf("Error sending buffer data to OpenAL for %s.\n", filename);
+               goto error_cleanup;
+    }
+
+    /* Close the file and return success. */
+    sf_close(file);
+    free(buffer_short);
+    free(buffer_8);
+
+    return 0;
+
+ error_cleanup:
+    if (file != NULL) fclose(file);
+    free(buffer_short);
+    free(buffer_8);
+    return -1;
+}
+
+As you can see, the PCM material in the listing will not currently
+compile and for the other sndfile material, it probably won't either.
+
+Any help would be appreciated.
+
+TTFN
+
+Paul
+
+================================================================================
+
+From: Erik de Castro Lopo <erikd@fake-domain-name.com>
+To: PFJ <paul@fake-domain-name.co.uk>
+Subject: Re: Can you help with a problem?
+Date: Wed, 21 Jul 2004 19:36:46 +1000
+
+On Wed, 21 Jul 2004 09:50:55 +0100
+PFJ <paul@fake-domain-name.co.uk> wrote:
+
+> Hi Erik,
+> 
+> > > I know, but the source code explicitly has SF_FORMAT_PCM which given the
+> > > code afterwards would equate to one of the above, but given that PCM
+> > > files can have a varied bitwidth the author probably wanted to cover all
+> > > bases.
+> > 
+> > But surely the existing code does something like:
+> > 
+> >     sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM;
+> >     sfinfo.pcmbitwidth = 16;
+> 
+> If only!
+
+No, really.
+
+Drop this completely:
+
+>     /* Make sure the format is acceptable. */
+>     if ((file_info.format & 0x0F) != SF_FORMAT_PCM) {
+>      printf("'%s' is not a PCM-based audio file.\n", filename);
+>      sf_close(file);
+>      return -1;
+>     }
+
+Replace this block:
+
+>     if ((file_info.pcmbitwidth == 8) && (file_info.channels == 1)) {
+>              sound->format = AL_FORMAT_MONO8;
+>     } else if ((file_info.pcmbitwidth == 8) && (file_info.channels == 2)) {
+>           sound->format = AL_FORMAT_STEREO8;
+>     } else if ((file_info.pcmbitwidth == 16) && (file_info.channels == 1)) {
+>           sound->format = AL_FORMAT_MONO16;
+>     } else if ((file_info.pcmbitwidth == 16) && (file_info.channels == 2)) {
+>           sound->format = AL_FORMAT_STEREO16;
+>     } else {
+>           printf("Unknown sample format in %s.\n", filename);
+>           sf_close(file);
+>           return -1;
+>     }
+
+with:
+
+    int pcmbitwidth = 0;
+
+    if (file_info.format & SF_FORMAT_SUBMASK != SF_FORMAT_PCM_16)
+    {  printf("'%s' is not a PCM-based audio file.\n", filename);
+        sf_close(file);
+        return -1;
+        }
+
+    if (file_info.channels < 1 || file_info.channels > 2)
+    {  printf("'%s' bad channel count.\n", filename);
+        sf_close(file);
+        return -1;
+        }
+
+    switch (file_info.format & SF_FORMAT_SUBMASK + file_info.channels << 16)
+    {    case (SF_FORMAT_PCM_U8 + 1 << 16):
+             sound->format = AL_FORMAT_MONO8;
+             pcmbitwidth = 8;
+             break;
+         case (SF_FORMAT_PCM_U8 + 2 << 16):
+             sound->format = AL_FORMAT_STEREO8;
+             pcmbitwidth = 8;
+             break;
+         case (SF_FORMAT_PCM_16 + 1 << 16):
+             sound->format = AL_FORMAT_MONO16;
+             pcmbitwidth = 16;
+             break;
+         case (SF_FORMAT_PCM_16 + 2 << 16):
+             sound->format = AL_FORMAT_STEREO16;
+             pcmbitwidth = 16;
+             break;
+         default:
+             printf("Unknown sample format in %s.\n", filename);
+             sf_close(file);
+             return -1;
+         }
+
+>     /* Allocate buffers. */
+>     buffer_short = (short *)malloc(file_info.samples *
+>                                 file_info.channels * 
+>                                 sizeof (short));
+> 
+>     buffer_8 = (u_int8_t *)malloc(file_info.samples *
+>                                file_info.channels *
+>                                file_info.pcmbitwidth / 8);
+
+Use pcmbitwidth as calculated above.
+
+>     buffer_16 = (int16_t *)buffer_8;
+> 
+>     if (buffer_short == NULL || buffer_8 == NULL) {
+>      printf("Unable to allocate enough memory for '%s'.\n", filename);
+>      goto error_cleanup;
+>     }
+> 
+>     /* Read the entire sound file. */
+>     if (sf_readf_short(file,buffer_short,file_info.samples) == (size_t)- 1) {
+
+Replace "(size_t) - 1" with " < 0".
+
+> As you can see, the PCM material in the listing will not currently
+> compile and for the other sndfile material, it probably won't either.
+
+None of the changes above should have been very difficult to figure
+out.
+
+Erik
+-- 
++-----------------------------------------------------------+
+  Erik de Castro Lopo      nospam@fake-domain-name.com
++-----------------------------------------------------------+
+Microsoft is finally bringing all of its Windows operating system families
+under one roof. It will combine all of the features of CE, stability and
+support of ME and the speed of NT.
+It will be called Windows CEMENT...
+
diff --git a/doc/print.css b/doc/print.css
new file mode 100644 (file)
index 0000000..deb5b13
--- /dev/null
@@ -0,0 +1,14 @@
+body {
+       background:white;
+       color:black;
+}
+
+h1{
+       background:white;
+       color:black;
+}
+
+h2 {
+       background:white;
+       color:#666;
+}
index 2a90516..f342c78 100644 (file)
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-noinst_PROGRAMS = make_sine sfprocess list_formats generate sndfilehandle \
+check_PROGRAMS = make_sine sfprocess list_formats generate sndfilehandle \
        sndfile-to-text sndfile-loopify
 
 AM_CPPFLAGS = -I$(top_srcdir)/src
diff --git a/examples/Makefile.in b/examples/Makefile.in
deleted file mode 100644 (file)
index adaa641..0000000
+++ /dev/null
@@ -1,763 +0,0 @@
-# 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@
-noinst_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/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)/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 =
-PROGRAMS = $(noinst_PROGRAMS)
-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@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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-noinstPROGRAMS:
-       @list='$(noinst_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
-check: check-am
-all-am: Makefile $(PROGRAMS)
-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-generic clean-libtool clean-noinstPROGRAMS \
-       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: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-noinstPROGRAMS 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:
diff --git a/examples/generate.cs b/examples/generate.cs
new file mode 100644 (file)
index 0000000..1817856
--- /dev/null
@@ -0,0 +1,250 @@
+/* (c) 2004 James Robson, http://www.arbingersys.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.
+**
+** ****************************
+**
+** How to use:
+**    - libsndfile.dll must have already been compiled and be in this
+**      application's search path
+**
+**    - You must edit this file to point to the file you want to convert. Set
+**     the following line of code (found in the Main() function further below)
+**     to the name of a .WAV file that exists on your system.
+**             186:    string sfn = "input.wav";
+**
+**    - From a command prompt type
+**             csc generate.cs
+**
+**    - Run the resulting executable 'generate.exe'
+**
+**
+** Note: You will obviously need the csc compiler and the .NET runtime. I think
+**      these are freely available for download from Microsoft's website
+**      (part of the .NET SDK?).
+*/
+
+
+using System;
+using System.Runtime.InteropServices;
+using sf_count_t = System.Int64;       //alias; see SF_INFO struct
+
+#if PLATFORM_64
+using size_t = System.UInt64;
+#else
+using size_t = System.UInt32;
+#endif
+
+
+class lsndf_example {
+
+
+//sound file formats
+       public enum lsndf_frmts {
+               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 */
+
+               /* 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 / Dialogix ADPCM */
+
+               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) */
+
+
+               /* 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
+       }
+
+
+//modes and other
+       public enum lsndf_tf
+       {       /* True and false */
+               SF_FALSE        = 0,
+               SF_TRUE         = 1,
+
+               /* Modes for opening files. */
+               SFM_READ        = 0x10,
+               SFM_WRITE       = 0x20,
+               SFM_RDWR        = 0x30
+       }
+
+
+//important SF_INFO structure
+       [StructLayout(LayoutKind.Sequential)]
+       public struct SF_INFO
+       {
+               public sf_count_t       frames ;                // Used to be called samples.  Changed to avoid confusion.
+               public int                      samplerate ;
+               public int                      channels ;
+               public int                      format ;
+               public int                      sections ;
+               public int                      seekable ;
+       };
+
+
+//function declarations
+//Note: Not all functions have been prototyped here. Only the ones necessary to
+//     make this application work. The below code should give some clues as to
+//     how to add the rest since they have a lot of parameter and return type
+//     similarities.
+       [DllImport("libsndfile.dll")]
+       public static extern IntPtr sf_open ([MarshalAs(UnmanagedType.LPStr)] string path, int mode, ref SF_INFO sfinfo);
+
+       [DllImport("libsndfile.dll")]
+       static extern int sf_error (IntPtr sndfile);
+
+       [DllImport("libsndfile.dll")]
+       static extern IntPtr sf_strerror (IntPtr sndfile);
+
+       [DllImport("libsndfile.dll")]
+       static extern int sf_format_check (ref SF_INFO info);
+
+       [DllImport("libsndfile.dll")]
+       static extern sf_count_t sf_read_float  (IntPtr sndfile, float[] ptr, sf_count_t items);
+
+       [DllImport("libsndfile.dll")]
+       static extern sf_count_t sf_write_float (IntPtr sndfile, float[] ptr, sf_count_t items);
+
+       [DllImport("libsndfile.dll")]
+    static extern int sf_close (IntPtr sndfile);
+
+
+       public const sf_count_t BUFFER_LEN = 4096;
+
+
+//program entry
+       static void Main(  ) {
+
+
+//declarations
+               SF_INFO sfinfo = new SF_INFO();
+               float[] buffer = new float[BUFFER_LEN];
+               sf_count_t rcnt;
+
+//set the input file
+               string sfn = "input.wav";       //set to a file on YOUR system
+               //string sfn = "noexist.wav";   //test with non-existent file
+
+//set the output file
+               string ofn = "output.wav";
+
+//read in sound file to convert
+               IntPtr infile = sf_open (sfn, (int)lsndf_tf.SFM_READ, ref sfinfo);
+
+//exit if error was thrown
+               if ( (int)infile == 0 ) {
+                       Console.WriteLine("Error opening " + sfn);
+                       Console.WriteLine("Error #" + sf_error(infile));
+                       return;
+               }
+
+//set the file type for the output file
+//uncomment one and only one of the statements below to change the output
+//file encoding.
+               //sfinfo.format = (int)(lsndf_frmts.SF_FORMAT_WAV | lsndf_frmts.SF_FORMAT_PCM_U8);
+               //sfinfo.format = (int)(lsndf_frmts.SF_FORMAT_WAV | lsndf_frmts.SF_FORMAT_PCM_16);
+               //sfinfo.format = (int)(lsndf_frmts.SF_FORMAT_WAV | lsndf_frmts.SF_FORMAT_MS_ADPCM);
+               sfinfo.format = (int)(lsndf_frmts.SF_FORMAT_WAV | lsndf_frmts.SF_FORMAT_IMA_ADPCM);
+               //sfinfo.format = (int)(lsndf_frmts.SF_FORMAT_WAV | lsndf_frmts.SF_FORMAT_GSM610);
+               /* Soundforge W64. */
+               //sfinfo.format = (int)(lsndf_frmts.SF_FORMAT_W64 | lsndf_frmts.SF_FORMAT_PCM_U8);
+               //sfinfo.format = (int)(lsndf_frmts.SF_FORMAT_W64 | lsndf_frmts.SF_FORMAT_PCM_16);
+               //sfinfo.format = (int)(lsndf_frmts.SF_FORMAT_W64 | lsndf_frmts.SF_FORMAT_MS_ADPCM);
+               //sfinfo.format = (int)(lsndf_frmts.SF_FORMAT_W64 | lsndf_frmts.SF_FORMAT_IMA_ADPCM);
+               //sfinfo.format = (int)(lsndf_frmts.SF_FORMAT_W64 | lsndf_frmts.SF_FORMAT_GSM610);
+
+
+//check that SF_INFO is valid
+               if ( sf_format_check(ref sfinfo) == 0 ) {
+                       Console.WriteLine("sf_format_check failed. Invalid encoding");
+                       return;
+               }
+
+//open output file
+               IntPtr outfile = sf_open (ofn, (int)lsndf_tf.SFM_WRITE, ref sfinfo);
+
+//exit if error was thrown
+               if ( (int)outfile == 0 ) {
+                       Console.WriteLine("Error opening " + ofn);
+                       Console.WriteLine("Error #" + sf_error(outfile));
+                       return;
+               }
+
+//infile -> outfile
+               Console.Write(sfn + " -> " + ofn);
+               while ( (rcnt = sf_read_float (infile, buffer, BUFFER_LEN)) > 0) {
+                       Console.Write(".");
+                       sf_write_float (outfile, buffer, BUFFER_LEN);
+               }
+               Console.WriteLine("done.");
+
+//close up shop
+               sf_close(infile);
+               sf_close(outfile);
+
+
+       } //main()
+
+
+} //class lsndf_example {}
+
index 466bb86..d5d0ec9 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 **
 ** All rights reserved.
 **
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
+#include <float.h>
 
 #include <sndfile.h>
 
-#define        BLOCK_SIZE 512
+#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 <input file> <output file>\n", 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"
@@ -50,14 +61,20 @@ print_usage (char *progname)
 } /* print_usage */
 
 static void
-convert_to_text (SNDFILE * infile, FILE * outfile, int channels)
-{      float buf [channels * BLOCK_SIZE] ;
+convert_to_text (SNDFILE * infile, FILE * outfile, int channels, int full_precision)
+{      float buf [BLOCK_SIZE] ;
+       sf_count_t frames ;
        int k, m, readcount ;
 
-       while ((readcount = sf_readf_float (infile, buf, BLOCK_SIZE)) > 0)
+       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++)
-                               fprintf (outfile, " % 12.10f", buf [k * 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") ;
                        } ;
                } ;
@@ -71,13 +88,24 @@ main (int argc, char * argv [])
        SNDFILE         *infile = NULL ;
        FILE            *outfile = NULL ;
        SF_INFO         sfinfo ;
+       int             full_precision = 0 ;
 
        progname = strrchr (argv [0], '/') ;
        progname = progname ? progname + 1 : argv [0] ;
 
-       if (argc != 3)
-       {       print_usage (progname) ;
-               return 1 ;
+       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] ;
@@ -118,7 +146,7 @@ main (int argc, char * argv [])
        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) ;
+       convert_to_text (infile, outfile, sfinfo.channels, full_precision) ;
 
        sf_close (infile) ;
        fclose (outfile) ;
diff --git a/make_lite.py b/make_lite.py
new file mode 100644 (file)
index 0000000..eee69fc
--- /dev/null
@@ -0,0 +1,491 @@
+#!/usr/bin/python
+
+import commands, os, re, string, sys, time
+
+def count_enclosed_functions (source):
+       func_count = 0
+       open_brace = 0
+       close_brace = 0
+       for ch in source:
+               if ch == '{':
+                       open_brace += 1
+               elif ch == '}':
+                       close_brace += 1
+                       if open_brace == close_brace:
+                               func_count += 1
+               if open_brace < close_brace:
+                       print "count_enclosed_functions : open_brace < close_brace"
+                       return -1
+       return func_count
+
+def find_function_prototype (source, proto_name):
+       proto_re = "(^[a-zA-Z_ \t]+\s+%s[^a-zA-Z0-9_]\s*\([^\)]+\)\s+;\n)" % (proto_name)
+       proto_result = re.search (proto_re, source, re.MULTILINE | re.DOTALL)
+       if not proto_result:
+               return None
+       proto_text = proto_result.groups ()[0]
+       return proto_text
+
+def find_function_definition (source, func_name):
+       func_re = "(\n[a-zA-Z_ \t]+\n%s[^a-zA-Z0-9_].* /\* %s \*/\n)" % (func_name, func_name)
+       func_result = re.search (func_re, source, re.MULTILINE | re.DOTALL)
+       if not func_result:
+               sys.exit (1)
+               return None
+       func_text = func_result.groups ()[0]
+
+       # Now to check that we only have one enclosing function.
+       func_count = count_enclosed_functions (func_text)
+       if func_count != 1:
+               return None
+       return func_text
+
+def find_include (source, inc_name):
+       inc_re = "(^#include\s+[\<\"]%s[\"\>]\s*)" % inc_name
+       inc_result = re.search (inc_re, source, re.MULTILINE | re.DOTALL)
+       if not inc_result:
+               return None
+       inc_text = inc_result.groups ()[0]
+       return inc_text
+
+def find_assign_statement (source, var_name):
+       var_re = "(^\s+%s\s*=[^;]+;)" % var_name
+       var_result = re.search (var_re, source, re.MULTILINE | re.DOTALL)
+       if not var_result:
+               return None
+       assign_text = var_result.groups ()[0]
+       return assign_text
+
+#--------------------------------------------------------------------------------
+
+def remove_include (source, inc_name):
+       inc_text = find_include (source, inc_name)
+       if not inc_text:
+               print "remove_include : include '%s' not found. Exiting." % inc_name
+               sys.exit (1)
+
+       source = string.replace (source, inc_text, "")
+       return source
+
+def remove_assign (source, assign_name):
+       assign_text = find_assign (source, inc_name)
+       if not inc_text:
+               print "remove_include : include '%s' not found. Exiting." % inc_name
+               sys.exit (1)
+
+       source = string.replace (source, inc_text, "")
+       return source
+
+def remove_prototype (source, proto_name):
+       proto_text = find_function_prototype (source, proto_name)
+       if not proto_text:
+               print "remove_prototype : prototype '%s' not found. Exiting." % proto_name
+               sys.exit (1)
+
+       source = string.replace (source, proto_text, "")
+       return source
+
+def remove_function (source, func_name):
+       func_text = find_function_definition (source, func_name)
+       if not func_text:
+               print "remove_function : function '%s' not found. Exiting." % func_name
+               sys.exit (1)
+
+       source = string.replace (source, func_text, "/* Function %s() removed here. */\n" % func_name)
+       return source
+
+def remove_all_assignments (source, var):
+       count = 0
+       while 1:
+               assign_text = find_assign_statement (source, var)
+               if not assign_text:
+                       if count != 0:
+                               break
+                       print "remove_all_assignments : variable '%s' not found. Exiting." % var
+                       sys.exit (1)
+
+               source = string.replace (source, assign_text, "")
+               count += 1
+       return source
+
+
+
+#----------------------------------------------------------------
+
+def remove_funcs_and_protos_from_file (filename, func_list):
+       source_code = open (filename, 'r').read ()
+
+       for func in func_list:
+               source_code = remove_prototype (source_code, func) ;
+               source_code = remove_function (source_code, func) ;
+       open (filename, 'w').write (source_code)
+
+def remove_funcs_from_file (filename, func_list):
+       source_code = open (filename, 'r').read ()
+
+       for func in func_list:
+               source_code = remove_function (source_code, func) ;
+       open (filename, 'w').write (source_code)
+
+def remove_protos_from_file (filename, func_list):
+       source_code = open (filename, 'r').read ()
+
+       for func in func_list:
+               source_code = remove_prototype (source_code, func) ;
+       open (filename, 'w').write (source_code)
+
+def remove_includes_from_file (filename, inc_list):
+       source_code = open (filename, 'r').read ()
+
+       for inc in inc_list:
+               source_code = remove_include (source_code, inc) ;
+       open (filename, 'w').write (source_code)
+
+def remove_all_assignments_from_file (filename, var_list):
+       source_code = open (filename, 'r').read ()
+
+       for var in var_list:
+               source_code = remove_all_assignments (source_code, var) ;
+       open (filename, 'w').write (source_code)
+
+def remove_comment_start_end (filename, start_comment, end_comment):
+       source_code = open (filename, 'r').read ()
+
+       while 1:
+               start_index = string.find (source_code, start_comment)
+               end_index = string.find (source_code, end_comment)
+               if start_index < 0 or end_index < start_index:
+                       break
+               end_index += len (end_comment)
+               source_code = source_code [:start_index-1] + source_code [end_index:] ;
+
+       open (filename, 'w').write (source_code)
+
+def remove_strings_from_file (filename, str_list):
+       file_text = open (filename, 'r').read ()
+       for current_str in str_list:
+               file_text = string.replace (file_text, current_str, '')
+       open (filename, 'w').write (file_text)
+
+def string_replace_in_file (filename, from_str, to_str):
+       file_text = open (filename, 'r').read ()
+       file_text = string.replace (file_text, from_str, to_str)
+       open (filename, 'w').write (file_text)
+
+def remove_regex_from_file (filename, regex_list):
+       file_text = open (filename, 'r').read ()
+       for regex in regex_list:
+               file_text = re.sub (regex, '', file_text, re.MULTILINE | re.DOTALL)
+       open (filename, 'w').write (file_text)
+
+#==========================================================================
+
+def find_configure_version (filename):
+       # AM_INIT_AUTOMAKE(libsndfile,0.0.21pre6)
+       file = open (filename)
+       while 1:
+               line = file.readline ()
+               if re.search ("AC_INIT", line):
+                       x = re.sub ("[^\(]+\(", "", line)
+                       x = re.sub ("\).*\n", "", x)
+                       x = string.split (x, ",")
+                       package = x [0]
+                       version = x [1]
+                       break
+       file.close ()
+       # version = re.escape (version)
+       return package, version
+
+def fix_configure_ac_file (filename):
+       data = open (filename, 'r').read ()
+       data = string.replace (data, "AM_INIT_AUTOMAKE(libsndfile,", "AM_INIT_AUTOMAKE(libsndfile_lite,", 1)
+
+       file = open (filename, 'w')
+       file.write (data)
+       file.close ()
+
+
+def make_dist_file (package, version):
+       print "Making dist file."
+       tar_gz_file = "%s-%s.tar.gz" % (package, version)
+       if os.path.exists (tar_gz_file):
+               return
+       if os.system ("make dist"):
+               sys.exit (1)
+       return
+
+def delete_files (file_list):
+       for file_name in file_list:
+               os.remove (file_name)
+
+#=======================================================================
+
+source_dir = os.getcwd ()
+
+conf_package, conf_version =  find_configure_version ('configure.ac')
+
+package_version = "%s-%s" % (conf_package, conf_version)
+lite_version = "%s_lite-%s" % (conf_package, conf_version)
+
+os.system ("rm -rf %s%s.tar.gz" % (source_dir, package_version))
+
+os.system ("make dist")
+
+make_dist_file (conf_package, conf_version)
+
+os.chdir ("/tmp")
+
+print "Uncompressing .tar.gz file."
+os.system ("rm -rf %s" % package_version)
+if os.system ("tar zxf %s/%s.tar.gz" % (source_dir, package_version)):
+       sys.exit (1)
+
+
+print "Renaming to libsndfile_lite."
+os.system ("rm -rf %s" % lite_version)
+os.rename (package_version, lite_version)
+
+print "Changing into libsndfile_lite directory."
+os.chdir (lite_version)
+
+print "Removing un-neeed directories."
+delete_dirs = [ 'src/G72x' ]
+
+for dir_name in delete_dirs:
+       os.system ("rm -rf %s" % dir_name)
+
+print "Removing un-needed files."
+delete_files ([ 'src/ircam.c', 'src/nist.c',
+       'src/ima_adpcm.c', 'src/ms_adpcm.c', 'src/au_g72x.c',
+       'src/mat4.c', 'src/mat5.c', 'src/dwvw.c', 'src/paf.c',
+       'src/ogg.c', 'src/pvf.c', 'src/xi.c', 'src/htk.c',
+       'src/sd2.c', 'src/rx2.c', 'src/txw.c', 'src/wve.c',
+       'src/dwd.c', 'src/svx.c', 'src/voc.c', 'src/vox_adpcm.c',
+       'src/sds.c'
+       ])
+
+
+print "Hacking 'configure.ac' and 'src/Makefile.am'."
+remove_strings_from_file ('configure.ac', [ 'src/G72x/Makefile' ])
+remove_strings_from_file ('src/Makefile.am', [ 'G72x/libg72x.la', 'G72x',
+               'ircam.c', 'nist.c', 'ima_adpcm.c', 'ms_adpcm.c', 'au_g72x.c', 'mat4.c', 
+               'mat5.c', 'dwvw.c',  'paf.c', 'ogg.c', 'pvf.c', 'xi.c', 'htk.c', 
+               'sd2.c', 'rx2.c', 'txw.c', 'wve.c', 'dwd.c', 'svx.c', 'voc.c', 
+               'vox_adpcm.c', 'sds.c'
+               ])
+
+#----------------------------------------------------------------------------
+
+print "Hacking header files."
+
+remove_protos_from_file ('src/common.h', [     'xi_open', 'sd2_open', 'ogg_open',
+       'dwvw_init', 'paf_open', 'svx_open', 'nist_open', 'rx2_open', 'mat4_open',
+       'voc_open', 'txw_open', 'dwd_open', 'htk_open', 'wve_open', 'mat5_open',
+       'pvf_open', 'ircam_open', 'sds_open',
+       'float32_init', 'double64_init', 'aiff_ima_init', 'vox_adpcm_init',
+       'wav_w64_ima_init', 'wav_w64_msadpcm_init'
+       ])
+
+remove_protos_from_file ('src/au.h',
+               [ 'au_g72x_reader_init', 'au_g72x_writer_init' ])
+
+remove_protos_from_file ('src/wav_w64.h', [ 'msadpcm_write_adapt_coeffs' ])
+
+#----------------------------------------------------------------------------
+
+print "Hacking case statements."
+
+remove_comment_start_end ('src/sndfile.c', '/* Lite remove start */' , '/* Lite remove end */')
+remove_comment_start_end ('src/aiff.c', '/* Lite remove start */' , '/* Lite remove end */')
+remove_comment_start_end ('src/au.c', '/* Lite remove start */' , '/* Lite remove end */')
+remove_comment_start_end ('src/raw.c', '/* Lite remove start */' , '/* Lite remove end */')
+remove_comment_start_end ('src/w64.c', '/* Lite remove start */' , '/* Lite remove end */')
+remove_comment_start_end ('src/wav.c', '/* Lite remove start */' , '/* Lite remove end */')
+remove_comment_start_end ('src/double64.c', '/* Lite remove start */' , '/* Lite remove end */')
+remove_comment_start_end ('src/float32.c', '/* Lite remove start */' , '/* Lite remove end */')
+
+
+#----------------------------------------------------------------------------
+
+print "Hacking src/pcm.c."
+remove_funcs_from_file ('src/pcm.c', [
+       'f2sc_array', 'f2sc_clip_array', 'f2uc_array', 'f2uc_clip_array',
+       'f2bes_array', 'f2bes_clip_array', 'f2les_array', 'f2les_clip_array',
+       'f2let_array', 'f2let_clip_array', 'f2bet_array', 'f2bet_clip_array',
+       'f2bei_array', 'f2bei_clip_array', 'f2lei_array', 'f2lei_clip_array',
+       'd2sc_array', 'd2sc_clip_array', 'd2uc_array', 'd2uc_clip_array',
+       'd2bes_array', 'd2bes_clip_array', 'd2les_array', 'd2les_clip_array',
+       'd2let_array', 'd2let_clip_array', 'd2bet_array', 'd2bet_clip_array',
+       'd2bei_array', 'd2bei_clip_array', 'd2lei_array', 'd2lei_clip_array',
+       ])
+
+remove_funcs_and_protos_from_file ('src/pcm.c', [
+       'pcm_read_sc2f', 'pcm_read_uc2f', 'pcm_read_les2f', 'pcm_read_bes2f',
+       'pcm_read_let2f', 'pcm_read_bet2f', 'pcm_read_lei2f', 'pcm_read_bei2f',
+       'pcm_read_sc2d', 'pcm_read_uc2d', 'pcm_read_les2d', 'pcm_read_bes2d',
+       'pcm_read_let2d', 'pcm_read_bet2d', 'pcm_read_lei2d', 'pcm_read_bei2d',
+       'pcm_write_f2sc', 'pcm_write_f2uc', 'pcm_write_f2bes', 'pcm_write_f2les',
+       'pcm_write_f2bet', 'pcm_write_f2let', 'pcm_write_f2bei', 'pcm_write_f2lei',
+       'pcm_write_d2sc', 'pcm_write_d2uc', 'pcm_write_d2bes', 'pcm_write_d2les',
+       'pcm_write_d2bet', 'pcm_write_d2let', 'pcm_write_d2bei', 'pcm_write_d2lei',
+
+       'sc2f_array', 'uc2f_array', 'bes2f_array', 'les2f_array',
+       'bet2f_array', 'let2f_array', 'bei2f_array', 'lei2f_array',
+       'sc2d_array', 'uc2d_array', 'bes2d_array', 'les2d_array',
+       'bet2d_array', 'let2d_array', 'bei2d_array', 'lei2d_array'
+       ])
+
+remove_includes_from_file ('src/pcm.c', [ 'float_cast.h' ])
+remove_all_assignments_from_file ('src/pcm.c', [
+       'psf-\>write_float', 'psf\-\>write_double',
+       'psf-\>read_float', 'psf\-\>read_double' ])
+
+#----------------------------------------------------------------------------
+print "Hacking src/ulaw.c."
+remove_funcs_and_protos_from_file ('src/ulaw.c', [
+       'ulaw_read_ulaw2f', 'ulaw_read_ulaw2d',
+       'ulaw_write_f2ulaw', 'ulaw_write_d2ulaw',
+       'ulaw2f_array', 'ulaw2d_array', 'f2ulaw_array', 'd2ulaw_array'
+       ])
+
+remove_includes_from_file ('src/ulaw.c', [ 'float_cast.h' ])
+remove_all_assignments_from_file ('src/ulaw.c', [
+       'psf-\>write_float', 'psf\-\>write_double',
+       'psf-\>read_float', 'psf\-\>read_double' ])
+
+#----------------------------------------------------------------------------
+
+print "Hacking src/alaw.c."
+remove_funcs_and_protos_from_file ('src/alaw.c', [
+       'alaw_read_alaw2f', 'alaw_read_alaw2d',
+       'alaw_write_f2alaw', 'alaw_write_d2alaw',
+       'alaw2f_array', 'alaw2d_array', 'f2alaw_array', 'd2alaw_array'
+       ])
+
+remove_includes_from_file ('src/alaw.c', [ 'float_cast.h' ])
+remove_all_assignments_from_file ('src/alaw.c', [
+       'psf-\>write_float', 'psf\-\>write_double',
+       'psf-\>read_float', 'psf\-\>read_double' ])
+
+#----------------------------------------------------------------------------
+
+print "Hacking src/gsm610.c."
+remove_funcs_and_protos_from_file ('src/gsm610.c', [
+       'gsm610_read_f', 'gsm610_read_d', 'gsm610_write_f', 'gsm610_write_d'
+       ])
+
+remove_includes_from_file ('src/gsm610.c', [ 'float_cast.h' ])
+remove_all_assignments_from_file ('src/gsm610.c', [
+       'psf-\>write_float', 'psf\-\>write_double',
+       'psf-\>read_float', 'psf\-\>read_double' ])
+
+#----------------------------------------------------------------------------
+
+print "Hacking src/float32.c."
+
+# string_replace_in_file ('src/float32.c', '"float_cast.h"', '<math.h>')
+remove_funcs_from_file ('src/float32.c', [ 'float32_init'      ])
+
+remove_funcs_and_protos_from_file ('src/float32.c', [
+       'host_read_f2s', 'host_read_f2i', 'host_read_f', 'host_read_f2d', 
+       'host_write_s2f', 'host_write_i2f', 'host_write_f', 'host_write_d2f', 
+       'f2s_array', 'f2i_array', 'f2d_array', 's2f_array', 'i2f_array', 'd2f_array', 
+       'float32_peak_update', 
+       'replace_read_f2s', 'replace_read_f2i', 'replace_read_f', 'replace_read_f2d', 
+       'replace_write_s2f', 'replace_write_i2f', 'replace_write_f', 'replace_write_d2f', 
+       'bf2f_array', 'f2bf_array', 
+       'float32_get_capability', 
+       ])
+
+#----------------------------------------------------------------------------
+
+print "Hacking src/double64.c."
+remove_funcs_from_file ('src/double64.c', [ 'double64_init'    ])
+
+remove_funcs_and_protos_from_file ('src/double64.c', [
+       'host_read_d2s', 'host_read_d2i', 'host_read_d2f', 'host_read_d',
+       'host_write_s2d', 'host_write_i2d', 'host_write_f2d', 'host_write_d',
+       'd2s_array', 'd2i_array', 'd2f_array',
+       's2d_array', 'i2d_array', 'f2d_array',
+       'double64_peak_update', 'double64_get_capability',
+       'replace_read_d2s', 'replace_read_d2i', 'replace_read_d2f', 'replace_read_d',
+       'replace_write_s2d', 'replace_write_i2d', 'replace_write_f2d', 'replace_write_d',
+       'd2bd_read', 'bd2d_write'
+       ])
+
+#----------------------------------------------------------------------------
+
+print "Hacking test programs."
+delete_files ([ 'tests/dwvw_test.c', 'tests/floating_point_test.c', 
+       'tests/dft_cmp.c', 'tests/peak_chunk_test.c',
+       'tests/scale_clip_test.tpl', 'tests/scale_clip_test.def'
+       ])
+
+remove_comment_start_end ('tests/write_read_test.def', '/* Lite remove start */', '/* Lite remove end */')
+remove_comment_start_end ('tests/write_read_test.tpl', '/* Lite remove start */', '/* Lite remove end */')
+
+remove_comment_start_end ('tests/Makefile.am', '# Lite remove start', '# Lite remove end')
+
+remove_strings_from_file ('tests/Makefile.am', [ 
+       'scale_clip_test.tpl', 'scale_clip_test.def',
+       '\n\t./dwvw_test',
+       '\n\t./floating_point_test', '\n\t./scale_clip_test', 
+       '\n\t./peak_chunk_test aiff', '\n\t./peak_chunk_test wav',
+       '\n\t./command_test norm', '\n\t./command_test peak',
+       '\n\t./lossy_comp_test wav_ima', '\n\t./lossy_comp_test wav_msadpcm',
+       '\n\t./lossy_comp_test au_g721', '\n\t./lossy_comp_test au_g723',
+       '\n\t./lossy_comp_test vox_adpcm', 
+       '\n\t./lossy_comp_test w64_ima', '\n\t./lossy_comp_test w64_msadpcm',
+       'peak_chunk_test', 'dwvw_test', 'floating_point_test', 'scale_clip_test',
+       
+       'paf-tests', 'svx-tests', 'nist-tests', 'ircam-tests', 'voc-tests',
+       'mat4-tests', 'mat5-tests', 'pvf-tests', 'xi-tests', 'htk-tests',
+       'sds-tests'
+       ])
+
+remove_comment_start_end ('tests/pcm_test.c', '/* Lite remove start */', '/* Lite remove end */')
+remove_funcs_and_protos_from_file ('tests/pcm_test.c', [
+       'pcm_test_float', 'pcm_test_double' 
+       ])
+
+remove_comment_start_end ('tests/lossy_comp_test.c', '/* Lite remove start */', '/* Lite remove end */')
+remove_funcs_and_protos_from_file ('tests/lossy_comp_test.c', [
+       'lcomp_test_float', 'lcomp_test_double', 'sdlcomp_test_float', 'sdlcomp_test_double',
+       'smoothed_diff_float', 'smoothed_diff_double'
+       ])
+
+remove_comment_start_end ('tests/multi_file_test.c', '/* Lite remove start */', '/* Lite remove end */')
+
+remove_strings_from_file ('tests/stdio_test.c', [ 
+       '"paf",', '"svx",', '"nist",', '"ircam",', '"voc",', '"mat4",', '"mat5",', '"pvf",'
+       ])
+
+remove_comment_start_end ('tests/pipe_test.c', '/* Lite remove start */', '/* Lite remove end */')
+
+#----------------------------------------------------------------------------
+
+print "Fixing configure.ac file."
+fix_configure_ac_file ('configure.ac')
+
+print "Building and testing source."
+       # Try --disable-shared --disable-gcc-opt
+if os.system ("./reconfigure.mk && ./configure --disable-shared --disable-gcc-opt && make check"):
+       os.system ('PS1="FIX > " bash --norc')
+       sys.exit (1)
+
+print "Making distcheck"
+if os.system ("make distcheck"):
+       os.system ('PS1="FIX > " bash --norc')
+       sys.exit (1)
+
+print "Copying tarball"
+if os.system ("cp %s.tar.gz %s" % (lite_version, source_dir)):
+       print "??? %s.tar.gz ???" % lite_version
+       os.system ('PS1="FIX > " bash --norc')
+       sys.exit (1)
+
+os.chdir (source_dir)
+
+os.system ("rm -rf /tmp/%s" % lite_version)
+
+print "Done."
diff --git a/man/Makefile.in b/man/Makefile.in
deleted file mode 100644 (file)
index 358b4e9..0000000
+++ /dev/null
@@ -1,600 +0,0 @@
-# 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 = man
-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/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)/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; }; \
-  }
-man1dir = $(mandir)/man1
-am__installdirs = "$(DESTDIR)$(man1dir)"
-NROFF = nroff
-MANS = $(man_MANS)
-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@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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@
-man_MANS = sndfile-info.1 sndfile-play.1 sndfile-convert.1 sndfile-cmp.1 \
-       sndfile-metadata-get.1 sndfile-metadata-set.1 sndfile-concat.1 \
-       sndfile-interleave.1 sndfile-deinterleave.1 sndfile-salvage.1
-
-EXTRA_DIST = sndfile-info.1 sndfile-play.1 sndfile-convert.1 sndfile-cmp.1 \
-       sndfile-metadata-get.1 sndfile-concat.1 sndfile-interleave.1 \
-       sndfile-salvage.1
-
-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 man/Makefile'; \
-       $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu man/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-man1: $(man_MANS)
-       @$(NORMAL_INSTALL)
-       @list1=''; \
-       list2='$(man_MANS)'; \
-       test -n "$(man1dir)" \
-         && test -n "`echo $$list1$$list2`" \
-         || exit 0; \
-       echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
-       $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
-       { for i in $$list1; do echo "$$i"; done;  \
-       if test -n "$$list2"; then \
-         for i in $$list2; do echo "$$i"; done \
-           | sed -n '/\.1[a-z]*$$/p'; \
-       fi; \
-       } | while read p; do \
-         if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-         echo "$$d$$p"; echo "$$p"; \
-       done | \
-       sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
-       sed 'N;N;s,\n, ,g' | { \
-       list=; while read file base inst; do \
-         if test "$$base" = "$$inst"; then list="$$list $$file"; else \
-           echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
-           $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
-         fi; \
-       done; \
-       for i in $$list; do echo "$$i"; done | $(am__base_list) | \
-       while read files; do \
-         test -z "$$files" || { \
-           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
-           $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
-       done; }
-
-uninstall-man1:
-       @$(NORMAL_UNINSTALL)
-       @list=''; test -n "$(man1dir)" || exit 0; \
-       files=`{ for i in $$list; do echo "$$i"; done; \
-       l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-         sed -n '/\.1[a-z]*$$/p'; \
-       } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-             -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
-       dir='$(DESTDIR)$(man1dir)'; $(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 $(MANS)
-installdirs:
-       for dir in "$(DESTDIR)$(man1dir)"; 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-man
-
-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-man1
-
-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-man
-
-uninstall-man: uninstall-man1
-
-.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-man1 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-man \
-       uninstall-man1
-
-.PRECIOUS: Makefile
-
-
-# Same manpage for both programs.
-sndfile-metadata-set.1 : sndfile-metadata-get.1
-       $(LN_S) $(srcdir)/sndfile-metadata-get.1 $@
-
-sndfile-deinterleave.1 : sndfile-interleave.1
-       $(LN_S) $(srcdir)/sndfile-interleave.1 $@
-
-# 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:
index 04498c6..31723a1 100644 (file)
@@ -21,7 +21,7 @@ The format of the output file is determined by its filename suffix.
 The audio parameters of the output file will be made so that
 the format can accommodate each of the mono inputs;
 for example, the samplerate will be the maximal samplerate
-occuring in the inputs.
+occurring in the inputs.
 The output file will be overwritten if it already exists.
 .Pp
 .Nm sndfile-deinterleave
index 6f69042..1d161b3 100644 (file)
@@ -22,7 +22,7 @@ sndio
 .It Solaris
 /dev/audio
 .It MacOSX 10.6
-Carbon and CoreAudio
+CoreAudio
 .It MacOSX 10.7
 AudioToolbox
 .It Win32
@@ -30,6 +30,5 @@ waveOut
 .El
 .Sh SEE ALSO
 .Lk http://www.mega-nerd.com/libsndfile/
-.\" FIXME: links to ALSA, OSS, sndio, Sun audio, MacOSX audio
 .Sh AUTHORS
 .An Erik de Castro Lopo Aq Mt erikd@mega-nerd.com
index 8149553..6764c11 100644 (file)
@@ -9,7 +9,7 @@ OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
 
 AM_CPPFLAGS = -I$(top_srcdir)/src $(OS_SPECIFIC_CFLAGS)
 
-CLEANFILES = *~ sndfile-*.exe
+CLEANFILES = *~ sndfile-*.exe *.wav
 
 # This is the BeOS version of sndfile-play. It needs to be compiled with the C++
 # compiler.
@@ -45,3 +45,5 @@ sndfile_concat_LDADD = $(top_builddir)/src/libsndfile.la
 sndfile_salvage_SOURCES = sndfile-salvage.c common.c common.h
 sndfile_salvage_LDADD = $(top_builddir)/src/libsndfile.la
 
+check :
+       @if [ -x /usr/bin/python ]; then $(top_srcdir)/programs/test-sndfile-metadata-set.py @HOST_TRIPLET@ ; fi
diff --git a/programs/Makefile.in b/programs/Makefile.in
deleted file mode 100644 (file)
index 56e3c75..0000000
+++ /dev/null
@@ -1,817 +0,0 @@
-# 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@
-bin_PROGRAMS = sndfile-info$(EXEEXT) sndfile-play$(EXEEXT) \
-       sndfile-convert$(EXEEXT) sndfile-cmp$(EXEEXT) \
-       sndfile-metadata-set$(EXEEXT) sndfile-metadata-get$(EXEEXT) \
-       sndfile-interleave$(EXEEXT) sndfile-deinterleave$(EXEEXT) \
-       sndfile-concat$(EXEEXT) sndfile-salvage$(EXEEXT)
-subdir = programs
-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/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)/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__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-am_sndfile_cmp_OBJECTS = sndfile-cmp.$(OBJEXT) common.$(OBJEXT)
-sndfile_cmp_OBJECTS = $(am_sndfile_cmp_OBJECTS)
-sndfile_cmp_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_sndfile_concat_OBJECTS = sndfile-concat.$(OBJEXT) common.$(OBJEXT)
-sndfile_concat_OBJECTS = $(am_sndfile_concat_OBJECTS)
-sndfile_concat_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_sndfile_convert_OBJECTS = sndfile-convert.$(OBJEXT) \
-       common.$(OBJEXT)
-sndfile_convert_OBJECTS = $(am_sndfile_convert_OBJECTS)
-sndfile_convert_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_sndfile_deinterleave_OBJECTS = sndfile-deinterleave.$(OBJEXT) \
-       common.$(OBJEXT)
-sndfile_deinterleave_OBJECTS = $(am_sndfile_deinterleave_OBJECTS)
-sndfile_deinterleave_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_sndfile_info_OBJECTS = sndfile-info.$(OBJEXT) common.$(OBJEXT)
-sndfile_info_OBJECTS = $(am_sndfile_info_OBJECTS)
-sndfile_info_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_sndfile_interleave_OBJECTS = sndfile-interleave.$(OBJEXT) \
-       common.$(OBJEXT)
-sndfile_interleave_OBJECTS = $(am_sndfile_interleave_OBJECTS)
-sndfile_interleave_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_sndfile_metadata_get_OBJECTS = sndfile-metadata-get.$(OBJEXT) \
-       common.$(OBJEXT)
-sndfile_metadata_get_OBJECTS = $(am_sndfile_metadata_get_OBJECTS)
-sndfile_metadata_get_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_sndfile_metadata_set_OBJECTS = sndfile-metadata-set.$(OBJEXT) \
-       common.$(OBJEXT)
-sndfile_metadata_set_OBJECTS = $(am_sndfile_metadata_set_OBJECTS)
-sndfile_metadata_set_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_sndfile_play_OBJECTS = sndfile-play.$(OBJEXT) common.$(OBJEXT)
-sndfile_play_OBJECTS = $(am_sndfile_play_OBJECTS)
-am__DEPENDENCIES_1 =
-sndfile_play_DEPENDENCIES = $(top_builddir)/src/libsndfile.la \
-       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-       $(am__DEPENDENCIES_1)
-am_sndfile_salvage_OBJECTS = sndfile-salvage.$(OBJEXT) \
-       common.$(OBJEXT)
-sndfile_salvage_OBJECTS = $(am_sndfile_salvage_OBJECTS)
-sndfile_salvage_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 = 
-SOURCES = $(sndfile_cmp_SOURCES) $(sndfile_concat_SOURCES) \
-       $(sndfile_convert_SOURCES) $(sndfile_deinterleave_SOURCES) \
-       $(sndfile_info_SOURCES) $(sndfile_interleave_SOURCES) \
-       $(sndfile_metadata_get_SOURCES) \
-       $(sndfile_metadata_set_SOURCES) $(sndfile_play_SOURCES) \
-       $(sndfile_salvage_SOURCES)
-DIST_SOURCES = $(sndfile_cmp_SOURCES) $(sndfile_concat_SOURCES) \
-       $(sndfile_convert_SOURCES) $(sndfile_deinterleave_SOURCES) \
-       $(sndfile_info_SOURCES) $(sndfile_interleave_SOURCES) \
-       $(sndfile_metadata_get_SOURCES) \
-       $(sndfile_metadata_set_SOURCES) $(sndfile_play_SOURCES) \
-       $(sndfile_salvage_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@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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 $(OS_SPECIFIC_CFLAGS)
-CLEANFILES = *~ sndfile-*.exe
-
-# This is the BeOS version of sndfile-play. It needs to be compiled with the C++
-# compiler.
-EXTRA_DIST = sndfile-play-beos.cpp test-sndfile-metadata-set.py
-sndfile_info_SOURCES = sndfile-info.c common.c common.h
-sndfile_info_LDADD = $(top_builddir)/src/libsndfile.la
-sndfile_play_SOURCES = sndfile-play.c common.c common.h
-sndfile_play_LDADD = $(top_builddir)/src/libsndfile.la $(OS_SPECIFIC_LINKS) $(ALSA_LIBS) $(SNDIO_LIBS)
-sndfile_convert_SOURCES = sndfile-convert.c common.c common.h
-sndfile_convert_LDADD = $(top_builddir)/src/libsndfile.la
-sndfile_cmp_SOURCES = sndfile-cmp.c common.c common.h
-sndfile_cmp_LDADD = $(top_builddir)/src/libsndfile.la
-sndfile_metadata_set_SOURCES = sndfile-metadata-set.c common.c common.h
-sndfile_metadata_set_LDADD = $(top_builddir)/src/libsndfile.la
-sndfile_metadata_get_SOURCES = sndfile-metadata-get.c common.c common.h
-sndfile_metadata_get_LDADD = $(top_builddir)/src/libsndfile.la
-sndfile_interleave_SOURCES = sndfile-interleave.c common.c common.h
-sndfile_interleave_LDADD = $(top_builddir)/src/libsndfile.la
-sndfile_deinterleave_SOURCES = sndfile-deinterleave.c common.c common.h
-sndfile_deinterleave_LDADD = $(top_builddir)/src/libsndfile.la
-sndfile_concat_SOURCES = sndfile-concat.c common.c common.h
-sndfile_concat_LDADD = $(top_builddir)/src/libsndfile.la
-sndfile_salvage_SOURCES = sndfile-salvage.c common.c common.h
-sndfile_salvage_LDADD = $(top_builddir)/src/libsndfile.la
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .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 programs/Makefile'; \
-       $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu programs/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):
-install-binPROGRAMS: $(bin_PROGRAMS)
-       @$(NORMAL_INSTALL)
-       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-       if test -n "$$list"; then \
-         echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
-       fi; \
-       for p in $$list; do echo "$$p $$p"; done | \
-       sed 's/$(EXEEXT)$$//' | \
-       while read p p1; do if test -f $$p \
-        || test -f $$p1 \
-         ; then echo "$$p"; echo "$$p"; else :; fi; \
-       done | \
-       sed -e 'p;s,.*/,,;n;h' \
-           -e 's|.*|.|' \
-           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-       sed 'N;N;N;s,\n, ,g' | \
-       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-           if ($$2 == $$4) files[d] = files[d] " " $$1; \
-           else { print "f", $$3 "/" $$4, $$1; } } \
-         END { for (d in files) print "f", d, files[d] }' | \
-       while read type dir files; do \
-           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-           test -z "$$files" || { \
-           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-           } \
-       ; done
-
-uninstall-binPROGRAMS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-       files=`for p in $$list; do echo "$$p"; done | \
-         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-             -e 's/$$/$(EXEEXT)/' \
-       `; \
-       test -n "$$list" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-       @list='$(bin_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
-
-sndfile-cmp$(EXEEXT): $(sndfile_cmp_OBJECTS) $(sndfile_cmp_DEPENDENCIES) $(EXTRA_sndfile_cmp_DEPENDENCIES) 
-       @rm -f sndfile-cmp$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_cmp_OBJECTS) $(sndfile_cmp_LDADD) $(LIBS)
-
-sndfile-concat$(EXEEXT): $(sndfile_concat_OBJECTS) $(sndfile_concat_DEPENDENCIES) $(EXTRA_sndfile_concat_DEPENDENCIES) 
-       @rm -f sndfile-concat$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_concat_OBJECTS) $(sndfile_concat_LDADD) $(LIBS)
-
-sndfile-convert$(EXEEXT): $(sndfile_convert_OBJECTS) $(sndfile_convert_DEPENDENCIES) $(EXTRA_sndfile_convert_DEPENDENCIES) 
-       @rm -f sndfile-convert$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_convert_OBJECTS) $(sndfile_convert_LDADD) $(LIBS)
-
-sndfile-deinterleave$(EXEEXT): $(sndfile_deinterleave_OBJECTS) $(sndfile_deinterleave_DEPENDENCIES) $(EXTRA_sndfile_deinterleave_DEPENDENCIES) 
-       @rm -f sndfile-deinterleave$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_deinterleave_OBJECTS) $(sndfile_deinterleave_LDADD) $(LIBS)
-
-sndfile-info$(EXEEXT): $(sndfile_info_OBJECTS) $(sndfile_info_DEPENDENCIES) $(EXTRA_sndfile_info_DEPENDENCIES) 
-       @rm -f sndfile-info$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_info_OBJECTS) $(sndfile_info_LDADD) $(LIBS)
-
-sndfile-interleave$(EXEEXT): $(sndfile_interleave_OBJECTS) $(sndfile_interleave_DEPENDENCIES) $(EXTRA_sndfile_interleave_DEPENDENCIES) 
-       @rm -f sndfile-interleave$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_interleave_OBJECTS) $(sndfile_interleave_LDADD) $(LIBS)
-
-sndfile-metadata-get$(EXEEXT): $(sndfile_metadata_get_OBJECTS) $(sndfile_metadata_get_DEPENDENCIES) $(EXTRA_sndfile_metadata_get_DEPENDENCIES) 
-       @rm -f sndfile-metadata-get$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_metadata_get_OBJECTS) $(sndfile_metadata_get_LDADD) $(LIBS)
-
-sndfile-metadata-set$(EXEEXT): $(sndfile_metadata_set_OBJECTS) $(sndfile_metadata_set_DEPENDENCIES) $(EXTRA_sndfile_metadata_set_DEPENDENCIES) 
-       @rm -f sndfile-metadata-set$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_metadata_set_OBJECTS) $(sndfile_metadata_set_LDADD) $(LIBS)
-
-sndfile-play$(EXEEXT): $(sndfile_play_OBJECTS) $(sndfile_play_DEPENDENCIES) $(EXTRA_sndfile_play_DEPENDENCIES) 
-       @rm -f sndfile-play$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_play_OBJECTS) $(sndfile_play_LDADD) $(LIBS)
-
-sndfile-salvage$(EXEEXT): $(sndfile_salvage_OBJECTS) $(sndfile_salvage_DEPENDENCIES) $(EXTRA_sndfile_salvage_DEPENDENCIES) 
-       @rm -f sndfile-salvage$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_salvage_OBJECTS) $(sndfile_salvage_LDADD) $(LIBS)
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-
-distclean-compile:
-       -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-cmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-concat.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-convert.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-deinterleave.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-info.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-interleave.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-metadata-get.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-metadata-set.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-play.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-salvage.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 $@ $<
-
-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
-check: check-am
-all-am: Makefile $(PROGRAMS)
-installdirs:
-       for dir in "$(DESTDIR)$(bindir)"; 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:
-       -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-binPROGRAMS 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-binPROGRAMS
-
-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: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
-       clean-binPROGRAMS 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-binPROGRAMS \
-       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 uninstall-binPROGRAMS
-
-.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:
index 26f6ac9..3dd992d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2008 Conrad Parker <conrad@metadecks.org>
 **
 ** All rights reserved.
@@ -50,10 +50,12 @@ static char * filename1 = NULL, * filename2 = NULL ;
 
 static int
 comparison_error (const char * what, sf_count_t frame_offset)
-{      char buffer [128] = "" ;
+{      char buffer [128] ;
 
        if (frame_offset >= 0)
                snprintf (buffer, sizeof (buffer), " (at frame offset %" PRId64 ")", frame_offset) ;
+       else
+               buffer [0] = 0 ;
 
        printf ("%s: %s of files %s and %s differ%s.\n", progname, what, filename1, filename2, buffer) ;
        return 1 ;
index 547d01c..dff7f79 100644 (file)
@@ -348,6 +348,7 @@ main (int argc, char * argv [])
 static void
 copy_metadata (SNDFILE *outfile, SNDFILE *infile, int channels)
 {      SF_INSTRUMENT inst ;
+       SF_CUES cues ;
        SF_BROADCAST_INFO_2K binfo ;
        const char *str ;
        int k, chanmap [256] ;
@@ -359,6 +360,7 @@ copy_metadata (SNDFILE *outfile, SNDFILE *infile, int channels)
                } ;
 
        memset (&inst, 0, sizeof (inst)) ;
+       memset (&cues, 0, sizeof (cues)) ;
        memset (&binfo, 0, sizeof (binfo)) ;
 
        if (channels < ARRAY_LEN (chanmap))
@@ -368,6 +370,9 @@ copy_metadata (SNDFILE *outfile, SNDFILE *infile, int channels)
                        sf_command (outfile, SFC_SET_CHANNEL_MAP_INFO, chanmap, size) ;
                } ;
 
+       if (sf_command (infile, SFC_GET_CUE, &cues, sizeof (cues)) == SF_TRUE)
+               sf_command (outfile, SFC_SET_CUE, &cues, sizeof (cues)) ;
+
        if (sf_command (infile, SFC_GET_INSTRUMENT, &inst, sizeof (inst)) == SF_TRUE)
                sf_command (outfile, SFC_SET_INSTRUMENT, &inst, sizeof (inst)) ;
 
index 2025638..bd7a33f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2008-2010 George Blood Audio
 **
 ** All rights reserved.
@@ -57,6 +57,7 @@ main (int argc, char *argv [])
        struct tm timedata ;
        const char *progname ;
        const char * filenames [2] = { NULL, NULL } ;
+       char date [128], time [128] ;
        int     k ;
 
        /* Store the program name. */
@@ -73,9 +74,7 @@ main (int argc, char *argv [])
        read_localtime (&timedata) ;
 
        for (k = 1 ; k < argc ; k++)
-       {       char tmp [20] ;
-
-               if (argv [k][0] != '-')
+       {       if (argv [k][0] != '-')
                {       if (filenames [0] == NULL)
                                filenames [0] = argv [k] ;
                        else if (filenames [1] == NULL)
@@ -122,30 +121,30 @@ main (int argc, char *argv [])
 
                /* Following options do not take an argument. */
                if (strcmp (argv [k], "--bext-auto-time-date") == 0)
-               {       snprintf (tmp, sizeof (tmp), "%02d:%02d:%02d", timedata.tm_hour, timedata.tm_min, timedata.tm_sec) ;
-                       info.origination_time = strdup (tmp) ;
+               {       snprintf (time, sizeof (time), "%02d:%02d:%02d", timedata.tm_hour, timedata.tm_min, timedata.tm_sec) ;
+                       info.origination_time = time ;
 
-                       snprintf (tmp, sizeof (tmp), "%04d-%02d-%02d", timedata.tm_year + 1900, timedata.tm_mon + 1, timedata.tm_mday) ;
-                       info.origination_date = strdup (tmp) ;
+                       snprintf (date, sizeof (date), "%04d-%02d-%02d", timedata.tm_year + 1900, timedata.tm_mon + 1, timedata.tm_mday) ;
+                       info.origination_date = date ;
                        continue ;
                        } ;
 
                if (strcmp (argv [k], "--bext-auto-time") == 0)
-               {       snprintf (tmp, sizeof (tmp), "%02d:%02d:%02d", timedata.tm_hour, timedata.tm_min, timedata.tm_sec) ;
-                       info.origination_time = strdup (tmp) ;
+               {       snprintf (time, sizeof (time), "%02d:%02d:%02d", timedata.tm_hour, timedata.tm_min, timedata.tm_sec) ;
+                       info.origination_time = time ;
                        continue ;
                        } ;
 
                if (strcmp (argv [k], "--bext-auto-date") == 0)
-               {       snprintf (tmp, sizeof (tmp), "%04d-%02d-%02d", timedata.tm_year + 1900, timedata.tm_mon + 1, timedata.tm_mday) ;
-                       info.origination_date = strdup (tmp) ;
+               {       snprintf (date, sizeof (date), "%04d-%02d-%02d", timedata.tm_year + 1900, timedata.tm_mon + 1, timedata.tm_mday) ;
+                       info.origination_date = strdup (date) ;
                        continue ;
                        } ;
 
                if (strcmp (argv [k], "--str-auto-date") == 0)
-               {       snprintf (tmp, sizeof (tmp), "%04d-%02d-%02d", timedata.tm_year + 1900, timedata.tm_mon + 1, timedata.tm_mday) ;
+               {       snprintf (date, sizeof (date), "%04d-%02d-%02d", timedata.tm_year + 1900, timedata.tm_mon + 1, timedata.tm_mday) ;
 
-                       info.date = strdup (tmp) ;
+                       info.date = strdup (date) ;
                        continue ;
                        } ;
 
index 8822fc8..1fc96fa 100644 (file)
        #include <AvailabilityMacros.h>
        #include <Availability.h>
 
-       #if (OSX_DARWIN_VERSION > 11)
-               /* Includes go here. */
-       #elif (OSX_DARWIN_VERSION == 11)
-               #include <AudioToolbox/AudioToolbox.h>
-       #elif (OSX_DARWIN_VERSION > 0 && OSX_DARWIN_VERSION <= 10)
-               #include <Carbon.h>
-               #include <CoreAudio/AudioHardware.h>
-       #endif
-
 #elif HAVE_SNDIO_H
        #include <sndio.h>
 
@@ -481,338 +472,7 @@ opensoundsys_open_device (int channels, int srate)
 **     Mac OS X functions for playing a sound.
 */
 
-#if (OSX_DARWIN_VERSION > 11)
 /* MacOSX 10.8 use a new Audio API. Someone needs to write some code for it. */
-#endif /* OSX_DARWIN_VERSION > 11 */
-
-#if (OSX_DARWIN_VERSION == 11)
-/* MacOSX 10.7 use AudioQueue API */
-
-#define kBytesPerAudioBuffer   (1024 * 8)
-#define kNumberOfAudioBuffers  4
-
-typedef struct
-{      AudioStreamBasicDescription             format ;
-
-       AudioQueueRef           queue ;
-       AudioQueueBufferRef     queueBuffer [kNumberOfAudioBuffers] ;
-
-       UInt32                  buf_size ;
-
-       SNDFILE                 *sndfile ;
-       SF_INFO                 sfinfo ;
-
-       int                             done_playing ;
-} MacOSXAudioData ;
-
-
-static void
-macosx_fill_buffer (MacOSXAudioData *audio_data, AudioQueueBufferRef audio_buffer)
-{      int             size, sample_count, read_count ;
-       short   *buffer ;
-
-       size = audio_buffer->mAudioDataBytesCapacity ;
-       sample_count = size / sizeof (short) ;
-
-       buffer = (short*) audio_buffer->mAudioData ;
-
-       read_count = sf_read_short (audio_data->sndfile, buffer, sample_count) ;
-
-       if (read_count > 0)
-       {       audio_buffer->mAudioDataByteSize = read_count * sizeof (short) ;
-               AudioQueueEnqueueBuffer (audio_data->queue, audio_buffer, 0, NULL) ;
-               }
-       else
-               AudioQueueStop (audio_data->queue, false) ;
-
-} /* macosx_fill_buffer */
-
-
-static void
-macosx_audio_out_callback (void *user_data, AudioQueueRef audio_queue, AudioQueueBufferRef audio_buffer)
-{      MacOSXAudioData *audio_data = (MacOSXAudioData *) user_data ;
-
-       if (audio_data->queue == audio_queue)
-               macosx_fill_buffer (audio_data, audio_buffer) ;
-
-} /* macosx_audio_out_callback */
-
-
-static void
-macosx_audio_out_property_callback (void *user_data, AudioQueueRef audio_queue, AudioQueuePropertyID prop)
-{      MacOSXAudioData *audio_data = (MacOSXAudioData *) user_data ;
-
-       if (prop == kAudioQueueProperty_IsRunning)
-       {       UInt32 is_running = 0 ;
-               UInt32 is_running_size = sizeof (is_running) ;
-
-               AudioQueueGetProperty (audio_queue, kAudioQueueProperty_IsRunning, &is_running, &is_running_size) ;
-
-               if (!is_running)
-               {       audio_data->done_playing = SF_TRUE ;
-                       CFRunLoopStop (CFRunLoopGetCurrent ()) ;
-                       } ;
-               } ;
-} /* macosx_audio_out_property_callback */
-
-
-
-static void
-macosx_play (int argc, char *argv [])
-{      MacOSXAudioData         audio_data ;
-       OSStatus        err ;
-       int             i ;
-       int             k ;
-
-       memset (&audio_data, 0x55, sizeof (audio_data)) ;
-
-       for (k = 1 ; k < argc ; k++)
-       {       memset (&(audio_data.sfinfo), 0, sizeof (audio_data.sfinfo)) ;
-
-               printf ("Playing %s\n", argv [k]) ;
-               if (! (audio_data.sndfile = sf_open (argv [k], SFM_READ, &(audio_data.sfinfo))))
-               {       puts (sf_strerror (NULL)) ;
-                       continue ;
-                       } ;
-
-               if (audio_data.sfinfo.channels < 1 || audio_data.sfinfo.channels > 2)
-               {       printf ("Error : channels = %d.\n", audio_data.sfinfo.channels) ;
-                       continue ;
-                       } ;
-
-               /*  fill ASBD */
-               audio_data.format.mSampleRate = audio_data.sfinfo.samplerate ;
-               audio_data.format.mChannelsPerFrame     = audio_data.sfinfo.channels ;
-               audio_data.format.mFormatID                     = kAudioFormatLinearPCM ;
-               audio_data.format.mFormatFlags          = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked ;
-               audio_data.format.mBytesPerPacket       = audio_data.format.mChannelsPerFrame * 2 ;
-               audio_data.format.mFramesPerPacket      = 1 ;
-               audio_data.format.mBytesPerFrame        = audio_data.format.mBytesPerPacket ;
-               audio_data.format.mBitsPerChannel       = 16 ;
-               audio_data.format.mReserved                     = 0 ;
-
-               /* create the queue */
-               if ((err = AudioQueueNewOutput (&(audio_data.format), macosx_audio_out_callback, &audio_data,
-                                       CFRunLoopGetCurrent (), kCFRunLoopCommonModes, 0, &(audio_data.queue))) != noErr)
-               {       printf ("AudioQueueNewOutput failed\n") ;
-                       return ;
-                       } ;
-
-               /*  add property listener */
-               if ((err = AudioQueueAddPropertyListener (audio_data.queue, kAudioQueueProperty_IsRunning, macosx_audio_out_property_callback, &audio_data)) != noErr)
-               {       printf ("AudioQueueAddPropertyListener failed\n") ;
-                       return ;
-                       } ;
-
-               /*  create the buffers */
-               for (i = 0 ; i < kNumberOfAudioBuffers ; i++)
-               {       if ((err = AudioQueueAllocateBuffer (audio_data.queue, kBytesPerAudioBuffer, &audio_data.queueBuffer [i])) != noErr)
-                       {       printf ("AudioQueueAllocateBuffer failed\n") ;
-                               return ;
-                               } ;
-
-                       macosx_fill_buffer (&audio_data, audio_data.queueBuffer [i]) ;
-                       } ;
-
-               audio_data.done_playing = SF_FALSE ;
-
-               /* start queue */
-               if ((err = AudioQueueStart (audio_data.queue, NULL)) != noErr)
-               {       printf ("AudioQueueStart failed\n") ;
-                       return ;
-               } ;
-
-               while (audio_data.done_playing == SF_FALSE)
-                       CFRunLoopRun () ;
-
-               /*  free the buffers */
-               for (i = 0 ; i < kNumberOfAudioBuffers ; i++)
-               {       if ((err = AudioQueueFreeBuffer (audio_data.queue, audio_data.queueBuffer [i])) != noErr)
-                       {       printf ("AudioQueueFreeBuffer failed\n") ;
-                               return ;
-                               } ;
-                       } ;
-
-               /*  free the queue */
-               if ((err = AudioQueueDispose (audio_data.queue, true)) != noErr)
-               {       printf ("AudioQueueDispose failed\n") ;
-                       return ;
-                       } ;
-
-               sf_close (audio_data.sndfile) ;
-               } ;
-
-       return ;
-} /* macosx_play, AudioQueue implementation */
-
-#endif /* OSX_DARWIN_VERSION == 11 */
-
-#if (OSX_DARWIN_VERSION > 0 && OSX_DARWIN_VERSION <= 10)
-/* MacOSX 10.6 or earlier, use Carbon and AudioHardware API */
-
-typedef struct
-{      AudioStreamBasicDescription             format ;
-
-       UInt32                  buf_size ;
-       AudioDeviceID   device ;
-
-       SNDFILE                 *sndfile ;
-       SF_INFO                 sfinfo ;
-
-       int                             fake_stereo ;
-       int                             done_playing ;
-} MacOSXAudioData ;
-
-#include <math.h>
-
-static OSStatus
-macosx_audio_out_callback (AudioDeviceID device, const AudioTimeStamp* current_time,
-       const AudioBufferList* data_in, const AudioTimeStamp* time_in,
-       AudioBufferList*        data_out, const AudioTimeStamp* time_out,
-       void* client_data)
-{      MacOSXAudioData *audio_data ;
-       int             size, sample_count, read_count, k ;
-       float   *buffer ;
-
-       /* Prevent compiler warnings. */
-       device = device ;
-       current_time = current_time ;
-       data_in = data_in ;
-       time_in = time_in ;
-       time_out = time_out ;
-
-       audio_data = (MacOSXAudioData*) client_data ;
-
-       size = data_out->mBuffers [0].mDataByteSize ;
-       sample_count = size / sizeof (float) ;
-
-       buffer = (float*) data_out->mBuffers [0].mData ;
-
-       if (audio_data->fake_stereo != 0)
-       {       read_count = sf_read_float (audio_data->sndfile, buffer, sample_count / 2) ;
-
-               for (k = read_count - 1 ; k >= 0 ; k--)
-               {       buffer [2 * k   ] = buffer [k] ;
-                       buffer [2 * k + 1] = buffer [k] ;
-                       } ;
-               read_count *= 2 ;
-               }
-       else
-               read_count = sf_read_float (audio_data->sndfile, buffer, sample_count) ;
-
-       /* Fill the remainder with zeroes. */
-       if (read_count < sample_count)
-       {       if (audio_data->fake_stereo == 0)
-                       memset (&(buffer [read_count]), 0, (sample_count - read_count) * sizeof (float)) ;
-               /* Tell the main application to terminate. */
-               audio_data->done_playing = SF_TRUE ;
-               } ;
-
-       return noErr ;
-} /* macosx_audio_out_callback */
-
-static void
-macosx_play (int argc, char *argv [])
-{      MacOSXAudioData         audio_data ;
-       OSStatus        err ;
-       UInt32          count, buffer_size ;
-       int             k ;
-
-       audio_data.fake_stereo = 0 ;
-       audio_data.device = kAudioDeviceUnknown ;
-
-       /*  get the default output device for the HAL */
-       count = sizeof (AudioDeviceID) ;
-       if ((err = AudioHardwareGetProperty (kAudioHardwarePropertyDefaultOutputDevice,
-                               &count, (void *) &(audio_data.device))) != noErr)
-       {       printf ("AudioHardwareGetProperty (kAudioDevicePropertyDefaultOutputDevice) failed.\n") ;
-               return ;
-               } ;
-
-       /*  get the buffersize that the default device uses for IO */
-       count = sizeof (UInt32) ;
-       if ((err = AudioDeviceGetProperty (audio_data.device, 0, false, kAudioDevicePropertyBufferSize,
-                               &count, &buffer_size)) != noErr)
-       {       printf ("AudioDeviceGetProperty (kAudioDevicePropertyBufferSize) failed.\n") ;
-               return ;
-               } ;
-
-       /*  get a description of the data format used by the default device */
-       count = sizeof (AudioStreamBasicDescription) ;
-       if ((err = AudioDeviceGetProperty (audio_data.device, 0, false, kAudioDevicePropertyStreamFormat,
-                               &count, &(audio_data.format))) != noErr)
-       {       printf ("AudioDeviceGetProperty (kAudioDevicePropertyStreamFormat) failed.\n") ;
-               return ;
-               } ;
-
-       /* Base setup completed. Now play files. */
-       for (k = 1 ; k < argc ; k++)
-       {       memset (&(audio_data.sfinfo), 0, sizeof (audio_data.sfinfo)) ;
-
-               printf ("Playing %s\n", argv [k]) ;
-               if (! (audio_data.sndfile = sf_open (argv [k], SFM_READ, &(audio_data.sfinfo))))
-               {       puts (sf_strerror (NULL)) ;
-                       continue ;
-                       } ;
-
-               if (audio_data.sfinfo.channels < 1 || audio_data.sfinfo.channels > 2)
-               {       printf ("Error : channels = %d.\n", audio_data.sfinfo.channels) ;
-                       continue ;
-                       } ;
-
-               audio_data.format.mSampleRate = audio_data.sfinfo.samplerate ;
-
-               if (audio_data.sfinfo.channels == 1)
-               {       audio_data.format.mChannelsPerFrame = 2 ;
-                       audio_data.fake_stereo = 1 ;
-                       }
-               else
-               audio_data.format.mChannelsPerFrame = audio_data.sfinfo.channels ;
-
-               if ((err = AudioDeviceSetProperty (audio_data.device, NULL, 0, false, kAudioDevicePropertyStreamFormat,
-                                       sizeof (AudioStreamBasicDescription), &(audio_data.format))) != noErr)
-               {       printf ("AudioDeviceSetProperty (kAudioDevicePropertyStreamFormat) failed.\n") ;
-                       return ;
-                       } ;
-
-               /*  we want linear pcm */
-               if (audio_data.format.mFormatID != kAudioFormatLinearPCM)
-                       return ;
-
-               /* Fire off the device. */
-               if ((err = AudioDeviceAddIOProc (audio_data.device, macosx_audio_out_callback,
-                               (void *) &audio_data)) != noErr)
-               {       printf ("AudioDeviceAddIOProc failed.\n") ;
-                       return ;
-                       } ;
-
-               err = AudioDeviceStart (audio_data.device, macosx_audio_out_callback) ;
-               if      (err != noErr)
-                       return ;
-
-               audio_data.done_playing = SF_FALSE ;
-
-               while (audio_data.done_playing == SF_FALSE)
-                       usleep (10 * 1000) ; /* 10 000 milliseconds. */
-
-               if ((err = AudioDeviceStop (audio_data.device, macosx_audio_out_callback)) != noErr)
-               {       printf ("AudioDeviceStop failed.\n") ;
-                       return ;
-                       } ;
-
-               err = AudioDeviceRemoveIOProc (audio_data.device, macosx_audio_out_callback) ;
-               if (err != noErr)
-               {       printf ("AudioDeviceRemoveIOProc failed.\n") ;
-                       return ;
-                       } ;
-
-               sf_close (audio_data.sndfile) ;
-               } ;
-
-       return ;
-} /* macosx_play, AudioHardware implementation */
-
-#endif /* OSX_DARWIN_VERSION > 0 && OSX_DARWIN_VERSION <= 10 */
 
 /*------------------------------------------------------------------------------
 **     Win32 functions for playing a sound.
@@ -1184,15 +844,13 @@ main (int argc, char *argv [])
                opensoundsys_play (argc, argv) ;
 #elif defined (__FreeBSD_kernel__) || defined (__FreeBSD__)
        opensoundsys_play (argc, argv) ;
-#elif (defined (__MACH__) && defined (__APPLE__) && OSX_DARWIN_VERSION <= 11)
-       macosx_play (argc, argv) ;
 #elif HAVE_SNDIO_H
        sndio_play (argc, argv) ;
 #elif (defined (sun) && defined (unix))
        solaris_play (argc, argv) ;
 #elif (OS_IS_WIN32 == 1)
        win32_play (argc, argv) ;
-#elif (defined (__MACH__) && defined (__APPLE__) && OSX_DARWIN_VERSION > 11)
+#elif (defined (__MACH__) && defined (__APPLE__))
        printf ("OS X 10.8 and later have a new Audio API.\n") ;
        printf ("Someone needs to write code to use that API.\n") ;
        return 1 ;
index a21a36b..0006936 100755 (executable)
@@ -1,6 +1,6 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
-# Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+# Copyright (C) 2008-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 #
 # All rights reserved.
 #
 
 # Simple test script for the sndfile-metadata-set program.
 
-import commands, os, sys
+from __future__ import print_function
+
+try:
+    # py2
+    import commands
+except ImportError:
+    # py3
+    import subprocess as commands
+
+import os, sys
 import time, datetime
 
+class Programs:
+    def __init__ (self, needs_exe):
+        if needs_exe:
+            extension = ".exe"
+        else:
+            extension = ""
+        self.meta_set_prog = "./sndfile-metadata-set" + extension
+        self.meta_get_prog = "./sndfile-metadata-get" + extension
+        self.make_sine_prog = "../examples/make_sine" + extension
+
+    def _run_command (self, should_fail, cmd):
+        status, output = commands.getstatusoutput (cmd)
+        if should_fail and not status:
+            print("\n\nError : command '%s' should have failed." % cmd)
+            print(output)
+            print()
+            sys.exit (1)
+        if not should_fail and status:
+            print("\n\nError : command '%s' should not have failed." % cmd)
+            print(output)
+            print()
+            sys.exit (1)
+        return output
+
+    def meta_set (self, should_fail, args):
+        return self._run_command (should_fail, self.meta_set_prog + " " + args)
+
+    def meta_get (self, should_fail, args):
+        return self._run_command (should_fail, self.meta_get_prog + " " + args)
+
+    def make_sine (self):
+        return os.system (self.make_sine_prog)
+
+    def check_executables (self):
+        for name in [ self.meta_set_prog, self.meta_get_prog, self.make_sine_prog ]:
+            if not (os.path.isfile (name)):
+                print("\n\nError : Can't find executable '%s'. Have you run make?" % name)
+                sys.exit (1)
+
+
 def print_test_name (name):
-       print "    %-30s :" % name,
-
-def assert_info (filename, arg, value):
-       cmd = "./sndfile-metadata-get %s %s" % (arg, filename)
-       status, output = commands.getstatusoutput (cmd)
-       if status:
-               print "\n\nError : command '%s' should not have failed." % cmd
-               sys.exit (1)
-       if output.find (value) < 0:
-               print "\n\nError : not able to find '%s'." % value
-               print output
-               sys.exit (1)
-       return
-
-
-def check_executable (name):
-       if not (os.path.isfile (name)):
-               print "\n\nError : Can't find executable '%s'. Have you run make?" % name
-               sys.exit (1)
-
-def test_empty_fail ():
-       print_test_name ("Empty fail test")
-       cmd = "./sndfile-metadata-set --bext-description Alpha sine.wav"
-       status, output = commands.getstatusoutput (cmd)
-       if not status:
-               print "\n\nError : command '%s' should have failed." % cmd
-               sys.exit (1)
-       print "ok"
-
-def test_copy ():
-       print_test_name ("Copy test")
-       cmd = "./sndfile-metadata-set --bext-description \"First Try\" sine.wav output.wav"
-       status, output = commands.getstatusoutput (cmd)
-       if status:
-               print "\n\nError : command '%s' should not have failed." % cmd
-               sys.exit (1)
-       assert_info ("output.wav", "--bext-description", "First Try")
-       print "ok"
-
-def test_update (tests):
-       print_test_name ("Update test")
-       for arg, value in tests:
-               cmd = "./sndfile-metadata-set %s \"%s\" output.wav" % (arg, value)
-               status, output = commands.getstatusoutput (cmd)
-               if status:
-                       print "\n\nError : command '%s' should not have failed." % cmd
-                       sys.exit (1)
-               assert_info ("output.wav", arg, value)
-       print "ok"
-
-def test_post_mod (tests):
-       print_test_name ("Post mod test")
-       for arg, value in tests:
-               assert_info ("output.wav", arg, value)
-       print "ok"
-
-def test_auto_date ():
-       print_test_name ("Auto date test")
-       cmd = "./sndfile-metadata-set --bext-auto-time-date sine.wav date-time.wav"
-       status, output = commands.getstatusoutput (cmd)
-       if status:
-               print "\n\nError : command '%s' should not have failed." % cmd
-               sys.exit (1)
-       target = datetime.date.today ().__str__ ()
-       assert_info ("date-time.wav", "--bext-orig-date", target)
-       print "ok"
+    print("    %-30s :" % name, end="")
+
+def assert_info (programs, filename, arg, value):
+    output = programs.meta_get (False, "%s %s" % (arg, filename))
+    if output.find (value) < 0:
+        print("\n\nError : not able to find '%s'." % value)
+        print(output)
+        sys.exit (1)
+    return
+
+
+def test_empty_fail (programs):
+    print_test_name ("Empty fail test")
+    output = programs.meta_set (True, "--bext-description Alpha sine.wav")
+    print("ok")
+
+def test_copy (programs):
+    print_test_name ("Copy test")
+    output = programs.meta_set (False, "--bext-description \"First Try\" sine.wav output.wav")
+    assert_info (programs, "output.wav", "--bext-description", "First Try")
+    print("ok")
+
+def test_update (programs, tests):
+    print_test_name ("Update test")
+    for arg, value in tests:
+        output = programs.meta_set (False, "%s \"%s\" output.wav" % (arg, value))
+        assert_info (programs, "output.wav", arg, value)
+    print("ok")
+
+def test_post_mod (programs, tests):
+    print_test_name ("Post mod test")
+    for arg, value in tests:
+        assert_info (programs, "output.wav", arg, value)
+    print("ok")
+
+def test_auto_date (programs):
+    print_test_name ("Auto date test")
+    output = programs.meta_set (False, "--bext-auto-time-date sine.wav date-time.wav")
+    target = datetime.date.today ().__str__ ()
+    assert_info (programs, "date-time.wav", "--bext-orig-date", target)
+    print("ok")
 
 
 #-------------------------------------------------------------------------------
 
-def test_coding_history ():
-       print_test_name ("Coding history test")
-       cmd = "./sndfile-metadata-set --bext-coding-hist \"alpha beta\" output.wav"
-       status, output = commands.getstatusoutput (cmd)
-       if status:
-               print "\n\nError : command '%s' should not have failed." % cmd
-               sys.exit (1)
-       cmd = "./sndfile-metadata-get --bext-coding-hist output.wav"
-       status, output = commands.getstatusoutput (cmd)
-       if status:
-               print "\n\nError : command '%s' should not have failed." % cmd
-               sys.exit (1)
-       print "ok"
+def test_coding_history (programs):
+    print_test_name ("Coding history test")
+    output = programs.meta_set (False, "--bext-coding-hist \"alpha beta\" output.wav")
+    output = programs.meta_get (False, "--bext-coding-hist output.wav")
+    print("ok")
 
 #-------------------------------------------------------------------------------
 
-def test_rewrite ():
-       print_test_name ("Rewrite test")
-       cmd = "./sndfile-metadata-set --bext-originator \"Really, really long string\" output.wav"
-       status, output = commands.getstatusoutput (cmd)
-       if status:
-               print "\n\nError : command '%s' should not have failed." % cmd
-               sys.exit (1)
-       cmd = "./sndfile-metadata-set --bext-originator \"Short\" output.wav"
-       status, output = commands.getstatusoutput (cmd)
-       if status:
-               print "\n\nError : command '%s' should not have failed." % cmd
-               sys.exit (1)
-       cmd = "./sndfile-metadata-get --bext-originator output.wav"
-       status, output = commands.getstatusoutput (cmd)
-       if status:
-               print "\n\nError : command '%s' should not have failed." % cmd
-               sys.exit (1)
-       if output.find ("really long") > 0:
-               print "\n\nError : output '%s' should not contain 'really long'." % output
-               sys.exit (1)
-       print "ok"
+def test_rewrite (programs):
+    print_test_name ("Rewrite test")
+    output = programs.meta_set (False, "--bext-originator \"Really, really long string\" output.wav")
+    output = programs.meta_set (False, "--bext-originator \"Short\" output.wav")
+    output = programs.meta_get (False, "--bext-originator output.wav")
+    if output.find ("really long") > 0:
+        print("\n\nError : output '%s' should not contain 'really long'." % output)
+        sys.exit (1)
+    print("ok")
 
 #===============================================================================
 
 test_dir = "programs"
 
+print("\nTesting WAV metadata manipulation:")
+
 if os.path.isdir (test_dir):
-       os.chdir (test_dir)
+    os.chdir (test_dir)
 
-for f in [ "sndfile-metadata-set", "sndfile-metadata-get", "../examples/make_sine" ]:
-       check_executable (f)
+if len (sys.argv) >= 1 and sys.argv [1].endswith ("mingw32"):
+    needs_exe = True
+else:
+    needs_exe = False
 
-os.system ("../examples/make_sine")
-if not os.path.isfile ("sine.wav"):
-       print "\n\nError : Can't file file 'sine.wav'."
-       sys.exit (1)
+programs = Programs (needs_exe)
 
-print ""
+programs.check_executables ()
+
+programs.make_sine ()
+if not os.path.isfile ("sine.wav"):
+    print("\n\nError : Can't file file 'sine.wav'.")
+    sys.exit (1)
 
-test_empty_fail ()
-test_copy ()
+test_empty_fail (programs)
+test_copy (programs)
 
 tests = [
-       ("--bext-description", "Alpha"), ("--bext-originator", "Beta"), ("--bext-orig-ref", "Charlie"),
-       ("--bext-umid", "Delta"), ("--bext-orig-date", "2001-10-01"),  ("--bext-orig-time", "01:02:03"),
-       ("--str-title", "Echo"), ("--str-artist", "Fox trot")
-       ]
+    ("--bext-description", "Alpha"), ("--bext-originator", "Beta"), ("--bext-orig-ref", "Charlie"),
+    ("--bext-umid", "Delta"), ("--bext-orig-date", "2001-10-01"),  ("--bext-orig-time", "01:02:03"),
+    ("--str-title", "Echo"), ("--str-artist", "Fox trot")
+    ]
 
-test_auto_date ()
-test_update (tests)
-test_post_mod (tests)
+test_auto_date (programs)
+test_update (programs, tests)
+test_post_mod (programs, tests)
 
-test_update ([ ("--str-artist", "Fox") ])
+test_update (programs, [ ("--str-artist", "Fox") ])
 
 # This never worked.
 # test_coding_history ()
 
-test_rewrite ()
+test_rewrite (programs)
 
 
-print ""
+print()
 
 sys.exit (0)
 
index a87d0c4..cc335aa 100644 (file)
@@ -1,6 +1,8 @@
 ## Process this file with automake to produce Makefile.in
 
+if HAVE_SQLITE3
 bin_PROGRAMS = sndfile-regtest
+endif
 
 noinst_HEADERS = regtest.h
 
diff --git a/regtest/Makefile.in b/regtest/Makefile.in
deleted file mode 100644 (file)
index 6f3f969..0000000
+++ /dev/null
@@ -1,708 +0,0 @@
-# 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@
-bin_PROGRAMS = sndfile-regtest$(EXEEXT)
-subdir = regtest
-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/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)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
-       $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-PROGRAMS = $(bin_PROGRAMS)
-am_sndfile_regtest_OBJECTS = sndfile-regtest.$(OBJEXT) \
-       database.$(OBJEXT) checksum.$(OBJEXT)
-sndfile_regtest_OBJECTS = $(am_sndfile_regtest_OBJECTS)
-am__DEPENDENCIES_1 =
-sndfile_regtest_DEPENDENCIES = $(top_builddir)/src/libsndfile.la \
-       $(am__DEPENDENCIES_1)
-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_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 = 
-SOURCES = $(sndfile_regtest_SOURCES)
-DIST_SOURCES = $(sndfile_regtest_SOURCES)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-HEADERS = $(noinst_HEADERS)
-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@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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@
-noinst_HEADERS = regtest.h
-AM_CPPFLAGS = -I$(top_srcdir)/src $(SQLITE3_CFLAGS) $(OS_SPECIFIC_CFLAGS)
-sndfile_regtest_SOURCES = sndfile-regtest.c database.c checksum.c
-sndfile_regtest_LDADD = $(top_builddir)/src/libsndfile.la $(SQLITE3_LIBS)
-CLEANFILES = *~ *.exe
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .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 regtest/Makefile'; \
-       $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu regtest/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):
-install-binPROGRAMS: $(bin_PROGRAMS)
-       @$(NORMAL_INSTALL)
-       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-       if test -n "$$list"; then \
-         echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
-       fi; \
-       for p in $$list; do echo "$$p $$p"; done | \
-       sed 's/$(EXEEXT)$$//' | \
-       while read p p1; do if test -f $$p \
-        || test -f $$p1 \
-         ; then echo "$$p"; echo "$$p"; else :; fi; \
-       done | \
-       sed -e 'p;s,.*/,,;n;h' \
-           -e 's|.*|.|' \
-           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-       sed 'N;N;N;s,\n, ,g' | \
-       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-           if ($$2 == $$4) files[d] = files[d] " " $$1; \
-           else { print "f", $$3 "/" $$4, $$1; } } \
-         END { for (d in files) print "f", d, files[d] }' | \
-       while read type dir files; do \
-           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-           test -z "$$files" || { \
-           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-           } \
-       ; done
-
-uninstall-binPROGRAMS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-       files=`for p in $$list; do echo "$$p"; done | \
-         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-             -e 's/$$/$(EXEEXT)/' \
-       `; \
-       test -n "$$list" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-       @list='$(bin_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
-
-sndfile-regtest$(EXEEXT): $(sndfile_regtest_OBJECTS) $(sndfile_regtest_DEPENDENCIES) $(EXTRA_sndfile_regtest_DEPENDENCIES) 
-       @rm -f sndfile-regtest$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sndfile_regtest_OBJECTS) $(sndfile_regtest_LDADD) $(LIBS)
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-
-distclean-compile:
-       -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checksum.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile-regtest.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 $@ $<
-
-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
-check: check-am
-all-am: Makefile $(PROGRAMS) $(HEADERS)
-installdirs:
-       for dir in "$(DESTDIR)$(bindir)"; 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:
-       -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-binPROGRAMS 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-binPROGRAMS
-
-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: uninstall-binPROGRAMS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
-       clean-binPROGRAMS 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-binPROGRAMS \
-       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 uninstall-binPROGRAMS
-
-.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:
diff --git a/regtest/Readme.txt b/regtest/Readme.txt
new file mode 100644 (file)
index 0000000..bc038d6
--- /dev/null
@@ -0,0 +1,108 @@
+sndfile-regtest
+===============
+
+The 'sndfile-regtest' program is a regression test-suite for libsndile.
+
+This program is intended to allow anyone who has an interest in the
+reliability and correctness of libsndfile to do their own regression
+testing. From the point of view of the libsndfile developers, this
+program now allows for distributed regression testing of libsndfile
+which will make libsndfile better.
+
+
+How Does it Work
+----------------
+Anyone who wishes to take part in the distributed regression testing of
+libsndfile can download the regression test program and install it.
+
+Once installed the user can start collecting files and adding them to
+their own personal database. Then, as new versions of libsndfile come
+out, the user should test the new library version against their database
+of files (instructions below).
+
+Any files which were successfully added to the database in the past but
+now fail the check with the new library version represent a regression.
+The user should then contact the libsndfile developers so that a copy
+of the test file can be made available to the developers.
+
+
+Requirements
+------------
+The regression test program uses sqlite3 as the database engine. On
+Debian, the required packages are :
+
+    sqlite3
+       libsqlite3-0
+       libsqlite3-dev
+
+but similar packages should be available on any other Linux style
+system.
+
+The regression test currently only compiles under Unix-like systems.
+At some time in the future the regression test will distributed along
+with the libsndfile source code distribution.
+
+
+Organization of Files
+---------------------
+The regession test program keeps its database file in the directory it
+is run from. In addition, the database only contains information about
+the files, not the files themselves.
+
+This means that database file should probably be kept in the same
+directory (or a directory above) the test files.
+
+
+Setting it Up for the First Time
+--------------------------------
+The sndfile-regtest program should be on your PATH. You can then cd into
+the directory where you intend to keep you test files and
+run the command:
+
+        sndfile-regtest --create-db
+
+which creates a file named '.sndfile-regtest.db' in the current directory.
+
+Files can then be added to the database using the command:
+
+        sndfile-regtest --add-file file1.wav
+
+The --add-file option allows more than one file to be added at a time
+using:
+
+        sndfile-regtest --add-file file1.wav file2.aif .....
+
+
+Checking Files
+--------------
+One or more files that have already been added to the database can be
+checked using:
+
+        sndfile-regtest --check-file file1.wav file2.aif .....
+
+It is also possible to check all files in the database using:
+
+        sndfile-regtest --check-all
+
+
+Running a Regression Test
+-------------------------
+Once you have a collection of files and a database it is possible to test
+new versions of libsndfile before you install them. If for instance you
+have just compiled a new version of libsndfile in the directory
+/usr/src/libsndfile-X.Y.Z, then you can use an existing sndfile-regtest
+binary with the new libsndfile using something like:
+
+    LD_PRELOAD=/usr/src/libsndfile-X.Y.Z/src/.libs/libsndfile.so.X.Y.Z \
+       sndfile-regtest --check-all
+
+
+Reporting Regressions
+---------------------
+Any user who finds a file which was added to the regression database with
+an earlier version of libsndfile and then fails the check with a later
+version of the library should contact the author (erikd at mega dash nerd
+dot com). If possible place the file on a web server and email the author
+a link to it.
+
+
index 28269c1..5e77ebc 100644 (file)
@@ -8,5 +8,5 @@ Description: A library for reading and writing audio files
 Requires: 
 Version: @VERSION@
 Libs: -L${libdir} -lsndfile
-Libs.private: @EXTERNAL_LIBS@
+Libs.private: @EXTERNAL_XIPH_LIBS@
 Cflags: -I${includedir} 
diff --git a/src/ALAC/ALACDecoder.h b/src/ALAC/ALACDecoder.h
new file mode 100644 (file)
index 0000000..8eb7531
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2011 Apple Inc. All rights reserved.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_START@
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License") ;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_END@
+ */
+
+/*
+       File:           ALACDecoder.h
+*/
+
+#ifndef _ALACDECODER_H
+#define _ALACDECODER_H
+
+#include <stdint.h>
+
+#include "ALACAudioTypes.h"
+
+struct BitBuffer ;
+
+class ALACDecoder
+{
+       public:
+               ALACDecoder () ;
+               ~ALACDecoder () ;
+
+               int32_t Init (void * inMagicCookie, uint32_t inMagicCookieSize) ;
+               int32_t Decode (struct BitBuffer * bits, uint8_t * sampleBuffer, uint32_t numSamples, uint32_t numChannels, uint32_t * outNumSamples) ;
+
+       public:
+               // decoding parameters (public for use in the analyzer)
+               ALACSpecificConfig              mConfig ;
+
+       protected:
+               int32_t FillElement (struct BitBuffer * bits) ;
+               int32_t DataStreamElement (struct BitBuffer * bits) ;
+
+               uint16_t                        mActiveElements ;
+
+               // decoding buffers
+               int32_t *                       mMixBufferU ;
+               int32_t *                       mMixBufferV ;
+               int32_t *                       mPredictor ;
+               uint16_t *                      mShiftBuffer ;  // note: this points to mPredictor's memory but different
+                                                                                       //               variable for clarity and type difference
+} ;
+
+#endif /* _ALACDECODER_H */
diff --git a/src/ALAC/ALACEncoder.h b/src/ALAC/ALACEncoder.h
new file mode 100644 (file)
index 0000000..eb5b79e
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2011 Apple Inc. All rights reserved.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_START@
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License") ;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_END@
+ */
+
+/*
+       File:           ALACEncoder.h
+*/
+
+#pragma once
+
+#include <stdint.h>
+
+#include "ALACAudioTypes.h"
+
+
+struct BitBuffer ;
+
+class ALACEncoder
+{
+       public :
+               ALACEncoder () ;
+               virtual ~ALACEncoder () ;
+
+               virtual int32_t Encode (AudioFormatDescription theInputFormat, AudioFormatDescription theOutputFormat,
+                                                               unsigned char * theReadBuffer, unsigned char * theWriteBuffer, int32_t * ioNumBytes) ;
+               virtual int32_t Finish () ;
+
+               void                    SetFastMode (bool fast) { mFastMode = fast ; } ;
+
+               // this must be called *before* InitializeEncoder ()
+               void                    SetFrameSize (uint32_t frameSize) { mFrameSize = frameSize ; } ;
+
+               void                    GetConfig (ALACSpecificConfig & config) ;
+               uint32_t                GetMagicCookieSize (uint32_t inNumChannels) ;
+               void                    GetMagicCookie (void * config, uint32_t * ioSize) ;
+
+               virtual int32_t InitializeEncoder (AudioFormatDescription theOutputFormat) ;
+
+       protected :
+               virtual void    GetSourceFormat (const AudioFormatDescription * source, AudioFormatDescription * output) ;
+
+               int32_t                 EncodeStereo (struct BitBuffer * bitstream, void * input, uint32_t stride, uint32_t channelIndex, uint32_t numSamples) ;
+               int32_t                 EncodeStereoFast (struct BitBuffer * bitstream, void * input, uint32_t stride, uint32_t channelIndex, uint32_t numSamples) ;
+               int32_t                 EncodeStereoEscape (struct BitBuffer * bitstream, void * input, uint32_t stride, uint32_t numSamples) ;
+               int32_t                 EncodeMono (struct BitBuffer * bitstream, void * input, uint32_t stride, uint32_t channelIndex, uint32_t numSamples) ;
+
+
+               // ALAC encoder parameters
+               int16_t                 mBitDepth ;
+               bool                    mFastMode ;
+
+               // encoding state
+               int16_t                 mLastMixRes [kALACMaxChannels] ;
+
+               // encoding buffers
+               int32_t *               mMixBufferU ;
+               int32_t *               mMixBufferV ;
+               int32_t *               mPredictorU ;
+               int32_t *               mPredictorV ;
+               uint16_t *              mShiftBufferUV ;
+
+               uint8_t *               mWorkBuffer ;
+
+               // per-channel coefficients buffers
+               int16_t                 mCoefsU [kALACMaxChannels][kALACMaxSearches][kALACMaxCoefs] ;
+               int16_t                 mCoefsV [kALACMaxChannels][kALACMaxSearches][kALACMaxCoefs] ;
+
+               // encoding statistics
+               uint32_t                mTotalBytesGenerated ;
+               uint32_t                mAvgBitRate ;
+               uint32_t                mMaxFrameBytes ;
+               uint32_t                mFrameSize ;
+               uint32_t                mMaxOutputBytes ;
+               uint32_t                mNumChannels ;
+               uint32_t                mOutputSampleRate ;
+} ;
diff --git a/src/ALAC/LICENSE b/src/ALAC/LICENSE
new file mode 100644 (file)
index 0000000..7d85954
--- /dev/null
@@ -0,0 +1,170 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical
+transformation or translation of a Source form, including but not
+limited to compiled object code, generated documentation, and
+conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object
+form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is
+provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object
+form, that is based on (or derived from) the Work and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship. For the purposes
+of this License, Derivative Works shall not include works that remain
+separable from, or merely link (or bind by name) to the interfaces of,
+the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor
+for inclusion in the Work by the copyright owner or by an individual
+or Legal Entity authorized to submit on behalf of the copyright owner.
+For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor
+or its representatives, including but not limited to communication
+on electronic mailing lists, source code control systems, and issue
+tracking systems that are managed by, or on behalf of, the Licensor
+for the purpose of discussing and improving the Work, but excluding
+communication that is conspicuously marked or otherwise designated in
+writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions
+of this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of, publicly
+display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except
+as stated in this section) patent license to make, have made, use,
+offer to sell, sell, import, and otherwise transfer the Work, where
+such license applies only to those patent claims licensable by such
+Contributor that are necessarily infringed by their Contribution(s)
+alone or by combination of their Contribution(s) with the Work to which
+such Contribution(s) was submitted. If You institute patent litigation
+against any entity (including a cross-claim or counterclaim in a
+lawsuit) alleging that the Work or a Contribution incorporated within
+the Work constitutes direct or contributory patent infringement, then
+any patent licenses granted to You under this License for that Work
+shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+Work or Derivative Works thereof in any medium, with or without
+modifications, and in Source or Object form, provided that You meet the
+following conditions:
+
+You must give any other recipients of the Work or Derivative Works a
+copy of this License; and
+
+You must cause any modified files to carry prominent notices stating
+that You changed the files; and
+
+You must retain, in the Source form of any Derivative Works that You
+distribute, all copyright, patent, trademark, and attribution notices
+from the Source form of the Work, excluding those notices that do not
+pertain to any part of the Derivative Works; and
+
+If the Work includes a "NOTICE" text file as part of its distribution,
+then any Derivative Works that You distribute must include a readable
+copy of the attribution notices contained within such NOTICE file,
+excluding those notices that do not pertain to any part of the
+Derivative Works, in at least one of the following places: within a
+NOTICE text file distributed as part of the Derivative Works; within
+the Source form or documentation, if provided along with the Derivative
+Works; or, within a display generated by the Derivative Works, if and
+wherever such third-party notices normally appear. The contents of the
+NOTICE file are for informational purposes only and do not modify the
+License. You may add Your own attribution notices within Derivative
+Works that You distribute, alongside or as an addendum to the NOTICE
+text from the Work, provided that such additional attribution notices
+cannot be construed as modifying the License. You may add Your own
+copyright statement to Your modifications and may provide additional
+or different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works as
+a whole, provided Your use, reproduction, and distribution of the Work
+otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+any Contribution intentionally submitted for inclusion in the Work by
+You to the Licensor shall be under the terms and conditions of this
+License, without any additional terms or conditions. Notwithstanding
+the above, nothing herein shall supersede or modify the terms of any
+separate license agreement you may have executed with Licensor regarding
+such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+names, trademarks, service marks, or product names of the Licensor,
+except as required for reasonable and customary use in describing the
+origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed
+to in writing, Licensor provides the Work (and each Contributor
+provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied, including, without
+limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
+solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your
+exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+whether in tort (including negligence), contract, or otherwise, unless
+required by applicable law (such as deliberate and grossly negligent
+acts) or agreed to in writing, shall any Contributor be liable to You
+for damages, including any direct, indirect, special, incidental, or
+consequential damages of any character arising as a result of this
+License or out of the use or inability to use the Work (including but
+not limited to damages for loss of goodwill, work stoppage, computer
+failure or malfunction, or any and all other commercial damages or
+losses), even if such Contributor has been advised of the possibility of
+such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the
+Work or Derivative Works thereof, You may choose to offer, and charge a
+fee for, acceptance of support, warranty, indemnity, or other liability
+obligations and/or rights consistent with this License. However, in
+accepting such obligations, You may act only on Your own behalf and
+on Your sole responsibility, not on behalf of any other Contributor,
+and only if You agree to indemnify, defend, and hold each Contributor
+harmless for any liability incurred by, or claims asserted against, such
+Contributor by reason of your accepting any such warranty or additional
+liability.
index 8fe9c12..e7e4c62 100644 (file)
@@ -34,7 +34,6 @@
 #include "aglib.h"
 #include "ALACBitUtilities.h"
 #include "ALACAudioTypes.h"
-#include "shift.h"
 
 #define CODE_TO_LONG_MAXBITS   32
 #define N_MAX_MEAN_CLAMP               0xffff
index 00e947c..2b1df19 100644 (file)
@@ -92,16 +92,6 @@ static inline int32_t ALWAYS_INLINE abs_func (int32_t a)
        return result ;
 }
 
-static inline uint32_t ALWAYS_INLINE read32bit (uint8_t * buffer)
-{
-       // embedded CPUs typically can't read unaligned 32-bit words so just read the bytes
-       uint32_t                value ;
-
-       value = ((uint32_t) buffer [0] << 24) | ((uint32_t) buffer [1] << 16) |
-                               ((uint32_t) buffer [2] << 8) | (uint32_t) buffer [3] ;
-       return value ;
-}
-
 #if PRAGMA_MARK
 #pragma mark -
 #endif
diff --git a/src/ALAC/alac_decoder.h b/src/ALAC/alac_decoder.h
new file mode 100644 (file)
index 0000000..8a43592
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2011 Apple Inc. All rights reserved.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_START@
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License") ;
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * @APPLE_APACHE_LICENSE_HEADER_END@
+ */
+
+/*
+       File:           alac_decoder.h
+*/
+
+#ifndef ALAC_DECODER_H
+#define ALAC_DECODER_H
+
+#include <stdint.h>
+
+#include "ALACAudioTypes.h"
+
+typedef enum
+{
+       false = 0,
+       ALAC_TRUE = 1
+} bool ;
+
+struct BitBuffer ;
+
+typedef struct alac_decoder
+{
+               // decoding parameters (public for use in the analyzer)
+               ALACSpecificConfig              mConfig ;
+
+               uint16_t                                        mActiveElements ;
+
+               // decoding buffers
+               int32_t *                               mMixBufferU ;
+               int32_t *                               mMixBufferV ;
+               int32_t *                               mPredictor ;
+               uint16_t *                              mShiftBuffer ;  // note: this points to mPredictor's memory but different
+                                                                                               //               variable for clarity and type difference
+} alac_decoder ;
+
+alac_decoder * alac_decoder_new (void) ;
+void alac_decoder_delete (alac_decoder *) ;
+
+int32_t        alac_init (alac_decoder *p, void * inMagicCookie, uint32_t inMagicCookieSize) ;
+int32_t        alac_decode (alac_decoder *, struct BitBuffer * bits, uint8_t * sampleBuffer, uint32_t numSamples, uint32_t numChannels, uint32_t * outNumSamples) ;
+
+#endif /* ALAC_DECODER_H */
index 830e346..599399a 100644 (file)
@@ -110,12 +110,6 @@ static const uint32_t      sChannelMaps [kALACMaxChannels] =
        (ID_SCE << 21) | (ID_CPE << 15) | (ID_CPE << 9) | (ID_CPE << 3) | (ID_SCE)
 } ;
 
-static const uint32_t sSupportediPodSampleRates [] =
-{
-       8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
-} ;
-
-
 #if PRAGMA_MARK
 #pragma mark -
 #endif
index b35cd4b..f492eab 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <assert.h>
 
 #include "gsm610_priv.h"
@@ -182,7 +183,7 @@ static void Reflection_coefficients (
         */
 
        if (L_ACF [0] == 0)
-       {       for (i = 8 ; i-- ; *r++ = 0) ;
+       {       memset (r, 0, 8 * sizeof (r [0])) ;
                return ;
                }
 
index b197e28..e7640cd 100644 (file)
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = subdir-objects
 
-AM_CPPFLAGS = $(EXTERNAL_CFLAGS)
+AM_CPPFLAGS = $(EXTERNAL_XIPH_CFLAGS)
 
 lib_LTLIBRARIES = libsndfile.la
 include_HEADERS = sndfile.hh
@@ -12,25 +12,19 @@ noinst_LTLIBRARIES =  GSM610/libgsm.la G72x/libg72x.la ALAC/libalac.la libcommon
 
 SYMBOL_FILES = Symbols.gnu-binutils Symbols.darwin libsndfile-1.def Symbols.os2 Symbols.static
 
-EXTRA_DIST = sndfile.h.in config.h.in test_endswap.tpl test_endswap.def \
+EXTRA_DIST = sndfile.h.in config.h.in test_endswap.c test_endswap.tpl test_endswap.def \
                        $(SYMBOL_FILES) create_symbols_file.py binheader_writef_check.py \
                        GSM610/README GSM610/COPYRIGHT GSM610/ChangeLog \
                        G72x/README G72x/README.original G72x/ChangeLog \
                        make-static-lib-hidden-privates.sh
 
-noinst_HEADERS = common.h sfconfig.h sfendian.h wav_w64.h sf_unistd.h ogg.h chanmap.h
+noinst_HEADERS = common.h sfconfig.h sfendian.h wavlike.h sf_unistd.h ogg.h chanmap.h
 
 check_PROGRAMS = test_main G72x/g72x_test
 
-COMMON = common.c file_io.c command.c pcm.c ulaw.c alaw.c float32.c \
-               double64.c ima_adpcm.c ms_adpcm.c gsm610.c dwvw.c vox_adpcm.c \
-               interleave.c strings.c dither.c cart.c broadcast.c audio_detect.c \
-               ima_oki_adpcm.c ima_oki_adpcm.h alac.c chunk.c ogg.c chanmap.c \
-               windows.c id3.c $(WIN_VERSION_FILE)
-
 FILESPECIFIC = sndfile.c aiff.c au.c avr.c caf.c dwd.c flac.c g72x.c htk.c ircam.c \
-               macbinary3.c macos.c mat4.c mat5.c nist.c paf.c pvf.c raw.c rx2.c sd2.c \
-               sds.c svx.c txw.c voc.c wve.c w64.c wav_w64.c wav.c xi.c mpc2k.c rf64.c \
+               macos.c mat4.c mat5.c nist.c paf.c pvf.c raw.c rx2.c sd2.c \
+               sds.c svx.c txw.c voc.c wve.c w64.c wavlike.c wav.c xi.c mpc2k.c rf64.c \
                ogg_vorbis.c ogg_speex.c ogg_pcm.c ogg_opus.c
 
 CLEANFILES = *~ *.exe G72x/*.exe error.dat
@@ -41,15 +35,25 @@ else
 WIN_VERSION_FILE =
 endif
 
+libsndfile_la_CFLAGS = $(CFLAG_VISIBILITY)
+libsndfile_la_CPPFLAGS = -DSNDFILE_EXPORTS
+
 #===============================================================================
 # MinGW requires -no-undefined if a DLL is to be built.
 libsndfile_la_LDFLAGS = -no-undefined -version-info  $(SHARED_VERSION_INFO) $(SHLIB_VERSION_ARG)
 libsndfile_la_SOURCES = $(FILESPECIFIC) $(noinst_HEADERS)
 nodist_libsndfile_la_SOURCES = $(nodist_include_HEADERS)
 libsndfile_la_LIBADD = GSM610/libgsm.la G72x/libg72x.la ALAC/libalac.la \
-               libcommon.la $(EXTERNAL_LIBS) -lm
+               libcommon.la $(EXTERNAL_XIPH_LIBS) -lm
+
+EXTRA_libsndfile_la_DEPENDENCIES = $(SYMBOL_FILES)
+
+libcommon_la_SOURCES = common.c file_io.c command.c pcm.c ulaw.c alaw.c \
+               float32.c double64.c ima_adpcm.c ms_adpcm.c gsm610.c dwvw.c vox_adpcm.c \
+               interleave.c strings.c dither.c cart.c broadcast.c audio_detect.c \
+               ima_oki_adpcm.c ima_oki_adpcm.h alac.c chunk.c ogg.c chanmap.c \
+               windows.c id3.c $(WIN_VERSION_FILE)
 
-libcommon_la_SOURCES = $(COMMON)
 
 #======================================================================
 # Subdir libraries.
@@ -75,16 +79,17 @@ ALAC_libalac_la_SOURCES = ALAC/ALACAudioTypes.h ALAC/ALACBitUtilities.h \
 
 test_main_SOURCES = test_main.c test_main.h test_conversions.c test_float.c test_endswap.c \
                                        test_audio_detect.c test_log_printf.c test_file_io.c test_ima_oki_adpcm.c \
-                                       test_strncpy_crlf.c test_broadcast_var.c test_cart_var.c
+                                       test_strncpy_crlf.c test_broadcast_var.c test_cart_var.c \
+                                       test_binheader_writef.c
 test_main_LDADD = libcommon.la
 
 G72x_g72x_test_SOURCES = G72x/g72x_test.c
 G72x_g72x_test_LDADD = G72x/libg72x.la
 
-test_endswap.c: test_endswap.def test_endswap.tpl
-       cd $(srcdir) && autogen --writable test_endswap.def && cd $(abs_builddir)
+SUFFIXES = .def .tpl
 
-genfiles : $(SYMBOL_FILES) test_endswap.c
+.def.c:
+       autogen --writable $<
 
 check :
        @if [ -x /usr/bin/python ]; then $(srcdir)/binheader_writef_check.py $(srcdir)/*.c ; fi
@@ -114,9 +119,6 @@ Symbols.os2: create_symbols_file.py
 Symbols.static: create_symbols_file.py
        python $(srcdir)/create_symbols_file.py static $(VERSION) > $@
 
-# Fake dependancy to force the creation of these files.
-sndfile.o : $(SYMBOL_FILES)
-
 #======================================================================
 # Building windows resource files (if needed).
 
diff --git a/src/Makefile.in b/src/Makefile.in
deleted file mode 100644 (file)
index 4fe8aab..0000000
+++ /dev/null
@@ -1,1182 +0,0 @@
-# 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 = test_main$(EXEEXT) G72x/g72x_test$(EXEEXT)
-subdir = src
-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/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)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
-       $(noinst_HEADERS) $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = version-metadata.rc sndfile.h
-CONFIG_CLEAN_VPATH_FILES =
-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)$(libdir)" "$(DESTDIR)$(includedir)" \
-       "$(DESTDIR)$(includedir)"
-LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
-ALAC_libalac_la_LIBADD =
-am__dirstamp = $(am__leading_dot)dirstamp
-am_ALAC_libalac_la_OBJECTS = ALAC/ALACBitUtilities.lo ALAC/ag_dec.lo \
-       ALAC/ag_enc.lo ALAC/dp_dec.lo ALAC/dp_enc.lo \
-       ALAC/matrix_dec.lo ALAC/matrix_enc.lo ALAC/alac_decoder.lo \
-       ALAC/alac_encoder.lo
-ALAC_libalac_la_OBJECTS = $(am_ALAC_libalac_la_OBJECTS)
-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 = 
-G72x_libg72x_la_LIBADD =
-am_G72x_libg72x_la_OBJECTS = G72x/g721.lo G72x/g723_16.lo \
-       G72x/g723_24.lo G72x/g723_40.lo G72x/g72x.lo
-G72x_libg72x_la_OBJECTS = $(am_G72x_libg72x_la_OBJECTS)
-GSM610_libgsm_la_LIBADD =
-am_GSM610_libgsm_la_OBJECTS = GSM610/add.lo GSM610/code.lo \
-       GSM610/decode.lo GSM610/gsm_create.lo GSM610/gsm_decode.lo \
-       GSM610/gsm_destroy.lo GSM610/gsm_encode.lo \
-       GSM610/gsm_option.lo GSM610/long_term.lo GSM610/lpc.lo \
-       GSM610/preprocess.lo GSM610/rpe.lo GSM610/short_term.lo \
-       GSM610/table.lo
-GSM610_libgsm_la_OBJECTS = $(am_GSM610_libgsm_la_OBJECTS)
-libcommon_la_LIBADD =
-am__libcommon_la_SOURCES_DIST = common.c file_io.c command.c pcm.c \
-       ulaw.c alaw.c float32.c double64.c ima_adpcm.c ms_adpcm.c \
-       gsm610.c dwvw.c vox_adpcm.c interleave.c strings.c dither.c \
-       cart.c broadcast.c audio_detect.c ima_oki_adpcm.c \
-       ima_oki_adpcm.h alac.c chunk.c ogg.c chanmap.c windows.c id3.c \
-       version-metadata.rc
-@USE_WIN_VERSION_FILE_TRUE@am__objects_1 = version-metadata.lo
-am__objects_2 = common.lo file_io.lo command.lo pcm.lo ulaw.lo alaw.lo \
-       float32.lo double64.lo ima_adpcm.lo ms_adpcm.lo gsm610.lo \
-       dwvw.lo vox_adpcm.lo interleave.lo strings.lo dither.lo \
-       cart.lo broadcast.lo audio_detect.lo ima_oki_adpcm.lo alac.lo \
-       chunk.lo ogg.lo chanmap.lo windows.lo id3.lo $(am__objects_1)
-am_libcommon_la_OBJECTS = $(am__objects_2)
-libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS)
-am__DEPENDENCIES_1 =
-libsndfile_la_DEPENDENCIES = GSM610/libgsm.la G72x/libg72x.la \
-       ALAC/libalac.la libcommon.la $(am__DEPENDENCIES_1)
-am__objects_3 = sndfile.lo aiff.lo au.lo avr.lo caf.lo dwd.lo flac.lo \
-       g72x.lo htk.lo ircam.lo macbinary3.lo macos.lo mat4.lo mat5.lo \
-       nist.lo paf.lo pvf.lo raw.lo rx2.lo sd2.lo sds.lo svx.lo \
-       txw.lo voc.lo wve.lo w64.lo wav_w64.lo wav.lo xi.lo mpc2k.lo \
-       rf64.lo ogg_vorbis.lo ogg_speex.lo ogg_pcm.lo ogg_opus.lo
-am__objects_4 =
-am_libsndfile_la_OBJECTS = $(am__objects_3) $(am__objects_4)
-nodist_libsndfile_la_OBJECTS = $(am__objects_4)
-libsndfile_la_OBJECTS = $(am_libsndfile_la_OBJECTS) \
-       $(nodist_libsndfile_la_OBJECTS)
-libsndfile_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-       $(libsndfile_la_LDFLAGS) $(LDFLAGS) -o $@
-am_G72x_g72x_test_OBJECTS = G72x/g72x_test.$(OBJEXT)
-G72x_g72x_test_OBJECTS = $(am_G72x_g72x_test_OBJECTS)
-G72x_g72x_test_DEPENDENCIES = G72x/libg72x.la
-am_test_main_OBJECTS = test_main.$(OBJEXT) test_conversions.$(OBJEXT) \
-       test_float.$(OBJEXT) test_endswap.$(OBJEXT) \
-       test_audio_detect.$(OBJEXT) test_log_printf.$(OBJEXT) \
-       test_file_io.$(OBJEXT) test_ima_oki_adpcm.$(OBJEXT) \
-       test_strncpy_crlf.$(OBJEXT) test_broadcast_var.$(OBJEXT) \
-       test_cart_var.$(OBJEXT)
-test_main_OBJECTS = $(am_test_main_OBJECTS)
-test_main_DEPENDENCIES = libcommon.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@
-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 = 
-SOURCES = $(ALAC_libalac_la_SOURCES) $(G72x_libg72x_la_SOURCES) \
-       $(GSM610_libgsm_la_SOURCES) $(libcommon_la_SOURCES) \
-       $(libsndfile_la_SOURCES) $(nodist_libsndfile_la_SOURCES) \
-       $(G72x_g72x_test_SOURCES) $(test_main_SOURCES)
-DIST_SOURCES = $(ALAC_libalac_la_SOURCES) $(G72x_libg72x_la_SOURCES) \
-       $(GSM610_libgsm_la_SOURCES) $(am__libcommon_la_SOURCES_DIST) \
-       $(libsndfile_la_SOURCES) $(G72x_g72x_test_SOURCES) \
-       $(test_main_SOURCES)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) \
-       $(noinst_HEADERS)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
-       $(LISP)config.h.in
-# 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 $(srcdir)/config.h.in \
-       $(srcdir)/sndfile.h.in $(srcdir)/version-metadata.rc.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@
-
-#======================================================================
-# Disable autoheader.
-AUTOHEADER = echo
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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@
-AUTOMAKE_OPTIONS = subdir-objects
-AM_CPPFLAGS = $(EXTERNAL_CFLAGS)
-lib_LTLIBRARIES = libsndfile.la
-include_HEADERS = sndfile.hh
-nodist_include_HEADERS = sndfile.h
-noinst_LTLIBRARIES = GSM610/libgsm.la G72x/libg72x.la ALAC/libalac.la libcommon.la
-SYMBOL_FILES = Symbols.gnu-binutils Symbols.darwin libsndfile-1.def Symbols.os2 Symbols.static
-EXTRA_DIST = sndfile.h.in config.h.in test_endswap.tpl test_endswap.def \
-                       $(SYMBOL_FILES) create_symbols_file.py binheader_writef_check.py \
-                       GSM610/README GSM610/COPYRIGHT GSM610/ChangeLog \
-                       G72x/README G72x/README.original G72x/ChangeLog \
-                       make-static-lib-hidden-privates.sh
-
-noinst_HEADERS = common.h sfconfig.h sfendian.h wav_w64.h sf_unistd.h ogg.h chanmap.h
-COMMON = common.c file_io.c command.c pcm.c ulaw.c alaw.c float32.c \
-               double64.c ima_adpcm.c ms_adpcm.c gsm610.c dwvw.c vox_adpcm.c \
-               interleave.c strings.c dither.c cart.c broadcast.c audio_detect.c \
-               ima_oki_adpcm.c ima_oki_adpcm.h alac.c chunk.c ogg.c chanmap.c \
-               windows.c id3.c $(WIN_VERSION_FILE)
-
-FILESPECIFIC = sndfile.c aiff.c au.c avr.c caf.c dwd.c flac.c g72x.c htk.c ircam.c \
-               macbinary3.c macos.c mat4.c mat5.c nist.c paf.c pvf.c raw.c rx2.c sd2.c \
-               sds.c svx.c txw.c voc.c wve.c w64.c wav_w64.c wav.c xi.c mpc2k.c rf64.c \
-               ogg_vorbis.c ogg_speex.c ogg_pcm.c ogg_opus.c
-
-CLEANFILES = *~ *.exe G72x/*.exe error.dat
-@USE_WIN_VERSION_FILE_FALSE@WIN_VERSION_FILE = 
-@USE_WIN_VERSION_FILE_TRUE@WIN_VERSION_FILE = version-metadata.rc
-
-#===============================================================================
-# MinGW requires -no-undefined if a DLL is to be built.
-libsndfile_la_LDFLAGS = -no-undefined -version-info  $(SHARED_VERSION_INFO) $(SHLIB_VERSION_ARG)
-libsndfile_la_SOURCES = $(FILESPECIFIC) $(noinst_HEADERS)
-nodist_libsndfile_la_SOURCES = $(nodist_include_HEADERS)
-libsndfile_la_LIBADD = GSM610/libgsm.la G72x/libg72x.la ALAC/libalac.la \
-               libcommon.la $(EXTERNAL_LIBS) -lm
-
-libcommon_la_SOURCES = $(COMMON)
-
-#======================================================================
-# Subdir libraries.
-GSM610_libgsm_la_SOURCES = GSM610/config.h GSM610/gsm.h GSM610/gsm610_priv.h \
-               GSM610/add.c GSM610/code.c GSM610/decode.c GSM610/gsm_create.c \
-               GSM610/gsm_decode.c GSM610/gsm_destroy.c GSM610/gsm_encode.c \
-               GSM610/gsm_option.c GSM610/long_term.c GSM610/lpc.c GSM610/preprocess.c \
-               GSM610/rpe.c GSM610/short_term.c GSM610/table.c
-
-G72x_libg72x_la_SOURCES = G72x/g72x.h G72x/g72x_priv.h \
-               G72x/g721.c G72x/g723_16.c G72x/g723_24.c G72x/g723_40.c G72x/g72x.c
-
-ALAC_libalac_la_SOURCES = ALAC/ALACAudioTypes.h ALAC/ALACBitUtilities.h \
-               ALAC/EndianPortable.h ALAC/aglib.h ALAC/dplib.h ALAC/matrixlib.h \
-               ALAC/alac_codec.h ALAC/shift.h \
-               ALAC/ALACBitUtilities.c ALAC/ag_dec.c \
-               ALAC/ag_enc.c ALAC/dp_dec.c ALAC/dp_enc.c ALAC/matrix_dec.c \
-               ALAC/matrix_enc.c ALAC/alac_decoder.c ALAC/alac_encoder.c
-
-
-#===============================================================================
-# Test programs.
-test_main_SOURCES = test_main.c test_main.h test_conversions.c test_float.c test_endswap.c \
-                                       test_audio_detect.c test_log_printf.c test_file_io.c test_ima_oki_adpcm.c \
-                                       test_strncpy_crlf.c test_broadcast_var.c test_cart_var.c
-
-test_main_LDADD = libcommon.la
-G72x_g72x_test_SOURCES = G72x/g72x_test.c
-G72x_g72x_test_LDADD = G72x/libg72x.la
-all: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj .rc
-$(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 src/Makefile'; \
-       $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu src/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):
-
-config.h: stamp-h1
-       @test -f $@ || rm -f stamp-h1
-       @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
-
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
-       @rm -f stamp-h1
-       cd $(top_builddir) && $(SHELL) ./config.status src/config.h
-$(srcdir)/config.h.in:  $(am__configure_deps) 
-       ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
-       rm -f stamp-h1
-       touch $@
-
-distclean-hdr:
-       -rm -f config.h stamp-h1
-version-metadata.rc: $(top_builddir)/config.status $(srcdir)/version-metadata.rc.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-sndfile.h: $(top_builddir)/config.status $(srcdir)/sndfile.h.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-       @$(NORMAL_INSTALL)
-       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-       list2=; for p in $$list; do \
-         if test -f $$p; then \
-           list2="$$list2 $$p"; \
-         else :; fi; \
-       done; \
-       test -z "$$list2" || { \
-         echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
-         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
-         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
-       }
-
-uninstall-libLTLIBRARIES:
-       @$(NORMAL_UNINSTALL)
-       @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-       for p in $$list; do \
-         $(am__strip_dir) \
-         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
-         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
-       done
-
-clean-libLTLIBRARIES:
-       -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-       @list='$(lib_LTLIBRARIES)'; \
-       locs=`for p in $$list; do echo $$p; done | \
-             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
-             sort -u`; \
-       test -z "$$locs" || { \
-         echo rm -f $${locs}; \
-         rm -f $${locs}; \
-       }
-
-clean-noinstLTLIBRARIES:
-       -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
-       @list='$(noinst_LTLIBRARIES)'; \
-       locs=`for p in $$list; do echo $$p; done | \
-             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
-             sort -u`; \
-       test -z "$$locs" || { \
-         echo rm -f $${locs}; \
-         rm -f $${locs}; \
-       }
-ALAC/$(am__dirstamp):
-       @$(MKDIR_P) ALAC
-       @: > ALAC/$(am__dirstamp)
-ALAC/$(DEPDIR)/$(am__dirstamp):
-       @$(MKDIR_P) ALAC/$(DEPDIR)
-       @: > ALAC/$(DEPDIR)/$(am__dirstamp)
-ALAC/ALACBitUtilities.lo: ALAC/$(am__dirstamp) \
-       ALAC/$(DEPDIR)/$(am__dirstamp)
-ALAC/ag_dec.lo: ALAC/$(am__dirstamp) ALAC/$(DEPDIR)/$(am__dirstamp)
-ALAC/ag_enc.lo: ALAC/$(am__dirstamp) ALAC/$(DEPDIR)/$(am__dirstamp)
-ALAC/dp_dec.lo: ALAC/$(am__dirstamp) ALAC/$(DEPDIR)/$(am__dirstamp)
-ALAC/dp_enc.lo: ALAC/$(am__dirstamp) ALAC/$(DEPDIR)/$(am__dirstamp)
-ALAC/matrix_dec.lo: ALAC/$(am__dirstamp) \
-       ALAC/$(DEPDIR)/$(am__dirstamp)
-ALAC/matrix_enc.lo: ALAC/$(am__dirstamp) \
-       ALAC/$(DEPDIR)/$(am__dirstamp)
-ALAC/alac_decoder.lo: ALAC/$(am__dirstamp) \
-       ALAC/$(DEPDIR)/$(am__dirstamp)
-ALAC/alac_encoder.lo: ALAC/$(am__dirstamp) \
-       ALAC/$(DEPDIR)/$(am__dirstamp)
-
-ALAC/libalac.la: $(ALAC_libalac_la_OBJECTS) $(ALAC_libalac_la_DEPENDENCIES) $(EXTRA_ALAC_libalac_la_DEPENDENCIES) ALAC/$(am__dirstamp)
-       $(AM_V_CCLD)$(LINK)  $(ALAC_libalac_la_OBJECTS) $(ALAC_libalac_la_LIBADD) $(LIBS)
-G72x/$(am__dirstamp):
-       @$(MKDIR_P) G72x
-       @: > G72x/$(am__dirstamp)
-G72x/$(DEPDIR)/$(am__dirstamp):
-       @$(MKDIR_P) G72x/$(DEPDIR)
-       @: > G72x/$(DEPDIR)/$(am__dirstamp)
-G72x/g721.lo: G72x/$(am__dirstamp) G72x/$(DEPDIR)/$(am__dirstamp)
-G72x/g723_16.lo: G72x/$(am__dirstamp) G72x/$(DEPDIR)/$(am__dirstamp)
-G72x/g723_24.lo: G72x/$(am__dirstamp) G72x/$(DEPDIR)/$(am__dirstamp)
-G72x/g723_40.lo: G72x/$(am__dirstamp) G72x/$(DEPDIR)/$(am__dirstamp)
-G72x/g72x.lo: G72x/$(am__dirstamp) G72x/$(DEPDIR)/$(am__dirstamp)
-
-G72x/libg72x.la: $(G72x_libg72x_la_OBJECTS) $(G72x_libg72x_la_DEPENDENCIES) $(EXTRA_G72x_libg72x_la_DEPENDENCIES) G72x/$(am__dirstamp)
-       $(AM_V_CCLD)$(LINK)  $(G72x_libg72x_la_OBJECTS) $(G72x_libg72x_la_LIBADD) $(LIBS)
-GSM610/$(am__dirstamp):
-       @$(MKDIR_P) GSM610
-       @: > GSM610/$(am__dirstamp)
-GSM610/$(DEPDIR)/$(am__dirstamp):
-       @$(MKDIR_P) GSM610/$(DEPDIR)
-       @: > GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/add.lo: GSM610/$(am__dirstamp) GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/code.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/decode.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/gsm_create.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/gsm_decode.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/gsm_destroy.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/gsm_encode.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/gsm_option.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/long_term.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/lpc.lo: GSM610/$(am__dirstamp) GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/preprocess.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/rpe.lo: GSM610/$(am__dirstamp) GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/short_term.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-GSM610/table.lo: GSM610/$(am__dirstamp) \
-       GSM610/$(DEPDIR)/$(am__dirstamp)
-
-GSM610/libgsm.la: $(GSM610_libgsm_la_OBJECTS) $(GSM610_libgsm_la_DEPENDENCIES) $(EXTRA_GSM610_libgsm_la_DEPENDENCIES) GSM610/$(am__dirstamp)
-       $(AM_V_CCLD)$(LINK)  $(GSM610_libgsm_la_OBJECTS) $(GSM610_libgsm_la_LIBADD) $(LIBS)
-
-libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_libcommon_la_DEPENDENCIES) 
-       $(AM_V_CCLD)$(LINK)  $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS)
-
-libsndfile.la: $(libsndfile_la_OBJECTS) $(libsndfile_la_DEPENDENCIES) $(EXTRA_libsndfile_la_DEPENDENCIES) 
-       $(AM_V_CCLD)$(libsndfile_la_LINK) -rpath $(libdir) $(libsndfile_la_OBJECTS) $(libsndfile_la_LIBADD) $(LIBS)
-
-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
-G72x/g72x_test.$(OBJEXT): G72x/$(am__dirstamp) \
-       G72x/$(DEPDIR)/$(am__dirstamp)
-
-G72x/g72x_test$(EXEEXT): $(G72x_g72x_test_OBJECTS) $(G72x_g72x_test_DEPENDENCIES) $(EXTRA_G72x_g72x_test_DEPENDENCIES) G72x/$(am__dirstamp)
-       @rm -f G72x/g72x_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(G72x_g72x_test_OBJECTS) $(G72x_g72x_test_LDADD) $(LIBS)
-
-test_main$(EXEEXT): $(test_main_OBJECTS) $(test_main_DEPENDENCIES) $(EXTRA_test_main_DEPENDENCIES) 
-       @rm -f test_main$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(test_main_OBJECTS) $(test_main_LDADD) $(LIBS)
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-       -rm -f ALAC/*.$(OBJEXT)
-       -rm -f ALAC/*.lo
-       -rm -f G72x/*.$(OBJEXT)
-       -rm -f G72x/*.lo
-       -rm -f GSM610/*.$(OBJEXT)
-       -rm -f GSM610/*.lo
-
-distclean-compile:
-       -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aiff.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alac.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alaw.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/au.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio_detect.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/avr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/broadcast.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cart.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chanmap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chunk.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/double64.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwd.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwvw.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file_io.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flac.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float32.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/g72x.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gsm610.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htk.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id3.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ima_adpcm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ima_oki_adpcm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interleave.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ircam.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macbinary3.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/macos.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mat4.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mat5.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpc2k.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ms_adpcm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ogg.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ogg_opus.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ogg_pcm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ogg_speex.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ogg_vorbis.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pvf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rf64.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rx2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sd2.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sds.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sndfile.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strings.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svx.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_audio_detect.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_broadcast_var.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cart_var.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_conversions.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_endswap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_file_io.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_float.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ima_oki_adpcm.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_log_printf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_strncpy_crlf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txw.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulaw.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/voc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vox_adpcm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/w64.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wav.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wav_w64.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wve.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xi.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ALAC/$(DEPDIR)/ALACBitUtilities.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ALAC/$(DEPDIR)/ag_dec.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ALAC/$(DEPDIR)/ag_enc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ALAC/$(DEPDIR)/alac_decoder.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ALAC/$(DEPDIR)/alac_encoder.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ALAC/$(DEPDIR)/dp_dec.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ALAC/$(DEPDIR)/dp_enc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ALAC/$(DEPDIR)/matrix_dec.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@ALAC/$(DEPDIR)/matrix_enc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@G72x/$(DEPDIR)/g721.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@G72x/$(DEPDIR)/g723_16.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@G72x/$(DEPDIR)/g723_24.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@G72x/$(DEPDIR)/g723_40.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@G72x/$(DEPDIR)/g72x.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@G72x/$(DEPDIR)/g72x_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/add.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/code.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/decode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/gsm_create.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/gsm_decode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/gsm_destroy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/gsm_encode.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/gsm_option.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/long_term.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/lpc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/preprocess.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/rpe.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/short_term.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GSM610/$(DEPDIR)/table.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@   $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.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)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.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)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@   $(am__mv) $$depbase.Tpo $$depbase.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 $@ $<
-
-mostlyclean-libtool:
-       -rm -f *.lo
-
-clean-libtool:
-       -rm -rf .libs _libs
-       -rm -rf ALAC/.libs ALAC/_libs
-       -rm -rf G72x/.libs G72x/_libs
-       -rm -rf GSM610/.libs GSM610/_libs
-install-includeHEADERS: $(include_HEADERS)
-       @$(NORMAL_INSTALL)
-       @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
-       if test -n "$$list"; then \
-         echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(includedir)" || 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_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
-         $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
-       done
-
-uninstall-includeHEADERS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
-install-nodist_includeHEADERS: $(nodist_include_HEADERS)
-       @$(NORMAL_INSTALL)
-       @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
-       if test -n "$$list"; then \
-         echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(includedir)" || 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_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
-         $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
-       done
-
-uninstall-nodist_includeHEADERS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
-       files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-       dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
-
-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 $(LTLIBRARIES) $(HEADERS) config.h
-installdirs:
-       for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; 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:
-       -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)
-       -rm -f ALAC/$(DEPDIR)/$(am__dirstamp)
-       -rm -f ALAC/$(am__dirstamp)
-       -rm -f G72x/$(DEPDIR)/$(am__dirstamp)
-       -rm -f G72x/$(am__dirstamp)
-       -rm -f GSM610/$(DEPDIR)/$(am__dirstamp)
-       -rm -f GSM610/$(am__dirstamp)
-
-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-libLTLIBRARIES \
-       clean-libtool clean-noinstLTLIBRARIES mostlyclean-am
-
-distclean: distclean-am
-       -rm -rf ./$(DEPDIR) ALAC/$(DEPDIR) G72x/$(DEPDIR) GSM610/$(DEPDIR)
-       -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
-       distclean-hdr distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-includeHEADERS install-nodist_includeHEADERS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-libLTLIBRARIES
-
-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) ALAC/$(DEPDIR) G72x/$(DEPDIR) GSM610/$(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: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
-       uninstall-nodist_includeHEADERS
-
-.MAKE: all check-am install-am install-strip
-
-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
-       clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
-       clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
-       ctags-am distclean distclean-compile distclean-generic \
-       distclean-hdr 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-includeHEADERS install-info install-info-am \
-       install-libLTLIBRARIES install-man \
-       install-nodist_includeHEADERS 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 uninstall-includeHEADERS \
-       uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS
-
-.PRECIOUS: Makefile
-
-
-test_endswap.c: test_endswap.def test_endswap.tpl
-       cd $(srcdir) && autogen --writable test_endswap.def && cd $(abs_builddir)
-
-genfiles : $(SYMBOL_FILES) test_endswap.c
-
-check :
-       @if [ -x /usr/bin/python ]; then $(srcdir)/binheader_writef_check.py $(srcdir)/*.c ; fi
-       G72x/g72x_test$(EXEEXT) all
-       ./test_main$(EXEEXT)
-
-# Need this target to force building of test programs.
-checkprograms : $(check_PROGRAMS)
-
-#======================================================================
-# Generate an OS specific Symbols files. This is done when the author
-# builds the distribution tarball. There should be not need for the
-# end user to create these files.
-
-Symbols.gnu-binutils: create_symbols_file.py
-       python $(srcdir)/create_symbols_file.py linux $(VERSION) > $@
-
-Symbols.darwin: create_symbols_file.py
-       python $(srcdir)/create_symbols_file.py darwin $(VERSION) > $@
-
-libsndfile-1.def: create_symbols_file.py
-       python $(srcdir)/create_symbols_file.py win32 $(VERSION) > $@
-
-Symbols.os2: create_symbols_file.py
-       python $(srcdir)/create_symbols_file.py os2 $(VERSION) > $@
-
-Symbols.static: create_symbols_file.py
-       python $(srcdir)/create_symbols_file.py static $(VERSION) > $@
-
-# Fake dependancy to force the creation of these files.
-sndfile.o : $(SYMBOL_FILES)
-
-#======================================================================
-# Building windows resource files (if needed).
-
-.rc.lo:
-       $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) $< -o $@
-
-# 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:
diff --git a/src/Symbols.darwin b/src/Symbols.darwin
deleted file mode 100644 (file)
index 3c1d1e7..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# Auto-generated by create_symbols_file.py
-
-_sf_command
-_sf_open
-_sf_close
-_sf_seek
-_sf_error
-_sf_perror
-_sf_error_str
-_sf_error_number
-_sf_format_check
-_sf_read_raw
-_sf_readf_short
-_sf_readf_int
-_sf_readf_float
-_sf_readf_double
-_sf_read_short
-_sf_read_int
-_sf_read_float
-_sf_read_double
-_sf_write_raw
-_sf_writef_short
-_sf_writef_int
-_sf_writef_float
-_sf_writef_double
-_sf_write_short
-_sf_write_int
-_sf_write_float
-_sf_write_double
-_sf_strerror
-_sf_get_string
-_sf_set_string
-_sf_version_string
-_sf_open_fd
-_sf_open_virtual
-_sf_write_sync
-_sf_set_chunk
-_sf_get_chunk_size
-_sf_get_chunk_data
-_sf_get_chunk_iterator
-_sf_next_chunk_iterator
-_sf_current_byterate
-
diff --git a/src/Symbols.gnu-binutils b/src/Symbols.gnu-binutils
deleted file mode 100644 (file)
index 63c7310..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# Auto-generated by create_symbols_file.py
-
-libsndfile.so.1.0
-{
-  global:
-    sf_command ;
-    sf_open ;
-    sf_close ;
-    sf_seek ;
-    sf_error ;
-    sf_perror ;
-    sf_error_str ;
-    sf_error_number ;
-    sf_format_check ;
-    sf_read_raw ;
-    sf_readf_short ;
-    sf_readf_int ;
-    sf_readf_float ;
-    sf_readf_double ;
-    sf_read_short ;
-    sf_read_int ;
-    sf_read_float ;
-    sf_read_double ;
-    sf_write_raw ;
-    sf_writef_short ;
-    sf_writef_int ;
-    sf_writef_float ;
-    sf_writef_double ;
-    sf_write_short ;
-    sf_write_int ;
-    sf_write_float ;
-    sf_write_double ;
-    sf_strerror ;
-    sf_get_string ;
-    sf_set_string ;
-    sf_version_string ;
-    sf_open_fd ;
-    sf_open_virtual ;
-    sf_write_sync ;
-    sf_set_chunk ;
-    sf_get_chunk_size ;
-    sf_get_chunk_data ;
-    sf_get_chunk_iterator ;
-    sf_next_chunk_iterator ;
-    sf_current_byterate ;
-  local:
-    * ;
-} ;
-
diff --git a/src/Symbols.os2 b/src/Symbols.os2
deleted file mode 100644 (file)
index f2fdfed..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-; Auto-generated by create_symbols_file.py
-
-LIBRARY sndfile1
-INITINSTANCE TERMINSTANCE
-CODE PRELOAD MOVEABLE DISCARDABLE
-DATA PRELOAD MOVEABLE MULTIPLE NONSHARED
-EXPORTS
-
-_sf_command           @1
-_sf_open              @2
-_sf_close             @3
-_sf_seek              @4
-_sf_error             @7
-_sf_perror            @8
-_sf_error_str         @9
-_sf_error_number      @10
-_sf_format_check      @11
-_sf_read_raw          @16
-_sf_readf_short       @17
-_sf_readf_int         @18
-_sf_readf_float       @19
-_sf_readf_double      @20
-_sf_read_short        @21
-_sf_read_int          @22
-_sf_read_float        @23
-_sf_read_double       @24
-_sf_write_raw         @32
-_sf_writef_short      @33
-_sf_writef_int        @34
-_sf_writef_float      @35
-_sf_writef_double     @36
-_sf_write_short       @37
-_sf_write_int         @38
-_sf_write_float       @39
-_sf_write_double      @40
-_sf_strerror          @50
-_sf_get_string        @60
-_sf_set_string        @61
-_sf_version_string    @68
-_sf_open_fd           @70
-_sf_open_virtual      @80
-_sf_write_sync        @90
-_sf_set_chunk         @100
-_sf_get_chunk_size    @101
-_sf_get_chunk_data    @102
-_sf_get_chunk_iterator @103
-_sf_next_chunk_iterator @104
-_sf_current_byterate  @110
-
diff --git a/src/Symbols.static b/src/Symbols.static
deleted file mode 100644 (file)
index 6b83a72..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-sf_command
-sf_open
-sf_close
-sf_seek
-sf_error
-sf_perror
-sf_error_str
-sf_error_number
-sf_format_check
-sf_read_raw
-sf_readf_short
-sf_readf_int
-sf_readf_float
-sf_readf_double
-sf_read_short
-sf_read_int
-sf_read_float
-sf_read_double
-sf_write_raw
-sf_writef_short
-sf_writef_int
-sf_writef_float
-sf_writef_double
-sf_write_short
-sf_write_int
-sf_write_float
-sf_write_double
-sf_strerror
-sf_get_string
-sf_set_string
-sf_version_string
-sf_open_fd
-sf_wchar_open
-sf_open_virtual
-sf_write_sync
-sf_set_chunk
-sf_get_chunk_size
-sf_get_chunk_data
-sf_get_chunk_iterator
-sf_next_chunk_iterator
-sf_current_byterate
index a4c9b66..6352247 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2005 David Viens <davidv@plogue.com>
 **
 ** This program is free software; you can redistribute it and/or modify
@@ -123,34 +123,34 @@ enum
 } ;
 
 typedef struct
-{      unsigned int    size ;
-       short                   numChannels ;
-       unsigned int    numSampleFrames ;
-       short                   sampleSize ;
-       unsigned char   sampleRate [10] ;
-       unsigned int    encoding ;
+{      uint32_t        size ;
+       int16_t         numChannels ;
+       uint32_t        numSampleFrames ;
+       int16_t         sampleSize ;
+       uint8_t         sampleRate [10] ;
+       uint32_t        encoding ;
        char                    zero_bytes [2] ;
 } COMM_CHUNK ;
 
 typedef struct
-{      unsigned int    offset ;
-       unsigned int    blocksize ;
+{      uint32_t        offset ;
+       uint32_t        blocksize ;
 } SSND_CHUNK ;
 
 typedef struct
-{      short                   playMode ;
-       unsigned short  beginLoop ;
-       unsigned short  endLoop ;
+{      int16_t         playMode ;
+       uint16_t        beginLoop ;
+       uint16_t        endLoop ;
 } INST_LOOP ;
 
 typedef struct
-{      char            baseNote ;              /* all notes are MIDI note numbers */
-       char            detune ;                /* cents off, only -50 to +50 are significant */
-       char            lowNote ;
-       char            highNote ;
-       char            lowVelocity ;   /* 1 to 127 */
-       char            highVelocity ;  /* 1 to 127 */
-       short           gain ;                  /* in dB, 0 is normal */
+{      int8_t          baseNote ;              /* all notes are MIDI note numbers */
+       int8_t          detune ;                /* cents off, only -50 to +50 are significant */
+       int8_t          lowNote ;
+       int8_t          highNote ;
+       int8_t          lowVelocity ;   /* 1 to 127 */
+       int8_t          highVelocity ;  /* 1 to 127 */
+       int16_t         gain ;                  /* in dB, 0 is normal */
        INST_LOOP       sustain_loop ;
        INST_LOOP       release_loop ;
 } INST_CHUNK ;
@@ -170,25 +170,25 @@ enum
 
 
 typedef struct
-{      unsigned int    version ;
-       unsigned int    numBeats ;
-       unsigned short  rootNote ;
-       unsigned short  scaleType ;
-       unsigned short  sigNumerator ;
-       unsigned short  sigDenominator ;
-       unsigned short  loopType ;
+{      uint32_t        version ;
+       uint32_t        numBeats ;
+       uint16_t        rootNote ;
+       uint16_t        scaleType ;
+       uint16_t        sigNumerator ;
+       uint16_t        sigDenominator ;
+       uint16_t        loopType ;
 } basc_CHUNK ;
 
 typedef struct
-{      unsigned short  markerID ;
-       unsigned int    position ;
+{      uint16_t        markerID ;
+       uint32_t        position ;
 } MARK_ID_POS ;
 
 typedef struct
 {      sf_count_t      comm_offset ;
        sf_count_t      ssnd_offset ;
 
-       int chanmap_tag ;
+       int32_t         chanmap_tag ;
 
        MARK_ID_POS *markstr ;
 } AIFF_PRIVATE ;
@@ -199,8 +199,8 @@ typedef struct
 
 static int     aiff_close (SF_PRIVATE *psf) ;
 
-static int     tenbytefloat2int (unsigned char *bytes) ;
-static void uint2tenbytefloat (unsigned int num, unsigned char *bytes) ;
+static int     tenbytefloat2int (uint8_t *bytes) ;
+static void uint2tenbytefloat (uint32_t num, uint8_t *bytes) ;
 
 static int     aiff_read_comm_chunk (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt) ;
 
@@ -212,15 +212,15 @@ static void       aiff_write_strings (SF_PRIVATE *psf, int location) ;
 
 static int     aiff_command (SF_PRIVATE *psf, int command, void *data, int datasize) ;
 
-static const char *get_loop_mode_str (short mode) ;
+static const char *get_loop_mode_str (int16_t mode) ;
 
-static short get_loop_mode (short mode) ;
+static int16_t get_loop_mode (int16_t mode) ;
 
 static int aiff_read_basc_chunk (SF_PRIVATE * psf, int) ;
 
 static int aiff_read_chanmap (SF_PRIVATE * psf, unsigned dword) ;
 
-static unsigned int marker_to_position (const MARK_ID_POS *m, unsigned short n, int marksize) ;
+static uint32_t marker_to_position (const MARK_ID_POS *m, uint16_t n, int marksize) ;
 
 static int aiff_set_chunk (SF_PRIVATE *psf, const SF_CHUNK_INFO * chunk_info) ;
 static SF_CHUNK_ITERATOR * aiff_next_chunk_iterator (SF_PRIVATE *psf, SF_CHUNK_ITERATOR * iterator) ;
@@ -319,15 +319,20 @@ aiff_open (SF_PRIVATE *psf)
                                break ;
 
                case SF_FORMAT_DWVW_12 :
-                               error = dwvw_init (psf, 12) ;
+                               if (psf->sf.frames > comm_fmt.numSampleFrames)
+                                       psf->sf.frames = comm_fmt.numSampleFrames ;
                                break ;
 
                case SF_FORMAT_DWVW_16 :
                                error = dwvw_init (psf, 16) ;
+                               if (psf->sf.frames > comm_fmt.numSampleFrames)
+                                       psf->sf.frames = comm_fmt.numSampleFrames ;
                                break ;
 
                case SF_FORMAT_DWVW_24 :
                                error = dwvw_init (psf, 24) ;
+                               if (psf->sf.frames > comm_fmt.numSampleFrames)
+                                       psf->sf.frames = comm_fmt.numSampleFrames ;
                                break ;
 
                case SF_FORMAT_DWVW_N :
@@ -337,7 +342,8 @@ aiff_open (SF_PRIVATE *psf)
                                        } ;
                                if (comm_fmt.sampleSize >= 8 && comm_fmt.sampleSize < 24)
                                {       error = dwvw_init (psf, comm_fmt.sampleSize) ;
-                                       psf->sf.frames = comm_fmt.numSampleFrames ;
+                                       if (psf->sf.frames > comm_fmt.numSampleFrames)
+                                               psf->sf.frames = comm_fmt.numSampleFrames ;
                                        break ;
                                        } ;
                                psf_log_printf (psf, "AIFC/DWVW : Bad bitwidth %d\n", comm_fmt.sampleSize) ;
@@ -355,11 +361,19 @@ aiff_open (SF_PRIVATE *psf)
 
                case SF_FORMAT_GSM610 :
                                error = gsm610_init (psf) ;
+                               if (psf->sf.frames > comm_fmt.numSampleFrames)
+                                       psf->sf.frames = comm_fmt.numSampleFrames ;
                                break ;
 
                default : return SFE_UNIMPLEMENTED ;
                } ;
 
+       if (psf->file.mode != SFM_WRITE && psf->sf.frames - comm_fmt.numSampleFrames != 0)
+       {       psf_log_printf (psf,
+                       "*** Frame count read from 'COMM' chunk (%u) not equal to frame count\n"
+                       "*** calculated from length of 'SSND' chunk (%u).\n",
+                       comm_fmt.numSampleFrames, (uint32_t) psf->sf.frames) ;
+               } ;
 
        return error ;
 } /* aiff_open */
@@ -369,8 +383,8 @@ aiff_open (SF_PRIVATE *psf)
 */
 
 /* This function ought to check size */
-static unsigned int
-marker_to_position (const MARK_ID_POS *m, unsigned short n, int marksize)
+static uint32_t
+marker_to_position (const MARK_ID_POS *m, uint16_t n, int marksize)
 {      int i ;
 
        for (i = 0 ; i < marksize ; i++)
@@ -384,10 +398,10 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
 {      SSND_CHUNK      ssnd_fmt ;
        AIFF_PRIVATE *paiff ;
        BUF_UNION       ubuf ;
-       unsigned        chunk_size = 0, FORMsize, SSNDsize, bytesread ;
+       uint32_t        chunk_size = 0, FORMsize, SSNDsize, bytesread, mark_count = 0 ;
        int                     k, found_chunk = 0, done = 0, error = 0 ;
        char            *cptr ;
-       int                     instr_found = 0, mark_found = 0, mark_count = 0 ;
+       int                     instr_found = 0, mark_found = 0 ;
 
        if (psf->filelength > SF_PLATFORM_S64 (0xffffffff))
                psf_log_printf (psf, "Warning : filelength > 0xffffffff. This is bad!!!!\n") ;
@@ -501,7 +515,7 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
                                        cptr = ubuf.cbuf ;
                                        for (k = 0 ; k < psf->sf.channels ; k++)
                                        {       float value ;
-                                               unsigned int position ;
+                                               uint32_t position ;
 
                                                psf_binheader_readf (psf, "Ef4", &value, &position) ;
                                                psf->peak_info->peaks [k].value = value ;
@@ -597,8 +611,8 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
                                        break ;
 
                        case COMT_MARKER :
-                               {       unsigned short count, id, len ;
-                                       unsigned int timestamp, bytes ;
+                               {       uint16_t count, id, len ;
+                                       uint32_t timestamp, bytes ;
 
                                        if (chunk_size == 0)
                                                break ;
@@ -698,8 +712,8 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
                                                break ;
                                                } ;
                                        psf_log_printf (psf, " %M : %d\n", marker, chunk_size) ;
-                                       {       unsigned char bytes [6] ;
-                                               short gain ;
+                                       {       uint8_t bytes [6] ;
+                                               int16_t gain ;
 
                                                if (psf->instrument == NULL && (psf->instrument = psf_instrument_alloc ()) == NULL)
                                                        return SFE_MALLOC_FAILED ;
@@ -719,9 +733,9 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
                                                psf->instrument->gain = gain ;
                                                psf_log_printf (psf, "  Gain (dB) : %d\n", gain) ;
                                                } ;
-                                       {       short   mode ; /* 0 - no loop, 1 - forward looping, 2 - backward looping */
+                                       {       int16_t mode ; /* 0 - no loop, 1 - forward looping, 2 - backward looping */
                                                const char      *loop_mode ;
-                                               unsigned short begin, end ;
+                                               uint16_t begin, end ;
 
                                                psf_binheader_readf (psf, "E222", &mode, &begin, &end) ;
                                                loop_mode = get_loop_mode_str (mode) ;
@@ -766,12 +780,12 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
 
                        case MARK_MARKER :
                                        psf_log_printf (psf, " %M : %d\n", marker, chunk_size) ;
-                                       {       unsigned short mark_id, n = 0 ;
-                                               unsigned int position ;
+                                       {       uint16_t mark_id, n = 0 ;
+                                               uint32_t position ;
 
                                                bytesread = psf_binheader_readf (psf, "E2", &n) ;
                                                mark_count = n ;
-                                               psf_log_printf (psf, "  Count : %d\n", mark_count) ;
+                                               psf_log_printf (psf, "  Count : %u\n", mark_count) ;
                                                if (paiff->markstr != NULL)
                                                {       psf_log_printf (psf, "*** Second MARK chunk found. Throwing away the first.\n") ;
                                                        free (paiff->markstr) ;
@@ -780,13 +794,29 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
                                                if (paiff->markstr == NULL)
                                                        return SFE_MALLOC_FAILED ;
 
+                                               if (mark_count > 1000)
+                                               {       psf_log_printf (psf, "  More than 1000 markers, skipping!\n") ;
+                                                       psf_binheader_readf (psf, "j", chunk_size - bytesread) ;
+                                                       break ;
+                                               } ;
+
+                                               if ((psf->cues = psf_cues_alloc (mark_count)) == NULL)
+                                                       return SFE_MALLOC_FAILED ;
+
                                                for (n = 0 ; n < mark_count && bytesread < chunk_size ; n++)
-                                               {       unsigned int pstr_len ;
-                                                       unsigned char ch ;
+                                               {       uint32_t pstr_len ;
+                                                       uint8_t ch ;
 
                                                        bytesread += psf_binheader_readf (psf, "E241", &mark_id, &position, &ch) ;
                                                        psf_log_printf (psf, "   Mark ID  : %u\n   Position : %u\n", mark_id, position) ;
 
+                                                       psf->cues->cue_points [n].indx = mark_id ;
+                                                       psf->cues->cue_points [n].position = 0 ;
+                                                       psf->cues->cue_points [n].fcc_chunk = MAKE_MARKER ('d', 'a', 't', 'a') ; /* always data */
+                                                       psf->cues->cue_points [n].chunk_start = 0 ;
+                                                       psf->cues->cue_points [n].block_start = 0 ;
+                                                       psf->cues->cue_points [n].sample_offset = position ;
+
                                                        pstr_len = (ch & 1) ? ch : ch + 1 ;
 
                                                        if (pstr_len < sizeof (ubuf.scbuf) - 1)
@@ -794,13 +824,15 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
                                                                ubuf.scbuf [pstr_len] = 0 ;
                                                                }
                                                        else
-                                                       {       unsigned int read_len = pstr_len - (sizeof (ubuf.scbuf) - 1) ;
+                                                       {       uint32_t read_len = pstr_len - (sizeof (ubuf.scbuf) - 1) ;
                                                                bytesread += psf_binheader_readf (psf, "bj", ubuf.scbuf, read_len, pstr_len - read_len) ;
                                                                ubuf.scbuf [sizeof (ubuf.scbuf) - 1] = 0 ;
                                                                }
 
                                                        psf_log_printf (psf, "   Name     : %s\n", ubuf.scbuf) ;
 
+                                                       psf_strlcpy (psf->cues->cue_points [n].name, sizeof (psf->cues->cue_points [n].name), ubuf.cbuf) ;
+
                                                        paiff->markstr [n].markerID = mark_id ;
                                                        paiff->markstr [n].position = position ;
                                                        /*
@@ -882,15 +914,37 @@ aiff_read_header (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
                } ; /* while (1) */
 
        if (instr_found && mark_found)
-       {       int j ;
-
-               for (j = 0 ; j < psf->instrument->loop_count ; j ++)
-               {       if (j < ARRAY_LEN (psf->instrument->loops))
-                       {       psf->instrument->loops [j].start = marker_to_position (paiff->markstr, psf->instrument->loops [j].start, mark_count) ;
-                               psf->instrument->loops [j].end = marker_to_position (paiff->markstr, psf->instrument->loops [j].end, mark_count) ;
-                               psf->instrument->loops [j].mode = SF_LOOP_FORWARD ;
+       {       int ji, str_index ;
+               /* Next loop will convert markers to loop positions for internal handling */
+               for (ji = 0 ; ji < psf->instrument->loop_count ; ji ++)
+               {       if (ji < ARRAY_LEN (psf->instrument->loops))
+                       {       psf->instrument->loops [ji].start = marker_to_position (paiff->markstr, psf->instrument->loops [ji].start, mark_count) ;
+                               psf->instrument->loops [ji].end = marker_to_position (paiff->markstr, psf->instrument->loops [ji].end, mark_count) ;
+                               psf->instrument->loops [ji].mode = SF_LOOP_FORWARD ;
                                } ;
                        } ;
+
+               /* The markers that correspond to loop positions can now be removed from cues struct */
+               if (psf->cues->cue_count > (uint32_t) (psf->instrument->loop_count * 2))
+               {       uint32_t j ;
+
+                       for (j = 0 ; j < psf->cues->cue_count - (uint32_t) (psf->instrument->loop_count * 2) ; j ++)
+                       {       /* This simply copies the information in cues above loop positions and writes it at current count instead */
+                               psf->cues->cue_points [j].indx = psf->cues->cue_points [j + psf->instrument->loop_count * 2].indx ;
+                               psf->cues->cue_points [j].position = psf->cues->cue_points [j + psf->instrument->loop_count * 2].position ;
+                               psf->cues->cue_points [j].fcc_chunk = psf->cues->cue_points [j + psf->instrument->loop_count * 2].fcc_chunk ;
+                               psf->cues->cue_points [j].chunk_start = psf->cues->cue_points [j + psf->instrument->loop_count * 2].chunk_start ;
+                               psf->cues->cue_points [j].block_start = psf->cues->cue_points [j + psf->instrument->loop_count * 2].block_start ;
+                               psf->cues->cue_points [j].sample_offset = psf->cues->cue_points [j + psf->instrument->loop_count * 2].sample_offset ;
+                               for (str_index = 0 ; str_index < 256 ; str_index++)
+                                       psf->cues->cue_points [j].name [str_index] = psf->cues->cue_points [j + psf->instrument->loop_count * 2].name [str_index] ;
+                               } ;
+                       psf->cues->cue_count -= psf->instrument->loop_count * 2 ;
+                       } else
+                       {       /* All the cues were in fact loop positions so we can actually remove the cues altogether */
+                               free (psf->cues) ;
+                               psf->cues = NULL ;
+                               }
                } ;
 
        if (psf->sf.channels < 1)
@@ -959,7 +1013,7 @@ aiff_read_comm_chunk (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
        else if (comm_fmt->size == SIZEOF_AIFC_COMM_MIN)
                psf_binheader_readf (psf, "Em", &(comm_fmt->encoding)) ;
        else if (comm_fmt->size >= SIZEOF_AIFC_COMM)
-       {       unsigned char encoding_len ;
+       {       uint8_t encoding_len ;
                unsigned read_len ;
 
                psf_binheader_readf (psf, "Em1", &(comm_fmt->encoding), &encoding_len) ;
@@ -975,6 +1029,12 @@ aiff_read_comm_chunk (SF_PRIVATE *psf, COMM_CHUNK *comm_fmt)
 
        psf_log_printf (psf, "  Sample Rate : %d\n", samplerate) ;
        psf_log_printf (psf, "  Frames      : %u%s\n", comm_fmt->numSampleFrames, (comm_fmt->numSampleFrames == 0 && psf->filelength > 104) ? " (Should not be 0)" : "") ;
+
+       if (comm_fmt->numChannels < 1 || comm_fmt->numChannels >= SF_MAX_CHANNELS)
+       {       psf_log_printf (psf, "  Channels    : %d (should be >= 1 and < %d)\n", comm_fmt->numChannels, SF_MAX_CHANNELS) ;
+               return SFE_CHANNEL_COUNT_BAD ;
+               } ;
+
        psf_log_printf (psf, "  Channels    : %d\n", comm_fmt->numChannels) ;
 
        /* Found some broken 'fl32' files with comm.samplesize == 16. Fix it here. */
@@ -1098,16 +1158,16 @@ aiff_rewrite_header (SF_PRIVATE *psf)
        int k, ch, comm_size, comm_frames ;
 
        psf_fseek (psf, 0, SEEK_SET) ;
-       psf_fread (psf->header, psf->dataoffset, 1, psf) ;
+       psf_fread (psf->header.ptr, psf->dataoffset, 1, psf) ;
 
-       psf->headindex = 0 ;
+       psf->header.indx = 0 ;
 
        /* FORM chunk. */
        psf_binheader_writef (psf, "Etm8", FORM_MARKER, psf->filelength - 8) ;
 
        /* COMM chunk. */
        if ((k = psf_find_read_chunk_m32 (&psf->rchunks, COMM_MARKER)) >= 0)
-       {       psf->headindex = psf->rchunks.chunks [k].offset - 8 ;
+       {       psf->header.indx = psf->rchunks.chunks [k].offset - 8 ;
                comm_frames = psf->sf.frames ;
                comm_size = psf->rchunks.chunks [k].len ;
                psf_binheader_writef (psf, "Em42t4", COMM_MARKER, comm_size, psf->sf.channels, comm_frames) ;
@@ -1115,7 +1175,7 @@ aiff_rewrite_header (SF_PRIVATE *psf)
 
        /* PEAK chunk. */
        if ((k = psf_find_read_chunk_m32 (&psf->rchunks, PEAK_MARKER)) >= 0)
-       {       psf->headindex = psf->rchunks.chunks [k].offset - 8 ;
+       {       psf->header.indx = psf->rchunks.chunks [k].offset - 8 ;
                psf_binheader_writef (psf, "Em4", PEAK_MARKER, AIFF_PEAK_CHUNK_SIZE (psf->sf.channels)) ;
                psf_binheader_writef (psf, "E44", 1, time (NULL)) ;
                for (ch = 0 ; ch < psf->sf.channels ; ch++)
@@ -1125,25 +1185,40 @@ aiff_rewrite_header (SF_PRIVATE *psf)
 
        /* SSND chunk. */
        if ((k = psf_find_read_chunk_m32 (&psf->rchunks, SSND_MARKER)) >= 0)
-       {       psf->headindex = psf->rchunks.chunks [k].offset - 8 ;
+       {       psf->header.indx = psf->rchunks.chunks [k].offset - 8 ;
                psf_binheader_writef (psf, "Etm8", SSND_MARKER, psf->datalength + SIZEOF_SSND_CHUNK) ;
                } ;
 
        /* Header mangling complete so write it out. */
        psf_fseek (psf, 0, SEEK_SET) ;
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        return ;
 } /* aiff_rewrite_header */
 
+static uint16_t
+convert_loop_mode (int type_mode)
+{      switch (type_mode)
+       {       case SF_LOOP_NONE:
+                       return 0 ;
+               case SF_LOOP_FORWARD :
+                       return 1 ;
+               case SF_LOOP_ALTERNATING :
+                       return 2 ;
+               default : break ;
+               } ;
+
+       return 0 ;
+} /* convert_loop_mode */
+
 static int
 aiff_write_header (SF_PRIVATE *psf, int calc_length)
 {      sf_count_t              current ;
        AIFF_PRIVATE    *paiff ;
-       unsigned char   comm_sample_rate [10], comm_zero_bytes [2] = { 0, 0 } ;
-       unsigned int    comm_type, comm_size, comm_encoding, comm_frames = 0, uk ;
+       uint8_t comm_sample_rate [10], comm_zero_bytes [2] = { 0, 0 } ;
+       uint32_t        comm_type, comm_size, comm_encoding, comm_frames = 0, uk ;
        int                             k, endian, has_data = SF_FALSE ;
-       short                   bit_width ;
+       int16_t                 bit_width ;
 
        if ((paiff = psf->container_data) == NULL)
                return SFE_INTERNAL ;
@@ -1336,8 +1411,8 @@ aiff_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        psf_binheader_writef (psf, "Etm8", FORM_MARKER, psf->filelength - 8) ;
@@ -1349,7 +1424,7 @@ aiff_write_header (SF_PRIVATE *psf, int calc_length)
        else
                psf_binheader_writef (psf, "Em", comm_type) ;
 
-       paiff->comm_offset = psf->headindex - 8 ;
+       paiff->comm_offset = psf->header.indx - 8 ;
 
        memset (comm_sample_rate, 0, sizeof (comm_sample_rate)) ;
        uint2tenbytefloat (psf->sf.samplerate, comm_sample_rate) ;
@@ -1364,63 +1439,160 @@ aiff_write_header (SF_PRIVATE *psf, int calc_length)
        if (psf->channel_map && paiff->chanmap_tag)
                psf_binheader_writef (psf, "Em4444", CHAN_MARKER, 12, paiff->chanmap_tag, 0, 0) ;
 
-       if (psf->instrument != NULL)
-       {       MARK_ID_POS     m [4] ;
-               INST_CHUNK ch ;
-               unsigned short ct = 0 ;
-
-               memset (m, 0, sizeof (m)) ;
-               memset (&ch, 0, sizeof (ch)) ;
-
-               ch.baseNote = psf->instrument->basenote ;
-               ch.detune = psf->instrument->detune ;
-               ch.lowNote = psf->instrument->key_lo ;
-               ch.highNote = psf->instrument->key_hi ;
-               ch.lowVelocity = psf->instrument->velocity_lo ;
-               ch.highVelocity = psf->instrument->velocity_hi ;
-               ch.gain = psf->instrument->gain ;
-               if (psf->instrument->loops [0].mode != SF_LOOP_NONE)
-               {       ch.sustain_loop.playMode = 1 ;
-                       ch.sustain_loop.beginLoop = ct ;
-                       m [0].markerID = ct++ ;
-                       m [0].position = psf->instrument->loops [0].start ;
-                       ch.sustain_loop.endLoop = ct ;
-                       m [1].markerID = ct++ ;
-                       m [1].position = psf->instrument->loops [0].end ;
-                       } ;
-               if (psf->instrument->loops [1].mode != SF_LOOP_NONE)
-               {       ch.release_loop.playMode = 1 ;
-                       ch.release_loop.beginLoop = ct ;
-                       m [2].markerID = ct++ ;
-                       m [2].position = psf->instrument->loops [1].start ;
-                       ch.release_loop.endLoop = ct ;
-                       m [3].markerID = ct++ ;
-                       m [3].position = psf->instrument->loops [1].end ;
+       /* Check if there's a INST chunk to write */
+       if (psf->instrument != NULL && psf->cues != NULL)
+       {       /* Both loops and cues exist */
+               uint16_t sustainLoopMode, releaseLoopMode ;
+               uint32_t idx, sLoopStart = 0, sLoopEnd = 0, rLoopStart = 0, rLoopEnd = 0 ;
+               int totalStringLength = 0, stringLength ;
+
+               /* Here we count how many bytes will the pascal strings need */
+               for (idx = 0 ; idx < psf->cues->cue_count ; idx++)
+               {       stringLength = strlen (psf->cues->cue_points [idx].name) + 1 ; /* We'll count the first byte also of every pascal string */
+                       if (stringLength % 2 == 0)
+                               totalStringLength += stringLength ;
+                       else
+                               totalStringLength += (stringLength + 1) ; /* The pascal string must have an even count */
+                       }
+
+               /* First we check which loops are active and create the necessary MARK chunk for markers */
+               /* The first written markers will be references from loop points then comes the real markers */
+               if (psf->instrument->loops [0].mode != SF_LOOP_NONE && psf->instrument->loops [1].mode != SF_LOOP_NONE)
+               {       /* There's both a sustain loop and a release loop */
+                       psf_binheader_writef (psf, "Em42 241b 241b 241b 241b",
+                                       MARK_MARKER, 2 + 2 * (2 + 4 + 1 + 19) + 2 * (2 + 4 + 1 + 17) + psf->cues->cue_count * (2 + 4) + totalStringLength, 4 + psf->cues->cue_count,
+                                       1, psf->instrument->loops [0].start, 18, "sustain loop start", make_size_t (19),
+                                       2, psf->instrument->loops [0].end, 16, "sustain loop end", make_size_t (17),
+                                       3, psf->instrument->loops [1].start, 18, "release loop start", make_size_t (19),
+                                       4, psf->instrument->loops [1].end, 16, "release loop end", make_size_t (17)) ;
+                       /* Now comes true markers from cues struct */
+                       for (idx = 0 ; idx < psf->cues->cue_count ; idx++)
+                               psf_binheader_writef (psf, "E24p", 5 + idx, psf->cues->cue_points [idx].sample_offset, psf->cues->cue_points [idx].name) ;
+
+                       /* Change the loops to be references to the markers */
+                       sLoopStart = 1 ;
+                       sLoopEnd = 2 ;
+                       rLoopStart = 3 ;
+                       rLoopEnd = 4 ;
+                       }
+               else if (psf->instrument->loops [0].mode != SF_LOOP_NONE && psf->instrument->loops [1].mode == SF_LOOP_NONE)
+               {       /* There's a sustain loop but no release loop */
+                       psf_binheader_writef (psf, "Em42241b241b",
+                                       MARK_MARKER, 2 + (2 + 4 + 1 + 19) + (2 + 4 + 1 + 17) + psf->cues->cue_count * (2 + 4) + totalStringLength, 2 + psf->cues->cue_count,
+                                       1, psf->instrument->loops [0].start, 18, "sustain loop start", make_size_t (19),
+                                       2, psf->instrument->loops [0].end, 16, "sustain loop end", make_size_t (17)) ;
+                       /* Now comes true markers from cues struct */
+                       for (idx = 0 ; idx < psf->cues->cue_count ; idx++)
+                               psf_binheader_writef (psf, "E24p", 3 + idx, psf->cues->cue_points [idx].sample_offset, psf->cues->cue_points [idx].name) ;
+
+                       /* Change the loops to be references to the markers */
+                       sLoopStart = 1 ;
+                       sLoopEnd = 2 ;
+                       rLoopStart = 0 ;
+                       rLoopEnd = 0 ;
                        }
-               else
-               {       ch.release_loop.playMode = 0 ;
-                       ch.release_loop.beginLoop = 0 ;
-                       ch.release_loop.endLoop = 0 ;
+               else if (psf->instrument->loops [0].mode == SF_LOOP_NONE && psf->instrument->loops [1].mode != SF_LOOP_NONE)
+               {       /* There's a release loop but no sustain loop! Strange indeed! */
+                       psf_binheader_writef (psf, "Em42241b241b",
+                                       MARK_MARKER, 2 + (2 + 4 + 1 + 19) + (2 + 4 + 1 + 17) + psf->cues->cue_count * (2 + 4) + totalStringLength, 2 + psf->cues->cue_count,
+                                       1, psf->instrument->loops [1].start, 18, "release loop start", make_size_t (19),
+                                       2, psf->instrument->loops [1].end, 16, "release loop end", make_size_t (17)) ;
+                       /* Now comes true markers from cues struct */
+                       for (idx = 0 ; idx < psf->cues->cue_count ; idx++)
+                               psf_binheader_writef (psf, "E24p", 3 + idx, psf->cues->cue_points [idx].sample_offset, psf->cues->cue_points [idx].name) ;
+
+                       /* Change the loops to be references to the markers */
+                       sLoopStart = 0 ;
+                       sLoopEnd = 0 ;
+                       rLoopStart = 1 ;
+                       rLoopEnd = 2 ;
                        } ;
 
-               psf_binheader_writef (psf, "Em4111111", INST_MARKER, SIZEOF_INST_CHUNK, ch.baseNote, ch.detune,
-                                               ch.lowNote, ch.highNote, ch.lowVelocity, ch.highVelocity) ;
-               psf_binheader_writef (psf, "2222222", ch.gain, ch.sustain_loop.playMode,
-                                               ch.sustain_loop.beginLoop, ch.sustain_loop.endLoop, ch.release_loop.playMode,
-                                               ch.release_loop.beginLoop, ch.release_loop.endLoop) ;
+               /* First convert loop modes to aiff standard */
+               sustainLoopMode = convert_loop_mode (psf->instrument->loops [0].mode) ;
+               releaseLoopMode = convert_loop_mode (psf->instrument->loops [1].mode) ;
 
-               if (ct == 2)
-                       psf_binheader_writef (psf, "Em42241b241b",
-                                       MARK_MARKER, 2 + 2 * (2 + 4 + 1 + 9), 2,
-                                       m [0].markerID, m [0].position, 8, "beg loop", make_size_t (9),
-                                       m [1].markerID, m [1].position, 8, "end loop", make_size_t (9)) ;
-               else if (ct == 4)
+               /* Now we finally write the actual INST chunk */
+               psf_binheader_writef (psf, "Em4111111", INST_MARKER, SIZEOF_INST_CHUNK, psf->instrument->basenote, psf->instrument->detune,
+                       psf->instrument->key_lo, psf->instrument->key_hi, psf->instrument->velocity_lo, psf->instrument->velocity_hi) ;
+               psf_binheader_writef (psf, "E2222222", (short) psf->instrument->gain,
+                       sustainLoopMode, sLoopStart, sLoopEnd,
+                       releaseLoopMode, rLoopStart, rLoopEnd) ;
+
+               }
+       else if (psf->instrument != NULL && psf->cues == NULL)
+       {       /* There are loops but no cues */
+               uint16_t sustainLoopMode, releaseLoopMode ;
+               uint32_t sLoopStart = 0, sLoopEnd = 0, rLoopStart = 0, rLoopEnd = 0 ;
+
+               /* First we check which loops are active and create the necessary MARK chunk for markers */
+               if (psf->instrument->loops [0].mode != SF_LOOP_NONE && psf->instrument->loops [1].mode != SF_LOOP_NONE)
+               {       /* There's both a sustain loop and a release loop */
                        psf_binheader_writef (psf, "Em42 241b 241b 241b 241b",
-                                       MARK_MARKER, 2 + 4 * (2 + 4 + 1 + 9), 4,
-                                       m [0].markerID, m [0].position, 8, "beg loop", make_size_t (9),
-                                       m [1].markerID, m [1].position, 8, "end loop", make_size_t (9),
-                                       m [2].markerID, m [2].position, 8, "beg loop", make_size_t (9),
-                                       m [3].markerID, m [3].position, 8, "end loop", make_size_t (9)) ;
+                                       MARK_MARKER, 2 + 2 * (2 + 4 + 1 + 19) + 2 * (2 + 4 + 1 + 17), 4,
+                                       1, psf->instrument->loops [0].start, 18, "sustain loop start", make_size_t (19),
+                                       2, psf->instrument->loops [0].end, 16, "sustain loop end", make_size_t (17),
+                                       3, psf->instrument->loops [1].start, 18, "release loop start", make_size_t (19),
+                                       4, psf->instrument->loops [1].end, 16, "release loop end", make_size_t (17)) ;
+                       /* Change the loops to be references to the markers */
+                       sLoopStart = 1 ;
+                       sLoopEnd = 2 ;
+                       rLoopStart = 3 ;
+                       rLoopEnd = 4 ;
+                       }
+               else if (psf->instrument->loops [0].mode != SF_LOOP_NONE && psf->instrument->loops [1].mode == SF_LOOP_NONE)
+               {       /* There's a sustain loop but no release loop */
+                       psf_binheader_writef (psf, "Em42241b241b",
+                                       MARK_MARKER, 2 + (2 + 4 + 1 + 19) + (2 + 4 + 1 + 17), 2,
+                                       1, psf->instrument->loops [0].start, 18, "sustain loop start", make_size_t (19),
+                                       2, psf->instrument->loops [0].end, 16, "sustain loop end", make_size_t (17)) ;
+                       /* Change the loops to be references to the markers */
+                       sLoopStart = 1 ;
+                       sLoopEnd = 2 ;
+                       rLoopStart = 0 ;
+                       rLoopEnd = 0 ;
+                       }
+               else if (psf->instrument->loops [0].mode == SF_LOOP_NONE && psf->instrument->loops [1].mode != SF_LOOP_NONE)
+               {       /* There's a release loop but no sustain loop! Strange indeed! */
+                       psf_binheader_writef (psf, "Em42241b241b",
+                                       MARK_MARKER, 2 + (2 + 4 + 1 + 19) + (2 + 4 + 1 + 17), 2,
+                                       1, psf->instrument->loops [1].start, 18, "release loop start", make_size_t (19),
+                                       2, psf->instrument->loops [1].end, 16, "release loop end", make_size_t (17)) ;
+                       /* Change the loops to be references to the markers */
+                       sLoopStart = 0 ;
+                       sLoopEnd = 0 ;
+                       rLoopStart = 1 ;
+                       rLoopEnd = 2 ;
+                       } ;
+
+               /* First convert loop modes to aiff standard */
+               sustainLoopMode = convert_loop_mode (psf->instrument->loops [0].mode) ;
+               releaseLoopMode = convert_loop_mode (psf->instrument->loops [1].mode) ;
+
+               /* Now we finally write the actual INST chunk */
+               psf_binheader_writef (psf, "Em4111111", INST_MARKER, SIZEOF_INST_CHUNK, psf->instrument->basenote, psf->instrument->detune,
+                       psf->instrument->key_lo, psf->instrument->key_hi, psf->instrument->velocity_lo, psf->instrument->velocity_hi) ;
+               psf_binheader_writef (psf, "E2222222", (short) psf->instrument->gain,
+                       sustainLoopMode, sLoopStart, sLoopEnd,
+                       releaseLoopMode, rLoopStart, rLoopEnd) ;
+
+               }
+       else if (psf->instrument == NULL && psf->cues != NULL)
+       {       /* There are cues but no loops */
+               uint32_t idx ;
+               int totalStringLength = 0, stringLength ;
+
+               /* Here we count how many bytes will the pascal strings need */
+               for (idx = 0 ; idx < psf->cues->cue_count ; idx++)
+               {       stringLength = strlen (psf->cues->cue_points [idx].name) + 1 ; /* We'll count the first byte also of every pascal string */
+                       totalStringLength += stringLength + (stringLength % 2 == 0 ? 0 : 1) ;
+                       } ;
+
+               psf_binheader_writef (psf, "Em42",
+                       MARK_MARKER, 2 + psf->cues->cue_count * (2 + 4) + totalStringLength, psf->cues->cue_count) ;
+
+               for (idx = 0 ; idx < psf->cues->cue_count ; idx++)
+                       psf_binheader_writef (psf, "E24p", psf->cues->cue_points [idx].indx, psf->cues->cue_points [idx].sample_offset, psf->cues->cue_points [idx].name) ;
                } ;
 
        if (psf->strings.flags & SF_STR_LOCATE_START)
@@ -1438,19 +1610,19 @@ aiff_write_header (SF_PRIVATE *psf, int calc_length)
                psf_binheader_writef (psf, "Em4b", psf->wchunks.chunks [uk].mark32, psf->wchunks.chunks [uk].len, psf->wchunks.chunks [uk].data, make_size_t (psf->wchunks.chunks [uk].len)) ;
 
        /* Write SSND chunk. */
-       paiff->ssnd_offset = psf->headindex ;
+       paiff->ssnd_offset = psf->header.indx ;
        psf_binheader_writef (psf, "Etm844", SSND_MARKER, psf->datalength + SIZEOF_SSND_CHUNK, 0, 0) ;
 
        /* Header construction complete so write it out. */
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       if (has_data && psf->dataoffset != psf->headindex)
+       if (has_data && psf->dataoffset != psf->header.indx)
                return psf->error = SFE_INTERNAL ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (! has_data)
                psf_fseek (psf, psf->dataoffset, SEEK_SET) ;
@@ -1465,14 +1637,14 @@ aiff_write_tailer (SF_PRIVATE *psf)
 {      int             k ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
 
        psf->dataend = psf_fseek (psf, 0, SEEK_END) ;
 
        /* Make sure tailer data starts at even byte offset. Pad if necessary. */
        if (psf->dataend % 2 == 1)
-       {       psf_fwrite (psf->header, 1, 1, psf) ;
+       {       psf_fwrite (psf->header.ptr, 1, 1, psf) ;
                psf->dataend ++ ;
                } ;
 
@@ -1487,8 +1659,8 @@ aiff_write_tailer (SF_PRIVATE *psf)
                aiff_write_strings (psf, SF_STR_LOCATE_END) ;
 
        /* Write the tailer. */
-       if (psf->headindex > 0)
-               psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       if (psf->header.indx > 0)
+               psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        return 0 ;
 } /* aiff_write_tailer */
@@ -1557,7 +1729,7 @@ aiff_command (SF_PRIVATE * psf, int command, void * UNUSED (data), int UNUSED (d
 } /* aiff_command */
 
 static const char*
-get_loop_mode_str (short mode)
+get_loop_mode_str (int16_t mode)
 {      switch (mode)
        {       case 0 : return "none" ;
                case 1 : return "forward" ;
@@ -1567,8 +1739,8 @@ get_loop_mode_str (short mode)
        return "*** unknown" ;
 } /* get_loop_mode_str */
 
-static short
-get_loop_mode (short mode)
+static int16_t
+get_loop_mode (int16_t mode)
 {      switch (mode)
        {       case 0 : return SF_LOOP_NONE ;
                case 1 : return SF_LOOP_FORWARD ;
@@ -1588,7 +1760,7 @@ get_loop_mode (short mode)
 */
 
 static int
-tenbytefloat2int (unsigned char *bytes)
+tenbytefloat2int (uint8_t *bytes)
 {      int val = 3 ;
 
        if (bytes [0] & 0x80)   /* Negative number. */
@@ -1613,8 +1785,8 @@ tenbytefloat2int (unsigned char *bytes)
 } /* tenbytefloat2int */
 
 static void
-uint2tenbytefloat (unsigned int num, unsigned char *bytes)
-{      unsigned int mask = 0x40000000 ;
+uint2tenbytefloat (uint32_t num, uint8_t *bytes)
+{      uint32_t mask = 0x40000000 ;
        int     count ;
 
        if (num <= 1)
@@ -1637,7 +1809,7 @@ uint2tenbytefloat (unsigned int num, unsigned char *bytes)
                mask >>= 1 ;
                } ;
 
-       num <<= count + 1 ;
+       num = count < 31 ? num << (count + 1) : 0 ;
        bytes [1] = 29 - count ;
        bytes [2] = (num >> 24) & 0xFF ;
        bytes [3] = (num >> 16) & 0xFF ;
index 460b526..f83dd2f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2011-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2011-2016 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
@@ -32,7 +32,7 @@
 
 #define                ALAC_MAX_FRAME_SIZE             8192
 #define                ALAC_BYTE_BUFFER_SIZE   0x20000
-
+#define                ALAC_MAX_CHANNEL_COUNT  8       // Same as kALACMaxChannels in /ALACAudioTypes.h
 
 typedef struct
 {      uint32_t        current, count, allocated ;
@@ -61,6 +61,8 @@ typedef struct
        char enctmpname [512] ;
        FILE *enctmp ;
 
+       uint8_t byte_buffer [ALAC_MAX_CHANNEL_COUNT * ALAC_BYTE_BUFFER_SIZE] ;
+
        int     buffer  [] ;
 
 } ALAC_PRIVATE ;
@@ -89,7 +91,7 @@ static int    alac_close              (SF_PRIVATE *psf) ;
 static int     alac_byterate   (SF_PRIVATE *psf) ;
 
 static int alac_decode_block (SF_PRIVATE *psf, ALAC_PRIVATE *plac) ;
-static int alac_encode_block (SF_PRIVATE *psf, ALAC_PRIVATE *plac) ;
+static int alac_encode_block (ALAC_PRIVATE *plac) ;
 
 static uint32_t alac_kuki_read (SF_PRIVATE * psf, uint32_t kuki_offset, uint8_t * kuki, size_t kuki_maxlen) ;
 
@@ -170,7 +172,7 @@ alac_close  (SF_PRIVATE *psf)
        {       ALAC_ENCODER *penc = &plac->encoder ;
                SF_CHUNK_INFO chunk_info ;
                sf_count_t readcount ;
-               uint8_t *kuki_data [plac->kuki_size] ;
+               uint8_t kuki_data [1024] ;
                uint32_t pakt_size = 0, saved_partial_block_frames ;
 
                plac->final_write_block = 1 ;
@@ -178,7 +180,7 @@ alac_close  (SF_PRIVATE *psf)
 
                /*      If a block has been partially assembled, write it out as the final block. */
                if (plac->partial_block_frames && plac->partial_block_frames < plac->frames_per_block)
-                       alac_encode_block (psf, plac) ;
+                       alac_encode_block (plac) ;
 
                plac->partial_block_frames = saved_partial_block_frames ;
 
@@ -243,7 +245,7 @@ alac_reader_init (SF_PRIVATE *psf, const ALAC_DECODER_INFO * info)
                return SFE_INTERNAL ;
                } ;
 
-       if (info->frames_per_packet > ALAC_MAX_FRAME_SIZE)
+       if (info->frames_per_packet > ALAC_FRAME_LENGTH)
        {       psf_log_printf (psf, "*** Error : frames_per_packet (%u) is too big. ***\n", info->frames_per_packet) ;
                return SFE_INTERNAL ;
                } ;
@@ -258,10 +260,9 @@ alac_reader_init (SF_PRIVATE *psf, const ALAC_DECODER_INFO * info)
                free (plac->pakt_info) ;
        plac->pakt_info = alac_pakt_read_decode (psf, info->pakt_offset) ;
 
-
        if (plac->pakt_info == NULL)
        {       psf_log_printf (psf, "%s : alac_pkt_read() returns NULL.\n", __func__) ;
-               return SFE_MALLOC_FAILED ;
+               return SFE_INTERNAL ;
                } ;
 
        /* Read in the ALAC cookie data and pass it to the init function. */
@@ -402,7 +403,6 @@ alac_reader_calc_frames (SF_PRIVATE *psf, ALAC_PRIVATE *plac)
 static int
 alac_decode_block (SF_PRIVATE *psf, ALAC_PRIVATE *plac)
 {      ALAC_DECODER *pdec = &plac->decoder ;
-       uint8_t         byte_buffer [psf->sf.channels * ALAC_BYTE_BUFFER_SIZE] ;
        uint32_t        packet_size ;
        BitBuffer       bit_buffer ;
 
@@ -415,15 +415,15 @@ alac_decode_block (SF_PRIVATE *psf, ALAC_PRIVATE *plac)
 
        psf_fseek (psf, plac->input_data_pos, SEEK_SET) ;
 
-       if (packet_size > sizeof (byte_buffer))
+       if (packet_size > sizeof (plac->byte_buffer))
        {       psf_log_printf (psf, "%s : bad packet_size (%u)\n", __func__, packet_size) ;
                return 0 ;
                } ;
 
-       if ((packet_size != psf_fread (byte_buffer, 1, packet_size, psf)))
+       if ((packet_size != psf_fread (plac->byte_buffer, 1, packet_size, psf)))
                return 0 ;
 
-       BitBufferInit (&bit_buffer, byte_buffer, packet_size) ;
+       BitBufferInit (&bit_buffer, plac->byte_buffer, packet_size) ;
 
        plac->input_data_pos += packet_size ;
        plac->frames_this_block = 0 ;
@@ -436,14 +436,13 @@ alac_decode_block (SF_PRIVATE *psf, ALAC_PRIVATE *plac)
 
 
 static int
-alac_encode_block (SF_PRIVATE * psf, ALAC_PRIVATE *plac)
+alac_encode_block (ALAC_PRIVATE *plac)
 {      ALAC_ENCODER *penc = &plac->encoder ;
-       uint8_t byte_buffer [psf->sf.channels * ALAC_BYTE_BUFFER_SIZE] ;
        uint32_t num_bytes = 0 ;
 
-       alac_encode (penc, plac->partial_block_frames, plac->buffer, byte_buffer, &num_bytes) ;
+       alac_encode (penc, plac->partial_block_frames, plac->buffer, plac->byte_buffer, &num_bytes) ;
 
-       if (fwrite (byte_buffer, 1, num_bytes, plac->enctmp) != num_bytes)
+       if (fwrite (plac->byte_buffer, 1, num_bytes, plac->enctmp) != num_bytes)
                return 0 ;
        if ((plac->pakt_info = alac_pakt_append (plac->pakt_info, num_bytes)) == NULL)
                return 0 ;
@@ -662,7 +661,7 @@ alac_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t len)
                ptr += writecount ;
 
                if (plac->partial_block_frames >= plac->frames_per_block)
-                       alac_encode_block (psf, plac) ;
+                       alac_encode_block (plac) ;
                } ;
 
        return total ;
@@ -693,7 +692,7 @@ alac_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t len)
                ptr += writecount ;
 
                if (plac->partial_block_frames >= plac->frames_per_block)
-                       alac_encode_block (psf, plac) ;
+                       alac_encode_block (plac) ;
                } ;
 
        return total ;
@@ -726,7 +725,7 @@ alac_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t len)
                ptr += writecount ;
 
                if (plac->partial_block_frames >= plac->frames_per_block)
-                       alac_encode_block (psf, plac) ;
+                       alac_encode_block (plac) ;
                } ;
 
        return total ;
@@ -759,7 +758,7 @@ alac_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t len)
                ptr += writecount ;
 
                if (plac->partial_block_frames >= plac->frames_per_block)
-                       alac_encode_block (psf, plac) ;
+                       alac_encode_block (plac) ;
                } ;
 
        return total ;
@@ -815,7 +814,7 @@ alac_pakt_read_decode (SF_PRIVATE * psf, uint32_t UNUSED (pakt_offset))
        chunk_info.id_size = 4 ;
 
        if ((chunk_iterator = psf_get_chunk_iterator (psf, chunk_info.id)) == NULL)
-       {       printf ("%s %d : no chunk iterator found\n\n", __func__, __LINE__) ;
+       {       psf_log_printf (psf, "%s : no chunk iterator found\n", __func__) ;
                free (chunk_info.data) ;
                chunk_info.data = NULL ;
                return NULL ;
@@ -827,8 +826,7 @@ alac_pakt_read_decode (SF_PRIVATE * psf, uint32_t UNUSED (pakt_offset))
        chunk_info.data = pakt_data = malloc (pakt_size + 5) ;
 
        if ((bcount = psf->get_chunk_data (psf, chunk_iterator, &chunk_info)) != SF_ERR_NO_ERROR)
-       {       printf ("%s %d : %s\n\n", __func__, __LINE__, sf_error_number (bcount)) ;
-               while (chunk_iterator)
+       {       while (chunk_iterator)
                        chunk_iterator = psf->next_chunk_iterator (psf, chunk_iterator) ;
                free (chunk_info.data) ;
                chunk_info.data = NULL ;
index 7f76826..57b8b5f 100644 (file)
--- a/src/au.c
+++ b/src/au.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -218,8 +218,8 @@ au_write_header (SF_PRIVATE *psf, int calc_length)
                return (psf->error = SFE_BAD_OPEN_FORMAT) ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
 
        /*
        ** Only attempt to seek if we are not writng to a pipe. If we are
@@ -250,12 +250,12 @@ au_write_header (SF_PRIVATE *psf, int calc_length)
                return (psf->error = SFE_BAD_OPEN_FORMAT) ;
 
        /* Header construction complete so write it out. */
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index a235b0d..a66bb47 100644 (file)
--- a/src/avr.c
+++ b/src/avr.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2004-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2004-2016 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
@@ -201,8 +201,8 @@ avr_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
 
        /*
        ** Only attempt to seek if we are not writng to a pipe. If we are
@@ -222,12 +222,12 @@ avr_write_header (SF_PRIVATE *psf, int calc_length)
        psf_binheader_writef (psf, "E222zz", 0, 0, 0, make_size_t (20), make_size_t (64)) ;
 
        /* Header construction complete so write it out. */
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index 128a6a2..d2a7a76 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2006-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2006-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2006 Paul Davis <paul@linuxaudiosystems.com>
 **
 ** This program is free software; you can redistribute it and/or modify
@@ -181,7 +181,7 @@ gen_coding_history (char * added_history, int added_history_max, const SF_INFO *
 
        count = snprintf (added_history, added_history_max,
                                                        "A=PCM,F=%u,W=%d,M=%s,T=%s-%s\r\n",
-                                                       psfinfo->samplerate, width, chnstr, PACKAGEVERSION) ;
+                                                       psfinfo->samplerate, width, chnstr, PACKAGE_NAME, PACKAGE_VERSION) ;
 
        if (count >= added_history_max)
                return 0 ;
index c1893a1..6546d6d 100644 (file)
--- a/src/caf.c
+++ b/src/caf.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2005-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2005-2017 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
@@ -97,8 +97,12 @@ typedef struct
 static int     caf_close (SF_PRIVATE *psf) ;
 static int     caf_read_header (SF_PRIVATE *psf) ;
 static int     caf_write_header (SF_PRIVATE *psf, int calc_length) ;
+static int     caf_write_tailer (SF_PRIVATE *psf) ;
 static int     caf_command (SF_PRIVATE *psf, int command, void *data, int datasize) ;
 static int     caf_read_chanmap (SF_PRIVATE * psf, sf_count_t chunk_size) ;
+static int     caf_read_strings (SF_PRIVATE * psf, sf_count_t chunk_size) ;
+static void    caf_write_strings (SF_PRIVATE * psf, int location) ;
+
 
 static int caf_set_chunk (SF_PRIVATE *psf, const SF_CHUNK_INFO * chunk_info) ;
 static SF_CHUNK_ITERATOR * caf_next_chunk_iterator (SF_PRIVATE *psf, SF_CHUNK_ITERATOR * iterator) ;
@@ -147,7 +151,7 @@ caf_open (SF_PRIVATE *psf)
                        psf->sf.frames = 0 ;
                        } ;
 
-               psf->strings.flags = SF_STR_ALLOW_START ;
+               psf->strings.flags = SF_STR_ALLOW_START | SF_STR_ALLOW_END ;
 
                /*
                **      By default, add the peak chunk to floating point files. Default behaviour
@@ -218,7 +222,9 @@ static int
 caf_close (SF_PRIVATE *psf)
 {
        if (psf->file.mode == SFM_WRITE || psf->file.mode == SFM_RDWR)
+       {       caf_write_tailer (psf) ;
                caf_write_header (psf, SF_TRUE) ;
+               } ;
 
        return 0 ;
 } /* caf_close */
@@ -396,6 +402,8 @@ caf_read_header (SF_PRIVATE *psf)
                {       psf_log_printf (psf, "%M : %D *** Should be >= 0 ***\n", marker, chunk_size) ;
                        break ;
                        } ;
+               if (chunk_size > psf->filelength)
+                       break ;
 
                psf_store_read_chunk_u32 (&psf->rchunks, marker, psf_ftell (psf), chunk_size) ;
 
@@ -453,19 +461,23 @@ caf_read_header (SF_PRIVATE *psf)
                                psf_binheader_readf (psf, "E4", &k) ;
                                if (chunk_size == -1)
                                {       psf_log_printf (psf, "%M : -1\n") ;
-                                       chunk_size = psf->filelength - psf->headindex ;
+                                       chunk_size = psf->filelength - psf->header.indx ;
+                                       }
+                               else if (psf->filelength > 0 && chunk_size > psf->filelength - psf->header.indx + 10)
+                               {       psf_log_printf (psf, "%M : %D (should be %D)\n", marker, chunk_size, psf->filelength - psf->header.indx - 8) ;
+                                       psf->datalength = psf->filelength - psf->header.indx - 8 ;
                                        }
-                               else if (psf->filelength > 0 && psf->filelength < psf->headindex + chunk_size - 16)
-                                       psf_log_printf (psf, "%M : %D (should be %D)\n", marker, chunk_size, psf->filelength - psf->headindex - 8) ;
                                else
-                                       psf_log_printf (psf, "%M : %D\n", marker, chunk_size) ;
+                               {       psf_log_printf (psf, "%M : %D\n", marker, chunk_size) ;
+                                       /* Subtract the 4 bytes of the 'edit' field above. */
+                                       psf->datalength = chunk_size - 4 ;
+                                       } ;
 
                                psf_log_printf (psf, "  edit : %u\n", k) ;
 
-                               psf->dataoffset = psf->headindex ;
-
-                               /* Subtract the 4 bytes of the 'edit' field above. */
-                               psf->datalength = chunk_size - 4 ;
+                               psf->dataoffset = psf->header.indx ;
+                               if (psf->datalength + psf->dataoffset < psf->filelength)
+                                       psf->dataend = psf->datalength + psf->dataoffset ;
 
                                psf_binheader_readf (psf, "j", make_size_t (psf->datalength)) ;
                                have_data = 1 ;
@@ -478,7 +490,16 @@ caf_read_header (SF_PRIVATE *psf)
                                break ;
 
                        case pakt_MARKER :
-                               psf_log_printf (psf, "%M : %D\n", marker, chunk_size) ;
+                               if (chunk_size < 24)
+                               {       psf_log_printf (psf, "%M : %D (should be > 24)\n", marker, chunk_size) ;
+                                       return SFE_MALFORMED_FILE ;
+                                       }
+                               else if (chunk_size > psf->filelength - psf->header.indx)
+                               {       psf_log_printf (psf, "%M : %D (should be < %D)\n", marker, chunk_size, psf->filelength - psf->header.indx) ;
+                                       return SFE_MALFORMED_FILE ;
+                                       }
+                               else
+                                       psf_log_printf (psf, "%M : %D\n", marker, chunk_size) ;
 
                                psf_binheader_readf (psf, "E8844", &pcaf->alac.packets, &pcaf->alac.valid_frames,
                                                                        &pcaf->alac.priming_frames, &pcaf->alac.remainder_frames) ;
@@ -500,6 +521,20 @@ caf_read_header (SF_PRIVATE *psf)
                                psf_binheader_readf (psf, "j", make_size_t (chunk_size) - 24) ;
                                break ;
 
+                       case info_MARKER :
+                               if (chunk_size < 4)
+                               {       psf_log_printf (psf, "%M : %D (should be > 4)\n", marker, chunk_size) ;
+                                       return SFE_MALFORMED_FILE ;
+                                       }
+                               else if (chunk_size > psf->filelength - psf->header.indx)
+                               {       psf_log_printf (psf, "%M : %D (should be < %D)\n", marker, chunk_size, psf->filelength - psf->header.indx) ;
+                                       return SFE_MALFORMED_FILE ;
+                                       } ;
+                               psf_log_printf (psf, "%M : %D\n", marker, chunk_size) ;
+                               if (chunk_size > 4)
+                                       caf_read_strings (psf, chunk_size - 4) ;
+                               break ;
+
                        default :
                                psf_log_printf (psf, "%M : %D (skipped)\n", marker, chunk_size) ;
                                psf_binheader_readf (psf, "j", make_size_t (chunk_size)) ;
@@ -544,7 +579,7 @@ caf_write_header (SF_PRIVATE *psf, int calc_length)
 {      BUF_UNION       ubuf ;
        CAF_PRIVATE     *pcaf ;
        DESC_CHUNK desc ;
-       sf_count_t current, free_len ;
+       sf_count_t current ;
        uint32_t uk ;
        int subformat, append_free_block = SF_TRUE ;
 
@@ -568,8 +603,8 @@ caf_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        /* 'caff' marker, version and flags. */
@@ -688,10 +723,7 @@ caf_write_header (SF_PRIVATE *psf, int calc_length)
 
        psf_binheader_writef (psf, "mE44444", desc.fmt_id, desc.fmt_flags, desc.pkt_bytes, desc.frames_per_packet, desc.channels_per_frame, desc.bits_per_chan) ;
 
-#if 0
-       if (psf->strings.flags & SF_STR_LOCATE_START)
-               caf_write_strings (psf, SF_STR_LOCATE_START) ;
-#endif
+       caf_write_strings (psf, SF_STR_LOCATE_START) ;
 
        if (psf->peak_info != NULL)
        {       int k ;
@@ -709,19 +741,19 @@ caf_write_header (SF_PRIVATE *psf, int calc_length)
 
        if (append_free_block)
        {       /* Add free chunk so that the actual audio data starts at a multiple 0x1000. */
-               free_len = 0x1000 - psf->headindex - 16 - 12 ;
+               sf_count_t free_len = 0x1000 - psf->header.indx - 16 - 12 ;
                while (free_len < 0)
                        free_len += 0x1000 ;
-               psf_binheader_writef (psf, "Em8z", free_MARKER, free_len, (int) free_len) ;
+               psf_binheader_writef (psf, "Em8z", free_MARKER, free_len, make_size_t (free_len)) ;
                } ;
 
        psf_binheader_writef (psf, "Em84", data_MARKER, psf->datalength + 4, 0) ;
 
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
        if (current < psf->dataoffset)
                psf_fseek (psf, psf->dataoffset, SEEK_SET) ;
        else if (current > 0)
@@ -731,6 +763,36 @@ caf_write_header (SF_PRIVATE *psf, int calc_length)
 } /* caf_write_header */
 
 static int
+caf_write_tailer (SF_PRIVATE *psf)
+{
+       /* Reset the current header buffer length to zero. */
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
+
+       if (psf->bytewidth > 0 && psf->sf.seekable == SF_TRUE)
+       {       psf->datalength = psf->sf.frames * psf->bytewidth * psf->sf.channels ;
+               psf->dataend = psf->dataoffset + psf->datalength ;
+               } ;
+
+       if (psf->dataend > 0)
+               psf_fseek (psf, psf->dataend, SEEK_SET) ;
+       else
+               psf->dataend = psf_fseek (psf, 0, SEEK_END) ;
+
+       if (psf->dataend & 1)
+               psf_binheader_writef (psf, "z", 1) ;
+
+       if (psf->strings.flags & SF_STR_LOCATE_END)
+               caf_write_strings (psf, SF_STR_LOCATE_END) ;
+
+       /* Write the tailer. */
+       if (psf->header.indx > 0)
+               psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
+
+       return 0 ;
+} /* caf_write_tailer */
+
+static int
 caf_read_chanmap (SF_PRIVATE * psf, sf_count_t chunk_size)
 {      const AIFF_CAF_CHANNEL_MAP * map_info ;
        unsigned channel_bitmap, channel_decriptions, bytesread ;
@@ -761,6 +823,168 @@ caf_read_chanmap (SF_PRIVATE * psf, sf_count_t chunk_size)
        return 0 ;
 } /* caf_read_chanmap */
 
+
+static uint32_t
+string_hash32 (const char * str)
+{      uint32_t hash = 0x87654321 ;
+
+       while (str [0])
+       {       hash = hash * 333 + str [0] ;
+               str ++ ;
+               } ;
+
+       return hash ;
+} /* string_hash32 */
+
+static int
+caf_read_strings (SF_PRIVATE * psf, sf_count_t chunk_size)
+{      char *buf ;
+       char *key, *value ;
+       uint32_t count, hash ;
+
+       if ((buf = malloc (chunk_size + 1)) == NULL)
+               return (psf->error = SFE_MALLOC_FAILED) ;
+
+       psf_binheader_readf (psf, "E4b", &count, buf, make_size_t (chunk_size)) ;
+       psf_log_printf (psf, " count: %u\n", count) ;
+
+       /* Force terminate `buf` to make sure. */
+       buf [chunk_size] = 0 ;
+
+       for (key = buf ; key < buf + chunk_size ; )
+       {       value = key + strlen (key) + 1 ;
+               if (value > buf + chunk_size)
+                       break ;
+               psf_log_printf (psf, "   %-12s : %s\n", key, value) ;
+
+               hash = string_hash32 (key) ;
+               switch (hash)
+               {       case 0xC4861943 : /* 'title' */
+                               psf_store_string (psf, SF_STR_TITLE, value) ;
+                               break ;
+                       case 0xAD47A394 : /* 'software' */
+                               psf_store_string (psf, SF_STR_SOFTWARE, value) ;
+                               break ;
+                       case 0x5D178E2A : /* 'copyright' */
+                               psf_store_string (psf, SF_STR_COPYRIGHT, value) ;
+                               break ;
+                       case 0x60E4D0C8 : /* 'artist' */
+                               psf_store_string (psf, SF_STR_ARTIST, value) ;
+                               break ;
+                       case 0x83B5D16A : /* 'genre' */
+                               psf_store_string (psf, SF_STR_GENRE, value) ;
+                               break ;
+                       case 0x15E5FC88 : /* 'comment' */
+                       case 0x7C297D5B : /* 'comments' */
+                               psf_store_string (psf, SF_STR_COMMENT, value) ;
+                               break ;
+                       case 0x24A7C347 : /* 'tracknumber' */
+                               psf_store_string (psf, SF_STR_TRACKNUMBER, value) ;
+                               break ;
+                       case 0x50A31EB7 : /* 'date' */
+                               psf_store_string (psf, SF_STR_DATE, value) ;
+                               break ;
+                       case 0x6583545A : /* 'album' */
+                               psf_store_string (psf, SF_STR_ALBUM, value) ;
+                               break ;
+                       case 0xE7C64B6C : /* 'license' */
+                               psf_store_string (psf, SF_STR_LICENSE, value) ;
+                               break ;
+                       default :
+                               psf_log_printf (psf, " Unhandled hash 0x%x : /* '%s' */\n", hash, key) ;
+                               break ;
+                       } ;
+
+               key = value + strlen (value) + 1 ;
+               } ;
+
+       free (buf) ;
+
+       return 0 ;
+} /* caf_read_strings */
+
+struct put_buffer
+{      uint32_t index ;
+       char s [16 * 1024] ;
+} ;
+
+static uint32_t
+put_key_value (struct put_buffer * buf, const char * key, const char * value)
+{      uint32_t written ;
+
+       if (buf->index + strlen (key) + strlen (value) + 2 > sizeof (buf->s))
+               return 0 ;
+
+       written = snprintf (buf->s + buf->index, sizeof (buf->s) - buf->index, "%s%c%s%c", key, 0, value, 0) ;
+
+       if (buf->index + written >= sizeof (buf->s))
+               return 0 ;
+
+       buf->index += written ;
+       return 1 ;
+} /* put_key_value */
+
+static void
+caf_write_strings (SF_PRIVATE * psf, int location)
+{      struct put_buffer buf ;
+       const char * cptr ;
+       uint32_t k, string_count = 0 ;
+
+       memset (&buf, 0, sizeof (buf)) ;
+
+       for (k = 0 ; k < SF_MAX_STRINGS ; k++)
+       {       if (psf->strings.data [k].type == 0)
+                       break ;
+
+               if (psf->strings.data [k].flags != location)
+                       continue ;
+
+               if ((cptr = psf_get_string (psf, psf->strings.data [k].type)) == NULL)
+                       continue ;
+
+               switch (psf->strings.data [k].type)
+               {       case SF_STR_TITLE :
+                               string_count += put_key_value (&buf, "title", cptr) ;
+                               break ;
+                       case SF_STR_COPYRIGHT :
+                               string_count += put_key_value (&buf, "copyright", cptr) ;
+                               break ;
+                       case SF_STR_SOFTWARE :
+                               string_count += put_key_value (&buf, "software", cptr) ;
+                               break ;
+                       case SF_STR_ARTIST :
+                               string_count += put_key_value (&buf, "artist", cptr) ;
+                               break ;
+                       case SF_STR_COMMENT :
+                               string_count += put_key_value (&buf, "comment", cptr) ;
+                               break ;
+                       case SF_STR_DATE :
+                               string_count += put_key_value (&buf, "date", cptr) ;
+                               break ;
+                       case SF_STR_ALBUM :
+                               string_count += put_key_value (&buf, "album", cptr) ;
+                               break ;
+                       case SF_STR_LICENSE :
+                               string_count += put_key_value (&buf, "license", cptr) ;
+                               break ;
+                       case SF_STR_TRACKNUMBER :
+                               string_count += put_key_value (&buf, "tracknumber", cptr) ;
+                               break ;
+                       case SF_STR_GENRE :
+                               string_count += put_key_value (&buf, "genre", cptr) ;
+                               break ;
+
+                       default :
+                               break ;
+                       } ;
+               } ;
+
+       if (string_count == 0 || buf.index == 0)
+               return ;
+
+       psf_binheader_writef (psf, "Em84b", info_MARKER, make_size_8 (buf.index + 4), string_count, buf.s, make_size_t (buf.index)) ;
+} /* caf_write_strings */
+
 /*==============================================================================
 */
 
index b661ce5..d8b6555 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2012 IOhannes m zmoelnig, IEM <zmoelnig@iem.at>
 **
 ** This program is free software; you can redistribute it and/or modify
@@ -86,7 +86,7 @@ psf_get_chunk_iterator (SF_PRIVATE * psf, const char * marker_str)
 
 SF_CHUNK_ITERATOR *
 psf_next_chunk_iterator (const READ_CHUNKS * pchk , SF_CHUNK_ITERATOR * iterator)
-{      int64_t hash = iterator->hash ;
+{      uint64_t hash = iterator->hash ;
        uint32_t k ;
 
        iterator->current++ ;
@@ -153,7 +153,7 @@ psf_store_read_chunk_u32 (READ_CHUNKS * pchk, uint32_t marker, sf_count_t offset
 
 int
 psf_find_read_chunk_str (const READ_CHUNKS * pchk, const char * marker_str)
-{      int64_t hash ;
+{      uint64_t hash ;
        uint32_t k ;
        union
        {       uint32_t marker ;
index 963f6eb..3204e56 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2001-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2001-2016 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
@@ -55,7 +55,7 @@ static SF_FORMAT_INFO const simple_formats [] =
                "CAF (Apple 16 bit PCM)", "caf"
                },
 
-#if HAVE_EXTERNAL_LIBS
+#if HAVE_EXTERNAL_XIPH_LIBS
        {       SF_FORMAT_FLAC | SF_FORMAT_PCM_16,
                "FLAC 16 bit", "flac"
                },
@@ -65,7 +65,7 @@ static SF_FORMAT_INFO const simple_formats [] =
                "OKI Dialogic VOX ADPCM", "vox"
                },
 
-#if HAVE_EXTERNAL_LIBS
+#if HAVE_EXTERNAL_XIPH_LIBS
        {       SF_FORMAT_OGG | SF_FORMAT_VORBIS,
                "Ogg Vorbis (Xiph Foundation)", "oga"
                },
@@ -121,7 +121,7 @@ static SF_FORMAT_INFO const major_formats [] =
        {       SF_FORMAT_AU,           "AU (Sun/NeXT)",                                                "au"    },
        {       SF_FORMAT_AVR,          "AVR (Audio Visual Research)",                  "avr"   },
        {       SF_FORMAT_CAF,          "CAF (Apple Core Audio File)",                  "caf"   },
-#if HAVE_EXTERNAL_LIBS
+#if HAVE_EXTERNAL_XIPH_LIBS
        {       SF_FORMAT_FLAC,         "FLAC (Free Lossless Audio Codec)",             "flac"  },
 #endif
        {       SF_FORMAT_HTK,          "HTK (HMM Tool Kit)",                                   "htk"   },
@@ -129,7 +129,7 @@ static SF_FORMAT_INFO const major_formats [] =
        {       SF_FORMAT_MAT4,         "MAT4 (GNU Octave 2.0 / Matlab 4.2)",   "mat"   },
        {       SF_FORMAT_MAT5,         "MAT5 (GNU Octave 2.1 / Matlab 5.0)",   "mat"   },
        {       SF_FORMAT_MPC2K,        "MPC (Akai MPC 2k)",                                    "mpc"   },
-#if HAVE_EXTERNAL_LIBS
+#if HAVE_EXTERNAL_XIPH_LIBS
        {       SF_FORMAT_OGG,          "OGG (OGG Container format)",                   "oga"   },
 #endif
        {       SF_FORMAT_PAF,          "PAF (Ensoniq PARIS)",                                  "paf"   },
@@ -201,7 +201,7 @@ static SF_FORMAT_INFO subtype_formats [] =
        {       SF_FORMAT_DPCM_16,              "16 bit DPCM",                  NULL    },
        {       SF_FORMAT_DPCM_8,               "8 bit DPCM",                   NULL    },
 
-#if HAVE_EXTERNAL_LIBS
+#if HAVE_EXTERNAL_XIPH_LIBS
        {       SF_FORMAT_VORBIS,               "Vorbis",                               NULL    },
 #endif
 
index 830c43e..b9f3223 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2017 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
 #include "sfendian.h"
 #include "common.h"
 
+#define        INITAL_HEADER_SIZE      256
+
+/* Allocate and initialize the SF_PRIVATE struct. */
+SF_PRIVATE *
+psf_allocate (void)
+{      SF_PRIVATE * psf ;
+
+       if ((psf = calloc (1, sizeof (SF_PRIVATE))) == NULL)
+               return  NULL ;
+
+       if ((psf->header.ptr = calloc (1, INITAL_HEADER_SIZE)) == NULL)
+       {       free (psf) ;
+               return  NULL ;
+               } ;
+       psf->header.len = INITAL_HEADER_SIZE ;
+
+       return psf ;
+} /* psf_allocate */
+
+static int
+psf_bump_header_allocation (SF_PRIVATE * psf, sf_count_t needed)
+{
+       sf_count_t newlen, smallest = INITAL_HEADER_SIZE ;
+       void * ptr ;
+
+       newlen = (needed > psf->header.len) ? 2 * SF_MAX (needed, smallest) : 2 * psf->header.len ;
+
+       if (newlen > 100 * 1024)
+       {       psf_log_printf (psf, "Request for header allocation of %D denined.\n", newlen) ;
+               return 1 ;
+               }
+
+       if ((ptr = realloc (psf->header.ptr, newlen)) == NULL)
+       {       psf_log_printf (psf, "realloc (%p, %D) failed\n", psf->header.ptr, newlen) ;
+               psf->error = SFE_MALLOC_FAILED ;
+               return 1 ;
+               } ;
+
+       psf->header.ptr = ptr ;
+       psf->header.len = newlen ;
+       return 0 ;
+} /* psf_bump_header_allocation */
+
 /*-----------------------------------------------------------------------------------------------
 ** psf_log_printf allows libsndfile internal functions to print to an internal parselog which
 ** can later be displayed.
@@ -336,9 +379,9 @@ psf_asciiheader_printf (SF_PRIVATE *psf, const char *format, ...)
        int             maxlen ;
        char    *start ;
 
-       maxlen = strlen ((char*) psf->header) ;
-       start   = ((char*) psf->header) + maxlen ;
-       maxlen  = sizeof (psf->header) - maxlen ;
+       maxlen = strlen ((char*) psf->header.ptr) ;
+       start   = ((char*) psf->header.ptr) + maxlen ;
+       maxlen  = psf->header.len - maxlen ;
 
        va_start (argptr, format) ;
        vsnprintf (start, maxlen, format, argptr) ;
@@ -347,7 +390,7 @@ psf_asciiheader_printf (SF_PRIVATE *psf, const char *format, ...)
        /* Make sure the string is properly terminated. */
        start [maxlen - 1] = 0 ;
 
-       psf->headindex = strlen ((char*) psf->header) ;
+       psf->header.indx = strlen ((char*) psf->header.ptr) ;
 
        return ;
 } /* psf_asciiheader_printf */
@@ -372,6 +415,8 @@ psf_asciiheader_printf (SF_PRIVATE *psf, const char *format, ...)
 **
 **             s   - string preceded by a four byte length
 **             S   - string including null terminator
+**      p   - a Pascal string
+**
 **             f       - floating point data
 **             d       - double precision floating point data
 **             h       - 16 binary bytes value
@@ -398,30 +443,25 @@ psf_asciiheader_printf (SF_PRIVATE *psf, const char *format, ...)
 
 static inline void
 header_put_byte (SF_PRIVATE *psf, char x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 1)
-               psf->header [psf->headindex++] = x ;
+{      psf->header.ptr [psf->header.indx++] = x ;
 } /* header_put_byte */
 
 #if (CPU_IS_BIG_ENDIAN == 1)
 static inline void
 header_put_marker (SF_PRIVATE *psf, int x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 4)
-       {       psf->header [psf->headindex++] = (x >> 24) ;
-               psf->header [psf->headindex++] = (x >> 16) ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = x ;
-               } ;
+{      psf->header.ptr [psf->header.indx++] = (x >> 24) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 16) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 8) ;
+       psf->header.ptr [psf->header.indx++] = x ;
 } /* header_put_marker */
 
 #elif (CPU_IS_LITTLE_ENDIAN == 1)
 static inline void
 header_put_marker (SF_PRIVATE *psf, int x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 4)
-       {       psf->header [psf->headindex++] = x ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = (x >> 16) ;
-               psf->header [psf->headindex++] = (x >> 24) ;
-               } ;
+{      psf->header.ptr [psf->header.indx++] = x ;
+       psf->header.ptr [psf->header.indx++] = (x >> 8) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 16) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 24) ;
 } /* header_put_marker */
 
 #else
@@ -431,120 +471,74 @@ header_put_marker (SF_PRIVATE *psf, int x)
 
 static inline void
 header_put_be_short (SF_PRIVATE *psf, int x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 2)
-       {       psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = x ;
-               } ;
+{      psf->header.ptr [psf->header.indx++] = (x >> 8) ;
+       psf->header.ptr [psf->header.indx++] = x ;
 } /* header_put_be_short */
 
 static inline void
 header_put_le_short (SF_PRIVATE *psf, int x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 2)
-       {       psf->header [psf->headindex++] = x ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               } ;
+{      psf->header.ptr [psf->header.indx++] = x ;
+       psf->header.ptr [psf->header.indx++] = (x >> 8) ;
 } /* header_put_le_short */
 
 static inline void
 header_put_be_3byte (SF_PRIVATE *psf, int x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 3)
-       {       psf->header [psf->headindex++] = (x >> 16) ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = x ;
-               } ;
+{      psf->header.ptr [psf->header.indx++] = (x >> 16) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 8) ;
+       psf->header.ptr [psf->header.indx++] = x ;
 } /* header_put_be_3byte */
 
 static inline void
 header_put_le_3byte (SF_PRIVATE *psf, int x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 3)
-       {       psf->header [psf->headindex++] = x ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = (x >> 16) ;
-               } ;
+{      psf->header.ptr [psf->header.indx++] = x ;
+       psf->header.ptr [psf->header.indx++] = (x >> 8) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 16) ;
 } /* header_put_le_3byte */
 
 static inline void
 header_put_be_int (SF_PRIVATE *psf, int x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 4)
-       {       psf->header [psf->headindex++] = (x >> 24) ;
-               psf->header [psf->headindex++] = (x >> 16) ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = x ;
-               } ;
+{      psf->header.ptr [psf->header.indx++] = (x >> 24) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 16) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 8) ;
+       psf->header.ptr [psf->header.indx++] = x ;
 } /* header_put_be_int */
 
 static inline void
 header_put_le_int (SF_PRIVATE *psf, int x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 4)
-       {       psf->header [psf->headindex++] = x ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = (x >> 16) ;
-               psf->header [psf->headindex++] = (x >> 24) ;
-               } ;
+{      psf->header.ptr [psf->header.indx++] = x ;
+       psf->header.ptr [psf->header.indx++] = (x >> 8) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 16) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 24) ;
 } /* header_put_le_int */
 
-#if (SIZEOF_SF_COUNT_T == 4)
+#if (SIZEOF_SF_COUNT_T == 8)
 
 static inline void
 header_put_be_8byte (SF_PRIVATE *psf, sf_count_t x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 8)
-       {       psf->header [psf->headindex++] = 0 ;
-               psf->header [psf->headindex++] = 0 ;
-               psf->header [psf->headindex++] = 0 ;
-               psf->header [psf->headindex++] = 0 ;
-               psf->header [psf->headindex++] = (x >> 24) ;
-               psf->header [psf->headindex++] = (x >> 16) ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = x ;
-               } ;
+{      psf->header.ptr [psf->header.indx++] = (x >> 56) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 48) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 40) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 32) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 24) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 16) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 8) ;
+       psf->header.ptr [psf->header.indx++] = x ;
 } /* header_put_be_8byte */
 
 static inline void
 header_put_le_8byte (SF_PRIVATE *psf, sf_count_t x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 8)
-       {       psf->header [psf->headindex++] = x ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = (x >> 16) ;
-               psf->header [psf->headindex++] = (x >> 24) ;
-               psf->header [psf->headindex++] = 0 ;
-               psf->header [psf->headindex++] = 0 ;
-               psf->header [psf->headindex++] = 0 ;
-               psf->header [psf->headindex++] = 0 ;
-               } ;
-} /* header_put_le_8byte */
-
-#elif (SIZEOF_SF_COUNT_T == 8)
-
-static inline void
-header_put_be_8byte (SF_PRIVATE *psf, sf_count_t x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 8)
-       {       psf->header [psf->headindex++] = (x >> 56) ;
-               psf->header [psf->headindex++] = (x >> 48) ;
-               psf->header [psf->headindex++] = (x >> 40) ;
-               psf->header [psf->headindex++] = (x >> 32) ;
-               psf->header [psf->headindex++] = (x >> 24) ;
-               psf->header [psf->headindex++] = (x >> 16) ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = x ;
-               } ;
-} /* header_put_be_8byte */
-
-static inline void
-header_put_le_8byte (SF_PRIVATE *psf, sf_count_t x)
-{      if (psf->headindex < SIGNED_SIZEOF (psf->header) - 8)
-       {       psf->header [psf->headindex++] = x ;
-               psf->header [psf->headindex++] = (x >> 8) ;
-               psf->header [psf->headindex++] = (x >> 16) ;
-               psf->header [psf->headindex++] = (x >> 24) ;
-               psf->header [psf->headindex++] = (x >> 32) ;
-               psf->header [psf->headindex++] = (x >> 40) ;
-               psf->header [psf->headindex++] = (x >> 48) ;
-               psf->header [psf->headindex++] = (x >> 56) ;
-               } ;
+{      psf->header.ptr [psf->header.indx++] = x ;
+       psf->header.ptr [psf->header.indx++] = (x >> 8) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 16) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 24) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 32) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 40) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 48) ;
+       psf->header.ptr [psf->header.indx++] = (x >> 56) ;
 } /* header_put_le_8byte */
 
 #else
-#error "SIZEOF_SF_COUNT_T is not defined."
+#error "SIZEOF_SF_COUNT_T != 8"
 #endif
 
 int
@@ -565,7 +559,11 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
        va_start (argptr, format) ;
 
        while ((c = *format++))
-       {       switch (c)
+       {
+               if (psf->header.indx + 16 >= psf->header.len && psf_bump_header_allocation (psf, 16))
+                       return count ;
+
+               switch (c)
                {       case ' ' : /* Do nothing. Just used to space out format string. */
                                        break ;
 
@@ -656,20 +654,20 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
                                        /* Floats are passed as doubles. Is this always true? */
                                        floatdata = (float) va_arg (argptr, double) ;
                                        if (psf->rwf_endian == SF_ENDIAN_BIG)
-                                               float32_be_write (floatdata, psf->header + psf->headindex) ;
+                                               float32_be_write (floatdata, psf->header.ptr + psf->header.indx) ;
                                        else
-                                               float32_le_write (floatdata, psf->header + psf->headindex) ;
-                                       psf->headindex += 4 ;
+                                               float32_le_write (floatdata, psf->header.ptr + psf->header.indx) ;
+                                       psf->header.indx += 4 ;
                                        count += 4 ;
                                        break ;
 
                        case 'd' :
                                        doubledata = va_arg (argptr, double) ;
                                        if (psf->rwf_endian == SF_ENDIAN_BIG)
-                                               double64_be_write (doubledata, psf->header + psf->headindex) ;
+                                               double64_be_write (doubledata, psf->header.ptr + psf->header.indx) ;
                                        else
-                                               double64_le_write (doubledata, psf->header + psf->headindex) ;
-                                       psf->headindex += 8 ;
+                                               double64_le_write (doubledata, psf->header.ptr + psf->header.indx) ;
+                                       psf->header.indx += 8 ;
                                        count += 8 ;
                                        break ;
 
@@ -678,13 +676,17 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
                                        strptr = va_arg (argptr, char *) ;
                                        size = strlen (strptr) + 1 ;
                                        size += (size & 1) ;
+
+                                       if (psf->header.indx + (sf_count_t) size >= psf->header.len && psf_bump_header_allocation (psf, 16))
+                                               return count ;
+
                                        if (psf->rwf_endian == SF_ENDIAN_BIG)
                                                header_put_be_int (psf, size) ;
                                        else
                                                header_put_le_int (psf, size) ;
-                                       memcpy (&(psf->header [psf->headindex]), strptr, size) ;
-                                       psf->headindex += size ;
-                                       psf->header [psf->headindex - 1] = 0 ;
+                                       memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ;
+                                       psf->header.indx += size ;
+                                       psf->header.ptr [psf->header.indx - 1] = 0 ;
                                        count += 4 + size ;
                                        break ;
 
@@ -695,46 +697,86 @@ psf_binheader_writef (SF_PRIVATE *psf, const char *format, ...)
                                        */
                                        strptr = va_arg (argptr, char *) ;
                                        size = strlen (strptr) ;
+                                       if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size))
+                                               return count ;
                                        if (psf->rwf_endian == SF_ENDIAN_BIG)
                                                header_put_be_int (psf, size) ;
                                        else
                                                header_put_le_int (psf, size) ;
-                                       memcpy (&(psf->header [psf->headindex]), strptr, size + 1) ;
+                                       memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size + 1) ;
                                        size += (size & 1) ;
-                                       psf->headindex += size ;
-                                       psf->header [psf->headindex] = 0 ;
+                                       psf->header.indx += size ;
+                                       psf->header.ptr [psf->header.indx] = 0 ;
                                        count += 4 + size ;
                                        break ;
 
+                       case 'p' :
+                                       /* Write a PASCAL string (as used by AIFF files).
+                                       */
+                                       strptr = va_arg (argptr, char *) ;
+                                       size = strlen (strptr) ;
+                                       size = (size & 1) ? size : size + 1 ;
+                                       size = (size > 254) ? 254 : size ;
+
+                                       if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size))
+                                               return count ;
+
+                                       header_put_byte (psf, size) ;
+                                       memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ;
+                                       psf->header.indx += size ;
+                                       count += 1 + size ;
+                                       break ;
+
                        case 'b' :
                                        bindata = va_arg (argptr, void *) ;
                                        size    = va_arg (argptr, size_t) ;
-                                       memcpy (&(psf->header [psf->headindex]), bindata, size) ;
-                                       psf->headindex += size ;
+
+                                       if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size))
+                                               return count ;
+
+                                       memcpy (&(psf->header.ptr [psf->header.indx]), bindata, size) ;
+                                       psf->header.indx += size ;
                                        count += size ;
                                        break ;
 
                        case 'z' :
                                        size = va_arg (argptr, size_t) ;
+
+                                       if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size))
+                                               return count ;
+
                                        count += size ;
                                        while (size)
-                                       {       psf->header [psf->headindex] = 0 ;
-                                               psf->headindex ++ ;
+                                       {       psf->header.ptr [psf->header.indx] = 0 ;
+                                               psf->header.indx ++ ;
                                                size -- ;
                                                } ;
                                        break ;
 
                        case 'h' :
                                        bindata = va_arg (argptr, void *) ;
-                                       memcpy (&(psf->header [psf->headindex]), bindata, 16) ;
-                                       psf->headindex += 16 ;
+                                       memcpy (&(psf->header.ptr [psf->header.indx]), bindata, 16) ;
+                                       psf->header.indx += 16 ;
                                        count += 16 ;
                                        break ;
 
-                       case 'j' :
+                       case 'j' :      /* Jump forwards/backwards by specified amount. */
                                        size = va_arg (argptr, size_t) ;
-                                       psf->headindex += size ;
-                                       count = size ;
+
+                                       if (psf->header.indx + (sf_count_t) size > psf->header.len && psf_bump_header_allocation (psf, size))
+                                               return count ;
+
+                                       psf->header.indx += size ;
+                                       count += size ;
+                                       break ;
+
+                       case 'o' :      /* Jump to specified offset. */
+                                       size = va_arg (argptr, size_t) ;
+
+                                       if ((sf_count_t) size >= psf->header.len && psf_bump_header_allocation (psf, size))
+                                               return count ;
+
+                                       psf->header.indx = size ;
                                        break ;
 
                        default :
@@ -799,31 +841,20 @@ static int
 header_read (SF_PRIVATE *psf, void *ptr, int bytes)
 {      int count = 0 ;
 
-       if (psf->headindex >= SIGNED_SIZEOF (psf->header))
-               return psf_fread (ptr, 1, bytes, psf) ;
-
-       if (psf->headindex + bytes > SIGNED_SIZEOF (psf->header))
-       {       int most ;
+       if (psf->header.indx + bytes >= psf->header.len && psf_bump_header_allocation (psf, bytes))
+               return count ;
 
-               most = SIGNED_SIZEOF (psf->header) - psf->headend ;
-               psf_fread (psf->header + psf->headend, 1, most, psf) ;
-               memcpy (ptr, psf->header + psf->headend, most) ;
-               psf->headend = psf->headindex += most ;
-               psf_fread ((char *) ptr + most, bytes - most, 1, psf) ;
-               return bytes ;
-               } ;
-
-       if (psf->headindex + bytes > psf->headend)
-       {       count = psf_fread (psf->header + psf->headend, 1, bytes - (psf->headend - psf->headindex), psf) ;
-               if (count != bytes - (int) (psf->headend - psf->headindex))
+       if (psf->header.indx + bytes > psf->header.end)
+       {       count = psf_fread (psf->header.ptr + psf->header.end, 1, bytes - (psf->header.end - psf->header.indx), psf) ;
+               if (count != bytes - (int) (psf->header.end - psf->header.indx))
                {       psf_log_printf (psf, "Error : psf_fread returned short count.\n") ;
                        return count ;
                        } ;
-               psf->headend += count ;
+               psf->header.end += count ;
                } ;
 
-       memcpy (ptr, psf->header + psf->headindex, bytes) ;
-       psf->headindex += bytes ;
+       memcpy (ptr, psf->header.ptr + psf->header.indx, bytes) ;
+       psf->header.indx += bytes ;
 
        return bytes ;
 } /* header_read */
@@ -833,39 +864,44 @@ header_seek (SF_PRIVATE *psf, sf_count_t position, int whence)
 {
        switch (whence)
        {       case SEEK_SET :
-                       if (position > SIGNED_SIZEOF (psf->header))
+                       if (psf->header.indx + position >= psf->header.len)
+                               psf_bump_header_allocation (psf, position) ;
+                       if (position > psf->header.len)
                        {       /* Too much header to cache so just seek instead. */
                                psf_fseek (psf, position, whence) ;
                                return ;
                                } ;
-                       if (position > psf->headend)
-                               psf->headend += psf_fread (psf->header + psf->headend, 1, position - psf->headend, psf) ;
-                       psf->headindex = position ;
+                       if (position > psf->header.end)
+                               psf->header.end += psf_fread (psf->header.ptr + psf->header.end, 1, position - psf->header.end, psf) ;
+                       psf->header.indx = position ;
                        break ;
 
                case SEEK_CUR :
-                       if (psf->headindex + position < 0)
+                       if (psf->header.indx + position >= psf->header.len)
+                               psf_bump_header_allocation (psf, position) ;
+
+                       if (psf->header.indx + position < 0)
                                break ;
 
-                       if (psf->headindex >= SIGNED_SIZEOF (psf->header))
+                       if (psf->header.indx >= psf->header.len)
                        {       psf_fseek (psf, position, whence) ;
                                return ;
                                } ;
 
-                       if (psf->headindex + position <= psf->headend)
-                       {       psf->headindex += position ;
+                       if (psf->header.indx + position <= psf->header.end)
+                       {       psf->header.indx += position ;
                                break ;
                                } ;
 
-                       if (psf->headindex + position > SIGNED_SIZEOF (psf->header))
+                       if (psf->header.indx + position > psf->header.len)
                        {       /* Need to jump this without caching it. */
-                               psf->headindex = psf->headend ;
+                               psf->header.indx = psf->header.end ;
                                psf_fseek (psf, position, SEEK_CUR) ;
                                break ;
                                } ;
 
-                       psf->headend += psf_fread (psf->header + psf->headend, 1, position - (psf->headend - psf->headindex), psf) ;
-                       psf->headindex = psf->headend ;
+                       psf->header.end += psf_fread (psf->header.ptr + psf->header.end, 1, position - (psf->header.end - psf->header.indx), psf) ;
+                       psf->header.indx = psf->header.end ;
                        break ;
 
                case SEEK_END :
@@ -881,15 +917,18 @@ static int
 header_gets (SF_PRIVATE *psf, char *ptr, int bufsize)
 {      int             k ;
 
+       if (psf->header.indx + bufsize >= psf->header.len && psf_bump_header_allocation (psf, bufsize))
+               return 0 ;
+
        for (k = 0 ; k < bufsize - 1 ; k++)
-       {       if (psf->headindex < psf->headend)
-               {       ptr [k] = psf->header [psf->headindex] ;
-                       psf->headindex ++ ;
+       {       if (psf->header.indx < psf->header.end)
+               {       ptr [k] = psf->header.ptr [psf->header.indx] ;
+                       psf->header.indx ++ ;
                        }
                else
-               {       psf->headend += psf_fread (psf->header + psf->headend, 1, 1, psf) ;
-                       ptr [k] = psf->header [psf->headindex] ;
-                       psf->headindex = psf->headend ;
+               {       psf->header.end += psf_fread (psf->header.ptr + psf->header.end, 1, 1, psf) ;
+                       ptr [k] = psf->header.ptr [psf->header.indx] ;
+                       psf->header.indx = psf->header.end ;
                        } ;
 
                if (ptr [k] == '\n')
@@ -912,7 +951,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
        float                   *floatptr ;
        double                  *doubleptr ;
        char                    c ;
-       int                             byte_count = 0, count ;
+       int                             byte_count = 0, count = 0 ;
 
        if (! format)
                return psf_ftell (psf) ;
@@ -920,7 +959,11 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
        va_start (argptr, format) ;
 
        while ((c = *format++))
-       {       switch (c)
+       {
+               if (psf->header.indx + 16 >= psf->header.len && psf_bump_header_allocation (psf, 16))
+                       return count ;
+
+               switch (c)
                {       case 'e' : /* All conversions are now from LE to host. */
                                        psf->rwf_endian = SF_ENDIAN_LITTLE ;
                                        break ;
@@ -929,8 +972,9 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
                                        psf->rwf_endian = SF_ENDIAN_BIG ;
                                        break ;
 
-                       case 'm' :
+                       case 'm' : /* 4 byte marker value eg 'RIFF' */
                                        intptr = va_arg (argptr, unsigned int*) ;
+                                       *intptr = 0 ;
                                        ucptr = (unsigned char*) intptr ;
                                        byte_count += header_read (psf, ucptr, sizeof (int)) ;
                                        *intptr = GET_MARKER (ucptr) ;
@@ -938,6 +982,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
 
                        case 'h' :
                                        intptr = va_arg (argptr, unsigned int*) ;
+                                       *intptr = 0 ;
                                        ucptr = (unsigned char*) intptr ;
                                        byte_count += header_read (psf, sixteen_bytes, sizeof (sixteen_bytes)) ;
                                        {       int k ;
@@ -954,7 +999,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
                                        byte_count += header_read (psf, charptr, sizeof (char)) ;
                                        break ;
 
-                       case '2' :
+                       case '2' : /* 2 byte value with the current endian-ness */
                                        shortptr = va_arg (argptr, unsigned short*) ;
                                        *shortptr = 0 ;
                                        ucptr = (unsigned char*) shortptr ;
@@ -965,7 +1010,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
                                                *shortptr = GET_LE_SHORT (ucptr) ;
                                        break ;
 
-                       case '3' :
+                       case '3' : /* 3 byte value with the current endian-ness */
                                        intptr = va_arg (argptr, unsigned int*) ;
                                        *intptr = 0 ;
                                        byte_count += header_read (psf, sixteen_bytes, 3) ;
@@ -975,7 +1020,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
                                                *intptr = GET_LE_3BYTE (sixteen_bytes) ;
                                        break ;
 
-                       case '4' :
+                       case '4' : /* 4 byte value with the current endian-ness */
                                        intptr = va_arg (argptr, unsigned int*) ;
                                        *intptr = 0 ;
                                        ucptr = (unsigned char*) intptr ;
@@ -986,7 +1031,7 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
                                                *intptr = psf_get_le32 (ucptr, 0) ;
                                        break ;
 
-                       case '8' :
+                       case '8' : /* 8 byte value with the current endian-ness */
                                        countptr = va_arg (argptr, sf_count_t *) ;
                                        *countptr = 0 ;
                                        byte_count += header_read (psf, sixteen_bytes, 8) ;
@@ -1025,23 +1070,27 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
                                        size  += (size & 1) ;
                                        longdata = H2LE_32 (size) ;
                                        get_int (psf, longdata) ;
-                                       memcpy (&(psf->header [psf->headindex]), strptr, size) ;
-                                       psf->headindex += size ;
+                                       memcpy (&(psf->header.ptr [psf->header.indx]), strptr, size) ;
+                                       psf->header.indx += size ;
                                        */
                                        break ;
 
-                       case 'b' :
+                       case 'b' : /* Raw bytes */
                                        charptr = va_arg (argptr, char*) ;
                                        count = va_arg (argptr, size_t) ;
-                                       if (count > 0)
-                                               byte_count += header_read (psf, charptr, count) ;
+                                       memset (charptr, 0, count) ;
+                                       byte_count += header_read (psf, charptr, count) ;
                                        break ;
 
                        case 'G' :
                                        charptr = va_arg (argptr, char*) ;
                                        count = va_arg (argptr, size_t) ;
-                                       if (count > 0)
-                                               byte_count += header_gets (psf, charptr, count) ;
+                                       memset (charptr, 0, count) ;
+
+                                       if (psf->header.indx + count >= psf->header.len && psf_bump_header_allocation (psf, count))
+                                               return 0 ;
+
+                                       byte_count += header_gets (psf, charptr, count) ;
                                        break ;
 
                        case 'z' :
@@ -1049,27 +1098,23 @@ psf_binheader_readf (SF_PRIVATE *psf, char const *format, ...)
                                        /*
                                        size    = va_arg (argptr, size_t) ;
                                        while (size)
-                                       {       psf->header [psf->headindex] = 0 ;
-                                               psf->headindex ++ ;
+                                       {       psf->header.ptr [psf->header.indx] = 0 ;
+                                               psf->header.indx ++ ;
                                                size -- ;
                                                } ;
                                        */
                                        break ;
 
-                       case 'p' :
-                                       /* Get the seek position first. */
+                       case 'p' :      /* Seek to position from start. */
                                        count = va_arg (argptr, size_t) ;
                                        header_seek (psf, count, SEEK_SET) ;
                                        byte_count = count ;
                                        break ;
 
-                       case 'j' :
-                                       /* Get the seek position first. */
+                       case 'j' :      /* Seek to position from current position. */
                                        count = va_arg (argptr, size_t) ;
-                                       if (count)
-                                       {       header_seek (psf, count, SEEK_CUR) ;
-                                               byte_count += count ;
-                                               } ;
+                                       header_seek (psf, count, SEEK_CUR) ;
+                                       byte_count += count ;
                                        break ;
 
                        default :
@@ -1185,6 +1230,48 @@ psf_memset (void *s, int c, sf_count_t len)
        return s ;
 } /* psf_memset */
 
+
+/*
+** Clang refuses to do sizeof (SF_CUES_VAR (cue_count)) so we have to manually
+** bodgy something up instead.
+*/
+
+typedef SF_CUES_VAR (0) SF_CUES_0 ;
+
+#define SF_CUES_VAR_SIZE(count)        (sizeof (SF_CUES_0) + count * sizeof (SF_CUE_POINT))
+
+SF_CUES *
+psf_cues_alloc (uint32_t cue_count)
+{      SF_CUES *pcues = calloc (1, SF_CUES_VAR_SIZE (cue_count)) ;
+
+       pcues->cue_count = cue_count ;
+       return pcues ;
+} /* psf_cues_alloc */
+
+SF_CUES *
+psf_cues_dup (const void * ptr)
+{      const SF_CUES *pcues = ptr ;
+       SF_CUES *pnew = psf_cues_alloc (pcues->cue_count) ;
+
+       memcpy (pnew, pcues, SF_CUES_VAR_SIZE (pcues->cue_count)) ;
+       return pnew ;
+} /* psf_cues_dup */
+
+void
+psf_get_cues (SF_PRIVATE * psf, void * data, size_t datasize)
+{
+       if (psf->cues)
+       {       uint32_t cue_count = (datasize - sizeof (uint32_t)) / sizeof (SF_CUE_POINT) ;
+
+               cue_count = SF_MIN (cue_count, psf->cues->cue_count) ;
+               memcpy (data, psf->cues, SF_CUES_VAR_SIZE (cue_count)) ;
+               ((SF_CUES*) data)->cue_count = cue_count ;
+               } ;
+
+       return ;
+} /* psf_get_cues */
+
+
 SF_INSTRUMENT *
 psf_instrument_alloc (void)
 {      SF_INSTRUMENT *instr ;
index 12caf53..0bd810c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2017 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
@@ -29,6 +29,9 @@
 #elif HAVE_INTTYPES_H
 #include <inttypes.h>
 #endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
 
 #ifndef SNDFILE_H
 #include "sndfile.h"
@@ -38,7 +41,9 @@
 #error "This code is not designed to be compiled with a C++ compiler."
 #endif
 
-#if (SIZEOF_LONG == 8)
+#ifdef INT64_C
+#      define  SF_PLATFORM_S64(x)              INT64_C(x)
+#elif (SIZEOF_LONG == 8)
 #      define  SF_PLATFORM_S64(x)              x##l
 #elif (SIZEOF_LONG_LONG == 8)
 #      define  SF_PLATFORM_S64(x)              x##ll
 #      define WARN_UNUSED
 #endif
 
+/*
+** Visibility control
+*/
+
+#if defined (SNDFILE_EXPORTS) && !defined (_WIN32)
+#      define SNDFILE_API      __attribute__ ((visibility ("default")))
+#else
+#      define SNDFILE_API
+#endif
+
+
 #define        SF_BUFFER_LEN                   (8192)
 #define        SF_FILENAME_LEN                 (1024)
 #define SF_SYSERR_LEN                  (256)
 #define SF_MAX_STRINGS                 (32)
-#define        SF_HEADER_LEN                   (12292)
 #define        SF_PARSELOG_LEN                 (2048)
 
 #define        PSF_SEEK_ERROR                  ((sf_count_t) -1)
@@ -227,7 +242,7 @@ typedef struct
 } STR_DATA ;
 
 typedef struct
-{      int64_t         hash ;
+{      uint64_t        hash ;
        char            id [64] ;
        unsigned        id_size ;
        uint32_t        mark32 ;
@@ -236,7 +251,7 @@ typedef struct
 } READ_CHUNK ;
 
 typedef struct
-{      int64_t         hash ;
+{      uint64_t        hash ;
        uint32_t        mark32 ;
        uint32_t        len ;
        void            *data ;
@@ -264,7 +279,12 @@ struct SF_CHUNK_ITERATOR
 static inline size_t
 make_size_t (int x)
 {      return (size_t) x ;
-} /* size_t_of_int */
+} /* make_size_t */
+
+static inline uint64_t
+make_size_8 (int x)
+{      return (uint64_t) x ;
+} /* make_size_8 */
 
 typedef SF_BROADCAST_INFO_VAR (16 * 1024) SF_BROADCAST_INFO_16K ;
 
@@ -372,7 +392,12 @@ typedef struct sf_private_tag
                int                             indx ;
        } parselog ;
 
-       unsigned char   header          [SF_HEADER_LEN] ; /* Must be unsigned */
+
+       struct
+       {       unsigned char   * ptr ;
+               sf_count_t              indx, end, len ;
+       } header ;
+
        int                             rwf_endian ;    /* Header endian-ness flag. */
 
        /* Storage and housekeeping data for adding/reading strings from
@@ -391,10 +416,6 @@ typedef struct sf_private_tag
 
        unsigned                unique_id ;
 
-       /* Index variables for maintaining parselog and header above. */
-       int                             headindex, headend ;
-       int                             has_text ;
-
        int                             error ;
 
        int                             endian ;                /* File endianness : SF_ENDIAN_LITTLE or SF_ENDIAN_BIG. */
@@ -421,6 +442,9 @@ typedef struct sf_private_tag
        int                             have_written ;  /* Has a single write been done to the file? */
        PEAK_INFO               *peak_info ;
 
+       /* Cue Marker Info */
+       SF_CUES         *cues ;
+
        /* Loop Info */
        SF_LOOP_INFO    *loop_info ;
        SF_INSTRUMENT   *instrument ;
@@ -553,6 +577,7 @@ enum
        SFE_BAD_ENDIAN,
        SFE_CHANNEL_COUNT_ZERO,
        SFE_CHANNEL_COUNT,
+       SFE_CHANNEL_COUNT_BAD,
 
        SFE_BAD_VIRTUAL_IO,
 
@@ -708,6 +733,9 @@ enum
        SFE_VORBIS_ENCODER_BUG,
 
        SFE_RF64_NOT_RF64,
+       SFE_RF64_PEAK_B4_FMT,
+       SFE_RF64_NO_DATA,
+
        SFE_BAD_CHUNK_PTR,
        SFE_UNKNOWN_CHUNK,
        SFE_BAD_CHUNK_FORMAT,
@@ -715,10 +743,14 @@ enum
        SFE_BAD_CHUNK_DATA_PTR,
        SFE_ALAC_FAIL_TMPFILE,
        SFE_FILENAME_TOO_LONG,
+       SFE_NEGATIVE_RW_LEN,
 
        SFE_MAX_ERROR                   /* This must be last in list. */
 } ;
 
+/* Allocate and initialize the SF_PRIVATE struct. */
+SF_PRIVATE * psf_allocate (void) ;
+
 int subformat_to_bytewidth (int format) ;
 int s_bitwidth_to_subformat (int bits) ;
 int u_bitwidth_to_subformat (int bits) ;
@@ -875,8 +907,6 @@ int         txw_open        (SF_PRIVATE *psf) ;
 int            wve_open        (SF_PRIVATE *psf) ;
 int            dwd_open        (SF_PRIVATE *psf) ;
 
-int            macbinary3_open (SF_PRIVATE *psf) ;
-
 /*------------------------------------------------------------------------------------
 **     Init functions for a number of common data encodings.
 */
@@ -895,8 +925,8 @@ int         alac_init               (SF_PRIVATE *psf, const ALAC_DECODER_INFO * info) ;
 
 int    dither_init             (SF_PRIVATE *psf, int mode) ;
 
-int            wav_w64_ima_init (SF_PRIVATE *psf, int blockalign, int samplesperblock) ;
-int            wav_w64_msadpcm_init (SF_PRIVATE *psf, int blockalign, int samplesperblock) ;
+int            wavlike_ima_init (SF_PRIVATE *psf, int blockalign, int samplesperblock) ;
+int            wavlike_msadpcm_init (SF_PRIVATE *psf, int blockalign, int samplesperblock) ;
 
 int            aiff_ima_init (SF_PRIVATE *psf, int blockalign, int samplesperblock) ;
 
@@ -958,6 +988,10 @@ psf_strlcpy (char *dest, size_t n, const char *src)
 
 void   *psf_memset (void *s, int c, sf_count_t n) ;
 
+SF_CUES * psf_cues_dup (const void * ptr) ;
+SF_CUES * psf_cues_alloc (uint32_t cue_count) ;
+void psf_get_cues (SF_PRIVATE * psf, void * data, size_t datasize) ;
+
 SF_INSTRUMENT * psf_instrument_alloc (void) ;
 
 void   psf_sanitize_string (char * cptr, int len) ;
diff --git a/src/config.h.in b/src/config.h.in
deleted file mode 100644 (file)
index 7148607..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-/* src/config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Set to 1 if the compile is GNU GCC. */
-#undef COMPILER_IS_GCC
-
-/* Target processor clips on negative float to int conversion. */
-#undef CPU_CLIPS_NEGATIVE
-
-/* Target processor clips on positive float to int conversion. */
-#undef CPU_CLIPS_POSITIVE
-
-/* Target processor is big endian. */
-#undef CPU_IS_BIG_ENDIAN
-
-/* Target processor is little endian. */
-#undef CPU_IS_LITTLE_ENDIAN
-
-/* Set to 1 to enable experimental code. */
-#undef ENABLE_EXPERIMENTAL_CODE
-
-/* Define to 1 if you have the <alsa/asoundlib.h> header file. */
-#undef HAVE_ALSA_ASOUNDLIB_H
-
-/* Define to 1 if you have the <byteswap.h> header file. */
-#undef HAVE_BYTESWAP_H
-
-/* Define to 1 if you have the `calloc' function. */
-#undef HAVE_CALLOC
-
-/* Define to 1 if you have the `ceil' function. */
-#undef HAVE_CEIL
-
-/* Set to 1 if S_IRGRP is defined. */
-#undef HAVE_DECL_S_IRGRP
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <endian.h> header file. */
-#undef HAVE_ENDIAN_H
-
-/* Will be set to 1 if flac, ogg and vorbis are available. */
-#undef HAVE_EXTERNAL_LIBS
-
-/* Define to 1 if you have the `floor' function. */
-#undef HAVE_FLOOR
-
-/* Define to 1 if you have the `fmod' function. */
-#undef HAVE_FMOD
-
-/* Define to 1 if you have the `free' function. */
-#undef HAVE_FREE
-
-/* Define to 1 if you have the `fstat' function. */
-#undef HAVE_FSTAT
-
-/* Define to 1 if you have the `fstat64' function. */
-#undef HAVE_FSTAT64
-
-/* Define to 1 if you have the `fsync' function. */
-#undef HAVE_FSYNC
-
-/* Define to 1 if you have the `ftruncate' function. */
-#undef HAVE_FTRUNCATE
-
-/* Define to 1 if you have the `getpagesize' function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define to 1 if you have the `gmtime' function. */
-#undef HAVE_GMTIME
-
-/* Define to 1 if you have the `gmtime_r' function. */
-#undef HAVE_GMTIME_R
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `m' library (-lm). */
-#undef HAVE_LIBM
-
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define to 1 if you have the `localtime' function. */
-#undef HAVE_LOCALTIME
-
-/* Define to 1 if you have the `localtime_r' function. */
-#undef HAVE_LOCALTIME_R
-
-/* Define if you have C99's lrint function. */
-#undef HAVE_LRINT
-
-/* Define if you have C99's lrintf function. */
-#undef HAVE_LRINTF
-
-/* Define to 1 if you have the `lround' function. */
-#undef HAVE_LROUND
-
-/* Define to 1 if you have the `lseek' function. */
-#undef HAVE_LSEEK
-
-/* Define to 1 if you have the `lseek64' function. */
-#undef HAVE_LSEEK64
-
-/* Define to 1 if you have the `malloc' function. */
-#undef HAVE_MALLOC
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `mmap' function. */
-#undef HAVE_MMAP
-
-/* Define to 1 if you have the `open' function. */
-#undef HAVE_OPEN
-
-/* Define to 1 if you have the `pipe' function. */
-#undef HAVE_PIPE
-
-/* Define to 1 if you have the `read' function. */
-#undef HAVE_READ
-
-/* Define to 1 if you have the `realloc' function. */
-#undef HAVE_REALLOC
-
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
-/* Set to 1 if <sndio.h> is available. */
-#undef HAVE_SNDIO_H
-
-/* Define to 1 if you have the `snprintf' function. */
-#undef HAVE_SNPRINTF
-
-/* Set to 1 if you have libsqlite3. */
-#undef HAVE_SQLITE3
-
-/* Define to 1 if the system has the type `ssize_t'. */
-#undef HAVE_SSIZE_T
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `vsnprintf' function. */
-#undef HAVE_VSNPRINTF
-
-/* Define to 1 if you have the `waitpid' function. */
-#undef HAVE_WAITPID
-
-/* Define to 1 if you have the `write' function. */
-#undef HAVE_WRITE
-
-/* The host triplet of the compiled binary. */
-#undef HOST_TRIPLET
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#undef LT_OBJDIR
-
-/* The darwin version, no-zero is valid */
-#undef OSX_DARWIN_VERSION
-
-/* Set to 1 if compiling for OpenBSD */
-#undef OS_IS_OPENBSD
-
-/* Set to 1 if compiling for Win32 */
-#undef OS_IS_WIN32
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Set to maximum allowed value of sf_count_t type. */
-#undef SF_COUNT_MAX
-
-/* The size of `double', as computed by sizeof. */
-#undef SIZEOF_DOUBLE
-
-/* The size of `float', as computed by sizeof. */
-#undef SIZEOF_FLOAT
-
-/* The size of `int', as computed by sizeof. */
-#undef SIZEOF_INT
-
-/* The size of `int64_t', as computed by sizeof. */
-#undef SIZEOF_INT64_T
-
-/* The size of `loff_t', as computed by sizeof. */
-#undef SIZEOF_LOFF_T
-
-/* The size of `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* The size of `long long', as computed by sizeof. */
-#undef SIZEOF_LONG_LONG
-
-/* The size of `off64_t', as computed by sizeof. */
-#undef SIZEOF_OFF64_T
-
-/* The size of `off_t', as computed by sizeof. */
-#undef SIZEOF_OFF_T
-
-/* Set to sizeof (long) if unknown. */
-#undef SIZEOF_SF_COUNT_T
-
-/* The size of `short', as computed by sizeof. */
-#undef SIZEOF_SHORT
-
-/* The size of `size_t', as computed by sizeof. */
-#undef SIZEOF_SIZE_T
-
-/* The size of `ssize_t', as computed by sizeof. */
-#undef SIZEOF_SSIZE_T
-
-/* The size of `void*', as computed by sizeof. */
-#undef SIZEOF_VOIDP
-
-/* The size of `wchar_t', as computed by sizeof. */
-#undef SIZEOF_WCHAR_T
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Set to long if unknown. */
-#undef TYPEOF_SF_COUNT_T
-
-/* Enable extensions on AIX 3, Interix.  */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-/* Enable threading extensions on Solaris.  */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-/* Enable extensions on HP NonStop.  */
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-
-
-/* Set to 1 to use the native windows API */
-#undef USE_WINDOWS_API
-
-/* Version number of package */
-#undef VERSION
-
-/* Set to 1 if windows DLL is being built. */
-#undef WIN32_TARGET_DLL
-
-/* Target processor is big endian. */
-#undef WORDS_BIGENDIAN
-
-/* Enable large inode numbers on Mac OS X 10.5.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
-/* Define for large files, on AIX-style hosts. */
-#undef _LARGE_FILES
-
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
-   this defined. */
-#undef _POSIX_1_SOURCE
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Set to 1 to use C99 printf/snprintf in MinGW. */
-#undef __USE_MINGW_ANSI_STDIO
diff --git a/src/create_symbols_file.c b/src/create_symbols_file.c
new file mode 100755 (executable)
index 0000000..851f00d
--- /dev/null
@@ -0,0 +1,245 @@
+// Copyright (C) 2003-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>
+
+//----------------------------------------------------------------
+// These are all of the public functions exported from libsndfile.
+//
+// Its important not to change the order they are listed in or
+// the ordinal values in the second column.
+
+typedef struct
+{      const char * name ;
+       int                     ordinal ;
+} SYMBOL ;
+
+static SYMBOL all_symbols [] =
+{
+       {       "sf_command",                           1       },
+       {       "sf_open",                                      2       },
+       {       "sf_close",                                     3       },
+       {       "sf_seek",                                      4       },
+       {       "sf_error",                                     7       },
+       {       "sf_perror",                            8       },
+       {       "sf_error_str",                         9       },
+       {       "sf_error_number",                      10      },
+       {       "sf_format_check",                      11      },
+       {       "sf_read_raw",                          16      },
+       {       "sf_readf_short",                       17      },
+       {       "sf_readf_int",                         18      },
+       {       "sf_readf_float",                       19      },
+       {       "sf_readf_double",                      20      },
+       {       "sf_read_short",                        21      },
+       {       "sf_read_int",                          22      },
+       {       "sf_read_float",                        23      },
+       {       "sf_read_double",                       24      },
+       {       "sf_write_raw",                         32      },
+       {       "sf_writef_short",                      33      },
+       {       "sf_writef_int",                        34      },
+       {       "sf_writef_float",                      35      },
+       {       "sf_writef_double",                     36      },
+       {       "sf_write_short",                       37      },
+       {       "sf_write_int",                         38      },
+       {       "sf_write_float",                       39      },
+       {       "sf_write_double",                      40      },
+       {       "sf_strerror",                          50      },
+       {       "sf_get_string",                        60      },
+       {       "sf_set_string",                        61      },
+       {       "sf_version_string",            68      },
+       {       "sf_open_fd",                           70      },
+       {       "sf_wchar_open",                        71      },
+       {       "sf_open_virtual",                      80      },
+       {       "sf_write_sync",                        90      },
+       {       "sf_set_chunk",                         100     },
+       {       "sf_get_chunk_size",            101 },
+       {       "sf_get_chunk_data",            102 },
+       {       "sf_get_chunk_iterator",        103 },
+       {       "sf_next_chunk_iterator",       104 },
+       {       "sf_current_byterate",          110 },
+       {       NULL,                                           0 }
+} ;
+
+//-------------------------------------------------------------------------------
+
+static void
+linux_symbols (FILE * file, const char * progname, const char * version)
+{      unsigned k ;
+
+       fprintf (file, "# Auto-generated by %s\n", progname) ;
+       fprintf (file, "libsndfile.so.%s\n", version) ;
+       fprintf (file, "{\n") ;
+       fprintf (file, "  global:\n") ;
+
+       for (k = 0 ; all_symbols [k].name != NULL ; k++)
+       {       if (strcmp (all_symbols [k].name, "sf_wchar_open") == 0)
+                       continue ;
+               fprintf (file, "        %s ;\n", all_symbols [k].name) ;
+               } ;
+
+       fprintf (file, "  local:\n") ;
+       fprintf (file, "        * ;\n") ;
+       fprintf (file, "} ;\n\n") ;
+} /* linux_symbols */
+
+static void
+darwin_symbols (FILE * file, const char * progname)
+{      unsigned k ;
+
+       fprintf (file, "// Auto-generated by %s\n", progname) ;
+
+       for (k = 0 ; all_symbols [k].name != NULL ; k++)
+       {       if (strcmp (all_symbols [k].name, "sf_wchar_open") == 0)
+                       continue ;
+               fprintf (file, "_%s\n", all_symbols [k].name) ;
+               } ;
+       fprintf (file, "\n") ;
+} /* darwin_symbols */
+
+static void
+win32_symbols (FILE * file, const char * progname, const char * major_version, const char * libname)
+{      unsigned k ;
+
+       fprintf (file, "; Auto-generated by %s\n\n", progname) ;
+       fprintf (file, "LIBRARY %s-%s.dll\n", libname, major_version) ;
+       fprintf (file, "EXPORTS\n\n") ;
+
+       for (k = 0 ; all_symbols [k].name != NULL ; k++)
+               fprintf (file, "%-24s @%d\n", all_symbols [k].name, all_symbols [k].ordinal) ;
+       fprintf (file, "\n") ;
+} /* win32_symbols */
+
+static void
+os2_symbols (FILE * file, const char * progname, const char * major_version, const char * libname)
+{      unsigned k ;
+
+       fprintf (file, "; Auto-generated by %s\n\n", progname) ;
+       fprintf (file, "LIBRARY %s%s\n", libname, major_version) ;
+       fprintf (file, "INITINSTANCE TERMINSTANCE\n") ;
+       fprintf (file, "CODE PRELOAD MOVEABLE DISCARDABLE\n") ;
+       fprintf (file, "DATA PRELOAD MOVEABLE MULTIPLE NONSHARED\n") ;
+       fprintf (file, "EXPORTS\n\n") ;
+
+       for (k = 0 ; all_symbols [k].name != NULL ; k++)
+       {       if (strcmp (all_symbols [k].name, "sf_wchar_open") == 0)
+                       continue ;
+               fprintf (file, "_%-24s @%d\n", all_symbols [k].name, all_symbols [k].ordinal) ;
+               } ;
+       fprintf (file, "\n") ;
+} /* os2_symbols */
+
+static void
+plain_symbols (FILE * file)
+{      unsigned k ;
+
+       for (k = 0 ; all_symbols [k].name != NULL ; k++)
+               fprintf (file, "%s\n", all_symbols [k].name) ;
+} /* plain_symbols */
+
+static void
+no_symbols (const char * os_name)
+{      printf ("\n") ;
+       printf ("No known way of restricting exported symbols on '%s'.\n", os_name) ;
+       printf ("If you know a way, please contact the author.\n\n") ;
+       exit (1) ;
+} /* no_symbols */
+
+//-------------------------------------------------------------------------------
+
+int
+main (int argc, char *argv [])
+{
+       FILE * file ;
+       const char *cptr, *progname, *os_name, *version ;
+       char major_version [256] ;
+       unsigned k ;
+
+       if ((cptr = strrchr (argv [0], '/')) != NULL)
+               progname = cptr + 1 ;
+       else if ((cptr = strrchr (argv [0], '\\')) != NULL)
+               progname = cptr + 1 ;
+       else
+               progname = argv [0] ;
+
+       if (argc != 4)
+       {       printf (
+                       "\n"
+                       "Usage : %s <target OS name> <libsndfile version> <output file>.\n"
+                       "\n"
+                       "       Currently supported values for target OS are:\n"
+                       "                 linux\n"
+                       "                 darwin         (ie MacOSX)\n"
+                       "                 win32   (ie wintendo)\n"
+                       "                 cygwin         (Cygwin on wintendo)\n"
+                       "                 os2           (OS/2)\n"
+                       "                 plain   (plain list of symbols)\n"
+                       "\n", progname) ;
+               exit (1) ;
+               } ;
+
+       os_name = argv [1] ;
+       version = argv [2] ;
+
+       strncpy (major_version, argv [2], sizeof (major_version)) ;
+       for (k = 0 ; k < sizeof (major_version) ; k++)
+               if (! isdigit (major_version [k]))
+               {       major_version [k] = 0 ;
+                       break ;
+                       } ;
+
+       if ((file = fopen (argv [3], "w")) == NULL)
+       {       printf ("Error: Not able to open output file '%s'.\n", argv [3]) ;
+               exit (1) ;
+               }
+
+       if (strcmp (os_name, "linux") == 0 || strcmp (os_name, "gnu") == 0 || strcmp (os_name, "binutils") == 0)
+               linux_symbols (file, progname, version) ;
+       else if (strcmp (os_name, "darwin") == 0)
+               darwin_symbols (file, progname) ;
+       else if (strcmp (os_name, "win32") == 0)
+               win32_symbols (file, progname, major_version, "libsndfile") ;
+       else if (strcmp (os_name, "os2") == 0)
+               os2_symbols (file, progname, major_version, "sndfile") ;
+       else if (strcmp (os_name, "static") == 0)
+               plain_symbols (file) ;
+       else
+       {       no_symbols (os_name) ;
+               fclose (file) ;
+               exit (1) ;
+               } ;
+
+       fclose (file) ;
+
+       return 0 ;
+} /* main */
+
index 15b1cca..28503f3 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 
-# Copyright (C) 2003-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+# Copyright (C) 2003-2017 Erik de Castro Lopo <erikd@mega-nerd.com>
 #
 # All rights reserved.
 #
index 86b61ce..40629c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2004-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2004-2017 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2004 Tobias Gehrig <tgehrig@ira.uka.de>
 **
 ** This program is free software ; you can redistribute it and/or modify
@@ -29,7 +29,7 @@
 #include       "sndfile.h"
 #include       "common.h"
 
-#if HAVE_EXTERNAL_LIBS
+#if HAVE_EXTERNAL_XIPH_LIBS
 
 #include       <FLAC/stream_decoder.h>
 #include       <FLAC/stream_encoder.h>
@@ -61,16 +61,16 @@ typedef struct
 
        FLAC__StreamMetadata *metadata ;
 
-       const FLAC__int32 * const * wbuffer ;
-       FLAC__int32 * rbuffer [FLAC__MAX_CHANNELS] ;
+       const int32_t * const * wbuffer ;
+       int32_t * rbuffer [FLAC__MAX_CHANNELS] ;
 
-       FLAC__int32* encbuffer ;
+       int32_t* encbuffer ;
        unsigned bufferpos ;
 
        const FLAC__Frame *frame ;
-       FLAC__bool bufferbackup ;
 
        unsigned compression ;
+
 } FLAC_PRIVATE ;
 
 typedef struct
@@ -95,18 +95,18 @@ static sf_count_t   flac_write_i2flac (SF_PRIVATE *psf, const int *ptr, sf_count_t
 static sf_count_t      flac_write_f2flac (SF_PRIVATE *psf, const float *ptr, sf_count_t len) ;
 static sf_count_t      flac_write_d2flac (SF_PRIVATE *psf, const double *ptr, sf_count_t len) ;
 
-static void            f2flac8_array (const float *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            f2flac16_array (const float *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            f2flac24_array (const float *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            f2flac8_clip_array (const float *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            f2flac16_clip_array (const float *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            f2flac24_clip_array (const float *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            d2flac8_array (const double *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            d2flac16_array (const double *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            d2flac24_array (const double *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            d2flac8_clip_array (const double *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            d2flac16_clip_array (const double *src, FLAC__int32 *dest, int count, int normalize) ;
-static void            d2flac24_clip_array (const double *src, FLAC__int32 *dest, int count, int normalize) ;
+static void            f2flac8_array (const float *src, int32_t *dest, int count, int normalize) ;
+static void            f2flac16_array (const float *src, int32_t *dest, int count, int normalize) ;
+static void            f2flac24_array (const float *src, int32_t *dest, int count, int normalize) ;
+static void            f2flac8_clip_array (const float *src, int32_t *dest, int count, int normalize) ;
+static void            f2flac16_clip_array (const float *src, int32_t *dest, int count, int normalize) ;
+static void            f2flac24_clip_array (const float *src, int32_t *dest, int count, int normalize) ;
+static void            d2flac8_array (const double *src, int32_t *dest, int count, int normalize) ;
+static void            d2flac16_array (const double *src, int32_t *dest, int count, int normalize) ;
+static void            d2flac24_array (const double *src, int32_t *dest, int count, int normalize) ;
+static void            d2flac8_clip_array (const double *src, int32_t *dest, int count, int normalize) ;
+static void            d2flac16_clip_array (const double *src, int32_t *dest, int count, int normalize) ;
+static void            d2flac24_clip_array (const double *src, int32_t *dest, int count, int normalize) ;
 
 static int flac_command (SF_PRIVATE *psf, int command, void *data, int datasize) ;
 
@@ -116,7 +116,7 @@ static FLAC__StreamDecoderSeekStatus sf_flac_seek_callback (const FLAC__StreamDe
 static FLAC__StreamDecoderTellStatus sf_flac_tell_callback (const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data) ;
 static FLAC__StreamDecoderLengthStatus sf_flac_length_callback (const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data) ;
 static FLAC__bool sf_flac_eof_callback (const FLAC__StreamDecoder *decoder, void *client_data) ;
-static FLAC__StreamDecoderWriteStatus sf_flac_write_callback (const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 * const buffer [], void *client_data) ;
+static FLAC__StreamDecoderWriteStatus sf_flac_write_callback (const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const int32_t * const buffer [], void *client_data) ;
 static void sf_flac_meta_callback (const FLAC__StreamDecoder *decoder, const FLAC__StreamMetadata *metadata, void *client_data) ;
 static void sf_flac_error_callback (const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *client_data) ;
 
@@ -126,38 +126,38 @@ static FLAC__StreamEncoderTellStatus sf_flac_enc_tell_callback (const FLAC__Stre
 static FLAC__StreamEncoderWriteStatus sf_flac_enc_write_callback (const FLAC__StreamEncoder *encoder, const FLAC__byte buffer [], size_t bytes, unsigned samples, unsigned current_frame, void *client_data) ;
 
 static void
-s2flac8_array (const short *src, FLAC__int32 *dest, int count)
+s2flac8_array (const short *src, int32_t *dest, int count)
 {      while (--count >= 0)
                dest [count] = src [count] >> 8 ;
 } /* s2flac8_array */
 
 static void
-s2flac16_array (const short *src, FLAC__int32 *dest, int count)
+s2flac16_array (const short *src, int32_t *dest, int count)
 {      while (--count >= 0)
                dest [count] = src [count] ;
 } /* s2flac16_array */
 
 static void
-s2flac24_array (const short *src, FLAC__int32 *dest, int count)
+s2flac24_array (const short *src, int32_t *dest, int count)
 {      while (--count >= 0)
                dest [count] = src [count] << 8 ;
 } /* s2flac24_array */
 
 static void
-i2flac8_array (const int *src, FLAC__int32 *dest, int count)
+i2flac8_array (const int *src, int32_t *dest, int count)
 {      while (--count >= 0)
                dest [count] = src [count] >> 24 ;
 } /* i2flac8_array */
 
 static void
-i2flac16_array (const int *src, FLAC__int32 *dest, int count)
+i2flac16_array (const int *src, int32_t *dest, int count)
 {
        while (--count >= 0)
                dest [count] = src [count] >> 16 ;
 } /* i2flac16_array */
 
 static void
-i2flac24_array (const int *src, FLAC__int32 *dest, int count)
+i2flac24_array (const int *src, int32_t *dest, int count)
 {      while (--count >= 0)
                dest [count] = src [count] >> 8 ;
 } /* i2flac24_array */
@@ -166,8 +166,8 @@ static sf_count_t
 flac_buffer_copy (SF_PRIVATE *psf)
 {      FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
        const FLAC__Frame *frame = pflac->frame ;
-       const FLAC__int32* const *buffer = pflac->wbuffer ;
-       unsigned i = 0, j, offset ;
+       const int32_t* const *buffer = pflac->wbuffer ;
+       unsigned i = 0, j, offset, channels, len ;
 
        /*
        **      frame->header.blocksize is variable and we're using a constant blocksize
@@ -180,21 +180,33 @@ flac_buffer_copy (SF_PRIVATE *psf)
                return 0 ;
                } ;
 
+       if (frame->header.channels > FLAC__MAX_CHANNELS)
+               psf_log_printf (psf, "Ooops : frame->header.channels (%d) > FLAC__MAX_BLOCK_SIZE (%d)\n", __func__, __LINE__, frame->header.channels, FLAC__MAX_CHANNELS) ;
+
+       channels = SF_MIN (frame->header.channels, FLAC__MAX_CHANNELS) ;
+
        if (pflac->ptr == NULL)
        {       /*
-               **      Not sure why this code is here and not elsewhere.
-               **      Removing it causes valgrind errors.
+               ** This pointer is reset to NULL each time the current frame has been
+               ** decoded. Somehow its used during encoding and decoding.
                */
-               pflac->bufferbackup = SF_TRUE ;
-               for (i = 0 ; i < frame->header.channels ; i++)
+               for (i = 0 ; i < channels ; i++)
                {
                        if (pflac->rbuffer [i] == NULL)
-                               pflac->rbuffer [i] = calloc (FLAC__MAX_BLOCK_SIZE, sizeof (FLAC__int32)) ;
+                               pflac->rbuffer [i] = calloc (FLAC__MAX_BLOCK_SIZE, sizeof (int32_t)) ;
 
-                       memcpy (pflac->rbuffer [i], buffer [i], frame->header.blocksize * sizeof (FLAC__int32)) ;
+                       memcpy (pflac->rbuffer [i], buffer [i], frame->header.blocksize * sizeof (int32_t)) ;
                        } ;
-               pflac->wbuffer = (const FLAC__int32* const*) pflac->rbuffer ;
+               pflac->wbuffer = (const int32_t* const*) pflac->rbuffer ;
+
+               return 0 ;
+               } ;
+
+
+       len = SF_MIN (pflac->len, frame->header.blocksize) ;
 
+       if (pflac->remain % channels != 0)
+       {       psf_log_printf (psf, "Error: pflac->remain %u    channels %u\n", pflac->remain, channels) ;
                return 0 ;
                } ;
 
@@ -204,29 +216,35 @@ flac_buffer_copy (SF_PRIVATE *psf)
                                int shift = 16 - frame->header.bits_per_sample ;
                                if (shift < 0)
                                {       shift = abs (shift) ;
-                                       for (i = 0 ; i < frame->header.blocksize && pflac->remain > 0 ; i++)
-                                       {       offset = pflac->pos + i * frame->header.channels ;
+                                       for (i = 0 ; i < len && pflac->remain > 0 ; i++)
+                                       {       offset = pflac->pos + i * channels ;
 
                                                if (pflac->bufferpos >= frame->header.blocksize)
                                                        break ;
 
-                                               for (j = 0 ; j < frame->header.channels ; j++)
+                                               if (offset + channels > pflac->len)
+                                                       break ;
+
+                                               for (j = 0 ; j < channels ; j++)
                                                        retpcm [offset + j] = buffer [j][pflac->bufferpos] >> shift ;
-                                               pflac->remain -= frame->header.channels ;
+                                               pflac->remain -= channels ;
                                                pflac->bufferpos++ ;
                                                }
                                        }
                                else
-                               {       for (i = 0 ; i < frame->header.blocksize && pflac->remain > 0 ; i++)
-                                       {       offset = pflac->pos + i * frame->header.channels ;
+                               {       for (i = 0 ; i < len && pflac->remain > 0 ; i++)
+                                       {       offset = pflac->pos + i * channels ;
 
                                                if (pflac->bufferpos >= frame->header.blocksize)
                                                        break ;
 
-                                               for (j = 0 ; j < frame->header.channels ; j++)
+                                               if (offset + channels > pflac->len)
+                                                       break ;
+
+                                               for (j = 0 ; j < channels ; j++)
                                                        retpcm [offset + j] = ((uint16_t) buffer [j][pflac->bufferpos]) << shift ;
 
-                                               pflac->remain -= frame->header.channels ;
+                                               pflac->remain -= channels ;
                                                pflac->bufferpos++ ;
                                                } ;
                                        } ;
@@ -236,15 +254,18 @@ flac_buffer_copy (SF_PRIVATE *psf)
                case PFLAC_PCM_INT :
                        {       int *retpcm = (int*) pflac->ptr ;
                                int shift = 32 - frame->header.bits_per_sample ;
-                               for (i = 0 ; i < frame->header.blocksize && pflac->remain > 0 ; i++)
-                               {       offset = pflac->pos + i * frame->header.channels ;
+                               for (i = 0 ; i < len && pflac->remain > 0 ; i++)
+                               {       offset = pflac->pos + i * channels ;
 
                                        if (pflac->bufferpos >= frame->header.blocksize)
                                                break ;
 
-                                       for (j = 0 ; j < frame->header.channels ; j++)
+                                       if (offset + channels > pflac->len)
+                                               break ;
+
+                                       for (j = 0 ; j < channels ; j++)
                                                retpcm [offset + j] = ((uint32_t) buffer [j][pflac->bufferpos]) << shift ;
-                                       pflac->remain -= frame->header.channels ;
+                                       pflac->remain -= channels ;
                                        pflac->bufferpos++ ;
                                        } ;
                                } ;
@@ -254,15 +275,18 @@ flac_buffer_copy (SF_PRIVATE *psf)
                        {       float *retpcm = (float*) pflac->ptr ;
                                float norm = (psf->norm_float == SF_TRUE) ? 1.0 / (1 << (frame->header.bits_per_sample - 1)) : 1.0 ;
 
-                               for (i = 0 ; i < frame->header.blocksize && pflac->remain > 0 ; i++)
-                               {       offset = pflac->pos + i * frame->header.channels ;
+                               for (i = 0 ; i < len && pflac->remain > 0 ; i++)
+                               {       offset = pflac->pos + i * channels ;
 
                                        if (pflac->bufferpos >= frame->header.blocksize)
                                                break ;
 
-                                       for (j = 0 ; j < frame->header.channels ; j++)
+                                       if (offset + channels > pflac->len)
+                                               break ;
+
+                                       for (j = 0 ; j < channels ; j++)
                                                retpcm [offset + j] = buffer [j][pflac->bufferpos] * norm ;
-                                       pflac->remain -= frame->header.channels ;
+                                       pflac->remain -= channels ;
                                        pflac->bufferpos++ ;
                                        } ;
                                } ;
@@ -272,15 +296,18 @@ flac_buffer_copy (SF_PRIVATE *psf)
                        {       double *retpcm = (double*) pflac->ptr ;
                                double norm = (psf->norm_double == SF_TRUE) ? 1.0 / (1 << (frame->header.bits_per_sample - 1)) : 1.0 ;
 
-                               for (i = 0 ; i < frame->header.blocksize && pflac->remain > 0 ; i++)
-                               {       offset = pflac->pos + i * frame->header.channels ;
+                               for (i = 0 ; i < len && pflac->remain > 0 ; i++)
+                               {       offset = pflac->pos + i * channels ;
 
                                        if (pflac->bufferpos >= frame->header.blocksize)
                                                break ;
 
-                                       for (j = 0 ; j < frame->header.channels ; j++)
+                                       if (offset + channels > pflac->len)
+                                               break ;
+
+                                       for (j = 0 ; j < channels ; j++)
                                                retpcm [offset + j] = buffer [j][pflac->bufferpos] * norm ;
-                                       pflac->remain -= frame->header.channels ;
+                                       pflac->remain -= channels ;
                                        pflac->bufferpos++ ;
                                        } ;
                                } ;
@@ -290,8 +317,8 @@ flac_buffer_copy (SF_PRIVATE *psf)
                        return 0 ;
                } ;
 
-       offset = i * frame->header.channels ;
-       pflac->pos += i * frame->header.channels ;
+       offset = i * channels ;
+       pflac->pos += i * channels ;
 
        return offset ;
 } /* flac_buffer_copy */
@@ -351,14 +378,13 @@ sf_flac_eof_callback (const FLAC__StreamDecoder *UNUSED (decoder), void *client_
 } /* sf_flac_eof_callback */
 
 static FLAC__StreamDecoderWriteStatus
-sf_flac_write_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC__Frame *frame, const FLAC__int32 * const buffer [], void *client_data)
+sf_flac_write_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC__Frame *frame, const int32_t * const buffer [], void *client_data)
 {      SF_PRIVATE *psf = (SF_PRIVATE*) client_data ;
        FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
 
        pflac->frame = frame ;
        pflac->bufferpos = 0 ;
 
-       pflac->bufferbackup = SF_FALSE ;
        pflac->wbuffer = buffer ;
 
        flac_buffer_copy (psf) ;
@@ -368,7 +394,7 @@ sf_flac_write_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC
 
 static void
 sf_flac_meta_get_vorbiscomments (SF_PRIVATE *psf, const FLAC__StreamMetadata *metadata)
-{      FLAC_TAG tags [] =
+{      static FLAC_TAG tags [] =
        {       { "title", SF_STR_TITLE },
                { "copyright", SF_STR_COPYRIGHT },
                { "software", SF_STR_SOFTWARE },
@@ -394,7 +420,7 @@ sf_flac_meta_get_vorbiscomments (SF_PRIVATE *psf, const FLAC__StreamMetadata *me
                if ((cptr = strchr (value, '=')) != NULL)
                        value = cptr + 1 ;
 
-               psf_log_printf (psf, "  %-10s : %s\n", tags [k].tag, value) ;
+               psf_log_printf (psf, "  %-12s : %s\n", tags [k].tag, value) ;
                psf_store_string (psf, tags [k].type, value) ;
                } ;
 
@@ -404,7 +430,8 @@ sf_flac_meta_get_vorbiscomments (SF_PRIVATE *psf, const FLAC__StreamMetadata *me
 static void
 sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC__StreamMetadata *metadata, void *client_data)
 {      SF_PRIVATE *psf = (SF_PRIVATE*) client_data ;
-       int bitwidth = 0 ;
+       FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
+       int bitwidth = 0, i ;
 
        switch (metadata->type)
        {       case FLAC__METADATA_TYPE_STREAMINFO :
@@ -441,6 +468,12 @@ sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC_
 
                        if (bitwidth > 0)
                                psf_log_printf (psf, "  Bit width   : %d\n", bitwidth) ;
+
+
+                       for (i = 0 ; i < psf->sf.channels ; i++)
+                               pflac->rbuffer [i] = calloc (FLAC__MAX_BLOCK_SIZE, sizeof (int32_t)) ;
+
+                       pflac->wbuffer = (const int32_t* const*) pflac->rbuffer ;
                        break ;
 
                case FLAC__METADATA_TYPE_VORBIS_COMMENT :
@@ -617,7 +650,7 @@ flac_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
 
        if (psf->error == 0)
                psf->dataoffset = psf_ftell (psf) ;
-       pflac->encbuffer = calloc (ENC_BUFFER_SIZE, sizeof (FLAC__int32)) ;
+       pflac->encbuffer = calloc (ENC_BUFFER_SIZE, sizeof (int32_t)) ;
 
        return psf->error ;
 } /* flac_write_header */
@@ -637,7 +670,6 @@ flac_open   (SF_PRIVATE *psf)
        /* Set the default value here. Over-ridden later if necessary. */
        pflac->compression = FLAC_DEFAULT_COMPRESSION_LEVEL ;
 
-
        if (psf->file.mode == SFM_RDWR)
                return SFE_BAD_MODE_RW ;
 
@@ -660,6 +692,10 @@ flac_open  (SF_PRIVATE *psf)
                if ((error = flac_enc_init (psf)))
                        return error ;
 
+               /* In an ideal world we would write the header at this point. Unfortunately
+               ** that would prevent string metadata being added so we have to hold off.
+               */
+
                psf->write_header = flac_write_header ;
                } ;
 
@@ -702,9 +738,7 @@ flac_close  (SF_PRIVATE *psf)
        if (psf->file.mode == SFM_WRITE)
        {       FLAC__stream_encoder_finish (pflac->fse) ;
                FLAC__stream_encoder_delete (pflac->fse) ;
-
-               if (pflac->encbuffer)
-                       free (pflac->encbuffer) ;
+               free (pflac->encbuffer) ;
                } ;
 
        if (psf->file.mode == SFM_READ)
@@ -876,18 +910,34 @@ flac_init (SF_PRIVATE *psf)
 static unsigned
 flac_read_loop (SF_PRIVATE *psf, unsigned len)
 {      FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
+       FLAC__StreamDecoderState state ;
 
        pflac->pos = 0 ;
        pflac->len = len ;
        pflac->remain = len ;
+
+       state = FLAC__stream_decoder_get_state (pflac->fsd) ;
+       if (state > FLAC__STREAM_DECODER_END_OF_STREAM)
+       {       psf_log_printf (psf, "FLAC__stream_decoder_get_state returned %s\n", FLAC__StreamDecoderStateString [state]) ;
+               /* Current frame is busted, so NULL the pointer. */
+               pflac->frame = NULL ;
+               } ;
+
+       /* First copy data that has already been decoded and buffered. */
        if (pflac->frame != NULL && pflac->bufferpos < pflac->frame->header.blocksize)
                flac_buffer_copy (psf) ;
 
+       /* Decode some more. */
        while (pflac->pos < pflac->len)
        {       if (FLAC__stream_decoder_process_single (pflac->fsd) == 0)
                        break ;
-               if (FLAC__stream_decoder_get_state (pflac->fsd) >= FLAC__STREAM_DECODER_END_OF_STREAM)
+               state = FLAC__stream_decoder_get_state (pflac->fsd) ;
+               if (state >= FLAC__STREAM_DECODER_END_OF_STREAM)
+               {       psf_log_printf (psf, "FLAC__stream_decoder_get_state returned %s\n", FLAC__StreamDecoderStateString [state]) ;
+                       /* Current frame is busted, so NULL the pointer. */
+                       pflac->frame = NULL ;
                        break ;
+                       } ;
                } ;
 
        pflac->ptr = NULL ;
@@ -966,6 +1016,7 @@ flac_read_flac2d (SF_PRIVATE *psf, double *ptr, sf_count_t len)
        while (total < len)
        {       pflac->ptr = ptr + total ;
                readlen = (len - total > 0x1000000) ? 0x1000000 : (unsigned) (len - total) ;
+
                current = flac_read_loop (psf, readlen) ;
                if (current == 0)
                        break ;
@@ -978,10 +1029,10 @@ flac_read_flac2d (SF_PRIVATE *psf, double *ptr, sf_count_t len)
 static sf_count_t
 flac_write_s2flac (SF_PRIVATE *psf, const short *ptr, sf_count_t len)
 {      FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
-       void (*convert) (const short *, FLAC__int32 *, int) ;
+       void (*convert) (const short *, int32_t *, int) ;
        int bufferlen, writecount, thiswrite ;
        sf_count_t      total = 0 ;
-       FLAC__int32* buffer = pflac->encbuffer ;
+       int32_t* buffer = pflac->encbuffer ;
 
        switch (SF_CODEC (psf->sf.format))
        {       case SF_FORMAT_PCM_S8 :
@@ -997,7 +1048,7 @@ flac_write_s2flac (SF_PRIVATE *psf, const short *ptr, sf_count_t len)
                        return -1 ;
                } ;
 
-       bufferlen = ENC_BUFFER_SIZE / (sizeof (FLAC__int32) * psf->sf.channels) ;
+       bufferlen = ENC_BUFFER_SIZE / (sizeof (int32_t) * psf->sf.channels) ;
        bufferlen *= psf->sf.channels ;
 
        while (len > 0)
@@ -1020,10 +1071,10 @@ flac_write_s2flac (SF_PRIVATE *psf, const short *ptr, sf_count_t len)
 static sf_count_t
 flac_write_i2flac (SF_PRIVATE *psf, const int *ptr, sf_count_t len)
 {      FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
-       void (*convert) (const int *, FLAC__int32 *, int) ;
+       void (*convert) (const int *, int32_t *, int) ;
        int bufferlen, writecount, thiswrite ;
        sf_count_t      total = 0 ;
-       FLAC__int32* buffer = pflac->encbuffer ;
+       int32_t* buffer = pflac->encbuffer ;
 
        switch (SF_CODEC (psf->sf.format))
        {       case SF_FORMAT_PCM_S8 :
@@ -1039,7 +1090,7 @@ flac_write_i2flac (SF_PRIVATE *psf, const int *ptr, sf_count_t len)
                        return -1 ;
                } ;
 
-       bufferlen = ENC_BUFFER_SIZE / (sizeof (FLAC__int32) * psf->sf.channels) ;
+       bufferlen = ENC_BUFFER_SIZE / (sizeof (int32_t) * psf->sf.channels) ;
        bufferlen *= psf->sf.channels ;
 
        while (len > 0)
@@ -1062,10 +1113,10 @@ flac_write_i2flac (SF_PRIVATE *psf, const int *ptr, sf_count_t len)
 static sf_count_t
 flac_write_f2flac (SF_PRIVATE *psf, const float *ptr, sf_count_t len)
 {      FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
-       void (*convert) (const float *, FLAC__int32 *, int, int) ;
+       void (*convert) (const float *, int32_t *, int, int) ;
        int bufferlen, writecount, thiswrite ;
        sf_count_t      total = 0 ;
-       FLAC__int32* buffer = pflac->encbuffer ;
+       int32_t* buffer = pflac->encbuffer ;
 
        switch (SF_CODEC (psf->sf.format))
        {       case SF_FORMAT_PCM_S8 :
@@ -1081,7 +1132,7 @@ flac_write_f2flac (SF_PRIVATE *psf, const float *ptr, sf_count_t len)
                        return -1 ;
                } ;
 
-       bufferlen = ENC_BUFFER_SIZE / (sizeof (FLAC__int32) * psf->sf.channels) ;
+       bufferlen = ENC_BUFFER_SIZE / (sizeof (int32_t) * psf->sf.channels) ;
        bufferlen *= psf->sf.channels ;
 
        while (len > 0)
@@ -1102,7 +1153,7 @@ flac_write_f2flac (SF_PRIVATE *psf, const float *ptr, sf_count_t len)
 } /* flac_write_f2flac */
 
 static void
-f2flac8_clip_array (const float *src, FLAC__int32 *dest, int count, int normalize)
+f2flac8_clip_array (const float *src, int32_t *dest, int count, int normalize)
 {      float normfact, scaled_value ;
 
        normfact = normalize ? (8.0 * 0x10) : 1.0 ;
@@ -1124,7 +1175,7 @@ f2flac8_clip_array (const float *src, FLAC__int32 *dest, int count, int normaliz
 } /* f2flac8_clip_array */
 
 static void
-f2flac16_clip_array (const float *src, FLAC__int32 *dest, int count, int normalize)
+f2flac16_clip_array (const float *src, int32_t *dest, int count, int normalize)
 {      float normfact, scaled_value ;
 
        normfact = normalize ? (8.0 * 0x1000) : 1.0 ;
@@ -1144,7 +1195,7 @@ f2flac16_clip_array (const float *src, FLAC__int32 *dest, int count, int normali
 } /* f2flac16_clip_array */
 
 static void
-f2flac24_clip_array (const float *src, FLAC__int32 *dest, int count, int normalize)
+f2flac24_clip_array (const float *src, int32_t *dest, int count, int normalize)
 {      float normfact, scaled_value ;
 
        normfact = normalize ? (8.0 * 0x100000) : 1.0 ;
@@ -1167,7 +1218,7 @@ f2flac24_clip_array (const float *src, FLAC__int32 *dest, int count, int normali
 } /* f2flac24_clip_array */
 
 static void
-f2flac8_array (const float *src, FLAC__int32 *dest, int count, int normalize)
+f2flac8_array (const float *src, int32_t *dest, int count, int normalize)
 {      float normfact = normalize ? (1.0 * 0x7F) : 1.0 ;
 
        while (--count >= 0)
@@ -1175,7 +1226,7 @@ f2flac8_array (const float *src, FLAC__int32 *dest, int count, int normalize)
 } /* f2flac8_array */
 
 static void
-f2flac16_array (const float *src, FLAC__int32 *dest, int count, int normalize)
+f2flac16_array (const float *src, int32_t *dest, int count, int normalize)
 {      float normfact = normalize ? (1.0 * 0x7FFF) : 1.0 ;
 
        while (--count >= 0)
@@ -1183,7 +1234,7 @@ f2flac16_array (const float *src, FLAC__int32 *dest, int count, int normalize)
 } /* f2flac16_array */
 
 static void
-f2flac24_array (const float *src, FLAC__int32 *dest, int count, int normalize)
+f2flac24_array (const float *src, int32_t *dest, int count, int normalize)
 {      float normfact = normalize ? (1.0 * 0x7FFFFF) : 1.0 ;
 
        while (--count >= 0)
@@ -1193,10 +1244,10 @@ f2flac24_array (const float *src, FLAC__int32 *dest, int count, int normalize)
 static sf_count_t
 flac_write_d2flac (SF_PRIVATE *psf, const double *ptr, sf_count_t len)
 {      FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
-       void (*convert) (const double *, FLAC__int32 *, int, int) ;
+       void (*convert) (const double *, int32_t *, int, int) ;
        int bufferlen, writecount, thiswrite ;
        sf_count_t      total = 0 ;
-       FLAC__int32* buffer = pflac->encbuffer ;
+       int32_t* buffer = pflac->encbuffer ;
 
        switch (SF_CODEC (psf->sf.format))
        {       case SF_FORMAT_PCM_S8 :
@@ -1212,7 +1263,7 @@ flac_write_d2flac (SF_PRIVATE *psf, const double *ptr, sf_count_t len)
                        return -1 ;
                } ;
 
-       bufferlen = ENC_BUFFER_SIZE / (sizeof (FLAC__int32) * psf->sf.channels) ;
+       bufferlen = ENC_BUFFER_SIZE / (sizeof (int32_t) * psf->sf.channels) ;
        bufferlen *= psf->sf.channels ;
 
        while (len > 0)
@@ -1233,7 +1284,7 @@ flac_write_d2flac (SF_PRIVATE *psf, const double *ptr, sf_count_t len)
 } /* flac_write_d2flac */
 
 static void
-d2flac8_clip_array (const double *src, FLAC__int32 *dest, int count, int normalize)
+d2flac8_clip_array (const double *src, int32_t *dest, int count, int normalize)
 {      double normfact, scaled_value ;
 
        normfact = normalize ? (8.0 * 0x10) : 1.0 ;
@@ -1255,7 +1306,7 @@ d2flac8_clip_array (const double *src, FLAC__int32 *dest, int count, int normali
 } /* d2flac8_clip_array */
 
 static void
-d2flac16_clip_array (const double *src, FLAC__int32 *dest, int count, int normalize)
+d2flac16_clip_array (const double *src, int32_t *dest, int count, int normalize)
 {      double normfact, scaled_value ;
 
        normfact = normalize ? (8.0 * 0x1000) : 1.0 ;
@@ -1277,7 +1328,7 @@ d2flac16_clip_array (const double *src, FLAC__int32 *dest, int count, int normal
 } /* d2flac16_clip_array */
 
 static void
-d2flac24_clip_array (const double *src, FLAC__int32 *dest, int count, int normalize)
+d2flac24_clip_array (const double *src, int32_t *dest, int count, int normalize)
 {      double normfact, scaled_value ;
 
        normfact = normalize ? (8.0 * 0x100000) : 1.0 ;
@@ -1299,7 +1350,7 @@ d2flac24_clip_array (const double *src, FLAC__int32 *dest, int count, int normal
 } /* d2flac24_clip_array */
 
 static void
-d2flac8_array (const double *src, FLAC__int32 *dest, int count, int normalize)
+d2flac8_array (const double *src, int32_t *dest, int count, int normalize)
 {      double normfact = normalize ? (1.0 * 0x7F) : 1.0 ;
 
        while (--count >= 0)
@@ -1307,7 +1358,7 @@ d2flac8_array (const double *src, FLAC__int32 *dest, int count, int normalize)
 } /* d2flac8_array */
 
 static void
-d2flac16_array (const double *src, FLAC__int32 *dest, int count, int normalize)
+d2flac16_array (const double *src, int32_t *dest, int count, int normalize)
 {      double normfact = normalize ? (1.0 * 0x7FFF) : 1.0 ;
 
        while (--count >= 0)
@@ -1315,7 +1366,7 @@ d2flac16_array (const double *src, FLAC__int32 *dest, int count, int normalize)
 } /* d2flac16_array */
 
 static void
-d2flac24_array (const double *src, FLAC__int32 *dest, int count, int normalize)
+d2flac24_array (const double *src, int32_t *dest, int count, int normalize)
 {      double normfact = normalize ? (1.0 * 0x7FFFFF) : 1.0 ;
 
        while (--count >= 0)
@@ -1369,7 +1420,7 @@ flac_byterate (SF_PRIVATE *psf)
 } /* flac_byterate */
 
 
-#else /* HAVE_EXTERNAL_LIBS */
+#else /* HAVE_EXTERNAL_XIPH_LIBS */
 
 int
 flac_open      (SF_PRIVATE *psf)
index ff86618..4474598 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -26,7 +26,7 @@
 #include "sndfile.h"
 #include "sfendian.h"
 #include "common.h"
-#include "wav_w64.h"
+#include "wavlike.h"
 #include "GSM610/gsm.h"
 
 #define        GSM610_BLOCKSIZE                33
@@ -40,8 +40,8 @@ typedef struct gsm610_tag
        int                             (*decode_block) (SF_PRIVATE *psf, struct gsm610_tag *pgsm610) ;
        int                             (*encode_block) (SF_PRIVATE *psf, struct gsm610_tag *pgsm610) ;
 
-       short                   samples [WAV_W64_GSM610_SAMPLES] ;
-       unsigned char   block [WAV_W64_GSM610_BLOCKSIZE] ;
+       short                   samples [WAVLIKE_GSM610_SAMPLES] ;
+       unsigned char   block [WAVLIKE_GSM610_BLOCKSIZE] ;
 
        /* Damn I hate typedef-ed pointers; yes, gsm is a pointer type. */
        gsm                             gsm_data ;
@@ -114,8 +114,8 @@ Need separate gsm_data structs for encode and decode.
                        pgsm610->encode_block = gsm610_wav_encode_block ;
                        pgsm610->decode_block = gsm610_wav_decode_block ;
 
-                       pgsm610->samplesperblock = WAV_W64_GSM610_SAMPLES ;
-                       pgsm610->blocksize = WAV_W64_GSM610_BLOCKSIZE ;
+                       pgsm610->samplesperblock = WAVLIKE_GSM610_SAMPLES ;
+                       pgsm610->blocksize = WAVLIKE_GSM610_BLOCKSIZE ;
                        break ;
 
                case SF_FORMAT_AIFF :
@@ -198,15 +198,15 @@ gsm610_wav_decode_block   (SF_PRIVATE *psf, GSM610_PRIVATE *pgsm610)
                return 1 ;
                } ;
 
-       if ((k = psf_fread (pgsm610->block, 1, WAV_W64_GSM610_BLOCKSIZE, psf)) != WAV_W64_GSM610_BLOCKSIZE)
-               psf_log_printf (psf, "*** Warning : short read (%d != %d).\n", k, WAV_W64_GSM610_BLOCKSIZE) ;
+       if ((k = psf_fread (pgsm610->block, 1, WAVLIKE_GSM610_BLOCKSIZE, psf)) != WAVLIKE_GSM610_BLOCKSIZE)
+               psf_log_printf (psf, "*** Warning : short read (%d != %d).\n", k, WAVLIKE_GSM610_BLOCKSIZE) ;
 
        if (gsm_decode (pgsm610->gsm_data, pgsm610->block, pgsm610->samples) < 0)
        {       psf_log_printf (psf, "Error from WAV gsm_decode() on frame : %d\n", pgsm610->blockcount) ;
                return 0 ;
                } ;
 
-       if (gsm_decode (pgsm610->gsm_data, pgsm610->block + (WAV_W64_GSM610_BLOCKSIZE + 1) / 2, pgsm610->samples + WAV_W64_GSM610_SAMPLES / 2) < 0)
+       if (gsm_decode (pgsm610->gsm_data, pgsm610->block + (WAVLIKE_GSM610_BLOCKSIZE + 1) / 2, pgsm610->samples + WAVLIKE_GSM610_SAMPLES / 2) < 0)
        {       psf_log_printf (psf, "Error from WAV gsm_decode() on frame : %d.5\n", pgsm610->blockcount) ;
                return 0 ;
                } ;
@@ -455,11 +455,11 @@ gsm610_wav_encode_block   (SF_PRIVATE *psf, GSM610_PRIVATE *pgsm610)
 
        /* Encode the samples. */
        gsm_encode (pgsm610->gsm_data, pgsm610->samples, pgsm610->block) ;
-       gsm_encode (pgsm610->gsm_data, pgsm610->samples+WAV_W64_GSM610_SAMPLES / 2, pgsm610->block+WAV_W64_GSM610_BLOCKSIZE / 2) ;
+       gsm_encode (pgsm610->gsm_data, pgsm610->samples+WAVLIKE_GSM610_SAMPLES / 2, pgsm610->block+WAVLIKE_GSM610_BLOCKSIZE / 2) ;
 
        /* Write the block to disk. */
-       if ((k = psf_fwrite (pgsm610->block, 1, WAV_W64_GSM610_BLOCKSIZE, psf)) != WAV_W64_GSM610_BLOCKSIZE)
-               psf_log_printf (psf, "*** Warning : short write (%d != %d).\n", k, WAV_W64_GSM610_BLOCKSIZE) ;
+       if ((k = psf_fwrite (pgsm610->block, 1, WAVLIKE_GSM610_BLOCKSIZE, psf)) != WAVLIKE_GSM610_BLOCKSIZE)
+               psf_log_printf (psf, "*** Warning : short write (%d != %d).\n", k, WAVLIKE_GSM610_BLOCKSIZE) ;
 
        pgsm610->samplecount = 0 ;
        pgsm610->blockcount ++ ;
index 25390f1..32d392e 100644 (file)
--- a/src/htk.c
+++ b/src/htk.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2016 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
@@ -112,8 +112,8 @@ htk_write_header (SF_PRIVATE *psf, int calc_length)
                psf->filelength = psf_get_filelen (psf) ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        if (psf->filelength > 12)
@@ -126,12 +126,12 @@ htk_write_header (SF_PRIVATE *psf, int calc_length)
        psf_binheader_writef (psf, "E444", sample_count, sample_period, 0x20000) ;
 
        /* Header construction complete so write it out. */
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index 2fd0a0b..095b989 100644 (file)
--- a/src/id3.c
+++ b/src/id3.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2010-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2010-2017 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
@@ -48,9 +48,11 @@ id3_skip (SF_PRIVATE * psf)
 
                /* Calculate new file offset and position ourselves there. */
                psf->fileoffset += offset + 10 ;
-               psf_binheader_readf (psf, "p", psf->fileoffset) ;
 
-               return 1 ;
+               if (psf->fileoffset < psf->filelength)
+               {       psf_binheader_readf (psf, "p", psf->fileoffset) ;
+                       return 1 ;
+                       } ;
                } ;
 
        return 0 ;
index dd11b0f..33c5e1b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -78,12 +78,12 @@ static sf_count_t ima_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t len
 static sf_count_t ima_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t len) ;
 
 static sf_count_t aiff_ima_seek                (SF_PRIVATE *psf, int mode, sf_count_t offset) ;
-static sf_count_t wav_w64_ima_seek     (SF_PRIVATE *psf, int mode, sf_count_t offset) ;
+static sf_count_t wavlike_ima_seek     (SF_PRIVATE *psf, int mode, sf_count_t offset) ;
 
 static int     ima_close       (SF_PRIVATE *psf) ;
 
-static int wav_w64_ima_decode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima) ;
-static int wav_w64_ima_encode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima) ;
+static int wavlike_ima_decode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima) ;
+static int wavlike_ima_encode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima) ;
 
 /*-static int aiff_ima_reader_init (SF_PRIVATE *psf, int blockalign, int samplesperblock) ;-*/
 static int aiff_ima_decode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima) ;
@@ -105,7 +105,7 @@ clamp_ima_step_index (int indx)
 */
 
 int
-wav_w64_ima_init (SF_PRIVATE *psf, int blockalign, int samplesperblock)
+wavlike_ima_init (SF_PRIVATE *psf, int blockalign, int samplesperblock)
 {      int error ;
 
        if (psf->codec_data != NULL)
@@ -125,10 +125,10 @@ wav_w64_ima_init (SF_PRIVATE *psf, int blockalign, int samplesperblock)
                        return error ;
 
        psf->codec_close = ima_close ;
-       psf->seek = wav_w64_ima_seek ;
+       psf->seek = wavlike_ima_seek ;
 
        return 0 ;
-} /* wav_w64_ima_init */
+} /* wavlike_ima_init */
 
 int
 aiff_ima_init (SF_PRIVATE *psf, int blockalign, int samplesperblock)
@@ -225,7 +225,7 @@ ima_reader_init (SF_PRIVATE *psf, int blockalign, int samplesperblock)
                                        return SFE_INTERNAL ;
                                        } ;
 
-                               pima->decode_block = wav_w64_ima_decode_block ;
+                               pima->decode_block = wavlike_ima_decode_block ;
 
                                psf->sf.frames = pima->samplesperblock * pima->blocks ;
                                break ;
@@ -399,7 +399,7 @@ aiff_ima_encode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima)
 } /* aiff_ima_encode_block */
 
 static int
-wav_w64_ima_decode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima)
+wavlike_ima_decode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima)
 {      int             chan, k, predictor, blockindx, indx, indxstart, diff ;
        short   step, bytecode, stepindx [2] ;
 
@@ -487,10 +487,10 @@ wav_w64_ima_decode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima)
                } ;
 
        return 1 ;
-} /* wav_w64_ima_decode_block */
+} /* wavlike_ima_decode_block */
 
 static int
-wav_w64_ima_encode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima)
+wavlike_ima_encode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima)
 {      int             chan, k, step, diff, vpdiff, blockindx, indx, indxstart ;
        short   bytecode, mask ;
 
@@ -575,7 +575,7 @@ wav_w64_ima_encode_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima)
        pima->blockcount ++ ;
 
        return 1 ;
-} /* wav_w64_ima_encode_block */
+} /* wavlike_ima_encode_block */
 
 static int
 ima_read_block (SF_PRIVATE *psf, IMA_ADPCM_PRIVATE *pima, short *ptr, int len)
@@ -763,7 +763,7 @@ aiff_ima_seek (SF_PRIVATE *psf, int mode, sf_count_t offset)
 } /* aiff_ima_seek */
 
 static sf_count_t
-wav_w64_ima_seek (SF_PRIVATE *psf, int mode, sf_count_t offset)
+wavlike_ima_seek (SF_PRIVATE *psf, int mode, sf_count_t offset)
 {      IMA_ADPCM_PRIVATE *pima ;
        int                     newblock, newsample ;
 
@@ -805,7 +805,7 @@ wav_w64_ima_seek (SF_PRIVATE *psf, int mode, sf_count_t offset)
                } ;
 
        return newblock * pima->samplesperblock + newsample ;
-} /* wav_w64_ima_seek */
+} /* wavlike_ima_seek */
 
 /*==========================================================================================
 ** IMA ADPCM Write Functions.
@@ -841,7 +841,7 @@ ima_writer_init (SF_PRIVATE *psf, int blockalign)
        switch (SF_CONTAINER (psf->sf.format))
        {       case SF_FORMAT_WAV :
                case SF_FORMAT_W64 :
-                               pima->encode_block = wav_w64_ima_encode_block ;
+                               pima->encode_block = wavlike_ima_encode_block ;
                                break ;
 
                case SF_FORMAT_AIFF :
index 47b8c60..7c3e924 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2001-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2001-2016 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
@@ -256,8 +256,8 @@ ircam_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
                return SFE_BAD_OPEN_FORMAT ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
 
        if (psf->is_pipe == SF_FALSE)
                psf_fseek (psf, 0, SEEK_SET) ;
@@ -278,10 +278,10 @@ ircam_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
                default : return SFE_BAD_OPEN_FORMAT ;
                } ;
 
-       psf_binheader_writef (psf, "z", (size_t) (IRCAM_DATA_OFFSET - psf->headindex)) ;
+       psf_binheader_writef (psf, "z", (size_t) (IRCAM_DATA_OFFSET - psf->header.indx)) ;
 
        /* Header construction complete so write it out. */
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
diff --git a/src/libsndfile-1.def b/src/libsndfile-1.def
deleted file mode 100644 (file)
index 4194ff3..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-; Auto-generated by create_symbols_file.py
-
-LIBRARY libsndfile-1.dll
-EXPORTS
-
-sf_command           @1
-sf_open              @2
-sf_close             @3
-sf_seek              @4
-sf_error             @7
-sf_perror            @8
-sf_error_str         @9
-sf_error_number      @10
-sf_format_check      @11
-sf_read_raw          @16
-sf_readf_short       @17
-sf_readf_int         @18
-sf_readf_float       @19
-sf_readf_double      @20
-sf_read_short        @21
-sf_read_int          @22
-sf_read_float        @23
-sf_read_double       @24
-sf_write_raw         @32
-sf_writef_short      @33
-sf_writef_int        @34
-sf_writef_float      @35
-sf_writef_double     @36
-sf_write_short       @37
-sf_write_int         @38
-sf_write_float       @39
-sf_write_double      @40
-sf_strerror          @50
-sf_get_string        @60
-sf_set_string        @61
-sf_version_string    @68
-sf_open_fd           @70
-sf_wchar_open        @71
-sf_open_virtual      @80
-sf_write_sync        @90
-sf_set_chunk         @100
-sf_get_chunk_size    @101
-sf_get_chunk_data    @102
-sf_get_chunk_iterator @103
-sf_next_chunk_iterator @104
-sf_current_byterate  @110
-
index 0f6604d..3c73680 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2016 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
@@ -165,8 +165,8 @@ mat4_write_header (SF_PRIVATE *psf, int calc_length)
                return SFE_BAD_OPEN_FORMAT ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        /* Need sample rate as a double for writing to the header. */
@@ -188,12 +188,12 @@ mat4_write_header (SF_PRIVATE *psf, int calc_length)
                return SFE_BAD_OPEN_FORMAT ;
 
        /* Header construction complete so write it out. */
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index 164fb29..11a57f4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2016 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
@@ -154,7 +154,7 @@ mat5_close  (SF_PRIVATE *psf)
 
 static int
 mat5_write_header (SF_PRIVATE *psf, int calc_length)
-{      static const char       *filename = "MATLAB 5.0 MAT-file, written by " PACKAGE "-" VERSION ", " ;
+{      static const char       *filename = "MATLAB 5.0 MAT-file, written by " PACKAGE_NAME "-" PACKAGE_VERSION ", " ;
        static const char       *sr_name = "samplerate\0\0\0\0\0\0\0\0\0\0\0" ;
        static const char       *wd_name = "wavedata\0" ;
        char            buffer [256] ;
@@ -201,15 +201,15 @@ mat5_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        psf_get_date_str (buffer, sizeof (buffer)) ;
        psf_binheader_writef (psf, "bb", filename, strlen (filename), buffer, strlen (buffer) + 1) ;
 
-       memset (buffer, ' ', 124 - psf->headindex) ;
-       psf_binheader_writef (psf, "b", buffer, make_size_t (124 - psf->headindex)) ;
+       memset (buffer, ' ', 124 - psf->header.indx) ;
+       psf_binheader_writef (psf, "b", buffer, make_size_t (124 - psf->header.indx)) ;
 
        psf->rwf_endian = psf->endian ;
 
@@ -243,12 +243,12 @@ mat5_write_header (SF_PRIVATE *psf, int calc_length)
        psf_binheader_writef (psf, "t48", encoding, datasize) ;
 
        /* Header construction complete so write it out. */
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index 0170f7c..f004ca1 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2016 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
@@ -121,8 +121,8 @@ mpc2k_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
 
        /*
        ** Only attempt to seek if we are not writng to a pipe. If we are
@@ -142,12 +142,12 @@ mpc2k_write_header (SF_PRIVATE *psf, int calc_length)
        psf->bytewidth = 2 ;
        psf->endian = SF_ENDIAN_LITTLE ;
 
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index 2251e53..bbc3002 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
 #include       "sndfile.h"
 #include       "sfendian.h"
 #include       "common.h"
-#include       "wav_w64.h"
+#include       "wavlike.h"
 
-/* These required here because we write the header in this file. */
-
-#define RIFF_MARKER    (MAKE_MARKER ('R', 'I', 'F', 'F'))
-#define WAVE_MARKER    (MAKE_MARKER ('W', 'A', 'V', 'E'))
-#define fmt_MARKER     (MAKE_MARKER ('f', 'm', 't', ' '))
-#define fact_MARKER    (MAKE_MARKER ('f', 'a', 'c', 't'))
-#define data_MARKER    (MAKE_MARKER ('d', 'a', 't', 'a'))
-
-#define WAVE_FORMAT_MS_ADPCM   0x0002
 
 typedef struct
 {      int                             channels, blocksize, samplesperblock, blocks, dataremaining ;
@@ -61,11 +52,11 @@ static int AdaptationTable [] =
    appear in the actual WAVE file.  They should be read in
    in case a sound program added extras to the list. */
 
-static int AdaptCoeff1 [MSADPCM_ADAPT_COEFF_COUNT] =
+static int AdaptCoeff1 [WAVLIKE_MSADPCM_ADAPT_COEFF_COUNT] =
 {      256, 512, 0, 192, 240, 460, 392
 } ;
 
-static int AdaptCoeff2 [MSADPCM_ADAPT_COEFF_COUNT] =
+static int AdaptCoeff2 [WAVLIKE_MSADPCM_ADAPT_COEFF_COUNT] =
 {      0, -256, 0, 64, 0, -208, -232
 } ;
 
@@ -124,7 +115,7 @@ static      void    choose_predictor (unsigned int channels, short *data, int *bpred, in
 */
 
 int
-wav_w64_msadpcm_init   (SF_PRIVATE *psf, int blockalign, int samplesperblock)
+wavlike_msadpcm_init   (SF_PRIVATE *psf, int blockalign, int samplesperblock)
 {      MSADPCM_PRIVATE *pms ;
        unsigned int    pmssize ;
        int                             count ;
@@ -200,15 +191,15 @@ wav_w64_msadpcm_init      (SF_PRIVATE *psf, int blockalign, int samplesperblock)
        psf->seek = msadpcm_seek ;
 
        return 0 ;
-} /* wav_w64_msadpcm_init */
+} /* wavlike_msadpcm_init */
 
 
 static inline short
 msadpcm_get_bpred (SF_PRIVATE *psf, MSADPCM_PRIVATE *pms, unsigned char value)
-{      if (value >= MSADPCM_ADAPT_COEFF_COUNT)
+{      if (value >= WAVLIKE_MSADPCM_ADAPT_COEFF_COUNT)
        {       if (pms->sync_error == 0)
                {       pms->sync_error = 1 ;
-                       psf_log_printf (psf, "MS ADPCM synchronisation error (%u should be < %u).\n", value, MSADPCM_ADAPT_COEFF_COUNT) ;
+                       psf_log_printf (psf, "MS ADPCM synchronisation error (%u should be < %u).\n", value, WAVLIKE_MSADPCM_ADAPT_COEFF_COUNT) ;
                        } ;
                return 0 ;
                } ;
@@ -515,12 +506,12 @@ msadpcm_seek      (SF_PRIVATE *psf, int mode, sf_count_t offset)
 */
 
 void
-msadpcm_write_adapt_coeffs     (SF_PRIVATE *psf)
+wavlike_msadpcm_write_adapt_coeffs     (SF_PRIVATE *psf)
 {      int k ;
 
-       for (k = 0 ; k < MSADPCM_ADAPT_COEFF_COUNT ; k++)
+       for (k = 0 ; k < WAVLIKE_MSADPCM_ADAPT_COEFF_COUNT ; k++)
                psf_binheader_writef (psf, "22", AdaptCoeff1 [k], AdaptCoeff2 [k]) ;
-} /* msadpcm_write_adapt_coeffs */
+} /* wavlike_msadpcm_write_adapt_coeffs */
 
 /*==========================================================================================
 */
diff --git a/src/new.c b/src/new.c
new file mode 100644 (file)
index 0000000..23f3087
--- /dev/null
+++ b/src/new.c
@@ -0,0 +1,116 @@
+/*
+** Copyright (C) 2002-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       "sfconfig.h"
+
+#include       <stdio.h>
+#include       <fcntl.h>
+#include       <string.h>
+#include       <ctype.h>
+
+#include       "sndfile.h"
+#include       "sfendian.h"
+#include       "common.h"
+
+#if (ENABLE_EXPERIMENTAL_CODE == 0)
+
+int
+new_open       (SF_PRIVATE *psf)
+{      if (psf)
+               return SFE_UNIMPLEMENTED ;
+       return (psf && 0) ;
+} /* new_open */
+
+#else
+
+/*------------------------------------------------------------------------------
+** Macros to handle big/little endian issues.
+*/
+
+/*------------------------------------------------------------------------------
+** Typedefs.
+*/
+
+/*------------------------------------------------------------------------------
+** Private static functions.
+*/
+
+static int     new_read_header (SF_PRIVATE *psf) ;
+
+/*------------------------------------------------------------------------------
+** Public function.
+*/
+
+int
+new_open (SF_PRIVATE *psf)
+{      int     subformat, error = 0 ;
+
+       if (psf->file.mode == SFM_WRITE || psf->file.mode == SFM_RDWR)
+               return SFE_UNIMPLEMENTED ;
+
+       if ((error = new_read_header (psf)))
+                       return error ;
+
+       if ((SF_CONTAINER (psf->sf.format)) != SF_FORMAT_WVE)
+               return  SFE_BAD_OPEN_FORMAT ;
+
+       subformat = SF_CODEC (psf->sf.format) ;
+
+       return error ;
+} /* new_open */
+
+/*------------------------------------------------------------------------------
+*/
+
+static int
+new_read_header (SF_PRIVATE *psf)
+{      int marker ;
+
+       /* Set position to start of file to begin reading header. */
+       psf_binheader_readf (psf, "pm", 0, &marker) ;
+       if (marker != ALAW_MARKER)
+               return SFE_WVE_NOT_WVE ;
+
+       psf_binheader_readf (psf, "m", &marker) ;
+       if (marker != SOUN_MARKER)
+               return SFE_WVE_NOT_WVE ;
+
+       psf_binheader_readf (psf, "m", &marker) ;
+       if (marker != DFIL_MARKER)
+               return SFE_WVE_NOT_WVE ;
+
+       psf_log_printf (psf, "Read only : Psion Alaw\n"
+                       "  Sample Rate : 8000\n"
+                       "  Channels    : 1\n"
+                       "  Encoding    : A-law\n") ;
+
+       psf->dataoffset = 0x20 ;
+       psf->datalength = psf->filelength - psf->dataoffset ;
+
+       psf->sf.format          = SF_FORMAT_WVE | SF_FORMAT_ALAW ;
+       psf->sf.samplerate      = 8000 ;
+       psf->sf.frames          = psf->datalength ;
+       psf->sf.channels        = 1 ;
+
+       return alaw_init (psf) ;
+} /* new_read_header */
+
+/*------------------------------------------------------------------------------
+*/
+
+#endif
index 2aa679e..b6e2ff3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -124,9 +124,6 @@ nist_read_header (SF_PRIVATE *psf)
        char    str [64], *cptr ;
        long    samples ;
 
-       if (sizeof (psf->header) <= NIST_HEADER_LENGTH)
-               return SFE_INTERNAL ;
-
        /* Go to start of file and read in the whole header. */
        psf_binheader_readf (psf, "pb", 0, psf_header, NIST_HEADER_LENGTH) ;
 
@@ -314,8 +311,8 @@ nist_write_header (SF_PRIVATE *psf, int calc_length)
                end_str = "error" ;
 
        /* Clear the whole header. */
-       memset (psf->header, 0, sizeof (psf->header)) ;
-       psf->headindex = 0 ;
+       memset (psf->header.ptr, 0, psf->header.len) ;
+       psf->header.indx = 0 ;
 
        psf_fseek (psf, 0, SEEK_SET) ;
 
@@ -360,9 +357,9 @@ nist_write_header (SF_PRIVATE *psf, int calc_length)
        psf_asciiheader_printf (psf, "end_head\n") ;
 
        /* Zero fill to dataoffset. */
-       psf_binheader_writef (psf, "z", (size_t) (NIST_HEADER_LENGTH - psf->headindex)) ;
+       psf_binheader_writef (psf, "z", (size_t) (NIST_HEADER_LENGTH - psf->header.indx)) ;
 
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
index 7bc4b31..0856f77 100644 (file)
--- a/src/ogg.c
+++ b/src/ogg.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2007 John ffitch
 **
 ** This program is free software ; you can redistribute it and/or modify
@@ -34,7 +34,7 @@
 #include "sfendian.h"
 #include "common.h"
 
-#if HAVE_EXTERNAL_LIBS
+#if HAVE_EXTERNAL_XIPH_LIBS
 
 #include <ogg/ogg.h>
 
@@ -131,11 +131,11 @@ ogg_stream_classify (SF_PRIVATE *psf, OGG_PRIVATE* odata)
        buffer = ogg_sync_buffer (&odata->osync, 4096L) ;
 
        /* Grab the part of the header that has already been read. */
-       memcpy (buffer, psf->header, psf->headindex) ;
-       bytes = psf->headindex ;
+       memcpy (buffer, psf->header.ptr, psf->header.indx) ;
+       bytes = psf->header.indx ;
 
        /* Submit a 4k block to libvorbis' Ogg layer */
-       bytes += psf_fread (buffer + psf->headindex, 1, 4096 - psf->headindex, psf) ;
+       bytes += psf_fread (buffer + psf->header.indx, 1, 4096 - psf->header.indx, psf) ;
        ogg_sync_wrote (&odata->osync, bytes) ;
 
        /* Get the first page. */
@@ -241,7 +241,7 @@ ogg_page_classify (SF_PRIVATE * psf, const ogg_page * og)
        return 0 ;
 } /* ogg_page_classify */
 
-#else /* HAVE_EXTERNAL_LIBS */
+#else /* HAVE_EXTERNAL_XIPH_LIBS */
 
 int
 ogg_open       (SF_PRIVATE *psf)
index 0824810..f5769e2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2013 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2013-2016 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
@@ -34,7 +34,7 @@
 #include "sfendian.h"
 #include "common.h"
 
-#if (ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_LIBS)
+#if (ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_XIPH_LIBS)
 
 #include <ogg/ogg.h>
 
@@ -137,7 +137,7 @@ ogg_opus_close (SF_PRIVATE * UNUSED (psf))
 } /* ogg_opus_close */
 
 
-#else /* ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_LIBS */
+#else /* ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_XIPH_LIBS */
 
 int
 ogg_opus_open (SF_PRIVATE *psf)
index 2e3b7f2..f3cd94c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2016 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
@@ -34,7 +34,7 @@
 #include "sfendian.h"
 #include "common.h"
 
-#if (ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_LIBS)
+#if (ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_XIPH_LIBS)
 
 #include <ogg/ogg.h>
 
@@ -152,7 +152,7 @@ duration = audio_samples / rate
          = 3.947
 */
 
-#else /* ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_LIBS */
+#else /* ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_XIPH_LIBS */
 
 int
 ogg_pcm_open (SF_PRIVATE *psf)
index f24e242..b95d4db 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2016 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
@@ -34,7 +34,7 @@
 #include "sfendian.h"
 #include "common.h"
 
-#if (ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_LIBS)
+#if (ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_XIPH_LIBS)
 
 #include <ogg/ogg.h>
 
@@ -413,7 +413,7 @@ duration = audio_samples / rate
                 = 3.947
 */
 
-#else /* ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_LIBS */
+#else /* ENABLE_EXPERIMENTAL_CODE && HAVE_EXTERNAL_XIPH_LIBS */
 
 int
 ogg_speex_open (SF_PRIVATE *psf)
index 0656f4f..78acd38 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2002-2005 Michael Smith <msmith@xiph.org>
 ** Copyright (C) 2007 John ffitch
 **
@@ -68,7 +68,7 @@
 #include "sfendian.h"
 #include "common.h"
 
-#if HAVE_EXTERNAL_LIBS
+#if HAVE_EXTERNAL_XIPH_LIBS
 
 #include <ogg/ogg.h>
 #include <vorbis/codec.h>
@@ -155,11 +155,11 @@ vorbis_read_header (SF_PRIVATE *psf, int log_data)
        buffer = ogg_sync_buffer (&odata->osync, 4096L) ;
 
        /* Grab the part of the header that has already been read. */
-       memcpy (buffer, psf->header, psf->headindex) ;
-       bytes = psf->headindex ;
+       memcpy (buffer, psf->header.ptr, psf->header.indx) ;
+       bytes = psf->header.indx ;
 
        /* Submit a 4k block to libvorbis' Ogg layer */
-       bytes += psf_fread (buffer + psf->headindex, 1, 4096 - psf->headindex, psf) ;
+       bytes += psf_fread (buffer + psf->header.indx, 1, 4096 - psf->header.indx, psf) ;
        ogg_sync_wrote (&odata->osync, bytes) ;
 
        /* Get the first page. */
@@ -489,7 +489,7 @@ vorbis_close (SF_PRIVATE *psf)
 int
 ogg_vorbis_open (SF_PRIVATE *psf)
 {      OGG_PRIVATE* odata = psf->container_data ;
-       VORBIS_PRIVATE* vdata = calloc (1, sizeof (VORBIS_PRIVATE)) ;
+       VORBIS_PRIVATE* vdata ;
        int     error = 0 ;
 
        if (odata == NULL)
@@ -497,6 +497,7 @@ ogg_vorbis_open (SF_PRIVATE *psf)
                return SFE_INTERNAL ;
                } ;
 
+       vdata = calloc (1, sizeof (VORBIS_PRIVATE)) ;
        psf->codec_data = vdata ;
 
        if (psf->file.mode == SFM_RDWR)
@@ -1165,7 +1166,7 @@ vorbis_length (SF_PRIVATE *psf)
        return length ;
 } /* vorbis_length */
 
-#else /* HAVE_EXTERNAL_LIBS */
+#else /* HAVE_EXTERNAL_XIPH_LIBS */
 
 int
 ogg_vorbis_open        (SF_PRIVATE *psf)
index 84272e5..e9e0ed4 100644 (file)
--- a/src/paf.c
+++ b/src/paf.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -63,7 +63,7 @@ typedef struct
        int                             read_block, write_block, read_count, write_count ;
        sf_count_t              sample_count ;
        int                             *samples ;
-       unsigned char   *block ;
+       int                             *block ;
        int                             data [] ; /* ISO C99 struct flexible array. */
 } PAF24_PRIVATE ;
 
@@ -298,8 +298,8 @@ paf_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
 
        if (psf->endian == SF_ENDIAN_BIG)
        {       /* Marker, version, endianness, samplerate */
@@ -315,9 +315,9 @@ paf_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
                } ;
 
        /* Zero fill to dataoffset. */
-       psf_binheader_writef (psf, "z", (size_t) (psf->dataoffset - psf->headindex)) ;
+       psf_binheader_writef (psf, "z", (size_t) (psf->dataoffset - psf->header.indx)) ;
 
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        return psf->error ;
 } /* paf_write_header */
@@ -362,7 +362,7 @@ paf24_init (SF_PRIVATE *psf)
 
        ppaf24->channels        = psf->sf.channels ;
        ppaf24->samples         = ppaf24->data ;
-       ppaf24->block           = (unsigned char*) (ppaf24->data + PAF24_SAMPLES_PER_BLOCK * ppaf24->channels) ;
+       ppaf24->block           = ppaf24->data + PAF24_SAMPLES_PER_BLOCK * ppaf24->channels ;
 
        ppaf24->blocksize = PAF24_BLOCK_SIZE * ppaf24->channels ;
 
@@ -496,15 +496,14 @@ paf24_read_block (SF_PRIVATE *psf, PAF24_PRIVATE *ppaf24)
        if ((k = psf_fread (ppaf24->block, 1, ppaf24->blocksize, psf)) != ppaf24->blocksize)
                psf_log_printf (psf, "*** Warning : short read (%d != %d).\n", k, ppaf24->blocksize) ;
 
-
        /* Do endian swapping if necessary. */
-       if (psf->endian == SF_ENDIAN_BIG)
-               endswap_int_array       (ppaf24->data, 8 * ppaf24->channels) ;
+       if ((CPU_IS_BIG_ENDIAN && psf->endian == SF_ENDIAN_LITTLE) || (CPU_IS_LITTLE_ENDIAN && psf->endian == SF_ENDIAN_BIG))
+               endswap_int_array (ppaf24->block, 8 * ppaf24->channels) ;
 
        /* Unpack block. */
        for (k = 0 ; k < PAF24_SAMPLES_PER_BLOCK * ppaf24->channels ; k++)
        {       channel = k % ppaf24->channels ;
-               cptr = ppaf24->block + PAF24_BLOCK_SIZE * channel + 3 * (k / ppaf24->channels) ;
+               cptr = ((unsigned char *) ppaf24->block) + PAF24_BLOCK_SIZE * channel + 3 * (k / ppaf24->channels) ;
                ppaf24->samples [k] = (cptr [0] << 8) | (cptr [1] << 16) | (((unsigned) cptr [2]) << 24) ;
                } ;
 
@@ -643,7 +642,7 @@ paf24_write_block (SF_PRIVATE *psf, PAF24_PRIVATE *ppaf24)
        if (CPU_IS_LITTLE_ENDIAN)
        {       for (k = 0 ; k < PAF24_SAMPLES_PER_BLOCK * ppaf24->channels ; k++)
                {       channel = k % ppaf24->channels ;
-                       cptr = ppaf24->block + PAF24_BLOCK_SIZE * channel + 3 * (k / ppaf24->channels) ;
+                       cptr = ((unsigned char *) ppaf24->block) + PAF24_BLOCK_SIZE * channel + 3 * (k / ppaf24->channels) ;
                        nextsample = ppaf24->samples [k] >> 8 ;
                        cptr [0] = nextsample ;
                        cptr [1] = nextsample >> 8 ;
@@ -652,20 +651,20 @@ paf24_write_block (SF_PRIVATE *psf, PAF24_PRIVATE *ppaf24)
 
                /* Do endian swapping if necessary. */
                if (psf->endian == SF_ENDIAN_BIG)
-                       endswap_int_array (ppaf24->data, 8 * ppaf24->channels) ;
+                       endswap_int_array (ppaf24->block, 8 * ppaf24->channels) ;
                }
        else if (CPU_IS_BIG_ENDIAN)
        {       /* This is correct. */
                for (k = 0 ; k < PAF24_SAMPLES_PER_BLOCK * ppaf24->channels ; k++)
                {       channel = k % ppaf24->channels ;
-                       cptr = ppaf24->block + PAF24_BLOCK_SIZE * channel + 3 * (k / ppaf24->channels) ;
+                       cptr = ((unsigned char *) ppaf24->block) + PAF24_BLOCK_SIZE * channel + 3 * (k / ppaf24->channels) ;
                        nextsample = ppaf24->samples [k] >> 8 ;
                        cptr [0] = nextsample ;
                        cptr [1] = nextsample >> 8 ;
                        cptr [2] = nextsample >> 16 ;
                        } ;
-               if (psf->endian == SF_ENDIAN_BIG)
-                       endswap_int_array (ppaf24->data, 8 * ppaf24->channels) ;
+               if (psf->endian == SF_ENDIAN_LITTLE)
+                       endswap_int_array (ppaf24->block, 8 * ppaf24->channels) ;
                } ;
 
        /* Write block to disk. */
index 8cdc445..d10336a 100644 (file)
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -258,7 +258,7 @@ pcm_init (SF_PRIVATE *psf)
                                        break ;
 
                        default :
-                               psf_log_printf (psf, "pcm.c returning SFE_UNIMPLEMENTED\nbytewidth %s    endian %d\n", psf->bytewidth, psf->endian) ;
+                               psf_log_printf (psf, "pcm.c returning SFE_UNIMPLEMENTED\nbytewidth %d    endian %d\n", psf->bytewidth, psf->endian) ;
                                return SFE_UNIMPLEMENTED ;
                        } ;
 
index 4ea24b6..714f5b3 100644 (file)
--- a/src/pvf.c
+++ b/src/pvf.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2016 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
@@ -106,24 +106,24 @@ pvf_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
        current = psf_ftell (psf) ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
 
        if (psf->is_pipe == SF_FALSE)
                psf_fseek (psf, 0, SEEK_SET) ;
 
-       snprintf ((char*) psf->header, sizeof (psf->header), "PVF1\n%d %d %d\n",
+       snprintf ((char*) psf->header.ptr, psf->header.len, "PVF1\n%d %d %d\n",
                psf->sf.channels, psf->sf.samplerate, psf->bytewidth * 8) ;
 
-       psf->headindex = strlen ((char*) psf->header) ;
+       psf->header.indx = strlen ((char*) psf->header.ptr) ;
 
        /* Header construction complete so write it out. */
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index 476cc1a..c373bb0 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2017 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2009      Uli Franke <cls@nebadje.org>
 **
 ** This program is free software; you can redistribute it and/or modify
@@ -35,7 +35,7 @@
 #include       "sndfile.h"
 #include       "sfendian.h"
 #include       "common.h"
-#include       "wav_w64.h"
+#include       "wavlike.h"
 
 /*------------------------------------------------------------------------------
 ** Macros to handle big/little endian issues.
@@ -53,7 +53,8 @@
 #define bext_MARKER            MAKE_MARKER ('b', 'e', 'x', 't')
 #define cart_MARKER            MAKE_MARKER ('c', 'a', 'r', 't')
 #define OggS_MARKER            MAKE_MARKER ('O', 'g', 'g', 'S')
-#define wvpk_MARKER    MAKE_MARKER ('w', 'v', 'p', 'k')
+#define wvpk_MARKER            MAKE_MARKER ('w', 'v', 'p', 'k')
+#define LIST_MARKER            MAKE_MARKER ('L', 'I', 'S', 'T')
 
 /*
 ** The file size limit in bytes below which we can, if requested, write this
 #define RIFF_DOWNGRADE_BYTES   ((sf_count_t) 0xffffffff)
 
 /*------------------------------------------------------------------------------
-** Typedefs.
-*/
-
-/*------------------------------------------------------------------------------
 ** Private static functions.
 */
 
 static int     rf64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock) ;
 static int     rf64_write_header (SF_PRIVATE *psf, int calc_length) ;
+static int     rf64_write_tailer (SF_PRIVATE *psf) ;
 static int     rf64_close (SF_PRIVATE *psf) ;
 static int     rf64_command (SF_PRIVATE *psf, int command, void * UNUSED (data), int datasize) ;
 
+static int rf64_set_chunk (SF_PRIVATE *psf, const SF_CHUNK_INFO * chunk_info) ;
+static SF_CHUNK_ITERATOR * rf64_next_chunk_iterator (SF_PRIVATE *psf, SF_CHUNK_ITERATOR * iterator) ;
+static int rf64_get_chunk_size (SF_PRIVATE *psf, const SF_CHUNK_ITERATOR * iterator, SF_CHUNK_INFO * chunk_info) ;
+static int rf64_get_chunk_data (SF_PRIVATE *psf, const SF_CHUNK_ITERATOR * iterator, SF_CHUNK_INFO * chunk_info) ;
+
 /*------------------------------------------------------------------------------
 ** Public function.
 */
 
 int
 rf64_open (SF_PRIVATE *psf)
-{      WAV_PRIVATE *wpriv ;
+{      WAVLIKE_PRIVATE *wpriv ;
        int     subformat, error = 0 ;
        int blockalign, framesperblock ;
 
-       if ((wpriv = calloc (1, sizeof (WAV_PRIVATE))) == NULL)
+       if ((wpriv = calloc (1, sizeof (WAVLIKE_PRIVATE))) == NULL)
                return SFE_MALLOC_FAILED ;
        psf->container_data = wpriv ;
        wpriv->wavex_ambisonic = SF_AMBISONIC_NONE ;
@@ -93,10 +96,15 @@ rf64_open (SF_PRIVATE *psf)
        /* All RF64 files are little endian. */
        psf->endian = SF_ENDIAN_LITTLE ;
 
+       psf->strings.flags = SF_STR_ALLOW_START | SF_STR_ALLOW_END ;
 
        if (psf->file.mode == SFM_READ || (psf->file.mode == SFM_RDWR && psf->filelength > 0))
        {       if ((error = rf64_read_header (psf, &blockalign, &framesperblock)) != 0)
                        return error ;
+
+               psf->next_chunk_iterator = rf64_next_chunk_iterator ;
+               psf->get_chunk_size = rf64_get_chunk_size ;
+               psf->get_chunk_data = rf64_get_chunk_data ;
                } ;
 
        if ((psf->sf.format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RF64)
@@ -114,6 +122,7 @@ rf64_open (SF_PRIVATE *psf)
                        return error ;
 
                psf->write_header = rf64_write_header ;
+               psf->set_chunk = rf64_set_chunk ;
                } ;
 
        psf->container_close = rf64_close ;
@@ -159,18 +168,20 @@ enum
        HAVE_fmt        = 0x02,
        HAVE_bext       = 0x04,
        HAVE_data       = 0x08,
-       HAVE_cart       = 0x10
+       HAVE_cart       = 0x10,
+       HAVE_PEAK       = 0x20,
+       HAVE_other      = 0x40
 } ;
 
 #define HAVE_CHUNK(CHUNK)      ((parsestage & CHUNK) != 0)
 
 static int
 rf64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
-{      WAV_PRIVATE     *wpriv ;
+{      WAVLIKE_PRIVATE *wpriv ;
        WAV_FMT         *wav_fmt ;
        sf_count_t riff_size = 0, frame_count = 0, ds64_datalength = 0 ;
-       uint32_t marks [2], chunk_size, parsestage = 0 ;
-       int marker, error, done = 0, format = 0 ;
+       uint32_t marks [2], marker, chunk_size, parsestage = 0 ;
+       int error, done = 0, format = 0 ;
 
        if ((wpriv = psf->container_data) == NULL)
                return SFE_INTERNAL ;
@@ -197,6 +208,8 @@ rf64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                        break ;
                        } ;
 
+               psf_store_read_chunk_u32 (&psf->rchunks, marker, psf_ftell (psf), chunk_size) ;
+
                switch (marker)
                {       case ds64_MARKER :
                                if (parsestage & HAVE_ds64)
@@ -245,24 +258,43 @@ rf64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
 
                        case fmt_MARKER:
                                        psf_log_printf (psf, "%M : %u\n", marker, chunk_size) ;
-                                       if ((error = wav_w64_read_fmt_chunk (psf, chunk_size)) != 0)
+                                       if ((error = wavlike_read_fmt_chunk (psf, chunk_size)) != 0)
                                                return error ;
                                        format = wav_fmt->format ;
                                        parsestage |= HAVE_fmt ;
                                        break ;
 
                        case bext_MARKER :
-                                       if ((error = wav_read_bext_chunk (psf, chunk_size)) != 0)
+                                       if ((error = wavlike_read_bext_chunk (psf, chunk_size)) != 0)
                                                return error ;
                                        parsestage |= HAVE_bext ;
                                        break ;
 
                        case cart_MARKER :
-                                       if ((error = wav_read_cart_chunk (psf, chunk_size)) != 0)
+                                       if ((error = wavlike_read_cart_chunk (psf, chunk_size)) != 0)
                                                return error ;
                                        parsestage |= HAVE_cart ;
                                        break ;
 
+                       case INFO_MARKER :
+                       case LIST_MARKER :
+                                       if ((error = wavlike_subchunk_parse (psf, marker, chunk_size)) != 0)
+                                               return error ;
+                                       parsestage |= HAVE_other ;
+                                       break ;
+
+                       case PEAK_MARKER :
+                                       if ((parsestage & (HAVE_ds64 | HAVE_fmt)) != (HAVE_ds64 | HAVE_fmt))
+                                               return SFE_RF64_PEAK_B4_FMT ;
+
+                                       parsestage |= HAVE_PEAK ;
+
+                                       psf_log_printf (psf, "%M : %u\n", marker, chunk_size) ;
+                                       if ((error = wavlike_read_peak_chunk (psf, chunk_size)) != 0)
+                                               return error ;
+                                       psf->peak_info->peak_loc = ((parsestage & HAVE_data) == 0) ? SF_PEAK_START : SF_PEAK_END ;
+                                       break ;
+
                        case data_MARKER :
                                /* see wav for more sophisticated parsing -> implement state machine with parsestage */
 
@@ -304,7 +336,6 @@ rf64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
 
                                        if (psf_ftell (psf) != psf->datalength + psf->dataoffset)
                                                psf_log_printf (psf, "  *** psf_fseek past end error ***\n") ;
-                                               break ;
                                        } ;
                                break ;
 
@@ -318,8 +349,6 @@ rf64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                                        if (isprint ((marker >> 24) & 0xFF) && isprint ((marker >> 16) & 0xFF)
                                                && isprint ((marker >> 8) & 0xFF) && isprint (marker & 0xFF))
                                        {       psf_log_printf (psf, "*** %M : %d (unknown marker)\n", marker, chunk_size) ;
-                                               if (chunk_size < 8)
-                                                       done = SF_TRUE ;
                                                psf_binheader_readf (psf, "j", chunk_size) ;
                                                break ;
                                                } ;
@@ -348,7 +377,7 @@ rf64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                } ;
 
        if (psf->dataoffset <= 0)
-               return SFE_WAV_NO_DATA ;
+               return SFE_RF64_NO_DATA ;
 
        if (psf->sf.channels < 1)
                return SFE_CHANNEL_COUNT_ZERO ;
@@ -440,7 +469,7 @@ rf64_read_header (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                } ;
 
        if (wpriv->fmt_is_broken)
-               wav_w64_analyze (psf) ;
+               wavlike_analyze (psf) ;
 
        /* Only set the format endian-ness if its non-standard big-endian. */
        if (psf->endian == SF_ENDIAN_BIG)
@@ -454,9 +483,11 @@ static const EXT_SUBFORMAT MSGUID_SUBTYPE_PCM =
 {      0x00000001, 0x0000, 0x0010, {   0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 }
 } ;
 
+#if 0
 static const EXT_SUBFORMAT MSGUID_SUBTYPE_MS_ADPCM =
 {      0x00000002, 0x0000, 0x0010, {   0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 }
 } ;
+#endif
 
 static const EXT_SUBFORMAT MSGUID_SUBTYPE_IEEE_FLOAT =
 {      0x00000003, 0x0000, 0x0010, {   0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 }
@@ -485,7 +516,7 @@ static const EXT_SUBFORMAT MSGUID_SUBTYPE_AMBISONIC_B_FORMAT_IEEE_FLOAT =
 
 static int
 rf64_write_fmt_chunk (SF_PRIVATE *psf)
-{      WAV_PRIVATE     *wpriv ;
+{      WAVLIKE_PRIVATE *wpriv ;
        int subformat, fmt_size ;
 
        if ((wpriv = psf->container_data) == NULL)
@@ -571,22 +602,22 @@ rf64_write_fmt_chunk (SF_PRIVATE *psf)
                case SF_FORMAT_PCM_16 :
                case SF_FORMAT_PCM_24 :
                case SF_FORMAT_PCM_32 :
-                       wavex_write_guid (psf, wpriv->wavex_ambisonic == SF_AMBISONIC_NONE ?
+                       wavlike_write_guid (psf, wpriv->wavex_ambisonic == SF_AMBISONIC_NONE ?
                                                &MSGUID_SUBTYPE_PCM : &MSGUID_SUBTYPE_AMBISONIC_B_FORMAT_PCM) ;
                        break ;
 
                case SF_FORMAT_FLOAT :
                case SF_FORMAT_DOUBLE :
-                       wavex_write_guid (psf, wpriv->wavex_ambisonic == SF_AMBISONIC_NONE ?
+                       wavlike_write_guid (psf, wpriv->wavex_ambisonic == SF_AMBISONIC_NONE ?
                                                &MSGUID_SUBTYPE_IEEE_FLOAT : &MSGUID_SUBTYPE_AMBISONIC_B_FORMAT_IEEE_FLOAT) ;
                        break ;
 
                case SF_FORMAT_ULAW :
-                       wavex_write_guid (psf, &MSGUID_SUBTYPE_MULAW) ;
+                       wavlike_write_guid (psf, &MSGUID_SUBTYPE_MULAW) ;
                        break ;
 
                case SF_FORMAT_ALAW :
-                       wavex_write_guid (psf, &MSGUID_SUBTYPE_ALAW) ;
+                       wavlike_write_guid (psf, &MSGUID_SUBTYPE_ALAW) ;
                        break ;
 
                default : return SFE_UNIMPLEMENTED ;
@@ -598,9 +629,9 @@ rf64_write_fmt_chunk (SF_PRIVATE *psf)
 
 static int
 rf64_write_header (SF_PRIVATE *psf, int calc_length)
-{      sf_count_t      current ;
+{      sf_count_t      current, pad_size ;
        int             error = 0, has_data = SF_FALSE, add_fact_chunk = 0 ;
-       WAV_PRIVATE     *wpriv ;
+       WAVLIKE_PRIVATE *wpriv ;
 
        if ((wpriv = psf->container_data) == NULL)
                return SFE_INTERNAL ;
@@ -622,8 +653,8 @@ rf64_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        if (wpriv->rf64_downgrade && psf->filelength < RIFF_DOWNGRADE_BYTES)
@@ -660,25 +691,23 @@ rf64_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        if (psf->broadcast_16k != NULL)
-               wav_write_bext_chunk (psf) ;
+               wavlike_write_bext_chunk (psf) ;
 
        if (psf->cart_16k != NULL)
-               wav_write_cart_chunk (psf) ;
-#if 0
+               wavlike_write_cart_chunk (psf) ;
+
        /* The LIST/INFO chunk. */
        if (psf->strings.flags & SF_STR_LOCATE_START)
-               wav_write_strings (psf, SF_STR_LOCATE_START) ;
+               wavlike_write_strings (psf, SF_STR_LOCATE_START) ;
 
        if (psf->peak_info != NULL && psf->peak_info->peak_loc == SF_PEAK_START)
-       {       psf_binheader_writef (psf, "m4", PEAK_MARKER, WAV_PEAK_CHUNK_SIZE (psf->sf.channels)) ;
-               psf_binheader_writef (psf, "44", 1, time (NULL)) ;
-               for (k = 0 ; k < psf->sf.channels ; k++)
-                       psf_binheader_writef (psf, "ft8", (float) psf->peak_info->peaks [k].value, psf->peak_info->peaks [k].position) ;
-               } ;
+               wavlike_write_peak_chunk (psf) ;
 
-//     if (psf->broadcast_info != NULL)
-//             wav_write_bext_chunk (psf) ;
+       /* Write custom headers. */
+       if (psf->wchunks.used > 0)
+               wavlike_write_custom_chunks (psf) ;
 
+#if 0
        if (psf->instrument != NULL)
        {       int             tmp ;
                double  dtune = (double) (0x40000000) / 25.0 ;
@@ -704,29 +733,27 @@ rf64_write_header (SF_PRIVATE *psf, int calc_length)
                        } ;
                } ;
 
-       if (psf->headindex + 8 < psf->dataoffset)
-       {       /* Add PAD data if necessary. */
-               k = psf->dataoffset - 16 - psf->headindex ;
-               psf_binheader_writef (psf, "m4z", PAD_MARKER, k, make_size_t (k)) ;
-               } ;
-
 #endif
 
+       pad_size = psf->dataoffset - 16 - psf->header.indx ;
+       if (pad_size >= 0)
+               psf_binheader_writef (psf, "m4z", PAD_MARKER, pad_size, make_size_t (pad_size)) ;
+
        if (wpriv->rf64_downgrade && (psf->filelength < RIFF_DOWNGRADE_BYTES))
                psf_binheader_writef (psf, "tm8", data_MARKER, psf->datalength) ;
        else
                psf_binheader_writef (psf, "m4", data_MARKER, 0xffffffff) ;
 
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
        if (psf->error)
                return psf->error ;
 
-       if (has_data && psf->dataoffset != psf->headindex)
-       {       printf ("Oooops : has_data && psf->dataoffset != psf->headindex\n") ;
+       if (has_data && psf->dataoffset != psf->header.indx)
+       {       psf_log_printf (psf, "Oooops : has_data && psf->dataoffset != psf->header.indx\n") ;
                return psf->error = SFE_INTERNAL ;
                } ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (NOT (has_data))
                psf_fseek (psf, psf->dataoffset, SEEK_SET) ;
@@ -737,12 +764,41 @@ rf64_write_header (SF_PRIVATE *psf, int calc_length)
 } /* rf64_write_header */
 
 static int
+rf64_write_tailer (SF_PRIVATE *psf)
+{
+       /* Reset the current header buffer length to zero. */
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
+
+       if (psf->bytewidth > 0 && psf->sf.seekable == SF_TRUE)
+       {       psf->datalength = psf->sf.frames * psf->bytewidth * psf->sf.channels ;
+               psf->dataend = psf->dataoffset + psf->datalength ;
+               } ;
+
+       if (psf->dataend > 0)
+               psf_fseek (psf, psf->dataend, SEEK_SET) ;
+       else
+               psf->dataend = psf_fseek (psf, 0, SEEK_END) ;
+
+       if (psf->dataend & 1)
+               psf_binheader_writef (psf, "z", 1) ;
+
+       if (psf->strings.flags & SF_STR_LOCATE_END)
+               wavlike_write_strings (psf, SF_STR_LOCATE_END) ;
+
+       /* Write the tailer. */
+       if (psf->header.indx > 0)
+               psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
+
+       return 0 ;
+} /* rf64_write_tailer */
+
+static int
 rf64_close (SF_PRIVATE *psf)
 {
        if (psf->file.mode == SFM_WRITE || psf->file.mode == SFM_RDWR)
-       {       // rf64_write_tailer (psf) ;
-
-               psf->write_header (psf, SF_TRUE) ;
+       {       rf64_write_tailer (psf) ;
+               rf64_write_header (psf, SF_TRUE) ;
                } ;
 
        return 0 ;
@@ -750,7 +806,7 @@ rf64_close (SF_PRIVATE *psf)
 
 static int
 rf64_command (SF_PRIVATE *psf, int command, void * UNUSED (data), int datasize)
-{      WAV_PRIVATE     *wpriv ;
+{      WAVLIKE_PRIVATE *wpriv ;
 
        if ((wpriv = psf->container_data) == NULL)
                return SFE_INTERNAL ;
@@ -771,7 +827,7 @@ rf64_command (SF_PRIVATE *psf, int command, void * UNUSED (data), int datasize)
                        return wpriv->wavex_ambisonic ;
 
                case SFC_SET_CHANNEL_MAP_INFO :
-                       wpriv->wavex_channelmask = wavex_gen_channel_mask (psf->channel_map, psf->sf.channels) ;
+                       wpriv->wavex_channelmask = wavlike_gen_channel_mask (psf->channel_map, psf->sf.channels) ;
                        return (wpriv->wavex_channelmask != 0) ;
 
                case SFC_RF64_AUTO_DOWNGRADE :
@@ -786,3 +842,46 @@ rf64_command (SF_PRIVATE *psf, int command, void * UNUSED (data), int datasize)
        return 0 ;
 } /* rf64_command */
 
+static int
+rf64_set_chunk (SF_PRIVATE *psf, const SF_CHUNK_INFO * chunk_info)
+{      return psf_save_write_chunk (&psf->wchunks, chunk_info) ;
+} /* rf64_set_chunk */
+
+static SF_CHUNK_ITERATOR *
+rf64_next_chunk_iterator (SF_PRIVATE *psf, SF_CHUNK_ITERATOR * iterator)
+{      return psf_next_chunk_iterator (&psf->rchunks, iterator) ;
+} /* rf64_next_chunk_iterator */
+
+static int
+rf64_get_chunk_size (SF_PRIVATE *psf, const SF_CHUNK_ITERATOR * iterator, SF_CHUNK_INFO * chunk_info)
+{      int indx ;
+
+       if ((indx = psf_find_read_chunk_iterator (&psf->rchunks, iterator)) < 0)
+               return SFE_UNKNOWN_CHUNK ;
+
+       chunk_info->datalen = psf->rchunks.chunks [indx].len ;
+
+       return SFE_NO_ERROR ;
+} /* rf64_get_chunk_size */
+
+static int
+rf64_get_chunk_data (SF_PRIVATE *psf, const SF_CHUNK_ITERATOR * iterator, SF_CHUNK_INFO * chunk_info)
+{      int indx ;
+       sf_count_t pos ;
+
+       if ((indx = psf_find_read_chunk_iterator (&psf->rchunks, iterator)) < 0)
+               return SFE_UNKNOWN_CHUNK ;
+
+       if (chunk_info->data == NULL)
+               return SFE_BAD_CHUNK_DATA_PTR ;
+
+       chunk_info->id_size = psf->rchunks.chunks [indx].id_size ;
+       memcpy (chunk_info->id, psf->rchunks.chunks [indx].id, sizeof (chunk_info->id) / sizeof (*chunk_info->id)) ;
+
+       pos = psf_ftell (psf) ;
+       psf_fseek (psf, psf->rchunks.chunks [indx].offset, SEEK_SET) ;
+       psf_fread (chunk_info->data, SF_MIN (chunk_info->datalen, psf->rchunks.chunks [indx].len), 1, psf) ;
+       psf_fseek (psf, pos, SEEK_SET) ;
+
+       return SFE_NO_ERROR ;
+} /* rf64_get_chunk_data */
index a70a1f1..44b5c1b 100644 (file)
--- a/src/sd2.c
+++ b/src/sd2.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2001-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2001-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2004 Paavo Jumppanen
 **
 ** This program is free software; you can redistribute it and/or modify
@@ -187,47 +187,6 @@ sd2_close  (SF_PRIVATE *psf)
 /*------------------------------------------------------------------------------
 */
 
-static inline void
-write_char (unsigned char * data, int offset, char value)
-{      data [offset] = value ;
-} /* write_char */
-
-static inline void
-write_short (unsigned char * data, int offset, short value)
-{      data [offset] = value >> 8 ;
-       data [offset + 1] = value ;
-} /* write_char */
-
-static inline void
-write_int (unsigned char * data, int offset, int value)
-{      data [offset] = value >> 24 ;
-       data [offset + 1] = value >> 16 ;
-       data [offset + 2] = value >> 8 ;
-       data [offset + 3] = value ;
-} /* write_int */
-
-static inline void
-write_marker (unsigned char * data, int offset, int value)
-{
-       if (CPU_IS_BIG_ENDIAN)
-       {       data [offset] = value >> 24 ;
-               data [offset + 1] = value >> 16 ;
-               data [offset + 2] = value >> 8 ;
-               data [offset + 3] = value ;
-               }
-       else
-       {       data [offset] = value ;
-               data [offset + 1] = value >> 8 ;
-               data [offset + 2] = value >> 16 ;
-               data [offset + 3] = value >> 24 ;
-               } ;
-} /* write_marker */
-
-static void
-write_str (unsigned char * data, int offset, const char * buffer, int buffer_len)
-{      memcpy (data + offset, buffer, buffer_len) ;
-} /* write_str */
-
 static int
 sd2_write_rsrc_fork (SF_PRIVATE *psf, int UNUSED (calc_length))
 {      SD2_RSRC rsrc ;
@@ -248,8 +207,8 @@ sd2_write_rsrc_fork (SF_PRIVATE *psf, int UNUSED (calc_length))
        rsrc.sample_size = psf->bytewidth ;
        rsrc.channels = psf->sf.channels ;
 
-       rsrc.rsrc_data = psf->header ;
-       rsrc.rsrc_len = sizeof (psf->header) ;
+       rsrc.rsrc_data = psf->header.ptr ;
+       rsrc.rsrc_len = psf->header.len ;
        memset (rsrc.rsrc_data, 0xea, rsrc.rsrc_len) ;
 
        snprintf (str_rsrc [0].value, sizeof (str_rsrc [0].value), "_%d", rsrc.sample_size) ;
@@ -279,85 +238,65 @@ sd2_write_rsrc_fork (SF_PRIVATE *psf, int UNUSED (calc_length))
        rsrc.map_offset = rsrc.data_offset + rsrc.data_length ;
 
        /* Very start of resource fork. */
-       write_int (rsrc.rsrc_data, 0, rsrc.data_offset) ;
-       write_int (rsrc.rsrc_data, 4, rsrc.map_offset) ;
-       write_int (rsrc.rsrc_data, 8, rsrc.data_length) ;
+       psf_binheader_writef (psf, "E444", rsrc.data_offset, rsrc.map_offset, rsrc.data_length) ;
 
-       write_char (rsrc.rsrc_data, 0x30, strlen (psf->file.name.c)) ;
-       write_str (rsrc.rsrc_data, 0x31, psf->file.name.c, strlen (psf->file.name.c)) ;
-
-       write_short (rsrc.rsrc_data, 0x50, 0) ;
-       write_marker (rsrc.rsrc_data, 0x52, Sd2f_MARKER) ;
-       write_marker (rsrc.rsrc_data, 0x56, lsf1_MARKER) ;
+       psf_binheader_writef (psf, "Eop", make_size_t (0x30), psf->file.name.c) ;
+       psf_binheader_writef (psf, "Eo2mm", make_size_t (0x50), 0, Sd2f_MARKER, lsf1_MARKER) ;
 
        /* Very start of resource map. */
-       write_int (rsrc.rsrc_data, rsrc.map_offset + 0, rsrc.data_offset) ;
-       write_int (rsrc.rsrc_data, rsrc.map_offset + 4, rsrc.map_offset) ;
-       write_int (rsrc.rsrc_data, rsrc.map_offset + 8, rsrc.data_length) ;
+       psf_binheader_writef (psf, "E444", make_size_t (rsrc.map_offset), rsrc.data_offset, rsrc.map_offset, rsrc.data_length) ;
 
        /* These I don't currently understand. */
        if (1)
-       {       write_char (rsrc.rsrc_data, rsrc.map_offset+ 16, 1) ;
-               /* Next resource map. */
-               write_int (rsrc.rsrc_data, rsrc.map_offset + 17, 0x12345678) ;
-               /* File ref number. */
-               write_short (rsrc.rsrc_data, rsrc.map_offset + 21, 0xabcd) ;
-               /* Fork attributes. */
-               write_short (rsrc.rsrc_data, rsrc.map_offset + 23, 0) ;
+       {       psf_binheader_writef (psf, "Eo1422", make_size_t (rsrc.map_offset + 16), 1, 0x12345678, 0xabcd, 0) ;
                } ;
 
        /* Resource type offset. */
        rsrc.type_offset = rsrc.map_offset + 30 ;
-       write_short (rsrc.rsrc_data, rsrc.map_offset + 24, rsrc.type_offset - rsrc.map_offset - 2) ;
+       psf_binheader_writef (psf, "Eo2", make_size_t (rsrc.map_offset + 24), rsrc.type_offset - rsrc.map_offset - 2) ;
 
        /* Type index max. */
        rsrc.type_count = 2 ;
-       write_short (rsrc.rsrc_data, rsrc.map_offset + 28, rsrc.type_count - 1) ;
+       psf_binheader_writef (psf, "Eo2", make_size_t (rsrc.map_offset + 28), rsrc.type_count - 1) ;
 
        rsrc.item_offset = rsrc.type_offset + rsrc.type_count * 8 ;
 
        rsrc.str_count = ARRAY_LEN (str_rsrc) ;
        rsrc.string_offset = rsrc.item_offset + (rsrc.str_count + 1) * 12 - rsrc.map_offset ;
-       write_short (rsrc.rsrc_data, rsrc.map_offset + 26, rsrc.string_offset) ;
+       psf_binheader_writef (psf, "Eo2", make_size_t (rsrc.map_offset + 26), rsrc.string_offset) ;
 
        /* Write 'STR ' resource type. */
        rsrc.str_count = 3 ;
-       write_marker (rsrc.rsrc_data, rsrc.type_offset, STR_MARKER) ;
-       write_short (rsrc.rsrc_data, rsrc.type_offset + 4, rsrc.str_count - 1) ;
-       write_short (rsrc.rsrc_data, rsrc.type_offset + 6, 0x12) ;
+       psf_binheader_writef (psf, "Eom22", make_size_t (rsrc.type_offset), STR_MARKER, rsrc.str_count - 1, 0x12) ;
 
        /* Write 'sdML' resource type. */
-       write_marker (rsrc.rsrc_data, rsrc.type_offset + 8, sdML_MARKER) ;
-       write_short (rsrc.rsrc_data, rsrc.type_offset + 12, 0) ;
-       write_short (rsrc.rsrc_data, rsrc.type_offset + 14, 0x36) ;
+       psf_binheader_writef (psf, "Em22", sdML_MARKER, 0, 0x36) ;
 
        str_offset = rsrc.map_offset + rsrc.string_offset ;
        next_str = 0 ;
        data_offset = rsrc.data_offset ;
        for (k = 0 ; k < ARRAY_LEN (str_rsrc) ; k++)
-       {       write_str (rsrc.rsrc_data, str_offset, str_rsrc [k].name, strlen (str_rsrc [k].name)) ;
-
-               write_short (rsrc.rsrc_data, rsrc.item_offset + k * 12, str_rsrc [k].id) ;
-               write_short (rsrc.rsrc_data, rsrc.item_offset + k * 12 + 2, next_str) ;
+       {       psf_binheader_writef (psf, "Eop", make_size_t (str_offset), str_rsrc [k].name) ;
+               psf_binheader_writef (psf, "Eo22", make_size_t (rsrc.item_offset + k * 12), str_rsrc [k].id, next_str) ;
 
                str_offset += strlen (str_rsrc [k].name) ;
                next_str += strlen (str_rsrc [k].name) ;
 
-               write_int (rsrc.rsrc_data, rsrc.item_offset + k * 12 + 4, data_offset - rsrc.data_offset) ;
+               psf_binheader_writef (psf, "Eo4", make_size_t (rsrc.item_offset + k * 12 + 4), data_offset - rsrc.data_offset) ;
+               psf_binheader_writef (psf, "Eo4", make_size_t (data_offset), str_rsrc [k].value_len) ;
 
-               write_int (rsrc.rsrc_data, data_offset, str_rsrc [k].value_len) ;
-               write_str (rsrc.rsrc_data, data_offset + 4, str_rsrc [k].value, str_rsrc [k].value_len) ;
+               psf_binheader_writef (psf, "Eob", make_size_t (data_offset + 4), str_rsrc [k].value, make_size_t (str_rsrc [k].value_len)) ;
                data_offset += 4 + str_rsrc [k].value_len ;
                } ;
 
        /* Finally, calculate and set map length. */
        rsrc.map_length = str_offset - rsrc.map_offset ;
-       write_int (rsrc.rsrc_data, 12, rsrc.map_length) ;
-       write_int (rsrc.rsrc_data, rsrc.map_offset + 12, rsrc.map_length) ;
+       psf_binheader_writef (psf, "Eo4o4", make_size_t (12), rsrc.map_length,
+                                                       make_size_t (rsrc.map_offset + 12), rsrc.map_length) ;
 
-       rsrc.rsrc_len = rsrc.map_offset + rsrc.map_length ;
+       psf->header.indx = rsrc.map_offset + rsrc.map_length ;
 
-       psf_fwrite (rsrc.rsrc_data, rsrc.rsrc_len, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        psf_use_rsrc (psf, SF_FALSE) ;
 
@@ -439,13 +378,14 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf)
        rsrc.rsrc_len = psf_get_filelen (psf) ;
        psf_log_printf (psf, "Resource length : %d (0x%04X)\n", rsrc.rsrc_len, rsrc.rsrc_len) ;
 
-       if (rsrc.rsrc_len > SIGNED_SIZEOF (psf->header))
+       if (rsrc.rsrc_len > psf->header.len)
        {       rsrc.rsrc_data = calloc (1, rsrc.rsrc_len) ;
                rsrc.need_to_free_rsrc_data = SF_TRUE ;
                }
        else
        {
-               rsrc.rsrc_data = psf->header ;
+               rsrc.rsrc_data = psf->header.ptr ;
+               // rsrc.rsrc_len > psf->header.len ;
                rsrc.need_to_free_rsrc_data = SF_FALSE ;
                } ;
 
@@ -453,7 +393,7 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf)
        psf_fread (rsrc.rsrc_data, rsrc.rsrc_len, 1, psf) ;
 
        /* Reset the header storage because we have changed to the rsrcdes. */
-       psf->headindex = psf->headend = rsrc.rsrc_len ;
+       psf->header.indx = psf->header.end = rsrc.rsrc_len ;
 
        rsrc.data_offset = read_rsrc_int (&rsrc, 0) ;
        rsrc.map_offset = read_rsrc_int (&rsrc, 4) ;
index 28f854a..77c2313 100644 (file)
--- a/src/sds.c
+++ b/src/sds.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2016 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
@@ -366,8 +366,8 @@ sds_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
 
        if (psf->is_pipe == SF_FALSE)
                psf_fseek (psf, 0, SEEK_SET) ;
@@ -399,12 +399,12 @@ sds_write_header (SF_PRIVATE *psf, int calc_length)
        psf_binheader_writef (psf, "e33311", data_length, sustain_loop_start, sustain_loop_end, loop_type, 0xF7) ;
 
        /* Header construction complete so write it out. */
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
        psf->datalength = psds->write_block * SDS_BLOCK_SIZE ;
 
        if (current > 0)
index e94363f..b2f553a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -118,6 +118,9 @@ ENDSWAP_64 (uint64_t x)
        #define H2BE_16(x)                      ENDSWAP_16 (x)
        #define H2BE_32(x)                      ENDSWAP_32 (x)
 
+       #define H2LE_16(x)                      (x)
+       #define H2LE_32(x)                      (x)
+
 #elif (CPU_IS_BIG_ENDIAN == 1)
        #define LE2H_16(x)                      ENDSWAP_16 (x)
        #define LE2H_32(x)                      ENDSWAP_32 (x)
index cc74f97..b76bfe9 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2017 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
@@ -106,6 +106,7 @@ ErrorStruct SndfileErrors [] =
        {       SFE_BAD_ENDIAN                  , "Bad endian-ness. Try default endian-ness" },
        {       SFE_CHANNEL_COUNT_ZERO  , "Channel count is zero." },
        {       SFE_CHANNEL_COUNT               , "Too many channels specified." },
+       {       SFE_CHANNEL_COUNT_BAD   , "Bad channel count." },
 
        {       SFE_BAD_SEEK                    , "Internal psf_fseek() failed." },
        {       SFE_NOT_SEEKABLE                , "Seek attempted on unseekable file type." },
@@ -170,7 +171,7 @@ ErrorStruct SndfileErrors [] =
        {       SFE_RAW_READ_BAD_SPEC   , "Error while opening RAW file for read. Must specify format and channels.\n"
                                                                        "Possibly trying to open unsupported format." },
        {       SFE_RAW_BAD_BITWIDTH    , "Error. RAW file bitwidth must be a multiple of 8." },
-       {       SFE_RAW_BAD_FORMAT              , "Error. Bad format field in SF_INFO struct when openning a RAW file for read." },
+       {       SFE_RAW_BAD_FORMAT              , "Error. Bad format field in SF_INFO struct when opening a RAW file for read." },
 
        {       SFE_PAF_NO_MARKER               , "Error in PAF file, no marker." },
        {       SFE_PAF_VERSION                 , "Error in PAF file, bad version." },
@@ -201,7 +202,7 @@ ErrorStruct SndfileErrors [] =
 
        {       SFE_IRCAM_NO_MARKER             , "Error in IRCAM file, bad IRCAM marker." },
        {       SFE_IRCAM_BAD_CHANNELS  , "Error in IRCAM file, bad channel count." },
-       {       SFE_IRCAM_UNKNOWN_FORMAT, "Error in IRCAM file, unknow encoding format." },
+       {       SFE_IRCAM_UNKNOWN_FORMAT, "Error in IRCAM file, unknown encoding format." },
 
        {       SFE_W64_64_BIT                  , "Error in W64 file, file contains 64 bit offset." },
        {       SFE_W64_NO_RIFF                 , "Error in W64 file. No 'riff' chunk marker." },
@@ -241,7 +242,7 @@ ErrorStruct SndfileErrors [] =
 
        {       SFE_FLAC_BAD_HEADER             , "Error : bad flac header." },
        {       SFE_FLAC_NEW_DECODER    , "Error : problem while creating flac decoder." },
-       {       SFE_FLAC_INIT_DECODER   , "Error : problem while initialization of the flac decoder." },
+       {       SFE_FLAC_INIT_DECODER   , "Error : problem with initialization of the flac decoder." },
        {       SFE_FLAC_LOST_SYNC              , "Error : flac decoder lost sync." },
        {       SFE_FLAC_BAD_SAMPLE_RATE, "Error : flac does not support this sample rate." },
        {       SFE_FLAC_UNKOWN_ERROR   , "Error : unknown error in flac decoder." },
@@ -255,6 +256,9 @@ ErrorStruct SndfileErrors [] =
        {       SFE_VORBIS_ENCODER_BUG  , "Error : Sample rate chosen is known to trigger a Vorbis encoder bug on this CPU." },
 
        {       SFE_RF64_NOT_RF64               , "Error : Not an RF64 file." },
+       {       SFE_RF64_PEAK_B4_FMT    , "Error in RF64 file. 'PEAK' chunk found before 'fmt ' chunk." },
+       {       SFE_RF64_NO_DATA                , "Error in RF64 file. No 'data' chunk marker." },
+
        {       SFE_ALAC_FAIL_TMPFILE   , "Error : Failed to open tmp file for ALAC encoding." },
 
        {       SFE_BAD_CHUNK_PTR               , "Error : Bad SF_CHUNK_INFO pointer." },
@@ -263,7 +267,7 @@ ErrorStruct SndfileErrors [] =
        {       SFE_BAD_CHUNK_MARKER    , "Error : Bad chunk marker." },
        {       SFE_BAD_CHUNK_DATA_PTR  , "Error : Bad data pointer in SF_CHUNK_INFO struct." },
        {       SFE_FILENAME_TOO_LONG   , "Error : Supplied filename too long." },
-
+       {       SFE_NEGATIVE_RW_LEN             , "Error : Length parameter passed to read/write is negative." },
 
        {       SFE_MAX_ERROR                   , "Maximum error number." },
        {       SFE_MAX_ERROR + 1               , NULL }
@@ -315,6 +319,7 @@ static char sf_syserr [SF_SYSERR_LEN] = { 0 } ;
 **     Public functions.
 */
 
+SNDFILE_API
 SNDFILE*
 sf_open        (const char *path, int mode, SF_INFO *sfinfo)
 {      SF_PRIVATE      *psf ;
@@ -322,7 +327,7 @@ sf_open     (const char *path, int mode, SF_INFO *sfinfo)
        /* Ultimate sanity check. */
        assert (sizeof (sf_count_t) == 8) ;
 
-       if ((psf = calloc (1, sizeof (SF_PRIVATE))) == NULL)
+       if ((psf = psf_allocate ()) == NULL)
        {       sf_errno = SFE_MALLOC_FAILED ;
                return  NULL ;
                } ;
@@ -345,6 +350,7 @@ sf_open     (const char *path, int mode, SF_INFO *sfinfo)
        return psf_open_file (psf, sfinfo) ;
 } /* sf_open */
 
+SNDFILE_API
 SNDFILE*
 sf_open_fd     (int fd, int mode, SF_INFO *sfinfo, int close_desc)
 {      SF_PRIVATE      *psf ;
@@ -354,7 +360,7 @@ sf_open_fd  (int fd, int mode, SF_INFO *sfinfo, int close_desc)
                return  NULL ;
                } ;
 
-       if ((psf = calloc (1, sizeof (SF_PRIVATE))) == NULL)
+       if ((psf = psf_allocate ()) == NULL)
        {       sf_errno = SFE_MALLOC_FAILED ;
                return  NULL ;
                } ;
@@ -373,6 +379,7 @@ sf_open_fd  (int fd, int mode, SF_INFO *sfinfo, int close_desc)
        return psf_open_file (psf, sfinfo) ;
 } /* sf_open_fd */
 
+SNDFILE_API
 SNDFILE*
 sf_open_virtual        (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data)
 {      SF_PRIVATE      *psf ;
@@ -396,7 +403,7 @@ sf_open_virtual     (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user
                return NULL ;
                } ;
 
-       if ((psf = calloc (1, sizeof (SF_PRIVATE))) == NULL)
+       if ((psf = psf_allocate ()) == NULL)
        {       sf_errno = SFE_MALLOC_FAILED ;
                return  NULL ;
                } ;
@@ -412,6 +419,7 @@ sf_open_virtual     (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user
        return psf_open_file (psf, sfinfo) ;
 } /* sf_open_virtual */
 
+SNDFILE_API
 int
 sf_close       (SNDFILE *sndfile)
 {      SF_PRIVATE      *psf ;
@@ -421,6 +429,7 @@ sf_close    (SNDFILE *sndfile)
        return psf_close (psf) ;
 } /* sf_close */
 
+SNDFILE_API
 void
 sf_write_sync  (SNDFILE *sndfile)
 {      SF_PRIVATE      *psf ;
@@ -436,6 +445,7 @@ sf_write_sync       (SNDFILE *sndfile)
 /*==============================================================================
 */
 
+SNDFILE_API
 const char*
 sf_error_number        (int errnum)
 {      static const char *bad_errnum =
@@ -458,6 +468,7 @@ sf_error_number     (int errnum)
        return bad_errnum ;
 } /* sf_error_number */
 
+SNDFILE_API
 const char*
 sf_strerror (SNDFILE *sndfile)
 {      SF_PRIVATE      *psf = NULL ;
@@ -486,6 +497,7 @@ sf_strerror (SNDFILE *sndfile)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 int
 sf_error (SNDFILE *sndfile)
 {      SF_PRIVATE      *psf ;
@@ -504,6 +516,7 @@ sf_error (SNDFILE *sndfile)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 int
 sf_perror (SNDFILE *sndfile)
 {      SF_PRIVATE      *psf ;
@@ -525,6 +538,7 @@ sf_perror (SNDFILE *sndfile)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 int
 sf_error_str (SNDFILE *sndfile, char *str, size_t maxlen)
 {      SF_PRIVATE      *psf ;
@@ -548,6 +562,7 @@ sf_error_str (SNDFILE *sndfile, char *str, size_t maxlen)
 /*==============================================================================
 */
 
+SNDFILE_API
 int
 sf_format_check        (const SF_INFO *info)
 {      int     subformat, endian ;
@@ -857,6 +872,7 @@ sf_format_check     (const SF_INFO *info)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 const char *
 sf_version_string (void)
 {
@@ -871,6 +887,7 @@ sf_version_string (void)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 int
 sf_command     (SNDFILE *sndfile, int command, void *data, int datasize)
 {      SF_PRIVATE *psf = (SF_PRIVATE *) sndfile ;
@@ -982,6 +999,7 @@ sf_command  (SNDFILE *sndfile, int command, void *data, int datasize)
                                        case SF_FORMAT_CAF :
                                        case SF_FORMAT_WAV :
                                        case SF_FORMAT_WAVEX :
+                                       case SF_FORMAT_RF64 :
                                                break ;
 
                                        default :
@@ -1230,6 +1248,43 @@ sf_command       (SNDFILE *sndfile, int command, void *data, int datasize)
                                } ;
                        return cart_var_get (psf, data, datasize) ;
 
+               case SFC_GET_CUE_COUNT :
+                       if (datasize != sizeof (uint32_t) || data == NULL)
+                       {       psf->error = SFE_BAD_COMMAND_PARAM ;
+                               return SF_FALSE ;
+                               } ;
+                       if (psf->cues != NULL)
+                       {       *((uint32_t *) data) = psf->cues->cue_count ;
+                               return SF_TRUE ;
+                               } ;
+                       return SF_FALSE ;
+
+               case SFC_GET_CUE :
+                       if (datasize != sizeof (SF_CUES) || data == NULL)
+                       {       psf->error = SFE_BAD_COMMAND_PARAM ;
+                               return SF_FALSE ;
+                               } ;
+                       if (psf->cues == NULL)
+                               return SF_FALSE ;
+                       psf_get_cues (psf, data, datasize) ;
+                       return SF_TRUE ;
+
+               case SFC_SET_CUE :
+                       if (psf->have_written)
+                       {       psf->error = SFE_CMD_HAS_DATA ;
+                               return SF_FALSE ;
+                               } ;
+                       if (datasize != sizeof (SF_CUES) || data == NULL)
+                       {       psf->error = SFE_BAD_COMMAND_PARAM ;
+                               return SF_FALSE ;
+                               } ;
+
+                       if (psf->cues == NULL && (psf->cues = psf_cues_dup (data)) == NULL)
+                       {       psf->error = SFE_MALLOC_FAILED ;
+                               return SF_FALSE ;
+                               } ;
+                       return SF_TRUE ;
+
                case SFC_GET_INSTRUMENT :
                        if (datasize != sizeof (SF_INSTRUMENT) || data == NULL)
                        {       psf->error = SFE_BAD_COMMAND_PARAM ;
@@ -1333,6 +1388,7 @@ sf_command        (SNDFILE *sndfile, int command, void *data, int datasize)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 sf_count_t
 sf_seek        (SNDFILE *sndfile, sf_count_t offset, int whence)
 {      SF_PRIVATE      *psf ;
@@ -1451,6 +1507,7 @@ sf_seek   (SNDFILE *sndfile, sf_count_t offset, int whence)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 const char*
 sf_get_string (SNDFILE *sndfile, int str_type)
 {      SF_PRIVATE      *psf ;
@@ -1463,6 +1520,7 @@ sf_get_string (SNDFILE *sndfile, int str_type)
        return psf_get_string (psf, str_type) ;
 } /* sf_get_string */
 
+SNDFILE_API
 int
 sf_set_string (SNDFILE *sndfile, int str_type, const char* str)
 {      SF_PRIVATE      *psf ;
@@ -1475,6 +1533,7 @@ sf_set_string (SNDFILE *sndfile, int str_type, const char* str)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 int
 sf_current_byterate (SNDFILE *sndfile)
 {      SF_PRIVATE      *psf ;
@@ -1519,12 +1578,16 @@ sf_current_byterate (SNDFILE *sndfile)
 /*==============================================================================
 */
 
+SNDFILE_API
 sf_count_t
 sf_read_raw            (SNDFILE *sndfile, void *ptr, sf_count_t bytes)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count, extra ;
        int                     bytewidth, blockwidth ;
 
+       if (bytes == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
        bytewidth = (psf->bytewidth > 0) ? psf->bytewidth : 1 ;
@@ -1568,13 +1631,22 @@ sf_read_raw             (SNDFILE *sndfile, void *ptr, sf_count_t bytes)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 sf_count_t
 sf_read_short  (SNDFILE *sndfile, short *ptr, sf_count_t len)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count, extra ;
 
+       if (len == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (len <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_WRITE)
        {       psf->error = SFE_NOT_READMODE ;
                return 0 ;
@@ -1585,7 +1657,7 @@ sf_read_short     (SNDFILE *sndfile, short *ptr, sf_count_t len)
                return 0 ;
                } ;
 
-       if (len <= 0 || psf->read_current >= psf->sf.frames)
+       if (psf->read_current >= psf->sf.frames)
        {       psf_memset (ptr, 0, len * sizeof (short)) ;
                return 0 ; /* End of file. */
                } ;
@@ -1615,19 +1687,28 @@ sf_read_short   (SNDFILE *sndfile, short *ptr, sf_count_t len)
        return count ;
 } /* sf_read_short */
 
+SNDFILE_API
 sf_count_t
 sf_readf_short         (SNDFILE *sndfile, short *ptr, sf_count_t frames)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count, extra ;
 
+       if (frames == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (frames <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_WRITE)
        {       psf->error = SFE_NOT_READMODE ;
                return 0 ;
                } ;
 
-       if (frames <= 0 || psf->read_current >= psf->sf.frames)
+       if (psf->read_current >= psf->sf.frames)
        {       psf_memset (ptr, 0, frames * psf->sf.channels * sizeof (short)) ;
                return 0 ; /* End of file. */
                } ;
@@ -1660,13 +1741,22 @@ sf_readf_short          (SNDFILE *sndfile, short *ptr, sf_count_t frames)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 sf_count_t
 sf_read_int            (SNDFILE *sndfile, int *ptr, sf_count_t len)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count, extra ;
 
+       if (len == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (len <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_WRITE)
        {       psf->error = SFE_NOT_READMODE ;
                return 0 ;
@@ -1677,7 +1767,7 @@ sf_read_int               (SNDFILE *sndfile, int *ptr, sf_count_t len)
                return 0 ;
                } ;
 
-       if (len <= 0 || psf->read_current >= psf->sf.frames)
+       if (psf->read_current >= psf->sf.frames)
        {       psf_memset (ptr, 0, len * sizeof (int)) ;
                return 0 ;
                } ;
@@ -1707,19 +1797,28 @@ sf_read_int             (SNDFILE *sndfile, int *ptr, sf_count_t len)
        return count ;
 } /* sf_read_int */
 
+SNDFILE_API
 sf_count_t
 sf_readf_int   (SNDFILE *sndfile, int *ptr, sf_count_t frames)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count, extra ;
 
+       if (frames == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (frames <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_WRITE)
        {       psf->error = SFE_NOT_READMODE ;
                return 0 ;
                } ;
 
-       if (frames <= 0 || psf->read_current >= psf->sf.frames)
+       if (psf->read_current >= psf->sf.frames)
        {       psf_memset (ptr, 0, frames * psf->sf.channels * sizeof (int)) ;
                return 0 ;
                } ;
@@ -1752,13 +1851,22 @@ sf_readf_int    (SNDFILE *sndfile, int *ptr, sf_count_t frames)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 sf_count_t
 sf_read_float  (SNDFILE *sndfile, float *ptr, sf_count_t len)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count, extra ;
 
+       if (len == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (len <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_WRITE)
        {       psf->error = SFE_NOT_READMODE ;
                return 0 ;
@@ -1769,7 +1877,7 @@ sf_read_float     (SNDFILE *sndfile, float *ptr, sf_count_t len)
                return 0 ;
                } ;
 
-       if (len <= 0 || psf->read_current >= psf->sf.frames)
+       if (psf->read_current >= psf->sf.frames)
        {       psf_memset (ptr, 0, len * sizeof (float)) ;
                return 0 ;
                } ;
@@ -1799,19 +1907,28 @@ sf_read_float   (SNDFILE *sndfile, float *ptr, sf_count_t len)
        return count ;
 } /* sf_read_float */
 
+SNDFILE_API
 sf_count_t
 sf_readf_float (SNDFILE *sndfile, float *ptr, sf_count_t frames)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count, extra ;
 
+       if (frames == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (frames <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_WRITE)
        {       psf->error = SFE_NOT_READMODE ;
                return 0 ;
                } ;
 
-       if (frames <= 0 || psf->read_current >= psf->sf.frames)
+       if (psf->read_current >= psf->sf.frames)
        {       psf_memset (ptr, 0, frames * psf->sf.channels * sizeof (float)) ;
                return 0 ;
                } ;
@@ -1844,13 +1961,22 @@ sf_readf_float  (SNDFILE *sndfile, float *ptr, sf_count_t frames)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 sf_count_t
 sf_read_double (SNDFILE *sndfile, double *ptr, sf_count_t len)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count, extra ;
 
+       if (len == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (len <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_WRITE)
        {       psf->error = SFE_NOT_READMODE ;
                return 0 ;
@@ -1861,7 +1987,7 @@ sf_read_double    (SNDFILE *sndfile, double *ptr, sf_count_t len)
                return 0 ;
                } ;
 
-       if (len <= 0 || psf->read_current >= psf->sf.frames)
+       if (psf->read_current >= psf->sf.frames)
        {       psf_memset (ptr, 0, len * sizeof (double)) ;
                return 0 ;
                } ;
@@ -1891,19 +2017,28 @@ sf_read_double  (SNDFILE *sndfile, double *ptr, sf_count_t len)
        return count ;
 } /* sf_read_double */
 
+SNDFILE_API
 sf_count_t
 sf_readf_double        (SNDFILE *sndfile, double *ptr, sf_count_t frames)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count, extra ;
 
+       if (frames == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (frames <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_WRITE)
        {       psf->error = SFE_NOT_READMODE ;
                return 0 ;
                } ;
 
-       if (frames <= 0 || psf->read_current >= psf->sf.frames)
+       if (psf->read_current >= psf->sf.frames)
        {       psf_memset (ptr, 0, frames * psf->sf.channels * sizeof (double)) ;
                return 0 ;
                } ;
@@ -1936,14 +2071,23 @@ sf_readf_double (SNDFILE *sndfile, double *ptr, sf_count_t frames)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 sf_count_t
 sf_write_raw   (SNDFILE *sndfile, const void *ptr, sf_count_t len)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count ;
        int                     bytewidth, blockwidth ;
 
+       if (len == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (len <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        bytewidth = (psf->bytewidth > 0) ? psf->bytewidth : 1 ;
        blockwidth = (psf->blockwidth > 0) ? psf->blockwidth : 1 ;
 
@@ -1962,7 +2106,9 @@ sf_write_raw      (SNDFILE *sndfile, const void *ptr, sf_count_t len)
                        return 0 ;
 
        if (psf->have_written == SF_FALSE && psf->write_header != NULL)
-               psf->write_header (psf, SF_FALSE) ;
+       {       if ((psf->error = psf->write_header (psf, SF_FALSE)))
+                       return 0 ;
+               } ;
        psf->have_written = SF_TRUE ;
 
        count = psf_fwrite (ptr, 1, len, psf) ;
@@ -1985,13 +2131,22 @@ sf_write_raw    (SNDFILE *sndfile, const void *ptr, sf_count_t len)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 sf_count_t
 sf_write_short (SNDFILE *sndfile, const short *ptr, sf_count_t len)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count ;
 
+       if (len == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (len <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_READ)
        {       psf->error = SFE_NOT_WRITEMODE ;
                return 0 ;
@@ -2012,7 +2167,9 @@ sf_write_short    (SNDFILE *sndfile, const short *ptr, sf_count_t len)
                        return 0 ;
 
        if (psf->have_written == SF_FALSE && psf->write_header != NULL)
-               psf->write_header (psf, SF_FALSE) ;
+       {       if ((psf->error = psf->write_header (psf, SF_FALSE)))
+                       return 0 ;
+               } ;
        psf->have_written = SF_TRUE ;
 
        count = psf->write_short (psf, ptr, len) ;
@@ -2032,13 +2189,22 @@ sf_write_short  (SNDFILE *sndfile, const short *ptr, sf_count_t len)
        return count ;
 } /* sf_write_short */
 
+SNDFILE_API
 sf_count_t
 sf_writef_short        (SNDFILE *sndfile, const short *ptr, sf_count_t frames)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count ;
 
+       if (frames == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (frames <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_READ)
        {       psf->error = SFE_NOT_WRITEMODE ;
                return 0 ;
@@ -2054,7 +2220,9 @@ sf_writef_short   (SNDFILE *sndfile, const short *ptr, sf_count_t frames)
                        return 0 ;
 
        if (psf->have_written == SF_FALSE && psf->write_header != NULL)
-               psf->write_header (psf, SF_FALSE) ;
+       {       if ((psf->error = psf->write_header (psf, SF_FALSE)))
+                       return 0 ;
+               } ;
        psf->have_written = SF_TRUE ;
 
        count = psf->write_short (psf, ptr, frames * psf->sf.channels) ;
@@ -2077,13 +2245,22 @@ sf_writef_short (SNDFILE *sndfile, const short *ptr, sf_count_t frames)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 sf_count_t
 sf_write_int   (SNDFILE *sndfile, const int *ptr, sf_count_t len)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count ;
 
+       if (len == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (len <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_READ)
        {       psf->error = SFE_NOT_WRITEMODE ;
                return 0 ;
@@ -2104,7 +2281,9 @@ sf_write_int      (SNDFILE *sndfile, const int *ptr, sf_count_t len)
                        return 0 ;
 
        if (psf->have_written == SF_FALSE && psf->write_header != NULL)
-               psf->write_header (psf, SF_FALSE) ;
+       {       if ((psf->error = psf->write_header (psf, SF_FALSE)))
+                       return 0 ;
+               } ;
        psf->have_written = SF_TRUE ;
 
        count = psf->write_int (psf, ptr, len) ;
@@ -2124,13 +2303,22 @@ sf_write_int    (SNDFILE *sndfile, const int *ptr, sf_count_t len)
        return count ;
 } /* sf_write_int */
 
+SNDFILE_API
 sf_count_t
 sf_writef_int  (SNDFILE *sndfile, const int *ptr, sf_count_t frames)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count ;
 
+       if (frames == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (frames <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_READ)
        {       psf->error = SFE_NOT_WRITEMODE ;
                return 0 ;
@@ -2146,7 +2334,9 @@ sf_writef_int     (SNDFILE *sndfile, const int *ptr, sf_count_t frames)
                        return 0 ;
 
        if (psf->have_written == SF_FALSE && psf->write_header != NULL)
-               psf->write_header (psf, SF_FALSE) ;
+       {       if ((psf->error = psf->write_header (psf, SF_FALSE)))
+                       return 0 ;
+               } ;
        psf->have_written = SF_TRUE ;
 
        count = psf->write_int (psf, ptr, frames * psf->sf.channels) ;
@@ -2169,13 +2359,22 @@ sf_writef_int   (SNDFILE *sndfile, const int *ptr, sf_count_t frames)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 sf_count_t
 sf_write_float (SNDFILE *sndfile, const float *ptr, sf_count_t len)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count ;
 
+       if (len == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (len <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_READ)
        {       psf->error = SFE_NOT_WRITEMODE ;
                return 0 ;
@@ -2196,7 +2395,9 @@ sf_write_float    (SNDFILE *sndfile, const float *ptr, sf_count_t len)
                        return 0 ;
 
        if (psf->have_written == SF_FALSE && psf->write_header != NULL)
-               psf->write_header (psf, SF_FALSE) ;
+       {       if ((psf->error = psf->write_header (psf, SF_FALSE)))
+                       return 0 ;
+               } ;
        psf->have_written = SF_TRUE ;
 
        count = psf->write_float (psf, ptr, len) ;
@@ -2216,13 +2417,22 @@ sf_write_float  (SNDFILE *sndfile, const float *ptr, sf_count_t len)
        return count ;
 } /* sf_write_float */
 
+SNDFILE_API
 sf_count_t
 sf_writef_float        (SNDFILE *sndfile, const float *ptr, sf_count_t frames)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count ;
 
+       if (frames == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (frames <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_READ)
        {       psf->error = SFE_NOT_WRITEMODE ;
                return 0 ;
@@ -2238,7 +2448,9 @@ sf_writef_float   (SNDFILE *sndfile, const float *ptr, sf_count_t frames)
                        return 0 ;
 
        if (psf->have_written == SF_FALSE && psf->write_header != NULL)
-               psf->write_header (psf, SF_FALSE) ;
+       {       if ((psf->error = psf->write_header (psf, SF_FALSE)))
+                       return 0 ;
+               } ;
        psf->have_written = SF_TRUE ;
 
        count = psf->write_float (psf, ptr, frames * psf->sf.channels) ;
@@ -2261,13 +2473,22 @@ sf_writef_float (SNDFILE *sndfile, const float *ptr, sf_count_t frames)
 /*------------------------------------------------------------------------------
 */
 
+SNDFILE_API
 sf_count_t
 sf_write_double        (SNDFILE *sndfile, const double *ptr, sf_count_t len)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count ;
 
+       if (len == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (len <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_READ)
        {       psf->error = SFE_NOT_WRITEMODE ;
                return 0 ;
@@ -2288,7 +2509,9 @@ sf_write_double   (SNDFILE *sndfile, const double *ptr, sf_count_t len)
                        return 0 ;
 
        if (psf->have_written == SF_FALSE && psf->write_header != NULL)
-               psf->write_header (psf, SF_FALSE) ;
+       {       if ((psf->error = psf->write_header (psf, SF_FALSE)))
+                       return 0 ;
+               } ;
        psf->have_written = SF_TRUE ;
 
        count = psf->write_double (psf, ptr, len) ;
@@ -2308,13 +2531,22 @@ sf_write_double (SNDFILE *sndfile, const double *ptr, sf_count_t len)
        return count ;
 } /* sf_write_double */
 
+SNDFILE_API
 sf_count_t
 sf_writef_double       (SNDFILE *sndfile, const double *ptr, sf_count_t frames)
 {      SF_PRIVATE      *psf ;
        sf_count_t      count ;
 
+       if (frames == 0)
+               return 0 ;
+
        VALIDATE_SNDFILE_AND_ASSIGN_PSF (sndfile, psf, 1) ;
 
+       if (frames <= 0)
+       {       psf->error = SFE_NEGATIVE_RW_LEN ;
+               return 0 ;
+               } ;
+
        if (psf->file.mode == SFM_READ)
        {       psf->error = SFE_NOT_WRITEMODE ;
                return 0 ;
@@ -2330,7 +2562,9 @@ sf_writef_double  (SNDFILE *sndfile, const double *ptr, sf_count_t frames)
                        return 0 ;
 
        if (psf->have_written == SF_FALSE && psf->write_header != NULL)
-               psf->write_header (psf, SF_FALSE) ;
+       {       if ((psf->error = psf->write_header (psf, SF_FALSE)))
+                       return 0 ;
+               } ;
        psf->have_written = SF_TRUE ;
 
        count = psf->write_double (psf, ptr, frames * psf->sf.channels) ;
@@ -2646,6 +2880,7 @@ psf_close (SF_PRIVATE *psf)
        psf_close_rsrc (psf) ;
 
        /* For an ISO C compliant implementation it is ok to free a NULL pointer. */
+       free (psf->header.ptr) ;
        free (psf->container_data) ;
        free (psf->codec_data) ;
        free (psf->interleave) ;
@@ -2654,6 +2889,7 @@ psf_close (SF_PRIVATE *psf)
        free (psf->broadcast_16k) ;
        free (psf->loop_info) ;
        free (psf->instrument) ;
+       free (psf->cues) ;
        free (psf->channel_map) ;
        free (psf->format_desc) ;
        free (psf->strings.storage) ;
@@ -3000,11 +3236,10 @@ psf_open_file (SF_PRIVATE *psf, SF_INFO *sfinfo)
        if (psf->file.mode == SFM_WRITE)
        {       /* Zero out these fields. */
                sfinfo->frames = 0 ;
+               sfinfo->sections = 0 ;
+               sfinfo->seekable = 0 ;
                } ;
 
-       sfinfo->sections = 0 ;
-       sfinfo->seekable = 0 ;
-
        return (SNDFILE *) psf ;
 
 error_exit :
@@ -3036,8 +3271,11 @@ error_exit :
 
 /*==============================================================================
 ** Chunk getting and setting.
+** This works for AIFF, CAF, RF64 and WAV.
+** It doesn't work for W64 because W64 uses weird GUID style chunk markers.
 */
 
+SNDFILE_API
 int
 sf_set_chunk (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info)
 {      SF_PRIVATE      *psf ;
@@ -3053,6 +3291,7 @@ sf_set_chunk (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info)
        return SFE_BAD_CHUNK_FORMAT ;
 } /* sf_set_chunk */
 
+SNDFILE_API
 SF_CHUNK_ITERATOR *
 sf_get_chunk_iterator (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info)
 {      SF_PRIVATE      *psf ;
@@ -3065,6 +3304,7 @@ sf_get_chunk_iterator (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info)
        return psf_get_chunk_iterator (psf, NULL) ;
 } /* sf_get_chunk_iterator */
 
+SNDFILE_API
 SF_CHUNK_ITERATOR *
 sf_next_chunk_iterator (SF_CHUNK_ITERATOR * iterator)
 {      SF_PRIVATE      *psf ;
@@ -3078,6 +3318,7 @@ sf_next_chunk_iterator (SF_CHUNK_ITERATOR * iterator)
        return NULL ;
 } /* sf_get_chunk_iterator_next */
 
+SNDFILE_API
 int
 sf_get_chunk_size (const SF_CHUNK_ITERATOR * iterator, SF_CHUNK_INFO * chunk_info)
 {      SF_PRIVATE      *psf ;
@@ -3095,6 +3336,7 @@ sf_get_chunk_size (const SF_CHUNK_ITERATOR * iterator, SF_CHUNK_INFO * chunk_inf
        return 0 ;
 } /* sf_get_chunk_size */
 
+SNDFILE_API
 int
 sf_get_chunk_data (const SF_CHUNK_ITERATOR * iterator, SF_CHUNK_INFO * chunk_info)
 {      SF_PRIVATE      *psf ;
index 985cc7d..3983118 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -180,6 +180,10 @@ enum
        SFC_SET_CLIPPING                                = 0x10C0,
        SFC_GET_CLIPPING                                = 0x10C1,
 
+       SFC_GET_CUE_COUNT                               = 0x10CD,
+       SFC_GET_CUE                                             = 0x10CE,
+       SFC_SET_CUE                                             = 0x10CF,
+
        SFC_GET_INSTRUMENT                              = 0x10D0,
        SFC_SET_INSTRUMENT                              = 0x10D1,
 
@@ -329,7 +333,7 @@ typedef     struct SNDFILE_tag      SNDFILE ;
 ** and the Microsoft compiler.
 */
 
-#if (defined (_MSCVER) || defined (_MSC_VER))
+#if (defined (_MSCVER) || defined (_MSC_VER) && (_MSC_VER < 1310))
 typedef __int64                sf_count_t ;
 #define SF_COUNT_MAX           0x7fffffffffffffffi64
 #else
@@ -402,6 +406,28 @@ typedef struct
 } SF_EMBED_FILE_INFO ;
 
 /*
+**     Struct used to retrieve cue marker information from a file
+*/
+
+typedef struct
+{      int32_t         indx ;
+       uint32_t        position ;
+       int32_t         fcc_chunk ;
+       int32_t         chunk_start ;
+       int32_t         block_start ;
+       uint32_t        sample_offset ;
+       char name [256] ;
+} SF_CUE_POINT ;
+
+#define        SF_CUES_VAR(count) \
+       struct \
+       {       uint32_t cue_count ; \
+               SF_CUE_POINT cue_points [count] ; \
+       }
+
+typedef SF_CUES_VAR (100) SF_CUES ;
+
+/*
 **     Structs used to retrieve music sample information from a file.
 */
 
index c587e9b..7aadff6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2001-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2001-2016 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
@@ -26,9 +26,6 @@
 #include       "common.h"
 
 #define STRINGS_DEBUG 0
-#if STRINGS_DEBUG
-static void hexdump (void *data, int len) ;
-#endif
 
 int
 psf_store_string (SF_PRIVATE *psf, int str_type, const char *str)
@@ -92,15 +89,15 @@ psf_store_string (SF_PRIVATE *psf, int str_type, const char *str)
        {       case SF_STR_SOFTWARE :
                                /* In write mode, want to append libsndfile-version to string. */
                                if (psf->file.mode == SFM_WRITE || psf->file.mode == SFM_RDWR)
-                               {       if (strstr (str, PACKAGE) == NULL)
+                               {       if (strstr (str, PACKAGE_NAME) == NULL)
                                        {       /*
                                                ** If the supplied string does not already contain a
                                                ** libsndfile-X.Y.Z component, then add it.
                                                */
                                                if (strlen (str) == 0)
-                                                       snprintf (new_str, sizeof (new_str), "%s-%s", PACKAGEVERSION) ;
+                                                       snprintf (new_str, sizeof (new_str), "%s-%s", PACKAGE_NAME, PACKAGE_VERSION) ;
                                                else
-                                                       snprintf (new_str, sizeof (new_str), "%s (%s-%s)", str, PACKAGEVERSION) ;
+                                                       snprintf (new_str, sizeof (new_str), "%s (%s-%s)", str, PACKAGE_NAME, PACKAGE_VERSION) ;
                                                }
                                        else
                                                snprintf (new_str, sizeof (new_str), "%s", str) ;
@@ -152,12 +149,8 @@ psf_store_string (SF_PRIVATE *psf, int str_type, const char *str)
        psf->strings.flags |= str_flags ;
 
 #if STRINGS_DEBUG
-       psf_log_printf (psf, "str_storage          : %p\n", psf->strings.storage) ;
-       psf_log_printf (psf, "storage_used             : %u\n", psf->strings.storage_used) ;
-       psf_log_printf (psf, "used                 : %d\n", psf->strings.storage_used) ;
-       psf_log_printf (psf, "remaining            : %d\n", psf->strings.storage_len - psf->strings.storage_used ;
-
-       hexdump (psf->strings.storage, 300) ;
+       printf ("storage_used         : %zd / %zd\n", psf->strings.storage_used, psf->strings.storage_len) ;
+       psf_hexdump (psf->strings.storage, psf->strings.storage_used) ;
 #endif
 
        return 0 ;
@@ -192,31 +185,3 @@ psf_location_string_count (const SF_PRIVATE * psf, int location)
 
        return count ;
 } /* psf_location_string_count */
-
-/*==============================================================================
-*/
-
-#if STRINGS_DEBUG
-
-#include <ctype.h>
-static void
-hexdump (void *data, int len)
-{      unsigned char *ptr ;
-       int k ;
-
-       ptr = data ;
-
-       puts ("---------------------------------------------------------") ;
-       while (len >= 16)
-       {       for (k = 0 ; k < 16 ; k++)
-                       printf ("%02X ", ptr [k] & 0xFF) ;
-               printf ("   ") ;
-               for (k = 0 ; k < 16 ; k++)
-                       printf ("%c", psf_isprint (ptr [k]) ? ptr [k] : '.') ;
-               puts ("") ;
-               ptr += 16 ;
-               len -= 16 ;
-               } ;
-} /* hexdump */
-
-#endif
index aa58d3e..2dc322c 100644 (file)
--- a/src/svx.c
+++ b/src/svx.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -357,8 +357,8 @@ svx_write_header (SF_PRIVATE *psf, int calc_length)
                psf->sf.frames = psf->datalength / (psf->bytewidth * psf->sf.channels) ;
                } ;
 
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        /* FORM marker and FORM size. */
@@ -386,12 +386,12 @@ svx_write_header (SF_PRIVATE *psf, int calc_length)
        psf_binheader_writef (psf, "Etm8", BODY_MARKER, (psf->datalength < 0) ?
                        psf->datalength * 0 : psf->datalength) ;
 
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
diff --git a/src/test_binheader_writef.c b/src/test_binheader_writef.c
new file mode 100644 (file)
index 0000000..b76c825
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+** Copyright (C) 2016 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 "sfconfig.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <errno.h>
+
+#include "common.h"
+
+#include "test_main.h"
+
+void
+test_binheader_writef (void)
+{      char buffer [18] ;
+       SF_PRIVATE      sf_private, *psf ;
+       int                     k, errors = 0 ;
+
+       print_test_name ("Testing binheader_writef") ;
+
+       memset (&sf_private, 0, sizeof (sf_private)) ;
+
+       psf = &sf_private ;
+       for (k = 0 ; errors == 0 && k < 10 ; k++)
+       {       psf_strlcpy (buffer, sizeof (buffer), "abcdefghijklmnop") ;
+               buffer [k] = 0 ;
+
+               psf_binheader_writef (psf, "Ep", buffer) ;
+
+               if ((psf->header.indx & 1) != 0)
+                       errors = 1 ;
+               } ;
+
+       free (psf->header.ptr) ;
+
+       if (errors)
+       {       puts ("\nExiting due to errors.\n") ;
+               exit (1) ;
+               } ;
+
+       puts ("ok") ;
+} /* test_log_printf */
+
index 7e8c2ed..329e226 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2006-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2006-2016 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
@@ -70,7 +70,8 @@ conversion_test (char endian)
                } ;
 
        psf_binheader_writef (psf, format_str, i8, i16, i24, i32, i64) ;
-       psf_fwrite (psf->header, 1, psf->headindex, psf) ;
+       psf_fwrite (psf->header.ptr, 1, psf->header.indx, psf) ;
+       free (psf->header.ptr) ;
        psf_fclose (psf) ;
 
        memset (psf, 0, sizeof (sf_private)) ;
@@ -84,6 +85,7 @@ conversion_test (char endian)
                } ;
 
        bytes = psf_binheader_readf (psf, format_str, &t8, &t16, &t24, &t32, &t64) ;
+       free (psf->header.ptr) ;
        psf_fclose (psf) ;
 
        if (bytes != 18)
diff --git a/src/test_endswap.c b/src/test_endswap.c
deleted file mode 100644 (file)
index 1d8cb7b..0000000
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
-** Copyright (C) 2002-2013 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 "sfconfig.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <inttypes.h>
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include "common.h"
-#include "sfendian.h"
-
-#include "test_main.h"
-
-#define        FMT_SHORT       "0x%04x\n"
-#define        FMT_INT         "0x%08x\n"
-#define        FMT_INT64       "0x%016" PRIx64 "\n"
-
-/*==============================================================================
-** Test functions.
-*/
-
-
-static void
-dump_short_array (const char * name, short * data, int datalen)
-{      int k ;
-
-       printf ("%-6s : ", name) ;
-       for (k = 0 ; k < datalen ; k++)
-               printf (FMT_SHORT, data [k]) ;
-       putchar ('\n') ;
-} /* dump_short_array */
-
-static void
-test_endswap_short (void)
-{      short orig [4], first [4], second [4] ;
-       int k ;
-
-       printf ("    %-40s : ", "test_endswap_short") ;
-       fflush (stdout) ;
-
-       for (k = 0 ; k < ARRAY_LEN (orig) ; k++)
-               orig [k] = 0x3210 + k ;
-
-       endswap_short_copy (first, orig, ARRAY_LEN (first)) ;
-       endswap_short_copy (second, first, ARRAY_LEN (second)) ;
-
-       if (memcmp (orig, first, sizeof (orig)) == 0)
-       {       printf ("\n\nLine %d : test 1 : these two array should not be the same:\n\n", __LINE__) ;
-               dump_short_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_short_array ("first", first, ARRAY_LEN (first)) ;
-               exit (1) ;
-               } ;
-
-       if (memcmp (orig, second, sizeof (orig)) != 0)
-       {       printf ("\n\nLine %d : test 2 : these two array should be the same:\n\n", __LINE__) ;
-               dump_short_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_short_array ("second", second, ARRAY_LEN (second)) ;
-               exit (1) ;
-               } ;
-
-       endswap_short_array (first, ARRAY_LEN (first)) ;
-
-       if (memcmp (orig, first, sizeof (orig)) != 0)
-       {       printf ("\n\nLine %d : test 3 : these two array should be the same:\n\n", __LINE__) ;
-               dump_short_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_short_array ("first", first, ARRAY_LEN (first)) ;
-               exit (1) ;
-               } ;
-
-       endswap_short_copy (first, orig, ARRAY_LEN (first)) ;
-       endswap_short_copy (first, first, ARRAY_LEN (first)) ;
-
-       if (memcmp (orig, first, sizeof (orig)) != 0)
-       {       printf ("\n\nLine %d : test 4 : these two array should be the same:\n\n", __LINE__) ;
-               dump_short_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_short_array ("first", first, ARRAY_LEN (first)) ;
-               exit (1) ;
-               } ;
-
-       puts ("ok") ;
-} /* test_endswap_short */
-
-static void
-dump_int_array (const char * name, int * data, int datalen)
-{      int k ;
-
-       printf ("%-6s : ", name) ;
-       for (k = 0 ; k < datalen ; k++)
-               printf (FMT_INT, data [k]) ;
-       putchar ('\n') ;
-} /* dump_int_array */
-
-static void
-test_endswap_int (void)
-{      int orig [4], first [4], second [4] ;
-       int k ;
-
-       printf ("    %-40s : ", "test_endswap_int") ;
-       fflush (stdout) ;
-
-       for (k = 0 ; k < ARRAY_LEN (orig) ; k++)
-               orig [k] = 0x76543210 + k ;
-
-       endswap_int_copy (first, orig, ARRAY_LEN (first)) ;
-       endswap_int_copy (second, first, ARRAY_LEN (second)) ;
-
-       if (memcmp (orig, first, sizeof (orig)) == 0)
-       {       printf ("\n\nLine %d : test 1 : these two array should not be the same:\n\n", __LINE__) ;
-               dump_int_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_int_array ("first", first, ARRAY_LEN (first)) ;
-               exit (1) ;
-               } ;
-
-       if (memcmp (orig, second, sizeof (orig)) != 0)
-       {       printf ("\n\nLine %d : test 2 : these two array should be the same:\n\n", __LINE__) ;
-               dump_int_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_int_array ("second", second, ARRAY_LEN (second)) ;
-               exit (1) ;
-               } ;
-
-       endswap_int_array (first, ARRAY_LEN (first)) ;
-
-       if (memcmp (orig, first, sizeof (orig)) != 0)
-       {       printf ("\n\nLine %d : test 3 : these two array should be the same:\n\n", __LINE__) ;
-               dump_int_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_int_array ("first", first, ARRAY_LEN (first)) ;
-               exit (1) ;
-               } ;
-
-       endswap_int_copy (first, orig, ARRAY_LEN (first)) ;
-       endswap_int_copy (first, first, ARRAY_LEN (first)) ;
-
-       if (memcmp (orig, first, sizeof (orig)) != 0)
-       {       printf ("\n\nLine %d : test 4 : these two array should be the same:\n\n", __LINE__) ;
-               dump_int_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_int_array ("first", first, ARRAY_LEN (first)) ;
-               exit (1) ;
-               } ;
-
-       puts ("ok") ;
-} /* test_endswap_int */
-
-static void
-dump_int64_t_array (const char * name, int64_t * data, int datalen)
-{      int k ;
-
-       printf ("%-6s : ", name) ;
-       for (k = 0 ; k < datalen ; k++)
-               printf (FMT_INT64, data [k]) ;
-       putchar ('\n') ;
-} /* dump_int64_t_array */
-
-static void
-test_endswap_int64_t (void)
-{      int64_t orig [4], first [4], second [4] ;
-       int k ;
-
-       printf ("    %-40s : ", "test_endswap_int64_t") ;
-       fflush (stdout) ;
-
-       for (k = 0 ; k < ARRAY_LEN (orig) ; k++)
-               orig [k] = 0x0807050540302010LL + k ;
-
-       endswap_int64_t_copy (first, orig, ARRAY_LEN (first)) ;
-       endswap_int64_t_copy (second, first, ARRAY_LEN (second)) ;
-
-       if (memcmp (orig, first, sizeof (orig)) == 0)
-       {       printf ("\n\nLine %d : test 1 : these two array should not be the same:\n\n", __LINE__) ;
-               dump_int64_t_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_int64_t_array ("first", first, ARRAY_LEN (first)) ;
-               exit (1) ;
-               } ;
-
-       if (memcmp (orig, second, sizeof (orig)) != 0)
-       {       printf ("\n\nLine %d : test 2 : these two array should be the same:\n\n", __LINE__) ;
-               dump_int64_t_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_int64_t_array ("second", second, ARRAY_LEN (second)) ;
-               exit (1) ;
-               } ;
-
-       endswap_int64_t_array (first, ARRAY_LEN (first)) ;
-
-       if (memcmp (orig, first, sizeof (orig)) != 0)
-       {       printf ("\n\nLine %d : test 3 : these two array should be the same:\n\n", __LINE__) ;
-               dump_int64_t_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_int64_t_array ("first", first, ARRAY_LEN (first)) ;
-               exit (1) ;
-               } ;
-
-       endswap_int64_t_copy (first, orig, ARRAY_LEN (first)) ;
-       endswap_int64_t_copy (first, first, ARRAY_LEN (first)) ;
-
-       if (memcmp (orig, first, sizeof (orig)) != 0)
-       {       printf ("\n\nLine %d : test 4 : these two array should be the same:\n\n", __LINE__) ;
-               dump_int64_t_array ("orig", orig, ARRAY_LEN (orig)) ;
-               dump_int64_t_array ("first", first, ARRAY_LEN (first)) ;
-               exit (1) ;
-               } ;
-
-       puts ("ok") ;
-} /* test_endswap_int64_t */
-
-
-
-static void
-test_psf_put_be16 (void)
-{      const char *test = "AB" ;
-       uint8_t array [32] ;
-       int k ;
-
-       printf ("    %-40s : ", __func__) ;
-       fflush (stdout) ;
-
-       for (k = 0 ; k < 10 ; k++)
-       {       memset (array, 0, sizeof (array)) ;
-
-               psf_put_be16 (array, k, 0x4142) ;
-               if (memcmp (array + k, test, sizeof (int16_t)) != 0)
-               {       printf ("\n\nLine %d : Put failed at index %d.\n", __LINE__, k) ;
-                       exit (1) ;
-                       } ;
-               if (psf_get_be16 (array, k) != 0x4142)
-               {       printf ("\n\nLine %d : Get failed at index %d.\n", __LINE__, k) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       puts ("ok") ;
-} /* test_psf_put_be16 */
-
-static void
-test_psf_put_be32 (void)
-{      const char *test = "0123" ;
-       uint8_t array [32] ;
-       int k ;
-
-       printf ("    %-40s : ", __func__) ;
-       fflush (stdout) ;
-
-       for (k = 0 ; k < 10 ; k++)
-       {       memset (array, 0, sizeof (array)) ;
-
-               psf_put_be32 (array, k, 0x30313233) ;
-               if (memcmp (array + k, test, sizeof (int32_t)) != 0)
-               {       printf ("\n\nLine %d : Put failed at index %d.\n", __LINE__, k) ;
-                       exit (1) ;
-                       } ;
-               if (psf_get_be32 (array, k) != 0x30313233)
-               {       printf ("\n\nLine %d : Get failed at index %d.\n", __LINE__, k) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       puts ("ok") ;
-} /* test_psf_put_be32 */
-
-static void
-test_psf_put_be64 (void)
-{      const char *test = "01234567" ;
-       uint8_t array [32] ;
-       int k ;
-
-       printf ("    %-40s : ", __func__) ;
-       fflush (stdout) ;
-
-       for (k = 0 ; k < 10 ; k++)
-       {       memset (array, 0, sizeof (array)) ;
-
-               psf_put_be64 (array, k, 0x3031323334353637) ;
-               if (memcmp (array + k, test, sizeof (int64_t)) != 0)
-               {       printf ("\n\nLine %d : Put failed at index %d.\n", __LINE__, k) ;
-                       exit (1) ;
-                       } ;
-               if (psf_get_be64 (array, k) != 0x3031323334353637)
-               {       printf ("\n\nLine %d : Get failed at index %d.\n", __LINE__, k) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       puts ("ok") ;
-} /* test_psf_put_be64 */
-
-
-void
-test_endswap (void)
-{
-       test_endswap_short () ;
-       test_endswap_int () ;
-       test_endswap_int64_t () ;
-
-
-       test_psf_put_be16 () ;
-       test_psf_put_be32 () ;
-       test_psf_put_be64 () ;
-
-
-} /* test_endswap */
-
index 89b7d14..9f5a1cc 100644 (file)
@@ -1,6 +1,6 @@
 [+ AutoGen5 template c +]
 /*
-** Copyright (C) 2002-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2016 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
@@ -56,7 +56,7 @@ dump_[+ (get "name") +]_array (const char * name, [+ (get "name") +] * data, int
 static void
 test_endswap_[+ (get "name") +] (void)
 {      [+ (get "name") +] orig [4], first [4], second [4] ;
-       int k ;
+       int64_t k ;
 
        printf ("    %-40s : ", "test_endswap_[+ (get "name") +]") ;
        fflush (stdout) ;
index f51f7c9..1f2437d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2016 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
 
 #include "test_main.h"
 
+static void
+test_file_offsets_are_64_bit (void)
+{
+       print_test_name ("File offsets are 64 bit") ;
+
+       // The Windows specific code path uses the 64 bit file I/O APIs.
+       if (! USE_WINDOWS_API && sizeof (off_t) != 8)
+       {       printf ("\n\nError : sizeof (off_t) is %zd (should be 8).\n\n", sizeof (off_t)) ;
+               exit (1) ;
+               } ;
+
+       puts ("ok") ;
+} /* test_file_offsets_are_64_bit */
+
 int
 main (void)
 {
+       test_file_offsets_are_64_bit () ;
        test_conversions () ;
        test_endswap () ;
        test_float_convert () ;
        test_double_convert () ;
 
        test_log_printf () ;
+       test_binheader_writef () ;
        test_file_io () ;
 
        test_audio_detect () ;
index 6b2f28f..156d374 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2016 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
@@ -27,6 +27,7 @@ print_test_name (const char * name)
 void test_conversions (void) ;
 void test_endswap (void) ;
 void test_log_printf (void) ;
+void test_binheader_writef (void) ;
 void test_file_io (void) ;
 
 void test_float_convert (void) ;
index 774ced1..f21addc 100644 (file)
@@ -40,11 +40,14 @@ test_psf_strlcpy_crlf (void)
                        exit (1) ;
                        } ;
 
-               dest [dest_len] = '\xea' ;
+               /* This value needs to be a in the [0, 127] range to avoid tripping up
+               ** compiles like Sun Studio 12.*
+               */
+               dest [dest_len] = '\x5a' ;
 
                psf_strlcpy_crlf (dest, src, dest_len, sizeof (*src)) ;
 
-               if (dest [dest_len] != '\xea')
+               if (dest [dest_len] != '\x5a')
                {       printf ("\n\nLine %d: buffer overrun for dest_len == %d\n\n", __LINE__, dest_len) ;
                        exit (1) ;
                        } ;
diff --git a/src/version-metadata.rc b/src/version-metadata.rc
deleted file mode 100644 (file)
index f961d2d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <windows.h>
-
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
-1 VERSIONINFO
-       FILEVERSION             1,0,26,0
-       PRODUCTVERSION  1,0,26,0
-       FILEOS                  VOS__WINDOWS32
-       FILETYPE                VFT_DLL
-       FILESUBTYPE             VFT2_UNKNOWN
-       FILEFLAGSMASK   0x00000000
-       FILEFLAGS               0x00000000
-{
-       BLOCK "StringFileInfo"
-       {
-               BLOCK "040904e4"
-               {
-                       VALUE "FileDescription", "A library for reading and writing audio files."
-                       VALUE "FileVersion", "1.0.26.0\0"
-                       VALUE "Full Version", "1.0.26"
-                       VALUE "InternalName", "libsndfile"
-                       VALUE "LegalCopyright", "Copyright (C) 1999-2012, Licensed LGPL"
-                       VALUE "OriginalFilename", "libsndfile-1.dll"
-                       VALUE "ProductName", "libsndfile-1 DLL"
-                       VALUE "ProductVersion", "1.0.26.0\0"
-                       VALUE "Language", "Language Neutral"
-               }
-       }
-       BLOCK "VarFileInfo"
-       {
-               VALUE "Translation", 0x0409, 0x04E4
-       }
-}
index 8af40ee..e783b68 100644 (file)
--- a/src/voc.c
+++ b/src/voc.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2001-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2001-2016 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
@@ -436,8 +436,8 @@ voc_write_header (SF_PRIVATE *psf, int calc_length)
 
        subformat = SF_CODEC (psf->sf.format) ;
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        /* VOC marker and 0x1A byte. */
@@ -513,12 +513,12 @@ voc_write_header (SF_PRIVATE *psf, int calc_length)
                        } ;
                } ;
 
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index fc03825..1b84dd6 100644 (file)
--- a/src/w64.c
+++ b/src/w64.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -26,7 +26,7 @@
 #include       "sndfile.h"
 #include       "sfendian.h"
 #include       "common.h"
-#include       "wav_w64.h"
+#include       "wavlike.h"
 
 /*------------------------------------------------------------------------------
 ** W64 files use 16 byte markers as opposed to the four byte marker of
@@ -74,7 +74,7 @@
 #define junk_HASH16            MAKE_HASH16 (0x6A, 0x75, 0x6E, 0x6b, 0xF3, 0xAC, 0xD3, 0x11, \
                                                                0x8C, 0xD1, 0x00, 0xC0, 0x4f, 0x8E, 0xDB, 0x8A)
 
-#define bext_MARKER            MAKE_HASH16 (0x62, 0x65, 0x78, 0x74, 0xf3, 0xac, 0xd3, 0xaa, \
+#define bext_HASH16            MAKE_HASH16 (0x62, 0x65, 0x78, 0x74, 0xf3, 0xac, 0xd3, 0xaa, \
                                                                0xd1, 0x8c, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A)
 
 #define MARKER_HASH16  MAKE_HASH16 (0x56, 0x62, 0xf7, 0xab, 0x2d, 0x39, 0xd2, 0x11, \
@@ -122,10 +122,10 @@ static int        w64_close (SF_PRIVATE *psf) ;
 
 int
 w64_open       (SF_PRIVATE *psf)
-{      WAV_PRIVATE * wpriv ;
+{      WAVLIKE_PRIVATE * wpriv ;
        int     subformat, error, blockalign = 0, framesperblock = 0 ;
 
-       if ((wpriv = calloc (1, sizeof (WAV_PRIVATE))) == NULL)
+       if ((wpriv = calloc (1, sizeof (WAVLIKE_PRIVATE))) == NULL)
                return SFE_MALLOC_FAILED ;
        psf->container_data = wpriv ;
 
@@ -148,7 +148,7 @@ w64_open    (SF_PRIVATE *psf)
                psf->blockwidth = psf->bytewidth * psf->sf.channels ;
 
                if (subformat == SF_FORMAT_IMA_ADPCM || subformat == SF_FORMAT_MS_ADPCM)
-               {       blockalign = wav_w64_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
+               {       blockalign = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
                        framesperblock = -1 ;
 
                        /*
@@ -198,11 +198,11 @@ w64_open  (SF_PRIVATE *psf)
                                        break ;
 
                case SF_FORMAT_IMA_ADPCM :
-                                       error = wav_w64_ima_init (psf, blockalign, framesperblock) ;
+                                       error = wavlike_ima_init (psf, blockalign, framesperblock) ;
                                        break ;
 
                case SF_FORMAT_MS_ADPCM :
-                                       error = wav_w64_msadpcm_init (psf, blockalign, framesperblock) ;
+                                       error = wavlike_msadpcm_init (psf, blockalign, framesperblock) ;
                                        break ;
                /* Lite remove end */
 
@@ -222,7 +222,7 @@ w64_open    (SF_PRIVATE *psf)
 
 static int
 w64_read_header        (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
-{      WAV_PRIVATE *wpriv ;
+{      WAVLIKE_PRIVATE *wpriv ;
        WAV_FMT         *wav_fmt ;
        int                     dword = 0, marker, format = 0 ;
        sf_count_t      chunk_size, bytesread = 0 ;
@@ -237,8 +237,8 @@ w64_read_header     (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
 
        while (! done)
        {       /* Each new chunk must start on an 8 byte boundary, so jump if needed. */
-               if (psf->headindex & 0x7)
-                       psf_binheader_readf (psf, "j", 8 - (psf->headindex & 0x7)) ;
+               if (psf->header.indx & 0x7)
+                       psf_binheader_readf (psf, "j", 8 - (psf->header.indx & 0x7)) ;
 
                /* Generate hash of 16 byte marker. */
                marker = chunk_size = 0 ;
@@ -280,7 +280,7 @@ w64_read_header     (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                                        /* size of 16 byte marker and 8 byte chunk_size value. */
                                        chunk_size -= 24 ;
 
-                                       if ((error = wav_w64_read_fmt_chunk (psf, (int) chunk_size)))
+                                       if ((error = wavlike_read_fmt_chunk (psf, (int) chunk_size)))
                                                return error ;
 
                                        if (chunk_size % 8)
@@ -295,7 +295,7 @@ w64_read_header     (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                                        {       sf_count_t frames ;
 
                                                psf_binheader_readf (psf, "e8", &frames) ;
-                                               psf_log_printf (psf, "   fact : %D\n     frames : %D\n",
+                                               psf_log_printf (psf, "fact : %D\n  frames : %D\n",
                                                                                chunk_size, frames) ;
                                                } ;
                                        chunk_size = 0 ;
@@ -339,7 +339,7 @@ w64_read_header     (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                                        chunk_size -= 24 ;
                                        break ;
 
-                       case bext_MARKER :
+                       case bext_HASH16 :
                                        psf_log_printf (psf, "bext : %D\n", chunk_size) ;
                                        chunk_size -= 24 ;
                                        break ;
@@ -460,8 +460,8 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        /* riff marker, length, wave and 'fmt ' markers. */
@@ -475,7 +475,7 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
                case    SF_FORMAT_PCM_24 :
                case    SF_FORMAT_PCM_32 :
                                        fmt_size = 24 + 2 + 2 + 4 + 4 + 2 + 2 ;
-                                       fmt_pad = (size_t) (8 - (fmt_size & 0x7)) ;
+                                       fmt_pad = (size_t) ((fmt_size & 0x7) ? 8 - (fmt_size & 0x7) : 0) ;
                                        fmt_size += fmt_pad ;
 
                                        /* fmt : format, channels, samplerate */
@@ -489,7 +489,7 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
                case SF_FORMAT_FLOAT :
                case SF_FORMAT_DOUBLE :
                                        fmt_size = 24 + 2 + 2 + 4 + 4 + 2 + 2 ;
-                                       fmt_pad = (size_t) (8 - (fmt_size & 0x7)) ;
+                                       fmt_pad = (size_t) ((fmt_size & 0x7) ? 8 - (fmt_size & 0x7) : 0) ;
                                        fmt_size += fmt_pad ;
 
                                        /* fmt : format, channels, samplerate */
@@ -504,7 +504,7 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
 
                case SF_FORMAT_ULAW :
                                        fmt_size = 24 + 2 + 2 + 4 + 4 + 2 + 2 ;
-                                       fmt_pad = (size_t) (8 - (fmt_size & 0x7)) ;
+                                       fmt_pad = (size_t) ((fmt_size & 0x7) ? 8 - (fmt_size & 0x7) : 0) ;
                                        fmt_size += fmt_pad ;
 
                                        /* fmt : format, channels, samplerate */
@@ -519,7 +519,7 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
 
                case SF_FORMAT_ALAW :
                                        fmt_size = 24 + 2 + 2 + 4 + 4 + 2 + 2 ;
-                                       fmt_pad = (size_t) (8 - (fmt_size & 0x7)) ;
+                                       fmt_pad = (size_t) ((fmt_size & 0x7) ? 8 - (fmt_size & 0x7) : 0) ;
                                        fmt_size += fmt_pad ;
 
                                        /* fmt : format, channels, samplerate */
@@ -536,13 +536,13 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
                case SF_FORMAT_IMA_ADPCM :
                                        {       int             blockalign, framesperblock, bytespersec ;
 
-                                               blockalign              = wav_w64_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
+                                               blockalign              = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
                                                framesperblock  = 2 * (blockalign - 4 * psf->sf.channels) / psf->sf.channels + 1 ;
                                                bytespersec             = (psf->sf.samplerate * blockalign) / framesperblock ;
 
                                                /* fmt chunk. */
                                                fmt_size = 24 + 2 + 2 + 4 + 4 + 2 + 2 + 2 + 2 ;
-                                               fmt_pad = (size_t) (8 - (fmt_size & 0x7)) ;
+                                               fmt_pad = (size_t) ((fmt_size & 0x7) ? 8 - (fmt_size & 0x7) : 0) ;
                                                fmt_size += fmt_pad ;
 
                                                /* fmt : size, WAV format type, channels. */
@@ -561,14 +561,14 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
                case SF_FORMAT_MS_ADPCM :
                                        {       int blockalign, framesperblock, bytespersec, extrabytes ;
 
-                                               blockalign              = wav_w64_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
+                                               blockalign              = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
                                                framesperblock  = 2 + 2 * (blockalign - 7 * psf->sf.channels) / psf->sf.channels ;
                                                bytespersec             = (psf->sf.samplerate * blockalign) / framesperblock ;
 
                                                /* fmt chunk. */
-                                               extrabytes      = 2 + 2 + MSADPCM_ADAPT_COEFF_COUNT * (2 + 2) ;
+                                               extrabytes      = 2 + 2 + WAVLIKE_MSADPCM_ADAPT_COEFF_COUNT * (2 + 2) ;
                                                fmt_size        = 24 + 2 + 2 + 4 + 4 + 2 + 2 + 2 + extrabytes ;
-                                               fmt_pad = (size_t) (8 - (fmt_size & 0x7)) ;
+                                               fmt_pad = (size_t) ((fmt_size & 0x7) ? 8 - (fmt_size & 0x7) : 0) ;
                                                fmt_size += fmt_pad ;
 
                                                /* fmt : size, W64 format type, channels. */
@@ -580,7 +580,7 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
                                                /* fmt : blockalign, bitwidth, extrabytes, framesperblock. */
                                                psf_binheader_writef (psf, "e22222", blockalign, 4, extrabytes, framesperblock, 7) ;
 
-                                               msadpcm_write_adapt_coeffs (psf) ;
+                                               wavlike_msadpcm_write_adapt_coeffs (psf) ;
                                                } ;
 
                                        add_fact_chunk = SF_TRUE ;
@@ -590,11 +590,11 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
                case SF_FORMAT_GSM610 :
                                        {       int bytespersec ;
 
-                                               bytespersec = (psf->sf.samplerate * WAV_W64_GSM610_BLOCKSIZE) / WAV_W64_GSM610_SAMPLES ;
+                                               bytespersec = (psf->sf.samplerate * WAVLIKE_GSM610_BLOCKSIZE) / WAVLIKE_GSM610_SAMPLES ;
 
                                                /* fmt chunk. */
                                                fmt_size = 24 + 2 + 2 + 4 + 4 + 2 + 2 + 2 + 2 ;
-                                               fmt_pad = (size_t) (8 - (fmt_size & 0x7)) ;
+                                               fmt_pad = (size_t) ((fmt_size & 0x7) ? 8 - (fmt_size & 0x7) : 0) ;
                                                fmt_size += fmt_pad ;
 
                                                /* fmt : size, WAV format type, channels. */
@@ -604,7 +604,7 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
                                                psf_binheader_writef (psf, "e44", psf->sf.samplerate, bytespersec) ;
 
                                                /* fmt : blockalign, bitwidth, extrabytes, framesperblock. */
-                                               psf_binheader_writef (psf, "e2222", WAV_W64_GSM610_BLOCKSIZE, 0, 2, WAV_W64_GSM610_SAMPLES) ;
+                                               psf_binheader_writef (psf, "e2222", WAVLIKE_GSM610_BLOCKSIZE, 0, 2, WAVLIKE_GSM610_SAMPLES) ;
                                                } ;
 
                                        add_fact_chunk = SF_TRUE ;
@@ -621,12 +621,12 @@ w64_write_header (SF_PRIVATE *psf, int calc_length)
                psf_binheader_writef (psf, "eh88", fact_MARKER16, (sf_count_t) (16 + 8 + 8), psf->sf.frames) ;
 
        psf_binheader_writef (psf, "eh8", data_MARKER16, psf->datalength + 24) ;
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index 1d396ad..4b943dc 100644 (file)
--- a/src/wav.c
+++ b/src/wav.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2004-2005 David Viens <davidv@plogue.com>
 **
 ** This program is free software; you can redistribute it and/or modify
@@ -29,7 +29,7 @@
 #include       "sndfile.h"
 #include       "sfendian.h"
 #include       "common.h"
-#include       "wav_w64.h"
+#include       "wavlike.h"
 
 /*------------------------------------------------------------------------------
  * Macros to handle big/little endian issues.
 #define RIFX_MARKER            (MAKE_MARKER ('R', 'I', 'F', 'X'))
 #define WAVE_MARKER            (MAKE_MARKER ('W', 'A', 'V', 'E'))
 #define fmt_MARKER             (MAKE_MARKER ('f', 'm', 't', ' '))
-#define data_MARKER            (MAKE_MARKER ('d', 'a', 't', 'a'))
 #define fact_MARKER            (MAKE_MARKER ('f', 'a', 'c', 't'))
-#define PEAK_MARKER            (MAKE_MARKER ('P', 'E', 'A', 'K'))
 
 #define cue_MARKER             (MAKE_MARKER ('c', 'u', 'e', ' '))
-#define LIST_MARKER            (MAKE_MARKER ('L', 'I', 'S', 'T'))
 #define slnt_MARKER            (MAKE_MARKER ('s', 'l', 'n', 't'))
 #define wavl_MARKER            (MAKE_MARKER ('w', 'a', 'v', 'l'))
-#define INFO_MARKER            (MAKE_MARKER ('I', 'N', 'F', 'O'))
 #define plst_MARKER            (MAKE_MARKER ('p', 'l', 's', 't'))
-#define adtl_MARKER            (MAKE_MARKER ('a', 'd', 't', 'l'))
-#define labl_MARKER            (MAKE_MARKER ('l', 'a', 'b', 'l'))
-#define ltxt_MARKER            (MAKE_MARKER ('l', 't', 'x', 't'))
-#define note_MARKER            (MAKE_MARKER ('n', 'o', 't', 'e'))
 #define smpl_MARKER            (MAKE_MARKER ('s', 'm', 'p', 'l'))
-#define bext_MARKER            (MAKE_MARKER ('b', 'e', 'x', 't'))
 #define iXML_MARKER            (MAKE_MARKER ('i', 'X', 'M', 'L'))
 #define levl_MARKER            (MAKE_MARKER ('l', 'e', 'v', 'l'))
 #define MEXT_MARKER            (MAKE_MARKER ('M', 'E', 'X', 'T'))
-#define DISP_MARKER            (MAKE_MARKER ('D', 'I', 'S', 'P'))
 #define acid_MARKER            (MAKE_MARKER ('a', 'c', 'i', 'd'))
 #define strc_MARKER            (MAKE_MARKER ('s', 't', 'r', 'c'))
-#define PAD_MARKER             (MAKE_MARKER ('P', 'A', 'D', ' '))
 #define afsp_MARKER            (MAKE_MARKER ('a', 'f', 's', 'p'))
 #define clm_MARKER             (MAKE_MARKER ('c', 'l', 'm', ' '))
 #define elmo_MARKER            (MAKE_MARKER ('e', 'l', 'm', 'o'))
-#define cart_MARKER            (MAKE_MARKER ('c', 'a', 'r', 't'))
 #define FLLR_MARKER            (MAKE_MARKER ('F', 'L', 'L', 'R'))
 
-#define exif_MARKER            (MAKE_MARKER ('e', 'x', 'i', 'f'))
-#define ever_MARKER            (MAKE_MARKER ('e', 'v', 'e', 'r'))
-#define etim_MARKER            (MAKE_MARKER ('e', 't', 'i', 'm'))
-#define ecor_MARKER            (MAKE_MARKER ('e', 'c', 'o', 'r'))
-#define emdl_MARKER            (MAKE_MARKER ('e', 'm', 'd', 'l'))
-#define emnt_MARKER            (MAKE_MARKER ('e', 'm', 'n', 't'))
-#define erel_MARKER            (MAKE_MARKER ('e', 'r', 'e', 'l'))
-#define eucm_MARKER            (MAKE_MARKER ('e', 'u', 'c', 'm'))
-#define olym_MARKER            (MAKE_MARKER ('o', 'l', 'y', 'm'))
 #define minf_MARKER            (MAKE_MARKER ('m', 'i', 'n', 'f'))
 #define elm1_MARKER            (MAKE_MARKER ('e', 'l', 'm', '1'))
 #define regn_MARKER            (MAKE_MARKER ('r', 'e', 'g', 'n'))
 #define AFAn_MARKER            (MAKE_MARKER ('A', 'F', 'A', 'n'))
 
 
-#define ISFT_MARKER            (MAKE_MARKER ('I', 'S', 'F', 'T'))
-#define ICRD_MARKER            (MAKE_MARKER ('I', 'C', 'R', 'D'))
-#define ICOP_MARKER            (MAKE_MARKER ('I', 'C', 'O', 'P'))
-#define IARL_MARKER            (MAKE_MARKER ('I', 'A', 'R', 'L'))
-#define IART_MARKER            (MAKE_MARKER ('I', 'A', 'R', 'T'))
-#define INAM_MARKER            (MAKE_MARKER ('I', 'N', 'A', 'M'))
-#define IENG_MARKER            (MAKE_MARKER ('I', 'E', 'N', 'G'))
-#define IGNR_MARKER            (MAKE_MARKER ('I', 'G', 'N', 'R'))
-#define ICOP_MARKER            (MAKE_MARKER ('I', 'C', 'O', 'P'))
-#define IPRD_MARKER            (MAKE_MARKER ('I', 'P', 'R', 'D'))
-#define ISRC_MARKER            (MAKE_MARKER ('I', 'S', 'R', 'C'))
-#define ISBJ_MARKER            (MAKE_MARKER ('I', 'S', 'B', 'J'))
-#define ICMT_MARKER            (MAKE_MARKER ('I', 'C', 'M', 'T'))
-#define IAUT_MARKER            (MAKE_MARKER ('I', 'A', 'U', 'T'))
-#define ITRK_MARKER            (MAKE_MARKER ('I', 'T', 'R', 'K'))
-
 /* Weird WAVPACK marker which can show up at the start of the DATA section. */
 #define wvpk_MARKER (MAKE_MARKER ('w', 'v', 'p', 'k'))
 #define OggS_MARKER (MAKE_MARKER ('O', 'g', 'g', 'S'))
 
-#define WAV_PEAK_CHUNK_SIZE(ch)        (2 * sizeof (int) + ch * (sizeof (float) + sizeof (int)))
-#define WAV_BEXT_MIN_CHUNK_SIZE                602
-#define WAV_BEXT_MAX_CHUNK_SIZE                (10 * 1024)
-
-#define WAV_CART_MIN_CHUNK_SIZE                2048
-#define WAV_CART_MAX_CHUNK_SIZE                0xffffffff
+#define WAVLIKE_PEAK_CHUNK_SIZE(ch)    (2 * sizeof (int) + ch * (sizeof (float) + sizeof (int)))
 
 
 enum
@@ -135,9 +93,11 @@ static const EXT_SUBFORMAT MSGUID_SUBTYPE_PCM =
 {      0x00000001, 0x0000, 0x0010, {   0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 }
 } ;
 
+#if 0
 static const EXT_SUBFORMAT MSGUID_SUBTYPE_MS_ADPCM =
 {      0x00000002, 0x0000, 0x0010, {   0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 }
 } ;
+#endif
 
 static const EXT_SUBFORMAT MSGUID_SUBTYPE_IEEE_FLOAT =
 {      0x00000003, 0x0000, 0x0010, {   0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 }
@@ -180,12 +140,9 @@ static int wav_read_header         (SF_PRIVATE *psf, int *blockalign, int *framesperblo
 static int     wav_write_header        (SF_PRIVATE *psf, int calc_length) ;
 
 static int     wav_write_tailer (SF_PRIVATE *psf) ;
-static void wav_write_strings (SF_PRIVATE *psf, int location) ;
 static int     wav_command (SF_PRIVATE *psf, int command, void *data, int datasize) ;
 static int     wav_close (SF_PRIVATE *psf) ;
 
-static int     wav_subchunk_parse      (SF_PRIVATE *psf, int chunk, uint32_t length) ;
-static int     exif_subchunk_parse     (SF_PRIVATE *psf, uint32_t length) ;
 static int     wav_read_smpl_chunk (SF_PRIVATE *psf, uint32_t chunklen) ;
 static int     wav_read_acid_chunk (SF_PRIVATE *psf, uint32_t chunklen) ;
 
@@ -200,10 +157,10 @@ static int wav_get_chunk_data (SF_PRIVATE *psf, const SF_CHUNK_ITERATOR * iterat
 
 int
 wav_open       (SF_PRIVATE *psf)
-{      WAV_PRIVATE * wpriv ;
+{      WAVLIKE_PRIVATE * wpriv ;
        int     format, subformat, error, blockalign = 0, framesperblock = 0 ;
 
-       if ((wpriv = calloc (1, sizeof (WAV_PRIVATE))) == NULL)
+       if ((wpriv = calloc (1, sizeof (WAVLIKE_PRIVATE))) == NULL)
                return SFE_MALLOC_FAILED ;
        psf->container_data = wpriv ;
 
@@ -248,7 +205,7 @@ wav_open    (SF_PRIVATE *psf)
                        } ;
 
                if (subformat == SF_FORMAT_IMA_ADPCM || subformat == SF_FORMAT_MS_ADPCM)
-               {       blockalign = wav_w64_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
+               {       blockalign = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
                        framesperblock = -1 ; /* Corrected later. */
                        } ;
 
@@ -294,11 +251,11 @@ wav_open  (SF_PRIVATE *psf)
                                        break ;
 
                case SF_FORMAT_IMA_ADPCM :
-                                       error = wav_w64_ima_init (psf, blockalign, framesperblock) ;
+                                       error = wavlike_ima_init (psf, blockalign, framesperblock) ;
                                        break ;
 
                case SF_FORMAT_MS_ADPCM :
-                                       error = wav_w64_msadpcm_init (psf, blockalign, framesperblock) ;
+                                       error = wavlike_msadpcm_init (psf, blockalign, framesperblock) ;
                                        break ;
 
                case SF_FORMAT_G721_32 :
@@ -325,12 +282,11 @@ wav_open  (SF_PRIVATE *psf)
 
 static int
 wav_read_header        (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
-{      WAV_PRIVATE     *wpriv ;
+{      WAVLIKE_PRIVATE *wpriv ;
        WAV_FMT         *wav_fmt ;
        FACT_CHUNK      fact_chunk ;
-       uint32_t        marker, chunk_size = 0, RIFFsize = 0, done = 0, uk ;
+       uint32_t        marker, chunk_size = 0, RIFFsize = 0, done = 0 ;
        int                     parsestage = 0, error, format = 0 ;
-       char            buffer [256] ;
 
        if (psf->is_pipe == 0 && psf->filelength > SF_PLATFORM_S64 (0xffffffff))
                psf_log_printf (psf, "Warning : filelength > 0xffffffff. This is bad!!!!\n") ;
@@ -341,7 +297,7 @@ wav_read_header     (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
 
        /* Set position to start of file to begin reading header. */
        psf_binheader_readf (psf, "pmj", 0, &marker, -4) ;
-       psf->headindex = 0 ;
+       psf->header.indx = 0 ;
 
        /* RIFX signifies big-endian format for all header and data  to prevent
        ** lots of code copying here, we'll set the psf->rwf_endian flag once here,
@@ -415,7 +371,7 @@ wav_read_header     (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
 
                                        psf_log_printf (psf, "fmt  : %d\n", chunk_size) ;
 
-                                       if ((error = wav_w64_read_fmt_chunk (psf, chunk_size)))
+                                       if ((error = wavlike_read_fmt_chunk (psf, chunk_size)))
                                                return error ;
 
                                        format = wav_fmt->format ;
@@ -496,53 +452,21 @@ wav_read_header   (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                                        parsestage |= HAVE_PEAK ;
 
                                        psf_log_printf (psf, "%M : %u\n", marker, chunk_size) ;
-                                       if (chunk_size != WAV_PEAK_CHUNK_SIZE (psf->sf.channels))
-                                       {       psf_binheader_readf (psf, "j", chunk_size) ;
-                                               psf_log_printf (psf, "*** File PEAK chunk size doesn't fit with number of channels (%d).\n", psf->sf.channels) ;
-                                               return SFE_WAV_BAD_PEAK ;
-                                               } ;
-
-                                       if ((psf->peak_info = peak_info_calloc (psf->sf.channels)) == NULL)
-                                               return SFE_MALLOC_FAILED ;
-
-                                       /* read in rest of PEAK chunk. */
-                                       psf_binheader_readf (psf, "44", & (psf->peak_info->version), & (psf->peak_info->timestamp)) ;
-
-                                       if (psf->peak_info->version != 1)
-                                               psf_log_printf (psf, "  version    : %d *** (should be version 1)\n", psf->peak_info->version) ;
-                                       else
-                                               psf_log_printf (psf, "  version    : %d\n", psf->peak_info->version) ;
-
-                                       psf_log_printf (psf, "  time stamp : %d\n", psf->peak_info->timestamp) ;
-                                       psf_log_printf (psf, "    Ch   Position       Value\n") ;
-
-                                       for (uk = 0 ; uk < (uint32_t) psf->sf.channels ; uk++)
-                                       {       float value ;
-                                               uint32_t position ;
-
-                                               psf_binheader_readf (psf, "f4", &value, &position) ;
-                                               psf->peak_info->peaks [uk].value = value ;
-                                               psf->peak_info->peaks [uk].position = position ;
-
-                                               snprintf (buffer, sizeof (buffer), "    %2d   %-12" PRId64 "   %g\n",
-                                                               uk, psf->peak_info->peaks [uk].position, psf->peak_info->peaks [uk].value) ;
-                                               buffer [sizeof (buffer) - 1] = 0 ;
-                                               psf_log_printf (psf, "%s", buffer) ;
-                                               } ;
-
+                                       if ((error = wavlike_read_peak_chunk (psf, chunk_size)) != 0)
+                                               return error ;
                                        psf->peak_info->peak_loc = ((parsestage & HAVE_data) == 0) ? SF_PEAK_START : SF_PEAK_END ;
                                        break ;
 
                        case cue_MARKER :
                                        parsestage |= HAVE_other ;
 
-                                       {       uint32_t thisread, bytesread, cue_count ;
-                                               int id, position, chunk_id, chunk_start, block_start, offset ;
+                                       {       uint32_t thisread, bytesread, cue_count, position, offset ;
+                                               int id, chunk_id, chunk_start, block_start, cue_index ;
 
                                                bytesread = psf_binheader_readf (psf, "4", &cue_count) ;
                                                psf_log_printf (psf, "%M : %u\n", marker, chunk_size) ;
 
-                                               if (cue_count > 10)
+                                               if (cue_count > 1000)
                                                {       psf_log_printf (psf, "  Count : %u (skipping)\n", cue_count) ;
                                                        psf_binheader_readf (psf, "j", (cue_count > 20 ? 20 : cue_count) * 24) ;
                                                        break ;
@@ -550,9 +474,14 @@ wav_read_header    (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
 
                                                psf_log_printf (psf, "  Count : %d\n", cue_count) ;
 
+                                               if ((psf->cues = psf_cues_alloc (cue_count)) == NULL)
+                                                       return SFE_MALLOC_FAILED ;
+
+                                               cue_index = 0 ;
+
                                                while (cue_count)
                                                {
-                                                       if ((thisread = psf_binheader_readf (psf, "444444", &id, &position, &chunk_id, &chunk_start, &block_start, &offset)) == 0)
+                                                       if ((thisread = psf_binheader_readf (psf, "e44m444", &id, &position, &chunk_id, &chunk_start, &block_start, &offset)) == 0)
                                                                break ;
                                                        bytesread += thisread ;
 
@@ -561,7 +490,15 @@ wav_read_header    (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                                                                                                        "  Chk Start : %d  Blk Start : %d"
                                                                                                        "  Offset : %5d\n",
                                                                        id, position, chunk_id, chunk_start, block_start, offset) ;
+                                                       psf->cues->cue_points [cue_index].indx = id ;
+                                                       psf->cues->cue_points [cue_index].position = position ;
+                                                       psf->cues->cue_points [cue_index].fcc_chunk = chunk_id ;
+                                                       psf->cues->cue_points [cue_index].chunk_start = chunk_start ;
+                                                       psf->cues->cue_points [cue_index].block_start = block_start ;
+                                                       psf->cues->cue_points [cue_index].sample_offset = offset ;
+                                                       psf->cues->cue_points [cue_index].name [0] = '\0' ;
                                                        cue_count -- ;
+                                                       cue_index ++ ;
                                                        } ;
 
                                                if (bytesread != chunk_size)
@@ -593,7 +530,7 @@ wav_read_header     (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                        case LIST_MARKER :
                                        parsestage |= HAVE_other ;
 
-                                       if ((error = wav_subchunk_parse (psf, marker, chunk_size)) != 0)
+                                       if ((error = wavlike_subchunk_parse (psf, marker, chunk_size)) != 0)
                                                return error ;
                                        break ;
 
@@ -602,7 +539,7 @@ wav_read_header     (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                                        The 'bext' chunk can actually be updated, so don't need to set this.
                                        parsestage |= HAVE_other ;
                                        */
-                                       if ((error = wav_read_bext_chunk (psf, chunk_size)))
+                                       if ((error = wavlike_read_bext_chunk (psf, chunk_size)))
                                                return error ;
                                        break ;
 
@@ -616,7 +553,7 @@ wav_read_header     (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                                        break ;
 
                        case cart_MARKER:
-                                       if ((error = wav_read_cart_chunk (psf, chunk_size)))
+                                       if ((error = wavlike_read_cart_chunk (psf, chunk_size)))
                                                return error ;
                                        break ;
 
@@ -772,7 +709,7 @@ wav_read_header     (SF_PRIVATE *psf, int *blockalign, int *framesperblock)
                } ;
 
        if (wpriv->fmt_is_broken)
-               wav_w64_analyze (psf) ;
+               wavlike_analyze (psf) ;
 
        /* Only set the format endian-ness if its non-standard big-endian. */
        if (psf->endian == SF_ENDIAN_BIG)
@@ -846,7 +783,7 @@ wav_write_fmt_chunk (SF_PRIVATE *psf)
                case SF_FORMAT_IMA_ADPCM :
                                        {       int blockalign, framesperblock, bytespersec ;
 
-                                               blockalign              = wav_w64_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
+                                               blockalign              = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
                                                framesperblock  = 2 * (blockalign - 4 * psf->sf.channels) / psf->sf.channels + 1 ;
                                                bytespersec             = (psf->sf.samplerate * blockalign) / framesperblock ;
 
@@ -867,12 +804,12 @@ wav_write_fmt_chunk (SF_PRIVATE *psf)
                case SF_FORMAT_MS_ADPCM :
                                        {       int     blockalign, framesperblock, bytespersec, extrabytes ;
 
-                                               blockalign              = wav_w64_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
+                                               blockalign              = wavlike_srate2blocksize (psf->sf.samplerate * psf->sf.channels) ;
                                                framesperblock  = 2 + 2 * (blockalign - 7 * psf->sf.channels) / psf->sf.channels ;
                                                bytespersec             = (psf->sf.samplerate * blockalign) / framesperblock ;
 
                                                /* fmt chunk. */
-                                               extrabytes      = 2 + 2 + MSADPCM_ADAPT_COEFF_COUNT * (2 + 2) ;
+                                               extrabytes      = 2 + 2 + WAVLIKE_MSADPCM_ADAPT_COEFF_COUNT * (2 + 2) ;
                                                fmt_size        = 2 + 2 + 4 + 4 + 2 + 2 + 2 + extrabytes ;
 
                                                /* fmt : size, WAV format type, channels. */
@@ -884,7 +821,7 @@ wav_write_fmt_chunk (SF_PRIVATE *psf)
                                                /* fmt : blockalign, bitwidth, extrabytes, framesperblock. */
                                                psf_binheader_writef (psf, "22222", blockalign, 4, extrabytes, framesperblock, 7) ;
 
-                                               msadpcm_write_adapt_coeffs (psf) ;
+                                               wavlike_msadpcm_write_adapt_coeffs (psf) ;
                                                } ;
 
                                        add_fact_chunk = SF_TRUE ;
@@ -910,8 +847,8 @@ wav_write_fmt_chunk (SF_PRIVATE *psf)
                case SF_FORMAT_GSM610 :
                                        {       int     blockalign, framesperblock, bytespersec ;
 
-                                               blockalign              = WAV_W64_GSM610_BLOCKSIZE ;
-                                               framesperblock  = WAV_W64_GSM610_SAMPLES ;
+                                               blockalign              = WAVLIKE_GSM610_BLOCKSIZE ;
+                                               framesperblock  = WAVLIKE_GSM610_SAMPLES ;
                                                bytespersec             = (psf->sf.samplerate * blockalign) / framesperblock ;
 
                                                /* fmt chunk. */
@@ -941,7 +878,7 @@ wav_write_fmt_chunk (SF_PRIVATE *psf)
 
 static int
 wavex_write_fmt_chunk (SF_PRIVATE *psf)
-{      WAV_PRIVATE     *wpriv ;
+{      WAVLIKE_PRIVATE *wpriv ;
        int subformat, fmt_size ;
 
        if ((wpriv = psf->container_data) == NULL)
@@ -1027,28 +964,28 @@ wavex_write_fmt_chunk (SF_PRIVATE *psf)
                case SF_FORMAT_PCM_16 :
                case SF_FORMAT_PCM_24 :
                case SF_FORMAT_PCM_32 :
-                       wavex_write_guid (psf, wpriv->wavex_ambisonic == SF_AMBISONIC_NONE ?
+                       wavlike_write_guid (psf, wpriv->wavex_ambisonic == SF_AMBISONIC_NONE ?
                                                &MSGUID_SUBTYPE_PCM : &MSGUID_SUBTYPE_AMBISONIC_B_FORMAT_PCM) ;
                        break ;
 
                case SF_FORMAT_FLOAT :
                case SF_FORMAT_DOUBLE :
-                       wavex_write_guid (psf, wpriv->wavex_ambisonic == SF_AMBISONIC_NONE ?
+                       wavlike_write_guid (psf, wpriv->wavex_ambisonic == SF_AMBISONIC_NONE ?
                                                &MSGUID_SUBTYPE_IEEE_FLOAT : &MSGUID_SUBTYPE_AMBISONIC_B_FORMAT_IEEE_FLOAT) ;
                        break ;
 
                case SF_FORMAT_ULAW :
-                       wavex_write_guid (psf, &MSGUID_SUBTYPE_MULAW) ;
+                       wavlike_write_guid (psf, &MSGUID_SUBTYPE_MULAW) ;
                        break ;
 
                case SF_FORMAT_ALAW :
-                       wavex_write_guid (psf, &MSGUID_SUBTYPE_ALAW) ;
+                       wavlike_write_guid (psf, &MSGUID_SUBTYPE_ALAW) ;
                        break ;
 
 #if 0
                /* This is dead code due to return in previous switch statement. */
                case SF_FORMAT_MS_ADPCM : /* todo, GUID exists */
-                       wavex_write_guid (psf, &MSGUID_SUBTYPE_MS_ADPCM) ;
+                       wavlike_write_guid (psf, &MSGUID_SUBTYPE_MS_ADPCM) ;
                        break ;
                        return SFE_UNIMPLEMENTED ;
 #endif
@@ -1065,8 +1002,7 @@ wavex_write_fmt_chunk (SF_PRIVATE *psf)
 static int
 wav_write_header (SF_PRIVATE *psf, int calc_length)
 {      sf_count_t      current ;
-       uint32_t        uk ;
-       int             k, error, has_data = SF_FALSE ;
+       int             error, has_data = SF_FALSE ;
 
        current = psf_ftell (psf) ;
 
@@ -1085,8 +1021,8 @@ wav_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        /*
@@ -1123,20 +1059,27 @@ wav_write_header (SF_PRIVATE *psf, int calc_length)
 
        /* The LIST/INFO chunk. */
        if (psf->strings.flags & SF_STR_LOCATE_START)
-               wav_write_strings (psf, SF_STR_LOCATE_START) ;
+               wavlike_write_strings (psf, SF_STR_LOCATE_START) ;
 
        if (psf->peak_info != NULL && psf->peak_info->peak_loc == SF_PEAK_START)
-       {       psf_binheader_writef (psf, "m4", PEAK_MARKER, WAV_PEAK_CHUNK_SIZE (psf->sf.channels)) ;
-               psf_binheader_writef (psf, "44", 1, time (NULL)) ;
-               for (k = 0 ; k < psf->sf.channels ; k++)
-                       psf_binheader_writef (psf, "ft8", (float) psf->peak_info->peaks [k].value, psf->peak_info->peaks [k].position) ;
-               } ;
+               wavlike_write_peak_chunk (psf) ;
 
        if (psf->broadcast_16k != NULL)
-               wav_write_bext_chunk (psf) ;
+               wavlike_write_bext_chunk (psf) ;
 
        if (psf->cart_16k != NULL)
-               wav_write_cart_chunk (psf) ;
+               wavlike_write_cart_chunk (psf) ;
+
+       if (psf->cues != NULL)
+       {       uint32_t k ;
+
+               psf_binheader_writef (psf, "em44", cue_MARKER, 4 + psf->cues->cue_count * 6 * 4, psf->cues->cue_count) ;
+
+               for (k = 0 ; k < psf->cues->cue_count ; k++)
+                       psf_binheader_writef (psf, "e44m444", psf->cues->cue_points [k].indx, psf->cues->cue_points [k].position,
+                                               psf->cues->cue_points [k].fcc_chunk, psf->cues->cue_points [k].chunk_start,
+                                               psf->cues->cue_points [k].block_start, psf->cues->cue_points [k].sample_offset) ;
+               } ;
 
        if (psf->instrument != NULL)
        {       int             tmp ;
@@ -1164,26 +1107,26 @@ wav_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Write custom headers. */
-       for (uk = 0 ; uk < psf->wchunks.used ; uk++)
-               psf_binheader_writef (psf, "m4b", (int) psf->wchunks.chunks [uk].mark32, psf->wchunks.chunks [uk].len, psf->wchunks.chunks [uk].data, make_size_t (psf->wchunks.chunks [uk].len)) ;
+       if (psf->wchunks.used > 0)
+               wavlike_write_custom_chunks (psf) ;
 
-       if (psf->headindex + 16 < psf->dataoffset)
+       if (psf->header.indx + 16 < psf->dataoffset)
        {       /* Add PAD data if necessary. */
-               k = psf->dataoffset - (psf->headindex + 16) ;
-               psf_binheader_writef (psf, "m4z", PAD_MARKER, k, make_size_t (k)) ;
+               size_t k = psf->dataoffset - (psf->header.indx + 16) ;
+               psf_binheader_writef (psf, "m4z", PAD_MARKER, k, k) ;
                } ;
 
        psf_binheader_writef (psf, "tm8", data_MARKER, psf->datalength) ;
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
        if (psf->error)
                return psf->error ;
 
-       if (has_data && psf->dataoffset != psf->headindex)
-       {       psf_log_printf (psf, "Oooops : has_data && psf->dataoffset != psf->headindex\n") ;
+       if (has_data && psf->dataoffset != psf->header.indx)
+       {       psf_log_printf (psf, "Oooops : has_data && psf->dataoffset != psf->header.indx\n") ;
                return psf->error = SFE_INTERNAL ;
                } ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (! has_data)
                psf_fseek (psf, psf->dataoffset, SEEK_SET) ;
@@ -1196,11 +1139,10 @@ wav_write_header (SF_PRIVATE *psf, int calc_length)
 
 static int
 wav_write_tailer (SF_PRIVATE *psf)
-{      int             k ;
-
+{
        /* Reset the current header buffer length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
 
        if (psf->bytewidth > 0 && psf->sf.seekable == SF_TRUE)
        {       psf->datalength = psf->sf.frames * psf->bytewidth * psf->sf.channels ;
@@ -1217,88 +1159,18 @@ wav_write_tailer (SF_PRIVATE *psf)
 
        /* Add a PEAK chunk if requested. */
        if (psf->peak_info != NULL && psf->peak_info->peak_loc == SF_PEAK_END)
-       {       psf_binheader_writef (psf, "m4", PEAK_MARKER, WAV_PEAK_CHUNK_SIZE (psf->sf.channels)) ;
-               psf_binheader_writef (psf, "44", 1, time (NULL)) ;
-               for (k = 0 ; k < psf->sf.channels ; k++)
-                       psf_binheader_writef (psf, "f4", psf->peak_info->peaks [k].value, psf->peak_info->peaks [k].position) ;
-               } ;
+               wavlike_write_peak_chunk (psf) ;
 
        if (psf->strings.flags & SF_STR_LOCATE_END)
-               wav_write_strings (psf, SF_STR_LOCATE_END) ;
+               wavlike_write_strings (psf, SF_STR_LOCATE_END) ;
 
        /* Write the tailer. */
-       if (psf->headindex > 0)
-               psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       if (psf->header.indx > 0)
+               psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        return 0 ;
 } /* wav_write_tailer */
 
-static void
-wav_write_strings (SF_PRIVATE *psf, int location)
-{      int     k, prev_head_index, saved_head_index ;
-
-       if (psf_location_string_count (psf, location) == 0)
-               return ;
-
-       prev_head_index = psf->headindex + 4 ;
-
-       psf_binheader_writef (psf, "m4m", LIST_MARKER, 0xBADBAD, INFO_MARKER) ;
-
-       for (k = 0 ; k < SF_MAX_STRINGS ; k++)
-       {       if (psf->strings.data [k].type == 0)
-                       break ;
-               if (psf->strings.data [k].type < 0 || psf->strings.data [k].flags != location)
-                       continue ;
-
-               switch (psf->strings.data [k].type)
-               {       case SF_STR_SOFTWARE :
-                               psf_binheader_writef (psf, "ms", ISFT_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
-                               break ;
-
-                       case SF_STR_TITLE :
-                               psf_binheader_writef (psf, "ms", INAM_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
-                               break ;
-
-                       case SF_STR_COPYRIGHT :
-                               psf_binheader_writef (psf, "ms", ICOP_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
-                               break ;
-
-                       case SF_STR_ARTIST :
-                               psf_binheader_writef (psf, "ms", IART_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
-                               break ;
-
-                       case SF_STR_COMMENT :
-                               psf_binheader_writef (psf, "ms", ICMT_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
-                               break ;
-
-                       case SF_STR_DATE :
-                               psf_binheader_writef (psf, "ms", ICRD_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
-                               break ;
-
-                       case SF_STR_GENRE :
-                               psf_binheader_writef (psf, "ms", IGNR_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
-                               break ;
-
-                       case SF_STR_ALBUM :
-                               psf_binheader_writef (psf, "ms", IPRD_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
-                               break ;
-
-                       case SF_STR_TRACKNUMBER :
-                               psf_binheader_writef (psf, "ms", ITRK_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
-                               break ;
-
-                       default :
-                               break ;
-                       } ;
-               } ;
-
-       saved_head_index = psf->headindex ;
-       psf->headindex = prev_head_index ;
-       psf_binheader_writef (psf, "4", saved_head_index - prev_head_index - 4) ;
-       psf->headindex = saved_head_index ;
-
-} /* wav_write_strings */
-
 static int
 wav_close (SF_PRIVATE *psf)
 {
@@ -1327,7 +1199,7 @@ wav_close (SF_PRIVATE *psf)
 
 static int
 wav_command (SF_PRIVATE *psf, int command, void * UNUSED (data), int datasize)
-{      WAV_PRIVATE     *wpriv ;
+{      WAVLIKE_PRIVATE *wpriv ;
 
        if ((wpriv = psf->container_data) == NULL)
                return SFE_INTERNAL ;
@@ -1348,7 +1220,7 @@ wav_command (SF_PRIVATE *psf, int command, void * UNUSED (data), int datasize)
                        return wpriv->wavex_ambisonic ;
 
                case SFC_SET_CHANNEL_MAP_INFO :
-                       wpriv->wavex_channelmask = wavex_gen_channel_mask (psf->channel_map, psf->sf.channels) ;
+                       wpriv->wavex_channelmask = wavlike_gen_channel_mask (psf->channel_map, psf->sf.channels) ;
                        return (wpriv->wavex_channelmask != 0) ;
 
                default :
@@ -1359,194 +1231,6 @@ wav_command (SF_PRIVATE *psf, int command, void * UNUSED (data), int datasize)
 } /* wav_command */
 
 static int
-wav_subchunk_parse (SF_PRIVATE *psf, int chunk, uint32_t chunk_length)
-{      sf_count_t      current_pos ;
-       char            buffer [512] ;
-       uint32_t        chunk_size, bytesread ;
-
-       current_pos = psf_fseek (psf, 0, SEEK_CUR) - 4 ;
-
-       bytesread = sizeof (chunk_length) ;
-
-       if (chunk_length <= 8)
-       {       /* This case is for broken files generated by PEAK. */
-               psf_log_printf (psf, "%M : %u (weird length)\n", chunk, chunk_length) ;
-               psf_binheader_readf (psf, "mj", &chunk, chunk_length - 4) ;
-               psf_log_printf (psf, "  %M\n", chunk) ;
-               return 0 ;
-               } ;
-
-       if (psf->headindex + chunk_length > SIGNED_SIZEOF (psf->header))
-       {       psf_log_printf (psf, "%M : %u (too long)\n", chunk, chunk_length) ;
-               psf_binheader_readf (psf, "j", chunk_length) ;
-               return 0 ;
-               } ;
-
-       if (current_pos + chunk_length > psf->filelength)
-       {       psf_log_printf (psf, "%M : %u (should be %d)\n", chunk, chunk_length, (int) (psf->filelength - current_pos)) ;
-               chunk_length = psf->filelength - current_pos ;
-               }
-       else
-               psf_log_printf (psf, "%M : %u\n", chunk, chunk_length) ;
-
-       while (bytesread < chunk_length)
-       {       uint32_t thisread ;
-
-               if ((thisread = psf_binheader_readf (psf, "m", &chunk)) == 0)
-                       break ;
-               bytesread += thisread ;
-
-               switch (chunk)
-               {       case adtl_MARKER :
-                       case INFO_MARKER :
-                                       /* These markers don't contain anything, not even a chunk lebgth. */
-                                       psf_log_printf (psf, "  %M\n", chunk) ;
-                                       continue ;
-
-                       case exif_MARKER :
-                                       psf_log_printf (psf, "  %M\n", chunk) ;
-                                       bytesread += exif_subchunk_parse (psf, chunk_length - bytesread) ;
-                                       continue ;
-
-                       case data_MARKER :
-                                       psf_log_printf (psf, "  %M inside a LIST block??? Backing out.\n", chunk) ;
-                                       /* Jump back four bytes and return to caller. */
-                                       psf_binheader_readf (psf, "j", -4) ;
-                                       return 0 ;
-
-                       case 0 :
-                                       /*
-                                       **      Four zero bytes where a marker was expected. Assume this means
-                                       **      the rest of the chunk is garbage.
-                                       */
-                                       psf_log_printf (psf, "    *** Found weird-ass zero marker. Jumping to end of chunk.\n") ;
-                                       if (bytesread < chunk_length)
-                                               bytesread += psf_binheader_readf (psf, "j", chunk_length - bytesread + 4) ;
-                                       psf_log_printf (psf, "    *** Offset is now : 0x%X\n", psf_fseek (psf, 0, SEEK_CUR)) ;
-                                       return 0 ;
-
-                       default :
-                                       break ;
-                       } ;
-
-               switch (chunk)
-               {       case ISFT_MARKER :
-                       case ICOP_MARKER :
-                       case IARL_MARKER :
-                       case IART_MARKER :
-                       case ICMT_MARKER :
-                       case ICRD_MARKER :
-                       case IENG_MARKER :
-                       case IGNR_MARKER :
-                       case INAM_MARKER :
-                       case IPRD_MARKER :
-                       case ISBJ_MARKER :
-                       case ISRC_MARKER :
-                       case IAUT_MARKER :
-                       case ITRK_MARKER :
-                                       bytesread += psf_binheader_readf (psf, "4", &chunk_size) ;
-                                       chunk_size += (chunk_size & 1) ;
-                                       if (chunk_size >= SIGNED_SIZEOF (buffer) || chunk_size >= chunk_length)
-                                       {       psf_log_printf (psf, "  *** %M : %u (too big)\n", chunk, chunk_size) ;
-                                               psf_binheader_readf (psf, "j", chunk_length) ;
-                                               return 0 ;
-                                               } ;
-
-                                       bytesread += psf_binheader_readf (psf, "b", buffer, chunk_size) ;
-                                       buffer [chunk_size] = 0 ;
-                                       psf_log_printf (psf, "    %M : %s\n", chunk, buffer) ;
-                                       break ;
-
-                       case labl_MARKER :
-                                       {       int mark_id ;
-
-                                               bytesread += psf_binheader_readf (psf, "44", &chunk_size, &mark_id) ;
-                                               chunk_size -= 4 ;
-                                               chunk_size += (chunk_size & 1) ;
-                                               if (chunk_size < 1 || chunk_size >= SIGNED_SIZEOF (buffer) || chunk_size >= chunk_length)
-                                               {       psf_log_printf (psf, "  *** %M : %u (too big)\n", chunk, chunk_size) ;
-                                                       psf_binheader_readf (psf, "j", chunk_length) ;
-                                                       break ;
-                                                       } ;
-
-                                               bytesread += psf_binheader_readf (psf, "b", buffer, chunk_size) ;
-                                               buffer [chunk_size] = 0 ;
-                                               psf_log_printf (psf, "    %M : %u : %s\n", chunk, mark_id, buffer) ;
-                                               } ;
-                                       break ;
-
-
-                       case DISP_MARKER :
-                       case ltxt_MARKER :
-                       case note_MARKER :
-                                       bytesread += psf_binheader_readf (psf, "4", &chunk_size) ;
-                                       chunk_size += (chunk_size & 1) ;
-                                       if (chunk_size >= SIGNED_SIZEOF (buffer) || chunk_size >= chunk_length)
-                                       {       psf_log_printf (psf, "  *** %M : %u (too big)\n", chunk, chunk_size) ;
-                                               psf_binheader_readf (psf, "j", chunk_length) ;
-                                               return 0 ;
-                                               } ;
-
-                                       bytesread += psf_binheader_readf (psf, "j", chunk_size) ;
-                                       psf_log_printf (psf, "    %M : %u\n", chunk, chunk_size) ;
-                                       break ;
-
-                       default :
-                                       bytesread += psf_binheader_readf (psf, "4", &chunk_size) ;
-                                       chunk_size += (chunk_size & 1) ;
-                                       psf_log_printf (psf, "    *** %M : %u\n", chunk, chunk_size) ;
-                                       if (bytesread + chunk_size > chunk_length)
-                                       {       bytesread += psf_binheader_readf (psf, "j", chunk_length - bytesread + 4) ;
-                                               continue ;
-                                               }
-                                       else
-                                               bytesread += psf_binheader_readf (psf, "j", chunk_size) ;
-
-                                       if (chunk_size >= chunk_length)
-                                               return 0 ;
-                                       break ;
-                       } ;
-
-               switch (chunk)
-               {       case ISFT_MARKER :
-                                       psf_store_string (psf, SF_STR_SOFTWARE, buffer) ;
-                                       break ;
-                       case ICOP_MARKER :
-                                       psf_store_string (psf, SF_STR_COPYRIGHT, buffer) ;
-                                       break ;
-                       case INAM_MARKER :
-                                       psf_store_string (psf, SF_STR_TITLE, buffer) ;
-                                       break ;
-                       case IART_MARKER :
-                                       psf_store_string (psf, SF_STR_ARTIST, buffer) ;
-                                       break ;
-                       case ICMT_MARKER :
-                                       psf_store_string (psf, SF_STR_COMMENT, buffer) ;
-                                       break ;
-                       case ICRD_MARKER :
-                                       psf_store_string (psf, SF_STR_DATE, buffer) ;
-                                       break ;
-                       case IGNR_MARKER :
-                                       psf_store_string (psf, SF_STR_GENRE, buffer) ;
-                                       break ;
-                       case IPRD_MARKER :
-                                       psf_store_string (psf, SF_STR_ALBUM, buffer) ;
-                                       break ;
-                       case ITRK_MARKER :
-                                       psf_store_string (psf, SF_STR_TRACKNUMBER, buffer) ;
-                                       break ;
-                       } ;
-               } ;
-
-       current_pos = psf_fseek (psf, 0, SEEK_CUR) - current_pos ;
-
-       if (current_pos - 4 != chunk_length)
-               psf_log_printf (psf, "**** Bad chunk length %d sbould be %D\n", chunk_length, current_pos - 4) ;
-
-       return 0 ;
-} /* wav_subchunk_parse */
-
-static int
 wav_read_smpl_chunk (SF_PRIVATE *psf, uint32_t chunklen)
 {      char buffer [512] ;
        uint32_t thisread, bytesread = 0, dword, sampler_data, loop_count ;
@@ -1758,293 +1442,6 @@ wav_read_acid_chunk (SF_PRIVATE *psf, uint32_t chunklen)
        return 0 ;
 } /* wav_read_acid_chunk */
 
-int
-wav_read_bext_chunk (SF_PRIVATE *psf, uint32_t chunksize)
-{
-       SF_BROADCAST_INFO_16K * b ;
-       uint32_t bytes = 0 ;
-
-       if (chunksize < WAV_BEXT_MIN_CHUNK_SIZE)
-       {       psf_log_printf (psf, "bext : %u (should be >= %d)\n", chunksize, WAV_BEXT_MIN_CHUNK_SIZE) ;
-               psf_binheader_readf (psf, "j", chunksize) ;
-               return 0 ;
-               } ;
-
-       if (chunksize > WAV_BEXT_MAX_CHUNK_SIZE)
-       {       psf_log_printf (psf, "bext : %u (should be < %d)\n", chunksize, WAV_BEXT_MAX_CHUNK_SIZE) ;
-               psf_binheader_readf (psf, "j", chunksize) ;
-               return 0 ;
-               } ;
-
-       if (chunksize >= sizeof (SF_BROADCAST_INFO_16K))
-       {       psf_log_printf (psf, "bext : %u too big to be handled\n", chunksize) ;
-               psf_binheader_readf (psf, "j", chunksize) ;
-               return 0 ;
-               } ;
-
-       psf_log_printf (psf, "bext : %u\n", chunksize) ;
-
-       if ((psf->broadcast_16k = broadcast_var_alloc ()) == NULL)
-       {       psf->error = SFE_MALLOC_FAILED ;
-               return psf->error ;
-               } ;
-
-       b = psf->broadcast_16k ;
-
-       bytes += psf_binheader_readf (psf, "b", b->description, sizeof (b->description)) ;
-       bytes += psf_binheader_readf (psf, "b", b->originator, sizeof (b->originator)) ;
-       bytes += psf_binheader_readf (psf, "b", b->originator_reference, sizeof (b->originator_reference)) ;
-       bytes += psf_binheader_readf (psf, "b", b->origination_date, sizeof (b->origination_date)) ;
-       bytes += psf_binheader_readf (psf, "b", b->origination_time, sizeof (b->origination_time)) ;
-       bytes += psf_binheader_readf (psf, "442", &b->time_reference_low, &b->time_reference_high, &b->version) ;
-       bytes += psf_binheader_readf (psf, "bj", &b->umid, sizeof (b->umid), 190) ;
-
-       if (chunksize > WAV_BEXT_MIN_CHUNK_SIZE)
-       {       /* File has coding history data. */
-
-               b->coding_history_size = chunksize - WAV_BEXT_MIN_CHUNK_SIZE ;
-
-               /* We do not parse the coding history */
-               bytes += psf_binheader_readf (psf, "b", b->coding_history, b->coding_history_size) ;
-               } ;
-
-       if (bytes < chunksize)
-               psf_binheader_readf (psf, "j", chunksize - bytes) ;
-
-       return 0 ;
-} /* wav_read_bext_chunk */
-
-int
-wav_write_bext_chunk (SF_PRIVATE *psf)
-{      SF_BROADCAST_INFO_16K *b ;
-
-       if (psf->broadcast_16k == NULL)
-               return -1 ;
-
-       b = psf->broadcast_16k ;
-
-       psf_binheader_writef (psf, "m4", bext_MARKER, WAV_BEXT_MIN_CHUNK_SIZE + b->coding_history_size) ;
-
-       /*
-       **      Note that it is very important that the field widths of the SF_BROADCAST_INFO
-       **      struct match those of the bext chunk fields.
-       */
-
-       psf_binheader_writef (psf, "b", b->description, sizeof (b->description)) ;
-       psf_binheader_writef (psf, "b", b->originator, sizeof (b->originator)) ;
-       psf_binheader_writef (psf, "b", b->originator_reference, sizeof (b->originator_reference)) ;
-       psf_binheader_writef (psf, "b", b->origination_date, sizeof (b->origination_date)) ;
-       psf_binheader_writef (psf, "b", b->origination_time, sizeof (b->origination_time)) ;
-       psf_binheader_writef (psf, "442", b->time_reference_low, b->time_reference_high, b->version) ;
-       psf_binheader_writef (psf, "b", b->umid, sizeof (b->umid)) ;
-       psf_binheader_writef (psf, "z", make_size_t (190)) ;
-
-       if (b->coding_history_size > 0)
-               psf_binheader_writef (psf, "b", b->coding_history, make_size_t (b->coding_history_size)) ;
-
-       return 0 ;
-} /* wav_write_bext_chunk */
-
-int
-wav_read_cart_chunk (SF_PRIVATE *psf, uint32_t chunksize)
-{      SF_CART_INFO_16K *c ;
-       uint32_t bytes = 0 ;
-       int k ;
-
-       if (chunksize < WAV_CART_MIN_CHUNK_SIZE)
-       {       psf_log_printf (psf, "cart : %u (should be >= %d)\n", chunksize, WAV_CART_MIN_CHUNK_SIZE) ;
-               psf_binheader_readf (psf, "j", chunksize) ;
-               return 0 ;
-               } ;
-       if (chunksize > WAV_CART_MAX_CHUNK_SIZE)
-       {       psf_log_printf (psf, "cart : %u (should be < %d)\n", chunksize, WAV_CART_MAX_CHUNK_SIZE) ;
-               psf_binheader_readf (psf, "j", chunksize) ;
-               return 0 ;
-               } ;
-
-       if (chunksize >= sizeof (SF_CART_INFO_16K))
-       {       psf_log_printf (psf, "cart : %u too big to be handled\n", chunksize) ;
-               psf_binheader_readf (psf, "j", chunksize) ;
-               return 0 ;
-               } ;
-
-       psf_log_printf (psf, "cart : %u\n", chunksize) ;
-
-       if ((psf->cart_16k = cart_var_alloc ()) == NULL)
-       {       psf->error = SFE_MALLOC_FAILED ;
-               return psf->error ;
-               } ;
-
-       c = psf->cart_16k ;
-       bytes += psf_binheader_readf (psf, "b", c->version, sizeof (c->version)) ;
-       bytes += psf_binheader_readf (psf, "b", c->title, sizeof (c->title)) ;
-       bytes += psf_binheader_readf (psf, "b", c->artist, sizeof (c->artist)) ;
-       bytes += psf_binheader_readf (psf, "b", c->cut_id, sizeof (c->cut_id)) ;
-       bytes += psf_binheader_readf (psf, "b", c->client_id, sizeof (c->client_id)) ;
-       bytes += psf_binheader_readf (psf, "b", c->category, sizeof (c->category)) ;
-       bytes += psf_binheader_readf (psf, "b", c->classification, sizeof (c->classification)) ;
-       bytes += psf_binheader_readf (psf, "b", c->out_cue, sizeof (c->out_cue)) ;
-       bytes += psf_binheader_readf (psf, "b", c->start_date, sizeof (c->start_date)) ;
-       bytes += psf_binheader_readf (psf, "b", c->start_time, sizeof (c->start_time)) ;
-       bytes += psf_binheader_readf (psf, "b", c->end_date, sizeof (c->end_date)) ;
-       bytes += psf_binheader_readf (psf, "b", c->end_time, sizeof (c->end_time)) ;
-       bytes += psf_binheader_readf (psf, "b", c->producer_app_id, sizeof (c->producer_app_id)) ;
-       bytes += psf_binheader_readf (psf, "b", c->producer_app_version, sizeof (c->producer_app_version)) ;
-       bytes += psf_binheader_readf (psf, "b", c->user_def, sizeof (c->user_def)) ;
-       bytes += psf_binheader_readf (psf, "e4", &c->level_reference, sizeof (c->level_reference)) ;
-
-       for (k = 0 ; k < ARRAY_LEN (c->post_timers) ; k++)
-               bytes += psf_binheader_readf (psf, "b4", &c->post_timers [k].usage, make_size_t (4), &c->post_timers [k].value) ;
-
-       bytes += psf_binheader_readf (psf, "b", c->reserved, sizeof (c->reserved)) ;
-       bytes += psf_binheader_readf (psf, "b", c->url, sizeof (c->url)) ;
-
-       if (chunksize > WAV_CART_MIN_CHUNK_SIZE)
-       {       /* File has tag text. */
-               c->tag_text_size = chunksize - WAV_CART_MIN_CHUNK_SIZE ;
-               bytes += psf_binheader_readf (psf, "b", c->tag_text, make_size_t (c->tag_text_size)) ;
-               } ;
-
-       return 0 ;
-} /* wav_read_cart_chunk */
-
-int
-wav_write_cart_chunk (SF_PRIVATE *psf)
-{      SF_CART_INFO_16K *c ;
-       int k ;
-
-       if (psf->cart_16k == NULL)
-               return -1 ;
-
-       c = psf->cart_16k ;
-       psf_binheader_writef (psf, "m4", cart_MARKER, WAV_CART_MIN_CHUNK_SIZE + c->tag_text_size) ;
-       /*
-       **      Note that it is very important that the field widths of the SF_CART_INFO
-       **      struct match those of the cart chunk fields.
-       */
-       psf_binheader_writef (psf, "b", c->version, sizeof (c->version)) ;
-       psf_binheader_writef (psf, "b", c->title, sizeof (c->title)) ;
-       psf_binheader_writef (psf, "b", c->artist, sizeof (c->artist)) ;
-       psf_binheader_writef (psf, "b", c->cut_id, sizeof (c->cut_id)) ;
-       psf_binheader_writef (psf, "b", c->client_id, sizeof (c->client_id)) ;
-       psf_binheader_writef (psf, "b", c->category, sizeof (c->category)) ;
-       psf_binheader_writef (psf, "b", c->classification, sizeof (c->classification)) ;
-       psf_binheader_writef (psf, "b", c->out_cue, sizeof (c->out_cue)) ;
-       psf_binheader_writef (psf, "b", c->start_date, sizeof (c->start_date)) ;
-       psf_binheader_writef (psf, "b", c->start_time, sizeof (c->start_time)) ;
-       psf_binheader_writef (psf, "b", c->end_date, sizeof (c->end_date)) ;
-       psf_binheader_writef (psf, "b", c->end_time, sizeof (c->end_time)) ;
-       psf_binheader_writef (psf, "b", c->producer_app_id, sizeof (c->producer_app_id)) ;
-       psf_binheader_writef (psf, "b", c->producer_app_version, sizeof (c->producer_app_version)) ;
-       psf_binheader_writef (psf, "b", c->user_def, sizeof (c->user_def)) ;
-       psf_binheader_writef (psf, "4", c->level_reference, sizeof (c->level_reference)) ;
-
-       for (k = 0 ; k < ARRAY_LEN (c->post_timers) ; k++)
-               psf_binheader_writef (psf, "b4", c->post_timers [k].usage, make_size_t (4), c->post_timers [k].value) ;
-
-       psf_binheader_writef (psf, "z", sizeof (c->reserved)) ; // just write zeros, we don't have any other use for it
-       psf_binheader_writef (psf, "b", c->url, sizeof (c->url)) ;
-
-       if (c->tag_text_size > 0)
-               psf_binheader_writef (psf, "b", c->tag_text, make_size_t (c->tag_text_size)) ;
-
-       return 0 ;
-} /* wav_write_cart_chunk */
-
-static int
-exif_fill_and_sink (SF_PRIVATE *psf, char* buf, size_t bufsz, size_t toread)
-{
-       size_t bytesread = 0 ;
-
-       buf [0] = 0 ;
-       bufsz -= 1 ;
-       if (toread < bufsz)
-               bufsz = toread ;
-       bytesread = psf_binheader_readf (psf, "b", buf, bufsz) ;
-       buf [bufsz] = 0 ;
-
-       if (bytesread == bufsz && toread > bufsz)
-               bytesread += psf_binheader_readf (psf, "j", toread - bufsz) ;
-
-       return bytesread ;
-} /* exif_fill_and_sink */
-
-/*
-** Exif specification for audio files, at JEITA CP-3451 Exif 2.2 section 5
-** (Exif Audio File Specification) http://www.exif.org/Exif2-2.PDF
-*/
-static int
-exif_subchunk_parse (SF_PRIVATE *psf, uint32_t length)
-{      uint32_t marker, dword, vmajor = -1, vminor = -1, bytesread = 0 ;
-       char buf [4096] ;
-       int thisread ;
-
-       while (bytesread < length)
-       {
-               if ((thisread = psf_binheader_readf (psf, "m", &marker)) == 0)
-                       break ;
-               bytesread += thisread ;
-
-               switch (marker)
-               {
-                       case 0 : /* camera padding? */
-                               break ;
-
-                       case ever_MARKER :
-                               bytesread += psf_binheader_readf (psf, "j4", 4, &dword) ;
-                               vmajor = 10 * (((dword >> 24) & 0xff) - '0') + (((dword >> 16) & 0xff) - '0') ;
-                               vminor = 10 * (((dword >> 8) & 0xff) - '0') + ((dword & 0xff) - '0') ;
-                               psf_log_printf (psf, "    EXIF Version : %u.%02u\n", vmajor, vminor) ;
-                               break ;
-
-                       case olym_MARKER :
-                               bytesread += psf_binheader_readf (psf, "4", &dword) ;
-                               psf_log_printf (psf, "%M : %u\n", marker, dword) ;
-                               if (bytesread + dword > length)
-                                       break ;
-                               dword += (dword & 1) ;
-                               bytesread += psf_binheader_readf (psf, "j", dword) ;
-                               break ;
-
-                       case emnt_MARKER : /* design information: null-terminated string */
-                       case emdl_MARKER : /* model name ; null-terminated string */
-                       case ecor_MARKER : /* manufacturer: null-terminated string */
-                       case etim_MARKER : /* creation time: null-terminated string in the format "hour:minute:second.subsecond" */
-                       case erel_MARKER : /* relation info: null-terminated string (filename) */
-                       case eucm_MARKER : /* user comment: 4-byte size follows, then possibly unicode data */
-                               bytesread += psf_binheader_readf (psf, "4", &dword) ;
-                               bytesread += sizeof (dword) ;
-                               dword += (dword & 1) ;
-
-                               if (dword >= sizeof (buf))
-                               {       psf_log_printf (psf, "*** Marker '%M' is too big %u\n\n", marker, dword) ;
-                                       return bytesread ;
-                                       } ;
-
-                               bytesread += exif_fill_and_sink (psf, buf, sizeof (buf), dword) ;
-
-                               /* BAD - don't know what's going on here -- maybe a bug in the camera */
-                               /* field should be NULL-terminated but there's no room for it with the reported number */
-                               /*  example output:     emdl : 8 (EX-Z1050) */
-                               if (marker == emdl_MARKER && dword == strlen (buf) /* should be >= strlen+1*/)
-                               {       psf_log_printf (psf, "    *** field size too small for string (sinking 2 bytes)\n") ;
-                                       bytesread += psf_binheader_readf (psf, "j", 2) ;
-                                       } ;
-
-                               psf_log_printf (psf, "    %M : %u (%s)\n", marker, dword, buf) ;
-                               if (dword > length)
-                                       return bytesread ;
-                               break ;
-
-                       default :
-                               psf_log_printf (psf, "    *** %M (%u): -- ignored --\n", marker, marker) ;
-                               break ;
-                       } ;
-               } ;
-
-       return bytesread ;
-} /* exif_subchunk_parse */
-
 /*==============================================================================
 */
 
similarity index 52%
rename from src/wav_w64.c
rename to src/wavlike.c
index 8639837..86ebf01 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2004-2005 David Viens <davidv@plogue.com>
 **
 ** This program is free software; you can redistribute it and/or modify
 #include       "sndfile.h"
 #include       "sfendian.h"
 #include       "common.h"
-#include       "wav_w64.h"
+#include       "wavlike.h"
+
+
+#define WAV_BEXT_MIN_CHUNK_SIZE                602
+#define WAV_BEXT_MAX_CHUNK_SIZE                (10 * 1024)
+
+#define WAV_CART_MIN_CHUNK_SIZE                2048
+#define WAV_CART_MAX_CHUNK_SIZE                0xffffffff
+
+
+static int     exif_subchunk_parse     (SF_PRIVATE *psf, uint32_t length) ;
+
 
 /*  Known WAVEFORMATEXTENSIBLE GUIDS.  */
 static const EXT_SUBFORMAT MSGUID_SUBTYPE_PCM =
@@ -110,8 +121,8 @@ wavex_guid_equal (const EXT_SUBFORMAT * first, const EXT_SUBFORMAT * second)
 
 
 int
-wav_w64_read_fmt_chunk (SF_PRIVATE *psf, int fmtsize)
-{      WAV_PRIVATE * wpriv ;
+wavlike_read_fmt_chunk (SF_PRIVATE *psf, int fmtsize)
+{      WAVLIKE_PRIVATE * wpriv ;
        WAV_FMT *wav_fmt ;
        int     bytesread, k, bytespersec = 0 ;
 
@@ -132,7 +143,7 @@ wav_w64_read_fmt_chunk (SF_PRIVATE *psf, int fmtsize)
                                        &(wav_fmt->min.samplerate), &(wav_fmt->min.bytespersec),
                                        &(wav_fmt->min.blockalign), &(wav_fmt->min.bitwidth)) ;
 
-       psf_log_printf (psf, "  Format        : 0x%X => %s\n", wav_fmt->format, wav_w64_format_str (wav_fmt->format)) ;
+       psf_log_printf (psf, "  Format        : 0x%X => %s\n", wav_fmt->format, wavlike_format_str (wav_fmt->format)) ;
        psf_log_printf (psf, "  Channels      : %d\n", wav_fmt->min.channels) ;
        psf_log_printf (psf, "  Sample Rate   : %d\n", wav_fmt->min.samplerate) ;
 
@@ -411,7 +422,7 @@ wav_w64_read_fmt_chunk (SF_PRIVATE *psf, int fmtsize)
                                                psf_log_printf (psf, "  Extra Bytes   : %d (should be 2)\n", wav_fmt->g72x.extrabytes) ;
                                        else
                                                psf_log_printf (psf, "  Extra Bytes   : %d\n", wav_fmt->g72x.extrabytes) ;
-                                               psf_log_printf (psf, "  Aux Blk Size  : %d\n", wav_fmt->g72x.auxblocksize) ;
+                                       psf_log_printf (psf, "  Aux Blk Size  : %d\n", wav_fmt->g72x.auxblocksize) ;
                                        }
                                else if (fmtsize == 18)
                                {       bytesread += psf_binheader_readf (psf, "2", &(wav_fmt->g72x.extrabytes)) ;
@@ -427,7 +438,7 @@ wav_w64_read_fmt_chunk (SF_PRIVATE *psf, int fmtsize)
                } ;
 
        if (bytesread > fmtsize)
-       {       psf_log_printf (psf, "*** wav_w64_read_fmt_chunk (bytesread > fmtsize)\n") ;
+       {       psf_log_printf (psf, "*** wavlike_read_fmt_chunk (bytesread > fmtsize)\n") ;
                return SFE_WAV_BAD_FMT ;
                }
        else
@@ -436,19 +447,19 @@ wav_w64_read_fmt_chunk (SF_PRIVATE *psf, int fmtsize)
        psf->blockwidth = wav_fmt->min.channels * psf->bytewidth ;
 
        return 0 ;
-} /* wav_w64_read_fmt_chunk */
+} /* wavlike_read_fmt_chunk */
 
 void
-wavex_write_guid (SF_PRIVATE *psf, const EXT_SUBFORMAT * subformat)
+wavlike_write_guid (SF_PRIVATE *psf, const EXT_SUBFORMAT * subformat)
 {
        psf_binheader_writef (psf, "422b", subformat->esf_field1,
                                        subformat->esf_field2, subformat->esf_field3,
                                        subformat->esf_field4, make_size_t (8)) ;
-} /* wavex_write_guid */
+} /* wavlike_write_guid */
 
 
 int
-wavex_gen_channel_mask (const int *chan_map, int channels)
+wavlike_gen_channel_mask (const int *chan_map, int channels)
 {      int chan, mask = 0, bit = -1, last_bit = -1 ;
 
        if (chan_map == NULL)
@@ -472,10 +483,10 @@ wavex_gen_channel_mask (const int *chan_map, int channels)
                } ;
 
        return mask ;
-} /* wavex_gen_channel_mask */
+} /* wavlike_gen_channel_mask */
 
 void
-wav_w64_analyze (SF_PRIVATE *psf)
+wavlike_analyze (SF_PRIVATE *psf)
 {      unsigned char buffer [4096] ;
        AUDIO_DETECT ad ;
        int format = 0 ;
@@ -504,33 +515,33 @@ wav_w64_analyze (SF_PRIVATE *psf)
        psf_fseek (psf, psf->dataoffset, SEEK_SET) ;
 
        if (format == 0)
-       {       psf_log_printf (psf, "wav_w64_analyze : detection failed.\n") ;
+       {       psf_log_printf (psf, "wavlike_analyze : detection failed.\n") ;
                return ;
                } ;
 
        switch (format)
        {       case SF_FORMAT_PCM_32 :
                case SF_FORMAT_FLOAT :
-                       psf_log_printf (psf, "wav_w64_analyze : found format : 0x%X\n", format) ;
+                       psf_log_printf (psf, "wavlike_analyze : found format : 0x%X\n", format) ;
                        psf->sf.format = (psf->sf.format & ~SF_FORMAT_SUBMASK) + format ;
                        psf->bytewidth = 4 ;
                        psf->blockwidth = psf->sf.channels * psf->bytewidth ;
                        break ;
 
                case SF_FORMAT_PCM_24 :
-                       psf_log_printf (psf, "wav_w64_analyze : found format : 0x%X\n", format) ;
+                       psf_log_printf (psf, "wavlike_analyze : found format : 0x%X\n", format) ;
                        psf->sf.format = (psf->sf.format & ~SF_FORMAT_SUBMASK) + format ;
                        psf->bytewidth = 3 ;
                        psf->blockwidth = psf->sf.channels * psf->bytewidth ;
                        break ;
 
                default :
-                       psf_log_printf (psf, "wav_w64_analyze : unhandled format : 0x%X\n", format) ;
+                       psf_log_printf (psf, "wavlike_analyze : unhandled format : 0x%X\n", format) ;
                        break ;
                } ;
 
        return ;
-} /* wav_w64_analyze */
+} /* wavlike_analyze */
 
 /*==============================================================================
 */
@@ -653,7 +664,7 @@ static WAV_FORMAT_DESC wave_descs [] =
 } ;
 
 char const*
-wav_w64_format_str (int k)
+wavlike_format_str (int k)
 {      int lower, upper, mid ;
 
        lower = -1 ;
@@ -675,10 +686,10 @@ wav_w64_format_str (int k)
                } ;
 
        return "Unknown format" ;
-} /* wav_w64_format_str */
+} /* wavlike_format_str */
 
 int
-wav_w64_srate2blocksize (int srate_chan_product)
+wavlike_srate2blocksize (int srate_chan_product)
 {      if (srate_chan_product < 12000)
                return 256 ;
        if (srate_chan_product < 23000)
@@ -687,3 +698,600 @@ wav_w64_srate2blocksize (int srate_chan_product)
                return 1024 ;
        return 2048 ;
 } /* srate2blocksize */
+
+int
+wavlike_read_bext_chunk (SF_PRIVATE *psf, uint32_t chunksize)
+{
+       SF_BROADCAST_INFO_16K * b ;
+       uint32_t bytes = 0 ;
+
+       if (chunksize < WAV_BEXT_MIN_CHUNK_SIZE)
+       {       psf_log_printf (psf, "bext : %u (should be >= %d)\n", chunksize, WAV_BEXT_MIN_CHUNK_SIZE) ;
+               psf_binheader_readf (psf, "j", chunksize) ;
+               return 0 ;
+               } ;
+
+       if (chunksize > WAV_BEXT_MAX_CHUNK_SIZE)
+       {       psf_log_printf (psf, "bext : %u (should be < %d)\n", chunksize, WAV_BEXT_MAX_CHUNK_SIZE) ;
+               psf_binheader_readf (psf, "j", chunksize) ;
+               return 0 ;
+               } ;
+
+       if (chunksize >= sizeof (SF_BROADCAST_INFO_16K))
+       {       psf_log_printf (psf, "bext : %u too big to be handled\n", chunksize) ;
+               psf_binheader_readf (psf, "j", chunksize) ;
+               return 0 ;
+               } ;
+
+       psf_log_printf (psf, "bext : %u\n", chunksize) ;
+
+       if ((psf->broadcast_16k = broadcast_var_alloc ()) == NULL)
+       {       psf->error = SFE_MALLOC_FAILED ;
+               return psf->error ;
+               } ;
+
+       b = psf->broadcast_16k ;
+
+       bytes += psf_binheader_readf (psf, "b", b->description, sizeof (b->description)) ;
+       bytes += psf_binheader_readf (psf, "b", b->originator, sizeof (b->originator)) ;
+       bytes += psf_binheader_readf (psf, "b", b->originator_reference, sizeof (b->originator_reference)) ;
+       bytes += psf_binheader_readf (psf, "b", b->origination_date, sizeof (b->origination_date)) ;
+       bytes += psf_binheader_readf (psf, "b", b->origination_time, sizeof (b->origination_time)) ;
+       bytes += psf_binheader_readf (psf, "442", &b->time_reference_low, &b->time_reference_high, &b->version) ;
+       bytes += psf_binheader_readf (psf, "bj", &b->umid, sizeof (b->umid), 190) ;
+
+       if (chunksize > WAV_BEXT_MIN_CHUNK_SIZE)
+       {       /* File has coding history data. */
+
+               b->coding_history_size = chunksize - WAV_BEXT_MIN_CHUNK_SIZE ;
+
+               /* We do not parse the coding history */
+               bytes += psf_binheader_readf (psf, "b", b->coding_history, b->coding_history_size) ;
+               } ;
+
+       if (bytes < chunksize)
+               psf_binheader_readf (psf, "j", chunksize - bytes) ;
+
+       return 0 ;
+} /* wavlike_read_bext_chunk */
+
+int
+wavlike_write_bext_chunk (SF_PRIVATE *psf)
+{      SF_BROADCAST_INFO_16K *b ;
+
+       if (psf->broadcast_16k == NULL)
+               return -1 ;
+
+       b = psf->broadcast_16k ;
+
+       psf_binheader_writef (psf, "m4", bext_MARKER, WAV_BEXT_MIN_CHUNK_SIZE + b->coding_history_size) ;
+
+       /*
+       **      Note that it is very important that the field widths of the SF_BROADCAST_INFO
+       **      struct match those of the bext chunk fields.
+       */
+
+       psf_binheader_writef (psf, "b", b->description, sizeof (b->description)) ;
+       psf_binheader_writef (psf, "b", b->originator, sizeof (b->originator)) ;
+       psf_binheader_writef (psf, "b", b->originator_reference, sizeof (b->originator_reference)) ;
+       psf_binheader_writef (psf, "b", b->origination_date, sizeof (b->origination_date)) ;
+       psf_binheader_writef (psf, "b", b->origination_time, sizeof (b->origination_time)) ;
+       psf_binheader_writef (psf, "442", b->time_reference_low, b->time_reference_high, b->version) ;
+       psf_binheader_writef (psf, "b", b->umid, sizeof (b->umid)) ;
+       psf_binheader_writef (psf, "z", make_size_t (190)) ;
+
+       if (b->coding_history_size > 0)
+               psf_binheader_writef (psf, "b", b->coding_history, make_size_t (b->coding_history_size)) ;
+
+       return 0 ;
+} /* wavlike_write_bext_chunk */
+
+int
+wavlike_read_cart_chunk (SF_PRIVATE *psf, uint32_t chunksize)
+{      SF_CART_INFO_16K *c ;
+       uint32_t bytes = 0 ;
+       int k ;
+
+       if (chunksize < WAV_CART_MIN_CHUNK_SIZE)
+       {       psf_log_printf (psf, "cart : %u (should be >= %d)\n", chunksize, WAV_CART_MIN_CHUNK_SIZE) ;
+               psf_binheader_readf (psf, "j", chunksize) ;
+               return 0 ;
+               } ;
+       if (chunksize > WAV_CART_MAX_CHUNK_SIZE)
+       {       psf_log_printf (psf, "cart : %u (should be < %d)\n", chunksize, WAV_CART_MAX_CHUNK_SIZE) ;
+               psf_binheader_readf (psf, "j", chunksize) ;
+               return 0 ;
+               } ;
+
+       if (chunksize >= sizeof (SF_CART_INFO_16K))
+       {       psf_log_printf (psf, "cart : %u too big to be handled\n", chunksize) ;
+               psf_binheader_readf (psf, "j", chunksize) ;
+               return 0 ;
+               } ;
+
+       psf_log_printf (psf, "cart : %u\n", chunksize) ;
+
+       if ((psf->cart_16k = cart_var_alloc ()) == NULL)
+       {       psf->error = SFE_MALLOC_FAILED ;
+               return psf->error ;
+               } ;
+
+       c = psf->cart_16k ;
+       bytes += psf_binheader_readf (psf, "b", c->version, sizeof (c->version)) ;
+       bytes += psf_binheader_readf (psf, "b", c->title, sizeof (c->title)) ;
+       bytes += psf_binheader_readf (psf, "b", c->artist, sizeof (c->artist)) ;
+       bytes += psf_binheader_readf (psf, "b", c->cut_id, sizeof (c->cut_id)) ;
+       bytes += psf_binheader_readf (psf, "b", c->client_id, sizeof (c->client_id)) ;
+       bytes += psf_binheader_readf (psf, "b", c->category, sizeof (c->category)) ;
+       bytes += psf_binheader_readf (psf, "b", c->classification, sizeof (c->classification)) ;
+       bytes += psf_binheader_readf (psf, "b", c->out_cue, sizeof (c->out_cue)) ;
+       bytes += psf_binheader_readf (psf, "b", c->start_date, sizeof (c->start_date)) ;
+       bytes += psf_binheader_readf (psf, "b", c->start_time, sizeof (c->start_time)) ;
+       bytes += psf_binheader_readf (psf, "b", c->end_date, sizeof (c->end_date)) ;
+       bytes += psf_binheader_readf (psf, "b", c->end_time, sizeof (c->end_time)) ;
+       bytes += psf_binheader_readf (psf, "b", c->producer_app_id, sizeof (c->producer_app_id)) ;
+       bytes += psf_binheader_readf (psf, "b", c->producer_app_version, sizeof (c->producer_app_version)) ;
+       bytes += psf_binheader_readf (psf, "b", c->user_def, sizeof (c->user_def)) ;
+       bytes += psf_binheader_readf (psf, "e4", &c->level_reference, sizeof (c->level_reference)) ;
+
+       for (k = 0 ; k < ARRAY_LEN (c->post_timers) ; k++)
+               bytes += psf_binheader_readf (psf, "b4", &c->post_timers [k].usage, make_size_t (4), &c->post_timers [k].value) ;
+
+       bytes += psf_binheader_readf (psf, "b", c->reserved, sizeof (c->reserved)) ;
+       bytes += psf_binheader_readf (psf, "b", c->url, sizeof (c->url)) ;
+
+       if (chunksize > WAV_CART_MIN_CHUNK_SIZE)
+       {       /* File has tag text. */
+               c->tag_text_size = chunksize - WAV_CART_MIN_CHUNK_SIZE ;
+               bytes += psf_binheader_readf (psf, "b", c->tag_text, make_size_t (c->tag_text_size)) ;
+               } ;
+
+       return 0 ;
+} /* wavlike_read_cart_chunk */
+
+int
+wavlike_write_cart_chunk (SF_PRIVATE *psf)
+{      SF_CART_INFO_16K *c ;
+       int k ;
+
+       if (psf->cart_16k == NULL)
+               return -1 ;
+
+       c = psf->cart_16k ;
+       psf_binheader_writef (psf, "m4", cart_MARKER, WAV_CART_MIN_CHUNK_SIZE + c->tag_text_size) ;
+       /*
+       **      Note that it is very important that the field widths of the SF_CART_INFO
+       **      struct match those of the cart chunk fields.
+       */
+       psf_binheader_writef (psf, "b", c->version, sizeof (c->version)) ;
+       psf_binheader_writef (psf, "b", c->title, sizeof (c->title)) ;
+       psf_binheader_writef (psf, "b", c->artist, sizeof (c->artist)) ;
+       psf_binheader_writef (psf, "b", c->cut_id, sizeof (c->cut_id)) ;
+       psf_binheader_writef (psf, "b", c->client_id, sizeof (c->client_id)) ;
+       psf_binheader_writef (psf, "b", c->category, sizeof (c->category)) ;
+       psf_binheader_writef (psf, "b", c->classification, sizeof (c->classification)) ;
+       psf_binheader_writef (psf, "b", c->out_cue, sizeof (c->out_cue)) ;
+       psf_binheader_writef (psf, "b", c->start_date, sizeof (c->start_date)) ;
+       psf_binheader_writef (psf, "b", c->start_time, sizeof (c->start_time)) ;
+       psf_binheader_writef (psf, "b", c->end_date, sizeof (c->end_date)) ;
+       psf_binheader_writef (psf, "b", c->end_time, sizeof (c->end_time)) ;
+       psf_binheader_writef (psf, "b", c->producer_app_id, sizeof (c->producer_app_id)) ;
+       psf_binheader_writef (psf, "b", c->producer_app_version, sizeof (c->producer_app_version)) ;
+       psf_binheader_writef (psf, "b", c->user_def, sizeof (c->user_def)) ;
+       psf_binheader_writef (psf, "4", c->level_reference, sizeof (c->level_reference)) ;
+
+       for (k = 0 ; k < ARRAY_LEN (c->post_timers) ; k++)
+               psf_binheader_writef (psf, "b4", c->post_timers [k].usage, make_size_t (4), c->post_timers [k].value) ;
+
+       psf_binheader_writef (psf, "z", sizeof (c->reserved)) ; // just write zeros, we don't have any other use for it
+       psf_binheader_writef (psf, "b", c->url, sizeof (c->url)) ;
+
+       if (c->tag_text_size > 0)
+               psf_binheader_writef (psf, "b", c->tag_text, make_size_t (c->tag_text_size)) ;
+
+       return 0 ;
+} /* wavlike_write_cart_chunk */
+
+int
+wavlike_subchunk_parse (SF_PRIVATE *psf, int chunk, uint32_t chunk_length)
+{      sf_count_t      current_pos ;
+       char            buffer [2048] ;
+       uint32_t        chunk_size, bytesread = 0 ;
+
+       current_pos = psf_fseek (psf, 0, SEEK_CUR) ;
+
+       if (chunk_length <= 8)
+       {       /* This case is for broken files generated by PEAK. */
+               psf_log_printf (psf, "%M : %u (weird length)\n", chunk, chunk_length) ;
+               psf_binheader_readf (psf, "mj", &chunk, chunk_length - 4) ;
+               psf_log_printf (psf, "  %M\n", chunk) ;
+               return 0 ;
+               } ;
+
+       if (current_pos + chunk_length > psf->filelength)
+       {       psf_log_printf (psf, "%M : %u (should be %d)\n", chunk, chunk_length, (int) (psf->filelength - current_pos)) ;
+               chunk_length = psf->filelength - current_pos ;
+               }
+       else
+               psf_log_printf (psf, "%M : %u\n", chunk, chunk_length) ;
+
+       while (bytesread < chunk_length)
+       {       uint32_t thisread ;
+
+               if ((thisread = psf_binheader_readf (psf, "m", &chunk)) == 0)
+                       break ;
+               bytesread += thisread ;
+
+               switch (chunk)
+               {       case adtl_MARKER :
+                       case INFO_MARKER :
+                                       /* These markers don't contain anything, not even a chunk lebgth. */
+                                       psf_log_printf (psf, "  %M\n", chunk) ;
+                                       continue ;
+
+                       case exif_MARKER :
+                                       psf_log_printf (psf, "  %M\n", chunk) ;
+                                       if (chunk_length > bytesread)
+                                               bytesread += exif_subchunk_parse (psf, chunk_length - bytesread) ;
+                                       continue ;
+
+                       case data_MARKER :
+                                       psf_log_printf (psf, "  %M inside a LIST block??? Backing out.\n", chunk) ;
+                                       /* Jump back four bytes and return to caller. */
+                                       psf_binheader_readf (psf, "j", -4) ;
+                                       return 0 ;
+
+                       case 0 :
+                                       /*
+                                       **      Four zero bytes where a marker was expected. Assume this means
+                                       **      the rest of the chunk is garbage.
+                                       */
+                                       psf_log_printf (psf, "    *** Found weird-ass zero marker. Jumping to end of chunk.\n") ;
+                                       if (bytesread < chunk_length)
+                                               bytesread += psf_binheader_readf (psf, "j", chunk_length - bytesread + 4) ;
+                                       psf_log_printf (psf, "    *** Offset is now : 0x%X\n", psf_fseek (psf, 0, SEEK_CUR)) ;
+                                       return 0 ;
+
+                       default :
+                                       break ;
+                       } ;
+
+               switch (chunk)
+               {       case ISFT_MARKER :
+                       case ICOP_MARKER :
+                       case IARL_MARKER :
+                       case IART_MARKER :
+                       case ICMT_MARKER :
+                       case ICRD_MARKER :
+                       case IENG_MARKER :
+                       case IGNR_MARKER :
+                       case INAM_MARKER :
+                       case IPRD_MARKER :
+                       case ISBJ_MARKER :
+                       case ISRC_MARKER :
+                       case IAUT_MARKER :
+                       case ITRK_MARKER :
+                                       bytesread += psf_binheader_readf (psf, "4", &chunk_size) ;
+                                       chunk_size += (chunk_size & 1) ;
+                                       if (chunk_size >= SIGNED_SIZEOF (buffer) || chunk_size >= chunk_length)
+                                       {       psf_log_printf (psf, "  *** %M : %u (too big)\n", chunk, chunk_size) ;
+                                               goto cleanup_subchunk_parse ;
+                                               } ;
+
+                                       bytesread += psf_binheader_readf (psf, "b", buffer, chunk_size) ;
+                                       buffer [chunk_size] = 0 ;
+                                       psf_log_printf (psf, "    %M : %s\n", chunk, buffer) ;
+                                       break ;
+
+                       case labl_MARKER :
+                                       {       int mark_id ;
+
+                                               bytesread += psf_binheader_readf (psf, "44", &chunk_size, &mark_id) ;
+                                               chunk_size -= 4 ;
+                                               chunk_size += (chunk_size & 1) ;
+                                               if (chunk_size < 1 || chunk_size >= SIGNED_SIZEOF (buffer) || chunk_size >= chunk_length)
+                                               {       psf_log_printf (psf, "  *** %M : %u (too big)\n", chunk, chunk_size) ;
+                                                       goto cleanup_subchunk_parse ;
+                                                       } ;
+
+                                               bytesread += psf_binheader_readf (psf, "b", buffer, chunk_size) ;
+                                               buffer [chunk_size] = 0 ;
+                                               psf_log_printf (psf, "    %M : %u : %s\n", chunk, mark_id, buffer) ;
+                                               } ;
+                                       break ;
+
+
+                       case DISP_MARKER :
+                       case ltxt_MARKER :
+                       case note_MARKER :
+                                       bytesread += psf_binheader_readf (psf, "4", &chunk_size) ;
+                                       chunk_size += (chunk_size & 1) ;
+                                       if (chunk_size >= SIGNED_SIZEOF (buffer) || chunk_size >= chunk_length)
+                                       {       psf_log_printf (psf, "  *** %M : %u (too big)\n", chunk, chunk_size) ;
+                                               goto cleanup_subchunk_parse ;
+                                               } ;
+
+                                       psf_log_printf (psf, "    %M : %u\n", chunk, chunk_size) ;
+                                       goto cleanup_subchunk_parse ;
+
+                       default :
+                                       bytesread += psf_binheader_readf (psf, "4", &chunk_size) ;
+                                       chunk_size += (chunk_size & 1) ;
+                                       psf_log_printf (psf, "    *** %M : %u\n", chunk, chunk_size) ;
+                                       if (bytesread + chunk_size > chunk_length)
+                                       {       bytesread += psf_binheader_readf (psf, "j", chunk_length - bytesread + 4) ;
+                                               continue ;
+                                               }
+                                       else
+                                               bytesread += psf_binheader_readf (psf, "j", chunk_size) ;
+
+                                       if (chunk_size >= chunk_length)
+                                               return 0 ;
+                                       break ;
+                       } ;
+
+               switch (chunk)
+               {       case ISFT_MARKER :
+                                       psf_store_string (psf, SF_STR_SOFTWARE, buffer) ;
+                                       break ;
+                       case ICOP_MARKER :
+                                       psf_store_string (psf, SF_STR_COPYRIGHT, buffer) ;
+                                       break ;
+                       case INAM_MARKER :
+                                       psf_store_string (psf, SF_STR_TITLE, buffer) ;
+                                       break ;
+                       case IART_MARKER :
+                                       psf_store_string (psf, SF_STR_ARTIST, buffer) ;
+                                       break ;
+                       case ICMT_MARKER :
+                                       psf_store_string (psf, SF_STR_COMMENT, buffer) ;
+                                       break ;
+                       case ICRD_MARKER :
+                                       psf_store_string (psf, SF_STR_DATE, buffer) ;
+                                       break ;
+                       case IGNR_MARKER :
+                                       psf_store_string (psf, SF_STR_GENRE, buffer) ;
+                                       break ;
+                       case IPRD_MARKER :
+                                       psf_store_string (psf, SF_STR_ALBUM, buffer) ;
+                                       break ;
+                       case ITRK_MARKER :
+                                       psf_store_string (psf, SF_STR_TRACKNUMBER, buffer) ;
+                                       break ;
+                       } ;
+               } ;
+
+cleanup_subchunk_parse :
+
+       if (chunk_length > bytesread)
+               bytesread += psf_binheader_readf (psf, "j", chunk_length - bytesread) ;
+
+       return 0 ;
+} /* wavlike_subchunk_parse */
+
+void
+wavlike_write_strings (SF_PRIVATE *psf, int location)
+{      int     k, prev_head_index, saved_head_index ;
+
+       if (psf_location_string_count (psf, location) == 0)
+               return ;
+
+       prev_head_index = psf->header.indx + 4 ;
+
+       psf_binheader_writef (psf, "m4m", LIST_MARKER, 0xBADBAD, INFO_MARKER) ;
+
+       for (k = 0 ; k < SF_MAX_STRINGS ; k++)
+       {       if (psf->strings.data [k].type == 0)
+                       break ;
+               if (psf->strings.data [k].type < 0 || psf->strings.data [k].flags != location)
+                       continue ;
+
+               switch (psf->strings.data [k].type)
+               {       case SF_STR_SOFTWARE :
+                               psf_binheader_writef (psf, "ms", ISFT_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
+                               break ;
+
+                       case SF_STR_TITLE :
+                               psf_binheader_writef (psf, "ms", INAM_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
+                               break ;
+
+                       case SF_STR_COPYRIGHT :
+                               psf_binheader_writef (psf, "ms", ICOP_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
+                               break ;
+
+                       case SF_STR_ARTIST :
+                               psf_binheader_writef (psf, "ms", IART_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
+                               break ;
+
+                       case SF_STR_COMMENT :
+                               psf_binheader_writef (psf, "ms", ICMT_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
+                               break ;
+
+                       case SF_STR_DATE :
+                               psf_binheader_writef (psf, "ms", ICRD_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
+                               break ;
+
+                       case SF_STR_GENRE :
+                               psf_binheader_writef (psf, "ms", IGNR_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
+                               break ;
+
+                       case SF_STR_ALBUM :
+                               psf_binheader_writef (psf, "ms", IPRD_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
+                               break ;
+
+                       case SF_STR_TRACKNUMBER :
+                               psf_binheader_writef (psf, "ms", ITRK_MARKER, psf->strings.storage + psf->strings.data [k].offset) ;
+                               break ;
+
+                       default :
+                               break ;
+                       } ;
+               } ;
+
+       saved_head_index = psf->header.indx ;
+       psf->header.indx = prev_head_index ;
+       psf_binheader_writef (psf, "4", saved_head_index - prev_head_index - 4) ;
+       psf->header.indx = saved_head_index ;
+
+} /* wavlike_write_strings */
+
+int
+wavlike_read_peak_chunk (SF_PRIVATE * psf, size_t chunk_size)
+{      char            buffer [256] ;
+       uint32_t uk ;
+
+       if (chunk_size != WAVLIKE_PEAK_CHUNK_SIZE (psf->sf.channels))
+       {       psf_binheader_readf (psf, "j", chunk_size) ;
+               psf_log_printf (psf, "*** File PEAK chunk size doesn't fit with number of channels (%d).\n", psf->sf.channels) ;
+               return SFE_WAV_BAD_PEAK ;
+               } ;
+
+       if ((psf->peak_info = peak_info_calloc (psf->sf.channels)) == NULL)
+               return SFE_MALLOC_FAILED ;
+
+       /* read in rest of PEAK chunk. */
+       psf_binheader_readf (psf, "44", & (psf->peak_info->version), & (psf->peak_info->timestamp)) ;
+
+       if (psf->peak_info->version != 1)
+               psf_log_printf (psf, "  version    : %d *** (should be version 1)\n", psf->peak_info->version) ;
+       else
+               psf_log_printf (psf, "  version    : %d\n", psf->peak_info->version) ;
+
+       psf_log_printf (psf, "  time stamp : %d\n", psf->peak_info->timestamp) ;
+       psf_log_printf (psf, "    Ch   Position       Value\n") ;
+
+       for (uk = 0 ; uk < (uint32_t) psf->sf.channels ; uk++)
+       {       float value ;
+               uint32_t position ;
+
+               psf_binheader_readf (psf, "f4", &value, &position) ;
+               psf->peak_info->peaks [uk].value = value ;
+               psf->peak_info->peaks [uk].position = position ;
+
+               snprintf (buffer, sizeof (buffer), "    %2d   %-12" PRId64 "   %g\n",
+                               uk, psf->peak_info->peaks [uk].position, psf->peak_info->peaks [uk].value) ;
+               buffer [sizeof (buffer) - 1] = 0 ;
+               psf_log_printf (psf, "%s", buffer) ;
+               } ;
+
+       return 0 ;
+} /* wavlike_read_peak_chunk */
+
+void
+wavlike_write_peak_chunk (SF_PRIVATE * psf)
+{      int k ;
+
+       if (psf->peak_info == NULL)
+               return ;
+
+       psf_binheader_writef (psf, "m4", PEAK_MARKER, WAVLIKE_PEAK_CHUNK_SIZE (psf->sf.channels)) ;
+       psf_binheader_writef (psf, "44", 1, time (NULL)) ;
+       for (k = 0 ; k < psf->sf.channels ; k++)
+               psf_binheader_writef (psf, "ft8", (float) psf->peak_info->peaks [k].value, psf->peak_info->peaks [k].position) ;
+} /* wavlike_write_peak_chunk */
+
+/*==============================================================================
+*/
+
+static int
+exif_fill_and_sink (SF_PRIVATE *psf, char* buf, size_t bufsz, size_t toread)
+{
+       size_t bytesread = 0 ;
+
+       buf [0] = 0 ;
+       bufsz -= 1 ;
+       if (toread < bufsz)
+               bufsz = toread ;
+       bytesread = psf_binheader_readf (psf, "b", buf, bufsz) ;
+       buf [bufsz] = 0 ;
+
+       if (bytesread == bufsz && toread > bufsz)
+               bytesread += psf_binheader_readf (psf, "j", toread - bufsz) ;
+
+       return bytesread ;
+} /* exif_fill_and_sink */
+
+/*
+** Exif specification for audio files, at JEITA CP-3451 Exif 2.2 section 5
+** (Exif Audio File Specification) http://www.exif.org/Exif2-2.PDF
+*/
+static int
+exif_subchunk_parse (SF_PRIVATE *psf, uint32_t length)
+{      uint32_t marker, dword, vmajor = -1, vminor = -1, bytesread = 0 ;
+       char buf [4096] ;
+       int thisread ;
+
+       while (bytesread < length)
+       {
+               if ((thisread = psf_binheader_readf (psf, "m", &marker)) == 0)
+                       break ;
+               bytesread += thisread ;
+
+               switch (marker)
+               {
+                       case 0 : /* camera padding? */
+                               break ;
+
+                       case ever_MARKER :
+                               bytesread += psf_binheader_readf (psf, "j4", 4, &dword) ;
+                               vmajor = 10 * (((dword >> 24) & 0xff) - '0') + (((dword >> 16) & 0xff) - '0') ;
+                               vminor = 10 * (((dword >> 8) & 0xff) - '0') + ((dword & 0xff) - '0') ;
+                               psf_log_printf (psf, "    EXIF Version : %u.%02u\n", vmajor, vminor) ;
+                               break ;
+
+                       case olym_MARKER :
+                               bytesread += psf_binheader_readf (psf, "4", &dword) ;
+                               psf_log_printf (psf, "%M : %u\n", marker, dword) ;
+                               if (dword > length || bytesread + dword > length)
+                                       break ;
+                               dword += (dword & 1) ;
+                               bytesread += psf_binheader_readf (psf, "j", dword) ;
+                               break ;
+
+                       case emnt_MARKER : /* design information: null-terminated string */
+                       case emdl_MARKER : /* model name ; null-terminated string */
+                       case ecor_MARKER : /* manufacturer: null-terminated string */
+                       case etim_MARKER : /* creation time: null-terminated string in the format "hour:minute:second.subsecond" */
+                       case erel_MARKER : /* relation info: null-terminated string (filename) */
+                       case eucm_MARKER : /* user comment: 4-byte size follows, then possibly unicode data */
+                               bytesread += psf_binheader_readf (psf, "4", &dword) ;
+                               bytesread += sizeof (dword) ;
+                               dword += (dword & 1) ;
+
+                               if (dword >= sizeof (buf))
+                               {       psf_log_printf (psf, "*** Marker '%M' is too big %u\n\n", marker, dword) ;
+                                       return bytesread ;
+                                       } ;
+
+                               bytesread += exif_fill_and_sink (psf, buf, sizeof (buf), dword) ;
+
+                               /* BAD - don't know what's going on here -- maybe a bug in the camera */
+                               /* field should be NULL-terminated but there's no room for it with the reported number */
+                               /*  example output:     emdl : 8 (EX-Z1050) */
+                               if (marker == emdl_MARKER && dword == strlen (buf) /* should be >= strlen+1*/)
+                               {       psf_log_printf (psf, "    *** field size too small for string (sinking 2 bytes)\n") ;
+                                       bytesread += psf_binheader_readf (psf, "j", 2) ;
+                                       } ;
+
+                               psf_log_printf (psf, "    %M : %u (%s)\n", marker, dword, buf) ;
+                               if (dword > length)
+                                       return bytesread ;
+                               break ;
+
+                       default :
+                               psf_log_printf (psf, "    *** %M (%u): -- ignored --\n", marker, marker) ;
+                               break ;
+                       } ;
+               } ;
+
+       return bytesread ;
+} /* exif_subchunk_parse */
+
+void
+wavlike_write_custom_chunks (SF_PRIVATE * psf)
+{      uint32_t k ;
+
+       for (k = 0 ; k < psf->wchunks.used ; k++)
+               psf_binheader_writef (psf, "m4b", (int) psf->wchunks.chunks [k].mark32, psf->wchunks.chunks [k].len, psf->wchunks.chunks [k].data, make_size_t (psf->wchunks.chunks [k].len)) ;
+
+} /* wavlike_write_custom_chunks */
similarity index 76%
rename from src/wav_w64.h
rename to src/wavlike.h
index 9e781b0..d3ec4ae 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
 /* This file contains definitions commong to WAV and W64 files. */
 
 
-#ifndef WAV_W64_H_INCLUDED
-#define WAV_W64_H_INCLUDED
+#ifndef WAVLIKE_H_INCLUDED
+#define WAVLIKE_H_INCLUDED
+
+/*------------------------------------------------------------------------------
+** Chunk markers.
+*/
+
+#define adtl_MARKER            MAKE_MARKER ('a', 'd', 't', 'l')
+#define bext_MARKER            MAKE_MARKER ('b', 'e', 'x', 't')
+#define cart_MARKER            MAKE_MARKER ('c', 'a', 'r', 't')
+#define data_MARKER            MAKE_MARKER ('d', 'a', 't', 'a')
+#define labl_MARKER            MAKE_MARKER ('l', 'a', 'b', 'l')
+#define ltxt_MARKER            MAKE_MARKER ('l', 't', 'x', 't')
+#define note_MARKER            MAKE_MARKER ('n', 'o', 't', 'e')
+#define DISP_MARKER            MAKE_MARKER ('D', 'I', 'S', 'P')
+#define INFO_MARKER            MAKE_MARKER ('I', 'N', 'F', 'O')
+#define LIST_MARKER            MAKE_MARKER ('L', 'I', 'S', 'T')
+#define PAD_MARKER             MAKE_MARKER ('P', 'A', 'D', ' ')
+#define PEAK_MARKER            MAKE_MARKER ('P', 'E', 'A', 'K')
+
+#define ISFT_MARKER            MAKE_MARKER ('I', 'S', 'F', 'T')
+#define ICRD_MARKER            MAKE_MARKER ('I', 'C', 'R', 'D')
+#define ICOP_MARKER            MAKE_MARKER ('I', 'C', 'O', 'P')
+#define IARL_MARKER            MAKE_MARKER ('I', 'A', 'R', 'L')
+#define IART_MARKER            MAKE_MARKER ('I', 'A', 'R', 'T')
+#define INAM_MARKER            MAKE_MARKER ('I', 'N', 'A', 'M')
+#define IENG_MARKER            MAKE_MARKER ('I', 'E', 'N', 'G')
+#define IGNR_MARKER            MAKE_MARKER ('I', 'G', 'N', 'R')
+#define ICOP_MARKER            MAKE_MARKER ('I', 'C', 'O', 'P')
+#define IPRD_MARKER            MAKE_MARKER ('I', 'P', 'R', 'D')
+#define ISRC_MARKER            MAKE_MARKER ('I', 'S', 'R', 'C')
+#define ISBJ_MARKER            MAKE_MARKER ('I', 'S', 'B', 'J')
+#define ICMT_MARKER            MAKE_MARKER ('I', 'C', 'M', 'T')
+#define IAUT_MARKER            MAKE_MARKER ('I', 'A', 'U', 'T')
+#define ITRK_MARKER            MAKE_MARKER ('I', 'T', 'R', 'K')
+
+#define exif_MARKER            MAKE_MARKER ('e', 'x', 'i', 'f')
+#define ever_MARKER            MAKE_MARKER ('e', 'v', 'e', 'r')
+#define etim_MARKER            MAKE_MARKER ('e', 't', 'i', 'm')
+#define ecor_MARKER            MAKE_MARKER ('e', 'c', 'o', 'r')
+#define emdl_MARKER            MAKE_MARKER ('e', 'm', 'd', 'l')
+#define emnt_MARKER            MAKE_MARKER ('e', 'm', 'n', 't')
+#define erel_MARKER            MAKE_MARKER ('e', 'r', 'e', 'l')
+#define eucm_MARKER            MAKE_MARKER ('e', 'u', 'c', 'm')
+#define olym_MARKER            MAKE_MARKER ('o', 'l', 'y', 'm')
 
 /*------------------------------------------------------------------------------
 ** List of known WAV format tags
@@ -28,7 +71,7 @@
 
 enum
 {
-       /* keep sorted for wav_w64_format_str() */
+       /* keep sorted for wavlike_format_str() */
        WAVE_FORMAT_UNKNOWN                                     = 0x0000,               /* Microsoft Corporation */
        WAVE_FORMAT_PCM                                         = 0x0001,               /* Microsoft PCM format */
        WAVE_FORMAT_MS_ADPCM                            = 0x0002,               /* Microsoft ADPCM */
@@ -270,35 +313,46 @@ typedef struct
        ** header.
        */
        int rf64_downgrade ;
-} WAV_PRIVATE ;
+} WAVLIKE_PRIVATE ;
+
+#define                WAVLIKE_GSM610_BLOCKSIZE        65
+#define                WAVLIKE_GSM610_SAMPLES          320
 
-#define                WAV_W64_GSM610_BLOCKSIZE        65
-#define                WAV_W64_GSM610_SAMPLES          320
+#define                WAVLIKE_PEAK_CHUNK_SIZE(ch) (2 * sizeof (int) + ch * (sizeof (float) + sizeof (int)))
 
 /*------------------------------------------------------------------------------------
 **     Functions defined in wav_ms_adpcm.c
 */
 
-#define        MSADPCM_ADAPT_COEFF_COUNT       7
+#define        WAVLIKE_MSADPCM_ADAPT_COEFF_COUNT       7
 
-void   msadpcm_write_adapt_coeffs (SF_PRIVATE *psf) ;
+void   wavlike_msadpcm_write_adapt_coeffs (SF_PRIVATE *psf) ;
 
 /*------------------------------------------------------------------------------------
-**     Functions defined in wav_w64.c
+**     Functions defined in wavlike.c
 */
 
-int    wav_w64_srate2blocksize (int srate_chan_product) ;
-char const* wav_w64_format_str (int k) ;
-int            wav_w64_read_fmt_chunk (SF_PRIVATE *psf, int fmtsize) ;
-void   wavex_write_guid (SF_PRIVATE *psf, const EXT_SUBFORMAT * subformat) ;
-void   wav_w64_analyze (SF_PRIVATE *psf) ;
-int            wavex_gen_channel_mask (const int *chan_map, int channels) ;
+char const* wavlike_format_str (int k) ;
+
+int            wavlike_srate2blocksize (int srate_chan_product) ;
+int            wavlike_read_fmt_chunk (SF_PRIVATE *psf, int fmtsize) ;
+void   wavlike_write_guid (SF_PRIVATE *psf, const EXT_SUBFORMAT * subformat) ;
+void   wavlike_analyze (SF_PRIVATE *psf) ;
+int            wavlike_gen_channel_mask (const int *chan_map, int channels) ;
+
+int            wavlike_read_bext_chunk (SF_PRIVATE *psf, unsigned int chunksize) ;
+int            wavlike_write_bext_chunk (SF_PRIVATE *psf) ;
+
+int            wavlike_read_cart_chunk (SF_PRIVATE *psf, unsigned int chunksize) ;
+int            wavlike_write_cart_chunk (SF_PRIVATE *psf) ;
+
+int            wavlike_subchunk_parse  (SF_PRIVATE *psf, int chunk, uint32_t length) ;
+void   wavlike_write_strings (SF_PRIVATE *psf, int location) ;
 
-int            wav_read_bext_chunk (SF_PRIVATE *psf, unsigned int chunksize) ;
-int            wav_write_bext_chunk (SF_PRIVATE *psf) ;
+int            wavlike_read_peak_chunk (SF_PRIVATE * psf, size_t chunk_size) ;
+void   wavlike_write_peak_chunk (SF_PRIVATE * psf) ;
 
-int            wav_read_cart_chunk (SF_PRIVATE *psf, unsigned int chunksize) ;
-int            wav_write_cart_chunk (SF_PRIVATE *psf) ;
+void   wavlike_write_custom_chunks (SF_PRIVATE * psf) ;
 
 #endif
 
index 387afdd..2845fef 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2009-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2009-2017 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
@@ -35,17 +35,17 @@ extern int sf_errno ;
 
 static void copy_filename (SF_PRIVATE * psf, LPCWSTR wpath) ;
 
+SNDFILE_API
 SNDFILE*
 sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo)
 {      SF_PRIVATE      *psf ;
        char utf8name [512] ;
 
-       if ((psf = calloc (1, sizeof (SF_PRIVATE))) == NULL)
+       if ((psf = psf_allocate ()) == NULL)
        {       sf_errno = SFE_MALLOC_FAILED ;
                return  NULL ;
                } ;
 
-       memset (psf, 0, sizeof (SF_PRIVATE)) ;
        psf_init_files (psf) ;
 
        if (WideCharToMultiByte (CP_UTF8, 0, wpath, -1, utf8name, sizeof (utf8name), NULL, NULL) == 0)
index c13e7ab..845cafa 100644 (file)
--- a/src/wve.c
+++ b/src/wve.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 ** Copyright (C) 2007 Reuben Thomas
 **
 ** This program is free software; you can redistribute it and/or modify
@@ -168,15 +168,15 @@ wve_write_header (SF_PRIVATE *psf, int calc_length)
                } ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        /* Write header. */
        datalen = psf->datalength ;
        psf_binheader_writef (psf, "Emmmm", ALAW_MARKER, SOUN_MARKER, DFIL_MARKER, ESSN_MARKER) ;
        psf_binheader_writef (psf, "E2422222", PSION_VERSION, datalen, 0, 0, 0, 0, 0) ;
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->sf.channels != 1)
                return SFE_CHANNEL_COUNT ;
@@ -184,7 +184,7 @@ wve_write_header (SF_PRIVATE *psf, int calc_length)
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index 4c8ef54..17d6277 100644 (file)
--- a/src/xi.c
+++ b/src/xi.c
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2003-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2003-2016 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
@@ -92,7 +92,7 @@ xi_open       (SF_PRIVATE *psf)
 
                /* Set up default instrument and software name. */
                memcpy (pxi->filename, "Default Name            ", sizeof (pxi->filename)) ;
-               memcpy (pxi->software, PACKAGE "-" VERSION "               ", sizeof (pxi->software)) ;
+               memcpy (pxi->software, PACKAGE_NAME "-" PACKAGE_VERSION "               ", sizeof (pxi->software)) ;
 
                memset (pxi->sample_name, 0, sizeof (pxi->sample_name)) ;
                snprintf (pxi->sample_name, sizeof (pxi->sample_name), "%s", "Sample #1") ;
@@ -280,8 +280,8 @@ xi_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
        current = psf_ftell (psf) ;
 
        /* Reset the current header length to zero. */
-       psf->header [0] = 0 ;
-       psf->headindex = 0 ;
+       psf->header.ptr [0] = 0 ;
+       psf->header.indx = 0 ;
        psf_fseek (psf, 0, SEEK_SET) ;
 
        string = "Extended Instrument: " ;
@@ -317,12 +317,12 @@ xi_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
 
 
        /* Header construction complete so write it out. */
-       psf_fwrite (psf->header, psf->headindex, 1, psf) ;
+       psf_fwrite (psf->header.ptr, psf->header.indx, 1, psf) ;
 
        if (psf->error)
                return psf->error ;
 
-       psf->dataoffset = psf->headindex ;
+       psf->dataoffset = psf->header.indx ;
 
        if (current > 0)
                psf_fseek (psf, current, SEEK_SET) ;
index 8a740ab..6012388 100644 (file)
@@ -20,15 +20,16 @@ check_PROGRAMS = sfversion floating_point_test write_read_test \
 
 noinst_HEADERS = dft_cmp.h utils.h generate.h
 
-autogen_sources = write_read_test.tpl write_read_test.def      \
-                                       pcm_test.tpl pcm_test.def                               \
-                                       header_test.tpl header_test.def                 \
-                                       utils.tpl utils.def                                             \
-                                       scale_clip_test.tpl scale_clip_test.def \
-                                       pipe_test.tpl pipe_test.def                             \
-                                       rdwr_test.tpl rdwr_test.def                             \
-                                       floating_point_test.tpl floating_point_test.def \
-                                       benchmark.tpl benchmark.def
+autogen_sources = \
+       write_read_test.c      write_read_test.tpl     write_read_test.def \
+       pcm_test.c             pcm_test.tpl            pcm_test.def \
+       header_test.c          header_test.tpl         header_test.def \
+       utils.c                utils.tpl               utils.def \
+       scale_clip_test.c      scale_clip_test.tpl     scale_clip_test.def \
+       pipe_test.c            pipe_test.tpl           pipe_test.def \
+       rdwr_test.c            rdwr_test.tpl           rdwr_test.def \
+       floating_point_test.c  floating_point_test.tpl floating_point_test.def \
+       benchmark.c            benchmark.tpl           benchmark.def
 
 EXTRA_DIST = $(autogen_sources)
 
@@ -188,34 +189,9 @@ scale_clip_test_LDADD = $(top_builddir)/src/libsndfile.la
 
 #===============================================================================
 
-write_read_test.c: write_read_test.def write_read_test.tpl
-       cd $(srcdir) && autogen --writable write_read_test.def && cd $(abs_builddir)
-
-pcm_test.c: pcm_test.def pcm_test.tpl
-       cd $(srcdir) && autogen --writable pcm_test.def && cd $(abs_builddir)
-
-header_test.c: header_test.def header_test.tpl
-       cd $(srcdir) && autogen --writable header_test.def && cd $(abs_builddir)
-
-utils.c utils.h : utils.def utils.tpl
-       cd $(srcdir) && autogen --writable utils.def && cd $(abs_builddir)
-
-scale_clip_test.c: scale_clip_test.def scale_clip_test.tpl
-       cd $(srcdir) && autogen --writable scale_clip_test.def && cd $(abs_builddir)
-
-pipe_test.c: pipe_test.def pipe_test.tpl
-       cd $(srcdir) && autogen --writable pipe_test.def && cd $(abs_builddir)
-
-rdwr_test.c: rdwr_test.def rdwr_test.tpl
-       cd $(srcdir) && autogen --writable rdwr_test.def && cd $(abs_builddir)
-
-floating_point_test.c: floating_point_test.def floating_point_test.tpl
-       cd $(srcdir) && autogen --writable floating_point_test.def && cd $(abs_builddir)
-
-benchmark.c: benchmark.def benchmark.tpl
-       cd $(srcdir) && autogen --writable benchmark.def && cd $(abs_builddir)
-
-genfiles : write_read_test.c pcm_test.c header_test.c utils.c \
-               scale_clip_test.c pipe_test.c floating_point_test.c rdwr_test.c \
-               benchmark.c
+SUFFIXES = .def .tpl
 
+.def.c:
+       autogen --writable $<
+.def.h:
+       autogen --writable $<
diff --git a/tests/Makefile.in b/tests/Makefile.in
deleted file mode 100644 (file)
index 29d4ae9..0000000
+++ /dev/null
@@ -1,1245 +0,0 @@
-# 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 = sfversion$(EXEEXT) floating_point_test$(EXEEXT) \
-       write_read_test$(EXEEXT) lossy_comp_test$(EXEEXT) \
-       error_test$(EXEEXT) ulaw_test$(EXEEXT) alaw_test$(EXEEXT) \
-       dwvw_test$(EXEEXT) peak_chunk_test$(EXEEXT) \
-       command_test$(EXEEXT) stdin_test$(EXEEXT) stdout_test$(EXEEXT) \
-       stdio_test$(EXEEXT) pcm_test$(EXEEXT) headerless_test$(EXEEXT) \
-       pipe_test$(EXEEXT) benchmark$(EXEEXT) header_test$(EXEEXT) \
-       misc_test$(EXEEXT) raw_test$(EXEEXT) string_test$(EXEEXT) \
-       multi_file_test$(EXEEXT) dither_test$(EXEEXT) \
-       chunk_test$(EXEEXT) scale_clip_test$(EXEEXT) \
-       win32_test$(EXEEXT) fix_this$(EXEEXT) aiff_rw_test$(EXEEXT) \
-       virtual_io_test$(EXEEXT) locale_test$(EXEEXT) \
-       largefile_test$(EXEEXT) win32_ordinal_test$(EXEEXT) \
-       ogg_test$(EXEEXT) compression_size_test$(EXEEXT) \
-       checksum_test$(EXEEXT) external_libs_test$(EXEEXT) \
-       rdwr_test$(EXEEXT) format_check_test$(EXEEXT) $(am__EXEEXT_1) \
-       channel_test$(EXEEXT) long_read_write_test$(EXEEXT)
-subdir = tests
-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/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)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
-       $(am__DIST_COMMON)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/src/config.h
-CONFIG_CLEAN_FILES = test_wrapper.sh pedantic-header-test.sh
-CONFIG_CLEAN_VPATH_FILES =
-@ENABLE_TEST_COVERAGE_FALSE@am__EXEEXT_1 = cpp_test$(EXEEXT)
-am_aiff_rw_test_OBJECTS = utils.$(OBJEXT) aiff_rw_test.$(OBJEXT)
-aiff_rw_test_OBJECTS = $(am_aiff_rw_test_OBJECTS)
-aiff_rw_test_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_alaw_test_OBJECTS = utils.$(OBJEXT) alaw_test.$(OBJEXT)
-alaw_test_OBJECTS = $(am_alaw_test_OBJECTS)
-alaw_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_benchmark_OBJECTS = benchmark.$(OBJEXT)
-benchmark_OBJECTS = $(am_benchmark_OBJECTS)
-benchmark_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_channel_test_OBJECTS = channel_test.$(OBJEXT) utils.$(OBJEXT)
-channel_test_OBJECTS = $(am_channel_test_OBJECTS)
-channel_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_checksum_test_OBJECTS = checksum_test.$(OBJEXT) utils.$(OBJEXT)
-checksum_test_OBJECTS = $(am_checksum_test_OBJECTS)
-checksum_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_chunk_test_OBJECTS = chunk_test.$(OBJEXT) utils.$(OBJEXT)
-chunk_test_OBJECTS = $(am_chunk_test_OBJECTS)
-chunk_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_command_test_OBJECTS = command_test.$(OBJEXT) utils.$(OBJEXT)
-command_test_OBJECTS = $(am_command_test_OBJECTS)
-command_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_compression_size_test_OBJECTS = compression_size_test.$(OBJEXT) \
-       utils.$(OBJEXT)
-compression_size_test_OBJECTS = $(am_compression_size_test_OBJECTS)
-compression_size_test_DEPENDENCIES =  \
-       $(top_builddir)/src/libsndfile.la
-am_cpp_test_OBJECTS = cpp_test.$(OBJEXT) utils.$(OBJEXT)
-cpp_test_OBJECTS = $(am_cpp_test_OBJECTS)
-cpp_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_dither_test_OBJECTS = dither_test.$(OBJEXT) utils.$(OBJEXT)
-dither_test_OBJECTS = $(am_dither_test_OBJECTS)
-dither_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_dwvw_test_OBJECTS = utils.$(OBJEXT) dwvw_test.$(OBJEXT)
-dwvw_test_OBJECTS = $(am_dwvw_test_OBJECTS)
-dwvw_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_error_test_OBJECTS = error_test.$(OBJEXT) utils.$(OBJEXT)
-error_test_OBJECTS = $(am_error_test_OBJECTS)
-error_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_external_libs_test_OBJECTS = external_libs_test.$(OBJEXT) \
-       utils.$(OBJEXT)
-external_libs_test_OBJECTS = $(am_external_libs_test_OBJECTS)
-external_libs_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_fix_this_OBJECTS = utils.$(OBJEXT) fix_this.$(OBJEXT)
-fix_this_OBJECTS = $(am_fix_this_OBJECTS)
-fix_this_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_floating_point_test_OBJECTS = utils.$(OBJEXT) dft_cmp.$(OBJEXT) \
-       floating_point_test.$(OBJEXT)
-floating_point_test_OBJECTS = $(am_floating_point_test_OBJECTS)
-floating_point_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_format_check_test_OBJECTS = format_check_test.$(OBJEXT) \
-       utils.$(OBJEXT)
-format_check_test_OBJECTS = $(am_format_check_test_OBJECTS)
-format_check_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_header_test_OBJECTS = header_test.$(OBJEXT) utils.$(OBJEXT)
-header_test_OBJECTS = $(am_header_test_OBJECTS)
-header_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_headerless_test_OBJECTS = utils.$(OBJEXT) headerless_test.$(OBJEXT)
-headerless_test_OBJECTS = $(am_headerless_test_OBJECTS)
-headerless_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_largefile_test_OBJECTS = largefile_test.$(OBJEXT) utils.$(OBJEXT)
-largefile_test_OBJECTS = $(am_largefile_test_OBJECTS)
-largefile_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_locale_test_OBJECTS = locale_test.$(OBJEXT) utils.$(OBJEXT)
-locale_test_OBJECTS = $(am_locale_test_OBJECTS)
-locale_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_long_read_write_test_OBJECTS = long_read_write_test.$(OBJEXT) \
-       utils.$(OBJEXT)
-long_read_write_test_OBJECTS = $(am_long_read_write_test_OBJECTS)
-long_read_write_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_lossy_comp_test_OBJECTS = utils.$(OBJEXT) lossy_comp_test.$(OBJEXT)
-lossy_comp_test_OBJECTS = $(am_lossy_comp_test_OBJECTS)
-lossy_comp_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_misc_test_OBJECTS = misc_test.$(OBJEXT) utils.$(OBJEXT)
-misc_test_OBJECTS = $(am_misc_test_OBJECTS)
-misc_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_multi_file_test_OBJECTS = multi_file_test.$(OBJEXT) utils.$(OBJEXT)
-multi_file_test_OBJECTS = $(am_multi_file_test_OBJECTS)
-multi_file_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_ogg_test_OBJECTS = ogg_test.$(OBJEXT) utils.$(OBJEXT)
-ogg_test_OBJECTS = $(am_ogg_test_OBJECTS)
-ogg_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_pcm_test_OBJECTS = pcm_test.$(OBJEXT) utils.$(OBJEXT)
-pcm_test_OBJECTS = $(am_pcm_test_OBJECTS)
-pcm_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_peak_chunk_test_OBJECTS = peak_chunk_test.$(OBJEXT) utils.$(OBJEXT)
-peak_chunk_test_OBJECTS = $(am_peak_chunk_test_OBJECTS)
-peak_chunk_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_pipe_test_OBJECTS = pipe_test.$(OBJEXT) utils.$(OBJEXT)
-pipe_test_OBJECTS = $(am_pipe_test_OBJECTS)
-pipe_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_raw_test_OBJECTS = raw_test.$(OBJEXT) utils.$(OBJEXT)
-raw_test_OBJECTS = $(am_raw_test_OBJECTS)
-raw_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_rdwr_test_OBJECTS = rdwr_test.$(OBJEXT) utils.$(OBJEXT)
-rdwr_test_OBJECTS = $(am_rdwr_test_OBJECTS)
-rdwr_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_scale_clip_test_OBJECTS = scale_clip_test.$(OBJEXT) utils.$(OBJEXT)
-scale_clip_test_OBJECTS = $(am_scale_clip_test_OBJECTS)
-scale_clip_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_sfversion_OBJECTS = sfversion.$(OBJEXT)
-sfversion_OBJECTS = $(am_sfversion_OBJECTS)
-sfversion_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_stdin_test_OBJECTS = stdin_test.$(OBJEXT) utils.$(OBJEXT)
-stdin_test_OBJECTS = $(am_stdin_test_OBJECTS)
-stdin_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_stdio_test_OBJECTS = stdio_test.$(OBJEXT) utils.$(OBJEXT)
-stdio_test_OBJECTS = $(am_stdio_test_OBJECTS)
-stdio_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_stdout_test_OBJECTS = stdout_test.$(OBJEXT)
-stdout_test_OBJECTS = $(am_stdout_test_OBJECTS)
-stdout_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_string_test_OBJECTS = string_test.$(OBJEXT) utils.$(OBJEXT)
-string_test_OBJECTS = $(am_string_test_OBJECTS)
-string_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_ulaw_test_OBJECTS = utils.$(OBJEXT) ulaw_test.$(OBJEXT)
-ulaw_test_OBJECTS = $(am_ulaw_test_OBJECTS)
-ulaw_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_virtual_io_test_OBJECTS = virtual_io_test.$(OBJEXT) utils.$(OBJEXT)
-virtual_io_test_OBJECTS = $(am_virtual_io_test_OBJECTS)
-virtual_io_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_win32_ordinal_test_OBJECTS = win32_ordinal_test.$(OBJEXT) \
-       utils.$(OBJEXT)
-win32_ordinal_test_OBJECTS = $(am_win32_ordinal_test_OBJECTS)
-win32_ordinal_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_win32_test_OBJECTS = win32_test.$(OBJEXT)
-win32_test_OBJECTS = $(am_win32_test_OBJECTS)
-win32_test_DEPENDENCIES = $(top_builddir)/src/libsndfile.la
-am_write_read_test_OBJECTS = utils.$(OBJEXT) generate.$(OBJEXT) \
-       write_read_test.$(OBJEXT)
-write_read_test_OBJECTS = $(am_write_read_test_OBJECTS)
-write_read_test_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 = $(aiff_rw_test_SOURCES) $(alaw_test_SOURCES) \
-       $(benchmark_SOURCES) $(channel_test_SOURCES) \
-       $(checksum_test_SOURCES) $(chunk_test_SOURCES) \
-       $(command_test_SOURCES) $(compression_size_test_SOURCES) \
-       $(cpp_test_SOURCES) $(dither_test_SOURCES) \
-       $(dwvw_test_SOURCES) $(error_test_SOURCES) \
-       $(external_libs_test_SOURCES) $(fix_this_SOURCES) \
-       $(floating_point_test_SOURCES) $(format_check_test_SOURCES) \
-       $(header_test_SOURCES) $(headerless_test_SOURCES) \
-       $(largefile_test_SOURCES) $(locale_test_SOURCES) \
-       $(long_read_write_test_SOURCES) $(lossy_comp_test_SOURCES) \
-       $(misc_test_SOURCES) $(multi_file_test_SOURCES) \
-       $(ogg_test_SOURCES) $(pcm_test_SOURCES) \
-       $(peak_chunk_test_SOURCES) $(pipe_test_SOURCES) \
-       $(raw_test_SOURCES) $(rdwr_test_SOURCES) \
-       $(scale_clip_test_SOURCES) $(sfversion_SOURCES) \
-       $(stdin_test_SOURCES) $(stdio_test_SOURCES) \
-       $(stdout_test_SOURCES) $(string_test_SOURCES) \
-       $(ulaw_test_SOURCES) $(virtual_io_test_SOURCES) \
-       $(win32_ordinal_test_SOURCES) $(win32_test_SOURCES) \
-       $(write_read_test_SOURCES)
-DIST_SOURCES = $(aiff_rw_test_SOURCES) $(alaw_test_SOURCES) \
-       $(benchmark_SOURCES) $(channel_test_SOURCES) \
-       $(checksum_test_SOURCES) $(chunk_test_SOURCES) \
-       $(command_test_SOURCES) $(compression_size_test_SOURCES) \
-       $(cpp_test_SOURCES) $(dither_test_SOURCES) \
-       $(dwvw_test_SOURCES) $(error_test_SOURCES) \
-       $(external_libs_test_SOURCES) $(fix_this_SOURCES) \
-       $(floating_point_test_SOURCES) $(format_check_test_SOURCES) \
-       $(header_test_SOURCES) $(headerless_test_SOURCES) \
-       $(largefile_test_SOURCES) $(locale_test_SOURCES) \
-       $(long_read_write_test_SOURCES) $(lossy_comp_test_SOURCES) \
-       $(misc_test_SOURCES) $(multi_file_test_SOURCES) \
-       $(ogg_test_SOURCES) $(pcm_test_SOURCES) \
-       $(peak_chunk_test_SOURCES) $(pipe_test_SOURCES) \
-       $(raw_test_SOURCES) $(rdwr_test_SOURCES) \
-       $(scale_clip_test_SOURCES) $(sfversion_SOURCES) \
-       $(stdin_test_SOURCES) $(stdio_test_SOURCES) \
-       $(stdout_test_SOURCES) $(string_test_SOURCES) \
-       $(ulaw_test_SOURCES) $(virtual_io_test_SOURCES) \
-       $(win32_ordinal_test_SOURCES) $(win32_test_SOURCES) \
-       $(write_read_test_SOURCES)
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-HEADERS = $(noinst_HEADERS)
-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 \
-       $(srcdir)/pedantic-header-test.sh.in \
-       $(srcdir)/test_wrapper.sh.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@
-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_CFLAGS = @EXTERNAL_CFLAGS@
-EXTERNAL_LIBS = @EXTERNAL_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_LIBS = @HAVE_EXTERNAL_LIBS@
-HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
-HAVE_OCTAVE = @HAVE_OCTAVE@
-HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
-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@
-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@
-@ENABLE_TEST_COVERAGE_FALSE@CPP_TEST = cpp_test
-@ENABLE_TEST_COVERAGE_TRUE@CPP_TEST = 
-AM_CPPFLAGS = -I$(top_srcdir)/src
-noinst_HEADERS = dft_cmp.h utils.h generate.h
-autogen_sources = write_read_test.tpl write_read_test.def      \
-                                       pcm_test.tpl pcm_test.def                               \
-                                       header_test.tpl header_test.def                 \
-                                       utils.tpl utils.def                                             \
-                                       scale_clip_test.tpl scale_clip_test.def \
-                                       pipe_test.tpl pipe_test.def                             \
-                                       rdwr_test.tpl rdwr_test.def                             \
-                                       floating_point_test.tpl floating_point_test.def \
-                                       benchmark.tpl benchmark.def
-
-EXTRA_DIST = $(autogen_sources)
-CLEANFILES = *~ *.exe
-
-#===============================================================================
-sfversion_SOURCES = sfversion.c
-sfversion_LDADD = $(top_builddir)/src/libsndfile.la
-write_read_test_SOURCES = utils.c generate.c write_read_test.c
-write_read_test_LDADD = $(top_builddir)/src/libsndfile.la
-lossy_comp_test_SOURCES = utils.c lossy_comp_test.c
-lossy_comp_test_LDADD = $(top_builddir)/src/libsndfile.la
-fix_this_SOURCES = utils.c fix_this.c
-fix_this_LDADD = $(top_builddir)/src/libsndfile.la
-error_test_SOURCES = error_test.c utils.c
-error_test_LDADD = $(top_builddir)/src/libsndfile.la
-ulaw_test_SOURCES = utils.c ulaw_test.c
-ulaw_test_LDADD = $(top_builddir)/src/libsndfile.la
-alaw_test_SOURCES = utils.c alaw_test.c
-alaw_test_LDADD = $(top_builddir)/src/libsndfile.la
-aiff_rw_test_SOURCES = utils.c aiff_rw_test.c
-aiff_rw_test_LDADD = $(top_builddir)/src/libsndfile.la
-command_test_SOURCES = command_test.c utils.c
-command_test_LDADD = $(top_builddir)/src/libsndfile.la
-locale_test_SOURCES = locale_test.c utils.c
-locale_test_LDADD = $(top_builddir)/src/libsndfile.la
-largefile_test_SOURCES = largefile_test.c utils.c
-largefile_test_LDADD = $(top_builddir)/src/libsndfile.la
-pcm_test_SOURCES = pcm_test.c utils.c
-pcm_test_LDADD = $(top_builddir)/src/libsndfile.la
-headerless_test_SOURCES = utils.c headerless_test.c
-headerless_test_LDADD = $(top_builddir)/src/libsndfile.la
-stdin_test_SOURCES = stdin_test.c utils.c
-stdin_test_LDADD = $(top_builddir)/src/libsndfile.la
-stdout_test_SOURCES = stdout_test.c
-stdout_test_LDADD = $(top_builddir)/src/libsndfile.la
-stdio_test_SOURCES = stdio_test.c utils.c
-stdio_test_LDADD = $(top_builddir)/src/libsndfile.la
-pipe_test_SOURCES = pipe_test.c utils.c
-pipe_test_LDADD = $(top_builddir)/src/libsndfile.la
-benchmark_SOURCES = benchmark.c
-benchmark_LDADD = $(top_builddir)/src/libsndfile.la
-header_test_SOURCES = header_test.c utils.c
-header_test_LDADD = $(top_builddir)/src/libsndfile.la
-misc_test_SOURCES = misc_test.c utils.c
-misc_test_LDADD = $(top_builddir)/src/libsndfile.la
-raw_test_SOURCES = raw_test.c utils.c
-raw_test_LDADD = $(top_builddir)/src/libsndfile.la
-string_test_SOURCES = string_test.c utils.c
-string_test_LDADD = $(top_builddir)/src/libsndfile.la
-dither_test_SOURCES = dither_test.c utils.c
-dither_test_LDADD = $(top_builddir)/src/libsndfile.la
-chunk_test_SOURCES = chunk_test.c utils.c
-chunk_test_LDADD = $(top_builddir)/src/libsndfile.la
-multi_file_test_SOURCES = multi_file_test.c utils.c
-multi_file_test_LDADD = $(top_builddir)/src/libsndfile.la
-virtual_io_test_SOURCES = virtual_io_test.c utils.c
-virtual_io_test_LDADD = $(top_builddir)/src/libsndfile.la
-ogg_test_SOURCES = ogg_test.c utils.c
-ogg_test_LDADD = $(top_builddir)/src/libsndfile.la
-compression_size_test_SOURCES = compression_size_test.c utils.c
-compression_size_test_LDADD = $(top_builddir)/src/libsndfile.la
-rdwr_test_SOURCES = rdwr_test.c utils.c
-rdwr_test_LDADD = $(top_builddir)/src/libsndfile.la
-win32_test_SOURCES = win32_test.c
-# Link lib here so that generating the testsuite tarball works correctly.
-win32_test_LDADD = $(top_builddir)/src/libsndfile.la
-win32_ordinal_test_SOURCES = win32_ordinal_test.c utils.c
-win32_ordinal_test_LDADD = $(top_builddir)/src/libsndfile.la
-external_libs_test_SOURCES = external_libs_test.c utils.c
-external_libs_test_LDADD = $(top_builddir)/src/libsndfile.la
-format_check_test_SOURCES = format_check_test.c utils.c
-format_check_test_LDADD = $(top_builddir)/src/libsndfile.la
-channel_test_SOURCES = channel_test.c utils.c
-channel_test_LDADD = $(top_builddir)/src/libsndfile.la
-long_read_write_test_SOURCES = long_read_write_test.c utils.c
-long_read_write_test_LDADD = $(top_builddir)/src/libsndfile.la
-cpp_test_SOURCES = cpp_test.cc utils.c
-cpp_test_LDADD = $(top_builddir)/src/libsndfile.la
-checksum_test_SOURCES = checksum_test.c utils.c
-checksum_test_LDADD = $(top_builddir)/src/libsndfile.la
-
-# Lite remove start
-dwvw_test_SOURCES = utils.c dwvw_test.c
-dwvw_test_LDADD = $(top_builddir)/src/libsndfile.la
-floating_point_test_SOURCES = utils.c dft_cmp.c floating_point_test.c
-floating_point_test_LDADD = $(top_builddir)/src/libsndfile.la
-peak_chunk_test_SOURCES = peak_chunk_test.c utils.c
-peak_chunk_test_LDADD = $(top_builddir)/src/libsndfile.la
-scale_clip_test_SOURCES = scale_clip_test.c utils.c
-scale_clip_test_LDADD = $(top_builddir)/src/libsndfile.la
-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 tests/Makefile'; \
-       $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu tests/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):
-test_wrapper.sh: $(top_builddir)/config.status $(srcdir)/test_wrapper.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-pedantic-header-test.sh: $(top_builddir)/config.status $(srcdir)/pedantic-header-test.sh.in
-       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-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
-
-aiff_rw_test$(EXEEXT): $(aiff_rw_test_OBJECTS) $(aiff_rw_test_DEPENDENCIES) $(EXTRA_aiff_rw_test_DEPENDENCIES) 
-       @rm -f aiff_rw_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(aiff_rw_test_OBJECTS) $(aiff_rw_test_LDADD) $(LIBS)
-
-alaw_test$(EXEEXT): $(alaw_test_OBJECTS) $(alaw_test_DEPENDENCIES) $(EXTRA_alaw_test_DEPENDENCIES) 
-       @rm -f alaw_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(alaw_test_OBJECTS) $(alaw_test_LDADD) $(LIBS)
-
-benchmark$(EXEEXT): $(benchmark_OBJECTS) $(benchmark_DEPENDENCIES) $(EXTRA_benchmark_DEPENDENCIES) 
-       @rm -f benchmark$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(benchmark_OBJECTS) $(benchmark_LDADD) $(LIBS)
-
-channel_test$(EXEEXT): $(channel_test_OBJECTS) $(channel_test_DEPENDENCIES) $(EXTRA_channel_test_DEPENDENCIES) 
-       @rm -f channel_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(channel_test_OBJECTS) $(channel_test_LDADD) $(LIBS)
-
-checksum_test$(EXEEXT): $(checksum_test_OBJECTS) $(checksum_test_DEPENDENCIES) $(EXTRA_checksum_test_DEPENDENCIES) 
-       @rm -f checksum_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(checksum_test_OBJECTS) $(checksum_test_LDADD) $(LIBS)
-
-chunk_test$(EXEEXT): $(chunk_test_OBJECTS) $(chunk_test_DEPENDENCIES) $(EXTRA_chunk_test_DEPENDENCIES) 
-       @rm -f chunk_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(chunk_test_OBJECTS) $(chunk_test_LDADD) $(LIBS)
-
-command_test$(EXEEXT): $(command_test_OBJECTS) $(command_test_DEPENDENCIES) $(EXTRA_command_test_DEPENDENCIES) 
-       @rm -f command_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(command_test_OBJECTS) $(command_test_LDADD) $(LIBS)
-
-compression_size_test$(EXEEXT): $(compression_size_test_OBJECTS) $(compression_size_test_DEPENDENCIES) $(EXTRA_compression_size_test_DEPENDENCIES) 
-       @rm -f compression_size_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(compression_size_test_OBJECTS) $(compression_size_test_LDADD) $(LIBS)
-
-cpp_test$(EXEEXT): $(cpp_test_OBJECTS) $(cpp_test_DEPENDENCIES) $(EXTRA_cpp_test_DEPENDENCIES) 
-       @rm -f cpp_test$(EXEEXT)
-       $(AM_V_CXXLD)$(CXXLINK) $(cpp_test_OBJECTS) $(cpp_test_LDADD) $(LIBS)
-
-dither_test$(EXEEXT): $(dither_test_OBJECTS) $(dither_test_DEPENDENCIES) $(EXTRA_dither_test_DEPENDENCIES) 
-       @rm -f dither_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(dither_test_OBJECTS) $(dither_test_LDADD) $(LIBS)
-
-dwvw_test$(EXEEXT): $(dwvw_test_OBJECTS) $(dwvw_test_DEPENDENCIES) $(EXTRA_dwvw_test_DEPENDENCIES) 
-       @rm -f dwvw_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(dwvw_test_OBJECTS) $(dwvw_test_LDADD) $(LIBS)
-
-error_test$(EXEEXT): $(error_test_OBJECTS) $(error_test_DEPENDENCIES) $(EXTRA_error_test_DEPENDENCIES) 
-       @rm -f error_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(error_test_OBJECTS) $(error_test_LDADD) $(LIBS)
-
-external_libs_test$(EXEEXT): $(external_libs_test_OBJECTS) $(external_libs_test_DEPENDENCIES) $(EXTRA_external_libs_test_DEPENDENCIES) 
-       @rm -f external_libs_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(external_libs_test_OBJECTS) $(external_libs_test_LDADD) $(LIBS)
-
-fix_this$(EXEEXT): $(fix_this_OBJECTS) $(fix_this_DEPENDENCIES) $(EXTRA_fix_this_DEPENDENCIES) 
-       @rm -f fix_this$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(fix_this_OBJECTS) $(fix_this_LDADD) $(LIBS)
-
-floating_point_test$(EXEEXT): $(floating_point_test_OBJECTS) $(floating_point_test_DEPENDENCIES) $(EXTRA_floating_point_test_DEPENDENCIES) 
-       @rm -f floating_point_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(floating_point_test_OBJECTS) $(floating_point_test_LDADD) $(LIBS)
-
-format_check_test$(EXEEXT): $(format_check_test_OBJECTS) $(format_check_test_DEPENDENCIES) $(EXTRA_format_check_test_DEPENDENCIES) 
-       @rm -f format_check_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(format_check_test_OBJECTS) $(format_check_test_LDADD) $(LIBS)
-
-header_test$(EXEEXT): $(header_test_OBJECTS) $(header_test_DEPENDENCIES) $(EXTRA_header_test_DEPENDENCIES) 
-       @rm -f header_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(header_test_OBJECTS) $(header_test_LDADD) $(LIBS)
-
-headerless_test$(EXEEXT): $(headerless_test_OBJECTS) $(headerless_test_DEPENDENCIES) $(EXTRA_headerless_test_DEPENDENCIES) 
-       @rm -f headerless_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(headerless_test_OBJECTS) $(headerless_test_LDADD) $(LIBS)
-
-largefile_test$(EXEEXT): $(largefile_test_OBJECTS) $(largefile_test_DEPENDENCIES) $(EXTRA_largefile_test_DEPENDENCIES) 
-       @rm -f largefile_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(largefile_test_OBJECTS) $(largefile_test_LDADD) $(LIBS)
-
-locale_test$(EXEEXT): $(locale_test_OBJECTS) $(locale_test_DEPENDENCIES) $(EXTRA_locale_test_DEPENDENCIES) 
-       @rm -f locale_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(locale_test_OBJECTS) $(locale_test_LDADD) $(LIBS)
-
-long_read_write_test$(EXEEXT): $(long_read_write_test_OBJECTS) $(long_read_write_test_DEPENDENCIES) $(EXTRA_long_read_write_test_DEPENDENCIES) 
-       @rm -f long_read_write_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(long_read_write_test_OBJECTS) $(long_read_write_test_LDADD) $(LIBS)
-
-lossy_comp_test$(EXEEXT): $(lossy_comp_test_OBJECTS) $(lossy_comp_test_DEPENDENCIES) $(EXTRA_lossy_comp_test_DEPENDENCIES) 
-       @rm -f lossy_comp_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(lossy_comp_test_OBJECTS) $(lossy_comp_test_LDADD) $(LIBS)
-
-misc_test$(EXEEXT): $(misc_test_OBJECTS) $(misc_test_DEPENDENCIES) $(EXTRA_misc_test_DEPENDENCIES) 
-       @rm -f misc_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(misc_test_OBJECTS) $(misc_test_LDADD) $(LIBS)
-
-multi_file_test$(EXEEXT): $(multi_file_test_OBJECTS) $(multi_file_test_DEPENDENCIES) $(EXTRA_multi_file_test_DEPENDENCIES) 
-       @rm -f multi_file_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(multi_file_test_OBJECTS) $(multi_file_test_LDADD) $(LIBS)
-
-ogg_test$(EXEEXT): $(ogg_test_OBJECTS) $(ogg_test_DEPENDENCIES) $(EXTRA_ogg_test_DEPENDENCIES) 
-       @rm -f ogg_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(ogg_test_OBJECTS) $(ogg_test_LDADD) $(LIBS)
-
-pcm_test$(EXEEXT): $(pcm_test_OBJECTS) $(pcm_test_DEPENDENCIES) $(EXTRA_pcm_test_DEPENDENCIES) 
-       @rm -f pcm_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(pcm_test_OBJECTS) $(pcm_test_LDADD) $(LIBS)
-
-peak_chunk_test$(EXEEXT): $(peak_chunk_test_OBJECTS) $(peak_chunk_test_DEPENDENCIES) $(EXTRA_peak_chunk_test_DEPENDENCIES) 
-       @rm -f peak_chunk_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(peak_chunk_test_OBJECTS) $(peak_chunk_test_LDADD) $(LIBS)
-
-pipe_test$(EXEEXT): $(pipe_test_OBJECTS) $(pipe_test_DEPENDENCIES) $(EXTRA_pipe_test_DEPENDENCIES) 
-       @rm -f pipe_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(pipe_test_OBJECTS) $(pipe_test_LDADD) $(LIBS)
-
-raw_test$(EXEEXT): $(raw_test_OBJECTS) $(raw_test_DEPENDENCIES) $(EXTRA_raw_test_DEPENDENCIES) 
-       @rm -f raw_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(raw_test_OBJECTS) $(raw_test_LDADD) $(LIBS)
-
-rdwr_test$(EXEEXT): $(rdwr_test_OBJECTS) $(rdwr_test_DEPENDENCIES) $(EXTRA_rdwr_test_DEPENDENCIES) 
-       @rm -f rdwr_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(rdwr_test_OBJECTS) $(rdwr_test_LDADD) $(LIBS)
-
-scale_clip_test$(EXEEXT): $(scale_clip_test_OBJECTS) $(scale_clip_test_DEPENDENCIES) $(EXTRA_scale_clip_test_DEPENDENCIES) 
-       @rm -f scale_clip_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(scale_clip_test_OBJECTS) $(scale_clip_test_LDADD) $(LIBS)
-
-sfversion$(EXEEXT): $(sfversion_OBJECTS) $(sfversion_DEPENDENCIES) $(EXTRA_sfversion_DEPENDENCIES) 
-       @rm -f sfversion$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(sfversion_OBJECTS) $(sfversion_LDADD) $(LIBS)
-
-stdin_test$(EXEEXT): $(stdin_test_OBJECTS) $(stdin_test_DEPENDENCIES) $(EXTRA_stdin_test_DEPENDENCIES) 
-       @rm -f stdin_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(stdin_test_OBJECTS) $(stdin_test_LDADD) $(LIBS)
-
-stdio_test$(EXEEXT): $(stdio_test_OBJECTS) $(stdio_test_DEPENDENCIES) $(EXTRA_stdio_test_DEPENDENCIES) 
-       @rm -f stdio_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(stdio_test_OBJECTS) $(stdio_test_LDADD) $(LIBS)
-
-stdout_test$(EXEEXT): $(stdout_test_OBJECTS) $(stdout_test_DEPENDENCIES) $(EXTRA_stdout_test_DEPENDENCIES) 
-       @rm -f stdout_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(stdout_test_OBJECTS) $(stdout_test_LDADD) $(LIBS)
-
-string_test$(EXEEXT): $(string_test_OBJECTS) $(string_test_DEPENDENCIES) $(EXTRA_string_test_DEPENDENCIES) 
-       @rm -f string_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(string_test_OBJECTS) $(string_test_LDADD) $(LIBS)
-
-ulaw_test$(EXEEXT): $(ulaw_test_OBJECTS) $(ulaw_test_DEPENDENCIES) $(EXTRA_ulaw_test_DEPENDENCIES) 
-       @rm -f ulaw_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(ulaw_test_OBJECTS) $(ulaw_test_LDADD) $(LIBS)
-
-virtual_io_test$(EXEEXT): $(virtual_io_test_OBJECTS) $(virtual_io_test_DEPENDENCIES) $(EXTRA_virtual_io_test_DEPENDENCIES) 
-       @rm -f virtual_io_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(virtual_io_test_OBJECTS) $(virtual_io_test_LDADD) $(LIBS)
-
-win32_ordinal_test$(EXEEXT): $(win32_ordinal_test_OBJECTS) $(win32_ordinal_test_DEPENDENCIES) $(EXTRA_win32_ordinal_test_DEPENDENCIES) 
-       @rm -f win32_ordinal_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(win32_ordinal_test_OBJECTS) $(win32_ordinal_test_LDADD) $(LIBS)
-
-win32_test$(EXEEXT): $(win32_test_OBJECTS) $(win32_test_DEPENDENCIES) $(EXTRA_win32_test_DEPENDENCIES) 
-       @rm -f win32_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(win32_test_OBJECTS) $(win32_test_LDADD) $(LIBS)
-
-write_read_test$(EXEEXT): $(write_read_test_OBJECTS) $(write_read_test_DEPENDENCIES) $(EXTRA_write_read_test_DEPENDENCIES) 
-       @rm -f write_read_test$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(write_read_test_OBJECTS) $(write_read_test_LDADD) $(LIBS)
-
-mostlyclean-compile:
-       -rm -f *.$(OBJEXT)
-
-distclean-compile:
-       -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aiff_rw_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alaw_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/benchmark.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/channel_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checksum_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chunk_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/command_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compression_size_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpp_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dft_cmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dither_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dwvw_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/external_libs_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fix_this.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floating_point_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/format_check_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/header_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/headerless_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/largefile_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locale_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/long_read_write_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lossy_comp_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi_file_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ogg_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcm_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/peak_chunk_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdwr_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scale_clip_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfversion.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdin_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdout_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulaw_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virtual_io_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32_ordinal_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32_test.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write_read_test.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 $(HEADERS)
-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."
-@LINUX_MINGW_CROSS_TEST_FALSE@clean-local:
-clean: clean-am
-
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \
-       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 clean-local \
-       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
-
-
-#===============================================================================
-# If we're cross compiling from Linux to Windows and running the test suite
-# under Wine, we need a symbolic link to the generated libsndfile DLL.
-
-@LINUX_MINGW_CROSS_TEST_TRUE@$(check_PROGRAMS) : libsndfile-1.dll
-
-@LINUX_MINGW_CROSS_TEST_TRUE@libsndfile-1.dll :
-@LINUX_MINGW_CROSS_TEST_TRUE@  ln -s $(top_builddir)/src/.libs/$@ $@
-
-@LINUX_MINGW_CROSS_TEST_TRUE@clean-local :
-@LINUX_MINGW_CROSS_TEST_TRUE@  -rm -f libsndfile-1.dll
-
-#===============================================================================
-
-check: test_wrapper.sh
-       sh test_wrapper.sh
-
-# Need this target to force building of test programs.
-checkprograms : $(check_PROGRAMS)
-# Lite remove end
-
-#===============================================================================
-
-write_read_test.c: write_read_test.def write_read_test.tpl
-       cd $(srcdir) && autogen --writable write_read_test.def && cd $(abs_builddir)
-
-pcm_test.c: pcm_test.def pcm_test.tpl
-       cd $(srcdir) && autogen --writable pcm_test.def && cd $(abs_builddir)
-
-header_test.c: header_test.def header_test.tpl
-       cd $(srcdir) && autogen --writable header_test.def && cd $(abs_builddir)
-
-utils.c utils.h : utils.def utils.tpl
-       cd $(srcdir) && autogen --writable utils.def && cd $(abs_builddir)
-
-scale_clip_test.c: scale_clip_test.def scale_clip_test.tpl
-       cd $(srcdir) && autogen --writable scale_clip_test.def && cd $(abs_builddir)
-
-pipe_test.c: pipe_test.def pipe_test.tpl
-       cd $(srcdir) && autogen --writable pipe_test.def && cd $(abs_builddir)
-
-rdwr_test.c: rdwr_test.def rdwr_test.tpl
-       cd $(srcdir) && autogen --writable rdwr_test.def && cd $(abs_builddir)
-
-floating_point_test.c: floating_point_test.def floating_point_test.tpl
-       cd $(srcdir) && autogen --writable floating_point_test.def && cd $(abs_builddir)
-
-benchmark.c: benchmark.def benchmark.tpl
-       cd $(srcdir) && autogen --writable benchmark.def && cd $(abs_builddir)
-
-genfiles : write_read_test.c pcm_test.c header_test.c utils.c \
-               scale_clip_test.c pipe_test.c floating_point_test.c rdwr_test.c \
-               benchmark.c
-
-# 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:
diff --git a/tests/benchmark-0.0.28 b/tests/benchmark-0.0.28
new file mode 100644 (file)
index 0000000..2d2b06f
--- /dev/null
@@ -0,0 +1,40 @@
+erikd@coltrane > tests/benchmark 
+Benchmarking libsndfile-0.0.28
+------------------------------
+Each test takes a little over 5 seconds.
+
+    Raw write PCM_16  :   30660117 samples per sec
+    Raw read  PCM_16  :   62788982 samples per sec
+
+Native endian I/O :
+    Write short   to  PCM_16 :  83.37% of raw write
+    Read  short  from PCM_16 :  83.17% of raw read
+    Write int     to  PCM_24 :  30.78% of raw write
+    Read  int    from PCM_24 :  32.96% of raw read
+    Write int     to  PCM_32 :  42.05% of raw write
+    Read  int    from PCM_32 :  41.11% of raw read
+    Write float   to  PCM_16 :  17.75% of raw write
+    Read  float  from PCM_16 :  43.27% of raw read
+    Write float   to  PCM_24 :  15.30% of raw write
+    Read  float  from PCM_24 :  28.09% of raw read
+    Write float   to  PCM_32 :  14.55% of raw write
+    Read  float  from PCM_32 :  34.65% of raw read
+    Write float   to  FLOAT  :  28.98% of raw write
+    Read  float  from FLOAT  :  56.71% of raw read
+
+Endian swapped I/O :
+    Write short   to  PCM_16 :  43.39% of raw write
+    Read  short  from PCM_16 :  49.12% of raw read
+    Write int     to  PCM_24 :  29.65% of raw write
+    Read  int    from PCM_24 :  33.66% of raw read
+    Write int     to  PCM_32 :  19.62% of raw write
+    Read  int    from PCM_32 :  21.97% of raw read
+    Write float   to  PCM_16 :  17.63% of raw write
+    Read  float  from PCM_16 :  31.43% of raw read
+    Write float   to  PCM_24 :  14.91% of raw write
+    Read  float  from PCM_24 :  27.99% of raw read
+    Write float   to  PCM_32 :  13.69% of raw write
+    Read  float  from PCM_32 :  22.23% of raw read
+    Write float   to  FLOAT  :  19.25% of raw write
+    Read  float  from FLOAT  :  25.66% of raw read
+
diff --git a/tests/benchmark-1.0.0 b/tests/benchmark-1.0.0
new file mode 100644 (file)
index 0000000..2922836
--- /dev/null
@@ -0,0 +1,35 @@
+Benchmarking libsndfile-1.0.0
+-----------------------------
+Each test takes a little over 5 seconds.
+
+    Raw write PCM_16  :   31084269 samples per sec
+    Raw read  PCM_16  :   63597065 samples per sec
+
+Native endian I/O :
+    Write short   to  PCM_16 :  83.19% of raw write
+    Read  short  from PCM_16 :  82.93% of raw read
+    Write int     to  PCM_24 :  31.12% of raw write
+    Read  int    from PCM_24 :  37.90% of raw read
+    Write float   to  PCM_16 :  37.00% of raw write
+    Read  float  from PCM_16 :  45.53% of raw read
+    Write float   to  PCM_24 :  29.08% of raw write
+    Read  float  from PCM_24 :  28.48% of raw read
+    Write float   to  PCM_32 :  22.08% of raw write
+    Read  float  from PCM_32 :  31.21% of raw read
+    Write float   to  FLOAT  :  28.70% of raw write
+    Read  float  from FLOAT  :  56.32% of raw read
+
+Endian swapped I/O :
+    Write short   to  PCM_16 :  22.08% of raw write
+    Read  short  from PCM_16 :  23.20% of raw read
+    Write int     to  PCM_24 :  30.96% of raw write
+    Read  int    from PCM_24 :  37.76% of raw read
+    Write float   to  PCM_16 :  35.82% of raw write
+    Read  float  from PCM_16 :  22.61% of raw read
+    Write float   to  PCM_24 :  27.70% of raw write
+    Read  float  from PCM_24 :  28.37% of raw read
+    Write float   to  PCM_32 :  20.77% of raw write
+    Read  float  from PCM_32 :  23.46% of raw read
+    Write float   to  FLOAT  :  15.03% of raw write
+    Read  float  from FLOAT  :  15.43% of raw read
+
diff --git a/tests/benchmark-1.0.0rc2 b/tests/benchmark-1.0.0rc2
new file mode 100644 (file)
index 0000000..7702246
--- /dev/null
@@ -0,0 +1,31 @@
+Benchmarking libsndfile-1.0.0rc2
+--------------------------------
+Each test takes a little over 5 seconds.
+
+    Raw write PCM_16  :   31638069 samples per sec
+    Raw read  PCM_16  :   62788982 samples per sec
+
+Native endian I/O :
+    Write short   to  PCM_16 :  82.37% of raw write
+    Read  short  from PCM_16 :  82.17% of raw read
+    Write int     to  PCM_24 :  30.80% of raw write
+    Read  int    from PCM_24 :  37.95% of raw read
+    Write float   to  PCM_16 :  36.22% of raw write
+    Read  float  from PCM_16 :  23.32% of raw read
+    Write float   to  PCM_24 :  28.41% of raw write
+    Read  float  from PCM_24 :  28.41% of raw read
+    Write float   to  FLOAT  :  28.41% of raw write
+    Read  float  from FLOAT  :  57.50% of raw read
+
+Endian swapped I/O :
+    Write short   to  PCM_16 :  21.73% of raw write
+    Read  short  from PCM_16 :  23.37% of raw read
+    Write int     to  PCM_24 :  31.02% of raw write
+    Read  int    from PCM_24 :  38.24% of raw read
+    Write float   to  PCM_16 :  35.51% of raw write
+    Read  float  from PCM_16 :  19.16% of raw read
+    Write float   to  PCM_24 :  27.37% of raw write
+    Read  float  from PCM_24 :  28.74% of raw read
+    Write float   to  FLOAT  :  15.11% of raw write
+    Read  float  from FLOAT  :  15.60% of raw read
+
diff --git a/tests/benchmark-1.0.18pre16-hendrix b/tests/benchmark-1.0.18pre16-hendrix
new file mode 100644 (file)
index 0000000..951bc56
--- /dev/null
@@ -0,0 +1,38 @@
+Benchmarking libsndfile-1.0.18pre15
+-----------------------------------
+Each test takes a little over 5 seconds.
+
+    Raw write PCM_16  :  103189885 samples per sec
+    Raw read  PCM_16  :  660854036 samples per sec
+
+Native endian I/O :
+    Write short   to  PCM_16 :  95.08% of raw write
+    Read  short  from PCM_16 :  96.39% of raw read
+    Write int     to  PCM_24 :  54.55% of raw write
+    Read  int    from PCM_24 :  28.50% of raw read
+    Write int     to  PCM_32 :  46.97% of raw write
+    Read  int    from PCM_32 :  39.98% of raw read
+    Write float   to  PCM_16 :  60.85% of raw write
+    Read  float  from PCM_16 :  27.79% of raw read
+    Write float   to  PCM_24 :  46.23% of raw write
+    Read  float  from PCM_24 :  22.62% of raw read
+    Write float   to  PCM_32 :  35.38% of raw write
+    Read  float  from PCM_32 :  24.18% of raw read
+    Write float   to  FLOAT  :  47.73% of raw write
+    Read  float  from FLOAT  :  40.62% of raw read
+
+Endian swapped I/O :
+    Write short   to  PCM_16 :  79.98% of raw write
+    Read  short  from PCM_16 :  49.27% of raw read
+    Write int     to  PCM_24 :  53.80% of raw write
+    Read  int    from PCM_24 :  28.50% of raw read
+    Write int     to  PCM_32 :  41.68% of raw write
+    Read  int    from PCM_32 :  25.89% of raw read
+    Write float   to  PCM_16 :  61.03% of raw write
+    Read  float  from PCM_16 :  27.74% of raw read
+    Write float   to  PCM_24 :  45.10% of raw write
+    Read  float  from PCM_24 :  22.43% of raw read
+    Write float   to  PCM_32 :  35.24% of raw write
+    Read  float  from PCM_32 :  22.37% of raw read
+    Write float   to  FLOAT  :  42.01% of raw write
+    Read  float  from FLOAT  :  28.98% of raw read
diff --git a/tests/benchmark-1.0.18pre16-mingus b/tests/benchmark-1.0.18pre16-mingus
new file mode 100644 (file)
index 0000000..fa0584e
--- /dev/null
@@ -0,0 +1,38 @@
+Benchmarking libsndfile-1.0.18pre15
+-----------------------------------
+Each test takes a little over 5 seconds.
+
+    Raw write PCM_16  :  178237074 samples per sec
+    Raw read  PCM_16  :  368885269 samples per sec
+
+Native endian I/O :
+    Write short   to  PCM_16 :  98.84% of raw write
+    Read  short  from PCM_16 : 147.10% of raw read
+    Write int     to  PCM_24 :  33.74% of raw write
+    Read  int    from PCM_24 :  30.82% of raw read
+    Write int     to  PCM_32 :  48.34% of raw write
+    Read  int    from PCM_32 :  62.43% of raw read
+    Write float   to  PCM_16 :  41.86% of raw write
+    Read  float  from PCM_16 :  36.73% of raw read
+    Write float   to  PCM_24 :  28.38% of raw write
+    Read  float  from PCM_24 :  19.50% of raw read
+    Write float   to  PCM_32 :  23.68% of raw write
+    Read  float  from PCM_32 :  28.76% of raw read
+    Write float   to  FLOAT  :  47.21% of raw write
+    Read  float  from FLOAT  :  60.85% of raw read
+
+Endian swapped I/O :
+    Write short   to  PCM_16 :  54.94% of raw write
+    Read  short  from PCM_16 :  59.03% of raw read
+    Write int     to  PCM_24 :  33.40% of raw write
+    Read  int    from PCM_24 :  31.98% of raw read
+    Write int     to  PCM_32 :  30.89% of raw write
+    Read  int    from PCM_32 :  33.68% of raw read
+    Write float   to  PCM_16 :  41.61% of raw write
+    Read  float  from PCM_16 :  26.76% of raw read
+    Write float   to  PCM_24 :  25.75% of raw write
+    Read  float  from PCM_24 :  19.84% of raw read
+    Write float   to  PCM_32 :  21.29% of raw write
+    Read  float  from PCM_32 :  21.78% of raw read
+    Write float   to  FLOAT  :  30.82% of raw write
+    Read  float  from FLOAT  :  35.04% of raw read
diff --git a/tests/benchmark-1.0.6pre10-coltrane b/tests/benchmark-1.0.6pre10-coltrane
new file mode 100644 (file)
index 0000000..12f71a8
--- /dev/null
@@ -0,0 +1,39 @@
+Benchmarking libsndfile-1.0.6pre10
+----------------------------------
+Each test takes a little over 5 seconds.
+
+    Raw write PCM_16  :   28845961 samples per sec
+    Raw read  PCM_16  :   63471874 samples per sec
+
+Native endian I/O :
+    Write short   to  PCM_16 :  86.21% of raw write
+    Read  short  from PCM_16 :  82.60% of raw read
+    Write int     to  PCM_24 :  34.89% of raw write
+    Read  int    from PCM_24 :  37.26% of raw read
+    Write int     to  PCM_32 :  43.36% of raw write
+    Read  int    from PCM_32 :  41.30% of raw read
+    Write float   to  PCM_16 :  43.02% of raw write
+    Read  float  from PCM_16 :  43.99% of raw read
+    Write float   to  PCM_24 :  32.72% of raw write
+    Read  float  from PCM_24 :  28.21% of raw read
+    Write float   to  PCM_32 :  25.92% of raw write
+    Read  float  from PCM_32 :  30.98% of raw read
+    Write float   to  FLOAT  :  46.65% of raw write
+    Read  float  from FLOAT  :  56.66% of raw read
+
+Endian swapped I/O :
+    Write short   to  PCM_16 :  54.53% of raw write
+    Read  short  from PCM_16 :  56.32% of raw read
+    Write int     to  PCM_24 :  35.28% of raw write
+    Read  int    from PCM_24 :  37.33% of raw read
+    Write int     to  PCM_32 :  26.21% of raw write
+    Read  int    from PCM_32 :  23.51% of raw read
+    Write float   to  PCM_16 :  41.39% of raw write
+    Read  float  from PCM_16 :  23.56% of raw read
+    Write float   to  PCM_24 :  30.86% of raw write
+    Read  float  from PCM_24 :  28.27% of raw read
+    Write float   to  PCM_32 :  23.83% of raw write
+    Read  float  from PCM_32 :  20.54% of raw read
+    Write float   to  FLOAT  :  27.26% of raw write
+    Read  float  from FLOAT  :  29.04% of raw read
+
diff --git a/tests/benchmark-1.0.6pre10-miles b/tests/benchmark-1.0.6pre10-miles
new file mode 100644 (file)
index 0000000..fffdb84
--- /dev/null
@@ -0,0 +1,39 @@
+Benchmarking libsndfile-1.0.6pre10
+----------------------------------
+Each test takes a little over 5 seconds.
+
+    Raw write PCM_16  :   40092612 samples per sec
+    Raw read  PCM_16  :   42382563 samples per sec
+
+Native endian I/O :
+    Write short   to  PCM_16 :  61.90% of raw write
+    Read  short  from PCM_16 : 100.20% of raw read
+    Write int     to  PCM_24 :  28.69% of raw write
+    Read  int    from PCM_24 :  33.62% of raw read
+    Write int     to  PCM_32 :  31.14% of raw write
+    Read  int    from PCM_32 :  51.04% of raw read
+    Write float   to  PCM_16 :  25.57% of raw write
+    Read  float  from PCM_16 :  28.17% of raw read
+    Write float   to  PCM_24 :  23.59% of raw write
+    Read  float  from PCM_24 :  24.14% of raw read
+    Write float   to  PCM_32 :  18.00% of raw write
+    Read  float  from PCM_32 :  22.59% of raw read
+    Write float   to  FLOAT  :  31.32% of raw write
+    Read  float  from FLOAT  :  51.54% of raw read
+
+Endian swapped I/O :
+    Write short   to  PCM_16 :  42.81% of raw write
+    Read  short  from PCM_16 :  54.58% of raw read
+    Write int     to  PCM_24 :  29.28% of raw write
+    Read  int    from PCM_24 :  33.43% of raw read
+    Write int     to  PCM_32 :  22.21% of raw write
+    Read  int    from PCM_32 :  27.24% of raw read
+    Write float   to  PCM_16 :  25.76% of raw write
+    Read  float  from PCM_16 :  26.84% of raw read
+    Write float   to  PCM_24 :  23.71% of raw write
+    Read  float  from PCM_24 :  24.10% of raw read
+    Write float   to  PCM_32 :  18.47% of raw write
+    Read  float  from PCM_32 :  21.45% of raw read
+    Write float   to  FLOAT  :  22.46% of raw write
+    Read  float  from FLOAT  :  29.72% of raw read
+
diff --git a/tests/benchmark-latest-coltrane b/tests/benchmark-latest-coltrane
new file mode 100644 (file)
index 0000000..97ce29a
--- /dev/null
@@ -0,0 +1,75 @@
+erikd@coltrane > cat tests/benchmark-0.0.28         
+Benchmarking libsndfile-0.0.28
+------------------------------
+Each test takes a little over 5 seconds.
+
+    Raw write PCM_16  :   31022959 samples per sec
+    Raw read  PCM_16  :   63471874 samples per sec
+
+Native endian I/O :
+    Write short   to  PCM_16 :  83.19% of raw write
+    Read  short  from PCM_16 :  82.28% of raw read
+    Write int     to  PCM_24 :  30.81% of raw write
+    Read  int    from PCM_24 :  32.92% of raw read
+    Write float   to  PCM_16 :  17.70% of raw write
+    Read  float  from PCM_16 :  43.64% of raw read
+    Write float   to  PCM_24 :  15.09% of raw write
+    Read  float  from PCM_24 :  27.79% of raw read
+    Write float   to  PCM_32 :  14.32% of raw write
+    Read  float  from PCM_32 :  34.42% of raw read
+    Write float   to  FLOAT  :  28.64% of raw write
+    Read  float  from FLOAT  :  56.77% of raw read
+
+Endian swapped I/O :
+    Write short   to  PCM_16 :  44.04% of raw write
+    Read  short  from PCM_16 :  49.46% of raw read
+    Write int     to  PCM_24 :  28.92% of raw write
+    Read  int    from PCM_24 :  33.10% of raw read
+    Write float   to  PCM_16 :  17.30% of raw write
+    Read  float  from PCM_16 :  31.46% of raw read
+    Write float   to  PCM_24 :  14.62% of raw write
+    Read  float  from PCM_24 :  27.64% of raw read
+    Write float   to  PCM_32 :  13.65% of raw write
+    Read  float  from PCM_32 :  22.41% of raw read
+    Write float   to  FLOAT  :  19.13% of raw write
+    Read  float  from FLOAT  :  26.21% of raw read
+
+erikd@coltrane > tests/benchmark 
+Benchmarking libsndfile-1.0.0
+-----------------------------
+Each test takes a little over 5 seconds.
+
+    Raw write PCM_16  :   29884416 samples per sec
+    Raw read  PCM_16  :   63347175 samples per sec
+
+Native endian I/O :
+    Write short   to  PCM_16 :  88.24% of raw write
+    Read  short  from PCM_16 :  82.76% of raw read
+    Write int     to  PCM_24 :  34.95% of raw write
+    Read  int    from PCM_24 :  37.17% of raw read
+    Write int     to  PCM_32 :  43.86% of raw write
+    Read  int    from PCM_32 :  41.22% of raw read
+    Write float   to  PCM_16 :  42.07% of raw write
+    Read  float  from PCM_16 :  44.25% of raw read
+    Write float   to  PCM_24 :  32.43% of raw write
+    Read  float  from PCM_24 :  28.93% of raw read
+    Write float   to  PCM_32 :  25.60% of raw write
+    Read  float  from PCM_32 :  31.10% of raw read
+    Write float   to  FLOAT  :  45.55% of raw write
+    Read  float  from FLOAT  :  57.41% of raw read
+
+Endian swapped I/O :
+    Write short   to  PCM_16 :  43.46% of raw write
+    Read  short  from PCM_16 :  43.99% of raw read
+    Write int     to  PCM_24 :  35.09% of raw write
+    Read  int    from PCM_24 :  37.34% of raw read
+    Write int     to  PCM_32 :  24.05% of raw write
+    Read  int    from PCM_32 :  19.74% of raw read
+    Write float   to  PCM_16 :  40.25% of raw write
+    Read  float  from PCM_16 :  32.15% of raw read
+    Write float   to  PCM_24 :  31.02% of raw write
+    Read  float  from PCM_24 :  28.82% of raw read
+    Write float   to  PCM_32 :  23.54% of raw write
+    Read  float  from PCM_32 :  23.65% of raw read
+    Write float   to  FLOAT  :  24.87% of raw write
+    Read  float  from FLOAT  :  20.28% of raw read
diff --git a/tests/benchmark.c b/tests/benchmark.c
deleted file mode 100644 (file)
index 4983125..0000000
+++ /dev/null
@@ -1,545 +0,0 @@
-/*
-** Copyright (C) 2002-2012 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 "sfconfig.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if (HAVE_DECL_S_IRGRP == 0)
-#include <sf_unistd.h>
-#endif
-
-#include <string.h>
-#include <math.h>
-#include <time.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#include <sndfile.h>
-
-#ifndef                M_PI
-#define                M_PI            3.14159265358979323846264338
-#endif
-
-/*
-**     Neat solution to the Win32/OS2 binary file flage requirement.
-**     If O_BINARY isn't already defined by the inclusion of the system
-**     headers, set it to zero.
-*/
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-#define        WRITE_FLAGS     (O_WRONLY | O_CREAT | O_TRUNC | O_BINARY)
-#define        READ_FLAGS      (O_RDONLY | O_BINARY)
-
-#if (defined (WIN32) || defined (_WIN32) || defined (__OS2__))
-       #define WRITE_PERMS     0777
-#else
-       #define WRITE_PERMS     (S_IRUSR | S_IWUSR | S_IRGRP)
-#endif
-
-#define        BUFFER_SIZE             (1 << 18)
-#define        BLOCK_COUNT             (30)
-#define        TEST_DURATION   (5)             /* 5 Seconds. */
-
-typedef struct
-{      double  write_rate ;
-       double  read_rate ;
-} PERF_STATS ;
-
-static void    *data = NULL ;
-
-static void calc_raw_performance (PERF_STATS *stats) ;
-
-static void    calc_short_performance (int format, double read_rate, double write_rate) ;
-static void    calc_int_performance (int format, double read_rate, double write_rate) ;
-static void    calc_float_performance (int format, double read_rate, double write_rate) ;
-
-
-static int cpu_is_big_endian (void) ;
-
-static const char* get_subtype_str (int subtype) ;
-
-int
-main (int argc, char *argv [])
-{      PERF_STATS      stats ;
-       char            buffer [256] = "Benchmarking " ;
-       int                     format_major ;
-
-       if (! (data = malloc (BUFFER_SIZE * sizeof (double))))
-       {       perror ("Error : malloc failed") ;
-               exit (1) ;
-               } ;
-
-       sf_command (NULL, SFC_GET_LIB_VERSION, buffer + strlen (buffer), sizeof (buffer) - strlen (buffer)) ;
-
-       puts (buffer) ;
-       memset (buffer, '-', strlen (buffer)) ;
-       puts (buffer) ;
-       printf ("Each test takes a little over %d seconds.\n\n", TEST_DURATION) ;
-
-       calc_raw_performance (&stats) ;
-
-       if (argc < 2 || strcmp ("--native-only", argv [1]) == 0)
-       {       puts ("\nNative endian I/O :") ;
-               format_major = cpu_is_big_endian () ? SF_FORMAT_AIFF : SF_FORMAT_WAV ;
-
-               calc_short_performance  (format_major | SF_FORMAT_PCM_16, stats.read_rate, stats.write_rate) ;
-               calc_int_performance    (format_major | SF_FORMAT_PCM_24, stats.read_rate, stats.write_rate) ;
-               calc_int_performance    (format_major | SF_FORMAT_PCM_32, stats.read_rate, stats.write_rate) ;
-               calc_float_performance  (format_major | SF_FORMAT_PCM_16, stats.read_rate, stats.write_rate) ;
-               calc_float_performance  (format_major | SF_FORMAT_PCM_24, stats.read_rate, stats.write_rate) ;
-               calc_float_performance  (format_major | SF_FORMAT_PCM_32, stats.read_rate, stats.write_rate) ;
-               calc_float_performance  (format_major | SF_FORMAT_FLOAT , stats.read_rate, stats.write_rate) ;
-               } ;
-
-       if (argc < 2 || strcmp ("--swap-only", argv [1]) == 0)
-       {       puts ("\nEndian swapped I/O :") ;
-               format_major = cpu_is_big_endian () ? SF_FORMAT_WAV : SF_FORMAT_AIFF ;
-
-               calc_short_performance  (format_major | SF_FORMAT_PCM_16, stats.read_rate, stats.write_rate) ;
-               calc_int_performance    (format_major | SF_FORMAT_PCM_24, stats.read_rate, stats.write_rate) ;
-               calc_int_performance    (format_major | SF_FORMAT_PCM_32, stats.read_rate, stats.write_rate) ;
-               calc_float_performance  (format_major | SF_FORMAT_PCM_16, stats.read_rate, stats.write_rate) ;
-               calc_float_performance  (format_major | SF_FORMAT_PCM_24, stats.read_rate, stats.write_rate) ;
-               calc_float_performance  (format_major | SF_FORMAT_PCM_32, stats.read_rate, stats.write_rate) ;
-               calc_float_performance  (format_major | SF_FORMAT_FLOAT , stats.read_rate, stats.write_rate) ;
-               } ;
-
-       puts ("") ;
-
-       free (data) ;
-
-       return 0 ;
-} /* main */
-
-/*==============================================================================
-*/
-
-static void
-calc_raw_performance (PERF_STATS *stats)
-{      clock_t start_clock, clock_time ;
-       int fd, k, byte_count, retval, op_count ;
-       const char *filename ;
-
-       filename = "benchmark.dat" ;
-
-       byte_count = BUFFER_SIZE * sizeof (short) ;
-
-       /* Collect write stats */
-       printf ("    Raw write PCM_16  : ") ;
-       fflush (stdout) ;
-
-       clock_time = 0 ;
-       op_count = 0 ;
-       start_clock = clock () ;
-
-       while (clock_time < (CLOCKS_PER_SEC * TEST_DURATION))
-       {       if ((fd = open (filename, WRITE_FLAGS, WRITE_PERMS)) < 0)
-               {       printf ("Error : not able to open file : %s\n", filename) ;
-                       perror ("") ;
-                       exit (1) ;
-                       } ;
-
-               for (k = 0 ; k < BLOCK_COUNT ; k++)
-               {       if ((retval = write (fd, data, byte_count)) != byte_count)
-                       {       printf ("Error : write returned %d (should have been %d)\n", retval, byte_count) ;
-                               exit (1) ;
-                               } ;
-                       } ;
-
-               close (fd) ;
-
-               clock_time = clock () - start_clock ;
-               op_count ++ ;
-               } ;
-
-       stats->write_rate = (1.0 * BUFFER_SIZE) * BLOCK_COUNT * op_count ;
-       stats->write_rate *= (1.0 * CLOCKS_PER_SEC) / clock_time ;
-       printf ("%10.0f samples per sec\n", stats->write_rate) ;
-
-       /* Collect read stats */
-       printf ("    Raw read  PCM_16  : ") ;
-       fflush (stdout) ;
-
-       clock_time = 0 ;
-       op_count = 0 ;
-       start_clock = clock () ;
-
-       while (clock_time < (CLOCKS_PER_SEC * TEST_DURATION))
-       {       if ((fd = open (filename, READ_FLAGS)) < 0)
-               {       printf ("Error : not able to open file : %s\n", filename) ;
-                       perror ("") ;
-                       exit (1) ;
-                       } ;
-
-               for (k = 0 ; k < BLOCK_COUNT ; k++)
-               {       if ((retval = read (fd, data, byte_count)) != byte_count)
-                       {       printf ("Error : write returned %d (should have been %d)\n", retval, byte_count) ;
-                               exit (1) ;
-                               } ;
-                       } ;
-
-               close (fd) ;
-
-               clock_time = clock () - start_clock ;
-               op_count ++ ;
-               } ;
-
-       stats->read_rate = (1.0 * BUFFER_SIZE) * BLOCK_COUNT * op_count ;
-       stats->read_rate *= (1.0 * CLOCKS_PER_SEC) / clock_time ;
-       printf ("%10.0f samples per sec\n", stats->read_rate) ;
-
-       unlink (filename) ;
-} /* calc_raw_performance */
-
-/*------------------------------------------------------------------------------
-*/
-
-static void
-calc_short_performance (int format, double read_rate, double write_rate)
-{      SNDFILE *file ;
-       SF_INFO sfinfo ;
-       clock_t start_clock, clock_time ;
-       double  performance ;
-       int k, item_count, retval, op_count ;
-       const char* subtype ;
-       short *short_data ;
-       const char *filename ;
-
-       filename = "benchmark.dat" ;
-       subtype = get_subtype_str (format & SF_FORMAT_SUBMASK) ;
-
-       short_data = data ;
-       item_count = BUFFER_SIZE ;
-       for (k = 0 ; k < item_count ; k++)
-               short_data [k] = 32700.0 * sin (2 * M_PI * k / 32000.0) ;
-
-       /* Collect write stats */
-       printf ("    Write %-5s   to  %s : ", "short", subtype) ;
-       fflush (stdout) ;
-
-       sfinfo.channels = 1 ;
-       sfinfo.format = format ;
-       sfinfo.frames = 1 ;
-       sfinfo.samplerate = 32000 ;
-
-       clock_time = 0 ;
-       op_count = 0 ;
-       start_clock = clock () ;
-
-       while (clock_time < (CLOCKS_PER_SEC * TEST_DURATION))
-       {       if (! (file = sf_open (filename, SFM_WRITE, &sfinfo)))
-               {       printf ("Error : not able to open file : %s\n", filename) ;
-                       perror ("") ;
-                       exit (1) ;
-                       } ;
-
-               /* Turn off the addition of a PEAK chunk. */
-               sf_command (file, SFC_SET_ADD_PEAK_CHUNK, NULL, SF_FALSE) ;
-
-               for (k = 0 ; k < BLOCK_COUNT ; k++)
-               {       if ((retval = sf_write_short (file, short_data, item_count)) != item_count)
-                       {       printf ("Error : sf_write_short returned %d (should have been %d)\n", retval, item_count) ;
-                               exit (1) ;
-                               } ;
-                       } ;
-
-               sf_close (file) ;
-
-               clock_time = clock () - start_clock ;
-               op_count ++ ;
-               } ;
-
-       performance = (1.0 * BUFFER_SIZE) * BLOCK_COUNT * op_count ;
-       performance *= (1.0 * CLOCKS_PER_SEC) / clock_time ;
-       printf ("%6.2f%% of raw write\n", 100.0 * performance / write_rate) ;
-
-       /* Collect read stats */
-       printf ("    Read  %-5s  from %s : ", "short", subtype) ;
-       fflush (stdout) ;
-
-       clock_time = 0 ;
-       op_count = 0 ;
-       start_clock = clock () ;
-
-       while (clock_time < (CLOCKS_PER_SEC * TEST_DURATION))
-       {       if (! (file = sf_open (filename, SFM_READ, &sfinfo)))
-               {       printf ("Error : not able to open file : %s\n", filename) ;
-                       perror ("") ;
-                       exit (1) ;
-                       } ;
-
-               for (k = 0 ; k < BLOCK_COUNT ; k++)
-               {       if ((retval = sf_read_short (file, short_data, item_count)) != item_count)
-                       {       printf ("Error : write returned %d (should have been %d)\n", retval, item_count) ;
-                               exit (1) ;
-                               } ;
-                       } ;
-
-               sf_close (file) ;
-
-               clock_time = clock () - start_clock ;
-               op_count ++ ;
-               } ;
-
-       performance = (1.0 * item_count) * BLOCK_COUNT * op_count ;
-       performance *= (1.0 * CLOCKS_PER_SEC) / clock_time ;
-       printf ("%6.2f%% of raw read\n", 100.0 * performance / read_rate) ;
-
-       unlink (filename) ;
-
-} /* calc_short_performance */
-static void
-calc_int_performance (int format, double read_rate, double write_rate)
-{      SNDFILE *file ;
-       SF_INFO sfinfo ;
-       clock_t start_clock, clock_time ;
-       double  performance ;
-       int k, item_count, retval, op_count ;
-       const char* subtype ;
-       int *int_data ;
-       const char *filename ;
-
-       filename = "benchmark.dat" ;
-       subtype = get_subtype_str (format & SF_FORMAT_SUBMASK) ;
-
-       int_data = data ;
-       item_count = BUFFER_SIZE ;
-       for (k = 0 ; k < item_count ; k++)
-               int_data [k] = 32700.0 * (1 << 16) * sin (2 * M_PI * k / 32000.0) ;
-
-       /* Collect write stats */
-       printf ("    Write %-5s   to  %s : ", "int", subtype) ;
-       fflush (stdout) ;
-
-       sfinfo.channels = 1 ;
-       sfinfo.format = format ;
-       sfinfo.frames = 1 ;
-       sfinfo.samplerate = 32000 ;
-
-       clock_time = 0 ;
-       op_count = 0 ;
-       start_clock = clock () ;
-
-       while (clock_time < (CLOCKS_PER_SEC * TEST_DURATION))
-       {       if (! (file = sf_open (filename, SFM_WRITE, &sfinfo)))
-               {       printf ("Error : not able to open file : %s\n", filename) ;
-                       perror ("") ;
-                       exit (1) ;
-                       } ;
-
-               /* Turn off the addition of a PEAK chunk. */
-               sf_command (file, SFC_SET_ADD_PEAK_CHUNK, NULL, SF_FALSE) ;
-
-               for (k = 0 ; k < BLOCK_COUNT ; k++)
-               {       if ((retval = sf_write_int (file, int_data, item_count)) != item_count)
-                       {       printf ("Error : sf_write_short returned %d (should have been %d)\n", retval, item_count) ;
-                               exit (1) ;
-                               } ;
-                       } ;
-
-               sf_close (file) ;
-
-               clock_time = clock () - start_clock ;
-               op_count ++ ;
-               } ;
-
-       performance = (1.0 * BUFFER_SIZE) * BLOCK_COUNT * op_count ;
-       performance *= (1.0 * CLOCKS_PER_SEC) / clock_time ;
-       printf ("%6.2f%% of raw write\n", 100.0 * performance / write_rate) ;
-
-       /* Collect read stats */
-       printf ("    Read  %-5s  from %s : ", "int", subtype) ;
-       fflush (stdout) ;
-
-       clock_time = 0 ;
-       op_count = 0 ;
-       start_clock = clock () ;
-
-       while (clock_time < (CLOCKS_PER_SEC * TEST_DURATION))
-       {       if (! (file = sf_open (filename, SFM_READ, &sfinfo)))
-               {       printf ("Error : not able to open file : %s\n", filename) ;
-                       perror ("") ;
-                       exit (1) ;
-                       } ;
-
-               for (k = 0 ; k < BLOCK_COUNT ; k++)
-               {       if ((retval = sf_read_int (file, int_data, item_count)) != item_count)
-                       {       printf ("Error : write returned %d (should have been %d)\n", retval, item_count) ;
-                               exit (1) ;
-                               } ;
-                       } ;
-
-               sf_close (file) ;
-
-               clock_time = clock () - start_clock ;
-               op_count ++ ;
-               } ;
-
-       performance = (1.0 * item_count) * BLOCK_COUNT * op_count ;
-       performance *= (1.0 * CLOCKS_PER_SEC) / clock_time ;
-       printf ("%6.2f%% of raw read\n", 100.0 * performance / read_rate) ;
-
-       unlink (filename) ;
-
-} /* calc_int_performance */
-static void
-calc_float_performance (int format, double read_rate, double write_rate)
-{      SNDFILE *file ;
-       SF_INFO sfinfo ;
-       clock_t start_clock, clock_time ;
-       double  performance ;
-       int k, item_count, retval, op_count ;
-       const char* subtype ;
-       float *float_data ;
-       const char *filename ;
-
-       filename = "benchmark.dat" ;
-       subtype = get_subtype_str (format & SF_FORMAT_SUBMASK) ;
-
-       float_data = data ;
-       item_count = BUFFER_SIZE ;
-       for (k = 0 ; k < item_count ; k++)
-               float_data [k] = 1.0 * sin (2 * M_PI * k / 32000.0) ;
-
-       /* Collect write stats */
-       printf ("    Write %-5s   to  %s : ", "float", subtype) ;
-       fflush (stdout) ;
-
-       sfinfo.channels = 1 ;
-       sfinfo.format = format ;
-       sfinfo.frames = 1 ;
-       sfinfo.samplerate = 32000 ;
-
-       clock_time = 0 ;
-       op_count = 0 ;
-       start_clock = clock () ;
-
-       while (clock_time < (CLOCKS_PER_SEC * TEST_DURATION))
-       {       if (! (file = sf_open (filename, SFM_WRITE, &sfinfo)))
-               {       printf ("Error : not able to open file : %s\n", filename) ;
-                       perror ("") ;
-                       exit (1) ;
-                       } ;
-
-               /* Turn off the addition of a PEAK chunk. */
-               sf_command (file, SFC_SET_ADD_PEAK_CHUNK, NULL, SF_FALSE) ;
-
-               for (k = 0 ; k < BLOCK_COUNT ; k++)
-               {       if ((retval = sf_write_float (file, float_data, item_count)) != item_count)
-                       {       printf ("Error : sf_write_short returned %d (should have been %d)\n", retval, item_count) ;
-                               exit (1) ;
-                               } ;
-                       } ;
-
-               sf_close (file) ;
-
-               clock_time = clock () - start_clock ;
-               op_count ++ ;
-               } ;
-
-       performance = (1.0 * BUFFER_SIZE) * BLOCK_COUNT * op_count ;
-       performance *= (1.0 * CLOCKS_PER_SEC) / clock_time ;
-       printf ("%6.2f%% of raw write\n", 100.0 * performance / write_rate) ;
-
-       /* Collect read stats */
-       printf ("    Read  %-5s  from %s : ", "float", subtype) ;
-       fflush (stdout) ;
-
-       clock_time = 0 ;
-       op_count = 0 ;
-       start_clock = clock () ;
-
-       while (clock_time < (CLOCKS_PER_SEC * TEST_DURATION))
-       {       if (! (file = sf_open (filename, SFM_READ, &sfinfo)))
-               {       printf ("Error : not able to open file : %s\n", filename) ;
-                       perror ("") ;
-                       exit (1) ;
-                       } ;
-
-               for (k = 0 ; k < BLOCK_COUNT ; k++)
-               {       if ((retval = sf_read_float (file, float_data, item_count)) != item_count)
-                       {       printf ("Error : write returned %d (should have been %d)\n", retval, item_count) ;
-                               exit (1) ;
-                               } ;
-                       } ;
-
-               sf_close (file) ;
-
-               clock_time = clock () - start_clock ;
-               op_count ++ ;
-               } ;
-
-       performance = (1.0 * item_count) * BLOCK_COUNT * op_count ;
-       performance *= (1.0 * CLOCKS_PER_SEC) / clock_time ;
-       printf ("%6.2f%% of raw read\n", 100.0 * performance / read_rate) ;
-
-       unlink (filename) ;
-
-} /* calc_float_performance */
-
-
-/*==============================================================================
-*/
-
-static int
-cpu_is_big_endian (void)
-{      unsigned char   *cptr ;
-       int                     endtest ;
-
-       endtest = 0x12345678 ;
-
-       cptr = (unsigned char*) (&endtest) ;
-
-       if (cptr [0] == 0x12 && cptr [1] == 0x34 && cptr [3] == 0x78)
-               return SF_TRUE ;
-
-       return SF_FALSE ;
-} /* cpu_is_big_endian */
-
-static const char*
-get_subtype_str (int subtype)
-{      switch (subtype)
-       {       case SF_FORMAT_PCM_16 :
-                               return "PCM_16" ;
-
-               case SF_FORMAT_PCM_24 :
-                               return "PCM_24" ;
-
-               case SF_FORMAT_PCM_32 :
-                               return "PCM_32" ;
-
-               case SF_FORMAT_FLOAT :
-                               return "FLOAT " ;
-
-               case SF_FORMAT_DOUBLE :
-                               return "DOUBLE" ;
-
-               default : break ;
-               } ;
-
-       return "UNKNOWN" ;
-} /* get_subtype_str */
-
index 5a036b1..f1bc074 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2003-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2003-2016 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
 
 #include       <sndfile.h>
 
+#include       "sfendian.h"
 #include       "utils.h"
 
 #define        BUFFER_LEN                      (1 << 10)
 #define LOG_BUFFER_SIZE                1024
 
 static void    chunk_test (const char *filename, int format) ;
-
-static void
-chunk_test_helper (const char *filename, int format, const char * testdata) ;
+static void wav_subchunk_test (size_t chunk_size) ;
+static void    large_free_test (const char *filename, int format, size_t chunk_size) ;
 
 int
 main (int argc, char *argv [])
 {      int             do_all = 0 ;
-       int             test_count = 0 ;
+       int             test_count = 0, k ;
 
        if (argc != 2)
        {       printf ("Usage : %s <test>\n", argv [0]) ;
                printf ("    Where <test> is one of the following:\n") ;
                printf ("           wav  - test adding chunks to WAV files\n") ;
                printf ("           aiff - test adding chunks to AIFF files\n") ;
+               printf ("           caf  - test adding chunks to CAF files\n") ;
+               printf ("           rf64 - test adding chunks to RF64 files\n") ;
                printf ("           all  - perform all tests\n") ;
                exit (1) ;
                } ;
@@ -59,6 +61,10 @@ main (int argc, char *argv [])
        {       chunk_test ("chunks_pcm16.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_16) ;
                chunk_test ("chunks_pcm16.rifx", SF_ENDIAN_BIG | SF_FORMAT_WAV | SF_FORMAT_PCM_16) ;
                chunk_test ("chunks_pcm16.wavex", SF_FORMAT_WAVEX | SF_FORMAT_PCM_16) ;
+
+               for (k = 100 ; k < 10000 ; k *= 4)
+                       wav_subchunk_test (k) ;
+
                test_count++ ;
                } ;
 
@@ -70,6 +76,13 @@ main (int argc, char *argv [])
        if (do_all || ! strcmp (argv [1], "caf"))
        {       chunk_test ("chunks_pcm16.caf", SF_FORMAT_CAF | SF_FORMAT_PCM_16) ;
                chunk_test ("chunks_alac.caf", SF_FORMAT_CAF | SF_FORMAT_ALAC_16) ;
+               large_free_test ("large_free.caf", SF_FORMAT_CAF | SF_FORMAT_PCM_16, 100) ;
+               large_free_test ("large_free.caf", SF_FORMAT_CAF | SF_FORMAT_PCM_16, 20000) ;
+               test_count++ ;
+               } ;
+
+       if (do_all || ! strcmp (argv [1], "rf64"))
+       {       chunk_test ("chunks_pcm16.rf64", SF_FORMAT_RF64 | SF_FORMAT_PCM_16) ;
                test_count++ ;
                } ;
 
@@ -175,10 +188,17 @@ multichunk_test_helper (const char *filename, int format, const char * testdata
        SF_INFO                 sfinfo ;
        SF_CHUNK_INFO   chunk_info ;
        SF_CHUNK_ITERATOR * iterator ;
-       uint32_t                length_before [testdata_len] ;
+       uint32_t                length_before [16] ;
        int                             err, allow_fd ;
        size_t                  i ;
 
+
+       exit_if_true (
+               ARRAY_LEN (length_before) < testdata_len,
+               "\n\nLine %d : Bad array length.\n\n", __LINE__
+               ) ;
+
+
        sfinfo.samplerate       = 44100 ;
        sfinfo.channels         = 1 ;
        sfinfo.frames           = 0 ;
@@ -291,3 +311,134 @@ chunk_test (const char *filename, int format)
 
        puts ("ok") ;
 } /* chunk_test */
+
+
+static void
+wav_subchunk_test (size_t chunk_size)
+{      SNDFILE                 * file ;
+       SF_INFO                 sfinfo ;
+       SF_CHUNK_INFO   chunk_info ;
+       char filename [256] ;
+       char chunk_data [10240] ;
+       short audio [16] ;
+       int     err, value ;
+
+       snprintf (filename, sizeof (filename), "subchunk_%04d.wav", (int) chunk_size) ;
+       print_test_name (__func__, filename) ;
+
+       exit_if_true (sizeof (chunk_data) < chunk_size, "\n\nLine %d : sizeof (data) < chunk_size\n\n", __LINE__) ;
+
+       memset (chunk_data, 53, sizeof (chunk_data)) ;
+       chunk_data [chunk_size] = 0 ;
+
+       /* Fill in the chunk data. */
+       value = MAKE_MARKER ('a', 'd', 't', 'l') ;
+       memcpy (chunk_data, &value, sizeof (value)) ;
+       value = MAKE_MARKER ('n', 'o', 't', 'e') ;
+       memcpy (chunk_data + 4, &value, sizeof (value)) ;
+       value = H2LE_32 (chunk_size - 12) ;
+       memcpy (chunk_data + 8, &value, sizeof (value)) ;
+
+       sfinfo.samplerate       = 44100 ;
+       sfinfo.channels         = 1 ;
+       sfinfo.frames           = 0 ;
+       sfinfo.format           = SF_FORMAT_WAV | SF_FORMAT_PCM_16 ;
+
+       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
+
+       /* Set up the chunk to write. */
+       memset (&chunk_info, 0, sizeof (chunk_info)) ;
+       snprintf (chunk_info.id, sizeof (chunk_info.id), "LIST") ;
+       chunk_info.id_size = 4 ;
+       chunk_info.data = chunk_data ;
+       chunk_info.datalen = chunk_size ;
+
+       err = sf_set_chunk (file, &chunk_info) ;
+       exit_if_true (
+               err != SF_ERR_NO_ERROR,
+               "\n\nLine %d : sf_set_chunk returned for testdata : %s\n\n", __LINE__, sf_error_number (err)
+               ) ;
+
+       memset (chunk_info.data, 0, chunk_info.datalen) ;
+
+       /* Add some audio data. */
+       memset (audio, 0, sizeof (audio)) ;
+       sf_write_short (file, audio, ARRAY_LEN (audio)) ;
+
+       sf_close (file) ;
+
+       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
+
+       exit_if_true (
+               sfinfo.frames != ARRAY_LEN (audio),
+               "\n\nLine %d : Incorrect sample count (%d should be %d)\n", __LINE__, (int) sfinfo.frames, (int) ARRAY_LEN (audio)
+               ) ;
+
+       if (chunk_size < 512)
+               check_log_buffer_or_die (file, __LINE__) ;
+
+       sf_close (file) ;
+
+       unlink (filename) ;
+       puts ("ok") ;
+} /* wav_subchunk_test */
+
+static void
+large_free_test (const char *filename, int format, size_t chunk_size)
+{      SNDFILE                 * file ;
+       SF_INFO                 sfinfo ;
+       SF_CHUNK_INFO   chunk_info ;
+       char chunk_data [20002] ;
+       short audio [16] ;
+       int     err ;
+
+       print_test_name (__func__, filename) ;
+
+       exit_if_true (sizeof (chunk_data) <= chunk_size, "\n\nLine %d : sizeof (data) < chunk_size\n\n", __LINE__) ;
+
+       memset (chunk_data, 53, sizeof (chunk_data)) ;
+       chunk_data [chunk_size] = 0 ;
+
+       sfinfo.samplerate       = 44100 ;
+       sfinfo.channels         = 1 ;
+       sfinfo.frames           = 0 ;
+       sfinfo.format           = format ;
+
+       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
+
+       /* Set up the chunk to write. */
+       memset (&chunk_info, 0, sizeof (chunk_info)) ;
+       snprintf (chunk_info.id, sizeof (chunk_info.id), "free") ;
+       chunk_info.id_size = 4 ;
+       chunk_info.data = chunk_data ;
+       chunk_info.datalen = chunk_size ;
+
+       err = sf_set_chunk (file, &chunk_info) ;
+       exit_if_true (
+               err != SF_ERR_NO_ERROR,
+               "\n\nLine %d : sf_set_chunk returned for testdata : %s\n\n", __LINE__, sf_error_number (err)
+               ) ;
+
+       memset (chunk_info.data, 0, chunk_info.datalen) ;
+
+       /* Add some audio data. */
+       memset (audio, 0, sizeof (audio)) ;
+       sf_write_short (file, audio, ARRAY_LEN (audio)) ;
+
+       sf_close (file) ;
+
+       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
+
+       exit_if_true (
+               sfinfo.frames != ARRAY_LEN (audio),
+               "\n\nLine %d : Incorrect sample count (%d should be %d)\n", __LINE__, (int) sfinfo.frames, (int) ARRAY_LEN (audio)
+               ) ;
+
+       if (chunk_size < 512)
+               check_log_buffer_or_die (file, __LINE__) ;
+
+       sf_close (file) ;
+
+       unlink (filename) ;
+       puts ("ok") ;
+} /* large_free_test */
index 1596bcb..941e76b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2001-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2001-2016 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
 
 #include <sndfile.h>
 
+#include "sfendian.h"
 #include "utils.h"
 
 #define        BUFFER_LEN              (1 << 10)
 #define LOG_BUFFER_SIZE        1024
+#define data_MARKER            MAKE_MARKER ('d', 'a', 't', 'a')
 
 static void    float_norm_test                 (const char *filename) ;
 static void    double_norm_test                (const char *filename) ;
@@ -44,6 +46,7 @@ static        void    format_tests                    (void) ;
 static void    calc_peak_test                  (int filetype, const char *filename, int channels) ;
 static void    truncate_test                   (const char *filename, int filetype) ;
 static void    instrument_test                 (const char *filename, int filetype) ;
+static void    cue_test                        (const char *filename, int filetype) ;
 static void    channel_map_test                (const char *filename, int filetype) ;
 static void    current_sf_info_test    (const char *filename) ;
 static void    raw_needs_endswap_test  (const char *filename, int filetype) ;
@@ -79,6 +82,7 @@ main (int argc, char *argv [])
                printf ("           peak    - test peak calculation\n") ;
                printf ("           trunc   - test file truncation\n") ;
                printf ("           inst    - test set/get of SF_INSTRUMENT.\n") ;
+               printf ("           cue     - test set/get of SF_CUES.\n") ;
                printf ("           chanmap - test set/get of channel map data..\n") ;
                printf ("           bext    - test set/get of SF_BROADCAST_INFO.\n") ;
                printf ("           bextch  - test set/get of SF_BROADCAST_INFO coding_history.\n") ;
@@ -139,6 +143,12 @@ main (int argc, char *argv [])
                test_count ++ ;
                } ;
 
+       if (do_all || strcmp (argv [1], "cue") == 0)
+       {       cue_test ("cue.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_16) ;
+               cue_test ("cue.aiff" , SF_FORMAT_AIFF | SF_FORMAT_PCM_24) ;
+               test_count ++ ;
+               } ;
+
        if (do_all || strcmp (argv [1], "current_sf_info") == 0)
        {       current_sf_info_test ("current.wav") ;
                test_count ++ ;
@@ -824,6 +834,167 @@ instrument_test (const char *filename, int filetype)
        puts ("ok") ;
 } /* instrument_test */
 
+static void
+cue_rw_test (const char *filename)
+{      SNDFILE *sndfile ;
+       SF_INFO sfinfo ;
+       SF_CUES cues ;
+       memset (&sfinfo, 0, sizeof (SF_INFO)) ;
+
+       sndfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_FALSE, __LINE__) ;
+
+       exit_if_true (
+               sf_command (sndfile, SFC_GET_CUE_COUNT, &cues.cue_count, sizeof (cues.cue_count)) != SF_TRUE,
+               "\nLine %d: SFC_GET_CUE_COUNT command failed.\n\n", __LINE__
+               ) ;
+
+       exit_if_true (
+               cues.cue_count != 3,
+               "\nLine %d: Expected cue_count (%u) to be 3.\n\n", __LINE__, cues.cue_count
+               ) ;
+
+       if (sf_command (sndfile, SFC_GET_CUE, &cues, sizeof (cues)) == SF_TRUE)
+       {       cues.cue_points [1].sample_offset = 3 ;
+
+               if (sf_command (sndfile, SFC_SET_CUE, &cues, sizeof (cues)) == SF_TRUE)
+                       printf ("Sucess: [%s] updated\n", filename) ;
+               else
+                       printf ("Error: SFC_SET_CUE on [%s] [%s]\n", filename, sf_strerror (sndfile)) ;
+               }
+       else
+               printf ("Error: SFC_GET_CUE on [%s] [%s]\n", filename, sf_strerror (sndfile)) ;
+
+
+       if (sf_command (sndfile, SFC_UPDATE_HEADER_NOW, NULL, 0) != 0)
+               printf ("Error: SFC_UPDATE_HEADER_NOW on [%s] [%s]\n", filename, sf_strerror (sndfile)) ;
+
+       sf_write_sync (sndfile) ;
+       sf_close (sndfile) ;
+
+       return ;
+} /* cue_rw_test */
+
+static void
+cue_test (const char *filename, int filetype)
+{      SF_CUES write_cue ;
+       SF_CUES read_cue ;
+       SNDFILE *file ;
+       SF_INFO sfinfo ;
+
+       if (filetype == (SF_FORMAT_WAV | SF_FORMAT_PCM_16))
+       {       write_cue = (SF_CUES)
+               {       2,              /* cue_count */
+                       {       {       1, 0, data_MARKER, 0, 0, 1, "" },
+                               {       2, 0, data_MARKER, 0, 0, 2, "" },
+                       }
+               } ;
+       }
+       else
+       {       write_cue = (SF_CUES)
+               {       2,              /* cue_count */
+                       {       {       1, 0, data_MARKER, 0, 0, 1, "Cue1" },
+                               {       2, 0, data_MARKER, 0, 0, 2, "Cue2" },
+                       }
+               } ;
+       }
+
+       print_test_name ("cue_test", filename) ;
+
+       sfinfo.samplerate       = 11025 ;
+       sfinfo.format           = filetype ;
+       sfinfo.channels         = 1 ;
+
+       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
+       if (sf_command (file, SFC_SET_CUE, &write_cue, sizeof (write_cue)) == SF_FALSE)
+       {       printf ("\n\nLine %d : sf_command (SFC_SET_CUE) failed.\n\n", __LINE__) ;
+               exit (1) ;
+               } ;
+       test_write_double_or_die (file, 0, double_data, BUFFER_LEN, __LINE__) ;
+       sf_close (file) ;
+
+       memset (&read_cue, 0, sizeof (read_cue)) ;
+
+       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
+       if (sf_command (file, SFC_GET_CUE, &read_cue, sizeof (read_cue)) == SF_FALSE)
+       {       printf ("\n\nLine %d : sf_command (SFC_GET_CUE) failed.\n\n", __LINE__) ;
+               exit (1) ;
+               return ;
+               } ;
+       check_log_buffer_or_die (file, __LINE__) ;
+       sf_close (file) ;
+
+       if (memcmp (&write_cue, &read_cue, sizeof (write_cue)) != 0)
+       {       printf ("\n\nLine %d : cue comparison failed.\n\n", __LINE__) ;
+               printf ("W  Cue count      : %d\n"
+                       "   indx          : %d\n"
+                       "   position      : %u\n"
+                       "   fcc_chunk     : %x\n"
+                       "   chunk_start   : %d\n"
+                       "   block_start   : %d\n"
+                       "   sample_offset : %u\n"
+                       "   name          : %s\n"
+                       "   indx          : %d\n"
+                       "   position      : %u\n"
+                       "   fcc_chunk     : %x\n"
+                       "   chunk_start   : %d\n"
+                       "   block_start   : %d\n"
+                       "   sample_offset : %u\n"
+                       "   name           : %s\n",
+                       write_cue.cue_count,
+                       write_cue.cue_points [0].indx,
+                       write_cue.cue_points [0].position,
+                       write_cue.cue_points [0].fcc_chunk,
+                       write_cue.cue_points [0].chunk_start,
+                       write_cue.cue_points [0].block_start,
+                       write_cue.cue_points [0].sample_offset,
+                       write_cue.cue_points [0].name,
+                       write_cue.cue_points [1].indx,
+                       write_cue.cue_points [1].position,
+                       write_cue.cue_points [1].fcc_chunk,
+                       write_cue.cue_points [1].chunk_start,
+                       write_cue.cue_points [1].block_start,
+                       write_cue.cue_points [1].sample_offset,
+                       write_cue.cue_points [1].name) ;
+               printf ("R  Cue count      : %d\n"
+                       "   indx          : %d\n"
+                       "   position      : %u\n"
+                       "   fcc_chunk     : %x\n"
+                       "   chunk_start   : %d\n"
+                       "   block_start   : %d\n"
+                       "   sample_offset : %u\n"
+                       "   name          : %s\n"
+                       "   indx          : %d\n"
+                       "   position      : %u\n"
+                       "   fcc_chunk     : %x\n"
+                       "   chunk_start   : %d\n"
+                       "   block_start   : %d\n"
+                       "   sample_offset : %u\n"
+                       "   name          : %s\n",
+                       read_cue.cue_count,
+                       read_cue.cue_points [0].indx,
+                       read_cue.cue_points [0].position,
+                       read_cue.cue_points [0].fcc_chunk,
+                       read_cue.cue_points [0].chunk_start,
+                       read_cue.cue_points [0].block_start,
+                       read_cue.cue_points [0].sample_offset,
+                       read_cue.cue_points [0].name,
+                       read_cue.cue_points [1].indx,
+                       read_cue.cue_points [1].position,
+                       read_cue.cue_points [1].fcc_chunk,
+                       read_cue.cue_points [1].chunk_start,
+                       read_cue.cue_points [1].block_start,
+                       read_cue.cue_points [1].sample_offset,
+                       read_cue.cue_points [1].name) ;
+
+                       exit (1) ;
+               } ;
+
+       if (0) cue_rw_test (filename) ;
+
+       unlink (filename) ;
+       puts ("ok") ;
+} /* cue_test */
+
 static void
 current_sf_info_test   (const char *filename)
 {      SNDFILE *outfile, *infile ;
index c293852..85dbd35 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2007-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2007-2016 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
@@ -178,7 +178,7 @@ main (int argc, char *argv [])
                exit (0) ;
                } ;
 
-       if (! HAVE_EXTERNAL_LIBS)
+       if (! HAVE_EXTERNAL_XIPH_LIBS)
        {       puts ("    No Ogg/Vorbis tests because Ogg/Vorbis support was not compiled in.") ;
                return 0 ;
        } ;
index 4207c0a..1cadc68 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2017 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
@@ -83,6 +83,8 @@ error_value_test (void)
 
        dump_data_to_file (filename, aiff_data, sizeof (aiff_data)) ;
 
+       memset (&sfinfo, 0, sizeof (sfinfo)) ;
+
        file = sf_open (filename, SFM_READ, &sfinfo) ;
        if (file != NULL)
        {       printf ("\n\nLine %d : Should not have been able to open this file.\n\n", __LINE__) ;
index 86b0290..f671055 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2008-2017 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
 #include <string.h>
 #include <errno.h>
 
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #include <sndfile.h>
 
 #include "utils.h"
@@ -30,6 +34,7 @@
 static void major_format_test (void) ;
 static void subtype_format_test (void) ;
 static void simple_format_test (void) ;
+static void flac_subset_test (void) ;
 
 int
 main (void)
@@ -38,6 +43,9 @@ main (void)
        subtype_format_test () ;
        simple_format_test () ;
 
+       if (HAVE_EXTERNAL_XIPH_LIBS)
+               flac_subset_test () ;
+
        return 0 ;
 } /* main */
 
@@ -59,7 +67,7 @@ major_format_test (void)
                have_ogg = info.format == SF_FORMAT_OGG ? 1 : have_ogg ;
                } ;
 
-       if (HAVE_EXTERNAL_LIBS)
+       if (HAVE_EXTERNAL_XIPH_LIBS)
        {       exit_if_true (have_flac == 0, "\n\nLine %d : FLAC should be available.\n\n", __LINE__) ;
                exit_if_true (have_ogg == 0, "\n\nLine %d : Ogg/Vorbis should be available.\n\n", __LINE__) ;
                }
@@ -88,7 +96,7 @@ subtype_format_test (void)
                have_vorbis = info.format == SF_FORMAT_VORBIS ? 1 : have_vorbis ;
                } ;
 
-       if (HAVE_EXTERNAL_LIBS)
+       if (HAVE_EXTERNAL_XIPH_LIBS)
                exit_if_true (have_vorbis == 0, "\n\nLine %d : Ogg/Vorbis should be available.\n\n", __LINE__) ;
        else
                exit_if_true (have_vorbis, "\n\nLine %d : Ogg/Vorbis should not be available.\n\n", __LINE__) ;
@@ -134,7 +142,7 @@ simple_format_test (void)
 
                } ;
 
-       if (HAVE_EXTERNAL_LIBS)
+       if (HAVE_EXTERNAL_XIPH_LIBS)
        {       exit_if_true (have_flac == 0, "\n\nLine %d : FLAC should be available.\n\n", __LINE__) ;
                exit_if_true (have_ogg == 0, "\n\nLine %d : Ogg/Vorbis should be available.\n\n", __LINE__) ;
                exit_if_true (have_vorbis == 0, "\n\nLine %d : Ogg/Vorbis should be available.\n\n", __LINE__) ;
@@ -147,3 +155,37 @@ simple_format_test (void)
 
        puts ("ok") ;
 } /* simple_format_test */
+
+static void
+flac_subset_test (void)
+{      float whatever [256] ;
+       SNDFILE *file ;
+       SF_INFO sfinfo ;
+       sf_count_t rc ;
+       int             samplerate ;
+       const char *filename = "subset_test.flac" ;
+
+       /* For some formats (like FLAC) the headers are written *just* before the
+       ** first bit of audio data. This test makes sure errors in that process
+       ** are caught.
+       */
+
+       print_test_name (__func__, NULL) ;
+
+       for (samplerate = 65536 ; samplerate < 655350 ; samplerate *= 4)
+       {       sfinfo.samplerate       = samplerate ;
+               sfinfo.channels         = 1 ;
+               sfinfo.frames           = 0 ;
+               sfinfo.format = SF_FORMAT_FLAC | SF_FORMAT_PCM_16 ;
+
+               file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
+               rc = sf_write_float (file, whatever, ARRAY_LEN (whatever)) ;
+               unlink (filename) ;
+               exit_if_true (rc != 0, "\n\nLine %d : return code (%d) should be 0.\n\n", __LINE__, (int) rc) ;
+
+               sf_close (file) ;
+               } ;
+
+       puts ("ok") ;
+} /* flac_subset_test */
+
diff --git a/tests/floating_point_test.c b/tests/floating_point_test.c
deleted file mode 100644 (file)
index 8b0497c..0000000
+++ /dev/null
@@ -1,714 +0,0 @@
-/*
-** Copyright (C) 1999-2015 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 "sfconfig.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <inttypes.h>
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <sndfile.h>
-
-#include "dft_cmp.h"
-#include "utils.h"
-
-#define        SAMPLE_RATE                     16000
-
-static void    float_scaled_test       (const char *filename, int allow_exit, int replace_float, int filetype, double target_snr) ;
-static void    double_scaled_test      (const char *filename, int allow_exit, int replace_float, int filetype, double target_snr) ;
-
-static void float_short_little_test (const char * filename) ;
-static void float_short_big_test (const char * filename) ;
-static void float_int_little_test (const char * filename) ;
-static void float_int_big_test (const char * filename) ;
-static void double_short_little_test (const char * filename) ;
-static void double_short_big_test (const char * filename) ;
-static void double_int_little_test (const char * filename) ;
-static void double_int_big_test (const char * filename) ;
-
-
-static double  double_data [DFT_DATA_LENGTH] ;
-static double  double_test [DFT_DATA_LENGTH] ;
-
-static float   float_data [DFT_DATA_LENGTH] ;
-static float   float_test [DFT_DATA_LENGTH] ;
-
-static double  double_data [DFT_DATA_LENGTH] ;
-static short   short_data [DFT_DATA_LENGTH] ;
-static int             int_data [DFT_DATA_LENGTH] ;
-
-int
-main (int argc, char *argv [])
-{      int allow_exit = 1 ;
-
-       if (argc == 2 && ! strstr (argv [1], "no-exit"))
-               allow_exit = 0 ;
-
-#if (HAVE_LRINTF == 0)
-       puts ("*** Cannot run this test on this platform because it lacks lrintf().") ;
-       exit (0) ;
-#endif
-
-       /* Float tests. */
-       float_scaled_test       ("float.raw", allow_exit, SF_FALSE, SF_ENDIAN_LITTLE | SF_FORMAT_RAW | SF_FORMAT_FLOAT,
-                                                                       OS_IS_OPENBSD ? -98.0 : -163.0) ;
-
-       /* Test both signed and unsigned 8 bit files. */
-       float_scaled_test       ("pcm_s8.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_PCM_S8, -39.0) ;
-       float_scaled_test       ("pcm_u8.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_PCM_U8, -39.0) ;
-
-       float_scaled_test       ("pcm_16.raw", allow_exit, SF_FALSE, SF_ENDIAN_BIG | SF_FORMAT_RAW | SF_FORMAT_PCM_16, -87.0) ;
-       float_scaled_test       ("pcm_24.raw", allow_exit, SF_FALSE, SF_ENDIAN_LITTLE | SF_FORMAT_RAW | SF_FORMAT_PCM_24, -138.0) ;
-       float_scaled_test       ("pcm_32.raw", allow_exit, SF_FALSE, SF_ENDIAN_BIG | SF_FORMAT_RAW | SF_FORMAT_PCM_32, -163.0) ;
-
-       float_scaled_test       ("ulaw.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_ULAW, -50.0) ;
-       float_scaled_test       ("alaw.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_ALAW, -49.0) ;
-
-       float_scaled_test       ("ima_adpcm.wav", allow_exit, SF_FALSE, SF_FORMAT_WAV | SF_FORMAT_IMA_ADPCM, -47.0) ;
-       float_scaled_test       ("ms_adpcm.wav" , allow_exit, SF_FALSE, SF_FORMAT_WAV | SF_FORMAT_MS_ADPCM, -40.0) ;
-       float_scaled_test       ("gsm610.raw"   , allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_GSM610, -33.0) ;
-
-       float_scaled_test       ("g721_32.au", allow_exit, SF_FALSE, SF_FORMAT_AU | SF_FORMAT_G721_32, -32.3) ;
-       float_scaled_test       ("g723_24.au", allow_exit, SF_FALSE, SF_FORMAT_AU | SF_FORMAT_G723_24, -32.3) ;
-       float_scaled_test       ("g723_40.au", allow_exit, SF_FALSE, SF_FORMAT_AU | SF_FORMAT_G723_40, -40.0) ;
-
-       /*      PAF files do not use the same encoding method for 24 bit PCM data as other file
-       **      formats so we need to explicitly test it here.
-       */
-       float_scaled_test       ("le_paf_24.paf", allow_exit, SF_FALSE, SF_ENDIAN_LITTLE | SF_FORMAT_PAF | SF_FORMAT_PCM_24, -149.0) ;
-       float_scaled_test       ("be_paf_24.paf", allow_exit, SF_FALSE, SF_ENDIAN_BIG | SF_FORMAT_PAF | SF_FORMAT_PCM_24, -149.0) ;
-
-       float_scaled_test       ("dwvw_12.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_DWVW_12, -64.0) ;
-       float_scaled_test       ("dwvw_16.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_DWVW_16, -92.0) ;
-       float_scaled_test       ("dwvw_24.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_DWVW_24, -151.0) ;
-
-       float_scaled_test       ("adpcm.vox", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_VOX_ADPCM, -40.0) ;
-
-       float_scaled_test       ("dpcm_16.xi", allow_exit, SF_FALSE, SF_FORMAT_XI | SF_FORMAT_DPCM_16, -90.0) ;
-       float_scaled_test       ("dpcm_8.xi" , allow_exit, SF_FALSE, SF_FORMAT_XI | SF_FORMAT_DPCM_8 , -41.0) ;
-
-       float_scaled_test       ("pcm_s8.sds", allow_exit, SF_FALSE, SF_FORMAT_SDS | SF_FORMAT_PCM_S8, -89.0) ;
-       float_scaled_test       ("pcm_16.sds", allow_exit, SF_FALSE, SF_FORMAT_SDS | SF_FORMAT_PCM_16, -132.0) ;
-       float_scaled_test       ("pcm_24.sds", allow_exit, SF_FALSE, SF_FORMAT_SDS | SF_FORMAT_PCM_24, -170.0) ;
-
-       float_scaled_test       ("alac_16.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_16, -90.0) ;
-       float_scaled_test       ("alac_32.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_32, -76.0) ;
-       float_scaled_test       ("alac_24.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_24, -153.0) ;
-       float_scaled_test       ("alac_20.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_20, -125.0) ;
-
-#if HAVE_EXTERNAL_LIBS
-       float_scaled_test       ("flac_8.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_S8, -39.0) ;
-       float_scaled_test       ("flac_16.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_16, -87.0) ;
-       float_scaled_test       ("flac_24.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_24, -138.0) ;
-
-       float_scaled_test       ("vorbis.oga", allow_exit, SF_FALSE, SF_FORMAT_OGG | SF_FORMAT_VORBIS, -31.0) ;
-#endif
-
-       float_scaled_test       ("replace_float.raw", allow_exit, SF_TRUE, SF_ENDIAN_LITTLE | SF_FORMAT_RAW | SF_FORMAT_FLOAT, -163.0) ;
-
-       /*==============================================================================
-       ** Double tests.
-       */
-
-       double_scaled_test      ("double.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_DOUBLE, -201.0) ;
-
-       /* Test both signed (AIFF) and unsigned (WAV) 8 bit files. */
-       double_scaled_test      ("pcm_s8.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_PCM_S8, -39.0) ;
-       double_scaled_test      ("pcm_u8.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_PCM_U8, -39.0) ;
-
-       double_scaled_test      ("pcm_16.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_PCM_16, -87.0) ;
-       double_scaled_test      ("pcm_24.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_PCM_24, -135.0) ;
-       double_scaled_test      ("pcm_32.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_PCM_32, -184.0) ;
-
-       double_scaled_test      ("ulaw.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_ULAW, -50.0) ;
-       double_scaled_test      ("alaw.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_ALAW, -49.0) ;
-
-       double_scaled_test      ("ima_adpcm.wav", allow_exit, SF_FALSE, SF_FORMAT_WAV | SF_FORMAT_IMA_ADPCM, -47.0) ;
-       double_scaled_test      ("ms_adpcm.wav" , allow_exit, SF_FALSE, SF_FORMAT_WAV | SF_FORMAT_MS_ADPCM, -40.0) ;
-       double_scaled_test      ("gsm610.raw"   , allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_GSM610, -33.0) ;
-
-       double_scaled_test      ("g721_32.au", allow_exit, SF_FALSE, SF_FORMAT_AU | SF_FORMAT_G721_32, -32.3) ;
-       double_scaled_test      ("g723_24.au", allow_exit, SF_FALSE, SF_FORMAT_AU | SF_FORMAT_G723_24, -32.3) ;
-       double_scaled_test      ("g723_40.au", allow_exit, SF_FALSE, SF_FORMAT_AU | SF_FORMAT_G723_40, -40.0) ;
-
-       /*      24 bit PCM PAF files tested here. */
-       double_scaled_test      ("be_paf_24.paf", allow_exit, SF_FALSE, SF_ENDIAN_BIG | SF_FORMAT_PAF | SF_FORMAT_PCM_24, -151.0) ;
-       double_scaled_test      ("le_paf_24.paf", allow_exit, SF_FALSE, SF_ENDIAN_LITTLE | SF_FORMAT_PAF | SF_FORMAT_PCM_24, -151.0) ;
-
-       double_scaled_test      ("dwvw_12.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_DWVW_12, -64.0) ;
-       double_scaled_test      ("dwvw_16.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_DWVW_16, -92.0) ;
-       double_scaled_test      ("dwvw_24.raw", allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_DWVW_24, -151.0) ;
-
-       double_scaled_test      ("adpcm.vox" , allow_exit, SF_FALSE, SF_FORMAT_RAW | SF_FORMAT_VOX_ADPCM, -40.0) ;
-
-       double_scaled_test      ("dpcm_16.xi", allow_exit, SF_FALSE, SF_FORMAT_XI | SF_FORMAT_DPCM_16, -90.0) ;
-       double_scaled_test      ("dpcm_8.xi" , allow_exit, SF_FALSE, SF_FORMAT_XI | SF_FORMAT_DPCM_8 , -41.0) ;
-
-       double_scaled_test      ("pcm_s8.sds", allow_exit, SF_FALSE, SF_FORMAT_SDS | SF_FORMAT_PCM_S8, -89.0) ;
-       double_scaled_test      ("pcm_16.sds", allow_exit, SF_FALSE, SF_FORMAT_SDS | SF_FORMAT_PCM_16, -132.0) ;
-       double_scaled_test      ("pcm_24.sds", allow_exit, SF_FALSE, SF_FORMAT_SDS | SF_FORMAT_PCM_24, -180.0) ;
-
-       double_scaled_test      ("alac_16.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_16, -90.0) ;
-       double_scaled_test      ("alac_20.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_20, -125.0) ;
-       double_scaled_test      ("alac_24.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_24, -153.0) ;
-       double_scaled_test      ("alac_32.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_32, -186.0) ;
-
-#if HAVE_EXTERNAL_LIBS
-       double_scaled_test      ("flac_8.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_S8, -39.0) ;
-       double_scaled_test      ("flac_16.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_16, -87.0) ;
-       double_scaled_test      ("flac_24.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_24, -138.0) ;
-
-       double_scaled_test      ("vorbis.oga", allow_exit, SF_FALSE, SF_FORMAT_OGG | SF_FORMAT_VORBIS, -29.0) ;
-#endif
-
-       double_scaled_test      ("replace_double.raw", allow_exit, SF_TRUE, SF_FORMAT_RAW | SF_FORMAT_DOUBLE, -201.0) ;
-
-       putchar ('\n') ;
-       /* Float int tests. */
-       float_short_little_test ("float_short_little.au") ;
-       float_short_big_test ("float_short_big.au") ;
-       float_int_little_test ("float_int_little.au") ;
-       float_int_big_test ("float_int_big.au") ;
-       double_short_little_test ("double_short_little.au") ;
-       double_short_big_test ("double_short_big.au") ;
-       double_int_little_test ("double_int_little.au") ;
-       double_int_big_test ("double_int_big.au") ;
-
-
-       return 0 ;
-} /* main */
-
-/*============================================================================================
- *     Here are the test functions.
- */
-
-static void
-float_scaled_test (const char *filename, int allow_exit, int replace_float, int filetype, double target_snr)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       double          snr ;
-       int                     byterate ;
-
-       print_test_name ("float_scaled_test", filename) ;
-
-       gen_windowed_sine_float (float_data, DFT_DATA_LENGTH, 0.9999) ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DFT_DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-
-       test_write_float_or_die (file, 0, float_data, DFT_DATA_LENGTH, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (float_test, 0, sizeof (float_test)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-
-       exit_if_true (sfinfo.format != filetype, "\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-       exit_if_true (sfinfo.frames < DFT_DATA_LENGTH, "\n\nLine %d: Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, DFT_DATA_LENGTH) ;
-       exit_if_true (sfinfo.channels != 1, "\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_float_or_die (file, 0, float_test, DFT_DATA_LENGTH, __LINE__) ;
-
-       byterate = sf_current_byterate (file) ;
-       exit_if_true (byterate <= 0, "\n\nLine %d: byterate is zero.\n", __LINE__) ;
-
-       sf_close (file) ;
-
-       snr = dft_cmp_float (__LINE__, float_data, float_test, DFT_DATA_LENGTH, target_snr, allow_exit) ;
-
-       exit_if_true (snr > target_snr, "% 6.1fdB SNR\n\n    Error : should be better than % 6.1fdB\n\n", snr, target_snr) ;
-
-       printf ("% 6.1fdB SNR ... ok\n", snr) ;
-
-       unlink (filename) ;
-
-       return ;
-} /* float_scaled_test */
-
-static void
-double_scaled_test (const char *filename, int allow_exit, int replace_float, int filetype, double target_snr)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       double          snr ;
-       int                     byterate ;
-
-       print_test_name ("double_scaled_test", filename) ;
-
-       gen_windowed_sine_double (double_data, DFT_DATA_LENGTH, 0.9999) ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DFT_DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-
-       test_write_double_or_die (file, 0, double_data, DFT_DATA_LENGTH, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (double_test, 0, sizeof (double_test)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-
-       exit_if_true (sfinfo.format != filetype, "\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-       exit_if_true (sfinfo.frames < DFT_DATA_LENGTH, "\n\nLine %d: Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, DFT_DATA_LENGTH) ;
-       exit_if_true (sfinfo.channels != 1, "\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_double_or_die (file, 0, double_test, DFT_DATA_LENGTH, __LINE__) ;
-
-       byterate = sf_current_byterate (file) ;
-       exit_if_true (byterate <= 0, "\n\nLine %d: byterate is zero.\n", __LINE__) ;
-
-       sf_close (file) ;
-
-       snr = dft_cmp_double (__LINE__, double_data, double_test, DFT_DATA_LENGTH, target_snr, allow_exit) ;
-
-       exit_if_true (snr > target_snr, "% 6.1fdB SNR\n\n    Error : should be better than % 6.1fdB\n\n", snr, target_snr) ;
-
-       printf ("% 6.1fdB SNR ... ok\n", snr) ;
-
-       unlink (filename) ;
-
-       return ;
-} /* double_scaled_test */
-
-/*==============================================================================
-*/
-
-
-static void
-float_short_little_test (const char * filename)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       unsigned        k, max ;
-
-       print_test_name ("float_short_little_test", filename) ;
-
-       gen_windowed_sine_float (float_data, ARRAY_LEN (float_data), 0.9999) ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = ARRAY_LEN (short_data) ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_FLOAT ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_float_or_die (file, 0, float_data, ARRAY_LEN (float_data), __LINE__) ;
-       sf_close (file) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.frames != ARRAY_LEN (float_data))
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, DFT_DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       test_read_short_or_die (file, 0, short_data, ARRAY_LEN (short_data), __LINE__) ;
-       sf_close (file) ;
-
-       max = 0 ;
-       for (k = 0 ; k < ARRAY_LEN (short_data) ; k++)
-               if (abs (short_data [k]) > max)
-                       max = abs (short_data [k]) ;
-
-       if (1.0 * abs (max - 0x7FFF) / 0x7FFF > 0.01)
-       {       printf ("\n\nLine %d: Bad maximum (%d should be %d).\n\n", __LINE__, max, 0x7FFF) ;
-               exit (1) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* float_short_little_test */
-
-static void
-float_short_big_test (const char * filename)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       unsigned        k, max ;
-
-       print_test_name ("float_short_big_test", filename) ;
-
-       gen_windowed_sine_float (float_data, ARRAY_LEN (float_data), 0.9999) ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = ARRAY_LEN (short_data) ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = SF_ENDIAN_BIG | SF_FORMAT_AU | SF_FORMAT_FLOAT ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_float_or_die (file, 0, float_data, ARRAY_LEN (float_data), __LINE__) ;
-       sf_close (file) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.frames != ARRAY_LEN (float_data))
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, DFT_DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       test_read_short_or_die (file, 0, short_data, ARRAY_LEN (short_data), __LINE__) ;
-       sf_close (file) ;
-
-       max = 0 ;
-       for (k = 0 ; k < ARRAY_LEN (short_data) ; k++)
-               if (abs (short_data [k]) > max)
-                       max = abs (short_data [k]) ;
-
-       if (1.0 * abs (max - 0x7FFF) / 0x7FFF > 0.01)
-       {       printf ("\n\nLine %d: Bad maximum (%d should be %d).\n\n", __LINE__, max, 0x7FFF) ;
-               exit (1) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* float_short_big_test */
-
-static void
-float_int_little_test (const char * filename)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       unsigned        k, max ;
-
-       print_test_name ("float_int_little_test", filename) ;
-
-       gen_windowed_sine_float (float_data, ARRAY_LEN (float_data), 0.9999) ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = ARRAY_LEN (int_data) ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_FLOAT ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_float_or_die (file, 0, float_data, ARRAY_LEN (float_data), __LINE__) ;
-       sf_close (file) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.frames != ARRAY_LEN (float_data))
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, DFT_DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       test_read_int_or_die (file, 0, int_data, ARRAY_LEN (int_data), __LINE__) ;
-       sf_close (file) ;
-
-       max = 0 ;
-       for (k = 0 ; k < ARRAY_LEN (int_data) ; k++)
-               if (abs (int_data [k]) > max)
-                       max = abs (int_data [k]) ;
-
-       if (1.0 * abs (max - 0x7FFFFFFF) / 0x7FFFFFFF > 0.01)
-       {       printf ("\n\nLine %d: Bad maximum (%d should be %d).\n\n", __LINE__, max, 0x7FFFFFFF) ;
-               exit (1) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* float_int_little_test */
-
-static void
-float_int_big_test (const char * filename)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       unsigned        k, max ;
-
-       print_test_name ("float_int_big_test", filename) ;
-
-       gen_windowed_sine_float (float_data, ARRAY_LEN (float_data), 0.9999) ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = ARRAY_LEN (int_data) ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = SF_ENDIAN_BIG | SF_FORMAT_AU | SF_FORMAT_FLOAT ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_float_or_die (file, 0, float_data, ARRAY_LEN (float_data), __LINE__) ;
-       sf_close (file) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.frames != ARRAY_LEN (float_data))
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, DFT_DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       test_read_int_or_die (file, 0, int_data, ARRAY_LEN (int_data), __LINE__) ;
-       sf_close (file) ;
-
-       max = 0 ;
-       for (k = 0 ; k < ARRAY_LEN (int_data) ; k++)
-               if (abs (int_data [k]) > max)
-                       max = abs (int_data [k]) ;
-
-       if (1.0 * abs (max - 0x7FFFFFFF) / 0x7FFFFFFF > 0.01)
-       {       printf ("\n\nLine %d: Bad maximum (%d should be %d).\n\n", __LINE__, max, 0x7FFFFFFF) ;
-               exit (1) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* float_int_big_test */
-
-static void
-double_short_little_test (const char * filename)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       unsigned        k, max ;
-
-       print_test_name ("double_short_little_test", filename) ;
-
-       gen_windowed_sine_double (double_data, ARRAY_LEN (double_data), 0.9999) ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = ARRAY_LEN (short_data) ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_DOUBLE ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_double_or_die (file, 0, double_data, ARRAY_LEN (double_data), __LINE__) ;
-       sf_close (file) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.frames != ARRAY_LEN (double_data))
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, DFT_DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       test_read_short_or_die (file, 0, short_data, ARRAY_LEN (short_data), __LINE__) ;
-       sf_close (file) ;
-
-       max = 0 ;
-       for (k = 0 ; k < ARRAY_LEN (short_data) ; k++)
-               if (abs (short_data [k]) > max)
-                       max = abs (short_data [k]) ;
-
-       if (1.0 * abs (max - 0x7FFF) / 0x7FFF > 0.01)
-       {       printf ("\n\nLine %d: Bad maximum (%d should be %d).\n\n", __LINE__, max, 0x7FFF) ;
-               exit (1) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* double_short_little_test */
-
-static void
-double_short_big_test (const char * filename)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       unsigned        k, max ;
-
-       print_test_name ("double_short_big_test", filename) ;
-
-       gen_windowed_sine_double (double_data, ARRAY_LEN (double_data), 0.9999) ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = ARRAY_LEN (short_data) ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = SF_ENDIAN_BIG | SF_FORMAT_AU | SF_FORMAT_DOUBLE ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_double_or_die (file, 0, double_data, ARRAY_LEN (double_data), __LINE__) ;
-       sf_close (file) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.frames != ARRAY_LEN (double_data))
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, DFT_DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       test_read_short_or_die (file, 0, short_data, ARRAY_LEN (short_data), __LINE__) ;
-       sf_close (file) ;
-
-       max = 0 ;
-       for (k = 0 ; k < ARRAY_LEN (short_data) ; k++)
-               if (abs (short_data [k]) > max)
-                       max = abs (short_data [k]) ;
-
-       if (1.0 * abs (max - 0x7FFF) / 0x7FFF > 0.01)
-       {       printf ("\n\nLine %d: Bad maximum (%d should be %d).\n\n", __LINE__, max, 0x7FFF) ;
-               exit (1) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* double_short_big_test */
-
-static void
-double_int_little_test (const char * filename)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       unsigned        k, max ;
-
-       print_test_name ("double_int_little_test", filename) ;
-
-       gen_windowed_sine_double (double_data, ARRAY_LEN (double_data), 0.9999) ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = ARRAY_LEN (int_data) ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_DOUBLE ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_double_or_die (file, 0, double_data, ARRAY_LEN (double_data), __LINE__) ;
-       sf_close (file) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.frames != ARRAY_LEN (double_data))
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, DFT_DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       test_read_int_or_die (file, 0, int_data, ARRAY_LEN (int_data), __LINE__) ;
-       sf_close (file) ;
-
-       max = 0 ;
-       for (k = 0 ; k < ARRAY_LEN (int_data) ; k++)
-               if (abs (int_data [k]) > max)
-                       max = abs (int_data [k]) ;
-
-       if (1.0 * abs (max - 0x7FFFFFFF) / 0x7FFFFFFF > 0.01)
-       {       printf ("\n\nLine %d: Bad maximum (%d should be %d).\n\n", __LINE__, max, 0x7FFFFFFF) ;
-               exit (1) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* double_int_little_test */
-
-static void
-double_int_big_test (const char * filename)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       unsigned        k, max ;
-
-       print_test_name ("double_int_big_test", filename) ;
-
-       gen_windowed_sine_double (double_data, ARRAY_LEN (double_data), 0.9999) ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = ARRAY_LEN (int_data) ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = SF_ENDIAN_BIG | SF_FORMAT_AU | SF_FORMAT_DOUBLE ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_double_or_die (file, 0, double_data, ARRAY_LEN (double_data), __LINE__) ;
-       sf_close (file) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.frames != ARRAY_LEN (double_data))
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, DFT_DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       test_read_int_or_die (file, 0, int_data, ARRAY_LEN (int_data), __LINE__) ;
-       sf_close (file) ;
-
-       max = 0 ;
-       for (k = 0 ; k < ARRAY_LEN (int_data) ; k++)
-               if (abs (int_data [k]) > max)
-                       max = abs (int_data [k]) ;
-
-       if (1.0 * abs (max - 0x7FFFFFFF) / 0x7FFFFFFF > 0.01)
-       {       printf ("\n\nLine %d: Bad maximum (%d should be %d).\n\n", __LINE__, max, 0x7FFFFFFF) ;
-               exit (1) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* double_int_big_test */
-
-
index 247b8e6..fab0d9b 100644 (file)
@@ -1,6 +1,6 @@
 [+ AutoGen5 template c +]
 /*
-** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -113,7 +113,7 @@ main (int argc, char *argv [])
        float_scaled_test       ("alac_24.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_24, -153.0) ;
        float_scaled_test       ("alac_20.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_20, -125.0) ;
 
-#if HAVE_EXTERNAL_LIBS
+#if HAVE_EXTERNAL_XIPH_LIBS
        float_scaled_test       ("flac_8.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_S8, -39.0) ;
        float_scaled_test       ("flac_16.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_16, -87.0) ;
        float_scaled_test       ("flac_24.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_24, -138.0) ;
@@ -170,7 +170,7 @@ main (int argc, char *argv [])
        double_scaled_test      ("alac_24.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_24, -153.0) ;
        double_scaled_test      ("alac_32.caf", allow_exit, SF_FALSE, SF_FORMAT_CAF | SF_FORMAT_ALAC_32, -186.0) ;
 
-#if HAVE_EXTERNAL_LIBS
+#if HAVE_EXTERNAL_XIPH_LIBS
        double_scaled_test      ("flac_8.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_S8, -39.0) ;
        double_scaled_test      ("flac_16.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_16, -87.0) ;
        double_scaled_test      ("flac_24.flac", allow_exit, SF_FALSE, SF_FORMAT_FLAC | SF_FORMAT_PCM_24, -138.0) ;
@@ -307,7 +307,8 @@ static void
 [+ (get "float_name") +]_[+ (get "int_name") +]_[+ (get "end_name") +]_test (const char * filename)
 {      SNDFILE         *file ;
        SF_INFO         sfinfo ;
-       unsigned        k, max ;
+       int                     max ;
+       unsigned        k ;
 
        print_test_name ("[+ (get "float_name") +]_[+ (get "int_name") +]_[+ (get "end_name") +]_test", filename) ;
 
diff --git a/tests/header_test.c b/tests/header_test.c
deleted file mode 100644 (file)
index 687e03d..0000000
+++ /dev/null
@@ -1,742 +0,0 @@
-/*
-** Copyright (C) 2001-2012 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 "sfconfig.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-#include <math.h>
-
-#include <sys/stat.h>
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if (HAVE_DECL_S_IRGRP == 0)
-#include <sf_unistd.h>
-#endif
-
-#if (defined (WIN32) || defined (_WIN32))
-#include <io.h>
-#include <direct.h>
-#endif
-
-#include       <sndfile.h>
-
-#include       "utils.h"
-
-#define        BUFFER_LEN              (1 << 10)
-#define LOG_BUFFER_SIZE        1024
-
-static void    update_header_test (const char *filename, int typemajor) ;
-
-static void    update_seek_short_test  (const char *filename, int filetype) ;
-static void    update_seek_int_test    (const char *filename, int filetype) ;
-static void    update_seek_float_test  (const char *filename, int filetype) ;
-static void    update_seek_double_test (const char *filename, int filetype) ;
-
-
-static void extra_header_test (const char *filename, int filetype) ;
-
-static void header_shrink_test (const char *filename, int filetype) ;
-
-/* Force the start of this buffer to be double aligned. Sparc-solaris will
-** choke if its not.
-*/
-static int     data_out [BUFFER_LEN] ;
-static int     data_in [BUFFER_LEN] ;
-
-int
-main (int argc, char *argv [])
-{      int             do_all = 0 ;
-       int             test_count = 0 ;
-
-       if (argc != 2)
-       {       printf ("Usage : %s <test>\n", argv [0]) ;
-               printf ("    Where <test> is one of the following:\n") ;
-               printf ("           wav  - test WAV file peak chunk\n") ;
-               printf ("           aiff - test AIFF file PEAK chunk\n") ;
-               printf ("           all  - perform all tests\n") ;
-               exit (1) ;
-               } ;
-
-       do_all= !strcmp (argv [1], "all") ;
-
-       if (do_all || ! strcmp (argv [1], "wav"))
-       {       update_header_test ("header.wav", SF_FORMAT_WAV) ;
-               update_seek_short_test ("header_short.wav", SF_FORMAT_WAV) ;
-               update_seek_int_test ("header_int.wav", SF_FORMAT_WAV) ;
-               update_seek_float_test ("header_float.wav", SF_FORMAT_WAV) ;
-               update_seek_double_test ("header_double.wav", SF_FORMAT_WAV) ;
-               header_shrink_test ("header_shrink.wav", SF_FORMAT_WAV) ;
-               extra_header_test ("extra.wav", SF_FORMAT_WAV) ;
-
-               update_header_test ("header.wavex", SF_FORMAT_WAVEX) ;
-               update_seek_short_test ("header_short.wavex", SF_FORMAT_WAVEX) ;
-               update_seek_int_test ("header_int.wavex", SF_FORMAT_WAVEX) ;
-               update_seek_float_test ("header_float.wavex", SF_FORMAT_WAVEX) ;
-               update_seek_double_test ("header_double.wavex", SF_FORMAT_WAVEX) ;
-               header_shrink_test ("header_shrink.wavex", SF_FORMAT_WAVEX) ;
-               extra_header_test ("extra.wavex", SF_FORMAT_WAVEX) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "aiff"))
-       {       update_header_test ("header.aiff", SF_FORMAT_AIFF) ;
-               update_seek_short_test ("header_short.aiff", SF_FORMAT_AIFF) ;
-               update_seek_int_test ("header_int.aiff", SF_FORMAT_AIFF) ;
-               update_seek_float_test ("header_float.aiff", SF_FORMAT_AIFF) ;
-               update_seek_double_test ("header_double.aiff", SF_FORMAT_AIFF) ;
-               header_shrink_test ("header_shrink.wav", SF_FORMAT_AIFF) ;
-               extra_header_test ("extra.aiff", SF_FORMAT_AIFF) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "au"))
-       {       update_header_test ("header.au", SF_FORMAT_AU) ;
-               update_seek_short_test ("header_short.au", SF_FORMAT_AU) ;
-               update_seek_int_test ("header_int.au", SF_FORMAT_AU) ;
-               update_seek_float_test ("header_float.au", SF_FORMAT_AU) ;
-               update_seek_double_test ("header_double.au", SF_FORMAT_AU) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "caf"))
-       {       update_header_test ("header.caf", SF_FORMAT_CAF) ;
-               update_seek_short_test ("header_short.caf", SF_FORMAT_CAF) ;
-               update_seek_int_test ("header_int.caf", SF_FORMAT_CAF) ;
-               update_seek_float_test ("header_float.caf", SF_FORMAT_CAF) ;
-               update_seek_double_test ("header_double.caf", SF_FORMAT_CAF) ;
-               /* extra_header_test ("extra.caf", SF_FORMAT_CAF) ; */
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "nist"))
-       {       update_header_test ("header.nist", SF_FORMAT_NIST) ;
-               update_seek_short_test ("header_short.nist", SF_FORMAT_NIST) ;
-               update_seek_int_test ("header_int.nist", SF_FORMAT_NIST) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "paf"))
-       {       update_header_test ("header.paf", SF_FORMAT_PAF) ;
-               update_seek_short_test ("header_short.paf", SF_FORMAT_PAF) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "ircam"))
-       {       update_header_test ("header.ircam", SF_FORMAT_IRCAM) ;
-               update_seek_short_test ("header_short.ircam", SF_FORMAT_IRCAM) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "w64"))
-       {       update_header_test ("header.w64", SF_FORMAT_W64) ;
-               update_seek_short_test ("header_short.w64", SF_FORMAT_W64) ;
-               update_seek_int_test ("header_int.w64", SF_FORMAT_W64) ;
-               update_seek_float_test ("header_float.w64", SF_FORMAT_W64) ;
-               update_seek_double_test ("header_double.w64", SF_FORMAT_W64) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "rf64"))
-       {       update_header_test ("header.rf64", SF_FORMAT_RF64) ;
-               update_seek_short_test ("header_short.rf64", SF_FORMAT_RF64) ;
-               update_seek_int_test ("header_int.rf64", SF_FORMAT_RF64) ;
-               update_seek_float_test ("header_float.rf64", SF_FORMAT_RF64) ;
-               update_seek_double_test ("header_double.rf64", SF_FORMAT_RF64) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "mat4"))
-       {       update_header_test ("header.mat4", SF_FORMAT_MAT4) ;
-               update_seek_short_test ("header_short.mat4", SF_FORMAT_MAT4) ;
-               update_seek_int_test ("header_int.mat4", SF_FORMAT_MAT4) ;
-               update_seek_float_test ("header_float.mat4", SF_FORMAT_MAT4) ;
-               update_seek_double_test ("header_double.mat4", SF_FORMAT_MAT4) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "mat5"))
-       {       update_header_test ("header.mat5", SF_FORMAT_MAT5) ;
-               update_seek_short_test ("header_short.mat5", SF_FORMAT_MAT5) ;
-               update_seek_int_test ("header_int.mat5", SF_FORMAT_MAT5) ;
-               update_seek_float_test ("header_float.mat5", SF_FORMAT_MAT5) ;
-               update_seek_double_test ("header_double.mat5", SF_FORMAT_MAT5) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "pvf"))
-       {       update_header_test ("header.pvf", SF_FORMAT_PVF) ;
-               update_seek_short_test ("header_short.pvf", SF_FORMAT_PVF) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "avr"))
-       {       update_header_test ("header.avr", SF_FORMAT_AVR) ;
-               update_seek_short_test ("header_short.avr", SF_FORMAT_AVR) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "htk"))
-       {       update_header_test ("header.htk", SF_FORMAT_HTK) ;
-               update_seek_short_test ("header_short.htk", SF_FORMAT_HTK) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "svx"))
-       {       update_header_test ("header.svx", SF_FORMAT_SVX) ;
-               update_seek_short_test ("header_short.svx", SF_FORMAT_SVX) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "voc"))
-       {       update_header_test ("header.voc", SF_FORMAT_VOC) ;
-               /*-update_seek_short_test ("header_short.voc", SF_FORMAT_VOC) ;-*/
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "sds"))
-       {       update_header_test ("header.sds", SF_FORMAT_SDS) ;
-               /*-update_seek_short_test ("header_short.sds", SF_FORMAT_SDS) ;-*/
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "mpc2k"))
-       {       update_header_test ("header.mpc", SF_FORMAT_MPC2K) ;
-               update_seek_short_test ("header_short.mpc", SF_FORMAT_MPC2K) ;
-               test_count++ ;
-               } ;
-
-       if (test_count == 0)
-       {       printf ("Mono : ************************************\n") ;
-               printf ("Mono : *  No '%s' test defined.\n", argv [1]) ;
-               printf ("Mono : ************************************\n") ;
-               return 1 ;
-               } ;
-
-       return 0 ;
-} /* main */
-
-
-/*============================================================================================
-**     Here are the test functions.
-*/
-
-static void
-update_header_sub (const char *filename, int typemajor, int write_mode)
-{      SNDFILE         *outfile, *infile ;
-       SF_INFO         sfinfo ;
-       int                     k ;
-
-       sfinfo.samplerate = 44100 ;
-       sfinfo.format = (typemajor | SF_FORMAT_PCM_16) ;
-       sfinfo.channels = 1 ;
-       sfinfo.frames = 0 ;
-
-       outfile = test_open_file_or_die (filename, write_mode, &sfinfo, SF_TRUE, __LINE__) ;
-
-       for (k = 0 ; k < BUFFER_LEN ; k++)
-               data_out [k] = k + 1 ;
-       test_write_int_or_die (outfile, 0, data_out, BUFFER_LEN, __LINE__) ;
-
-       if (typemajor != SF_FORMAT_HTK)
-       {       /* The HTK header is not correct when the file is first written. */
-               infile = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-               sf_close (infile) ;
-               } ;
-
-       sf_command (outfile, SFC_UPDATE_HEADER_NOW, NULL, 0) ;
-
-       /*
-       ** Open file and check log buffer for an error. If header update failed
-       ** the the log buffer will contain errors.
-       */
-       infile = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       check_log_buffer_or_die (infile, __LINE__) ;
-
-       if (sfinfo.frames < BUFFER_LEN || sfinfo.frames > BUFFER_LEN + 50)
-       {       printf ("\n\nLine %d : Incorrect sample count (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, BUFFER_LEN) ;
-               dump_log_buffer (infile) ;
-               exit (1) ;
-               } ;
-
-       test_read_int_or_die (infile, 0, data_in, BUFFER_LEN, __LINE__) ;
-       for (k = 0 ; k < BUFFER_LEN ; k++)
-               if (data_out [k] != k + 1)
-                       printf ("Error : line %d\n", __LINE__) ;
-
-       sf_close (infile) ;
-
-       /* Set auto update on. */
-       sf_command (outfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) ;
-
-       /* Write more data_out. */
-       for (k = 0 ; k < BUFFER_LEN ; k++)
-               data_out [k] = k + 2 ;
-       test_write_int_or_die (outfile, 0, data_out, BUFFER_LEN, __LINE__) ;
-
-       /* Open file again and make sure no errors in log buffer. */
-       infile = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       check_log_buffer_or_die (infile, __LINE__) ;
-
-       if (sfinfo.frames < 2 * BUFFER_LEN || sfinfo.frames > 2 * BUFFER_LEN + 50)
-       {       printf ("\n\nLine %d : Incorrect sample count (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, 2 * BUFFER_LEN) ;
-               dump_log_buffer (infile) ;
-               exit (1) ;
-               } ;
-
-       sf_close (infile) ;
-
-       sf_close (outfile) ;
-
-       unlink (filename) ;
-} /* update_header_sub */
-
-static void
-update_header_test (const char *filename, int typemajor)
-{
-       print_test_name ("update_header_test", filename) ;
-
-       update_header_sub (filename, typemajor, SFM_WRITE) ;
-       update_header_sub (filename, typemajor, SFM_RDWR) ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* update_header_test */
-
-/*==============================================================================
-*/
-
-static void
-update_seek_short_test (const char *filename, int filetype)
-{      SNDFILE *outfile, *infile ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       short buffer [8] ;
-       int k ;
-
-       print_test_name ("update_seek_short_test", filename) ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Create sound outfile with no data. */
-       sfinfo.format = filetype | SF_FORMAT_PCM_16 ;
-       sfinfo.samplerate = 48000 ;
-       sfinfo.channels = 2 ;
-
-       if (sf_format_check (&sfinfo) == SF_FALSE)
-               sfinfo.channels = 1 ;
-
-       outfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_close (outfile) ;
-
-       /* Open again for read/write. */
-       outfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ;
-
-       /*
-       ** In auto header update mode, seeking to the end of the file with
-       ** SEEK_SET will fail from the 2nd seek on.  seeking to 0, SEEK_END
-       ** will seek to 0 anyway
-       */
-       if (sf_command (outfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) == 0)
-       {       printf ("\n\nError : sf_command (SFC_SET_UPDATE_HEADER_AUTO) return error : %s\n\n", sf_strerror (outfile)) ;
-               exit (1) ;
-               } ;
-
-       /* Now write some frames. */
-       frames = ARRAY_LEN (buffer) / sfinfo.channels ;
-
-       for (k = 0 ; k < 6 ; k++)
-       {       test_seek_or_die (outfile, k * frames, SEEK_SET, k * frames, sfinfo.channels, __LINE__) ;
-               test_seek_or_die (outfile, 0, SEEK_END, k * frames, sfinfo.channels, __LINE__) ;
-
-               /* Open file again and make sure no errors in log buffer. */
-               infile = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-               check_log_buffer_or_die (infile, __LINE__) ;
-               sf_close (infile) ;
-
-               if (sfinfo.frames != k * frames)
-               {       printf ("\n\nLine %d : Incorrect sample count (%" PRId64 " should be %" PRId64 ")\n", __LINE__, sfinfo.frames, k + frames) ;
-                       dump_log_buffer (infile) ;
-                       exit (1) ;
-                       } ;
-
-               if ((k & 1) == 0)
-                       test_write_short_or_die (outfile, k, buffer, sfinfo.channels * frames, __LINE__) ;
-               else
-                       test_writef_short_or_die (outfile, k, buffer, frames, __LINE__) ;
-               } ;
-
-       sf_close (outfile) ;
-       unlink (filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* update_seek_short_test */
-
-static void
-update_seek_int_test   (const char *filename, int filetype)
-{      SNDFILE *outfile, *infile ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       int buffer [8] ;
-       int k ;
-
-       print_test_name ("update_seek_int_test", filename) ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Create sound outfile with no data. */
-       sfinfo.format = filetype | SF_FORMAT_PCM_32 ;
-       sfinfo.samplerate = 48000 ;
-       sfinfo.channels = 2 ;
-
-       if (sf_format_check (&sfinfo) == SF_FALSE)
-               sfinfo.channels = 1 ;
-
-       outfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_close (outfile) ;
-
-       /* Open again for read/write. */
-       outfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ;
-
-       /*
-       ** In auto header update mode, seeking to the end of the file with
-       ** SEEK_SET will fail from the 2nd seek on.  seeking to 0, SEEK_END
-       ** will seek to 0 anyway
-       */
-       if (sf_command (outfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) == 0)
-       {       printf ("\n\nError : sf_command (SFC_SET_UPDATE_HEADER_AUTO) return error : %s\n\n", sf_strerror (outfile)) ;
-               exit (1) ;
-               } ;
-
-       /* Now write some frames. */
-       frames = ARRAY_LEN (buffer) / sfinfo.channels ;
-
-       for (k = 0 ; k < 6 ; k++)
-       {       test_seek_or_die (outfile, k * frames, SEEK_SET, k * frames, sfinfo.channels, __LINE__) ;
-               test_seek_or_die (outfile, 0, SEEK_END, k * frames, sfinfo.channels, __LINE__) ;
-
-               /* Open file again and make sure no errors in log buffer. */
-               infile = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-               check_log_buffer_or_die (infile, __LINE__) ;
-               sf_close (infile) ;
-
-               if (sfinfo.frames != k * frames)
-               {       printf ("\n\nLine %d : Incorrect sample count (%" PRId64 " should be %" PRId64 ")\n", __LINE__, sfinfo.frames, k + frames) ;
-                       dump_log_buffer (infile) ;
-                       exit (1) ;
-                       } ;
-
-               if ((k & 1) == 0)
-                       test_write_int_or_die (outfile, k, buffer, sfinfo.channels * frames, __LINE__) ;
-               else
-                       test_writef_int_or_die (outfile, k, buffer, frames, __LINE__) ;
-               } ;
-
-       sf_close (outfile) ;
-       unlink (filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* update_seek_int_test */
-
-static void
-update_seek_float_test (const char *filename, int filetype)
-{      SNDFILE *outfile, *infile ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       float buffer [8] ;
-       int k ;
-
-       print_test_name ("update_seek_float_test", filename) ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Create sound outfile with no data. */
-       sfinfo.format = filetype | SF_FORMAT_FLOAT ;
-       sfinfo.samplerate = 48000 ;
-       sfinfo.channels = 2 ;
-
-       if (sf_format_check (&sfinfo) == SF_FALSE)
-               sfinfo.channels = 1 ;
-
-       outfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_close (outfile) ;
-
-       /* Open again for read/write. */
-       outfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ;
-
-       /*
-       ** In auto header update mode, seeking to the end of the file with
-       ** SEEK_SET will fail from the 2nd seek on.  seeking to 0, SEEK_END
-       ** will seek to 0 anyway
-       */
-       if (sf_command (outfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) == 0)
-       {       printf ("\n\nError : sf_command (SFC_SET_UPDATE_HEADER_AUTO) return error : %s\n\n", sf_strerror (outfile)) ;
-               exit (1) ;
-               } ;
-
-       /* Now write some frames. */
-       frames = ARRAY_LEN (buffer) / sfinfo.channels ;
-
-       for (k = 0 ; k < 6 ; k++)
-       {       test_seek_or_die (outfile, k * frames, SEEK_SET, k * frames, sfinfo.channels, __LINE__) ;
-               test_seek_or_die (outfile, 0, SEEK_END, k * frames, sfinfo.channels, __LINE__) ;
-
-               /* Open file again and make sure no errors in log buffer. */
-               infile = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-               check_log_buffer_or_die (infile, __LINE__) ;
-               sf_close (infile) ;
-
-               if (sfinfo.frames != k * frames)
-               {       printf ("\n\nLine %d : Incorrect sample count (%" PRId64 " should be %" PRId64 ")\n", __LINE__, sfinfo.frames, k + frames) ;
-                       dump_log_buffer (infile) ;
-                       exit (1) ;
-                       } ;
-
-               if ((k & 1) == 0)
-                       test_write_float_or_die (outfile, k, buffer, sfinfo.channels * frames, __LINE__) ;
-               else
-                       test_writef_float_or_die (outfile, k, buffer, frames, __LINE__) ;
-               } ;
-
-       sf_close (outfile) ;
-       unlink (filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* update_seek_float_test */
-
-static void
-update_seek_double_test        (const char *filename, int filetype)
-{      SNDFILE *outfile, *infile ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       double buffer [8] ;
-       int k ;
-
-       print_test_name ("update_seek_double_test", filename) ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Create sound outfile with no data. */
-       sfinfo.format = filetype | SF_FORMAT_DOUBLE ;
-       sfinfo.samplerate = 48000 ;
-       sfinfo.channels = 2 ;
-
-       if (sf_format_check (&sfinfo) == SF_FALSE)
-               sfinfo.channels = 1 ;
-
-       outfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_close (outfile) ;
-
-       /* Open again for read/write. */
-       outfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ;
-
-       /*
-       ** In auto header update mode, seeking to the end of the file with
-       ** SEEK_SET will fail from the 2nd seek on.  seeking to 0, SEEK_END
-       ** will seek to 0 anyway
-       */
-       if (sf_command (outfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) == 0)
-       {       printf ("\n\nError : sf_command (SFC_SET_UPDATE_HEADER_AUTO) return error : %s\n\n", sf_strerror (outfile)) ;
-               exit (1) ;
-               } ;
-
-       /* Now write some frames. */
-       frames = ARRAY_LEN (buffer) / sfinfo.channels ;
-
-       for (k = 0 ; k < 6 ; k++)
-       {       test_seek_or_die (outfile, k * frames, SEEK_SET, k * frames, sfinfo.channels, __LINE__) ;
-               test_seek_or_die (outfile, 0, SEEK_END, k * frames, sfinfo.channels, __LINE__) ;
-
-               /* Open file again and make sure no errors in log buffer. */
-               infile = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-               check_log_buffer_or_die (infile, __LINE__) ;
-               sf_close (infile) ;
-
-               if (sfinfo.frames != k * frames)
-               {       printf ("\n\nLine %d : Incorrect sample count (%" PRId64 " should be %" PRId64 ")\n", __LINE__, sfinfo.frames, k + frames) ;
-                       dump_log_buffer (infile) ;
-                       exit (1) ;
-                       } ;
-
-               if ((k & 1) == 0)
-                       test_write_double_or_die (outfile, k, buffer, sfinfo.channels * frames, __LINE__) ;
-               else
-                       test_writef_double_or_die (outfile, k, buffer, frames, __LINE__) ;
-               } ;
-
-       sf_close (outfile) ;
-       unlink (filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* update_seek_double_test */
-
-
-
-static void
-header_shrink_test (const char *filename, int filetype)
-{      SNDFILE *outfile, *infile ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       float buffer [8], bufferin [8] ;
-
-       print_test_name ("header_shrink_test", filename) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-       sfinfo.samplerate = 44100 ;
-       sfinfo.format = filetype | SF_FORMAT_FLOAT ;
-       sfinfo.channels = 1 ;
-
-       memset (buffer, 0xA0, sizeof (buffer)) ;
-
-       /* Now write some frames. */
-       frames = ARRAY_LEN (buffer) / sfinfo.channels ;
-
-       /* Test the file with extra header data. */
-       outfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_FALSE, __LINE__) ;
-
-       sf_command (outfile, SFC_SET_ADD_PEAK_CHUNK, NULL, SF_TRUE) ;
-       sf_command (outfile, SFC_UPDATE_HEADER_NOW, NULL, SF_FALSE) ;
-       sf_command (outfile, SFC_SET_ADD_PEAK_CHUNK, NULL, SF_FALSE) ;
-
-       test_writef_float_or_die (outfile, 0, buffer, frames, __LINE__) ;
-       sf_close (outfile) ;
-
-       /* Open again for read. */
-       infile = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_FALSE, __LINE__) ;
-
-       test_readf_float_or_die (infile, 0, bufferin, frames, __LINE__) ;
-       sf_close (infile) ;
-
-       compare_float_or_die (buffer, bufferin, frames, __LINE__) ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-       return ;
-} /* header_shrink_test */
-
-
-static void
-extra_header_test (const char *filename, int filetype)
-{      SNDFILE *outfile, *infile ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       short buffer [8] ;
-       int k = 0 ;
-
-       print_test_name ("extra_header_test", filename) ;
-
-       sfinfo.samplerate = 44100 ;
-       sfinfo.format = (filetype | SF_FORMAT_PCM_16) ;
-       sfinfo.channels = 1 ;
-
-       memset (buffer, 0xA0, sizeof (buffer)) ;
-
-       /* Now write some frames. */
-       frames = ARRAY_LEN (buffer) / sfinfo.channels ;
-
-       /* Test the file with extra header data. */
-       outfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, 463) ;
-       sf_set_string (outfile, SF_STR_TITLE, filename) ;
-       test_writef_short_or_die (outfile, k, buffer, frames, 465) ;
-       sf_set_string (outfile, SF_STR_COPYRIGHT, "(c) 1980 Erik") ;
-       sf_close (outfile) ;
-
-#if 1
-       /*
-       **  Erik de Castro Lopo <erikd@mega-nerd.com> May 23 2004.
-       **
-       ** This file has extra string data in the header and therefore cannot
-       ** currently be opened in SFM_RDWR mode. This is fixable, but its in
-       ** a part of the code I don't want to fiddle with until the Ogg/Vorbis
-       ** integration is done.
-       */
-
-       if ((infile = sf_open (filename, SFM_RDWR, &sfinfo)) != NULL)
-       {       printf ("\n\nError : should not be able to open this file in SFM_RDWR.\n\n") ;
-               exit (1) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-       return ;
-#else
-
-       hexdump_file (filename, 0, 100000) ;
-
-       /* Open again for read/write. */
-       outfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, 492) ;
-
-       /*
-       ** In auto header update mode, seeking to the end of the file with
-       ** SEEK_SET will fail from the 2nd seek on.  seeking to 0, SEEK_END
-       ** will seek to 0 anyway
-       */
-       if (sf_command (outfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) == 0)
-       {       printf ("\n\nError : sf_command (SFC_SET_UPDATE_HEADER_AUTO) return error : %s\n\n", sf_strerror (outfile)) ;
-               exit (1) ;
-               } ;
-
-       /* Now write some frames. */
-       frames = ARRAY_LEN (buffer) / sfinfo.channels ;
-
-       for (k = 1 ; k < 6 ; k++)
-       {
-               printf ("\n*** pass %d\n", k) ;
-               memset (buffer, 0xA0 + k, sizeof (buffer)) ;
-
-
-               test_seek_or_die (outfile, k * frames, SEEK_SET, k * frames, sfinfo.channels, 513) ;
-               test_seek_or_die (outfile, 0, SEEK_END, k * frames, sfinfo.channels, 514) ;
-
-               /* Open file again and make sure no errors in log buffer. */
-               if (0)
-               {       infile = test_open_file_or_die (filename, SFM_READ, &sfinfo, 518) ;
-                       check_log_buffer_or_die (infile, 519) ;
-                       sf_close (infile) ;
-                       } ;
-
-               if (sfinfo.frames != k * frames)
-               {       printf ("\n\nLine %d : Incorrect sample count (%" PRId64 " should be %" PRId64 ")\n", 524, sfinfo.frames, k + frames) ;
-                       dump_log_buffer (infile) ;
-                       exit (1) ;
-                       } ;
-
-               if ((k & 1) == 0)
-                       test_write_short_or_die (outfile, k, buffer, sfinfo.channels * frames, 530) ;
-               else
-                       test_writef_short_or_die (outfile, k, buffer, frames, 532) ;
-               hexdump_file (filename, 0, 100000) ;
-               } ;
-
-       sf_close (outfile) ;
-       unlink (filename) ;
-
-       puts ("ok") ;
-       return ;
-#endif
-} /* extra_header_test */
-
index 22f5d6c..c611f56 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2015-2016 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
@@ -89,10 +89,12 @@ short_lrw_test (const char *filename, int filetype, const short * output, int ou
 {      SNDFILE         *file ;
        SF_INFO         sfinfo ;
        int                     k ;
-       short           input [out_len] ;
+       short           input [BUFFER_LENGTH] ;
 
        print_test_name ("short_lrw_test", filename) ;
 
+       exit_if_true (BUFFER_LENGTH > out_len, "\n\nLine %d: Bad array length.\n", __LINE__) ;
+
        sfinfo.samplerate       = SAMPLE_RATE ;
        sfinfo.frames           = out_len ;
        sfinfo.channels         = 1 ;
@@ -133,10 +135,12 @@ int_lrw_test (const char *filename, int filetype, const int * output, int out_le
 {      SNDFILE         *file ;
        SF_INFO         sfinfo ;
        int                     k ;
-       int                     input [out_len] ;
+       int                     input [BUFFER_LENGTH] ;
 
        print_test_name ("int_lrw_test", filename) ;
 
+       exit_if_true (BUFFER_LENGTH > out_len, "\n\nLine %d: Bad array length.\n", __LINE__) ;
+
        sfinfo.samplerate       = SAMPLE_RATE ;
        sfinfo.frames           = out_len ;
        sfinfo.channels         = 1 ;
@@ -177,10 +181,12 @@ float_lrw_test (const char *filename, int filetype, const float * output, int ou
 {      SNDFILE         *file ;
        SF_INFO         sfinfo ;
        int                     k ;
-       float           input [out_len] ;
+       float           input [BUFFER_LENGTH] ;
 
        print_test_name ("float_lrw_test", filename) ;
 
+       exit_if_true (BUFFER_LENGTH > out_len, "\n\nLine %d: Bad array length.\n", __LINE__) ;
+
        sfinfo.samplerate       = SAMPLE_RATE ;
        sfinfo.frames           = out_len ;
        sfinfo.channels         = 1 ;
@@ -221,10 +227,12 @@ double_lrw_test (const char *filename, int filetype, const double * output, int
 {      SNDFILE         *file ;
        SF_INFO         sfinfo ;
        int                     k ;
-       double          input [out_len] ;
+       double          input [BUFFER_LENGTH] ;
 
        print_test_name ("double_lrw_test", filename) ;
 
+       exit_if_true (BUFFER_LENGTH > out_len, "\n\nLine %d: Bad array length.\n", __LINE__) ;
+
        sfinfo.samplerate       = SAMPLE_RATE ;
        sfinfo.frames           = out_len ;
        sfinfo.channels         = 1 ;
index c072373..0d5a8f7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 1999-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2016 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
@@ -376,7 +376,7 @@ main (int argc, char *argv [])
                } ;
 
        if (do_all || strcmp (argv [1], "ogg_vorbis") == 0)
-       {       if (HAVE_EXTERNAL_LIBS)
+       {       if (HAVE_EXTERNAL_XIPH_LIBS)
                {       /* Don't do lcomp_test_XXX as the errors are too big. */
                        sdlcomp_test_short      ("vorbis.oga", SF_FORMAT_OGG | SF_FORMAT_VORBIS, 1, 0.30) ;
                        sdlcomp_test_int        ("vorbis.oga", SF_FORMAT_OGG | SF_FORMAT_VORBIS, 1, 0.30) ;
index ff45c5d..90a9d01 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2001-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2001-2016 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
@@ -226,7 +226,7 @@ zero_data_test (const char *filename, int format)
 
        switch (format & SF_FORMAT_TYPEMASK)
        {       case SF_FORMAT_OGG :
-                       if (HAVE_EXTERNAL_LIBS == 0)
+                       if (HAVE_EXTERNAL_XIPH_LIBS == 0)
                                return ;
                        break ;
                default :
index 4b1be03..78d24b3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2007-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2007-2016 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
@@ -328,7 +328,7 @@ ogg_stereo_seek_test (const char * filename, int format)
 int
 main (void)
 {
-       if (HAVE_EXTERNAL_LIBS)
+       if (HAVE_EXTERNAL_XIPH_LIBS)
        {       ogg_short_test () ;
                ogg_int_test () ;
                ogg_float_test () ;
diff --git a/tests/pcm_test.c b/tests/pcm_test.c
deleted file mode 100644 (file)
index 3fd0ba0..0000000
+++ /dev/null
@@ -1,1727 +0,0 @@
-/*
-** Copyright (C) 1999-2013 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 "sfconfig.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <inttypes.h>
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <sndfile.h>
-
-#include "utils.h"
-
-#define        BUFFER_SIZE             (1 << 12)
-
-static void    lrintf_test (void) ;
-
-static void    pcm_test_bits_8 (const char *filename, int filetype, uint64_t hash) ;
-static void    pcm_test_bits_16        (const char *filename, int filetype, uint64_t hash) ;
-static void    pcm_test_bits_24        (const char *filename, int filetype, uint64_t hash) ;
-static void    pcm_test_bits_32        (const char *filename, int filetype, uint64_t hash) ;
-
-static void pcm_test_float     (const char *filename, int filetype, uint64_t hash, int replace_float) ;
-static void pcm_test_double    (const char *filename, int filetype, uint64_t hash, int replace_float) ;
-
-typedef union
-{      double  d [BUFFER_SIZE + 1] ;
-       float   f [BUFFER_SIZE + 1] ;
-       int             i [BUFFER_SIZE + 1] ;
-       short   s [BUFFER_SIZE + 1] ;
-} BUFFER ;
-
-/* Data written to the file. */
-static BUFFER  data_out ;
-
-/* Data read back from the file. */
-static BUFFER  data_in ;
-
-int
-main (void)
-{
-       lrintf_test () ;
-
-       pcm_test_bits_8 ("pcm-s8.raw", SF_FORMAT_RAW | SF_FORMAT_PCM_S8, 0xa335091249dbfLL) ;
-       pcm_test_bits_8 ("pcm-u8.raw", SF_FORMAT_RAW | SF_FORMAT_PCM_U8, 0x48c433d695f3fLL) ;
-
-       pcm_test_bits_16 ("le-pcm16.raw", SF_ENDIAN_LITTLE      | SF_FORMAT_RAW | SF_FORMAT_PCM_16, 0xb956c881ebf08LL) ;
-       pcm_test_bits_16 ("be-pcm16.raw", SF_ENDIAN_BIG         | SF_FORMAT_RAW | SF_FORMAT_PCM_16, 0x2f840c55750f8LL) ;
-
-       pcm_test_bits_24 ("le-pcm24.raw", SF_ENDIAN_LITTLE      | SF_FORMAT_RAW | SF_FORMAT_PCM_24, 0xb6a759ab496f8LL) ;
-       pcm_test_bits_24 ("be-pcm24.raw", SF_ENDIAN_BIG         | SF_FORMAT_RAW | SF_FORMAT_PCM_24, 0xf3eaf9c30b6f8LL) ;
-
-       pcm_test_bits_32 ("le-pcm32.raw", SF_ENDIAN_LITTLE      | SF_FORMAT_RAW | SF_FORMAT_PCM_32, 0xaece1c1c17f08LL) ;
-       pcm_test_bits_32 ("be-pcm32.raw", SF_ENDIAN_BIG         | SF_FORMAT_RAW | SF_FORMAT_PCM_32, 0x9ddf142d0b0f8LL) ;
-
-       /* Lite remove start */
-       pcm_test_float  ("le-float.raw", SF_ENDIAN_LITTLE       | SF_FORMAT_RAW | SF_FORMAT_FLOAT, 0xad04f7554267aLL, SF_FALSE) ;
-       pcm_test_float  ("be-float.raw", SF_ENDIAN_BIG          | SF_FORMAT_RAW | SF_FORMAT_FLOAT, 0xde3e248fa9186LL, SF_FALSE) ;
-
-       pcm_test_double ("le-double.raw", SF_ENDIAN_LITTLE      | SF_FORMAT_RAW | SF_FORMAT_DOUBLE, 0x2726f958f669cLL, SF_FALSE) ;
-       pcm_test_double ("be-double.raw", SF_ENDIAN_BIG | SF_FORMAT_RAW | SF_FORMAT_DOUBLE, 0x3583f8ee51164LL, SF_FALSE) ;
-
-       pcm_test_float  ("le-float.raw", SF_ENDIAN_LITTLE       | SF_FORMAT_RAW | SF_FORMAT_FLOAT, 0xad04f7554267aLL, SF_TRUE) ;
-       pcm_test_float  ("be-float.raw", SF_ENDIAN_BIG          | SF_FORMAT_RAW | SF_FORMAT_FLOAT, 0xde3e248fa9186LL, SF_TRUE) ;
-
-       pcm_test_double ("le-double.raw", SF_ENDIAN_LITTLE      | SF_FORMAT_RAW | SF_FORMAT_DOUBLE, 0x2726f958f669cLL, SF_TRUE) ;
-       pcm_test_double ("be-double.raw", SF_ENDIAN_BIG | SF_FORMAT_RAW | SF_FORMAT_DOUBLE, 0x3583f8ee51164LL, SF_TRUE) ;
-       /* Lite remove end */
-
-       return 0 ;
-} /* main */
-
-/*============================================================================================
-**     Here are the test functions.
-*/
-
-static void
-lrintf_test (void)
-{      int k, items ;
-       float   *float_data ;
-       int             *int_data ;
-
-       print_test_name ("lrintf_test", "") ;
-
-       items = 1024 ;
-
-       float_data = data_out.f ;
-       int_data = data_in.i ;
-
-       for (k = 0 ; k < items ; k++)
-               float_data [k] = (k * ((k % 2) ? 333333.0 : -333333.0)) ;
-
-       for (k = 0 ; k < items ; k++)
-               int_data [k] = lrintf (float_data [k]) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (fabs (int_data [k] - float_data [k]) > 1.0)
-               {       printf ("\n\nLine %d: float : Incorrect sample (#%d : %f => %d).\n", __LINE__, k, float_data [k], int_data [k]) ;
-                       exit (1) ;
-                       } ;
-
-       printf ("ok\n") ;
-} /* lrintf_test */
-
-static void
-pcm_test_bits_8 (const char *filename, int filetype, uint64_t hash)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k, items, zero_count ;
-       short           *short_out, *short_in ;
-       int                     *int_out, *int_in ;
-       /* Lite remove start */
-       float           *float_out, *float_in ;
-       double          *double_out, *double_in ;
-       /* Lite remove end */
-
-       print_test_name ("pcm_test_bits_8", filename) ;
-
-       items = 127 ;
-
-       short_out = data_out.s ;
-       short_in = data_in.s ;
-
-       zero_count = 0 ;
-       for (k = 0 ; k < items ; k++)
-       {       short_out [k] = arith_shift_left (k * ((k % 2) ? 1 : -1), 8) ;
-               zero_count = short_out [k] ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_short_or_die (file, 0, short_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (short_in, 0, items * sizeof (short)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_short_or_die (file, 0, short_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (short_out [k] != short_in [k])
-               {       printf ("\n\nLine %d: Incorrect sample (#%d : 0x%x => 0x%x).\n", __LINE__, k, short_out [k], short_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /* Finally, check the file hash. */
-       check_file_hash_or_die (filename, hash, __LINE__) ;
-
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_int ()
-       */
-       zero_count = 0 ;
-
-       int_out = data_out.i ;
-       int_in = data_in.i ;
-       for (k = 0 ; k < items ; k++)
-       {       int_out [k] = arith_shift_left (k * ((k % 2) ? 1 : -1), 24) ;
-               zero_count = int_out [k] ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_int_or_die (file, 0, int_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (int_in, 0, items * sizeof (int)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_int_or_die (file, 0, int_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (int_out [k] != int_in [k])
-               {       printf ("\n\nLine %d: int : Incorrect sample (#%d : 0x%x => 0x%x).\n", __LINE__, k, int_out [k], int_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /* Lite remove start */
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_float ()
-       */
-       zero_count = 0 ;
-
-       float_out = data_out.f ;
-       float_in = data_in.f ;
-       for (k = 0 ; k < items ; k++)
-       {       float_out [k] = (k * ((k % 2) ? 1 : -1)) ;
-               zero_count = (fabs (float_out [k]) > 1e-10) ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros (%d/%d).\n", __LINE__, zero_count, items) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-
-       test_write_float_or_die (file, 0, float_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (float_in, 0, items * sizeof (float)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-
-       test_read_float_or_die (file, 0, float_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (fabs (float_out [k] - float_in [k]) > 1e-10)
-               {       printf ("\n\nLine %d: float : Incorrect sample (#%d : %f => %f).\n", __LINE__, k, (double) float_out [k], (double) float_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_double ()
-       */
-       zero_count = 0 ;
-
-       double_out = data_out.d ;
-       double_in = data_in.d ;
-       for (k = 0 ; k < items ; k++)
-       {       double_out [k] = (k * ((k % 2) ? 1 : -1)) ;
-               zero_count = (fabs (double_out [k]) > 1e-10) ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros (%d/%d).\n", __LINE__, zero_count, items) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-
-       test_write_double_or_die (file, 0, double_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (double_in, 0, items * sizeof (double)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-
-       test_read_double_or_die (file, 0, double_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (fabs (double_out [k] - double_in [k]) > 1e-10)
-               {       printf ("\n\nLine %d: double : Incorrect sample (#%d : %f => %f).\n", __LINE__, k, double_out [k], double_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-       /* Lite remove end */
-       unlink (filename) ;
-
-       puts ("ok") ;
-} /* pcm_test_bits_8 */
-
-static void
-pcm_test_bits_16 (const char *filename, int filetype, uint64_t hash)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k, items, zero_count ;
-       short           *short_out, *short_in ;
-       int                     *int_out, *int_in ;
-       /* Lite remove start */
-       float           *float_out, *float_in ;
-       double          *double_out, *double_in ;
-       /* Lite remove end */
-
-       print_test_name ("pcm_test_bits_16", filename) ;
-
-       items = 1024 ;
-
-       short_out = data_out.s ;
-       short_in = data_in.s ;
-
-       zero_count = 0 ;
-       for (k = 0 ; k < items ; k++)
-       {       short_out [k] = (k * ((k % 2) ? 3 : -3)) ;
-               zero_count = short_out [k] ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_short_or_die (file, 0, short_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (short_in, 0, items * sizeof (short)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_short_or_die (file, 0, short_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (short_out [k] != short_in [k])
-               {       printf ("\n\nLine %d: Incorrect sample (#%d : 0x%x => 0x%x).\n", __LINE__, k, short_out [k], short_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /* Finally, check the file hash. */
-       check_file_hash_or_die (filename, hash, __LINE__) ;
-
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_int ()
-       */
-       zero_count = 0 ;
-
-       int_out = data_out.i ;
-       int_in = data_in.i ;
-       for (k = 0 ; k < items ; k++)
-       {       int_out [k] = arith_shift_left (k * ((k % 2) ? 3 : -3), 16) ;
-               zero_count = int_out [k] ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_int_or_die (file, 0, int_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (int_in, 0, items * sizeof (int)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_int_or_die (file, 0, int_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (int_out [k] != int_in [k])
-               {       printf ("\n\nLine %d: int : Incorrect sample (#%d : 0x%x => 0x%x).\n", __LINE__, k, int_out [k], int_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /* Lite remove start */
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_float ()
-       */
-       zero_count = 0 ;
-
-       float_out = data_out.f ;
-       float_in = data_in.f ;
-       for (k = 0 ; k < items ; k++)
-       {       float_out [k] = (k * ((k % 2) ? 3 : -3)) ;
-               zero_count = (fabs (float_out [k]) > 1e-10) ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros (%d/%d).\n", __LINE__, zero_count, items) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-
-       test_write_float_or_die (file, 0, float_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (float_in, 0, items * sizeof (float)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-
-       test_read_float_or_die (file, 0, float_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (fabs (float_out [k] - float_in [k]) > 1e-10)
-               {       printf ("\n\nLine %d: float : Incorrect sample (#%d : %f => %f).\n", __LINE__, k, (double) float_out [k], (double) float_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_double ()
-       */
-       zero_count = 0 ;
-
-       double_out = data_out.d ;
-       double_in = data_in.d ;
-       for (k = 0 ; k < items ; k++)
-       {       double_out [k] = (k * ((k % 2) ? 3 : -3)) ;
-               zero_count = (fabs (double_out [k]) > 1e-10) ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros (%d/%d).\n", __LINE__, zero_count, items) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-
-       test_write_double_or_die (file, 0, double_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (double_in, 0, items * sizeof (double)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-
-       test_read_double_or_die (file, 0, double_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (fabs (double_out [k] - double_in [k]) > 1e-10)
-               {       printf ("\n\nLine %d: double : Incorrect sample (#%d : %f => %f).\n", __LINE__, k, double_out [k], double_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-       /* Lite remove end */
-       unlink (filename) ;
-
-       puts ("ok") ;
-} /* pcm_test_bits_16 */
-
-static void
-pcm_test_bits_24 (const char *filename, int filetype, uint64_t hash)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k, items, zero_count ;
-       short           *short_out, *short_in ;
-       int                     *int_out, *int_in ;
-       /* Lite remove start */
-       float           *float_out, *float_in ;
-       double          *double_out, *double_in ;
-       /* Lite remove end */
-
-       print_test_name ("pcm_test_bits_24", filename) ;
-
-       items = 1024 ;
-
-       short_out = data_out.s ;
-       short_in = data_in.s ;
-
-       zero_count = 0 ;
-       for (k = 0 ; k < items ; k++)
-       {       short_out [k] = (k * ((k % 2) ? 3 : -3)) ;
-               zero_count = short_out [k] ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_short_or_die (file, 0, short_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (short_in, 0, items * sizeof (short)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_short_or_die (file, 0, short_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (short_out [k] != short_in [k])
-               {       printf ("\n\nLine %d: Incorrect sample (#%d : 0x%x => 0x%x).\n", __LINE__, k, short_out [k], short_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /* Finally, check the file hash. */
-       check_file_hash_or_die (filename, hash, __LINE__) ;
-
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_int ()
-       */
-       zero_count = 0 ;
-
-       int_out = data_out.i ;
-       int_in = data_in.i ;
-       for (k = 0 ; k < items ; k++)
-       {       int_out [k] = arith_shift_left (k * ((k % 2) ? 3333 : -3333), 8) ;
-               zero_count = int_out [k] ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_int_or_die (file, 0, int_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (int_in, 0, items * sizeof (int)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_int_or_die (file, 0, int_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (int_out [k] != int_in [k])
-               {       printf ("\n\nLine %d: int : Incorrect sample (#%d : 0x%x => 0x%x).\n", __LINE__, k, int_out [k], int_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /* Lite remove start */
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_float ()
-       */
-       zero_count = 0 ;
-
-       float_out = data_out.f ;
-       float_in = data_in.f ;
-       for (k = 0 ; k < items ; k++)
-       {       float_out [k] = (k * ((k % 2) ? 3333 : -3333)) ;
-               zero_count = (fabs (float_out [k]) > 1e-10) ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros (%d/%d).\n", __LINE__, zero_count, items) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-
-       test_write_float_or_die (file, 0, float_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (float_in, 0, items * sizeof (float)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-
-       test_read_float_or_die (file, 0, float_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (fabs (float_out [k] - float_in [k]) > 1e-10)
-               {       printf ("\n\nLine %d: float : Incorrect sample (#%d : %f => %f).\n", __LINE__, k, (double) float_out [k], (double) float_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_double ()
-       */
-       zero_count = 0 ;
-
-       double_out = data_out.d ;
-       double_in = data_in.d ;
-       for (k = 0 ; k < items ; k++)
-       {       double_out [k] = (k * ((k % 2) ? 3333 : -3333)) ;
-               zero_count = (fabs (double_out [k]) > 1e-10) ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros (%d/%d).\n", __LINE__, zero_count, items) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-
-       test_write_double_or_die (file, 0, double_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (double_in, 0, items * sizeof (double)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-
-       test_read_double_or_die (file, 0, double_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (fabs (double_out [k] - double_in [k]) > 1e-10)
-               {       printf ("\n\nLine %d: double : Incorrect sample (#%d : %f => %f).\n", __LINE__, k, double_out [k], double_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-       /* Lite remove end */
-       unlink (filename) ;
-
-       puts ("ok") ;
-} /* pcm_test_bits_24 */
-
-static void
-pcm_test_bits_32 (const char *filename, int filetype, uint64_t hash)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k, items, zero_count ;
-       short           *short_out, *short_in ;
-       int                     *int_out, *int_in ;
-       /* Lite remove start */
-       float           *float_out, *float_in ;
-       double          *double_out, *double_in ;
-       /* Lite remove end */
-
-       print_test_name ("pcm_test_bits_32", filename) ;
-
-       items = 1024 ;
-
-       short_out = data_out.s ;
-       short_in = data_in.s ;
-
-       zero_count = 0 ;
-       for (k = 0 ; k < items ; k++)
-       {       short_out [k] = (k * ((k % 2) ? 3 : -3)) ;
-               zero_count = short_out [k] ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_short_or_die (file, 0, short_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (short_in, 0, items * sizeof (short)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_short_or_die (file, 0, short_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (short_out [k] != short_in [k])
-               {       printf ("\n\nLine %d: Incorrect sample (#%d : 0x%x => 0x%x).\n", __LINE__, k, short_out [k], short_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /* Finally, check the file hash. */
-       check_file_hash_or_die (filename, hash, __LINE__) ;
-
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_int ()
-       */
-       zero_count = 0 ;
-
-       int_out = data_out.i ;
-       int_in = data_in.i ;
-       for (k = 0 ; k < items ; k++)
-       {       int_out [k] = (k * ((k % 2) ? 333333 : -333333)) ;
-               zero_count = int_out [k] ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_int_or_die (file, 0, int_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (int_in, 0, items * sizeof (int)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_int_or_die (file, 0, int_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (int_out [k] != int_in [k])
-               {       printf ("\n\nLine %d: int : Incorrect sample (#%d : 0x%x => 0x%x).\n", __LINE__, k, int_out [k], int_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /* Lite remove start */
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_float ()
-       */
-       zero_count = 0 ;
-
-       float_out = data_out.f ;
-       float_in = data_in.f ;
-       for (k = 0 ; k < items ; k++)
-       {       float_out [k] = (k * ((k % 2) ? 333333 : -333333)) ;
-               zero_count = (fabs (float_out [k]) > 1e-10) ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros (%d/%d).\n", __LINE__, zero_count, items) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-
-       test_write_float_or_die (file, 0, float_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (float_in, 0, items * sizeof (float)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-
-       test_read_float_or_die (file, 0, float_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (fabs (float_out [k] - float_in [k]) > 1e-10)
-               {       printf ("\n\nLine %d: float : Incorrect sample (#%d : %f => %f).\n", __LINE__, k, (double) float_out [k], (double) float_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /*--------------------------------------------------------------------------
-       ** Test sf_read/write_double ()
-       */
-       zero_count = 0 ;
-
-       double_out = data_out.d ;
-       double_in = data_in.d ;
-       for (k = 0 ; k < items ; k++)
-       {       double_out [k] = (k * ((k % 2) ? 333333 : -333333)) ;
-               zero_count = (fabs (double_out [k]) > 1e-10) ? zero_count : zero_count + 1 ;
-               } ;
-
-       if (zero_count > items / 4)
-       {       printf ("\n\nLine %d: too many zeros (%d/%d).\n", __LINE__, zero_count, items) ;
-               exit (1) ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-
-       test_write_double_or_die (file, 0, double_out, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       memset (double_in, 0, items * sizeof (double)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file. (%d => %" PRId64 ")\n", __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-
-       test_read_double_or_die (file, 0, double_in, items, __LINE__) ;
-
-       for (k = 0 ; k < items ; k++)
-               if (fabs (double_out [k] - double_in [k]) > 1e-10)
-               {       printf ("\n\nLine %d: double : Incorrect sample (#%d : %f => %f).\n", __LINE__, k, double_out [k], double_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-       /* Lite remove end */
-       unlink (filename) ;
-
-       puts ("ok") ;
-} /* pcm_test_bits_32 */
-
-
-
-/*==============================================================================
-*/
-
-static void
-pcm_test_float (const char *filename, int filetype, uint64_t hash, int replace_float)
-{      SNDFILE                 *file ;
-       SF_INFO                 sfinfo ;
-       int                             k, items, frames ;
-       int                             sign ;
-       double                  *data, error ;
-
-       print_test_name (replace_float ? "pcm_test_float (replace)" : "pcm_test_float", filename) ;
-
-       items = BUFFER_SIZE ;
-
-       data = data_out.d ;
-       for (sign = 1, k = 0 ; k < items ; k++)
-       {       data [k] = ((double) (k * sign)) / 100.0 ;
-               sign = (sign > 0) ? -1 : 1 ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = items ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-       if (replace_float && string_in_log_buffer (file, "Using IEEE replacement") == 0)
-       {       printf ("\n\nLine %d : Float replacement code not working.\n\n", __LINE__) ;
-               dump_log_buffer (file) ;
-               exit (1) ;
-               } ;
-
-       test_write_double_or_die (file, 0, data, items, __LINE__) ;
-
-       sf_close (file) ;
-
-       check_file_hash_or_die (filename, hash, __LINE__) ;
-
-       memset (data, 0, items * sizeof (double)) ;
-
-       if ((filetype & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-       if (replace_float && string_in_log_buffer (file, "Using IEEE replacement") == 0)
-       {       printf ("\n\nLine %d : Float replacement code not working.\n\n", __LINE__) ;
-               dump_log_buffer (file) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nError (%s:%d) Mono : Returned format incorrect (0x%08X => 0x%08X).\n", __FILE__, __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nError (%s:%d) Mono : Incorrect number of frames in file. (%d => %" PRId64 ")\n", __FILE__, __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nError (%s:%d) Mono : Incorrect number of channels in file.\n", __FILE__, __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data, items, __LINE__) ;
-
-       for (sign = -1, k = 0 ; k < items ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Mono : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to end of file. */
-       test_seek_or_die (file, 0, SEEK_END, sfinfo.frames, sfinfo.channels, __LINE__) ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Mono : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Mono : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 6, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data + 20, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Mono : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Mono : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       sf_close (file) ;
-
-       /* Now test Stereo. */
-
-       if ((filetype & SF_FORMAT_TYPEMASK) == SF_FORMAT_SVX) /* SVX is mono only */
-       {       printf ("ok\n") ;
-               return ;
-               } ;
-
-       items = BUFFER_SIZE ;
-
-       data = data_out.d ;
-       for (sign = -1, k = 0 ; k < items ; k++)
-               data [k] = ((double) k) / 100.0 * (sign *= -1) ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = items ;
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = filetype ;
-
-       frames = items / sfinfo.channels ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-       if (replace_float && string_in_log_buffer (file, "Using IEEE replacement") == 0)
-       {       printf ("\n\nLine %d : Float replacement code not working.\n\n", __LINE__) ;
-               dump_log_buffer (file) ;
-               exit (1) ;
-               } ;
-
-       test_writef_double_or_die (file, 0, data, frames, __LINE__) ;
-
-       sf_close (file) ;
-
-       check_file_hash_or_die (filename, hash, __LINE__) ;
-
-       memset (data, 0, items * sizeof (double)) ;
-
-       if ((filetype & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-       if (replace_float && string_in_log_buffer (file, "Using IEEE replacement") == 0)
-       {       printf ("\n\nLine %d : Float replacement code not working.\n\n", __LINE__) ;
-               dump_log_buffer (file) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nError (%s:%d) Stereo : Returned format incorrect (0x%08X => 0x%08X).\n", __FILE__, __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != frames)
-       {       printf ("\n\nError (%s:%d) Stereo : Incorrect number of frames in file. (%d => %" PRId64 ")\n", __FILE__, __LINE__, frames, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 2)
-       {       printf ("\n\nError (%s:%d) Stereo : Incorrect number of channels in file.\n", __FILE__, __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, data, frames, __LINE__) ;
-       for (sign = -1, k = 0 ; k < items ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Stereo : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, data, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Stereo : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, data + 20, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Stereo : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 8, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, data + 40, 2, __LINE__) ;
-       for (k = 40 ; k < 44 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Stereo : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, data + 20, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Stereo : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       sf_close (file) ;
-
-       printf ("ok\n") ;
-       unlink (filename) ;
-} /* pcm_test_float */
-
-static void
-pcm_test_double (const char *filename, int     filetype, uint64_t hash, int replace_float)
-{      SNDFILE                 *file ;
-       SF_INFO                 sfinfo ;
-       int                             k, items, frames ;
-       int                             sign ;
-       double                  *data, error ;
-
-       /* This is the best test routine. Other should be brought up to this standard. */
-
-       print_test_name (replace_float ? "pcm_test_double (replace)" : "pcm_test_double", filename) ;
-
-       items = BUFFER_SIZE ;
-
-       data = data_out.d ;
-       for (sign = 1, k = 0 ; k < items ; k++)
-       {       data [k] = ((double) (k * sign)) / 100.0 ;
-               sign = (sign > 0) ? -1 : 1 ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = items ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-       if (replace_float && string_in_log_buffer (file, "Using IEEE replacement") == 0)
-       {       printf ("\n\nLine %d : Float replacement code not working.\n\n", __LINE__) ;
-               dump_log_buffer (file) ;
-               exit (1) ;
-               } ;
-
-       test_write_double_or_die (file, 0, data, items, __LINE__) ;
-
-       sf_close (file) ;
-
-#if (defined (WIN32) || defined (_WIN32))
-       /* File hashing on Win32 fails due to slighty different
-       ** calculated values of the sin() function.
-       */
-       hash = hash ; /* Avoid compiler warning. */
-#else
-       check_file_hash_or_die (filename, hash, __LINE__) ;
-#endif
-
-       memset (data, 0, items * sizeof (double)) ;
-
-       if ((filetype & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-       if (replace_float && string_in_log_buffer (file, "Using IEEE replacement") == 0)
-       {       printf ("\n\nLine %d : Float replacement code not working.\n\n", __LINE__) ;
-               dump_log_buffer (file) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nError (%s:%d) Mono : Returned format incorrect (0x%08X => 0x%08X).\n", __FILE__, __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != items)
-       {       printf ("\n\nError (%s:%d) Mono : Incorrect number of frames in file. (%d => %" PRId64 ")\n", __FILE__, __LINE__, items, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nError (%s:%d) Mono : Incorrect number of channels in file.\n", __FILE__, __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data, items, __LINE__) ;
-
-       for (sign = -1, k = 0 ; k < items ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Mono : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Mono : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data + 10, 4, __LINE__) ;
-
-       test_seek_or_die (file, 0, SEEK_CUR, 14, sfinfo.channels, __LINE__) ;
-
-       for (k = 10 ; k < 14 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Mono : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 6, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data + 20, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Mono : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Mono : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       sf_close (file) ;
-
-       /* Now test Stereo. */
-
-       if ((filetype & SF_FORMAT_TYPEMASK) == SF_FORMAT_SVX) /* SVX is mono only */
-       {       printf ("ok\n") ;
-               return ;
-               } ;
-
-       items = BUFFER_SIZE ;
-
-       data = data_out.d ;
-       for (sign = -1, k = 0 ; k < items ; k++)
-               data [k] = ((double) k) / 100.0 * (sign *= -1) ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = items ;
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = filetype ;
-
-       frames = items / sfinfo.channels ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-       if (replace_float && string_in_log_buffer (file, "Using IEEE replacement") == 0)
-       {       printf ("\n\nLine %d : Float replacement code not working.\n\n", __LINE__) ;
-               dump_log_buffer (file) ;
-               exit (1) ;
-               } ;
-
-       test_writef_double_or_die (file, 0, data, frames, __LINE__) ;
-
-       sf_close (file) ;
-
-#if (defined (WIN32) || defined (_WIN32))
-       /* File hashing on Win32 fails due to slighty different
-       ** calculated values.
-       */
-       hash = hash ; /* Avoid compiler warning. */
-#else
-       check_file_hash_or_die (filename, hash, __LINE__) ;
-#endif
-
-       memset (data, 0, items * sizeof (double)) ;
-
-       if ((filetype & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_TEST_IEEE_FLOAT_REPLACE, NULL, replace_float) ;
-       if (replace_float && string_in_log_buffer (file, "Using IEEE replacement") == 0)
-       {       printf ("\n\nLine %d : Float replacement code not working.\n\n", __LINE__) ;
-               dump_log_buffer (file) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.format != filetype)
-       {       printf ("\n\nError (%s:%d) Stereo : Returned format incorrect (0x%08X => 0x%08X).\n", __FILE__, __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != frames)
-       {       printf ("\n\nError (%s:%d) Stereo : Incorrect number of frames in file. (%d => %" PRId64 ")\n", __FILE__, __LINE__, frames, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 2)
-       {       printf ("\n\nError (%s:%d) Stereo : Incorrect number of channels in file.\n", __FILE__, __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, data, frames, __LINE__) ;
-
-       for (sign = -1, k = 0 ; k < items ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Stereo : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Stereo : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data + 10, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Stereo : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 8, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, data + 40, 4, __LINE__) ;
-       for (k = 40 ; k < 44 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Stereo : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames -10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, data + 20, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-       {       error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
-               if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
-               {       printf ("\n\nError (%s:%d) Stereo : Incorrect sample (#%d : %f => %f).\n", __FILE__, __LINE__, k, ((double) k) / 100.0, data [k]) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       sf_close (file) ;
-
-       printf ("ok\n") ;
-       unlink (filename) ;
-} /* pcm_test_double */
-
-/*==============================================================================
-*/
index 9e5332a..765571f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2001-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2001-2016 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
@@ -88,6 +88,13 @@ main (int argc, char *argv [])
                test_count++ ;
                } ;
 
+       if (do_all || ! strcmp (argv [1], "rf64"))
+       {       test_float_peak ("peak_float.rf64", SF_FORMAT_RF64 | SF_FORMAT_FLOAT) ;
+
+               read_write_peak_test ("rw_peak.rf64", SF_FORMAT_RF64 | SF_FORMAT_FLOAT) ;
+               test_count++ ;
+               } ;
+
        if (test_count == 0)
        {       printf ("Mono : ************************************\n") ;
                printf ("Mono : *  No '%s' test defined.\n", argv [1]) ;
diff --git a/tests/pipe_test.c b/tests/pipe_test.c
deleted file mode 100644 (file)
index fe28313..0000000
+++ /dev/null
@@ -1,525 +0,0 @@
-/*
-** Copyright (C) 2001-2012 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.
-*/
-
-/*==========================================================================
-** This is a test program which tests reading from and writing to pipes.
-*/
-
-#include "sfconfig.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if (OS_IS_WIN32 || defined __OS2__ || HAVE_PIPE == 0 || HAVE_WAITPID == 0)
-
-int
-main (void)
-{
-       puts ("    pipe_test  : this test doesn't work on this OS.") ;
-       return 0 ;
-} /* main */
-
-#else
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#include <sndfile.h>
-
-#include "utils.h"
-
-typedef struct
-{      int                     format ;
-       const char      *ext ;
-} FILETYPE ;
-
-static int             file_exists (const char *filename) ;
-static void            useek_pipe_rw_test (int filetype, const char *ext) ;
-static void            pipe_read_test (int filetype, const char *ext) ;
-static void            pipe_write_test (const char *ext) ;
-static void            pipe_test_others (FILETYPE*, FILETYPE*) ;
-
-static FILETYPE read_write_types [] =
-{      {       SF_FORMAT_RAW   , "raw"         },
-       {       SF_FORMAT_AU    , "au"          },
-       /* Lite remove start */
-       {       SF_FORMAT_PAF   , "paf"         },
-       {       SF_FORMAT_IRCAM , "ircam"       },
-       {       SF_FORMAT_PVF   , "pvf" },
-       /* Lite remove end */
-       {       0                               , NULL          }
-} ;
-
-static FILETYPE read_only_types [] =
-{      {       SF_FORMAT_RAW   , "raw"         },
-       {       SF_FORMAT_AU    , "au"          },
-       {       SF_FORMAT_AIFF  , "aiff"        },
-       {       SF_FORMAT_WAV   , "wav"         },
-       {       SF_FORMAT_W64   , "w64"         },
-       /* Lite remove start */
-       {       SF_FORMAT_PAF   , "paf"         },
-       {       SF_FORMAT_NIST  , "nist"        },
-       {       SF_FORMAT_IRCAM , "ircam"       },
-       {       SF_FORMAT_MAT4  , "mat4"        },
-       {       SF_FORMAT_MAT5  , "mat5"        },
-       {       SF_FORMAT_SVX   , "svx"         },
-       {       SF_FORMAT_PVF   , "pvf"         },
-       /* Lite remove end */
-       {       0                               , NULL          }
-} ;
-
-int
-main (void)
-{      int k ;
-
-       if (file_exists ("libsndfile.spec.in"))
-               exit_if_true (chdir ("tests") != 0, "\n    Error : chdir ('tests') failed.\n") ;
-
-       for (k = 0 ; read_only_types [k].format ; k++)
-               pipe_read_test (read_only_types [k].format, read_only_types [k].ext) ;
-
-       for (k = 0 ; read_write_types [k].format ; k++)
-               pipe_write_test (read_write_types [k].ext) ;
-
-       for (k = 0 ; read_write_types [k].format ; k++)
-               useek_pipe_rw_test (read_write_types [k].format, read_write_types [k].ext) ;
-
-       if (0)
-               pipe_test_others (read_write_types, read_only_types) ;
-
-       return 0 ;
-} /* main */
-
-/*==============================================================================
-*/
-
-static void
-pipe_read_test (int filetype, const char *ext)
-{      static short data [PIPE_TEST_LEN] ;
-       static char buffer [256] ;
-       static char filename [256] ;
-
-       SNDFILE *outfile ;
-       SF_INFO sfinfo ;
-       int k, retval ;
-
-       snprintf (filename, sizeof (filename), "pipe_in.%s", ext) ;
-       print_test_name ("pipe_read_test", filename) ;
-
-       sfinfo.format = filetype | SF_FORMAT_PCM_16 ;
-       sfinfo.channels = 1 ;
-       sfinfo.samplerate = 44100 ;
-
-       for (k = 0 ; k < PIPE_TEST_LEN ; k++)
-               data [k] = PIPE_INDEX (k) ;
-
-       outfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_writef_short_or_die (outfile, 0, data, PIPE_TEST_LEN, __LINE__) ;
-       sf_close (outfile) ;
-
-       snprintf (buffer, sizeof (buffer), "cat %s | ./stdin_test %s ", filename, ext) ;
-       if ((retval = system (buffer)) != 0)
-       {       retval = WEXITSTATUS (retval) ;
-               printf ("\n\n    Line %d : pipe test returned error for file type \"%s\".\n\n", __LINE__, ext) ;
-               exit (retval) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-
-       return ;
-} /* pipe_read_test */
-
-static void
-pipe_write_test (const char *ext)
-{      static char buffer [256] ;
-
-       int retval ;
-
-       print_test_name ("pipe_write_test", ext) ;
-
-       snprintf (buffer, sizeof (buffer), "./stdout_test %s | ./stdin_test %s ", ext, ext) ;
-       if ((retval = system (buffer)))
-       {       retval = WEXITSTATUS (retval) ;
-               printf ("\n\n     Line %d : pipe test returned error file type \"%s\".\n\n", __LINE__, ext) ;
-               exit (retval) ;
-               } ;
-
-       puts ("ok") ;
-
-       return ;
-} /* pipe_write_test */
-
-/*==============================================================================
-*/
-
-
-static void
-useek_pipe_rw_short (const char * ext, SF_INFO * psfinfo_write, SF_INFO * psfinfo_read)
-{      static short buffer [PIPE_TEST_LEN] ;
-       static short data [PIPE_TEST_LEN] ;
-       SNDFILE *outfile ;
-       SNDFILE *infile_piped ;
-
-       int k, status = 0 ;
-       int pipefd [2] ;
-       pid_t pida ;
-
-       for (k = 0 ; k < PIPE_TEST_LEN ; k++)
-               data [k] = PIPE_INDEX (k) ;
-
-       /*
-       ** Create the pipe.
-       */
-       exit_if_true (pipe (pipefd) != 0, "\n\n%s %d : pipe failed : %s\n", __func__, __LINE__, strerror (errno)) ;
-
-       /*
-       ** Attach the write end of the pipe to be written to.
-       */
-       if ((outfile = sf_open_fd (pipefd [1], SFM_WRITE, psfinfo_write, SF_TRUE)) == NULL)
-       {       printf ("\n\n%s %d : unable to create unseekable pipe for write type \"%s\".\n", __func__, __LINE__, ext) ;
-               printf ("\t%s\n\n", sf_strerror (outfile)) ;
-               exit (1) ;
-               } ;
-
-       if (sf_error (outfile) != SF_ERR_NO_ERROR)
-       {       printf ("\n\n%s %d : unable to open unseekable pipe for write type \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       /*
-       ** Attach the read end of the pipe to be read from.
-       */
-       if ((infile_piped = sf_open_fd (pipefd [0], SFM_READ, psfinfo_read, SF_TRUE)) == NULL)
-       {       printf ("\n\n%s %d : unable to create unseekable pipe for read type. \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       if (sf_error (infile_piped) != SF_ERR_NO_ERROR)
-       {       printf ("\n\n%s %d : unable to open unseekable pipe for read type \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       /* Fork a child process that will write directly into the pipe. */
-       if ((pida = fork ()) == 0) /* child process */
-       {       test_writef_short_or_die (outfile, 0, data, PIPE_TEST_LEN, __LINE__) ;
-               exit (0) ;
-               } ;
-
-       /* In the parent process, read from the pipe and compare what is read
-       ** to what is written, if they match everything went as planned.
-       */
-       test_readf_short_or_die (infile_piped, 0, buffer, PIPE_TEST_LEN, __LINE__) ;
-       if (memcmp (buffer, data, sizeof (buffer)) != 0)
-       {       printf ("\n\n%s %d : unseekable pipe test failed for file type \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       /* Wait for the child process to return. */
-       waitpid (pida, &status, 0) ;
-       status = WEXITSTATUS (status) ;
-       sf_close (outfile) ;
-       sf_close (infile_piped) ;
-
-       if (status != 0)
-       {       printf ("\n\n%s %d : status of child process is %d for file type %s.\n\n", __func__, __LINE__, status, ext) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* useek_pipe_rw_short */
-
-
-static void
-useek_pipe_rw_float (const char * ext, SF_INFO * psfinfo_write, SF_INFO * psfinfo_read)
-{      static float buffer [PIPE_TEST_LEN] ;
-       static float data [PIPE_TEST_LEN] ;
-       SNDFILE *outfile ;
-       SNDFILE *infile_piped ;
-
-       int k, status = 0 ;
-       int pipefd [2] ;
-       pid_t pida ;
-
-       for (k = 0 ; k < PIPE_TEST_LEN ; k++)
-               data [k] = PIPE_INDEX (k) ;
-
-       /*
-       ** Create the pipe.
-       */
-       exit_if_true (pipe (pipefd) != 0, "\n\n%s %d : pipe failed : %s\n", __func__, __LINE__, strerror (errno)) ;
-
-       /*
-       ** Attach the write end of the pipe to be written to.
-       */
-       if ((outfile = sf_open_fd (pipefd [1], SFM_WRITE, psfinfo_write, SF_TRUE)) == NULL)
-       {       printf ("\n\n%s %d : unable to create unseekable pipe for write type \"%s\".\n", __func__, __LINE__, ext) ;
-               printf ("\t%s\n\n", sf_strerror (outfile)) ;
-               exit (1) ;
-               } ;
-
-       if (sf_error (outfile) != SF_ERR_NO_ERROR)
-       {       printf ("\n\n%s %d : unable to open unseekable pipe for write type \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       /*
-       ** Attach the read end of the pipe to be read from.
-       */
-       if ((infile_piped = sf_open_fd (pipefd [0], SFM_READ, psfinfo_read, SF_TRUE)) == NULL)
-       {       printf ("\n\n%s %d : unable to create unseekable pipe for read type. \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       if (sf_error (infile_piped) != SF_ERR_NO_ERROR)
-       {       printf ("\n\n%s %d : unable to open unseekable pipe for read type \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       /* Fork a child process that will write directly into the pipe. */
-       if ((pida = fork ()) == 0) /* child process */
-       {       test_writef_float_or_die (outfile, 0, data, PIPE_TEST_LEN, __LINE__) ;
-               exit (0) ;
-               } ;
-
-       /* In the parent process, read from the pipe and compare what is read
-       ** to what is written, if they match everything went as planned.
-       */
-       test_readf_float_or_die (infile_piped, 0, buffer, PIPE_TEST_LEN, __LINE__) ;
-       if (memcmp (buffer, data, sizeof (buffer)) != 0)
-       {       printf ("\n\n%s %d : unseekable pipe test failed for file type \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       /* Wait for the child process to return. */
-       waitpid (pida, &status, 0) ;
-       status = WEXITSTATUS (status) ;
-       sf_close (outfile) ;
-       sf_close (infile_piped) ;
-
-       if (status != 0)
-       {       printf ("\n\n%s %d : status of child process is %d for file type %s.\n\n", __func__, __LINE__, status, ext) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* useek_pipe_rw_float */
-
-
-static void
-useek_pipe_rw_double (const char * ext, SF_INFO * psfinfo_write, SF_INFO * psfinfo_read)
-{      static double buffer [PIPE_TEST_LEN] ;
-       static double data [PIPE_TEST_LEN] ;
-       SNDFILE *outfile ;
-       SNDFILE *infile_piped ;
-
-       int k, status = 0 ;
-       int pipefd [2] ;
-       pid_t pida ;
-
-       for (k = 0 ; k < PIPE_TEST_LEN ; k++)
-               data [k] = PIPE_INDEX (k) ;
-
-       /*
-       ** Create the pipe.
-       */
-       exit_if_true (pipe (pipefd) != 0, "\n\n%s %d : pipe failed : %s\n", __func__, __LINE__, strerror (errno)) ;
-
-       /*
-       ** Attach the write end of the pipe to be written to.
-       */
-       if ((outfile = sf_open_fd (pipefd [1], SFM_WRITE, psfinfo_write, SF_TRUE)) == NULL)
-       {       printf ("\n\n%s %d : unable to create unseekable pipe for write type \"%s\".\n", __func__, __LINE__, ext) ;
-               printf ("\t%s\n\n", sf_strerror (outfile)) ;
-               exit (1) ;
-               } ;
-
-       if (sf_error (outfile) != SF_ERR_NO_ERROR)
-       {       printf ("\n\n%s %d : unable to open unseekable pipe for write type \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       /*
-       ** Attach the read end of the pipe to be read from.
-       */
-       if ((infile_piped = sf_open_fd (pipefd [0], SFM_READ, psfinfo_read, SF_TRUE)) == NULL)
-       {       printf ("\n\n%s %d : unable to create unseekable pipe for read type. \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       if (sf_error (infile_piped) != SF_ERR_NO_ERROR)
-       {       printf ("\n\n%s %d : unable to open unseekable pipe for read type \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       /* Fork a child process that will write directly into the pipe. */
-       if ((pida = fork ()) == 0) /* child process */
-       {       test_writef_double_or_die (outfile, 0, data, PIPE_TEST_LEN, __LINE__) ;
-               exit (0) ;
-               } ;
-
-       /* In the parent process, read from the pipe and compare what is read
-       ** to what is written, if they match everything went as planned.
-       */
-       test_readf_double_or_die (infile_piped, 0, buffer, PIPE_TEST_LEN, __LINE__) ;
-       if (memcmp (buffer, data, sizeof (buffer)) != 0)
-       {       printf ("\n\n%s %d : unseekable pipe test failed for file type \"%s\".\n\n", __func__, __LINE__, ext) ;
-               exit (1) ;
-               } ;
-
-       /* Wait for the child process to return. */
-       waitpid (pida, &status, 0) ;
-       status = WEXITSTATUS (status) ;
-       sf_close (outfile) ;
-       sf_close (infile_piped) ;
-
-       if (status != 0)
-       {       printf ("\n\n%s %d : status of child process is %d for file type %s.\n\n", __func__, __LINE__, status, ext) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* useek_pipe_rw_double */
-
-
-
-
-static void
-useek_pipe_rw_test (int filetype, const char *ext)
-{      SF_INFO sfinfo_write ;
-       SF_INFO sfinfo_read ;
-
-       print_test_name ("useek_pipe_rw_test", ext) ;
-
-       /*
-       ** Setup the INFO structures for the filetype we will be
-       ** working with.
-       */
-       sfinfo_write.format = filetype | SF_FORMAT_PCM_16 ;
-       sfinfo_write.channels = 1 ;
-       sfinfo_write.samplerate = 44100 ;
-
-
-       sfinfo_read.format = 0 ;
-       if (filetype == SF_FORMAT_RAW)
-       {       sfinfo_read.format = filetype | SF_FORMAT_PCM_16 ;
-               sfinfo_read.channels = 1 ;
-               sfinfo_read.samplerate = 44100 ;
-               } ;
-
-       useek_pipe_rw_short (ext, &sfinfo_write, &sfinfo_read) ;
-
-       sfinfo_read.format = sfinfo_write.format = filetype | SF_FORMAT_FLOAT ;
-       if (sf_format_check (&sfinfo_read) != 0)
-               useek_pipe_rw_float (ext, &sfinfo_write, &sfinfo_read) ;
-
-       sfinfo_read.format = sfinfo_write.format = filetype | SF_FORMAT_DOUBLE ;
-       if (sf_format_check (&sfinfo_read) != 0)
-               useek_pipe_rw_double (ext, &sfinfo_write, &sfinfo_read) ;
-
-       puts ("ok") ;
-       return ;
-} /* useek_pipe_rw_test */
-
-
-
-static void
-pipe_test_others (FILETYPE* list1, FILETYPE* list2)
-{      SF_FORMAT_INFO  info ;
-       int             k, m, major_count, in_list ;
-
-       print_test_name ("pipe_test_others", "") ;
-
-       sf_command (NULL, SFC_GET_FORMAT_MAJOR_COUNT, &major_count, sizeof (int)) ;
-
-       for (k = 0 ; k < major_count ; k++)
-       {       info.format = k ;
-
-               sf_command (NULL, SFC_GET_FORMAT_MAJOR, &info, sizeof (info)) ;
-
-               in_list = SF_FALSE ;
-               for (m = 0 ; list1 [m].format ; m++)
-                       if (info.format == list1 [m].format)
-                               in_list = SF_TRUE ;
-
-               for (m = 0 ; list2 [m].format ; m++)
-                       if (info.format == list2 [m].format)
-                               in_list = SF_TRUE ;
-
-               if (in_list)
-                       continue ;
-
-               printf ("%s  %x\n", info.name, info.format) ;
-
-               if (1)
-               {       static short data [PIPE_TEST_LEN] ;
-                       static char buffer [256] ;
-                       static const char *filename = "pipe_in.dat" ;
-
-                       SNDFILE *outfile ;
-                       SF_INFO sfinfo ;
-                       int retval ;
-
-                       sfinfo.format = info.format | SF_FORMAT_PCM_16 ;
-                       sfinfo.channels = 1 ;
-                       sfinfo.samplerate = 44100 ;
-
-                       outfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-                       test_writef_short_or_die (outfile, 0, data, PIPE_TEST_LEN, __LINE__) ;
-                       sf_close (outfile) ;
-
-                       snprintf (buffer, sizeof (buffer), "cat %s | ./stdin_test %s %d ", filename, info.extension, PIPE_TEST_LEN) ;
-                       if ((retval = system (buffer)) == 0)
-                       {       retval = WEXITSTATUS (retval) ;
-                               printf ("\n\n     Line %d : pipe test should have returned error file type \"%s\" but didn't.\n\n", __LINE__, info.name) ;
-                               exit (1) ;
-                               } ;
-
-                       unlink (filename) ;
-                       } ;
-               } ;
-
-
-       puts ("ok") ;
-
-       return ;
-} /* pipe_test_others */
-
-
-/*==============================================================================
-*/
-
-static int
-file_exists (const char *filename)
-{      struct stat buf ;
-
-       if (stat (filename, &buf))
-               return 0 ;
-
-       return 1 ;
-} /* file_exists */
-
-#endif
-
diff --git a/tests/rdwr_test.c b/tests/rdwr_test.c
deleted file mode 100644 (file)
index def53e2..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
-** Copyright (C) 2010-2012 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 "sfconfig.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <sys/stat.h>
-#include <math.h>
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if (HAVE_DECL_S_IRGRP == 0)
-#include <sf_unistd.h>
-#endif
-
-#if (defined (WIN32) || defined (_WIN32))
-#include <io.h>
-#include <direct.h>
-#endif
-
-#include       <sndfile.h>
-
-#include       "utils.h"
-
-static void    rdwr_short_test (const char *filename) ;
-static void    rdwr_int_test   (const char *filename) ;
-static void    rdwr_float_test (const char *filename) ;
-static void    rdwr_double_test        (const char *filename) ;
-static void    rdwr_raw_test   (const char *filename) ;
-
-
-int
-main (void)
-{
-       rdwr_short_test ("rdwr_short.wav") ;
-       rdwr_int_test ("rdwr_int.wav") ;
-       rdwr_float_test ("rdwr_float.wav") ;
-       rdwr_double_test ("rdwr_double.wav") ;
-       rdwr_raw_test ("rdwr_raw.wav") ;
-
-       return 0 ;
-} /* main */
-
-
-/*============================================================================================
-**     Here are the test functions.
-*/
-
-static void
-rdwr_short_test        (const char *filename)
-{      SNDFILE *file ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       short buffer [160] ;
-
-       print_test_name ("rdwr_short_test", filename) ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Create sound file with no data. */
-       sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM_16 ;
-       sfinfo.samplerate = 16000 ;
-       sfinfo.channels = 1 ;
-
-       unlink (filename) ;
-
-       frames = ARRAY_LEN (buffer) ;
-
-       /* Open again for read/write. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_short_or_die (file, 0, buffer, frames, __LINE__) ;
-
-       test_read_short_or_die (file, 0, buffer, frames, __LINE__) ;
-
-       sf_close (file) ;
-       unlink (filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* rdwr_short_test */
-
-static void
-rdwr_int_test  (const char *filename)
-{      SNDFILE *file ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       int buffer [160] ;
-
-       print_test_name ("rdwr_int_test", filename) ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Create sound file with no data. */
-       sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM_32 ;
-       sfinfo.samplerate = 16000 ;
-       sfinfo.channels = 1 ;
-
-       unlink (filename) ;
-
-       frames = ARRAY_LEN (buffer) ;
-
-       /* Open again for read/write. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_int_or_die (file, 0, buffer, frames, __LINE__) ;
-
-       test_read_int_or_die (file, 0, buffer, frames, __LINE__) ;
-
-       sf_close (file) ;
-       unlink (filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* rdwr_int_test */
-
-static void
-rdwr_float_test        (const char *filename)
-{      SNDFILE *file ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       float buffer [160] ;
-
-       print_test_name ("rdwr_float_test", filename) ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Create sound file with no data. */
-       sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_FLOAT ;
-       sfinfo.samplerate = 16000 ;
-       sfinfo.channels = 1 ;
-
-       unlink (filename) ;
-
-       frames = ARRAY_LEN (buffer) ;
-
-       /* Open again for read/write. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_float_or_die (file, 0, buffer, frames, __LINE__) ;
-
-       test_read_float_or_die (file, 0, buffer, frames, __LINE__) ;
-
-       sf_close (file) ;
-       unlink (filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* rdwr_float_test */
-
-static void
-rdwr_double_test       (const char *filename)
-{      SNDFILE *file ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       double buffer [160] ;
-
-       print_test_name ("rdwr_double_test", filename) ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Create sound file with no data. */
-       sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_DOUBLE ;
-       sfinfo.samplerate = 16000 ;
-       sfinfo.channels = 1 ;
-
-       unlink (filename) ;
-
-       frames = ARRAY_LEN (buffer) ;
-
-       /* Open again for read/write. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_double_or_die (file, 0, buffer, frames, __LINE__) ;
-
-       test_read_double_or_die (file, 0, buffer, frames, __LINE__) ;
-
-       sf_close (file) ;
-       unlink (filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* rdwr_double_test */
-
-static void
-rdwr_raw_test  (const char *filename)
-{      SNDFILE *file ;
-       SF_INFO sfinfo ;
-       sf_count_t frames ;
-       unsigned char buffer [160] ;
-
-       print_test_name ("rdwr_raw_test", filename) ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Create sound file with no data. */
-       sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_PCM_U8 ;
-       sfinfo.samplerate = 16000 ;
-       sfinfo.channels = 1 ;
-
-       unlink (filename) ;
-
-       frames = ARRAY_LEN (buffer) ;
-
-       /* Open again for read/write. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, SF_TRUE, __LINE__) ;
-
-       test_write_raw_or_die (file, 0, buffer, frames, __LINE__) ;
-
-       test_read_raw_or_die (file, 0, buffer, frames, __LINE__) ;
-
-       sf_close (file) ;
-       unlink (filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* rdwr_raw_test */
-
-
-
diff --git a/tests/scale_clip_test.c b/tests/scale_clip_test.c
deleted file mode 100644 (file)
index defca24..0000000
+++ /dev/null
@@ -1,1853 +0,0 @@
-/*
-** Copyright (C) 1999-2012 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 "sfconfig.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <inttypes.h>
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <sndfile.h>
-
-#include "utils.h"
-
-#ifndef                M_PI
-#define                M_PI    3.14159265358979323846264338
-#endif
-
-#define        HALF_BUFFER_SIZE        (1 << 12)
-#define        BUFFER_SIZE                     (2 * HALF_BUFFER_SIZE)
-
-#define        SINE_AMP                1.1
-#define        MAX_ERROR               0.0202
-
-
-static void    flt_scale_clip_test_16 (const char *filename, int filetype, float maxval) ;
-static void    flt_scale_clip_test_24 (const char *filename, int filetype, float maxval) ;
-static void    flt_scale_clip_test_32 (const char *filename, int filetype, float maxval) ;
-static void    flt_scale_clip_test_08 (const char *filename, int filetype, float maxval) ;
-
-static void    dbl_scale_clip_test_16 (const char *filename, int filetype, float maxval) ;
-static void    dbl_scale_clip_test_24 (const char *filename, int filetype, float maxval) ;
-static void    dbl_scale_clip_test_32 (const char *filename, int filetype, float maxval) ;
-static void    dbl_scale_clip_test_08 (const char *filename, int filetype, float maxval) ;
-
-
-
-static void flt_short_clip_read_test (const char *filename, int filetype) ;
-static void flt_int_clip_read_test (const char *filename, int filetype) ;
-
-static void dbl_short_clip_read_test (const char *filename, int filetype) ;
-static void dbl_int_clip_read_test (const char *filename, int filetype) ;
-
-
-
-static void short_flt_scale_write_test (const char *filename, int filetype) ;
-static void short_dbl_scale_write_test (const char *filename, int filetype) ;
-
-static void int_flt_scale_write_test (const char *filename, int filetype) ;
-static void int_dbl_scale_write_test (const char *filename, int filetype) ;
-
-
-typedef union
-{      double  dbl [BUFFER_SIZE] ;
-       float   flt [BUFFER_SIZE] ;
-       int             i [BUFFER_SIZE] ;
-       short   s [BUFFER_SIZE] ;
-} BUFFER ;
-
-/* Data buffer. */
-static BUFFER  buffer_out ;
-static BUFFER  buffer_in ;
-
-int
-main (void)
-{
-       flt_scale_clip_test_08 ("scale_clip_s8.au", SF_FORMAT_AU | SF_FORMAT_PCM_S8, 1.0 * 0x80) ;
-       flt_scale_clip_test_08 ("scale_clip_u8.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_U8, 1.0 * 0x80) ;
-
-       dbl_scale_clip_test_08 ("scale_clip_s8.au", SF_FORMAT_AU | SF_FORMAT_PCM_S8, 1.0 * 0x80) ;
-       dbl_scale_clip_test_08 ("scale_clip_u8.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_U8, 1.0 * 0x80) ;
-
-       /*
-       **      Now use SF_FORMAT_AU where possible because it allows both
-       **      big and little endian files.
-       */
-
-       flt_scale_clip_test_16 ("scale_clip_be16.au", SF_ENDIAN_BIG     | SF_FORMAT_AU | SF_FORMAT_PCM_16, 1.0 * 0x8000) ;
-       flt_scale_clip_test_16 ("scale_clip_le16.au", SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_PCM_16, 1.0 * 0x8000) ;
-       flt_scale_clip_test_24 ("scale_clip_be24.au", SF_ENDIAN_BIG     | SF_FORMAT_AU | SF_FORMAT_PCM_24, 1.0 * 0x800000) ;
-       flt_scale_clip_test_24 ("scale_clip_le24.au", SF_ENDIAN_LITTLE  | SF_FORMAT_AU | SF_FORMAT_PCM_24, 1.0 * 0x800000) ;
-       flt_scale_clip_test_32 ("scale_clip_be32.au", SF_ENDIAN_BIG     | SF_FORMAT_AU | SF_FORMAT_PCM_32, 1.0 * 0x80000000) ;
-       flt_scale_clip_test_32 ("scale_clip_le32.au", SF_ENDIAN_LITTLE  | SF_FORMAT_AU | SF_FORMAT_PCM_32, 1.0 * 0x80000000) ;
-
-       dbl_scale_clip_test_16 ("scale_clip_be16.au", SF_ENDIAN_BIG     | SF_FORMAT_AU | SF_FORMAT_PCM_16, 1.0 * 0x8000) ;
-       dbl_scale_clip_test_16 ("scale_clip_le16.au", SF_ENDIAN_LITTLE  | SF_FORMAT_AU | SF_FORMAT_PCM_16, 1.0 * 0x8000) ;
-       dbl_scale_clip_test_24 ("scale_clip_be24.au", SF_ENDIAN_BIG     | SF_FORMAT_AU | SF_FORMAT_PCM_24, 1.0 * 0x800000) ;
-       dbl_scale_clip_test_24 ("scale_clip_le24.au", SF_ENDIAN_LITTLE  | SF_FORMAT_AU | SF_FORMAT_PCM_24, 1.0 * 0x800000) ;
-       dbl_scale_clip_test_32 ("scale_clip_be32.au", SF_ENDIAN_BIG     | SF_FORMAT_AU | SF_FORMAT_PCM_32, 1.0 * 0x80000000) ;
-       dbl_scale_clip_test_32 ("scale_clip_le32.au", SF_ENDIAN_LITTLE  | SF_FORMAT_AU | SF_FORMAT_PCM_32, 1.0 * 0x80000000) ;
-
-       flt_short_clip_read_test        ("flt_short.au" , SF_ENDIAN_BIG         | SF_FORMAT_AU | SF_FORMAT_FLOAT) ;
-       flt_int_clip_read_test          ("flt_int.au"   , SF_ENDIAN_LITTLE      | SF_FORMAT_AU | SF_FORMAT_FLOAT) ;
-       dbl_short_clip_read_test        ("dbl_short.au" , SF_ENDIAN_BIG         | SF_FORMAT_AU | SF_FORMAT_DOUBLE) ;
-       dbl_int_clip_read_test          ("dbl_int.au"   , SF_ENDIAN_LITTLE      | SF_FORMAT_AU | SF_FORMAT_DOUBLE) ;
-
-       short_flt_scale_write_test      ("short_flt.au" , SF_ENDIAN_BIG         | SF_FORMAT_AU | SF_FORMAT_FLOAT) ;
-       int_flt_scale_write_test        ("int_flt.au"   , SF_ENDIAN_LITTLE      | SF_FORMAT_AU | SF_FORMAT_FLOAT) ;
-       short_dbl_scale_write_test      ("short_dbl.au" , SF_ENDIAN_BIG         | SF_FORMAT_AU | SF_FORMAT_DOUBLE) ;
-       int_dbl_scale_write_test        ("int_dbl.au"   , SF_ENDIAN_LITTLE      | SF_FORMAT_AU | SF_FORMAT_DOUBLE) ;
-
-       return 0 ;
-} /* main */
-
-/*============================================================================================
-**     Here are the test functions.
-*/
-
-
-static void
-flt_scale_clip_test_16 (const char *filename, int filetype, float maxval)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k ;
-       float           *data_out, *data_in ;
-       double          diff, clip_max_diff ;
-
-       print_test_name ("flt_scale_clip_test_16", filename) ;
-
-       data_out = buffer_out.flt ;
-       data_in = buffer_in.flt ;
-
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       data_out [k] = 1.2 * sin (2 * M_PI * k / HALF_BUFFER_SIZE) ;
-               data_out [k + HALF_BUFFER_SIZE] = data_out [k] * maxval ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /*
-       **      Write two versions of the data:
-       **              normalized and clipped
-       **              un-normalized and clipped.
-       */
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_write_float_or_die (file, 0, data_out, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-       test_write_float_or_die (file, 0, data_out + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&buffer_in, 0, sizeof (buffer_in)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_float_or_die (file, 0, data_in, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-       test_read_float_or_die (file, 0, data_in + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       /* Check normalized version. */
-       clip_max_diff = 0.0 ;
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > 1.0)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > 1.0)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0 / 0x8000)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       /* Check the un-normalized data. */
-       clip_max_diff = 0.0 ;
-       for (k = HALF_BUFFER_SIZE ; k < BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > maxval)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > maxval)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (un-normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (un-normalised).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       printf ("ok\n") ;
-       unlink (filename) ;
-} /* flt_scale_clip_test_16 */
-
-static void
-flt_scale_clip_test_24 (const char *filename, int filetype, float maxval)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k ;
-       float           *data_out, *data_in ;
-       double          diff, clip_max_diff ;
-
-       print_test_name ("flt_scale_clip_test_24", filename) ;
-
-       data_out = buffer_out.flt ;
-       data_in = buffer_in.flt ;
-
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       data_out [k] = 1.2 * sin (2 * M_PI * k / HALF_BUFFER_SIZE) ;
-               data_out [k + HALF_BUFFER_SIZE] = data_out [k] * maxval ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /*
-       **      Write two versions of the data:
-       **              normalized and clipped
-       **              un-normalized and clipped.
-       */
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_write_float_or_die (file, 0, data_out, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-       test_write_float_or_die (file, 0, data_out + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&buffer_in, 0, sizeof (buffer_in)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_float_or_die (file, 0, data_in, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-       test_read_float_or_die (file, 0, data_in + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       /* Check normalized version. */
-       clip_max_diff = 0.0 ;
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > 1.0)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > 1.0)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0 / 0x800000)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       /* Check the un-normalized data. */
-       clip_max_diff = 0.0 ;
-       for (k = HALF_BUFFER_SIZE ; k < BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > maxval)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > maxval)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (un-normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (un-normalised).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       printf ("ok\n") ;
-       unlink (filename) ;
-} /* flt_scale_clip_test_24 */
-
-static void
-flt_scale_clip_test_32 (const char *filename, int filetype, float maxval)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k ;
-       float           *data_out, *data_in ;
-       double          diff, clip_max_diff ;
-
-       print_test_name ("flt_scale_clip_test_32", filename) ;
-
-       data_out = buffer_out.flt ;
-       data_in = buffer_in.flt ;
-
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       data_out [k] = 1.2 * sin (2 * M_PI * k / HALF_BUFFER_SIZE) ;
-               data_out [k + HALF_BUFFER_SIZE] = data_out [k] * maxval ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /*
-       **      Write two versions of the data:
-       **              normalized and clipped
-       **              un-normalized and clipped.
-       */
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_write_float_or_die (file, 0, data_out, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-       test_write_float_or_die (file, 0, data_out + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&buffer_in, 0, sizeof (buffer_in)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_float_or_die (file, 0, data_in, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-       test_read_float_or_die (file, 0, data_in + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       /* Check normalized version. */
-       clip_max_diff = 0.0 ;
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > 1.0)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > 1.0)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0 / 0x80000000)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       /* Check the un-normalized data. */
-       clip_max_diff = 0.0 ;
-       for (k = HALF_BUFFER_SIZE ; k < BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > maxval)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > maxval)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (un-normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (un-normalised).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       printf ("ok\n") ;
-       unlink (filename) ;
-} /* flt_scale_clip_test_32 */
-
-static void
-flt_scale_clip_test_08 (const char *filename, int filetype, float maxval)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k ;
-       float           *data_out, *data_in ;
-       double          diff, clip_max_diff ;
-
-       print_test_name ("flt_scale_clip_test_08", filename) ;
-
-       data_out = buffer_out.flt ;
-       data_in = buffer_in.flt ;
-
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       data_out [k] = 1.2 * sin (2 * M_PI * k / HALF_BUFFER_SIZE) ;
-               data_out [k + HALF_BUFFER_SIZE] = data_out [k] * maxval ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /*
-       **      Write two versions of the data:
-       **              normalized and clipped
-       **              un-normalized and clipped.
-       */
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_write_float_or_die (file, 0, data_out, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-       test_write_float_or_die (file, 0, data_out + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&buffer_in, 0, sizeof (buffer_in)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_float_or_die (file, 0, data_in, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;
-       test_read_float_or_die (file, 0, data_in + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       /* Check normalized version. */
-       clip_max_diff = 0.0 ;
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > 1.0)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > 1.0)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0 / 0x80)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       /* Check the un-normalized data. */
-       clip_max_diff = 0.0 ;
-       for (k = HALF_BUFFER_SIZE ; k < BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > maxval)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > maxval)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (un-normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (un-normalised).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       printf ("ok\n") ;
-       unlink (filename) ;
-} /* flt_scale_clip_test_08 */
-
-
-
-static void
-dbl_scale_clip_test_16 (const char *filename, int filetype, float maxval)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k ;
-       double          *data_out, *data_in ;
-       double          diff, clip_max_diff ;
-
-       print_test_name ("dbl_scale_clip_test_16", filename) ;
-
-       data_out = buffer_out.dbl ;
-       data_in = buffer_in.dbl ;
-
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       data_out [k] = 1.2 * sin (2 * M_PI * k / HALF_BUFFER_SIZE) ;
-               data_out [k + HALF_BUFFER_SIZE] = data_out [k] * maxval ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /*
-       **      Write two versions of the data:
-       **              normalized and clipped
-       **              un-normalized and clipped.
-       */
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_write_double_or_die (file, 0, data_out, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-       test_write_double_or_die (file, 0, data_out + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&buffer_in, 0, sizeof (buffer_in)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data_in, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-       test_read_double_or_die (file, 0, data_in + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       /* Check normalized version. */
-       clip_max_diff = 0.0 ;
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > 1.0)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > 1.0)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0 / 0x8000)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       /* Check the un-normalized data. */
-       clip_max_diff = 0.0 ;
-       for (k = HALF_BUFFER_SIZE ; k < BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > maxval)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > maxval)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (un-normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (un-normalised).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       printf ("ok\n") ;
-       unlink (filename) ;
-} /* dbl_scale_clip_test_16 */
-
-static void
-dbl_scale_clip_test_24 (const char *filename, int filetype, float maxval)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k ;
-       double          *data_out, *data_in ;
-       double          diff, clip_max_diff ;
-
-       print_test_name ("dbl_scale_clip_test_24", filename) ;
-
-       data_out = buffer_out.dbl ;
-       data_in = buffer_in.dbl ;
-
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       data_out [k] = 1.2 * sin (2 * M_PI * k / HALF_BUFFER_SIZE) ;
-               data_out [k + HALF_BUFFER_SIZE] = data_out [k] * maxval ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /*
-       **      Write two versions of the data:
-       **              normalized and clipped
-       **              un-normalized and clipped.
-       */
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_write_double_or_die (file, 0, data_out, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-       test_write_double_or_die (file, 0, data_out + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&buffer_in, 0, sizeof (buffer_in)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data_in, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-       test_read_double_or_die (file, 0, data_in + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       /* Check normalized version. */
-       clip_max_diff = 0.0 ;
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > 1.0)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > 1.0)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0 / 0x800000)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       /* Check the un-normalized data. */
-       clip_max_diff = 0.0 ;
-       for (k = HALF_BUFFER_SIZE ; k < BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > maxval)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > maxval)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (un-normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (un-normalised).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       printf ("ok\n") ;
-       unlink (filename) ;
-} /* dbl_scale_clip_test_24 */
-
-static void
-dbl_scale_clip_test_32 (const char *filename, int filetype, float maxval)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k ;
-       double          *data_out, *data_in ;
-       double          diff, clip_max_diff ;
-
-       print_test_name ("dbl_scale_clip_test_32", filename) ;
-
-       data_out = buffer_out.dbl ;
-       data_in = buffer_in.dbl ;
-
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       data_out [k] = 1.2 * sin (2 * M_PI * k / HALF_BUFFER_SIZE) ;
-               data_out [k + HALF_BUFFER_SIZE] = data_out [k] * maxval ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /*
-       **      Write two versions of the data:
-       **              normalized and clipped
-       **              un-normalized and clipped.
-       */
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_write_double_or_die (file, 0, data_out, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-       test_write_double_or_die (file, 0, data_out + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&buffer_in, 0, sizeof (buffer_in)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data_in, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-       test_read_double_or_die (file, 0, data_in + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       /* Check normalized version. */
-       clip_max_diff = 0.0 ;
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > 1.0)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > 1.0)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0 / 0x80000000)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       /* Check the un-normalized data. */
-       clip_max_diff = 0.0 ;
-       for (k = HALF_BUFFER_SIZE ; k < BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > maxval)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > maxval)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (un-normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (un-normalised).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       printf ("ok\n") ;
-       unlink (filename) ;
-} /* dbl_scale_clip_test_32 */
-
-static void
-dbl_scale_clip_test_08 (const char *filename, int filetype, float maxval)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int                     k ;
-       double          *data_out, *data_in ;
-       double          diff, clip_max_diff ;
-
-       print_test_name ("dbl_scale_clip_test_08", filename) ;
-
-       data_out = buffer_out.dbl ;
-       data_in = buffer_in.dbl ;
-
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       data_out [k] = 1.2 * sin (2 * M_PI * k / HALF_BUFFER_SIZE) ;
-               data_out [k + HALF_BUFFER_SIZE] = data_out [k] * maxval ;
-               } ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /*
-       **      Write two versions of the data:
-       **              normalized and clipped
-       **              un-normalized and clipped.
-       */
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_write_double_or_die (file, 0, data_out, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-       test_write_double_or_die (file, 0, data_out + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&buffer_in, 0, sizeof (buffer_in)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_double_or_die (file, 0, data_in, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;
-       test_read_double_or_die (file, 0, data_in + HALF_BUFFER_SIZE, HALF_BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       /* Check normalized version. */
-       clip_max_diff = 0.0 ;
-       for (k = 0 ; k < HALF_BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > 1.0)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > 1.0)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0 / 0x80)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       /* Check the un-normalized data. */
-       clip_max_diff = 0.0 ;
-       for (k = HALF_BUFFER_SIZE ; k < BUFFER_SIZE ; k++)
-       {       if (fabs (data_in [k]) > maxval)
-               {       printf ("\n\nLine %d: Input sample %d/%d (%f) has not been clipped.\n\n", __LINE__, k, BUFFER_SIZE, data_in [k]) ;
-                       exit (1) ;
-                       } ;
-
-               if (data_out [k] * data_in [k] < 0.0)
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d.\n\n", __LINE__, k, BUFFER_SIZE) ;
-                       exit (1) ;
-                       } ;
-
-               if (fabs (data_out [k]) > maxval)
-                       continue ;
-
-               diff = fabs (data_out [k] - data_in [k]) ;
-               if (diff > clip_max_diff)
-                       clip_max_diff = diff ;
-               } ;
-
-       if (clip_max_diff < 1e-20)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too small (un-normalized).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       if (clip_max_diff > 1.0)
-       {       printf ("\n\nLine %d: Clipping difference (%e) too large (un-normalised).\n\n", __LINE__, clip_max_diff) ;
-               exit (1) ;
-               } ;
-
-       printf ("ok\n") ;
-       unlink (filename) ;
-} /* dbl_scale_clip_test_08 */
-
-
-
-
-/*==============================================================================
-*/
-
-
-static void flt_short_clip_read_test (const char *filename, int filetype)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       float           *data_out ;
-       short                   *data_in, max_value ;
-       int                     k ;
-
-       print_test_name ("flt_short_clip_read_test", filename) ;
-
-       data_out = buffer_out.flt ;
-       data_in = buffer_in.s ;
-
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               data_out [k] = 0.995 * sin (4 * M_PI * k / BUFFER_SIZE) ;
-       data_out [BUFFER_SIZE / 8] = 1.0 ;
-       data_out [3 * BUFFER_SIZE / 8] = -1.000000001 ;
-       data_out [5 * BUFFER_SIZE / 8] = 1.0 ;
-       data_out [7 * BUFFER_SIZE / 8] = -1.000000001 ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /* Save unclipped data to the file. */
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_float_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_read_short_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-       /*-sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;-*/
-       sf_close (file) ;
-
-       /* Check the first half. */
-       max_value = 0 ;
-       for (k = 0 ; k < sfinfo.frames ; k++)
-       {       /* Check if data_out has different sign from data_in. */
-               if ((data_out [k] < 0.0 && data_in [k] > 0) || (data_out [k] > 0.0 && data_in [k] < 0))
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d  (%f -> %d).\n\n", __LINE__, k, BUFFER_SIZE, data_out [k], data_in [k]) ;
-                       exit (1) ;
-                       } ;
-               max_value = (max_value > abs (data_in [k])) ? max_value : abs (data_in [k]) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* flt_short_clip_read_test */
-static void flt_int_clip_read_test (const char *filename, int filetype)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       float           *data_out ;
-       int                     *data_in, max_value ;
-       int                     k ;
-
-       print_test_name ("flt_int_clip_read_test", filename) ;
-
-       data_out = buffer_out.flt ;
-       data_in = buffer_in.i ;
-
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               data_out [k] = 0.995 * sin (4 * M_PI * k / BUFFER_SIZE) ;
-       data_out [BUFFER_SIZE / 8] = 1.0 ;
-       data_out [3 * BUFFER_SIZE / 8] = -1.000000001 ;
-       data_out [5 * BUFFER_SIZE / 8] = 1.0 ;
-       data_out [7 * BUFFER_SIZE / 8] = -1.000000001 ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /* Save unclipped data to the file. */
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_float_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_read_int_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-       /*-sf_command (file, SFC_SET_NORM_FLOAT, NULL, SF_FALSE) ;-*/
-       sf_close (file) ;
-
-       /* Check the first half. */
-       max_value = 0 ;
-       for (k = 0 ; k < sfinfo.frames ; k++)
-       {       /* Check if data_out has different sign from data_in. */
-               if ((data_out [k] < 0.0 && data_in [k] > 0) || (data_out [k] > 0.0 && data_in [k] < 0))
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d  (%f -> %d).\n\n", __LINE__, k, BUFFER_SIZE, data_out [k], data_in [k]) ;
-                       exit (1) ;
-                       } ;
-               max_value = (max_value > abs (data_in [k])) ? max_value : abs (data_in [k]) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* flt_int_clip_read_test */
-
-static void dbl_short_clip_read_test (const char *filename, int filetype)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       double          *data_out ;
-       short                   *data_in, max_value ;
-       int                     k ;
-
-       print_test_name ("dbl_short_clip_read_test", filename) ;
-
-       data_out = buffer_out.dbl ;
-       data_in = buffer_in.s ;
-
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               data_out [k] = 0.995 * sin (4 * M_PI * k / BUFFER_SIZE) ;
-       data_out [BUFFER_SIZE / 8] = 1.0 ;
-       data_out [3 * BUFFER_SIZE / 8] = -1.000000001 ;
-       data_out [5 * BUFFER_SIZE / 8] = 1.0 ;
-       data_out [7 * BUFFER_SIZE / 8] = -1.000000001 ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /* Save unclipped data to the file. */
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_double_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_read_short_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-       /*-sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;-*/
-       sf_close (file) ;
-
-       /* Check the first half. */
-       max_value = 0 ;
-       for (k = 0 ; k < sfinfo.frames ; k++)
-       {       /* Check if data_out has different sign from data_in. */
-               if ((data_out [k] < 0.0 && data_in [k] > 0) || (data_out [k] > 0.0 && data_in [k] < 0))
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d  (%f -> %d).\n\n", __LINE__, k, BUFFER_SIZE, data_out [k], data_in [k]) ;
-                       exit (1) ;
-                       } ;
-               max_value = (max_value > abs (data_in [k])) ? max_value : abs (data_in [k]) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* dbl_short_clip_read_test */
-static void dbl_int_clip_read_test (const char *filename, int filetype)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       double          *data_out ;
-       int                     *data_in, max_value ;
-       int                     k ;
-
-       print_test_name ("dbl_int_clip_read_test", filename) ;
-
-       data_out = buffer_out.dbl ;
-       data_in = buffer_in.i ;
-
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               data_out [k] = 0.995 * sin (4 * M_PI * k / BUFFER_SIZE) ;
-       data_out [BUFFER_SIZE / 8] = 1.0 ;
-       data_out [3 * BUFFER_SIZE / 8] = -1.000000001 ;
-       data_out [5 * BUFFER_SIZE / 8] = 1.0 ;
-       data_out [7 * BUFFER_SIZE / 8] = -1.000000001 ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       /* Save unclipped data to the file. */
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_double_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       sf_command (file, SFC_SET_CLIPPING, NULL, SF_TRUE) ;
-       test_read_int_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-       /*-sf_command (file, SFC_SET_NORM_DOUBLE, NULL, SF_FALSE) ;-*/
-       sf_close (file) ;
-
-       /* Check the first half. */
-       max_value = 0 ;
-       for (k = 0 ; k < sfinfo.frames ; k++)
-       {       /* Check if data_out has different sign from data_in. */
-               if ((data_out [k] < 0.0 && data_in [k] > 0) || (data_out [k] > 0.0 && data_in [k] < 0))
-               {       printf ("\n\nLine %d: Data wrap around at index %d/%d  (%f -> %d).\n\n", __LINE__, k, BUFFER_SIZE, data_out [k], data_in [k]) ;
-                       exit (1) ;
-                       } ;
-               max_value = (max_value > abs (data_in [k])) ? max_value : abs (data_in [k]) ;
-               } ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* dbl_int_clip_read_test */
-
-
-/*==============================================================================
-*/
-
-
-static void short_flt_scale_write_test (const char *filename, int filetype)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       short           *data_out ;
-       float   *data_in, max_value ;
-       int                     k ;
-
-       print_test_name ("short_flt_clip_write_test", filename) ;
-
-       data_out = buffer_out.s ;
-       data_in = buffer_in.flt ;
-
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               data_out [k] = lrintf (0x7FFFF * 0.995 * sin (4 * M_PI * k / BUFFER_SIZE)) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_short_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_INT_FLOAT_WRITE, NULL, SF_TRUE) ;
-       test_write_short_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_INT_FLOAT_WRITE, NULL, SF_FALSE) ;
-       test_write_short_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != 3 * BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, 3 * BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       /* Check the first section. */
-       test_read_float_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value < 1000.0)
-       {       printf ("\n\nLine %d: Max value (%f) < 1000.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       /* Check the second section. */
-       test_read_float_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value > 1.0)
-       {       printf ("\n\nLine %d: Max value (%f) > 1.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       /* Check the third section. */
-       test_read_float_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value < 1000.0)
-       {       printf ("\n\nLine %d: Max value (%f) < 1000.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       sf_close (file) ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* short_flt_scale_write_test */
-static void short_dbl_scale_write_test (const char *filename, int filetype)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       short           *data_out ;
-       double  *data_in, max_value ;
-       int                     k ;
-
-       print_test_name ("short_dbl_clip_write_test", filename) ;
-
-       data_out = buffer_out.s ;
-       data_in = buffer_in.dbl ;
-
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               data_out [k] = lrint (0x7FFFF * 0.995 * sin (4 * M_PI * k / BUFFER_SIZE)) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_short_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_INT_FLOAT_WRITE, NULL, SF_TRUE) ;
-       test_write_short_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_INT_FLOAT_WRITE, NULL, SF_FALSE) ;
-       test_write_short_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != 3 * BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, 3 * BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       /* Check the first section. */
-       test_read_double_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value < 1000.0)
-       {       printf ("\n\nLine %d: Max value (%f) < 1000.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       /* Check the second section. */
-       test_read_double_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value > 1.0)
-       {       printf ("\n\nLine %d: Max value (%f) > 1.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       /* Check the third section. */
-       test_read_double_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value < 1000.0)
-       {       printf ("\n\nLine %d: Max value (%f) < 1000.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       sf_close (file) ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* short_dbl_scale_write_test */
-
-static void int_flt_scale_write_test (const char *filename, int filetype)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *data_out ;
-       float   *data_in, max_value ;
-       int                     k ;
-
-       print_test_name ("int_flt_clip_write_test", filename) ;
-
-       data_out = buffer_out.i ;
-       data_in = buffer_in.flt ;
-
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               data_out [k] = lrintf (0x7FFFFFFF * 0.995 * sin (4 * M_PI * k / BUFFER_SIZE)) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_int_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_INT_FLOAT_WRITE, NULL, SF_TRUE) ;
-       test_write_int_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_INT_FLOAT_WRITE, NULL, SF_FALSE) ;
-       test_write_int_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != 3 * BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, 3 * BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       /* Check the first section. */
-       test_read_float_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value < 1000.0)
-       {       printf ("\n\nLine %d: Max value (%f) < 1000.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       /* Check the second section. */
-       test_read_float_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value > 1.0)
-       {       printf ("\n\nLine %d: Max value (%f) > 1.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       /* Check the third section. */
-       test_read_float_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value < 1000.0)
-       {       printf ("\n\nLine %d: Max value (%f) < 1000.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       sf_close (file) ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* int_flt_scale_write_test */
-static void int_dbl_scale_write_test (const char *filename, int filetype)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *data_out ;
-       double  *data_in, max_value ;
-       int                     k ;
-
-       print_test_name ("int_dbl_clip_write_test", filename) ;
-
-       data_out = buffer_out.i ;
-       data_in = buffer_in.dbl ;
-
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               data_out [k] = lrint (0x7FFFFFFF * 0.995 * sin (4 * M_PI * k / BUFFER_SIZE)) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = 123456789 ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = filetype ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, SF_TRUE, __LINE__) ;
-       test_write_int_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_INT_FLOAT_WRITE, NULL, SF_TRUE) ;
-       test_write_int_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_command (file, SFC_SET_SCALE_INT_FLOAT_WRITE, NULL, SF_FALSE) ;
-       test_write_int_or_die (file, 0, data_out, BUFFER_SIZE, __LINE__) ;
-       sf_close (file) ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, SF_TRUE, __LINE__) ;
-
-       sfinfo.format &= (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK) ;
-
-       if (sfinfo.format != (filetype & (SF_FORMAT_TYPEMASK | SF_FORMAT_SUBMASK)))
-       {       printf ("\n\nLine %d: Returned format incorrect (0x%08X => 0x%08X).\n\n", __LINE__, filetype, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames != 3 * BUFFER_SIZE)
-       {       printf ("\n\nLine %d: Incorrect number of frames in file (%d => %" PRId64 ").\n\n", __LINE__, 3 * BUFFER_SIZE, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d: Incorrect number of channels in file.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       /* Check the first section. */
-       test_read_double_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value < 1000.0)
-       {       printf ("\n\nLine %d: Max value (%f) < 1000.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       /* Check the second section. */
-       test_read_double_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value > 1.0)
-       {       printf ("\n\nLine %d: Max value (%f) > 1.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       /* Check the third section. */
-       test_read_double_or_die (file, 0, data_in, BUFFER_SIZE, __LINE__) ;
-
-       max_value = 0.0 ;
-       for (k = 0 ; k < BUFFER_SIZE ; k++)
-               max_value = (max_value > fabs (data_in [k])) ? max_value : fabs (data_in [k]) ;
-
-       if (max_value < 1000.0)
-       {       printf ("\n\nLine %d: Max value (%f) < 1000.0.\n\n", __LINE__, max_value) ;
-               exit (1) ;
-               } ;
-
-       sf_close (file) ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-} /* int_dbl_scale_write_test */
-
-
-
diff --git a/tests/sftest.c b/tests/sftest.c
new file mode 100644 (file)
index 0000000..78a9f7f
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+** Copyright (C) 1999-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 "sfconfig.h"
+
+#include <stdio.h>
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <sndfile.h>
+
+#define        BUFFER_SIZE             (1024)
+
+
+static short buffer [BUFFER_SIZE] ;
+
+int
+main (int argc, char *argv [])
+{      SNDFILE *file ;
+       SF_INFO sfinfo ;
+       int             k, count, max = 0, total = 0 ;
+
+       if (argc < 2)
+       {       printf ("Expecting input file name.\n") ;
+               return 0 ;
+               } ;
+
+       if (! (file = sf_open (argv [1], SFM_READ, &sfinfo)))
+       {       printf ("sf_open_read failed with error : ") ;
+               puts (sf_strerror (NULL)) ;
+               exit (1) ;
+               } ;
+
+       while ((count = sf_read_short (file, buffer, BUFFER_SIZE)))
+       {       for (k = 0 ; k < count ; k++)
+                       if (abs (buffer [k]) > max)
+                               max = abs (buffer [k]) ;
+               total += count ;
+               } ;
+
+       printf ("Total         : %d\n", total) ;
+       printf ("Maximun value : %d\n", max) ;
+
+       sf_close (file) ;
+
+       return 0 ;
+} /* main */
+
index c464f08..b432e19 100644 (file)
@@ -19,6 +19,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdint.h>
 
 #include <sndfile.h>
 
index eac716e..572726f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-** Copyright (C) 2003-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2003-2016 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
@@ -88,7 +88,8 @@ main (int argc, char *argv [])
                } ;
 
        if (do_all || ! strcmp (argv [1], "aiff"))
-       {       string_start_end_test ("strings.aiff", SF_FORMAT_AIFF) ;
+       {       string_start_test ("strings.aiff", SF_FORMAT_AIFF) ;
+               string_start_end_test ("strings.aiff", SF_FORMAT_AIFF) ;
                /*
                TODO : Fix src/aiff.c so these tests pass.
                string_multi_set_test ("multi.aiff", SF_FORMAT_AIFF) ;
@@ -102,7 +103,7 @@ main (int argc, char *argv [])
                } ;
 
        if (do_all || ! strcmp (argv [1], "flac"))
-       {       if (HAVE_EXTERNAL_LIBS)
+       {       if (HAVE_EXTERNAL_XIPH_LIBS)
                        string_start_test ("strings.flac", SF_FORMAT_FLAC) ;
                else
                        puts ("    No FLAC tests because FLAC support was not compiled in.") ;
@@ -110,20 +111,48 @@ main (int argc, char *argv [])
                } ;
 
        if (do_all || ! strcmp (argv [1], "ogg"))
-       {       if (HAVE_EXTERNAL_LIBS)
+       {       if (HAVE_EXTERNAL_XIPH_LIBS)
                        string_start_test ("vorbis.oga", SF_FORMAT_OGG) ;
                else
                        puts ("    No Ogg/Vorbis tests because Ogg/Vorbis support was not compiled in.") ;
                test_count++ ;
                } ;
 
-       if (do_all || ! strcmp (argv [1], "rf64"))
-       {       puts ("\n\n     **** String test not working yet for RF64 format. ****\n") ;
+       if (do_all || ! strcmp (argv [1], "caf"))
+       {       string_start_test ("strings.caf", SF_FORMAT_CAF) ;
+               string_start_end_test ("strings.caf", SF_FORMAT_CAF) ;
+               string_multi_set_test ("multi.caf", SF_FORMAT_CAF) ;
                /*
+               TODO : Fix src/caf.c so these tests pass.
+               string_rdwr_test ("rdwr.caf", SF_FORMAT_CAF) ;
+               string_short_rdwr_test ("short_rdwr.caf", SF_FORMAT_CAF) ;
+               string_header_update ("header_update.caf", SF_FORMAT_CAF) ;
+               */
+               test_count++ ;
+               } ;
+
+       if (do_all || ! strcmp (argv [1], "rf64"))
+       {       string_start_test ("strings.rf64", SF_FORMAT_RF64) ;
                string_start_end_test ("strings.rf64", SF_FORMAT_RF64) ;
                string_multi_set_test ("multi.rf64", SF_FORMAT_RF64) ;
+               /*
+               TODO : Fix src/rf64.c so these tests pass.
                string_rdwr_test ("rdwr.rf64", SF_FORMAT_RF64) ;
                string_short_rdwr_test ("short_rdwr.rf64", SF_FORMAT_RF64) ;
+               string_header_update ("header_update.rf64", SF_FORMAT_RF64) ;
+               */
+               test_count++ ;
+               } ;
+
+       if (do_all || ! strcmp (argv [1], "w64"))
+       {       puts ("\n\n     **** String test not working yet for W64 format. ****\n") ;
+               /*
+               string_start_test ("strings.w64", SF_FORMAT_W64) ;
+               string_start_end_test ("strings.w64", SF_FORMAT_W64) ;
+               string_multi_set_test ("multi.w64", SF_FORMAT_W64) ;
+               string_rdwr_test ("rdwr.w64", SF_FORMAT_W64) ;
+               string_short_rdwr_test ("short_rdwr.w64", SF_FORMAT_W64) ;
+               string_header_update ("header_update.w64", SF_FORMAT_W64) ;
                */
                test_count++ ;
                } ;
@@ -268,6 +297,8 @@ string_start_end_test (const char *filename, int typemajor)
                case SF_FORMAT_WAV :
                case SF_FORMAT_WAVEX :
                case SF_ENDIAN_BIG | SF_FORMAT_WAV :
+               case SF_FORMAT_RF64 :
+                       /* These formats do not support the following. */
                        break ;
 
                default :
@@ -275,18 +306,18 @@ string_start_end_test (const char *filename, int typemajor)
                        if (cptr == NULL || strcmp (album, cptr) != 0)
                        {       if (errors++ == 0)
                                        puts ("\n") ;
-                               printf ("    Bad album   : %s\n", cptr) ;
+                               printf ("    Bad album     : %s\n", cptr) ;
                                } ;
 
                        cptr = sf_get_string (file, SF_STR_LICENSE) ;
                        if (cptr == NULL || strcmp (license, cptr) != 0)
                        {       if (errors++ == 0)
                                        puts ("\n") ;
-                               printf ("    Bad license : %s\n", cptr) ;
+                               printf ("    Bad license   : %s\n", cptr) ;
                                } ;
 
                        cptr = sf_get_string (file, SF_STR_TRACKNUMBER) ;
-                       if (cptr == NULL || strcmp (genre, cptr) != 0)
+                       if (cptr == NULL || strcmp (trackno, cptr) != 0)
                        {       if (errors++ == 0)
                                        puts ("\n") ;
                                printf ("    Bad track no. : %s\n", cptr) ;
@@ -377,7 +408,7 @@ string_start_test (const char *filename, int typemajor)
                printf ("    Bad software  : %s\n", cptr) ;
                } ;
 
-       if (str_count (cptr, "libsndfile") != 1)
+       if (cptr && str_count (cptr, "libsndfile") != 1)
        {       if (errors++ == 0)
                        puts ("\n") ;
                printf ("    Bad software  : %s\n", cptr) ;
@@ -415,7 +446,7 @@ string_start_test (const char *filename, int typemajor)
                        } ;
                } ;
 
-       if (typemajor != SF_FORMAT_WAV && typemajor != SF_FORMAT_AIFF)
+       if (typemajor != SF_FORMAT_WAV && typemajor != SF_FORMAT_AIFF && typemajor != SF_FORMAT_RF64)
        {       cptr = sf_get_string (file, SF_STR_LICENSE) ;
                if (cptr == NULL || strcmp (license, cptr) != 0)
                {       if (errors++ == 0)
index e743806..e58149c 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2008-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+# Copyright (C) 2008-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
 #
 # All rights reserved.
 #
@@ -53,7 +53,7 @@ if test -f libsndfile.so.$LIB_VERSION ; then
                fi
        fi
 
-sfversion=$(./sfversion@EXEEXT@ | sed "s/-exp$//")
+sfversion=$(./sfversion@EXEEXT@ | grep libsndfile | sed "s/-exp$//")
 
 if test "$sfversion" != libsndfile-$PACKAGE_VERSION ; then
        echo "Error : sfversion ($sfversion) and PACKAGE_VERSION ($PACKAGE_VERSION) don't match."
@@ -89,6 +89,7 @@ if test -x test_main@EXEEXT@ ; then
 ./command_test@EXEEXT@ peak
 ./command_test@EXEEXT@ trunc
 ./command_test@EXEEXT@ inst
+./command_test@EXEEXT@ cue
 ./command_test@EXEEXT@ current_sf_info
 ./command_test@EXEEXT@ bext
 ./command_test@EXEEXT@ bextch
@@ -161,6 +162,7 @@ echo "----------------------------------------------------------------------"
 ./peak_chunk_test@EXEEXT@ caf
 ./misc_test@EXEEXT@ caf
 ./chunk_test@EXEEXT@ caf
+./string_test@EXEEXT@ caf
 ./long_read_write_test@EXEEXT@ alac
 echo "----------------------------------------------------------------------"
 echo "  $sfversion passed tests on CAF files."
@@ -202,6 +204,9 @@ echo "----------------------------------------------------------------------"
 ./write_read_test@EXEEXT@ rf64
 ./header_test@EXEEXT@ rf64
 ./misc_test@EXEEXT@ rf64
+./string_test@EXEEXT@ rf64
+./peak_chunk_test@EXEEXT@ rf64
+./chunk_test@EXEEXT@ rf64
 echo "----------------------------------------------------------------------"
 echo "  $sfversion passed tests on RF64 files."
 echo "----------------------------------------------------------------------"
diff --git a/tests/utils.c b/tests/utils.c
deleted file mode 100644 (file)
index 18b4f36..0000000
+++ /dev/null
@@ -1,1150 +0,0 @@
-/*
-** Copyright (C) 2002-2015 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.
-*/
-
-/*
-**     Utility functions to make writing the test suite easier.
-**
-**     The .c and .h files were generated automagically with Autogen from
-**     the files utils.def and utils.tpl.
-*/
-
-
-
-#include "sfconfig.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if (HAVE_DECL_S_IRGRP == 0)
-#include <sf_unistd.h>
-#endif
-
-#include <errno.h>
-#include <string.h>
-#include <ctype.h>
-#include <math.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#include <sndfile.h>
-
-#include "utils.h"
-
-#ifndef        M_PI
-#define        M_PI            3.14159265358979323846264338
-#endif
-
-#define        LOG_BUFFER_SIZE         2048
-
-/*
-**     Neat solution to the Win32/OS2 binary file flage requirement.
-**     If O_BINARY isn't already defined by the inclusion of the system
-**     headers, set it to zero.
-*/
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
-
-
-void
-gen_windowed_sine_float (float *data, int len, double maximum)
-{      int k ;
-
-       memset (data, 0, len * sizeof (float)) ;
-
-       len = (5 * len) / 6 ;
-
-       for (k = 0 ; k < len ; k++)
-       {       data [k] = sin (2.0 * k * M_PI * 1.0 / 32.0 + 0.4) ;
-
-               /* Apply Hanning Window. */
-               data [k] *= maximum * (0.5 - 0.5 * cos (2.0 * M_PI * k / ((len) - 1))) ;
-               }
-
-       return ;
-} /* gen_windowed_sine_float */
-
-void
-gen_windowed_sine_double (double *data, int len, double maximum)
-{      int k ;
-
-       memset (data, 0, len * sizeof (double)) ;
-
-       len = (5 * len) / 6 ;
-
-       for (k = 0 ; k < len ; k++)
-       {       data [k] = sin (2.0 * k * M_PI * 1.0 / 32.0 + 0.4) ;
-
-               /* Apply Hanning Window. */
-               data [k] *= maximum * (0.5 - 0.5 * cos (2.0 * M_PI * k / ((len) - 1))) ;
-               }
-
-       return ;
-} /* gen_windowed_sine_double */
-
-
-void
-create_short_sndfile (const char *filename, int format, int channels)
-{      short data [2 * 3 * 4 * 5 * 6 * 7] = { 0, } ;
-       SNDFILE *file ;
-       SF_INFO sfinfo ;
-
-       sfinfo.samplerate = 44100 ;
-       sfinfo.channels = channels ;
-       sfinfo.format = format ;
-
-       if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) == NULL)
-       {       printf ("Error (%s, %d) : sf_open failed : %s\n", __FILE__, __LINE__, sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       sf_write_short (file, data, ARRAY_LEN (data)) ;
-
-       sf_close (file) ;
-} /* create_short_sndfile */
-
-void
-check_file_hash_or_die (const char *filename, uint64_t target_hash, int line_num)
-{      static unsigned char buf [4096] ;
-       uint64_t        cksum ;
-       FILE            *file ;
-       int                     k, read_count ;
-
-       memset (buf, 0, sizeof (buf)) ;
-
-       /* The 'b' in the mode string means binary for Win32. */
-       if ((file = fopen (filename, "rb")) == NULL)
-       {       printf ("\n\nLine %d: could not open file '%s'\n\n", line_num, filename) ;
-               exit (1) ;
-               } ;
-
-       cksum = 0 ;
-
-       while ((read_count = fread (buf, 1, sizeof (buf), file)))
-               for (k = 0 ; k < read_count ; k++)
-                       cksum = (cksum * 511 + buf [k]) & 0xfffffffffffff ;
-
-       fclose (file) ;
-
-       if (target_hash == 0)
-       {       printf (" 0x%" PRIx64 "\n", cksum) ;
-               return ;
-               } ;
-
-       if (cksum != target_hash)
-       {       printf ("\n\nLine %d: incorrect hash value 0x%" PRIx64 " should be 0x%" PRIx64 ".\n\n", line_num, cksum, target_hash) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* check_file_hash_or_die */
-
-void
-print_test_name (const char *test, const char *filename)
-{      int count ;
-
-       if (test == NULL)
-       {       printf (__FILE__ ": bad test of filename parameter.\n") ;
-               exit (1) ;
-               } ;
-
-       if (filename == NULL || strlen (filename) == 0)
-       {       printf ("    %-30s : ", test) ;
-               count = 25 ;
-               }
-       else
-       {       printf ("    %-30s : %s ", test, filename) ;
-               count = 24 - strlen (filename) ;
-               } ;
-
-       while (count -- > 0)
-               putchar ('.') ;
-       putchar (' ') ;
-
-       fflush (stdout) ;
-} /* print_test_name */
-
-void
-dump_data_to_file (const char *filename, const void *data, unsigned int datalen)
-{      FILE *file ;
-
-       if ((file = fopen (filename, "wb")) == NULL)
-       {       printf ("\n\nLine %d : could not open file : %s\n\n", __LINE__, filename) ;
-               exit (1) ;
-               } ;
-
-       if (fwrite (data, 1, datalen, file) != datalen)
-       {       printf ("\n\nLine %d : fwrite failed.\n\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       fclose (file) ;
-
-} /* dump_data_to_file */
-
-/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-*/
-
-static char octfilename [] = "error.dat" ;
-
-int
-oct_save_short (const short *a, const short *b, int len)
-{      FILE    *file ;
-       int             k ;
-
-       if (! (file = fopen (octfilename, "w")))
-               return 1 ;
-
-       fprintf (file, "# Not created by Octave\n") ;
-
-       fprintf (file, "# name: a\n") ;
-       fprintf (file, "# type: matrix\n") ;
-       fprintf (file, "# rows: %d\n", len) ;
-       fprintf (file, "# columns: 1\n") ;
-
-       for (k = 0 ; k < len ; k++)
-               fprintf (file, "% d" "\n", a [k]) ;
-
-       fprintf (file, "# name: b\n") ;
-       fprintf (file, "# type: matrix\n") ;
-       fprintf (file, "# rows: %d\n", len) ;
-       fprintf (file, "# columns: 1\n") ;
-
-       for (k = 0 ; k < len ; k++)
-               fprintf (file, "% d" "\n", b [k]) ;
-
-       fclose (file) ;
-       return 0 ;
-} /* oct_save_short */
-int
-oct_save_int   (const int *a, const int *b, int len)
-{      FILE    *file ;
-       int             k ;
-
-       if (! (file = fopen (octfilename, "w")))
-               return 1 ;
-
-       fprintf (file, "# Not created by Octave\n") ;
-
-       fprintf (file, "# name: a\n") ;
-       fprintf (file, "# type: matrix\n") ;
-       fprintf (file, "# rows: %d\n", len) ;
-       fprintf (file, "# columns: 1\n") ;
-
-       for (k = 0 ; k < len ; k++)
-               fprintf (file, "% d" "\n", a [k]) ;
-
-       fprintf (file, "# name: b\n") ;
-       fprintf (file, "# type: matrix\n") ;
-       fprintf (file, "# rows: %d\n", len) ;
-       fprintf (file, "# columns: 1\n") ;
-
-       for (k = 0 ; k < len ; k++)
-               fprintf (file, "% d" "\n", b [k]) ;
-
-       fclose (file) ;
-       return 0 ;
-} /* oct_save_int */
-int
-oct_save_float (const float *a, const float *b, int len)
-{      FILE    *file ;
-       int             k ;
-
-       if (! (file = fopen (octfilename, "w")))
-               return 1 ;
-
-       fprintf (file, "# Not created by Octave\n") ;
-
-       fprintf (file, "# name: a\n") ;
-       fprintf (file, "# type: matrix\n") ;
-       fprintf (file, "# rows: %d\n", len) ;
-       fprintf (file, "# columns: 1\n") ;
-
-       for (k = 0 ; k < len ; k++)
-               fprintf (file, "% g" "\n", a [k]) ;
-
-       fprintf (file, "# name: b\n") ;
-       fprintf (file, "# type: matrix\n") ;
-       fprintf (file, "# rows: %d\n", len) ;
-       fprintf (file, "# columns: 1\n") ;
-
-       for (k = 0 ; k < len ; k++)
-               fprintf (file, "% g" "\n", b [k]) ;
-
-       fclose (file) ;
-       return 0 ;
-} /* oct_save_float */
-int
-oct_save_double        (const double *a, const double *b, int len)
-{      FILE    *file ;
-       int             k ;
-
-       if (! (file = fopen (octfilename, "w")))
-               return 1 ;
-
-       fprintf (file, "# Not created by Octave\n") ;
-
-       fprintf (file, "# name: a\n") ;
-       fprintf (file, "# type: matrix\n") ;
-       fprintf (file, "# rows: %d\n", len) ;
-       fprintf (file, "# columns: 1\n") ;
-
-       for (k = 0 ; k < len ; k++)
-               fprintf (file, "% g" "\n", a [k]) ;
-
-       fprintf (file, "# name: b\n") ;
-       fprintf (file, "# type: matrix\n") ;
-       fprintf (file, "# rows: %d\n", len) ;
-       fprintf (file, "# columns: 1\n") ;
-
-       for (k = 0 ; k < len ; k++)
-               fprintf (file, "% g" "\n", b [k]) ;
-
-       fclose (file) ;
-       return 0 ;
-} /* oct_save_double */
-
-
-void
-check_log_buffer_or_die (SNDFILE *file, int line_num)
-{      static char     buffer [LOG_BUFFER_SIZE] ;
-       int                     count ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Get the log buffer data. */
-       count = sf_command      (file, SFC_GET_LOG_INFO, buffer, LOG_BUFFER_SIZE) ;
-
-       if (LOG_BUFFER_SIZE - count < 2)
-       {       printf ("\n\nLine %d : Possible long log buffer.\n", line_num) ;
-               exit (1) ;
-               }
-
-       /* Look for "Should" */
-       if (strstr (buffer, "ould"))
-       {       printf ("\n\nLine %d : Log buffer contains `ould'. Dumping.\n", line_num) ;
-               puts (buffer) ;
-               exit (1) ;
-               } ;
-
-       /* Look for "**" */
-       if (strstr (buffer, "*"))
-       {       printf ("\n\nLine %d : Log buffer contains `*'. Dumping.\n", line_num) ;
-               puts (buffer) ;
-               exit (1) ;
-               } ;
-
-       /* Look for "Should" */
-       if (strstr (buffer, "nknown marker"))
-       {       printf ("\n\nLine %d : Log buffer contains `nknown marker'. Dumping.\n", line_num) ;
-               puts (buffer) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* check_log_buffer_or_die */
-
-int
-string_in_log_buffer (SNDFILE *file, const char *s)
-{      static char     buffer [LOG_BUFFER_SIZE] ;
-       int                     count ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Get the log buffer data. */
-       count = sf_command      (file, SFC_GET_LOG_INFO, buffer, LOG_BUFFER_SIZE) ;
-
-       if (LOG_BUFFER_SIZE - count < 2)
-       {       printf ("Possible long log buffer.\n") ;
-               exit (1) ;
-               }
-
-       /* Look for string */
-       return strstr (buffer, s) ? SF_TRUE : SF_FALSE ;
-} /* string_in_log_buffer */
-
-void
-hexdump_file (const char * filename, sf_count_t offset, sf_count_t length)
-{
-       FILE * file ;
-       char buffer [16] ;
-       int k, m, ch, readcount ;
-
-       if (length > 1000000)
-       {       printf ("\n\nError : length (%" PRId64 ") too long.\n\n", offset) ;
-               exit (1) ;
-               } ;
-
-       if ((file = fopen (filename, "r")) == NULL)
-       {       printf ("\n\nError : hexdump_file (%s) could not open file for read.\n\n", filename) ;
-               exit (1) ;
-               } ;
-
-       if (fseek (file, offset, SEEK_SET) != 0)
-       {       printf ("\n\nError : fseek(file, %" PRId64 ", SEEK_SET) failed : %s\n\n", offset, strerror (errno)) ;
-               exit (1) ;
-               } ;
-
-       puts ("\n\n") ;
-
-       for (k = 0 ; k < length ; k+= sizeof (buffer))
-       {       readcount = fread (buffer, 1, sizeof (buffer), file) ;
-
-               printf ("%08" PRIx64 " : ", offset + k) ;
-
-               for (m = 0 ; m < readcount ; m++)
-                       printf ("%02x ", buffer [m] & 0xFF) ;
-
-               for (m = readcount ; m < SIGNED_SIZEOF (buffer) ; m++)
-                       printf ("   ") ;
-
-               printf ("  ") ;
-               for (m = 0 ; m < readcount ; m++)
-               {       ch = isprint (buffer [m]) ? buffer [m] : '.' ;
-                       putchar (ch) ;
-                       } ;
-
-               if (readcount < SIGNED_SIZEOF (buffer))
-                       break ;
-
-               putchar ('\n') ;
-               } ;
-
-       puts ("\n") ;
-
-       fclose (file) ;
-} /* hexdump_file */
-
-void
-dump_log_buffer (SNDFILE *file)
-{      static char     buffer [LOG_BUFFER_SIZE] ;
-
-       memset (buffer, 0, sizeof (buffer)) ;
-
-       /* Get the log buffer data. */
-       sf_command      (file, SFC_GET_LOG_INFO, buffer, LOG_BUFFER_SIZE) ;
-
-       if (strlen (buffer) < 1)
-               puts ("Log buffer empty.\n") ;
-       else
-               puts (buffer) ;
-
-       return ;
-} /* dump_log_buffer */
-
-SNDFILE *
-test_open_file_or_die (const char *filename, int mode, SF_INFO *sfinfo, int allow_fd, int line_num)
-{      static int count = 0 ;
-
-       SNDFILE *file ;
-       const char *modestr, *func_name ;
-       int oflags = 0, omode = 0, err ;
-
-       /*
-       ** Need to test both sf_open() and sf_open_fd().
-       ** Do so alternately.
-       */
-       switch (mode)
-       {       case SFM_READ :
-                               modestr = "SFM_READ" ;
-                               oflags = O_RDONLY | O_BINARY ;
-                               omode = 0 ;
-                               break ;
-
-               case SFM_WRITE :
-                               modestr = "SFM_WRITE" ;
-                               oflags = O_WRONLY | O_CREAT | O_TRUNC | O_BINARY ;
-                               omode = S_IRUSR | S_IWUSR | S_IRGRP ;
-                               break ;
-
-               case SFM_RDWR :
-                               modestr = "SFM_RDWR" ;
-                               oflags = O_RDWR | O_CREAT | O_BINARY ;
-                               omode = S_IRUSR | S_IWUSR | S_IRGRP ;
-                               break ;
-               default :
-                               printf ("\n\nLine %d: Bad mode.\n", line_num) ;
-                               fflush (stdout) ;
-                               exit (1) ;
-               } ;
-
-       if (OS_IS_WIN32)
-       {       /* Windows does not understand and ignores the S_IRGRP flag, but Wine
-               ** gives a run time warning message, so just clear it.
-               */
-               omode &= ~S_IRGRP ;
-               } ;
-
-       if (allow_fd && ((++count) & 1) == 1)
-       {       int fd ;
-
-               /* Only use the three argument open() function if omode != 0. */
-               fd = (omode == 0) ? open (filename, oflags) : open (filename, oflags, omode) ;
-
-               if (fd < 0)
-               {       printf ("\n\n%s : open failed : %s\n", __func__, strerror (errno)) ;
-                       exit (1) ;
-                       } ;
-
-               func_name = "sf_open_fd" ;
-               file = sf_open_fd (fd, mode, sfinfo, SF_TRUE) ;
-               }
-       else
-       {       func_name = "sf_open" ;
-               file = sf_open (filename, mode, sfinfo) ;
-               } ;
-
-       if (file == NULL)
-       {       printf ("\n\nLine %d: %s (%s) failed : %s\n\n", line_num, func_name, modestr, sf_strerror (NULL)) ;
-               dump_log_buffer (file) ;
-               exit (1) ;
-               } ;
-
-       err = sf_error (file) ;
-       if (err != SF_ERR_NO_ERROR)
-       {       printf ("\n\nLine %d : sf_error : %s\n\n", line_num, sf_error_number (err)) ;
-               dump_log_buffer (file) ;
-               exit (1) ;
-               } ;
-
-       return file ;
-} /* test_open_file_or_die */
-
-void
-test_read_write_position_or_die (SNDFILE *file, int line_num, int pass, sf_count_t read_pos, sf_count_t write_pos)
-{      sf_count_t pos ;
-
-       /* Check the current read position. */
-       if (read_pos >= 0 && (pos = sf_seek (file, 0, SEEK_CUR | SFM_READ)) != read_pos)
-       {       printf ("\n\nLine %d ", line_num) ;
-               if (pass > 0)
-                       printf ("(pass %d): ", pass) ;
-               printf ("Read position (%" PRId64 ") should be %" PRId64 ".\n", pos, read_pos) ;
-               exit (1) ;
-               } ;
-
-       /* Check the current write position. */
-       if (write_pos >= 0 && (pos = sf_seek (file, 0, SEEK_CUR | SFM_WRITE)) != write_pos)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : Write position (%" PRId64 ") should be %" PRId64 ".\n", pos, write_pos) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_read_write_position */
-
-void
-test_seek_or_die (SNDFILE *file, sf_count_t offset, int whence, sf_count_t new_pos, int channels, int line_num)
-{      sf_count_t      position ;
-       const char      *channel_name, *whence_name ;
-
-       switch (whence)
-       {       case SEEK_SET :
-                               whence_name = "SEEK_SET" ;
-                               break ;
-               case SEEK_CUR :
-                               whence_name = "SEEK_CUR" ;
-                               break ;
-               case SEEK_END :
-                               whence_name = "SEEK_END" ;
-                               break ;
-
-               /* SFM_READ */
-               case SEEK_SET | SFM_READ :
-                               whence_name = "SFM_READ | SEEK_SET" ;
-                               break ;
-               case SEEK_CUR | SFM_READ :
-                               whence_name = "SFM_READ | SEEK_CUR" ;
-                               break ;
-               case SEEK_END | SFM_READ :
-                               whence_name = "SFM_READ | SEEK_END" ;
-                               break ;
-
-               /* SFM_WRITE */
-               case SEEK_SET | SFM_WRITE :
-                               whence_name = "SFM_WRITE | SEEK_SET" ;
-                               break ;
-               case SEEK_CUR | SFM_WRITE :
-                               whence_name = "SFM_WRITE | SEEK_CUR" ;
-                               break ;
-               case SEEK_END | SFM_WRITE :
-                               whence_name = "SFM_WRITE | SEEK_END" ;
-                               break ;
-
-               default :
-                               printf ("\n\nLine %d: bad whence parameter.\n", line_num) ;
-                               exit (1) ;
-               } ;
-
-       channel_name = (channels == 1) ? "Mono" : "Stereo" ;
-
-       if ((position = sf_seek (file, offset, whence)) != new_pos)
-       {       printf ("\n\nLine %d : %s : sf_seek (file, %" PRId64 ", %s) returned %" PRId64 " (should be %" PRId64 ").\n\n",
-                                       line_num, channel_name, offset, whence_name, position, new_pos) ;
-               exit (1) ;
-               } ;
-
-} /* test_seek_or_die */
-
-
-
-void
-test_read_short_or_die (SNDFILE *file, int pass, short *test, sf_count_t items, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_read_short (file, test, items)) != items)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_read_short failed with short read (%" PRId64 " => %" PRId64 ").\n",
-                                               items, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_read_short_or_die */
-
-void
-test_read_int_or_die (SNDFILE *file, int pass, int *test, sf_count_t items, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_read_int (file, test, items)) != items)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_read_int failed with short read (%" PRId64 " => %" PRId64 ").\n",
-                                               items, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_read_int_or_die */
-
-void
-test_read_float_or_die (SNDFILE *file, int pass, float *test, sf_count_t items, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_read_float (file, test, items)) != items)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_read_float failed with short read (%" PRId64 " => %" PRId64 ").\n",
-                                               items, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_read_float_or_die */
-
-void
-test_read_double_or_die (SNDFILE *file, int pass, double *test, sf_count_t items, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_read_double (file, test, items)) != items)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_read_double failed with short read (%" PRId64 " => %" PRId64 ").\n",
-                                               items, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_read_double_or_die */
-
-
-void
-test_readf_short_or_die (SNDFILE *file, int pass, short *test, sf_count_t frames, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_readf_short (file, test, frames)) != frames)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_readf_short failed with short readf (%" PRId64 " => %" PRId64 ").\n",
-                                               frames, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_readf_short_or_die */
-
-void
-test_readf_int_or_die (SNDFILE *file, int pass, int *test, sf_count_t frames, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_readf_int (file, test, frames)) != frames)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_readf_int failed with short readf (%" PRId64 " => %" PRId64 ").\n",
-                                               frames, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_readf_int_or_die */
-
-void
-test_readf_float_or_die (SNDFILE *file, int pass, float *test, sf_count_t frames, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_readf_float (file, test, frames)) != frames)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_readf_float failed with short readf (%" PRId64 " => %" PRId64 ").\n",
-                                               frames, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_readf_float_or_die */
-
-void
-test_readf_double_or_die (SNDFILE *file, int pass, double *test, sf_count_t frames, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_readf_double (file, test, frames)) != frames)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_readf_double failed with short readf (%" PRId64 " => %" PRId64 ").\n",
-                                               frames, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_readf_double_or_die */
-
-
-void
-test_read_raw_or_die (SNDFILE *file, int pass, void *test, sf_count_t items, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_read_raw (file, test, items)) != items)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_read_raw failed with short read (%" PRId64 " => %" PRId64 ").\n", items, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_read_raw_or_die */
-
-
-
-void
-test_write_short_or_die (SNDFILE *file, int pass, const short *test, sf_count_t items, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_write_short (file, test, items)) != items)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_write_short failed with short write (%" PRId64 " => %" PRId64 ").\n",
-                                               items, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_write_short_or_die */
-
-void
-test_write_int_or_die (SNDFILE *file, int pass, const int *test, sf_count_t items, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_write_int (file, test, items)) != items)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_write_int failed with short write (%" PRId64 " => %" PRId64 ").\n",
-                                               items, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_write_int_or_die */
-
-void
-test_write_float_or_die (SNDFILE *file, int pass, const float *test, sf_count_t items, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_write_float (file, test, items)) != items)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_write_float failed with short write (%" PRId64 " => %" PRId64 ").\n",
-                                               items, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_write_float_or_die */
-
-void
-test_write_double_or_die (SNDFILE *file, int pass, const double *test, sf_count_t items, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_write_double (file, test, items)) != items)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_write_double failed with short write (%" PRId64 " => %" PRId64 ").\n",
-                                               items, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_write_double_or_die */
-
-
-void
-test_writef_short_or_die (SNDFILE *file, int pass, const short *test, sf_count_t frames, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_writef_short (file, test, frames)) != frames)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_writef_short failed with short writef (%" PRId64 " => %" PRId64 ").\n",
-                                               frames, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_writef_short_or_die */
-
-void
-test_writef_int_or_die (SNDFILE *file, int pass, const int *test, sf_count_t frames, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_writef_int (file, test, frames)) != frames)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_writef_int failed with short writef (%" PRId64 " => %" PRId64 ").\n",
-                                               frames, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_writef_int_or_die */
-
-void
-test_writef_float_or_die (SNDFILE *file, int pass, const float *test, sf_count_t frames, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_writef_float (file, test, frames)) != frames)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_writef_float failed with short writef (%" PRId64 " => %" PRId64 ").\n",
-                                               frames, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_writef_float_or_die */
-
-void
-test_writef_double_or_die (SNDFILE *file, int pass, const double *test, sf_count_t frames, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_writef_double (file, test, frames)) != frames)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_writef_double failed with short writef (%" PRId64 " => %" PRId64 ").\n",
-                                               frames, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_writef_double_or_die */
-
-
-void
-test_write_raw_or_die (SNDFILE *file, int pass, const void *test, sf_count_t items, int line_num)
-{      sf_count_t count ;
-
-       if ((count = sf_write_raw (file, test, items)) != items)
-       {       printf ("\n\nLine %d", line_num) ;
-               if (pass > 0)
-                       printf (" (pass %d)", pass) ;
-               printf (" : sf_write_raw failed with short write (%" PRId64 " => %" PRId64 ").\n", items, count) ;
-               fflush (stdout) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       return ;
-} /* test_write_raw_or_die */
-
-
-void
-compare_short_or_die (const short *expected, const short *actual, unsigned count, int line_num)
-{
-       unsigned k ;
-
-       for (k = 0 ; k < count ; k++)
-               if (expected [k] != actual [k])
-               {       printf ("\n\nLine %d : Error at index %d, got " "% d" ", should be " "% d" ".\n\n", line_num, k, actual [k], expected [k]) ;
-                       exit (1) ;
-                       } ;
-
-       return ;
-} /* compare_short_or_die */
-void
-compare_int_or_die (const int *expected, const int *actual, unsigned count, int line_num)
-{
-       unsigned k ;
-
-       for (k = 0 ; k < count ; k++)
-               if (expected [k] != actual [k])
-               {       printf ("\n\nLine %d : Error at index %d, got " "% d" ", should be " "% d" ".\n\n", line_num, k, actual [k], expected [k]) ;
-                       exit (1) ;
-                       } ;
-
-       return ;
-} /* compare_int_or_die */
-void
-compare_float_or_die (const float *expected, const float *actual, unsigned count, int line_num)
-{
-       unsigned k ;
-
-       for (k = 0 ; k < count ; k++)
-               if (expected [k] != actual [k])
-               {       printf ("\n\nLine %d : Error at index %d, got " "% g" ", should be " "% g" ".\n\n", line_num, k, actual [k], expected [k]) ;
-                       exit (1) ;
-                       } ;
-
-       return ;
-} /* compare_float_or_die */
-void
-compare_double_or_die (const double *expected, const double *actual, unsigned count, int line_num)
-{
-       unsigned k ;
-
-       for (k = 0 ; k < count ; k++)
-               if (expected [k] != actual [k])
-               {       printf ("\n\nLine %d : Error at index %d, got " "% g" ", should be " "% g" ".\n\n", line_num, k, actual [k], expected [k]) ;
-                       exit (1) ;
-                       } ;
-
-       return ;
-} /* compare_double_or_die */
-
-
-
-void
-delete_file (int format, const char *filename)
-{      char rsrc_name [512], *fname ;
-
-       unlink (filename) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_SD2)
-               return ;
-
-       /*
-       ** Now try for a resource fork stored as a separate file.
-       ** Grab the un-adulterated filename again.
-       */
-       snprintf (rsrc_name, sizeof (rsrc_name), "%s", filename) ;
-
-       if ((fname = strrchr (rsrc_name, '/')) != NULL)
-               fname ++ ;
-       else if ((fname = strrchr (rsrc_name, '\\')) != NULL)
-               fname ++ ;
-       else
-               fname = rsrc_name ;
-
-       memmove (fname + 2, fname, strlen (fname) + 1) ;
-       fname [0] = '.' ;
-       fname [1] = '_' ;
-
-       unlink (rsrc_name) ;
-} /* delete_file */
-
-static int allowed_open_files = -1 ;
-
-void
-count_open_files (void)
-{
-#if OS_IS_WIN32
-       return ;
-#else
-       int k, count = 0 ;
-       struct stat statbuf ;
-
-       if (allowed_open_files > 0)
-               return ;
-
-       for (k = 0 ; k < 1024 ; k++)
-               if (fstat (k, &statbuf) == 0)
-                       count ++ ;
-
-       allowed_open_files = count ;
-#endif
-} /* count_open_files */
-
-void
-increment_open_file_count (void)
-{      allowed_open_files ++ ;
-} /* increment_open_file_count */
-
-void
-check_open_file_count_or_die (int lineno)
-{
-#if OS_IS_WIN32
-       (void) lineno ;
-       return ;
-#else
-       int k, count = 0 ;
-       struct stat statbuf ;
-
-       if (allowed_open_files < 0)
-               count_open_files () ;
-
-       for (k = 0 ; k < 1024 ; k++)
-               if (fstat (k, &statbuf) == 0)
-                       count ++ ;
-
-       if (count > allowed_open_files)
-       {       printf ("\nLine %d : number of open files (%d) > allowed (%d).\n\n", lineno, count, allowed_open_files) ;
-               exit (1) ;
-               } ;
-#endif
-} /* check_open_file_count_or_die */
-
-void
-write_mono_file (const char * filename, int format, int srate, float * output, int len)
-{      SNDFILE * file ;
-       SF_INFO sfinfo ;
-
-       memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       sfinfo.samplerate = srate ;
-       sfinfo.channels = 1 ;
-       sfinfo.format = format ;
-
-       if ((file = sf_open (filename, SFM_WRITE, &sfinfo)) == NULL)
-       {       printf ("sf_open (%s) : %s\n", filename, sf_strerror (NULL)) ;
-               exit (1) ;
-               } ;
-
-       sf_write_float (file, output, len) ;
-
-       sf_close (file) ;
-} /* write_mono_file */
-
-void
-gen_lowpass_signal_float (float *data, int len)
-{      int64_t value = 0x1243456 ;
-       double sample, last_val = 0.0 ;
-       int k ;
-
-       for (k = 0 ; k < len ; k++)
-       {       /* Not a crypto quality RNG. */
-               value = (11117 * value + 211231) & 0xffffffff ;
-               value = (11117 * value + 211231) & 0xffffffff ;
-               value = (11117 * value + 211231) & 0xffffffff ;
-
-               sample = value / (0x7fffffff * 1.000001) ;
-               sample = 0.2 * sample - 0.9 * last_val ;
-
-               last_val = sample ;
-
-               data [k] = 0.5 * (sample + sin (2.0 * k * M_PI * 1.0 / 32.0)) ;
-               } ;
-
-} /* gen_lowpass_signal_float */
-
-
-/*
-**     Windows is fucked.
-**     If a file is opened R/W and data is written to it, then fstat will return
-**     the correct file length, but stat will return zero.
-*/
-
-sf_count_t
-file_length (const char * fname)
-{      struct stat data ;
-
-       if (stat (fname, &data) != 0)
-               return 0 ;
-
-       return (sf_count_t) data.st_size ;
-} /* file_length */
-
-sf_count_t
-file_length_fd (int fd)
-{      struct stat data ;
-
-       memset (&data, 0, sizeof (data)) ;
-       if (fstat (fd, &data) != 0)
-               return 0 ;
-
-       return (sf_count_t) data.st_size ;
-} /* file_length_fd */
-
-
-
-
diff --git a/tests/utils.h b/tests/utils.h
deleted file mode 100644 (file)
index 7c1c370..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
-** Copyright (C) 2002-2015 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.
-*/
-
-/*
-**     Utility functions to make writing the test suite easier.
-**
-**     The .c and .h files were generated automagically with Autogen from
-**     the files utils.def and utils.tpl.
-*/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <stdint.h>
-#include <stdarg.h>
-
-#define        ARRAY_LEN(x)            ((int) (sizeof (x)) / (sizeof ((x) [0])))
-#define SIGNED_SIZEOF(x)       ((int64_t) (sizeof (x)))
-#define        NOT(x)                          (! (x))
-#define        ABS(x)                          ((x) >= 0 ? (x) : -(x))
-
-#define        PIPE_INDEX(x)   ((x) + 500)
-#define        PIPE_TEST_LEN   12345
-
-
-void gen_windowed_sine_float (float *data, int len, double maximum) ;
-void gen_windowed_sine_double (double *data, int len, double maximum) ;
-
-
-void   create_short_sndfile (const char *filename, int format, int channels) ;
-
-void   check_file_hash_or_die  (const char *filename, uint64_t target_hash, int line_num) ;
-
-void   print_test_name (const char *test, const char *filename) ;
-
-void   dump_data_to_file (const char *filename, const void *data, unsigned int datalen) ;
-
-void   write_mono_file (const char * filename, int format, int srate, float * output, int len) ;
-
-#ifdef __GNUC__
-static inline void
-exit_if_true (int test, const char *format, ...)
-#if (defined (__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO)
-       __attribute__ ((format (gnu_printf, 2, 3))) ;
-#else
-       __attribute__ ((format (printf, 2, 3))) ;
-#endif
-#endif
-
-static inline void
-exit_if_true (int test, const char *format, ...)
-{      if (test)
-       {       va_list argptr ;
-               va_start (argptr, format) ;
-               vprintf (format, argptr) ;
-               va_end (argptr) ;
-               exit (1) ;
-               } ;
-} /* exit_if_true */
-
-static inline int32_t
-arith_shift_left (int32_t x, int shift)
-{      return (int32_t) (((uint32_t) x) << shift) ;
-} /* arith_shift_left */
-
-/*
-**     Functions for saving two vectors of data in an ascii text file which
-**     can then be loaded into GNU octave for comparison.
-*/
-
-int    oct_save_short  (const short *a, const short *b, int len) ;
-int    oct_save_int    (const int *a, const int *b, int len) ;
-int    oct_save_float  (const float *a, const float *b, int len) ;
-int    oct_save_double (const double *a, const double *b, int len) ;
-
-
-void   delete_file (int format, const char *filename) ;
-
-void   count_open_files (void) ;
-void   increment_open_file_count (void) ;
-void   check_open_file_count_or_die (int lineno) ;
-
-#ifdef SNDFILE_H
-
-static inline void
-sf_info_clear (SF_INFO * info)
-{      memset (info, 0, sizeof (SF_INFO)) ;
-} /* sf_info_clear */
-
-static inline void
-sf_info_setup (SF_INFO * info, int format, int samplerate, int channels)
-{      sf_info_clear (info) ;
-
-       info->format = format ;
-       info->samplerate = samplerate ;
-       info->channels = channels ;
-} /* sf_info_setup */
-
-
-void   dump_log_buffer (SNDFILE *file) ;
-void   check_log_buffer_or_die (SNDFILE *file, int line_num) ;
-int    string_in_log_buffer (SNDFILE *file, const char *s) ;
-void   hexdump_file (const char * filename, sf_count_t offset, sf_count_t length) ;
-
-
-SNDFILE *test_open_file_or_die
-                       (const char *filename, int mode, SF_INFO *sfinfo, int allow_fd, int line_num) ;
-
-void   test_read_write_position_or_die
-                       (SNDFILE *file, int line_num, int pass, sf_count_t read_pos, sf_count_t write_pos) ;
-
-void   test_seek_or_die
-                       (SNDFILE *file, sf_count_t offset, int whence, sf_count_t new_pos, int channels, int line_num) ;
-
-
-void   test_read_short_or_die
-                       (SNDFILE *file, int pass, short *test, sf_count_t items, int line_num) ;
-void   test_read_int_or_die
-                       (SNDFILE *file, int pass, int *test, sf_count_t items, int line_num) ;
-void   test_read_float_or_die
-                       (SNDFILE *file, int pass, float *test, sf_count_t items, int line_num) ;
-void   test_read_double_or_die
-                       (SNDFILE *file, int pass, double *test, sf_count_t items, int line_num) ;
-
-void   test_readf_short_or_die
-                       (SNDFILE *file, int pass, short *test, sf_count_t frames, int line_num) ;
-void   test_readf_int_or_die
-                       (SNDFILE *file, int pass, int *test, sf_count_t frames, int line_num) ;
-void   test_readf_float_or_die
-                       (SNDFILE *file, int pass, float *test, sf_count_t frames, int line_num) ;
-void   test_readf_double_or_die
-                       (SNDFILE *file, int pass, double *test, sf_count_t frames, int line_num) ;
-
-
-void
-test_read_raw_or_die (SNDFILE *file, int pass, void *test, sf_count_t items, int line_num) ;
-
-
-void   test_write_short_or_die
-                       (SNDFILE *file, int pass, const short *test, sf_count_t items, int line_num) ;
-void   test_write_int_or_die
-                       (SNDFILE *file, int pass, const int *test, sf_count_t items, int line_num) ;
-void   test_write_float_or_die
-                       (SNDFILE *file, int pass, const float *test, sf_count_t items, int line_num) ;
-void   test_write_double_or_die
-                       (SNDFILE *file, int pass, const double *test, sf_count_t items, int line_num) ;
-
-void   test_writef_short_or_die
-                       (SNDFILE *file, int pass, const short *test, sf_count_t frames, int line_num) ;
-void   test_writef_int_or_die
-                       (SNDFILE *file, int pass, const int *test, sf_count_t frames, int line_num) ;
-void   test_writef_float_or_die
-                       (SNDFILE *file, int pass, const float *test, sf_count_t frames, int line_num) ;
-void   test_writef_double_or_die
-                       (SNDFILE *file, int pass, const double *test, sf_count_t frames, int line_num) ;
-
-
-void
-test_write_raw_or_die (SNDFILE *file, int pass, const void *test, sf_count_t items, int line_num) ;
-
-void compare_short_or_die (const short *expected, const short *actual, unsigned count, int line_num) ;
-void compare_int_or_die (const int *expected, const int *actual, unsigned count, int line_num) ;
-void compare_float_or_die (const float *expected, const float *actual, unsigned count, int line_num) ;
-void compare_double_or_die (const double *expected, const double *actual, unsigned count, int line_num) ;
-
-
-
-void   gen_lowpass_signal_float (float *data, int len) ;
-
-sf_count_t             file_length (const char * fname) ;
-sf_count_t             file_length_fd (int fd) ;
-
-#endif
-
-#ifdef __cplusplus
-}              /* extern "C" */
-#endif /* __cplusplus */
-
-
-
index 35aaaf3..096b758 100644 (file)
@@ -1,6 +1,6 @@
 [+ AutoGen5 template h c +]
 /*
-** Copyright (C) 2002-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 2002-2016 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
@@ -96,6 +96,8 @@ arith_shift_left (int32_t x, int shift)
 
 void   delete_file (int format, const char *filename) ;
 
+int            truncate_file_to_zero (const char *fname) ;
+
 void   count_open_files (void) ;
 void   increment_open_file_count (void) ;
 void   check_open_file_count_or_die (int lineno) ;
@@ -122,6 +124,7 @@ void        check_log_buffer_or_die (SNDFILE *file, int line_num) ;
 int    string_in_log_buffer (SNDFILE *file, const char *s) ;
 void   hexdump_file (const char * filename, sf_count_t offset, sf_count_t length) ;
 
+void   test_sf_format_or_die   (const SF_INFO *info, int line_num) ;
 
 SNDFILE *test_open_file_or_die
                        (const char *filename, int mode, SF_INFO *sfinfo, int allow_fd, int line_num) ;
@@ -492,6 +495,18 @@ dump_log_buffer (SNDFILE *file)
        return ;
 } /* dump_log_buffer */
 
+void
+test_sf_format_or_die (const SF_INFO *info, int line_num)
+{      int res ;
+
+       if ((res = sf_format_check (info)) != 1)
+       {       printf ("\n\nLine %d : sf_format_check returned error (%d)\n\n", line_num,res) ;
+               exit (1) ;
+               } ;
+
+       return ;
+} /* test_sf_format_or_die */
+
 SNDFILE *
 test_open_file_or_die (const char *filename, int mode, SF_INFO *sfinfo, int allow_fd, int line_num)
 {      static int count = 0 ;
@@ -771,6 +786,17 @@ delete_file (int format, const char *filename)
        unlink (rsrc_name) ;
 } /* delete_file */
 
+int
+truncate_file_to_zero (const char * fname)
+{      FILE * file ;
+
+       if ((file = fopen (fname, "w")) == NULL)
+               return errno ;
+       fclose (file) ;
+
+       return 0 ;
+} /* truncate_file_to_zero */
+
 static int allowed_open_files = -1 ;
 
 void
diff --git a/tests/write_read_test.c b/tests/write_read_test.c
deleted file mode 100644 (file)
index f733cee..0000000
+++ /dev/null
@@ -1,4522 +0,0 @@
-/*
-** Copyright (C) 1999-2014 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 "sfconfig.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <inttypes.h>
-
-
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <sndfile.h>
-
-#include "utils.h"
-#include "generate.h"
-
-#define        SAMPLE_RATE                     11025
-#define        DATA_LENGTH                     (1 << 12)
-
-#define        SILLY_WRITE_COUNT       (234)
-
-static void    pcm_test_char (const char *str, int format, int long_file_ok) ;
-static void    pcm_test_short (const char *str, int format, int long_file_ok) ;
-static void    pcm_test_20bit (const char *str, int format, int long_file_ok) ;
-static void    pcm_test_24bit (const char *str, int format, int long_file_ok) ;
-static void    pcm_test_int (const char *str, int format, int long_file_ok) ;
-static void    pcm_test_float (const char *str, int format, int long_file_ok) ;
-static void    pcm_test_double (const char *str, int format, int long_file_ok) ;
-
-static void empty_file_test (const char *filename, int format) ;
-
-typedef union
-{      double d [DATA_LENGTH] ;
-       float f [DATA_LENGTH] ;
-       int i [DATA_LENGTH] ;
-       short s [DATA_LENGTH] ;
-       char c [DATA_LENGTH] ;
-} BUFFER ;
-
-static BUFFER  orig_data ;
-static BUFFER  test_data ;
-
-int
-main (int argc, char **argv)
-{      int             do_all = 0 ;
-       int             test_count = 0 ;
-
-       count_open_files () ;
-
-       if (argc != 2)
-       {       printf ("Usage : %s <test>\n", argv [0]) ;
-               printf ("    Where <test> is one of the following:\n") ;
-               printf ("           wav   - test WAV file functions (little endian)\n") ;
-               printf ("           aiff  - test AIFF file functions (big endian)\n") ;
-               printf ("           au    - test AU file functions\n") ;
-               printf ("           avr   - test AVR file functions\n") ;
-               printf ("           caf   - test CAF file functions\n") ;
-               printf ("           raw   - test RAW header-less PCM file functions\n") ;
-               printf ("           paf   - test PAF file functions\n") ;
-               printf ("           svx   - test 8SVX/16SV file functions\n") ;
-               printf ("           nist  - test NIST Sphere file functions\n") ;
-               printf ("           ircam - test IRCAM file functions\n") ;
-               printf ("           voc   - Create Voice file functions\n") ;
-               printf ("           w64   - Sonic Foundry's W64 file functions\n") ;
-               printf ("           flac  - test FLAC file functions\n") ;
-               printf ("           mpc2k - test MPC 2000 file functions\n") ;
-               printf ("           rf64  - test RF64 file functions\n") ;
-               printf ("           all   - perform all tests\n") ;
-               exit (1) ;
-               } ;
-
-       do_all = !strcmp (argv [1], "all") ;
-
-       if (do_all || ! strcmp (argv [1], "wav"))
-       {       pcm_test_char   ("char.wav"             , SF_FORMAT_WAV | SF_FORMAT_PCM_U8, SF_FALSE) ;
-               pcm_test_short  ("short.wav"    , SF_FORMAT_WAV | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit.wav"    , SF_FORMAT_WAV | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int.wav"              , SF_FORMAT_WAV | SF_FORMAT_PCM_32, SF_FALSE) ;
-
-               pcm_test_char   ("char.rifx"    , SF_ENDIAN_BIG | SF_FORMAT_WAV | SF_FORMAT_PCM_U8, SF_FALSE) ;
-               pcm_test_short  ("short.rifx"   , SF_ENDIAN_BIG | SF_FORMAT_WAV | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit.rifx"   , SF_ENDIAN_BIG | SF_FORMAT_WAV | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int.rifx"             , SF_ENDIAN_BIG | SF_FORMAT_WAV | SF_FORMAT_PCM_32, SF_FALSE) ;
-
-               pcm_test_24bit  ("24bit.wavex"  , SF_FORMAT_WAVEX | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int.wavex"    , SF_FORMAT_WAVEX | SF_FORMAT_PCM_32, SF_FALSE) ;
-
-               /* Lite remove start */
-               pcm_test_float  ("float.wav"    , SF_FORMAT_WAV | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double.wav"   , SF_FORMAT_WAV | SF_FORMAT_DOUBLE, SF_FALSE) ;
-
-               pcm_test_float  ("float.rifx"   , SF_ENDIAN_BIG | SF_FORMAT_WAV | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double.rifx"  , SF_ENDIAN_BIG | SF_FORMAT_WAV | SF_FORMAT_DOUBLE, SF_FALSE) ;
-
-               pcm_test_float  ("float.wavex"  , SF_FORMAT_WAVEX | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double.wavex" , SF_FORMAT_WAVEX | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               /* Lite remove end */
-
-               empty_file_test ("empty_char.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_U8) ;
-               empty_file_test ("empty_short.wav", SF_FORMAT_WAV | SF_FORMAT_PCM_16) ;
-               empty_file_test ("empty_float.wav", SF_FORMAT_WAV | SF_FORMAT_FLOAT) ;
-
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "aiff"))
-       {       pcm_test_char   ("char_u8.aiff" , SF_FORMAT_AIFF | SF_FORMAT_PCM_U8, SF_FALSE) ;
-               pcm_test_char   ("char_s8.aiff" , SF_FORMAT_AIFF | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_short  ("short.aiff"   , SF_FORMAT_AIFF | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit.aiff"   , SF_FORMAT_AIFF | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int.aiff"             , SF_FORMAT_AIFF | SF_FORMAT_PCM_32, SF_FALSE) ;
-
-               pcm_test_short  ("short_sowt.aifc"      , SF_ENDIAN_LITTLE | SF_FORMAT_AIFF | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit_sowt.aifc"      , SF_ENDIAN_LITTLE | SF_FORMAT_AIFF | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int_sowt.aifc"        , SF_ENDIAN_LITTLE | SF_FORMAT_AIFF | SF_FORMAT_PCM_32, SF_FALSE) ;
-
-               pcm_test_short  ("short_twos.aifc"      , SF_ENDIAN_BIG | SF_FORMAT_AIFF | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit_twos.aifc"      , SF_ENDIAN_BIG | SF_FORMAT_AIFF | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int_twos.aifc"        , SF_ENDIAN_BIG | SF_FORMAT_AIFF | SF_FORMAT_PCM_32, SF_FALSE) ;
-
-               /* Lite remove start */
-               pcm_test_short  ("dwvw16.aifc", SF_FORMAT_AIFF | SF_FORMAT_DWVW_16, SF_TRUE) ;
-               pcm_test_24bit  ("dwvw24.aifc", SF_FORMAT_AIFF | SF_FORMAT_DWVW_24, SF_TRUE) ;
-
-               pcm_test_float  ("float.aifc"   , SF_FORMAT_AIFF | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double.aifc"  , SF_FORMAT_AIFF | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               /* Lite remove end */
-
-               empty_file_test ("empty_char.aiff", SF_FORMAT_AIFF | SF_FORMAT_PCM_U8) ;
-               empty_file_test ("empty_short.aiff", SF_FORMAT_AIFF | SF_FORMAT_PCM_16) ;
-               empty_file_test ("empty_float.aiff", SF_FORMAT_AIFF | SF_FORMAT_FLOAT) ;
-
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "au"))
-       {       pcm_test_char   ("char.au"      , SF_FORMAT_AU | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_short  ("short.au"     , SF_FORMAT_AU | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit.au"     , SF_FORMAT_AU | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int.au"       , SF_FORMAT_AU | SF_FORMAT_PCM_32, SF_FALSE) ;
-               /* Lite remove start */
-               pcm_test_float  ("float.au"     , SF_FORMAT_AU | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double.au", SF_FORMAT_AU | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               /* Lite remove end */
-
-               pcm_test_char   ("char_le.au"   , SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_short  ("short_le.au"  , SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit_le.au"  , SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int_le.au"    , SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_PCM_32, SF_FALSE) ;
-               /* Lite remove start */
-               pcm_test_float  ("float_le.au"  , SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double_le.au" , SF_ENDIAN_LITTLE | SF_FORMAT_AU | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               /* Lite remove end */
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "caf"))
-       {       pcm_test_char   ("char.caf"             , SF_FORMAT_CAF | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_short  ("short.caf"    , SF_FORMAT_CAF | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit.caf"    , SF_FORMAT_CAF | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int.caf"              , SF_FORMAT_CAF | SF_FORMAT_PCM_32, SF_FALSE) ;
-               /* Lite remove start */
-               pcm_test_float  ("float.caf"    , SF_FORMAT_CAF | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double.caf"   , SF_FORMAT_CAF | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               /* Lite remove end */
-
-               pcm_test_short  ("short_le.caf" , SF_ENDIAN_LITTLE | SF_FORMAT_CAF | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit_le.caf" , SF_ENDIAN_LITTLE | SF_FORMAT_CAF | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int_le.caf"   , SF_ENDIAN_LITTLE | SF_FORMAT_CAF | SF_FORMAT_PCM_32, SF_FALSE) ;
-               /* Lite remove start */
-               pcm_test_float  ("float_le.caf" , SF_ENDIAN_LITTLE | SF_FORMAT_CAF | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double_le.caf", SF_ENDIAN_LITTLE | SF_FORMAT_CAF | SF_FORMAT_DOUBLE, SF_FALSE) ;
-
-               pcm_test_short  ("alac16.caf"   , SF_FORMAT_CAF | SF_FORMAT_ALAC_16, SF_FALSE) ;
-               pcm_test_20bit  ("alac20.caf"   , SF_FORMAT_CAF | SF_FORMAT_ALAC_20, SF_FALSE) ;
-               pcm_test_24bit  ("alac24.caf"   , SF_FORMAT_CAF | SF_FORMAT_ALAC_24, SF_FALSE) ;
-               pcm_test_int    ("alac32.caf"   , SF_FORMAT_CAF | SF_FORMAT_ALAC_32, SF_FALSE) ;
-
-               /* Lite remove end */
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "raw"))
-       {       pcm_test_char   ("char_s8.raw"  , SF_FORMAT_RAW | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_char   ("char_u8.raw"  , SF_FORMAT_RAW | SF_FORMAT_PCM_U8, SF_FALSE) ;
-
-               pcm_test_short  ("short_le.raw" , SF_ENDIAN_LITTLE      | SF_FORMAT_RAW | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_short  ("short_be.raw" , SF_ENDIAN_BIG         | SF_FORMAT_RAW | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit_le.raw" , SF_ENDIAN_LITTLE      | SF_FORMAT_RAW | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_24bit  ("24bit_be.raw" , SF_ENDIAN_BIG         | SF_FORMAT_RAW | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int_le.raw"   , SF_ENDIAN_LITTLE      | SF_FORMAT_RAW | SF_FORMAT_PCM_32, SF_FALSE) ;
-               pcm_test_int    ("int_be.raw"   , SF_ENDIAN_BIG         | SF_FORMAT_RAW | SF_FORMAT_PCM_32, SF_FALSE) ;
-
-               /* Lite remove start */
-               pcm_test_float  ("float_le.raw" , SF_ENDIAN_LITTLE      | SF_FORMAT_RAW | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_float  ("float_be.raw" , SF_ENDIAN_BIG         | SF_FORMAT_RAW | SF_FORMAT_FLOAT , SF_FALSE) ;
-
-               pcm_test_double ("double_le.raw", SF_ENDIAN_LITTLE      | SF_FORMAT_RAW | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               pcm_test_double ("double_be.raw", SF_ENDIAN_BIG         | SF_FORMAT_RAW | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               /* Lite remove end */
-               test_count++ ;
-               } ;
-
-       /* Lite remove start */
-       if (do_all || ! strcmp (argv [1], "paf"))
-       {       pcm_test_char   ("char_le.paf", SF_ENDIAN_LITTLE        | SF_FORMAT_PAF | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_char   ("char_be.paf", SF_ENDIAN_BIG           | SF_FORMAT_PAF | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_short  ("short_le.paf", SF_ENDIAN_LITTLE       | SF_FORMAT_PAF | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_short  ("short_be.paf", SF_ENDIAN_BIG          | SF_FORMAT_PAF | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit_le.paf", SF_ENDIAN_LITTLE       | SF_FORMAT_PAF | SF_FORMAT_PCM_24, SF_TRUE) ;
-               pcm_test_24bit  ("24bit_be.paf", SF_ENDIAN_BIG          | SF_FORMAT_PAF | SF_FORMAT_PCM_24, SF_TRUE) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "svx"))
-       {       pcm_test_char   ("char.svx" , SF_FORMAT_SVX | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_short  ("short.svx", SF_FORMAT_SVX | SF_FORMAT_PCM_16, SF_FALSE) ;
-
-               empty_file_test ("empty_char.svx", SF_FORMAT_SVX | SF_FORMAT_PCM_S8) ;
-               empty_file_test ("empty_short.svx", SF_FORMAT_SVX | SF_FORMAT_PCM_16) ;
-
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "nist"))
-       {       pcm_test_short  ("short_le.nist", SF_ENDIAN_LITTLE      | SF_FORMAT_NIST | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_short  ("short_be.nist", SF_ENDIAN_BIG         | SF_FORMAT_NIST | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit_le.nist", SF_ENDIAN_LITTLE      | SF_FORMAT_NIST | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_24bit  ("24bit_be.nist", SF_ENDIAN_BIG         | SF_FORMAT_NIST | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int_le.nist"  , SF_ENDIAN_LITTLE      | SF_FORMAT_NIST | SF_FORMAT_PCM_32, SF_FALSE) ;
-               pcm_test_int    ("int_be.nist"  , SF_ENDIAN_BIG         | SF_FORMAT_NIST | SF_FORMAT_PCM_32, SF_FALSE) ;
-
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "ircam"))
-       {       pcm_test_short  ("short_be.ircam"       , SF_ENDIAN_BIG | SF_FORMAT_IRCAM | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_short  ("short_le.ircam"       , SF_ENDIAN_LITTLE      | SF_FORMAT_IRCAM | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_int    ("int_be.ircam"         , SF_ENDIAN_BIG | SF_FORMAT_IRCAM | SF_FORMAT_PCM_32, SF_FALSE) ;
-               pcm_test_int    ("int_le.ircam"         , SF_ENDIAN_LITTLE      | SF_FORMAT_IRCAM | SF_FORMAT_PCM_32, SF_FALSE) ;
-               pcm_test_float  ("float_be.ircam"       , SF_ENDIAN_BIG | SF_FORMAT_IRCAM | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_float  ("float_le.ircam"       , SF_ENDIAN_LITTLE      | SF_FORMAT_IRCAM | SF_FORMAT_FLOAT , SF_FALSE) ;
-
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "voc"))
-       {       pcm_test_char   ("char.voc" , SF_FORMAT_VOC | SF_FORMAT_PCM_U8, SF_FALSE) ;
-               pcm_test_short  ("short.voc", SF_FORMAT_VOC | SF_FORMAT_PCM_16, SF_FALSE) ;
-
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "mat4"))
-       {       pcm_test_short  ("short_be.mat4"        , SF_ENDIAN_BIG | SF_FORMAT_MAT4 | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_short  ("short_le.mat4"        , SF_ENDIAN_LITTLE      | SF_FORMAT_MAT4 | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_int    ("int_be.mat4"          , SF_ENDIAN_BIG | SF_FORMAT_MAT4 | SF_FORMAT_PCM_32, SF_FALSE) ;
-               pcm_test_int    ("int_le.mat4"          , SF_ENDIAN_LITTLE      | SF_FORMAT_MAT4 | SF_FORMAT_PCM_32, SF_FALSE) ;
-               pcm_test_float  ("float_be.mat4"        , SF_ENDIAN_BIG | SF_FORMAT_MAT4 | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_float  ("float_le.mat4"        , SF_ENDIAN_LITTLE      | SF_FORMAT_MAT4 | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double_be.mat4"       , SF_ENDIAN_BIG | SF_FORMAT_MAT4 | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               pcm_test_double ("double_le.mat4"       , SF_ENDIAN_LITTLE      | SF_FORMAT_MAT4 | SF_FORMAT_DOUBLE, SF_FALSE) ;
-
-               empty_file_test ("empty_short.mat4", SF_FORMAT_MAT4 | SF_FORMAT_PCM_16) ;
-               empty_file_test ("empty_float.mat4", SF_FORMAT_MAT4 | SF_FORMAT_FLOAT) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "mat5"))
-       {       pcm_test_char   ("char_be.mat5"         , SF_ENDIAN_BIG | SF_FORMAT_MAT5 | SF_FORMAT_PCM_U8, SF_FALSE) ;
-               pcm_test_char   ("char_le.mat5"         , SF_ENDIAN_LITTLE      | SF_FORMAT_MAT5 | SF_FORMAT_PCM_U8, SF_FALSE) ;
-               pcm_test_short  ("short_be.mat5"        , SF_ENDIAN_BIG | SF_FORMAT_MAT5 | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_short  ("short_le.mat5"        , SF_ENDIAN_LITTLE      | SF_FORMAT_MAT5 | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_int    ("int_be.mat5"          , SF_ENDIAN_BIG | SF_FORMAT_MAT5 | SF_FORMAT_PCM_32, SF_FALSE) ;
-               pcm_test_int    ("int_le.mat5"          , SF_ENDIAN_LITTLE      | SF_FORMAT_MAT5 | SF_FORMAT_PCM_32, SF_FALSE) ;
-               pcm_test_float  ("float_be.mat5"        , SF_ENDIAN_BIG | SF_FORMAT_MAT5 | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_float  ("float_le.mat5"        , SF_ENDIAN_LITTLE      | SF_FORMAT_MAT5 | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double_be.mat5"       , SF_ENDIAN_BIG | SF_FORMAT_MAT5 | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               pcm_test_double ("double_le.mat5"       , SF_ENDIAN_LITTLE      | SF_FORMAT_MAT5 | SF_FORMAT_DOUBLE, SF_FALSE) ;
-
-               increment_open_file_count () ;
-
-               empty_file_test ("empty_char.mat5", SF_FORMAT_MAT5 | SF_FORMAT_PCM_U8) ;
-               empty_file_test ("empty_short.mat5", SF_FORMAT_MAT5 | SF_FORMAT_PCM_16) ;
-               empty_file_test ("empty_float.mat5", SF_FORMAT_MAT5 | SF_FORMAT_FLOAT) ;
-
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "pvf"))
-       {       pcm_test_char   ("char.pvf"     , SF_FORMAT_PVF | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_short  ("short.pvf", SF_FORMAT_PVF | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_int    ("int.pvf"      , SF_FORMAT_PVF | SF_FORMAT_PCM_32, SF_FALSE) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "htk"))
-       {       pcm_test_short  ("short.htk", SF_FORMAT_HTK | SF_FORMAT_PCM_16, SF_FALSE) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "mpc2k"))
-       {       pcm_test_short  ("short.mpc", SF_FORMAT_MPC2K | SF_FORMAT_PCM_16, SF_FALSE) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "avr"))
-       {       pcm_test_char   ("char_u8.avr"  , SF_FORMAT_AVR | SF_FORMAT_PCM_U8, SF_FALSE) ;
-               pcm_test_char   ("char_s8.avr"  , SF_FORMAT_AVR | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_short  ("short.avr"    , SF_FORMAT_AVR | SF_FORMAT_PCM_16, SF_FALSE) ;
-               test_count++ ;
-               } ;
-       /* Lite remove end */
-
-       if (do_all || ! strcmp (argv [1], "w64"))
-       {       pcm_test_char   ("char.w64"             , SF_FORMAT_W64 | SF_FORMAT_PCM_U8, SF_FALSE) ;
-               pcm_test_short  ("short.w64"    , SF_FORMAT_W64 | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit.w64"    , SF_FORMAT_W64 | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int.w64"              , SF_FORMAT_W64 | SF_FORMAT_PCM_32, SF_FALSE) ;
-               /* Lite remove start */
-               pcm_test_float  ("float.w64"    , SF_FORMAT_W64 | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double.w64"   , SF_FORMAT_W64 | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               /* Lite remove end */
-
-               empty_file_test ("empty_char.w64", SF_FORMAT_W64 | SF_FORMAT_PCM_U8) ;
-               empty_file_test ("empty_short.w64", SF_FORMAT_W64 | SF_FORMAT_PCM_16) ;
-               empty_file_test ("empty_float.w64", SF_FORMAT_W64 | SF_FORMAT_FLOAT) ;
-
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "sds"))
-       {       pcm_test_char   ("char.sds"             , SF_FORMAT_SDS | SF_FORMAT_PCM_S8, SF_FALSE) ;
-               pcm_test_short  ("short.sds"    , SF_FORMAT_SDS | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit.sds"    , SF_FORMAT_SDS | SF_FORMAT_PCM_24, SF_FALSE) ;
-
-               empty_file_test ("empty_char.sds", SF_FORMAT_SDS | SF_FORMAT_PCM_S8) ;
-               empty_file_test ("empty_short.sds", SF_FORMAT_SDS | SF_FORMAT_PCM_16) ;
-
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "sd2"))
-       {       pcm_test_char   ("char.sd2"             , SF_FORMAT_SD2 | SF_FORMAT_PCM_S8, SF_TRUE) ;
-               pcm_test_short  ("short.sd2"    , SF_FORMAT_SD2 | SF_FORMAT_PCM_16, SF_TRUE) ;
-               pcm_test_24bit  ("24bit.sd2"    , SF_FORMAT_SD2 | SF_FORMAT_PCM_24, SF_TRUE) ;
-               pcm_test_int    ("32bit.sd2"    , SF_FORMAT_SD2 | SF_FORMAT_PCM_32, SF_TRUE) ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "flac"))
-       {       if (HAVE_EXTERNAL_LIBS)
-               {       pcm_test_char   ("char.flac"    , SF_FORMAT_FLAC | SF_FORMAT_PCM_S8, SF_TRUE) ;
-                       pcm_test_short  ("short.flac"   , SF_FORMAT_FLAC | SF_FORMAT_PCM_16, SF_TRUE) ;
-                       pcm_test_24bit  ("24bit.flac"   , SF_FORMAT_FLAC | SF_FORMAT_PCM_24, SF_TRUE) ;
-                       }
-               else
-                       puts ("    No FLAC tests because FLAC support was not compiled in.") ;
-               test_count++ ;
-               } ;
-
-       if (do_all || ! strcmp (argv [1], "rf64"))
-       {       pcm_test_char   ("char.rf64"    , SF_FORMAT_RF64 | SF_FORMAT_PCM_U8, SF_FALSE) ;
-               pcm_test_short  ("short.rf64"   , SF_FORMAT_RF64 | SF_FORMAT_PCM_16, SF_FALSE) ;
-               pcm_test_24bit  ("24bit.rf64"   , SF_FORMAT_RF64 | SF_FORMAT_PCM_24, SF_FALSE) ;
-               pcm_test_int    ("int.rf64"             , SF_FORMAT_RF64 | SF_FORMAT_PCM_32, SF_FALSE) ;
-
-               /* Lite remove start */
-               pcm_test_float  ("float.rf64"   , SF_FORMAT_RF64 | SF_FORMAT_FLOAT , SF_FALSE) ;
-               pcm_test_double ("double.rf64"  , SF_FORMAT_RF64 | SF_FORMAT_DOUBLE, SF_FALSE) ;
-               empty_file_test ("empty_char.rf64", SF_FORMAT_RF64 | SF_FORMAT_PCM_U8) ;
-               empty_file_test ("empty_short.rf64", SF_FORMAT_RF64 | SF_FORMAT_PCM_16) ;
-               empty_file_test ("empty_float.rf64", SF_FORMAT_RF64 | SF_FORMAT_FLOAT) ;
-               /* Lite remove end */
-
-               test_count++ ;
-               } ;
-
-       if (test_count == 0)
-       {       printf ("Mono : ************************************\n") ;
-               printf ("Mono : *  No '%s' test defined.\n", argv [1]) ;
-               printf ("Mono : ************************************\n") ;
-               return 1 ;
-               } ;
-
-       /* Only open file descriptors should be stdin, stdout and stderr. */
-       check_open_file_count_or_die (__LINE__) ;
-
-       return 0 ;
-} /* main */
-
-/*============================================================================================
-**     Helper functions and macros.
-*/
-
-static void    create_short_file (const char *filename) ;
-
-#define        CHAR_ERROR(x, y)                (abs ((x) - (y)) > 255)
-#define        INT_ERROR(x, y)                 (((x) - (y)) != 0)
-#define        BIT_20_ERROR(x, y)              (abs ((x) - (y)) > 4095)
-#define        TRIBYTE_ERROR(x, y)             (abs ((x) - (y)) > 255)
-#define        FLOAT_ERROR(x, y)               (fabs ((x) - (y)) > 1e-5)
-
-#define CONVERT_DATA(k, len, new, orig)                                        \
-                       {       for ((k) = 0 ; (k) < (len) ; (k) ++)    \
-                                       (new) [k] = (orig) [k] ;                        \
-                               }
-
-
-/*======================================================================================
-*/
-
-static void mono_char_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void stereo_char_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void mono_rdwr_char_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void new_rdwr_char_test (const char *filename, int format, int allow_fd) ;
-static void multi_seek_test (const char * filename, int format) ;
-static void write_seek_extend_test (const char * filename, int format) ;
-
-static void
-pcm_test_char (const char *filename, int format, int long_file_ok)
-{      SF_INFO         sfinfo ;
-       short           *orig ;
-       int                     k, allow_fd ;
-
-       /* Sd2 files cannot be opened from an existing file descriptor. */
-       allow_fd = ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2) ? SF_FALSE : SF_TRUE ;
-
-       print_test_name ("pcm_test_char", filename) ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, 32000.0) ;
-
-       orig = orig_data.s ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       /* Some test broken out here. */
-
-       mono_char_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* Sub format DWVW does not allow seeking. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       unlink (filename) ;
-               printf ("no seek : ok\n") ;
-               return ;
-               } ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-               )
-               mono_rdwr_char_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* If the format doesn't support stereo we're done. */
-       sfinfo.channels = 2 ;
-       if (sf_format_check (&sfinfo) == 0)
-       {       unlink (filename) ;
-               puts ("no stereo : ok") ;
-               return ;
-               } ;
-
-       stereo_char_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* New read/write test. Not sure if this is needed yet. */
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_PAF
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_VOC
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-                       )
-               new_rdwr_char_test (filename, format, allow_fd) ;
-
-       delete_file (format, filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* pcm_test_char */
-
-static void
-mono_char_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       short           *orig, *test ;
-       sf_count_t      count ;
-       int                     k, items, total ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       orig = orig_data.s ;
-       test = test_data.s ;
-
-       items = DATA_LENGTH ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_write_short_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-       test_write_short_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-
-       /* Add non-audio data after the audio. */
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (short)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Mono : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_short_or_die (file, 0, test, items, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (CHAR_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d: Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       oct_save_short (orig, test, items) ;
-                       exit (1) ;
-                       } ;
-
-       /* Test multiple short reads. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       total = 0 ;
-       for (k = 1 ; k <= 32 ; k++)
-       {       int ik ;
-
-               test_read_short_or_die (file, 0, test + total, k, __LINE__) ;
-               total += k ;
-
-               for (ik = 0 ; ik < total ; ik++)
-                       if (CHAR_ERROR (orig [ik], test [ik]))
-                       {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, ik, orig [ik], test [ik]) ;
-                               exit (1) ;
-                               } ;
-               } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_read_short_or_die (file, 0, test, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (CHAR_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* For some codecs we can't go past here. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       sf_close (file) ;
-               unlink (filename) ;
-               printf ("no seek : ") ;
-               return ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, items + 10, SEEK_SET, items + 10, sfinfo.channels, __LINE__) ;
-
-       test_read_short_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (CHAR_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 6, SEEK_CUR, items + 20, sfinfo.channels, __LINE__) ;
-
-       test_read_short_or_die (file, 0, test + 20, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (CHAR_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_short_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (CHAR_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample D (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Check read past end of file followed by sf_seek (sndfile, 0, SEEK_CUR). */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       count = 0 ;
-       while (count < sfinfo.frames)
-               count += sf_read_short (file, test, 311) ;
-
-       /* Check that no error has occurred. */
-       if (sf_error (file))
-       {       printf ("\n\nLine %d : Mono : error where there shouldn't have been one.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       /* Check that we haven't read beyond EOF. */
-       if (count > sfinfo.frames)
-       {       printf ("\n\nLines %d : read past end of file (%" PRId64 " should be %" PRId64 ")\n", __LINE__, count, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       test_seek_or_die (file, 0, SEEK_CUR, sfinfo.frames, sfinfo.channels, __LINE__) ;
-
-       sf_close (file) ;
-
-       multi_seek_test (filename, format) ;
-       write_seek_extend_test (filename, format) ;
-
-} /* mono_char_test */
-
-static void
-stereo_char_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       short           *orig, *test ;
-       int                     k, items, frames ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, 32000.0) ;
-
-       orig = orig_data.s ;
-       test = test_data.s ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_writef_short_or_die (file, 0, orig, frames, __LINE__) ;
-
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (short)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Stereo : Returned format incorrect (0x%08X => 0x%08X).\n",
-                               __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 2)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_readf_short_or_die (file, 0, test, frames, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (CHAR_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_readf_short_or_die (file, 0, test, 2, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (CHAR_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       /* Check for errors here. */
-       if (sf_error (file))
-       {       printf ("Line %d: Should NOT return an error.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       if (sf_read_short (file, test, 1) > 0)
-       {       printf ("Line %d: Should return 0.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! sf_error (file))
-       {       printf ("Line %d: Should return an error.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-       /*-----------------------*/
-
-       test_readf_short_or_die (file, 0, test + 10, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (CHAR_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 8, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_readf_short_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 40 ; k < 44 ; k++)
-               if (CHAR_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_readf_short_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (CHAR_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-} /* stereo_char_test */
-
-static void
-mono_rdwr_char_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       short           *orig, *test ;
-       int                     k, pass ;
-
-       switch (format & SF_FORMAT_SUBMASK)
-       {       case SF_FORMAT_ALAC_16 :
-               case SF_FORMAT_ALAC_20 :
-               case SF_FORMAT_ALAC_24 :
-               case SF_FORMAT_ALAC_32 :
-                       allow_fd = 0 ;
-                       break ;
-
-               default :
-                       break ;
-               } ;
-
-       orig = orig_data.s ;
-       test = test_data.s ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       if ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_RAW
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_AU
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2)
-               unlink (filename) ;
-       else
-       {       /* Create a short file. */
-               create_short_file (filename) ;
-
-               /* Opening a already existing short file (ie invalid header) RDWR is disallowed.
-               ** If this returns a valif pointer sf_open() screwed up.
-               */
-               if ((file = sf_open (filename, SFM_RDWR, &sfinfo)))
-               {       printf ("\n\nLine %d: sf_open should (SFM_RDWR) have failed but didn't.\n", __LINE__) ;
-                       exit (1) ;
-                       } ;
-
-               /* Truncate the file to zero bytes. */
-               if (truncate (filename, 0) < 0)
-               {       printf ("\n\nLine %d: truncate (%s) failed", __LINE__, filename) ;
-                       perror (NULL) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Opening a zero length file RDWR is allowed, but the SF_INFO struct must contain
-       ** all the usual data required when opening the file in WRITE mode.
-       */
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       /* Do 3 writes followed by reads. After each, check the data and the current
-       ** read and write offsets.
-       */
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               /* Write some data. */
-               test_write_short_or_die (file, pass, orig, DATA_LENGTH, __LINE__) ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, pass * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_short_or_die (file, 0, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (CHAR_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) A : Error at sample %d (0x%X => 0x%X).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_short (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, pass * DATA_LENGTH, pass * DATA_LENGTH) ;
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-
-       /* Open the file again to check the data. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Not enough frames in file. (%" PRId64 " < %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               }
-
-       if (! long_file_ok && sfinfo.frames != 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Incorrect number of frames in file. (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok)
-               test_read_write_position_or_die (file, __LINE__, 0, 0, 3 * DATA_LENGTH) ;
-       else
-               test_seek_or_die (file, 3 * DATA_LENGTH, SFM_WRITE | SEEK_SET, 3 * DATA_LENGTH, sfinfo.channels, __LINE__) ;
-
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, 3 * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_short_or_die (file, pass, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (CHAR_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) B : Error at sample %d (0x%X => 0x%X).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_short (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-} /* mono_rdwr_short_test */
-
-static void
-new_rdwr_char_test (const char *filename, int format, int allow_fd)
-{      SNDFILE *wfile, *rwfile ;
-       SF_INFO sfinfo ;
-       short           *orig, *test ;
-       int             items, frames ;
-
-       orig = orig_data.s ;
-       test = test_data.s ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       wfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-       sf_command (wfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) ;
-       test_writef_short_or_die (wfile, 1, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-       test_writef_short_or_die (wfile, 2, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-
-       rwfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-       if (sfinfo.frames != 2 * frames)
-       {       printf ("\n\nLine %d : incorrect number of frames in file (%" PRId64 " should be %d)\n\n", __LINE__, sfinfo.frames, 2 * frames) ;
-               exit (1) ;
-               } ;
-
-       test_writef_short_or_die (wfile, 3, orig, frames, __LINE__) ;
-
-       test_readf_short_or_die (rwfile, 1, test, frames, __LINE__) ;
-       test_readf_short_or_die (rwfile, 2, test, frames, __LINE__) ;
-
-       sf_close (wfile) ;
-       sf_close (rwfile) ;
-} /* new_rdwr_char_test */
-
-
-/*======================================================================================
-*/
-
-static void mono_short_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void stereo_short_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void mono_rdwr_short_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void new_rdwr_short_test (const char *filename, int format, int allow_fd) ;
-static void multi_seek_test (const char * filename, int format) ;
-static void write_seek_extend_test (const char * filename, int format) ;
-
-static void
-pcm_test_short (const char *filename, int format, int long_file_ok)
-{      SF_INFO         sfinfo ;
-       short           *orig ;
-       int                     k, allow_fd ;
-
-       /* Sd2 files cannot be opened from an existing file descriptor. */
-       allow_fd = ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2) ? SF_FALSE : SF_TRUE ;
-
-       print_test_name ("pcm_test_short", filename) ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, 32000.0) ;
-
-       orig = orig_data.s ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       /* Some test broken out here. */
-
-       mono_short_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* Sub format DWVW does not allow seeking. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       unlink (filename) ;
-               printf ("no seek : ok\n") ;
-               return ;
-               } ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-               )
-               mono_rdwr_short_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* If the format doesn't support stereo we're done. */
-       sfinfo.channels = 2 ;
-       if (sf_format_check (&sfinfo) == 0)
-       {       unlink (filename) ;
-               puts ("no stereo : ok") ;
-               return ;
-               } ;
-
-       stereo_short_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* New read/write test. Not sure if this is needed yet. */
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_PAF
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_VOC
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-                       )
-               new_rdwr_short_test (filename, format, allow_fd) ;
-
-       delete_file (format, filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* pcm_test_short */
-
-static void
-mono_short_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       short           *orig, *test ;
-       sf_count_t      count ;
-       int                     k, items, total ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       orig = orig_data.s ;
-       test = test_data.s ;
-
-       items = DATA_LENGTH ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_write_short_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-       test_write_short_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-
-       /* Add non-audio data after the audio. */
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (short)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Mono : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_short_or_die (file, 0, test, items, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (INT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d: Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       oct_save_short (orig, test, items) ;
-                       exit (1) ;
-                       } ;
-
-       /* Test multiple short reads. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       total = 0 ;
-       for (k = 1 ; k <= 32 ; k++)
-       {       int ik ;
-
-               test_read_short_or_die (file, 0, test + total, k, __LINE__) ;
-               total += k ;
-
-               for (ik = 0 ; ik < total ; ik++)
-                       if (INT_ERROR (orig [ik], test [ik]))
-                       {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, ik, orig [ik], test [ik]) ;
-                               exit (1) ;
-                               } ;
-               } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_read_short_or_die (file, 0, test, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (INT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* For some codecs we can't go past here. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       sf_close (file) ;
-               unlink (filename) ;
-               printf ("no seek : ") ;
-               return ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, items + 10, SEEK_SET, items + 10, sfinfo.channels, __LINE__) ;
-
-       test_read_short_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (INT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 6, SEEK_CUR, items + 20, sfinfo.channels, __LINE__) ;
-
-       test_read_short_or_die (file, 0, test + 20, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (INT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_short_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (INT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample D (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Check read past end of file followed by sf_seek (sndfile, 0, SEEK_CUR). */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       count = 0 ;
-       while (count < sfinfo.frames)
-               count += sf_read_short (file, test, 311) ;
-
-       /* Check that no error has occurred. */
-       if (sf_error (file))
-       {       printf ("\n\nLine %d : Mono : error where there shouldn't have been one.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       /* Check that we haven't read beyond EOF. */
-       if (count > sfinfo.frames)
-       {       printf ("\n\nLines %d : read past end of file (%" PRId64 " should be %" PRId64 ")\n", __LINE__, count, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       test_seek_or_die (file, 0, SEEK_CUR, sfinfo.frames, sfinfo.channels, __LINE__) ;
-
-       sf_close (file) ;
-
-       multi_seek_test (filename, format) ;
-       write_seek_extend_test (filename, format) ;
-
-} /* mono_short_test */
-
-static void
-stereo_short_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       short           *orig, *test ;
-       int                     k, items, frames ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, 32000.0) ;
-
-       orig = orig_data.s ;
-       test = test_data.s ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_writef_short_or_die (file, 0, orig, frames, __LINE__) ;
-
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (short)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Stereo : Returned format incorrect (0x%08X => 0x%08X).\n",
-                               __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 2)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_readf_short_or_die (file, 0, test, frames, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (INT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_readf_short_or_die (file, 0, test, 2, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (INT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       /* Check for errors here. */
-       if (sf_error (file))
-       {       printf ("Line %d: Should NOT return an error.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       if (sf_read_short (file, test, 1) > 0)
-       {       printf ("Line %d: Should return 0.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! sf_error (file))
-       {       printf ("Line %d: Should return an error.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-       /*-----------------------*/
-
-       test_readf_short_or_die (file, 0, test + 10, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (INT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 8, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_readf_short_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 40 ; k < 44 ; k++)
-               if (INT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_readf_short_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (INT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-} /* stereo_short_test */
-
-static void
-mono_rdwr_short_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       short           *orig, *test ;
-       int                     k, pass ;
-
-       switch (format & SF_FORMAT_SUBMASK)
-       {       case SF_FORMAT_ALAC_16 :
-               case SF_FORMAT_ALAC_20 :
-               case SF_FORMAT_ALAC_24 :
-               case SF_FORMAT_ALAC_32 :
-                       allow_fd = 0 ;
-                       break ;
-
-               default :
-                       break ;
-               } ;
-
-       orig = orig_data.s ;
-       test = test_data.s ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       if ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_RAW
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_AU
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2)
-               unlink (filename) ;
-       else
-       {       /* Create a short file. */
-               create_short_file (filename) ;
-
-               /* Opening a already existing short file (ie invalid header) RDWR is disallowed.
-               ** If this returns a valif pointer sf_open() screwed up.
-               */
-               if ((file = sf_open (filename, SFM_RDWR, &sfinfo)))
-               {       printf ("\n\nLine %d: sf_open should (SFM_RDWR) have failed but didn't.\n", __LINE__) ;
-                       exit (1) ;
-                       } ;
-
-               /* Truncate the file to zero bytes. */
-               if (truncate (filename, 0) < 0)
-               {       printf ("\n\nLine %d: truncate (%s) failed", __LINE__, filename) ;
-                       perror (NULL) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Opening a zero length file RDWR is allowed, but the SF_INFO struct must contain
-       ** all the usual data required when opening the file in WRITE mode.
-       */
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       /* Do 3 writes followed by reads. After each, check the data and the current
-       ** read and write offsets.
-       */
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               /* Write some data. */
-               test_write_short_or_die (file, pass, orig, DATA_LENGTH, __LINE__) ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, pass * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_short_or_die (file, 0, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (INT_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) A : Error at sample %d (0x%X => 0x%X).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_short (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, pass * DATA_LENGTH, pass * DATA_LENGTH) ;
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-
-       /* Open the file again to check the data. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Not enough frames in file. (%" PRId64 " < %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               }
-
-       if (! long_file_ok && sfinfo.frames != 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Incorrect number of frames in file. (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok)
-               test_read_write_position_or_die (file, __LINE__, 0, 0, 3 * DATA_LENGTH) ;
-       else
-               test_seek_or_die (file, 3 * DATA_LENGTH, SFM_WRITE | SEEK_SET, 3 * DATA_LENGTH, sfinfo.channels, __LINE__) ;
-
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, 3 * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_short_or_die (file, pass, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (INT_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) B : Error at sample %d (0x%X => 0x%X).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_short (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-} /* mono_rdwr_short_test */
-
-static void
-new_rdwr_short_test (const char *filename, int format, int allow_fd)
-{      SNDFILE *wfile, *rwfile ;
-       SF_INFO sfinfo ;
-       short           *orig, *test ;
-       int             items, frames ;
-
-       orig = orig_data.s ;
-       test = test_data.s ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       wfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-       sf_command (wfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) ;
-       test_writef_short_or_die (wfile, 1, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-       test_writef_short_or_die (wfile, 2, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-
-       rwfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-       if (sfinfo.frames != 2 * frames)
-       {       printf ("\n\nLine %d : incorrect number of frames in file (%" PRId64 " should be %d)\n\n", __LINE__, sfinfo.frames, 2 * frames) ;
-               exit (1) ;
-               } ;
-
-       test_writef_short_or_die (wfile, 3, orig, frames, __LINE__) ;
-
-       test_readf_short_or_die (rwfile, 1, test, frames, __LINE__) ;
-       test_readf_short_or_die (rwfile, 2, test, frames, __LINE__) ;
-
-       sf_close (wfile) ;
-       sf_close (rwfile) ;
-} /* new_rdwr_short_test */
-
-
-/*======================================================================================
-*/
-
-static void mono_20bit_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void stereo_20bit_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void mono_rdwr_20bit_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void new_rdwr_20bit_test (const char *filename, int format, int allow_fd) ;
-static void multi_seek_test (const char * filename, int format) ;
-static void write_seek_extend_test (const char * filename, int format) ;
-
-static void
-pcm_test_20bit (const char *filename, int format, int long_file_ok)
-{      SF_INFO         sfinfo ;
-       int             *orig ;
-       int                     k, allow_fd ;
-
-       /* Sd2 files cannot be opened from an existing file descriptor. */
-       allow_fd = ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2) ? SF_FALSE : SF_TRUE ;
-
-       print_test_name ("pcm_test_20bit", filename) ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, (1.0 * 0x7F00000)) ;
-
-       orig = orig_data.i ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       /* Some test broken out here. */
-
-       mono_20bit_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* Sub format DWVW does not allow seeking. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       unlink (filename) ;
-               printf ("no seek : ok\n") ;
-               return ;
-               } ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-               )
-               mono_rdwr_20bit_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* If the format doesn't support stereo we're done. */
-       sfinfo.channels = 2 ;
-       if (sf_format_check (&sfinfo) == 0)
-       {       unlink (filename) ;
-               puts ("no stereo : ok") ;
-               return ;
-               } ;
-
-       stereo_20bit_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* New read/write test. Not sure if this is needed yet. */
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_PAF
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_VOC
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-                       )
-               new_rdwr_20bit_test (filename, format, allow_fd) ;
-
-       delete_file (format, filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* pcm_test_20bit */
-
-static void
-mono_20bit_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *orig, *test ;
-       sf_count_t      count ;
-       int                     k, items, total ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       items = DATA_LENGTH ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_write_int_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-       test_write_int_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-
-       /* Add non-audio data after the audio. */
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (int)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Mono : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test, items, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (BIT_20_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d: Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       oct_save_int (orig, test, items) ;
-                       exit (1) ;
-                       } ;
-
-       /* Test multiple short reads. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       total = 0 ;
-       for (k = 1 ; k <= 32 ; k++)
-       {       int ik ;
-
-               test_read_int_or_die (file, 0, test + total, k, __LINE__) ;
-               total += k ;
-
-               for (ik = 0 ; ik < total ; ik++)
-                       if (BIT_20_ERROR (orig [ik], test [ik]))
-                       {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, ik, orig [ik], test [ik]) ;
-                               exit (1) ;
-                               } ;
-               } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (BIT_20_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* For some codecs we can't go past here. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       sf_close (file) ;
-               unlink (filename) ;
-               printf ("no seek : ") ;
-               return ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, items + 10, SEEK_SET, items + 10, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (BIT_20_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 6, SEEK_CUR, items + 20, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test + 20, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (BIT_20_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (BIT_20_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample D (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Check read past end of file followed by sf_seek (sndfile, 0, SEEK_CUR). */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       count = 0 ;
-       while (count < sfinfo.frames)
-               count += sf_read_int (file, test, 311) ;
-
-       /* Check that no error has occurred. */
-       if (sf_error (file))
-       {       printf ("\n\nLine %d : Mono : error where there shouldn't have been one.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       /* Check that we haven't read beyond EOF. */
-       if (count > sfinfo.frames)
-       {       printf ("\n\nLines %d : read past end of file (%" PRId64 " should be %" PRId64 ")\n", __LINE__, count, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       test_seek_or_die (file, 0, SEEK_CUR, sfinfo.frames, sfinfo.channels, __LINE__) ;
-
-       sf_close (file) ;
-
-       multi_seek_test (filename, format) ;
-       write_seek_extend_test (filename, format) ;
-
-} /* mono_20bit_test */
-
-static void
-stereo_20bit_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *orig, *test ;
-       int                     k, items, frames ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, (1.0 * 0x7F00000)) ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_writef_int_or_die (file, 0, orig, frames, __LINE__) ;
-
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (int)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Stereo : Returned format incorrect (0x%08X => 0x%08X).\n",
-                               __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 2)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test, frames, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (BIT_20_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test, 2, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (BIT_20_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       /* Check for errors here. */
-       if (sf_error (file))
-       {       printf ("Line %d: Should NOT return an error.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       if (sf_read_int (file, test, 1) > 0)
-       {       printf ("Line %d: Should return 0.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! sf_error (file))
-       {       printf ("Line %d: Should return an error.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-       /*-----------------------*/
-
-       test_readf_int_or_die (file, 0, test + 10, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (BIT_20_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 8, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 40 ; k < 44 ; k++)
-               if (BIT_20_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (BIT_20_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-} /* stereo_20bit_test */
-
-static void
-mono_rdwr_20bit_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *orig, *test ;
-       int                     k, pass ;
-
-       switch (format & SF_FORMAT_SUBMASK)
-       {       case SF_FORMAT_ALAC_16 :
-               case SF_FORMAT_ALAC_20 :
-               case SF_FORMAT_ALAC_24 :
-               case SF_FORMAT_ALAC_32 :
-                       allow_fd = 0 ;
-                       break ;
-
-               default :
-                       break ;
-               } ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       if ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_RAW
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_AU
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2)
-               unlink (filename) ;
-       else
-       {       /* Create a short file. */
-               create_short_file (filename) ;
-
-               /* Opening a already existing short file (ie invalid header) RDWR is disallowed.
-               ** If this returns a valif pointer sf_open() screwed up.
-               */
-               if ((file = sf_open (filename, SFM_RDWR, &sfinfo)))
-               {       printf ("\n\nLine %d: sf_open should (SFM_RDWR) have failed but didn't.\n", __LINE__) ;
-                       exit (1) ;
-                       } ;
-
-               /* Truncate the file to zero bytes. */
-               if (truncate (filename, 0) < 0)
-               {       printf ("\n\nLine %d: truncate (%s) failed", __LINE__, filename) ;
-                       perror (NULL) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Opening a zero length file RDWR is allowed, but the SF_INFO struct must contain
-       ** all the usual data required when opening the file in WRITE mode.
-       */
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       /* Do 3 writes followed by reads. After each, check the data and the current
-       ** read and write offsets.
-       */
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               /* Write some data. */
-               test_write_int_or_die (file, pass, orig, DATA_LENGTH, __LINE__) ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, pass * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_int_or_die (file, 0, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (BIT_20_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) A : Error at sample %d (0x%X => 0x%X).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_int (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, pass * DATA_LENGTH, pass * DATA_LENGTH) ;
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-
-       /* Open the file again to check the data. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Not enough frames in file. (%" PRId64 " < %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               }
-
-       if (! long_file_ok && sfinfo.frames != 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Incorrect number of frames in file. (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok)
-               test_read_write_position_or_die (file, __LINE__, 0, 0, 3 * DATA_LENGTH) ;
-       else
-               test_seek_or_die (file, 3 * DATA_LENGTH, SFM_WRITE | SEEK_SET, 3 * DATA_LENGTH, sfinfo.channels, __LINE__) ;
-
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, 3 * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_int_or_die (file, pass, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (BIT_20_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) B : Error at sample %d (0x%X => 0x%X).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_int (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-} /* mono_rdwr_int_test */
-
-static void
-new_rdwr_20bit_test (const char *filename, int format, int allow_fd)
-{      SNDFILE *wfile, *rwfile ;
-       SF_INFO sfinfo ;
-       int             *orig, *test ;
-       int             items, frames ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       wfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-       sf_command (wfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) ;
-       test_writef_int_or_die (wfile, 1, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-       test_writef_int_or_die (wfile, 2, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-
-       rwfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-       if (sfinfo.frames != 2 * frames)
-       {       printf ("\n\nLine %d : incorrect number of frames in file (%" PRId64 " should be %d)\n\n", __LINE__, sfinfo.frames, 2 * frames) ;
-               exit (1) ;
-               } ;
-
-       test_writef_int_or_die (wfile, 3, orig, frames, __LINE__) ;
-
-       test_readf_int_or_die (rwfile, 1, test, frames, __LINE__) ;
-       test_readf_int_or_die (rwfile, 2, test, frames, __LINE__) ;
-
-       sf_close (wfile) ;
-       sf_close (rwfile) ;
-} /* new_rdwr_20bit_test */
-
-
-/*======================================================================================
-*/
-
-static void mono_24bit_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void stereo_24bit_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void mono_rdwr_24bit_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void new_rdwr_24bit_test (const char *filename, int format, int allow_fd) ;
-static void multi_seek_test (const char * filename, int format) ;
-static void write_seek_extend_test (const char * filename, int format) ;
-
-static void
-pcm_test_24bit (const char *filename, int format, int long_file_ok)
-{      SF_INFO         sfinfo ;
-       int             *orig ;
-       int                     k, allow_fd ;
-
-       /* Sd2 files cannot be opened from an existing file descriptor. */
-       allow_fd = ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2) ? SF_FALSE : SF_TRUE ;
-
-       print_test_name ("pcm_test_24bit", filename) ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, (1.0 * 0x7F000000)) ;
-
-       orig = orig_data.i ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       /* Some test broken out here. */
-
-       mono_24bit_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* Sub format DWVW does not allow seeking. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       unlink (filename) ;
-               printf ("no seek : ok\n") ;
-               return ;
-               } ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-               )
-               mono_rdwr_24bit_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* If the format doesn't support stereo we're done. */
-       sfinfo.channels = 2 ;
-       if (sf_format_check (&sfinfo) == 0)
-       {       unlink (filename) ;
-               puts ("no stereo : ok") ;
-               return ;
-               } ;
-
-       stereo_24bit_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* New read/write test. Not sure if this is needed yet. */
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_PAF
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_VOC
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-                       )
-               new_rdwr_24bit_test (filename, format, allow_fd) ;
-
-       delete_file (format, filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* pcm_test_24bit */
-
-static void
-mono_24bit_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *orig, *test ;
-       sf_count_t      count ;
-       int                     k, items, total ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       items = DATA_LENGTH ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_write_int_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-       test_write_int_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-
-       /* Add non-audio data after the audio. */
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (int)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Mono : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test, items, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (TRIBYTE_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d: Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       oct_save_int (orig, test, items) ;
-                       exit (1) ;
-                       } ;
-
-       /* Test multiple short reads. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       total = 0 ;
-       for (k = 1 ; k <= 32 ; k++)
-       {       int ik ;
-
-               test_read_int_or_die (file, 0, test + total, k, __LINE__) ;
-               total += k ;
-
-               for (ik = 0 ; ik < total ; ik++)
-                       if (TRIBYTE_ERROR (orig [ik], test [ik]))
-                       {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, ik, orig [ik], test [ik]) ;
-                               exit (1) ;
-                               } ;
-               } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (TRIBYTE_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* For some codecs we can't go past here. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       sf_close (file) ;
-               unlink (filename) ;
-               printf ("no seek : ") ;
-               return ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, items + 10, SEEK_SET, items + 10, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (TRIBYTE_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 6, SEEK_CUR, items + 20, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test + 20, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (TRIBYTE_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (TRIBYTE_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample D (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Check read past end of file followed by sf_seek (sndfile, 0, SEEK_CUR). */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       count = 0 ;
-       while (count < sfinfo.frames)
-               count += sf_read_int (file, test, 311) ;
-
-       /* Check that no error has occurred. */
-       if (sf_error (file))
-       {       printf ("\n\nLine %d : Mono : error where there shouldn't have been one.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       /* Check that we haven't read beyond EOF. */
-       if (count > sfinfo.frames)
-       {       printf ("\n\nLines %d : read past end of file (%" PRId64 " should be %" PRId64 ")\n", __LINE__, count, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       test_seek_or_die (file, 0, SEEK_CUR, sfinfo.frames, sfinfo.channels, __LINE__) ;
-
-       sf_close (file) ;
-
-       multi_seek_test (filename, format) ;
-       write_seek_extend_test (filename, format) ;
-
-} /* mono_24bit_test */
-
-static void
-stereo_24bit_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *orig, *test ;
-       int                     k, items, frames ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, (1.0 * 0x7F000000)) ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_writef_int_or_die (file, 0, orig, frames, __LINE__) ;
-
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (int)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Stereo : Returned format incorrect (0x%08X => 0x%08X).\n",
-                               __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 2)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test, frames, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (TRIBYTE_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test, 2, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (TRIBYTE_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       /* Check for errors here. */
-       if (sf_error (file))
-       {       printf ("Line %d: Should NOT return an error.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       if (sf_read_int (file, test, 1) > 0)
-       {       printf ("Line %d: Should return 0.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! sf_error (file))
-       {       printf ("Line %d: Should return an error.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-       /*-----------------------*/
-
-       test_readf_int_or_die (file, 0, test + 10, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (TRIBYTE_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 8, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 40 ; k < 44 ; k++)
-               if (TRIBYTE_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (TRIBYTE_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-} /* stereo_24bit_test */
-
-static void
-mono_rdwr_24bit_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *orig, *test ;
-       int                     k, pass ;
-
-       switch (format & SF_FORMAT_SUBMASK)
-       {       case SF_FORMAT_ALAC_16 :
-               case SF_FORMAT_ALAC_20 :
-               case SF_FORMAT_ALAC_24 :
-               case SF_FORMAT_ALAC_32 :
-                       allow_fd = 0 ;
-                       break ;
-
-               default :
-                       break ;
-               } ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       if ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_RAW
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_AU
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2)
-               unlink (filename) ;
-       else
-       {       /* Create a short file. */
-               create_short_file (filename) ;
-
-               /* Opening a already existing short file (ie invalid header) RDWR is disallowed.
-               ** If this returns a valif pointer sf_open() screwed up.
-               */
-               if ((file = sf_open (filename, SFM_RDWR, &sfinfo)))
-               {       printf ("\n\nLine %d: sf_open should (SFM_RDWR) have failed but didn't.\n", __LINE__) ;
-                       exit (1) ;
-                       } ;
-
-               /* Truncate the file to zero bytes. */
-               if (truncate (filename, 0) < 0)
-               {       printf ("\n\nLine %d: truncate (%s) failed", __LINE__, filename) ;
-                       perror (NULL) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Opening a zero length file RDWR is allowed, but the SF_INFO struct must contain
-       ** all the usual data required when opening the file in WRITE mode.
-       */
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       /* Do 3 writes followed by reads. After each, check the data and the current
-       ** read and write offsets.
-       */
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               /* Write some data. */
-               test_write_int_or_die (file, pass, orig, DATA_LENGTH, __LINE__) ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, pass * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_int_or_die (file, 0, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (TRIBYTE_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) A : Error at sample %d (0x%X => 0x%X).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_int (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, pass * DATA_LENGTH, pass * DATA_LENGTH) ;
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-
-       /* Open the file again to check the data. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Not enough frames in file. (%" PRId64 " < %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               }
-
-       if (! long_file_ok && sfinfo.frames != 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Incorrect number of frames in file. (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok)
-               test_read_write_position_or_die (file, __LINE__, 0, 0, 3 * DATA_LENGTH) ;
-       else
-               test_seek_or_die (file, 3 * DATA_LENGTH, SFM_WRITE | SEEK_SET, 3 * DATA_LENGTH, sfinfo.channels, __LINE__) ;
-
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, 3 * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_int_or_die (file, pass, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (TRIBYTE_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) B : Error at sample %d (0x%X => 0x%X).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_int (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-} /* mono_rdwr_int_test */
-
-static void
-new_rdwr_24bit_test (const char *filename, int format, int allow_fd)
-{      SNDFILE *wfile, *rwfile ;
-       SF_INFO sfinfo ;
-       int             *orig, *test ;
-       int             items, frames ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       wfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-       sf_command (wfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) ;
-       test_writef_int_or_die (wfile, 1, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-       test_writef_int_or_die (wfile, 2, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-
-       rwfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-       if (sfinfo.frames != 2 * frames)
-       {       printf ("\n\nLine %d : incorrect number of frames in file (%" PRId64 " should be %d)\n\n", __LINE__, sfinfo.frames, 2 * frames) ;
-               exit (1) ;
-               } ;
-
-       test_writef_int_or_die (wfile, 3, orig, frames, __LINE__) ;
-
-       test_readf_int_or_die (rwfile, 1, test, frames, __LINE__) ;
-       test_readf_int_or_die (rwfile, 2, test, frames, __LINE__) ;
-
-       sf_close (wfile) ;
-       sf_close (rwfile) ;
-} /* new_rdwr_24bit_test */
-
-
-/*======================================================================================
-*/
-
-static void mono_int_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void stereo_int_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void mono_rdwr_int_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void new_rdwr_int_test (const char *filename, int format, int allow_fd) ;
-static void multi_seek_test (const char * filename, int format) ;
-static void write_seek_extend_test (const char * filename, int format) ;
-
-static void
-pcm_test_int (const char *filename, int format, int long_file_ok)
-{      SF_INFO         sfinfo ;
-       int             *orig ;
-       int                     k, allow_fd ;
-
-       /* Sd2 files cannot be opened from an existing file descriptor. */
-       allow_fd = ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2) ? SF_FALSE : SF_TRUE ;
-
-       print_test_name ("pcm_test_int", filename) ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, (1.0 * 0x7F000000)) ;
-
-       orig = orig_data.i ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       /* Some test broken out here. */
-
-       mono_int_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* Sub format DWVW does not allow seeking. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       unlink (filename) ;
-               printf ("no seek : ok\n") ;
-               return ;
-               } ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-               )
-               mono_rdwr_int_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* If the format doesn't support stereo we're done. */
-       sfinfo.channels = 2 ;
-       if (sf_format_check (&sfinfo) == 0)
-       {       unlink (filename) ;
-               puts ("no stereo : ok") ;
-               return ;
-               } ;
-
-       stereo_int_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* New read/write test. Not sure if this is needed yet. */
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_PAF
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_VOC
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-                       )
-               new_rdwr_int_test (filename, format, allow_fd) ;
-
-       delete_file (format, filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* pcm_test_int */
-
-static void
-mono_int_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *orig, *test ;
-       sf_count_t      count ;
-       int                     k, items, total ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       items = DATA_LENGTH ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_write_int_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-       test_write_int_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-
-       /* Add non-audio data after the audio. */
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (int)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Mono : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test, items, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (INT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d: Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       oct_save_int (orig, test, items) ;
-                       exit (1) ;
-                       } ;
-
-       /* Test multiple short reads. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       total = 0 ;
-       for (k = 1 ; k <= 32 ; k++)
-       {       int ik ;
-
-               test_read_int_or_die (file, 0, test + total, k, __LINE__) ;
-               total += k ;
-
-               for (ik = 0 ; ik < total ; ik++)
-                       if (INT_ERROR (orig [ik], test [ik]))
-                       {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, ik, orig [ik], test [ik]) ;
-                               exit (1) ;
-                               } ;
-               } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (INT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* For some codecs we can't go past here. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       sf_close (file) ;
-               unlink (filename) ;
-               printf ("no seek : ") ;
-               return ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, items + 10, SEEK_SET, items + 10, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (INT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 6, SEEK_CUR, items + 20, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test + 20, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (INT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_int_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (INT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample D (#%d : 0x%X => 0x%X).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Check read past end of file followed by sf_seek (sndfile, 0, SEEK_CUR). */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       count = 0 ;
-       while (count < sfinfo.frames)
-               count += sf_read_int (file, test, 311) ;
-
-       /* Check that no error has occurred. */
-       if (sf_error (file))
-       {       printf ("\n\nLine %d : Mono : error where there shouldn't have been one.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       /* Check that we haven't read beyond EOF. */
-       if (count > sfinfo.frames)
-       {       printf ("\n\nLines %d : read past end of file (%" PRId64 " should be %" PRId64 ")\n", __LINE__, count, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       test_seek_or_die (file, 0, SEEK_CUR, sfinfo.frames, sfinfo.channels, __LINE__) ;
-
-       sf_close (file) ;
-
-       multi_seek_test (filename, format) ;
-       write_seek_extend_test (filename, format) ;
-
-} /* mono_int_test */
-
-static void
-stereo_int_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *orig, *test ;
-       int                     k, items, frames ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, (1.0 * 0x7F000000)) ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_writef_int_or_die (file, 0, orig, frames, __LINE__) ;
-
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (int)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Stereo : Returned format incorrect (0x%08X => 0x%08X).\n",
-                               __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 2)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test, frames, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (INT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test, 2, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (INT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       /* Check for errors here. */
-       if (sf_error (file))
-       {       printf ("Line %d: Should NOT return an error.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       if (sf_read_int (file, test, 1) > 0)
-       {       printf ("Line %d: Should return 0.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! sf_error (file))
-       {       printf ("Line %d: Should return an error.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-       /*-----------------------*/
-
-       test_readf_int_or_die (file, 0, test + 10, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (INT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 8, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 40 ; k < 44 ; k++)
-               if (INT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_readf_int_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (INT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : 0x%X => 0x%X).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-} /* stereo_int_test */
-
-static void
-mono_rdwr_int_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       int             *orig, *test ;
-       int                     k, pass ;
-
-       switch (format & SF_FORMAT_SUBMASK)
-       {       case SF_FORMAT_ALAC_16 :
-               case SF_FORMAT_ALAC_20 :
-               case SF_FORMAT_ALAC_24 :
-               case SF_FORMAT_ALAC_32 :
-                       allow_fd = 0 ;
-                       break ;
-
-               default :
-                       break ;
-               } ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       if ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_RAW
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_AU
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2)
-               unlink (filename) ;
-       else
-       {       /* Create a short file. */
-               create_short_file (filename) ;
-
-               /* Opening a already existing short file (ie invalid header) RDWR is disallowed.
-               ** If this returns a valif pointer sf_open() screwed up.
-               */
-               if ((file = sf_open (filename, SFM_RDWR, &sfinfo)))
-               {       printf ("\n\nLine %d: sf_open should (SFM_RDWR) have failed but didn't.\n", __LINE__) ;
-                       exit (1) ;
-                       } ;
-
-               /* Truncate the file to zero bytes. */
-               if (truncate (filename, 0) < 0)
-               {       printf ("\n\nLine %d: truncate (%s) failed", __LINE__, filename) ;
-                       perror (NULL) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Opening a zero length file RDWR is allowed, but the SF_INFO struct must contain
-       ** all the usual data required when opening the file in WRITE mode.
-       */
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       /* Do 3 writes followed by reads. After each, check the data and the current
-       ** read and write offsets.
-       */
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               /* Write some data. */
-               test_write_int_or_die (file, pass, orig, DATA_LENGTH, __LINE__) ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, pass * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_int_or_die (file, 0, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (INT_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) A : Error at sample %d (0x%X => 0x%X).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_int (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, pass * DATA_LENGTH, pass * DATA_LENGTH) ;
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-
-       /* Open the file again to check the data. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Not enough frames in file. (%" PRId64 " < %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               }
-
-       if (! long_file_ok && sfinfo.frames != 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Incorrect number of frames in file. (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok)
-               test_read_write_position_or_die (file, __LINE__, 0, 0, 3 * DATA_LENGTH) ;
-       else
-               test_seek_or_die (file, 3 * DATA_LENGTH, SFM_WRITE | SEEK_SET, 3 * DATA_LENGTH, sfinfo.channels, __LINE__) ;
-
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, 3 * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_int_or_die (file, pass, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (INT_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) B : Error at sample %d (0x%X => 0x%X).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_int (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-} /* mono_rdwr_int_test */
-
-static void
-new_rdwr_int_test (const char *filename, int format, int allow_fd)
-{      SNDFILE *wfile, *rwfile ;
-       SF_INFO sfinfo ;
-       int             *orig, *test ;
-       int             items, frames ;
-
-       orig = orig_data.i ;
-       test = test_data.i ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       wfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-       sf_command (wfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) ;
-       test_writef_int_or_die (wfile, 1, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-       test_writef_int_or_die (wfile, 2, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-
-       rwfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-       if (sfinfo.frames != 2 * frames)
-       {       printf ("\n\nLine %d : incorrect number of frames in file (%" PRId64 " should be %d)\n\n", __LINE__, sfinfo.frames, 2 * frames) ;
-               exit (1) ;
-               } ;
-
-       test_writef_int_or_die (wfile, 3, orig, frames, __LINE__) ;
-
-       test_readf_int_or_die (rwfile, 1, test, frames, __LINE__) ;
-       test_readf_int_or_die (rwfile, 2, test, frames, __LINE__) ;
-
-       sf_close (wfile) ;
-       sf_close (rwfile) ;
-} /* new_rdwr_int_test */
-
-
-/*======================================================================================
-*/
-
-static void mono_float_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void stereo_float_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void mono_rdwr_float_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void new_rdwr_float_test (const char *filename, int format, int allow_fd) ;
-static void multi_seek_test (const char * filename, int format) ;
-static void write_seek_extend_test (const char * filename, int format) ;
-
-static void
-pcm_test_float (const char *filename, int format, int long_file_ok)
-{      SF_INFO         sfinfo ;
-       float           *orig ;
-       int                     k, allow_fd ;
-
-       /* Sd2 files cannot be opened from an existing file descriptor. */
-       allow_fd = ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2) ? SF_FALSE : SF_TRUE ;
-
-       print_test_name ("pcm_test_float", filename) ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, 1.0) ;
-
-       orig = orig_data.f ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       /* Some test broken out here. */
-
-       mono_float_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* Sub format DWVW does not allow seeking. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       unlink (filename) ;
-               printf ("no seek : ok\n") ;
-               return ;
-               } ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-               )
-               mono_rdwr_float_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* If the format doesn't support stereo we're done. */
-       sfinfo.channels = 2 ;
-       if (sf_format_check (&sfinfo) == 0)
-       {       unlink (filename) ;
-               puts ("no stereo : ok") ;
-               return ;
-               } ;
-
-       stereo_float_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* New read/write test. Not sure if this is needed yet. */
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_PAF
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_VOC
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-                       )
-               new_rdwr_float_test (filename, format, allow_fd) ;
-
-       delete_file (format, filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* pcm_test_float */
-
-static void
-mono_float_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       float           *orig, *test ;
-       sf_count_t      count ;
-       int                     k, items, total ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       orig = orig_data.f ;
-       test = test_data.f ;
-
-       items = DATA_LENGTH ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_write_float_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-       test_write_float_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-
-       /* Add non-audio data after the audio. */
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (float)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Mono : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_float_or_die (file, 0, test, items, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (FLOAT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d: Mono : Incorrect sample A (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       oct_save_float (orig, test, items) ;
-                       exit (1) ;
-                       } ;
-
-       /* Test multiple short reads. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       total = 0 ;
-       for (k = 1 ; k <= 32 ; k++)
-       {       int ik ;
-
-               test_read_float_or_die (file, 0, test + total, k, __LINE__) ;
-               total += k ;
-
-               for (ik = 0 ; ik < total ; ik++)
-                       if (FLOAT_ERROR (orig [ik], test [ik]))
-                       {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : %g => %g).\n", __LINE__, ik, orig [ik], test [ik]) ;
-                               exit (1) ;
-                               } ;
-               } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_read_float_or_die (file, 0, test, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (FLOAT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* For some codecs we can't go past here. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       sf_close (file) ;
-               unlink (filename) ;
-               printf ("no seek : ") ;
-               return ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, items + 10, SEEK_SET, items + 10, sfinfo.channels, __LINE__) ;
-
-       test_read_float_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (FLOAT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : %g => %g).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 6, SEEK_CUR, items + 20, sfinfo.channels, __LINE__) ;
-
-       test_read_float_or_die (file, 0, test + 20, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (FLOAT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : %g => %g).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_float_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (FLOAT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample D (#%d : %g => %g).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Check read past end of file followed by sf_seek (sndfile, 0, SEEK_CUR). */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       count = 0 ;
-       while (count < sfinfo.frames)
-               count += sf_read_float (file, test, 311) ;
-
-       /* Check that no error has occurred. */
-       if (sf_error (file))
-       {       printf ("\n\nLine %d : Mono : error where there shouldn't have been one.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       /* Check that we haven't read beyond EOF. */
-       if (count > sfinfo.frames)
-       {       printf ("\n\nLines %d : read past end of file (%" PRId64 " should be %" PRId64 ")\n", __LINE__, count, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       test_seek_or_die (file, 0, SEEK_CUR, sfinfo.frames, sfinfo.channels, __LINE__) ;
-
-       sf_close (file) ;
-
-       multi_seek_test (filename, format) ;
-       write_seek_extend_test (filename, format) ;
-
-} /* mono_float_test */
-
-static void
-stereo_float_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       float           *orig, *test ;
-       int                     k, items, frames ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, 1.0) ;
-
-       orig = orig_data.f ;
-       test = test_data.f ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_writef_float_or_die (file, 0, orig, frames, __LINE__) ;
-
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (float)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Stereo : Returned format incorrect (0x%08X => 0x%08X).\n",
-                               __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 2)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_readf_float_or_die (file, 0, test, frames, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (FLOAT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_readf_float_or_die (file, 0, test, 2, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (FLOAT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       /* Check for errors here. */
-       if (sf_error (file))
-       {       printf ("Line %d: Should NOT return an error.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       if (sf_read_float (file, test, 1) > 0)
-       {       printf ("Line %d: Should return 0.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! sf_error (file))
-       {       printf ("Line %d: Should return an error.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-       /*-----------------------*/
-
-       test_readf_float_or_die (file, 0, test + 10, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (FLOAT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 8, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_readf_float_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 40 ; k < 44 ; k++)
-               if (FLOAT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_readf_float_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (FLOAT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-} /* stereo_float_test */
-
-static void
-mono_rdwr_float_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       float           *orig, *test ;
-       int                     k, pass ;
-
-       switch (format & SF_FORMAT_SUBMASK)
-       {       case SF_FORMAT_ALAC_16 :
-               case SF_FORMAT_ALAC_20 :
-               case SF_FORMAT_ALAC_24 :
-               case SF_FORMAT_ALAC_32 :
-                       allow_fd = 0 ;
-                       break ;
-
-               default :
-                       break ;
-               } ;
-
-       orig = orig_data.f ;
-       test = test_data.f ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       if ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_RAW
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_AU
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2)
-               unlink (filename) ;
-       else
-       {       /* Create a short file. */
-               create_short_file (filename) ;
-
-               /* Opening a already existing short file (ie invalid header) RDWR is disallowed.
-               ** If this returns a valif pointer sf_open() screwed up.
-               */
-               if ((file = sf_open (filename, SFM_RDWR, &sfinfo)))
-               {       printf ("\n\nLine %d: sf_open should (SFM_RDWR) have failed but didn't.\n", __LINE__) ;
-                       exit (1) ;
-                       } ;
-
-               /* Truncate the file to zero bytes. */
-               if (truncate (filename, 0) < 0)
-               {       printf ("\n\nLine %d: truncate (%s) failed", __LINE__, filename) ;
-                       perror (NULL) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Opening a zero length file RDWR is allowed, but the SF_INFO struct must contain
-       ** all the usual data required when opening the file in WRITE mode.
-       */
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       /* Do 3 writes followed by reads. After each, check the data and the current
-       ** read and write offsets.
-       */
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               /* Write some data. */
-               test_write_float_or_die (file, pass, orig, DATA_LENGTH, __LINE__) ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, pass * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_float_or_die (file, 0, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (FLOAT_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) A : Error at sample %d (%g => %g).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_float (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, pass * DATA_LENGTH, pass * DATA_LENGTH) ;
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-
-       /* Open the file again to check the data. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Not enough frames in file. (%" PRId64 " < %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               }
-
-       if (! long_file_ok && sfinfo.frames != 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Incorrect number of frames in file. (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok)
-               test_read_write_position_or_die (file, __LINE__, 0, 0, 3 * DATA_LENGTH) ;
-       else
-               test_seek_or_die (file, 3 * DATA_LENGTH, SFM_WRITE | SEEK_SET, 3 * DATA_LENGTH, sfinfo.channels, __LINE__) ;
-
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, 3 * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_float_or_die (file, pass, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (FLOAT_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) B : Error at sample %d (%g => %g).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_float (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-} /* mono_rdwr_float_test */
-
-static void
-new_rdwr_float_test (const char *filename, int format, int allow_fd)
-{      SNDFILE *wfile, *rwfile ;
-       SF_INFO sfinfo ;
-       float           *orig, *test ;
-       int             items, frames ;
-
-       orig = orig_data.f ;
-       test = test_data.f ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       wfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-       sf_command (wfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) ;
-       test_writef_float_or_die (wfile, 1, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-       test_writef_float_or_die (wfile, 2, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-
-       rwfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-       if (sfinfo.frames != 2 * frames)
-       {       printf ("\n\nLine %d : incorrect number of frames in file (%" PRId64 " should be %d)\n\n", __LINE__, sfinfo.frames, 2 * frames) ;
-               exit (1) ;
-               } ;
-
-       test_writef_float_or_die (wfile, 3, orig, frames, __LINE__) ;
-
-       test_readf_float_or_die (rwfile, 1, test, frames, __LINE__) ;
-       test_readf_float_or_die (rwfile, 2, test, frames, __LINE__) ;
-
-       sf_close (wfile) ;
-       sf_close (rwfile) ;
-} /* new_rdwr_float_test */
-
-
-/*======================================================================================
-*/
-
-static void mono_double_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void stereo_double_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void mono_rdwr_double_test (const char *filename, int format, int long_file_ok, int allow_fd) ;
-static void new_rdwr_double_test (const char *filename, int format, int allow_fd) ;
-static void multi_seek_test (const char * filename, int format) ;
-static void write_seek_extend_test (const char * filename, int format) ;
-
-static void
-pcm_test_double (const char *filename, int format, int long_file_ok)
-{      SF_INFO         sfinfo ;
-       double          *orig ;
-       int                     k, allow_fd ;
-
-       /* Sd2 files cannot be opened from an existing file descriptor. */
-       allow_fd = ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2) ? SF_FALSE : SF_TRUE ;
-
-       print_test_name ("pcm_test_double", filename) ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, 1.0) ;
-
-       orig = orig_data.d ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       /* Some test broken out here. */
-
-       mono_double_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* Sub format DWVW does not allow seeking. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       unlink (filename) ;
-               printf ("no seek : ok\n") ;
-               return ;
-               } ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-               && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-               )
-               mono_rdwr_double_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* If the format doesn't support stereo we're done. */
-       sfinfo.channels = 2 ;
-       if (sf_format_check (&sfinfo) == 0)
-       {       unlink (filename) ;
-               puts ("no stereo : ok") ;
-               return ;
-               } ;
-
-       stereo_double_test (filename, format, long_file_ok, allow_fd) ;
-
-       /* New read/write test. Not sure if this is needed yet. */
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_PAF
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_VOC
-                       && (format & SF_FORMAT_TYPEMASK) != SF_FORMAT_FLAC
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_16
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_20
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_24
-                       && (format & SF_FORMAT_SUBMASK) != SF_FORMAT_ALAC_32
-                       )
-               new_rdwr_double_test (filename, format, allow_fd) ;
-
-       delete_file (format, filename) ;
-
-       puts ("ok") ;
-       return ;
-} /* pcm_test_double */
-
-static void
-mono_double_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       double          *orig, *test ;
-       sf_count_t      count ;
-       int                     k, items, total ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       orig = orig_data.d ;
-       test = test_data.d ;
-
-       items = DATA_LENGTH ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_write_double_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-       test_write_double_or_die (file, 0, orig, items, __LINE__) ;
-       sf_write_sync (file) ;
-
-       /* Add non-audio data after the audio. */
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (double)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Mono : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > 2 * items)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, items) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Mono : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_read_double_or_die (file, 0, test, items, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (FLOAT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d: Mono : Incorrect sample A (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       oct_save_double (orig, test, items) ;
-                       exit (1) ;
-                       } ;
-
-       /* Test multiple short reads. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       total = 0 ;
-       for (k = 1 ; k <= 32 ; k++)
-       {       int ik ;
-
-               test_read_double_or_die (file, 0, test + total, k, __LINE__) ;
-               total += k ;
-
-               for (ik = 0 ; ik < total ; ik++)
-                       if (FLOAT_ERROR (orig [ik], test [ik]))
-                       {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : %g => %g).\n", __LINE__, ik, orig [ik], test [ik]) ;
-                               exit (1) ;
-                               } ;
-               } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, test, 4, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (FLOAT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* For some codecs we can't go past here. */
-       if ((format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_16 ||
-                       (format & SF_FORMAT_SUBMASK) == SF_FORMAT_DWVW_24)
-       {       sf_close (file) ;
-               unlink (filename) ;
-               printf ("no seek : ") ;
-               return ;
-               } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, items + 10, SEEK_SET, items + 10, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (FLOAT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : %g => %g).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 6, SEEK_CUR, items + 20, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, test + 20, 4, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (FLOAT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample A (#%d : %g => %g).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_read_double_or_die (file, 0, test + 10, 4, __LINE__) ;
-       for (k = 10 ; k < 14 ; k++)
-               if (FLOAT_ERROR (orig [k], test [k]))
-               {       printf ("\n\nLine %d : Mono : Incorrect sample D (#%d : %g => %g).\n", __LINE__, k, test [k], orig [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Check read past end of file followed by sf_seek (sndfile, 0, SEEK_CUR). */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       count = 0 ;
-       while (count < sfinfo.frames)
-               count += sf_read_double (file, test, 311) ;
-
-       /* Check that no error has occurred. */
-       if (sf_error (file))
-       {       printf ("\n\nLine %d : Mono : error where there shouldn't have been one.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       /* Check that we haven't read beyond EOF. */
-       if (count > sfinfo.frames)
-       {       printf ("\n\nLines %d : read past end of file (%" PRId64 " should be %" PRId64 ")\n", __LINE__, count, sfinfo.frames) ;
-               exit (1) ;
-               } ;
-
-       test_seek_or_die (file, 0, SEEK_CUR, sfinfo.frames, sfinfo.channels, __LINE__) ;
-
-       sf_close (file) ;
-
-       multi_seek_test (filename, format) ;
-       write_seek_extend_test (filename, format) ;
-
-} /* mono_double_test */
-
-static void
-stereo_double_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       double          *orig, *test ;
-       int                     k, items, frames ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       gen_windowed_sine_double (orig_data.d, DATA_LENGTH, 1.0) ;
-
-       orig = orig_data.d ;
-       test = test_data.d ;
-
-       /* Make this a macro so gdb steps over it in one go. */
-       CONVERT_DATA (k, DATA_LENGTH, orig, orig_data.d) ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-
-       sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
-
-       test_writef_double_or_die (file, 0, orig, frames, __LINE__) ;
-
-       sf_set_string (file, SF_STR_COPYRIGHT, "Copyright (c) 2003") ;
-
-       sf_close (file) ;
-
-       memset (test, 0, items * sizeof (double)) ;
-
-       if ((format & SF_FORMAT_TYPEMASK) != SF_FORMAT_RAW)
-               memset (&sfinfo, 0, sizeof (sfinfo)) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Stereo : Returned format incorrect (0x%08X => 0x%08X).\n",
-                               __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok && sfinfo.frames > frames)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of frames in file (too long). (%" PRId64 " should be %d)\n",
-                               __LINE__, sfinfo.frames, frames) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 2)
-       {       printf ("\n\nLine %d : Stereo : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       check_log_buffer_or_die (file, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, test, frames, __LINE__) ;
-       for (k = 0 ; k < items ; k++)
-               if (FLOAT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to start of file. */
-       test_seek_or_die (file, 0, SEEK_SET, 0, sfinfo.channels, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, test, 2, __LINE__) ;
-       for (k = 0 ; k < 4 ; k++)
-               if (FLOAT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from start of file. */
-       test_seek_or_die (file, 10, SEEK_SET, 10, sfinfo.channels, __LINE__) ;
-
-       /* Check for errors here. */
-       if (sf_error (file))
-       {       printf ("Line %d: Should NOT return an error.\n", __LINE__) ;
-               puts (sf_strerror (file)) ;
-               exit (1) ;
-               } ;
-
-       if (sf_read_double (file, test, 1) > 0)
-       {       printf ("Line %d: Should return 0.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! sf_error (file))
-       {       printf ("Line %d: Should return an error.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-       /*-----------------------*/
-
-       test_readf_double_or_die (file, 0, test + 10, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (FLOAT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from current position. */
-       test_seek_or_die (file, 8, SEEK_CUR, 20, sfinfo.channels, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 40 ; k < 44 ; k++)
-               if (FLOAT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       /* Seek to offset from end of file. */
-       test_seek_or_die (file, -1 * (sfinfo.frames - 10), SEEK_END, 10, sfinfo.channels, __LINE__) ;
-
-       test_readf_double_or_die (file, 0, test + 20, 2, __LINE__) ;
-       for (k = 20 ; k < 24 ; k++)
-               if (FLOAT_ERROR (test [k], orig [k]))
-               {       printf ("\n\nLine %d : Stereo : Incorrect sample (#%d : %g => %g).\n", __LINE__, k, orig [k], test [k]) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-} /* stereo_double_test */
-
-static void
-mono_rdwr_double_test (const char *filename, int format, int long_file_ok, int allow_fd)
-{      SNDFILE         *file ;
-       SF_INFO         sfinfo ;
-       double          *orig, *test ;
-       int                     k, pass ;
-
-       switch (format & SF_FORMAT_SUBMASK)
-       {       case SF_FORMAT_ALAC_16 :
-               case SF_FORMAT_ALAC_20 :
-               case SF_FORMAT_ALAC_24 :
-               case SF_FORMAT_ALAC_32 :
-                       allow_fd = 0 ;
-                       break ;
-
-               default :
-                       break ;
-               } ;
-
-       orig = orig_data.d ;
-       test = test_data.d ;
-
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       if ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_RAW
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_AU
-               || (format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2)
-               unlink (filename) ;
-       else
-       {       /* Create a short file. */
-               create_short_file (filename) ;
-
-               /* Opening a already existing short file (ie invalid header) RDWR is disallowed.
-               ** If this returns a valif pointer sf_open() screwed up.
-               */
-               if ((file = sf_open (filename, SFM_RDWR, &sfinfo)))
-               {       printf ("\n\nLine %d: sf_open should (SFM_RDWR) have failed but didn't.\n", __LINE__) ;
-                       exit (1) ;
-                       } ;
-
-               /* Truncate the file to zero bytes. */
-               if (truncate (filename, 0) < 0)
-               {       printf ("\n\nLine %d: truncate (%s) failed", __LINE__, filename) ;
-                       perror (NULL) ;
-                       exit (1) ;
-                       } ;
-               } ;
-
-       /* Opening a zero length file RDWR is allowed, but the SF_INFO struct must contain
-       ** all the usual data required when opening the file in WRITE mode.
-       */
-       sfinfo.samplerate       = SAMPLE_RATE ;
-       sfinfo.frames           = DATA_LENGTH ;
-       sfinfo.channels         = 1 ;
-       sfinfo.format           = format ;
-
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       /* Do 3 writes followed by reads. After each, check the data and the current
-       ** read and write offsets.
-       */
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               /* Write some data. */
-               test_write_double_or_die (file, pass, orig, DATA_LENGTH, __LINE__) ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, pass * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_double_or_die (file, 0, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (FLOAT_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) A : Error at sample %d (%g => %g).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_double (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, pass * DATA_LENGTH, pass * DATA_LENGTH) ;
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-
-       /* Open the file again to check the data. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-
-       if (sfinfo.format != format)
-       {       printf ("\n\nLine %d : Returned format incorrect (0x%08X => 0x%08X).\n", __LINE__, format, sfinfo.format) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.frames < 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Not enough frames in file. (%" PRId64 " < %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               }
-
-       if (! long_file_ok && sfinfo.frames != 3 * DATA_LENGTH)
-       {       printf ("\n\nLine %d : Incorrect number of frames in file. (%" PRId64 " should be %d)\n", __LINE__, sfinfo.frames, 3 * DATA_LENGTH) ;
-               exit (1) ;
-               } ;
-
-       if (sfinfo.channels != 1)
-       {       printf ("\n\nLine %d : Incorrect number of channels in file.\n", __LINE__) ;
-               exit (1) ;
-               } ;
-
-       if (! long_file_ok)
-               test_read_write_position_or_die (file, __LINE__, 0, 0, 3 * DATA_LENGTH) ;
-       else
-               test_seek_or_die (file, 3 * DATA_LENGTH, SFM_WRITE | SEEK_SET, 3 * DATA_LENGTH, sfinfo.channels, __LINE__) ;
-
-       for (pass = 1 ; pass <= 3 ; pass ++)
-       {       orig [20] = pass * 2 ;
-
-               test_read_write_position_or_die (file, __LINE__, pass, (pass - 1) * DATA_LENGTH, 3 * DATA_LENGTH) ;
-
-               /* Read what we just wrote. */
-               test_read_double_or_die (file, pass, test, DATA_LENGTH, __LINE__) ;
-
-               /* Check the data. */
-               for (k = 0 ; k < DATA_LENGTH ; k++)
-                       if (FLOAT_ERROR (orig [k], test [k]))
-                       {       printf ("\n\nLine %d (pass %d) B : Error at sample %d (%g => %g).\n", __LINE__, pass, k, orig [k], test [k]) ;
-                               oct_save_double (orig, test, DATA_LENGTH) ;
-                               exit (1) ;
-                               } ;
-
-               } ; /* for (pass ...) */
-
-       sf_close (file) ;
-} /* mono_rdwr_double_test */
-
-static void
-new_rdwr_double_test (const char *filename, int format, int allow_fd)
-{      SNDFILE *wfile, *rwfile ;
-       SF_INFO sfinfo ;
-       double          *orig, *test ;
-       int             items, frames ;
-
-       orig = orig_data.d ;
-       test = test_data.d ;
-
-       sfinfo.samplerate       = 44100 ;
-       sfinfo.frames           = SILLY_WRITE_COUNT ; /* Wrong length. Library should correct this on sf_close. */
-       sfinfo.channels         = 2 ;
-       sfinfo.format           = format ;
-
-       items = DATA_LENGTH ;
-       frames = items / sfinfo.channels ;
-
-       wfile = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
-       sf_command (wfile, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) ;
-       test_writef_double_or_die (wfile, 1, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-       test_writef_double_or_die (wfile, 2, orig, frames, __LINE__) ;
-       sf_write_sync (wfile) ;
-
-       rwfile = test_open_file_or_die (filename, SFM_RDWR, &sfinfo, allow_fd, __LINE__) ;
-       if (sfinfo.frames != 2 * frames)
-       {       printf ("\n\nLine %d : incorrect number of frames in file (%" PRId64 " should be %d)\n\n", __LINE__, sfinfo.frames, 2 * frames) ;
-               exit (1) ;
-               } ;
-
-       test_writef_double_or_die (wfile, 3, orig, frames, __LINE__) ;
-
-       test_readf_double_or_die (rwfile, 1, test, frames, __LINE__) ;
-       test_readf_double_or_die (rwfile, 2, test, frames, __LINE__) ;
-
-       sf_close (wfile) ;
-       sf_close (rwfile) ;
-} /* new_rdwr_double_test */
-
-
-
-/*----------------------------------------------------------------------------------------
-*/
-
-static void
-empty_file_test (const char *filename, int format)
-{      SNDFILE         *file ;
-       SF_INFO info ;
-       int allow_fd ;
-
-       /* Sd2 files cannot be opened from an existing file descriptor. */
-       allow_fd = ((format & SF_FORMAT_TYPEMASK) == SF_FORMAT_SD2) ? SF_FALSE : SF_TRUE ;
-
-       print_test_name ("empty_file_test", filename) ;
-
-       unlink (filename) ;
-
-       info.samplerate = 48000 ;
-       info.channels = 2 ;
-       info.format = format ;
-
-       if (sf_format_check (&info) == SF_FALSE)
-       {       info.channels = 1 ;
-               if (sf_format_check (&info) == SF_FALSE)
-               {       puts ("invalid file format") ;
-                       return ;
-                       } ;
-               } ;
-
-       /* Create an empty file. */
-       file = test_open_file_or_die (filename, SFM_WRITE, &info, allow_fd, __LINE__) ;
-       sf_close (file) ;
-
-       /* Open for read and check the length. */
-       file = test_open_file_or_die (filename, SFM_READ, &info, allow_fd, __LINE__) ;
-
-       if (info.frames != 0)
-       {       printf ("\n\nError : frame count (%" PRId64 ") should be zero.\n", info.frames) ;
-                       exit (1) ;
-                       } ;
-
-       sf_close (file) ;
-
-       /* Open for read/write and check the length. */
-       file = test_open_file_or_die (filename, SFM_RDWR, &info, allow_fd, __LINE__) ;
-
-       if (info.frames != 0)
-       {       printf ("\n\nError : frame count (%" PRId64 ") should be zero.\n", info.frames) ;
-               exit (1) ;
-               } ;
-
-       sf_close (file) ;
-
-       /* Open for read and check the length. */
-       file = test_open_file_or_die (filename, SFM_READ, &info, allow_fd, __LINE__) ;
-
-       if (info.frames != 0)
-       {       printf ("\n\nError : frame count (%" PRId64 ") should be zero.\n", info.frames) ;
-               exit (1) ;
-               } ;
-
-       sf_close (file) ;
-
-       check_open_file_count_or_die (__LINE__) ;
-
-       unlink (filename) ;
-       puts ("ok") ;
-
-       return ;
-} /* empty_file_test */
-
-
-/*----------------------------------------------------------------------------------------
-*/
-
-static void
-create_short_file (const char *filename)
-{      FILE *file ;
-
-       if (! (file = fopen (filename, "w")))
-       {       printf ("create_short_file : fopen (%s, \"w\") failed.", filename) ;
-               fflush (stdout) ;
-               perror (NULL) ;
-               exit (1) ;
-               } ;
-
-       fprintf (file, "This is the file data.\n") ;
-
-       fclose (file) ;
-} /* create_short_file */
-
-
-static void
-multi_seek_test (const char * filename, int format)
-{      SNDFILE * file ;
-       SF_INFO info ;
-       sf_count_t pos ;
-       int k ;
-
-       /* This test doesn't work on the following. */
-       switch (format & SF_FORMAT_TYPEMASK)
-       {       case SF_FORMAT_RAW :
-                       return ;
-
-               default :
-                       break ;
-               } ;
-
-       memset (&info, 0, sizeof (info)) ;
-
-       generate_file (filename, format, 88200) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &info, SF_FALSE, __LINE__) ;
-
-       for (k = 0 ; k < 10 ; k++)
-       {       pos = info.frames / (k + 2) ;
-               test_seek_or_die (file, pos, SEEK_SET, pos, info.channels, __LINE__) ;
-               } ;
-
-       sf_close (file) ;
-} /* multi_seek_test */
-
-static void
-write_seek_extend_test (const char * filename, int format)
-{      SNDFILE * file ;
-       SF_INFO info ;
-       short   *orig, *test ;
-       unsigned items, k ;
-
-       /* This test doesn't work on the following container formats. */
-       switch (format & SF_FORMAT_TYPEMASK)
-       {       case SF_FORMAT_FLAC :
-               case SF_FORMAT_HTK :
-               case SF_FORMAT_PAF :
-               case SF_FORMAT_SDS :
-               case SF_FORMAT_SVX :
-                       return ;
-
-               default :
-                       break ;
-               } ;
-
-       /* This test doesn't work on the following codec formats. */
-       switch (format & SF_FORMAT_SUBMASK)
-       {       case SF_FORMAT_ALAC_16 :
-               case SF_FORMAT_ALAC_20 :
-               case SF_FORMAT_ALAC_24 :
-               case SF_FORMAT_ALAC_32 :
-                       return ;
-
-               default :
-                       break ;
-               } ;
-
-       memset (&info, 0, sizeof (info)) ;
-
-       info.samplerate = 48000 ;
-       info.channels = 1 ;
-       info.format = format ;
-
-       items = 512 ;
-       exit_if_true (items > ARRAY_LEN (orig_data.s), "Line %d : Bad assumption.\n", __LINE__) ;
-
-       orig = orig_data.s ;
-       test = test_data.s ;
-
-       for (k = 0 ; k < ARRAY_LEN (orig_data.s) ; k++)
-               orig [k] = 0x3fff ;
-
-       file = test_open_file_or_die (filename, SFM_WRITE, &info, SF_FALSE, __LINE__) ;
-       test_write_short_or_die (file, 0, orig, items, __LINE__) ;
-
-       /* Extend the file using a seek. */
-       test_seek_or_die (file, 2 * items, SEEK_SET, 2 * items, info.channels, __LINE__) ;
-
-       test_writef_short_or_die (file, 0, orig, items, __LINE__) ;
-       sf_close (file) ;
-
-       file = test_open_file_or_die (filename, SFM_READ, &info, SF_FALSE, __LINE__) ;
-       test_read_short_or_die (file, 0, test, 3 * items, __LINE__) ;
-       sf_close (file) ;
-
-       /* Can't do these formats due to scaling. */
-       switch (format & SF_FORMAT_SUBMASK)
-       {       case SF_FORMAT_PCM_S8 :
-               case SF_FORMAT_PCM_U8 :
-                       return ;
-               default :
-                       break ;
-               } ;
-
-       for (k = 0 ; k < items ; k++)
-       {       exit_if_true (test [k] != 0x3fff, "Line %d : test [%d] == %d, should be 0x3fff.\n", __LINE__, k, test [k]) ;
-               exit_if_true (test [items + k] != 0, "Line %d : test [%d] == %d, should be 0.\n", __LINE__, items + k, test [items + k]) ;
-               exit_if_true (test [2 * items + k] != 0x3fff, "Line %d : test [%d] == %d, should be 0x3fff.\n", __LINE__, 2 * items + k, test [2 * items + k]) ;
-               } ;
-
-       return ;
-} /* write_seek_extend_test */
-
-
index fdad34c..b908db0 100644 (file)
@@ -1,6 +1,6 @@
 [+ AutoGen5 template c +]
 /*
-** Copyright (C) 1999-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
+** Copyright (C) 1999-2017 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
@@ -366,7 +366,7 @@ main (int argc, char **argv)
                } ;
 
        if (do_all || ! strcmp (argv [1], "flac"))
-       {       if (HAVE_EXTERNAL_LIBS)
+       {       if (HAVE_EXTERNAL_XIPH_LIBS)
                {       pcm_test_char   ("char.flac"    , SF_FORMAT_FLAC | SF_FORMAT_PCM_S8, SF_TRUE) ;
                        pcm_test_short  ("short.flac"   , SF_FORMAT_FLAC | SF_FORMAT_PCM_16, SF_TRUE) ;
                        pcm_test_24bit  ("24bit.flac"   , SF_FORMAT_FLAC | SF_FORMAT_PCM_24, SF_TRUE) ;
@@ -451,6 +451,8 @@ pcm_test_[+ (get "type_name") +] (const char *filename, int format, int long_fil
        sfinfo.channels         = 1 ;
        sfinfo.format           = format ;
 
+       test_sf_format_or_die (&sfinfo, __LINE__) ;
+
        gen_windowed_sine_double (orig_data.d, DATA_LENGTH, [+ (get "max_val") +]) ;
 
        orig = orig_data.[+ (get "data_field") +] ;
@@ -526,6 +528,11 @@ mono_[+ (get "type_name") +]_test (const char *filename, int format, int long_fi
 
        file = test_open_file_or_die (filename, SFM_WRITE, &sfinfo, allow_fd, __LINE__) ;
 
+       if (sfinfo.frames || sfinfo.sections || sfinfo.seekable)
+       {       printf ("\n\nLine %d : Weird SF_INFO fields.\n", __LINE__) ;
+               exit (1) ;
+               } ;
+
        sf_set_string (file, SF_STR_ARTIST, "Your name here") ;
 
        test_write_[+ (get "data_type") +]_or_die (file, 0, orig, items, __LINE__) ;
@@ -565,6 +572,11 @@ mono_[+ (get "type_name") +]_test (const char *filename, int format, int long_fi
                exit (1) ;
                } ;
 
+       if (sfinfo.seekable != 1)
+       {       printf ("\n\nLine %d : File should be seekable.\n", __LINE__) ;
+               exit (1) ;
+               } ;
+
        check_log_buffer_or_die (file, __LINE__) ;
 
        test_read_[+ (get "data_type") +]_or_die (file, 0, test, items, __LINE__) ;
@@ -847,8 +859,8 @@ mono_rdwr_[+ (get "type_name") +]_test (const char *filename, int format, int lo
                        } ;
 
                /* Truncate the file to zero bytes. */
-               if (truncate (filename, 0) < 0)
-               {       printf ("\n\nLine %d: truncate (%s) failed", __LINE__, filename) ;
+               if (truncate_file_to_zero (filename) < 0)
+               {       printf ("\n\nLine %d: truncate_file_to_zero (%s) failed", __LINE__, filename) ;
                        perror (NULL) ;
                        exit (1) ;
                        } ;
@@ -1001,6 +1013,7 @@ empty_file_test (const char *filename, int format)
        info.samplerate = 48000 ;
        info.channels = 2 ;
        info.format = format ;
+       info.frames = 0 ;
 
        if (sf_format_check (&info) == SF_FALSE)
        {       info.channels = 1 ;
@@ -1163,6 +1176,11 @@ write_seek_extend_test (const char * filename, int format)
        test_read_short_or_die (file, 0, test, 3 * items, __LINE__) ;
        sf_close (file) ;
 
+       if (info.frames < 3 * items)
+       {       printf ("\n\nLine %d : Incorrect number of frames in file (too short). (%" PRId64 " should be %d)\n", __LINE__, info.frames, 3 * items) ;
+               exit (1) ;
+               } ;
+
        /* Can't do these formats due to scaling. */
        switch (format & SF_FORMAT_SUBMASK)
        {       case SF_FORMAT_PCM_S8 :