Update libsndfile to 1.0.29pre2+git
This pulls in MANY (over 890) changes compared to our from our current 1.0.24 version.
This commit is contained in:
parent
4ac45bb5f8
commit
b749a16943
|
@ -1,50 +0,0 @@
|
|||
Index: src/wav.c
|
||||
===================================================================
|
||||
--- src/wav.c (revision 12460)
|
||||
+++ src/wav.c (working copy)
|
||||
@@ -89,6 +89,8 @@
|
||||
#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'))
|
||||
@@ -1208,6 +1210,14 @@
|
||||
psf_binheader_writef (psf, "ms", IGNR_MARKER, psf->strings [k].str) ;
|
||||
break ;
|
||||
|
||||
+ case SF_STR_ALBUM :
|
||||
+ psf_binheader_writef (psf, "ms", IPRD_MARKER, psf->strings [k].str) ;
|
||||
+ break ;
|
||||
+
|
||||
+ case SF_STR_TRACKNUMBER :
|
||||
+ psf_binheader_writef (psf, "ms", ITRK_MARKER, psf->strings [k].str) ;
|
||||
+ break ;
|
||||
+
|
||||
default :
|
||||
break ;
|
||||
} ;
|
||||
@@ -1338,6 +1348,8 @@
|
||||
case IPRD_MARKER :
|
||||
case ISBJ_MARKER :
|
||||
case ISRC_MARKER :
|
||||
+ case IAUT_MARKER :
|
||||
+ case ITRK_MARKER :
|
||||
bytesread += psf_binheader_readf (psf, "4", &dword) ;
|
||||
dword += (dword & 1) ;
|
||||
if (dword >= SIGNED_SIZEOF (psf->u.cbuf))
|
||||
@@ -1434,6 +1446,12 @@
|
||||
case IGNR_MARKER :
|
||||
psf_store_string (psf, SF_STR_GENRE, psf->u.cbuf) ;
|
||||
break ;
|
||||
+ case IPRD_MARKER :
|
||||
+ psf_store_string (psf, SF_STR_ALBUM, psf->u.cbuf) ;
|
||||
+ break ;
|
||||
+ case ITRK_MARKER :
|
||||
+ psf_store_string (psf, SF_STR_TRACKNUMBER, psf->u.cbuf) ;
|
||||
+ break ;
|
||||
} ;
|
||||
} ;
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
>From 526864fc49542c8be0a117ae39c45902f86a4ccd Mon Sep 17 00:00:00 2001
|
||||
From: Richard Ash <richard@audacityteam.org>
|
||||
Date: Fri, 16 Aug 2013 22:40:15 +0100
|
||||
Subject: [PATCH] Add support for Album and Track tags in RIFF files
|
||||
Add support for Album and Track tags in RIFF files in the LIST chunk of WAV files
|
||||
as per other formats. Patch by Joel Bouchat <bouchat@hotmail.com> against
|
||||
libsndfile 1.0.24, forward-ported by Richard Ash
|
||||
|
||||
---
|
||||
src/wav.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/wav.c b/src/wav.c
|
||||
index daaba39..d28b18d 100644
|
||||
--- a/src/wav.c
|
||||
+++ b/src/wav.c
|
||||
@@ -104,6 +104,7 @@
|
||||
#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'))
|
||||
@@ -1253,6 +1254,14 @@ wav_write_strings (SF_PRIVATE *psf, int location)
|
||||
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 ;
|
||||
} ;
|
||||
@@ -1384,6 +1393,7 @@ wav_subchunk_parse (SF_PRIVATE *psf, int chunk, uint32_t length)
|
||||
case ISBJ_MARKER :
|
||||
case ISRC_MARKER :
|
||||
case IAUT_MARKER :
|
||||
+ case ITRK_MARKER :
|
||||
bytesread += psf_binheader_readf (psf, "4", &dword) ;
|
||||
dword += (dword & 1) ;
|
||||
if (dword >= SIGNED_SIZEOF (buffer))
|
||||
@@ -1477,6 +1487,12 @@ wav_subchunk_parse (SF_PRIVATE *psf, int chunk, uint32_t length)
|
||||
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 ;
|
||||
} ;
|
||||
} ;
|
||||
|
||||
--
|
||||
1.8.1.5
|
||||
|
|
@ -12,3 +12,46 @@ apart from code in the following directories:
|
|||
modifications were required to integrate these files into libsndfile. The
|
||||
changes are listed in src/G72x/ChangeLog.
|
||||
|
||||
|
||||
Others:
|
||||
|
||||
2013-03-07 Michael Pruett
|
||||
2013-02-11 Chris Roberts c.roberts@csrfm.com
|
||||
2012-03-17 IOhannes m zmoelnig
|
||||
2013-02-21 Jan Starry
|
||||
2012-01-20 Bodo
|
||||
2011-06-23 Tim van der Molen
|
||||
2010-12-01 Tim Blechmann
|
||||
2010-10-04 Matti Nykyri
|
||||
2010-09-17 Brian Lewis
|
||||
2010-02-22 Robin Gareus
|
||||
2010-01-07 Christian Weisgerber and Jacob Meuserto
|
||||
2009-10-18 Olivier Tristan
|
||||
2009-10-14, 2009-08-30 Uli Franke
|
||||
2009-06-24, 2008-11-19, 2004-09-22, 2004-06-17, 2003-05-03, 2003-05-02 Conrad Parker
|
||||
2009-05-22 Lennart Poettering
|
||||
2008-07-03, 2006-10-22, 2006-10-18 Fons Adriaensen
|
||||
2008-04-19 David Yeo
|
||||
2008-01-20 Yair K.
|
||||
2007-12-03 Robs
|
||||
2007-07-12 Ed Schouten
|
||||
2007-06-07 Trent Apted
|
||||
2007-04-14, 2003-12-12 André Pang
|
||||
2007-04-14 Reuben Thomas
|
||||
2006-11-09 Jonathan Woithe
|
||||
2006-03-26 Diego 'Flameeyes' Pettenò
|
||||
2006-03-17 Paul Davis
|
||||
2006-03-09 Jesse Chappell
|
||||
2006-01-09, 2005-12-28 John ffitch
|
||||
2005-09-21 David A. van Leeuwen
|
||||
2005-08-15 Mo DeJong
|
||||
2005-04-30 David Viens
|
||||
2004-12-29 Steve Baker
|
||||
2004-09-05 Denis Cote
|
||||
2004-06-28 Stanko Juzbasic
|
||||
2004-02-14 Frank Neumann
|
||||
2003-08-15 Axel Röbel
|
||||
2003-08-06 Peter Miller
|
||||
2003-07-21 Tero Pelander
|
||||
2003-02-10 Antoine Mathys
|
||||
2002-12-30 Marek Peteraj
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# 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.
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,23 @@
|
|||
## Submitting Issues.
|
||||
|
||||
* If your issue is that libsndfile is not able to or is incorrectly reading one
|
||||
of your files, please include the output of the `sndfile-info` program run
|
||||
against the file.
|
||||
* If you are writing a program that uses libsndfile and you think there is a bug
|
||||
in libsndfile, reduce your program to the minimal example, make sure you compile
|
||||
it with warnings on (for GCC I would recommend at least `-Wall -Wextra`) and that
|
||||
your program is warning free, and that is is error free when run under Valgrind
|
||||
or compiled with AddressSanitizer.
|
||||
|
||||
## Submitting Patches.
|
||||
|
||||
* Patches should pass all existing tests
|
||||
* 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.
|
|
@ -1,347 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,791 +0,0 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 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:
|
|
@ -1,527 +0,0 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-11-20.07; # 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.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# 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_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
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
|
||||
no_target_directory=
|
||||
|
||||
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
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
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
|
||||
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 -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
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.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/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.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 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
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob 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` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
File diff suppressed because it is too large
Load Diff
|
@ -1,215 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2013 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:
|
|
@ -1,3 +1,874 @@
|
|||
2013-04-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* Makefile.am
|
||||
Make sure checkprograms are built as part of 'make test-tarball'.
|
||||
Closes: https://github.com/erikd/libsndfile/issues/37
|
||||
|
||||
2013-03-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/dft_cmp.c
|
||||
Fix a buffer overflow detected using GCC 4.8's -fsantiize=address runtime
|
||||
error checking functionality. This was a buffer overflow in libsndfile's
|
||||
test suite, not in the actual library code.
|
||||
|
||||
2013-03-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* M4/gcc_version.m4
|
||||
Fix to work with OpenBSD's sed.
|
||||
|
||||
2013-03-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/ALAC/alac_encoder.c
|
||||
Patch from Michael Pruett (author of libaudiofile) to add correct byte
|
||||
swapping for the mChannelLayoutTag field.
|
||||
|
||||
2013-03-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* doc/bugs.html
|
||||
Bugs should bt reported on the github issue tracker.
|
||||
|
||||
2013-02-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac
|
||||
Improve sanitization of FLAC_CFLAGS value.
|
||||
|
||||
2013-02-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/Makefile.am
|
||||
Call python interpreter instead of using '#!' in script. Thanks to Jan
|
||||
Stary for reporting this.
|
||||
|
||||
* doc/index.html doc/FAQ.html
|
||||
Make internal links relative. Patch from Jan Stary.
|
||||
|
||||
2013-02-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/test_endswap.def src/test_endswap.tpl
|
||||
Add tests for psf_put_be32() and psf_put_be64().
|
||||
|
||||
* src/sfendian.h src/test_endswap.(def|tpl)
|
||||
Add functions psf_get_be(16|32|64) with tests.
|
||||
These are needed for platforms where un-aligned accesses cause bus faults.
|
||||
|
||||
* src/ALAC/ag_enc.c src/ALAC/alac_decoder.c
|
||||
Replace all un-aligned accesses with safe alternatives.
|
||||
Closes: https://github.com/erikd/libsndfile/issues/19
|
||||
|
||||
2013-02-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sfendian.h
|
||||
Add big endian versions of H2BE_16 and H2BE_32.
|
||||
|
||||
2013-02-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/ALAC/
|
||||
Replace Apple endswap routines with ones from libsndfile.
|
||||
|
||||
* merge from libsndfile-cart repo
|
||||
Add ability to set and get a cart chunk with WAV and RF64.
|
||||
Orignal patch by Chris Roberts <c.roberts@csrfm.com> required a number of
|
||||
tweaks.
|
||||
|
||||
2013-02-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h
|
||||
Bump SF_HEADER_LEN from 8192 to 12292, the value it was in the 1.0.25
|
||||
release.
|
||||
|
||||
2013-02-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/alac.c
|
||||
Fix segfault when encoding 8 channel files.
|
||||
Closes: https://github.com/erikd/libsndfile/issues/30
|
||||
|
||||
2013-02-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/ALAC/EndianPortable.c
|
||||
Fall back to compiler's __BYTE_ORDER__ for endian-ness detection.
|
||||
|
||||
2013-02-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac src/common.h src/ima_adpcm.c src/ms_adpcm.c src/paf.c
|
||||
Drop tests for and #ifdef hackery for C99 struct flexible array feature.
|
||||
libsndfile assumes the compiler supports most of the ISO C99 standard.
|
||||
|
||||
* src/alac.c
|
||||
Fix valgrind invalid realloc. Reported by nu774.
|
||||
Closes: https://github.com/erikd/libsndfile/issues/31
|
||||
|
||||
2013-02-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/alac.c
|
||||
The 'pakt' chunk header should now be written correctly.
|
||||
Closes: https://github.com/erikd/libsndfile/issues/24
|
||||
|
||||
* configure.ac Makefile.am
|
||||
Use PKG_INSTALLDIR when it exists. Suggestion from Christoph Thompson.
|
||||
Closes: https://github.com/erikd/libsndfile/pull/28
|
||||
|
||||
2013-02-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h src/caf.c
|
||||
Read the ALAC 'pakt' header and stash the values.
|
||||
|
||||
* src/sfendian.h
|
||||
Add functions psf_put_be64() and psf_put_be32().
|
||||
|
||||
* src/alac.c
|
||||
Start work on filling on the 'pakt' chunk header.
|
||||
|
||||
2013-02-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* doc/FAQ.html
|
||||
Add missing opening <P> tag.
|
||||
|
||||
* src/alac.c
|
||||
Increase ALAC_BYTE_BUFFER_SIZE to 82000.
|
||||
|
||||
2013-01-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* doc/FAQ.html
|
||||
Improve question #8.
|
||||
|
||||
2013-01-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/ogg_opus.c
|
||||
Add skeleton implementation so someone else can run with it.
|
||||
|
||||
2012-12-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h src/dwd.c src/rx2.c src/txw.c
|
||||
Fix for compiling when configured with --enable-experimental. Thanks to
|
||||
Eric Wong for reporting this.
|
||||
|
||||
2012-12-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac programs/sndfile-play.c
|
||||
OS X 10.8 uses a different audio API to previous versions.
|
||||
Fix compile failure on by disabling sndfile-play on this version.
|
||||
Someone needs to supply code for the new API.
|
||||
|
||||
2012-11-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* Octave/Makefile.am Octave/octave_test.sh
|
||||
Fix 'make distcheck'.
|
||||
|
||||
2012-10-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* M4/octave.m4
|
||||
Relax constraints on Octave version.
|
||||
|
||||
2012-10-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/utils.tpl
|
||||
Improve compare_*_or_die() functions.
|
||||
|
||||
* src/command.c
|
||||
Fix bug reported by Keiler Florian. When reading short or int data from a
|
||||
file containing float data, and setting SFC_SET_SCALE_FLOAT_INT_READ to
|
||||
SF_TRUE would fail 3, 5, 7 and other channels counts. Problem was that
|
||||
psf_calc_signal_max() was not calculating the signal max correctly.
|
||||
Calculation of the signal max was failing because it was trying to read
|
||||
a sample count that was not an integer multiple of the channel count.
|
||||
|
||||
* tests/channel_test.c tests/Makefile.am tests/test_wrapper.sh.in
|
||||
Add test for the above.
|
||||
|
||||
2012-09-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.hh
|
||||
Added a constructor to allow the use of SF_VIRTUAL_IO. Patch from
|
||||
DannyDaemonic : https://github.com/erikd/libsndfile/pull/20
|
||||
|
||||
2012-08-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* doc/octave.html
|
||||
Fix link to octave.sourceforge.net. Thanks to IOhannes m zmoelnig.
|
||||
|
||||
* src/mat5.c
|
||||
Allow reading of mat5 files without a specified sample rate (default to
|
||||
44.1kHz). Thanks to IOhannes m zmoelnig.
|
||||
|
||||
2012-08-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/paf.c
|
||||
Error out if channel count is zero. Bug report from William ELla via
|
||||
launchpad:
|
||||
https://bugs.launchpad.net/ubuntu/+source/libsndfile/+bug/1036831
|
||||
|
||||
2012-08-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac programs/sndfile-play.c
|
||||
Patch from Ricci Adams to use OSX's AudioQueues on OSX 10.7 and greater.
|
||||
|
||||
2012-07-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* programs/common.c
|
||||
Accept "ogg" as a file extention for Ogg/Vorbis files.
|
||||
|
||||
2012-06-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/flac.c
|
||||
Make sure any previously allocated FLAC stream encoder and stream decoder
|
||||
objects are deleted before a new one is allocated.
|
||||
|
||||
2012-06-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/utils.tpl
|
||||
Rename gen_lowpass_noise_float() to gen_lowpass_signal_float() and add a
|
||||
sine wave component so that different FLAC compression levels can be
|
||||
tested.
|
||||
|
||||
* src/sndfile.h.in doc/command.html
|
||||
Add SFC_SET_COMPRESSION_LEVEL and document it.
|
||||
|
||||
* src/sndfile.c
|
||||
Catch SFC_SET_VBR_ENCODING_QUALITY command and implement it as the inverse
|
||||
of SFC_SET_COMPRESSION_LEVEL.
|
||||
|
||||
* src/ogg_vorbis.c src/flac.c
|
||||
Implement SFC_SET_COMPRESSION_LEVEL command.
|
||||
|
||||
* tests/test_wrapper.sh.in tests/compression_size_test.c
|
||||
Use the compression_size_test on FLAC as well.
|
||||
|
||||
2012-06-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/
|
||||
Rename vorbis_test.c -> compression_size_test.c so it can be extended to
|
||||
test FLAC as well.
|
||||
|
||||
2012-06-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/broadcast.c
|
||||
Fix a bug where a file with a 'bext' chunk with a zero length coding
|
||||
history field would get corrupted when the file was closed.
|
||||
Reported by Paul Davis of the Ardour project.
|
||||
|
||||
* src/test_broadcast_var.c
|
||||
Add a test for the above.
|
||||
|
||||
2012-05-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.c
|
||||
sf_format_check: For SF_FORMAT_AIFF, reject endian-ness setttings for
|
||||
non-PCM formats.
|
||||
|
||||
2012-04-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/aiff.c
|
||||
Fix regression in handling of odd length SSND chunks.
|
||||
Thanks Olivier Tristan for the example file.
|
||||
|
||||
* src/aiff.c src/wav.c
|
||||
Exit parser loop when marker == 0.
|
||||
|
||||
2012-04-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* doc/FAQ.html
|
||||
Fix text. Thanks to Richard Collins.
|
||||
|
||||
2012-03-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/caf.c
|
||||
Exit parse loop if the marker is zero. Pass jump offsets as size_t instead
|
||||
of int.
|
||||
|
||||
2012-03-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/alac.c
|
||||
Fix segfault when decoding CAF/ALAC file with more than 4 channels.
|
||||
Fixes github issue #8 reported by Charles Van Winkle.
|
||||
|
||||
2012-03-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h
|
||||
Change 'typedef SF_CHUNK_ITERATOR { ... } SF_CHUNK_ITERATOR' into 'struct
|
||||
SF_CHUNK_ITERATOR { ... }' to prevent older compilers from complaining of
|
||||
re-typedef-ing of SF_CHUNK_ITERATOR.
|
||||
|
||||
* configure.ac
|
||||
Fix if test for empty $prefix.
|
||||
|
||||
2012-03-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/*.c tests/chunk_test.c
|
||||
Reworking of custom chunk handling code.
|
||||
- Memory for the iterator is now attached to the SF_PRIVATE struct and
|
||||
freed one sf_close().
|
||||
- Rename sf_create_chunk_iterator() -> sf_get_chunk_iterator().
|
||||
- Each SNDFILE handle never has more than one SF_CHUNK_ITERATOR handle.
|
||||
|
||||
* tests/string_test.c
|
||||
Fix un-initialised char buffer.
|
||||
|
||||
2012-03-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/*.c tests/chunk_test.c
|
||||
Add improved handling of custom chunk getting and settings. Set of patches
|
||||
from IOhannes m zmoelnig submitted via github pull request #6.
|
||||
|
||||
* src/alac.c
|
||||
Fix calculated frame count for files with zero block length.
|
||||
|
||||
2012-03-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/avr.c
|
||||
Remove double assignment to psf->endian. Thanks Kao Dome.
|
||||
|
||||
* src/gsm610.c
|
||||
Fix clearing of buffers. Thanks Kao Dome.
|
||||
|
||||
* src/paf.c
|
||||
Remove duplicate code. Thanks Kao Dome.
|
||||
|
||||
* src/test_strncpy_crlf.c
|
||||
Fix minor error in test. Thanks Kao Dome.
|
||||
|
||||
* src/common.h src/*.c
|
||||
Fix a bunch of valgrind errors.
|
||||
|
||||
2012-03-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.c
|
||||
Fix typo in error string 'Uknown' -> 'Unknown'.
|
||||
|
||||
* tests/fix_this.c
|
||||
Fix potential int overflow.
|
||||
|
||||
2012-03-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/alac.c
|
||||
Fix decoding of last block so that the decode length is not a multiple of
|
||||
the block length. Fixes github issue #4 reported by Charles Van Winkle.
|
||||
|
||||
* src/sfconfig.h src/sfendian.h
|
||||
Fix for MinGW cross compiling. Use '#if (defined __*66__)' instead of
|
||||
'#if __*86__' because the MinGW header use '#ifdef __x86_64__'.
|
||||
|
||||
2012-03-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/ALAC/ src/alac.c
|
||||
Unify the interface between libsndfile and Apple ALAC codec. Regardless of
|
||||
file bit width samples are now passed between the two as int32_t that are
|
||||
justified towards the most significant bit. Without this modification, 16
|
||||
conversion functions would have been needed between the libsndfile (short,
|
||||
int, float, double) types and the ALAC types (16, 20, 24 and 32 bit). With
|
||||
this mod, only 4 are needed.
|
||||
|
||||
* tests/floating_point_test.tpl tests/write_read_test.(def|tpl)
|
||||
Add tests for 20 and 24 bit ALAC/CAF files.
|
||||
|
||||
* src/command.c
|
||||
Add ALAC/CAF to the SFC_GET_FORMAT_* commands. Fixes github issue #5.
|
||||
|
||||
* configure.ac
|
||||
Only use automake AM_SLIENT_RULES where supported. Thanks Dave Yeo.
|
||||
|
||||
* tests/pipe_test.tpl
|
||||
Disable tests on OS/2. Thanks Dave Yeo.
|
||||
|
||||
2012-03-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac src/sfconfig.h src/sfendian.h
|
||||
For GCC, use inline assembler for endian swapping. This should work with
|
||||
older versions of GCC like the one currently used in OS/2.
|
||||
|
||||
2012-03-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/alac.c
|
||||
Make sure temp file gets opened in binary mode.
|
||||
|
||||
* src/alac.c src/common.c src/common.h
|
||||
Fix function alac_write16_d().
|
||||
|
||||
* tests/floating_point_test.tpl
|
||||
Add tests for 16 bit ALAC/CAF.
|
||||
|
||||
* src/alac.c src/common.c src/common.h
|
||||
Add support for 32 bit ALAC/CAF files.
|
||||
|
||||
* tests/floating_point_test.tpl tests/write_read_test.tpl
|
||||
Add tests for 32 bit ALAC/CAF files.
|
||||
|
||||
2012-03-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/
|
||||
Refactor chunk storage so it work on big as well as little endian CPUs.
|
||||
|
||||
* tests/chunk_test.c
|
||||
Clean up error messages.
|
||||
|
||||
* src/sfendian.h src/*.c
|
||||
Rename endian swapping macros and add ENDSWAP_64 and BE2H_64.
|
||||
|
||||
* configure.ac
|
||||
Detect presence of <x86intrin.h> header file.
|
||||
|
||||
* src/sfendian.h
|
||||
Use <x86intrin.h> intrinsics (ie for MinGW) when <byteswap.h> is not
|
||||
present.
|
||||
Make ENDSWAP_64() work with i686-w64-mingw32 compiler.
|
||||
|
||||
* src/ALAC/EndianPortable.c
|
||||
Add support for __powerpc__.
|
||||
|
||||
* src/sfconfig.h
|
||||
Make sure HAVE_X86INTRIN_H is either 1 or 0.
|
||||
|
||||
2012-03-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/ALAC/*
|
||||
Big dump of code for Apple's ALAC file format. The copyyright to this code
|
||||
is owned by Apple who have released it under an Apache style license. A few
|
||||
small modifications were made to allow this to be integrated into libsndfile
|
||||
but unfortunately the history of those changes were lost because they were
|
||||
developed in a Bzr tree and during that time libsndfile moved to Git.
|
||||
|
||||
* src/alac.c src/caf.c src/common.[ch] src/Makefile.am src/sndfile.h.in
|
||||
src/sndfile.c
|
||||
Hook new ALAC codec in.
|
||||
|
||||
* programs/sndfile-convert.c
|
||||
Add support for alac codec.
|
||||
|
||||
* tests/write_read_test.tpl
|
||||
Expand tests to cover ALAC.
|
||||
|
||||
2012-03-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/aiff.c src/wav.c
|
||||
Fix a couple of regressions from version 1.0.25.
|
||||
|
||||
2012-03-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/strings.c
|
||||
Minor refactoring. Make sure that the memory allocation size if always > 0
|
||||
to avoid undefined behaviour.
|
||||
|
||||
2012-02-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/chunk.c
|
||||
Fix buffer overrun introduced in recently added chunk logging. This chunk
|
||||
logging has not yet made it to a libsndfile release version. Thanks to
|
||||
Olivier Tristan for providing an example file.
|
||||
|
||||
* src/wav.c
|
||||
Fix handling of odd sized chunks which was causing the parser to lose some
|
||||
chunks. Thanks to Olivier Tristan for providing an example file.
|
||||
|
||||
2012-02-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/util.tpl
|
||||
Used gnu_printf format checking with mingw-w64 compiler.
|
||||
|
||||
* tests/header_test.tpl
|
||||
Printf format fixes.
|
||||
|
||||
2012-02-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* M4/extra_pkg.m4
|
||||
Update PKG_CHECK_MOD_VERSION macro to add an AC_TRY_LINK step. This fix
|
||||
allows the configure process to catch attempts to link incompatible
|
||||
libraries. For example, linking 32 bit version of eg libFLAC to a 64 bit
|
||||
version of libsndfile will now fail. Similarly, when cross compiling
|
||||
libsndfile from Linux to Windows linking the Linux versions of a library
|
||||
to the Windows version of libsndfile will now also fail.
|
||||
|
||||
* src/sndfile.h.in src/sndfile.c src/common.h src/create_symbols_file.py
|
||||
Add API function sf_current_byterate().
|
||||
|
||||
* src/dwvw.c src/flac.c src/ogg_vorbis.c src/sds.c
|
||||
Add codec specific handlers for current byterate.
|
||||
|
||||
* tests/floating_point_test.tpl
|
||||
Add initial test for sf_current_byterate().
|
||||
|
||||
2012-02-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.[ch]
|
||||
Add function psf_decode_frame_count().
|
||||
|
||||
* src/dwvw.c
|
||||
Fix a termnation bug that caused the decoder to go into an infinite loop.
|
||||
|
||||
2012-02-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/wav.c
|
||||
Fix a regression in the WAV header parser. Thanks to Olivier Tristan for
|
||||
bug report and the example file.
|
||||
|
||||
2012-02-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.c
|
||||
Return error when SF_BROADCAST_INFO struct has bad coding_history_size.
|
||||
Thanks to Alex Weiss for the report.
|
||||
|
||||
2012-02-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/au.c src/flac.c src/g72x.c src/ogg_vorbis.c src/wav_w64.c
|
||||
Don't fake psf->bytewidth values.
|
||||
|
||||
2012-02-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/string_test.c
|
||||
Fix valgrind warnings.
|
||||
|
||||
* src/common.h src/sndfile.c src/strings.c
|
||||
Make string storage dynamically allocated.
|
||||
|
||||
* src/sndfile.c
|
||||
Add extra validation for custom chunk handling.
|
||||
|
||||
2012-02-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/wav.c
|
||||
Improve handlling unknown chunk types. Thanks to Olivier Tristan for sending
|
||||
example files.
|
||||
|
||||
* src/utils.tpl
|
||||
Add GCC specific testing for format string parameters for exit_if_true().
|
||||
|
||||
* tests/*.c tests/*.tpl
|
||||
Fix all printf format warnings.
|
||||
|
||||
* programs/sndfile-play.c
|
||||
Remove un-needed OSX include <Carbon.h>. Thanks jamesfmilne for github
|
||||
issue #3.
|
||||
|
||||
* tests/chunk_test.c
|
||||
Extend custom chunk test.
|
||||
|
||||
2012-02-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/wav.c
|
||||
Jump over some more chunk types while parsing.
|
||||
|
||||
2012-02-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h src/strings.c
|
||||
Change way strings are stored in SF_PRIVATE in preparation for dynamically
|
||||
allocating the storage.
|
||||
|
||||
2012-02-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h src*.c
|
||||
Improve encapsulation of string data in SF_PRIVATE.
|
||||
|
||||
2012-02-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h src*.c
|
||||
Remove the buffer union from SF_PRIVATE. Most uses of this have been
|
||||
replaced with a BUF_UNION that is allocated on the stack.
|
||||
|
||||
2012-01-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h src*.c
|
||||
Rename logbuffer field of SF_PRIVATE to parselog and reduce its size.
|
||||
Put the parselog buffer and the index inside a struct within SF_PRIVATE.
|
||||
|
||||
2012-01-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac
|
||||
Fix typo, FLAC_CLFAGS -> FLAC_CFLAGS. Thanks to Jeremy Friesner.
|
||||
|
||||
2012-01-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.c src/ogg.c
|
||||
Fix misleading error message when trying to create an SF_FORMAT_OGG file
|
||||
with anything other than SF_FORMAT_FILE. Thanks to Charles Van Winkle for
|
||||
the bug report. Github issue #1.
|
||||
|
||||
2012-01-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.c src/wav.c
|
||||
Allow files opened in RDWR mode with string data in the tailer to be
|
||||
extended. Thanks to Bodo for the patch.
|
||||
|
||||
* tests/string_test.c
|
||||
Add tests for the above changes (patch from Bodo).
|
||||
|
||||
2012-01-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/aiff.c
|
||||
Refactor reading of chunk size and use of psf_store_read_chunk().
|
||||
|
||||
* src/(caf|wav).c
|
||||
Correct storing of chunk offset.
|
||||
|
||||
2012-01-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/aiff.c src/wav.c src/common.h
|
||||
Refactor common code into src/common.h.
|
||||
|
||||
* src/caf.c
|
||||
Make custom chunks work for CAF files.
|
||||
|
||||
* tests/chunk_test.c tests/test_wrapper.sh.in
|
||||
Test CAF files with custom chunks.
|
||||
|
||||
* src/sndfile.c
|
||||
Prevent psf->codec_close() being called more than once.
|
||||
|
||||
2012-01-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* programs/sndfile-cmp.c
|
||||
Catch the case where the second file has more frames than the first.
|
||||
|
||||
2012-01-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/create_symbols_file.py
|
||||
Add sf_set_chunk/sf_get_chunk_size/sf_get_chunk_data.
|
||||
|
||||
2011-12-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/chunk_test.c tests/Makefile.am
|
||||
New test for custom chunks.
|
||||
|
||||
* src/aiff.c src/chunk.c src/common.h src/sndfile.c
|
||||
Make custom chunks work on AIFF files.
|
||||
|
||||
* src/wav.c
|
||||
Make custom chunks work on WAV files (includes refactoring).
|
||||
|
||||
2011-11-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.h.in src/common.h src/sndfile.c
|
||||
Start working on setting/getting chunks.
|
||||
|
||||
2011-11-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/binheader_writef_check.py src/create_symbols_file.py
|
||||
Make it work for Python 2 and 3. Thanks Michael.
|
||||
|
||||
2011-11-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* libsndfile.spec.in
|
||||
Change field name 'URL' to 'Url'.
|
||||
|
||||
* src/sndfile.h.in
|
||||
Add SF_SEEK_SET/CUR/END.
|
||||
|
||||
2011-11-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/id3.c
|
||||
Fix a stack overflow that can occur when parsing a file with multiple
|
||||
ID3 headers which would cause libsndfile to go into an infinite recursion
|
||||
until it blew the stack. Thanks to Anders Svensson for supplying an example
|
||||
file.
|
||||
|
||||
2011-10-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/double64.c src/float32.c src/common.h
|
||||
Make (float32|double_64)_(be|le)_read() functions const correct.
|
||||
|
||||
2011-10-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sfendian.h
|
||||
Minor tweaking of types. Cast to ptr to correct final type rather void*.
|
||||
|
||||
* programs/sndfile-play.c tests/utils.tpl
|
||||
Fix compiler warnings with latest MinGW cross compiler.
|
||||
|
||||
2011-10-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/file_io.c
|
||||
Use the non-deprecated resource fork name on OSX. Thanks to Olivier Tristan.
|
||||
|
||||
2011-10-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/wav.c
|
||||
Jump over the 'olym' chunks when parsing.
|
||||
|
||||
2011-10-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/write_read_test.tpl
|
||||
Remove windows only truncate() implementation.
|
||||
|
||||
2011-09-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sd2.c src/sndfile.c
|
||||
Make sure 23 bit PCM SD2 files are readable/writeable.
|
||||
|
||||
* tests/write_read_test.tpl
|
||||
Add tests for 32 bit PCM SD2 files.
|
||||
|
||||
2011-08-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac
|
||||
Use AC_SYS_LARGEFILE instead of AC_SYS_EXTRA_LARGEFILE as suggested by
|
||||
Jan Willies.
|
||||
|
||||
2011-08-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac Makefile.am
|
||||
Move ACLOCAL_AMFLAGS setup to Makefile.am.
|
||||
|
||||
2011-07-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* doc/command.html
|
||||
Merge two separate blocks of SFC_SET_VBR_ENCODING_QUALITY documentation.
|
||||
|
||||
* src/paf.c
|
||||
Replace ppaf24->samplesperblock with a compile time constant.
|
||||
|
||||
2011-07-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/ogg_vorbis.c
|
||||
Fix return value of SFC_SET_VBR_ENCODING_QUALITY command.
|
||||
|
||||
* doc/command.html
|
||||
Document SFC_SET_VBR_ENCODING_QUALITY, SFC_GET/SET_LOOP_INFO and
|
||||
SFC_GET_INSTRUMENT.
|
||||
|
||||
* NEWS README configure.ac doc/*.html
|
||||
Updates for 1.0.25.
|
||||
|
||||
2011-07-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sfconfig.h
|
||||
Add handling for HAVE_SYS_WAIT_H.
|
||||
|
||||
* Makefile.am src/Makefile.am tests/Makefile.am
|
||||
Add 'checkprograms' target.
|
||||
|
||||
2011-07-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/common.h src/sndfile.c
|
||||
Purge SF_ASSERT macro. Use standard C assert instead.
|
||||
|
||||
* src/paf.c src/common.h src/sndfile.c
|
||||
Fix for Secunia Advisory SA45125, heap overflow (heap gets overwritten with
|
||||
byte value of 0) due to integer overflow if PAF file handler.
|
||||
|
||||
* src/ima_adpcm.c src/ms_adpcm.c src/paf.c
|
||||
Use calloc instead of malloc followed by memset.
|
||||
|
||||
* tests/utils.tpl
|
||||
Clean up use of memset.
|
||||
|
||||
2011-07-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/ogg.c
|
||||
Fix log message.
|
||||
|
||||
* tests/format_check_test.c
|
||||
Fix compiler warnings.
|
||||
|
||||
2011-07-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.c
|
||||
Fix error message for erro code SFE_ZERO_MINOR_FORMAT.
|
||||
|
||||
* tests/format_check_test.c
|
||||
Add a test to for SF_FINFO format field validation.
|
||||
|
||||
* src/ogg.c src/ogg_vorbis.c src/ogg.h src/ogg_pcm.c src/ogg_speex.c
|
||||
src/common.h src/Makefile.am
|
||||
Move vorbis specific code to ogg_vorbis.c, add new files for handling PCM
|
||||
and Speex codecs in an Ogg container. The later two are only enabled with
|
||||
ENABLE_EXPERIMENTAL_CODE config variable.
|
||||
|
||||
2011-06-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/strings.c
|
||||
Clean up and refactor storage of SF_STR_SOFTWARE.
|
||||
|
||||
2011-06-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.h.in doc/api.html
|
||||
Fix definition of SF_STR_LAST and update SF_STR_* related docs. Thanks to
|
||||
Tim van der Molen for the patch.
|
||||
|
||||
2011-06-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* programs/sndfile-interleave.c
|
||||
Fix handling of argc. Thanks to Marius Hennecke.
|
||||
|
||||
* src/wav_w64.c
|
||||
Accept broken WAV files with blockalign == 0. Thanks to Olivier Tristan for
|
||||
providing example files.
|
||||
|
||||
* src/wav.c
|
||||
Jump over 'FLLR' chunks.
|
||||
|
||||
2011-06-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/sndfile.h.in
|
||||
Fix -Wundef warning due to ENABLE_SNDFILE_WINDOWS_PROTOTYPES.
|
||||
|
||||
* configure.ac
|
||||
Add -Wundef to CFLAGS.
|
||||
|
||||
* src/ogg.c
|
||||
Fix -Wunder warning.
|
||||
|
||||
2011-05-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac
|
||||
Use int64_t instead of off_t when they are the same size.
|
||||
|
||||
* src/Makefile.am tests/Makefile.am
|
||||
Use check_PROGRAMS instead of noinst_PROGRAMS where appropriate.
|
||||
|
||||
2011-05-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/wav.c
|
||||
Don't allow unknown and/or un-editable chunks to prevent the file from being
|
||||
opened in SFM_RDWR mode.
|
||||
|
||||
2011-04-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/format_check_test.c
|
||||
Fix segfault in test program.
|
||||
|
||||
2011-04-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/format_check_test.c
|
||||
New test program to check to make sure that sf_open() and sf_check_format()
|
||||
agree as to what is a valid program.
|
||||
|
||||
* tests/Makefile.am tests/test_wrapper.sh.in
|
||||
Hook into build and test runner.
|
||||
|
||||
* src/sndfile.c
|
||||
Fix some sf_format_check() problems. Thanks to Charles Van Winkle for the
|
||||
notification.
|
||||
|
||||
2011-04-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/caf.c
|
||||
Add validation to size of 'data' chunk and fix size of written 'data'
|
||||
chunk. Thanks to Michael Pruett for reporting this.
|
||||
|
||||
2011-03-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/* tests/* programs/*
|
||||
Fix a bunch of compiler warnings with gcc-4.6.
|
||||
|
||||
2011-03-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* tests/util.tpl
|
||||
Add NOT macro to util.h.
|
||||
|
||||
* src/strings.c
|
||||
Fix handling of SF_STR_SOFTWARE that resulted in a segfault due to calling
|
||||
strlen() on an unterminated string. Thanks to Francois Thibaud for reporting
|
||||
this problem.
|
||||
|
||||
* tests/string_test.c
|
||||
Add test for SF_STR_SOFTWARE segfault bug.
|
||||
|
||||
* configure.ac
|
||||
Sanitize FLAC_CFLAGS value supplied by pkg-config which returns a value of
|
||||
'-I${includedir}/FLAC'. However FLAC also provides an include file
|
||||
<assert.h> which clashes with the Standard C header of the same name. The
|
||||
solution is strip the 'FLAC' part off the end and include all FLAC headers
|
||||
as <FLAC/header.h>.
|
||||
|
||||
* configure.ac src/Makefile.am
|
||||
Use non-recursive make in src/ directory.
|
||||
|
||||
2011-03-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* NEWS README docs/*.html
|
||||
|
@ -284,7 +1155,7 @@
|
|||
* src/sndfile.c
|
||||
Only support writing mono SVX files. Multichannel SVX files are not
|
||||
interleaved and there is no support infrastructure to cache and write
|
||||
multiple channels to create a non-interleaved file.
|
||||
multiple channels to create a non-interleaved file.
|
||||
|
||||
* src/file_io.c
|
||||
Don't call close() on a file descriptor of -1. Thanks to Jeremy Friesner
|
||||
|
@ -2771,7 +3642,7 @@
|
|||
Add channel map tests.
|
||||
|
||||
* src/common.h src/sndfile.c
|
||||
Add a pointer the the SF_PRIVATE struct and make sure it gets freed in
|
||||
Add a pointer to the SF_PRIVATE struct and make sure it gets freed in
|
||||
sf_close().
|
||||
|
||||
2006-04-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
@ -5107,7 +5978,7 @@
|
|||
|
||||
* src/strings.c
|
||||
Found and fixed a bug which was causing psf_store_string() to fail on
|
||||
Motorola 68k processors. Many thanks fo Joshua Haberman (Debian maintainer
|
||||
Motorola 68k processors. Many thanks to Joshua Haberman (Debian maintainer
|
||||
of libsndfile) for compiling and running debug code to help me debug the
|
||||
problem.
|
||||
|
||||
|
@ -5938,7 +6809,7 @@
|
|||
Document SFC_SET_RAW_START_OFFSET.
|
||||
|
||||
* tests/raw_test.c tests/Makefile.am
|
||||
Add new file for for testing SF_FORMAT_RAW specific functionality.
|
||||
Add new file for testing SF_FORMAT_RAW specific functionality.
|
||||
|
||||
* tests/dwvw_test.c
|
||||
Updates.
|
||||
|
@ -8891,4 +9762,3 @@ This is the boundary between version 1 of the library above and version 0 below.
|
|||
* src/aiff.c:
|
||||
Changed reading of 'COMM' chunk to avoid reading an int
|
||||
which overlaps an int (4 byte) boundary.
|
||||
|
||||
|
|
|
@ -1,370 +0,0 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell command `./configure && make && make install'
|
||||
should configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
|
@ -1,5 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = add_cflags.m4 clip_mode.m4 endian.m4 extra_largefile.m4 \
|
||||
flexible_array.m4 llrint.m4 lrint.m4 lrintf.m4 octave.m4 extra_pkg.m4
|
||||
|
|
@ -1,491 +0,0 @@
|
|||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
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
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||
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/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_largefile.m4 \
|
||||
$(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/flexible_array.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)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
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)
|
||||
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@
|
||||
GETCONF = @GETCONF@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
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@
|
||||
MAINT = @MAINT@
|
||||
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@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STRIP = @STRIP@
|
||||
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@
|
||||
htmldocdir = @htmldocdir@
|
||||
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@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
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 extra_largefile.m4 \
|
||||
flexible_array.m4 llrint.m4 lrint.m4 lrintf.m4 octave.m4 extra_pkg.m4
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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
|
||||
.PRECIOUS: 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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
|
||||
|
||||
|
||||
# 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:
|
|
@ -1,18 +0,0 @@
|
|||
dnl @synopsis MN_ADD_CFLAGS
|
||||
dnl
|
||||
dnl Add the given option to CFLAGS, if it doesn't break the compiler
|
||||
|
||||
AC_DEFUN([MN_ADD_CFLAGS],
|
||||
[AC_MSG_CHECKING([if $CC accepts $1])
|
||||
ac_add_cflags__old_cflags="$CFLAGS"
|
||||
CFLAGS="$1"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
],
|
||||
[puts("Hello, World!"); return 0;],
|
||||
AC_MSG_RESULT([yes])
|
||||
CFLAGS="$ac_add_cflags__old_cflags $1",
|
||||
AC_MSG_RESULT([no])
|
||||
CFLAGS="$ac_add_cflags__old_cflags"
|
||||
)
|
||||
])# MN_ADD_CFLAGS
|
|
@ -1,19 +0,0 @@
|
|||
dnl @synopsis MN_ADD_CXXFLAGS
|
||||
dnl
|
||||
dnl Add the given option to CXXFLAGS, if it doesn't break the compiler
|
||||
|
||||
AC_DEFUN([MN_ADD_CXXFLAGS],
|
||||
[AC_MSG_CHECKING([if $CXX accepts $1])
|
||||
AC_LANG_ASSERT([C++])
|
||||
ac_add_cxxflags__old_cxxflags="$CXXFLAGS"
|
||||
CXXFLAGS="$1"
|
||||
AC_TRY_LINK([
|
||||
#include <cstdio>
|
||||
],
|
||||
[puts("Hello, World!"); return 0;],
|
||||
AC_MSG_RESULT([yes])
|
||||
CXXFLAGS="$ac_add_cxxflags__old_cxxflags $1",
|
||||
AC_MSG_RESULT([no])
|
||||
CXXFLAGS="$ac_add_cxxflags__old_cxxflags"
|
||||
)
|
||||
])# MN_ADD_CXXFLAGS
|
|
@ -1,155 +0,0 @@
|
|||
dnl @synopsis MN_C_FIND_ENDIAN
|
||||
dnl
|
||||
dnl Determine endian-ness of target processor.
|
||||
dnl @version 1.1 Mar 03 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Majority written from scratch to replace the standard autoconf macro
|
||||
dnl AC_C_BIGENDIAN. Only part remaining from the original it the invocation
|
||||
dnl of the AC_TRY_RUN macro.
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
|
||||
dnl Find endian-ness in the following way:
|
||||
dnl 1) Look in <endian.h>.
|
||||
dnl 2) If 1) fails, look in <sys/types.h> and <sys/param.h>.
|
||||
dnl 3) If 1) and 2) fails and not cross compiling run a test program.
|
||||
dnl 4) If 1) and 2) fails and cross compiling then guess based on target.
|
||||
|
||||
AC_DEFUN([MN_C_FIND_ENDIAN],
|
||||
[AC_CACHE_CHECK(processor byte ordering,
|
||||
ac_cv_c_byte_order,
|
||||
|
||||
# Initialize to unknown
|
||||
ac_cv_c_byte_order=unknown
|
||||
|
||||
if test x$ac_cv_header_endian_h = xyes ; then
|
||||
|
||||
# First try <endian.h> which should set BYTE_ORDER.
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <endian.h>
|
||||
#if BYTE_ORDER != LITTLE_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=little
|
||||
)]
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <endian.h>
|
||||
#if BYTE_ORDER != BIG_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=big
|
||||
)]
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_byte_order = unknown ; then
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
|
||||
bogus endian macros
|
||||
#endif
|
||||
], return 0 ;,
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#if BYTE_ORDER != LITTLE_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=little
|
||||
)]
|
||||
|
||||
[AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#if BYTE_ORDER != LITTLE_ENDIAN
|
||||
not big endian
|
||||
#endif
|
||||
], return 0 ;,
|
||||
ac_cv_c_byte_order=little
|
||||
)]
|
||||
|
||||
)]
|
||||
|
||||
fi
|
||||
|
||||
if test $ac_cv_c_byte_order = unknown ; then
|
||||
if test $cross_compiling = yes ; then
|
||||
# This is the last resort. Try to guess the target processor endian-ness
|
||||
# by looking at the target CPU type.
|
||||
[
|
||||
case "$target_cpu" in
|
||||
alpha* | i?86* | mipsel* | ia64*)
|
||||
ac_cv_c_byte_order=little
|
||||
;;
|
||||
|
||||
m68* | mips* | powerpc* | hppa* | sparc*)
|
||||
ac_cv_c_byte_order=big
|
||||
;;
|
||||
|
||||
esac
|
||||
]
|
||||
else
|
||||
AC_TRY_RUN(
|
||||
[[
|
||||
int main (void)
|
||||
{ /* Are we little or big endian? From Harbison&Steele. */
|
||||
union
|
||||
{ long l ;
|
||||
char c [sizeof (long)] ;
|
||||
} u ;
|
||||
u.l = 1 ;
|
||||
return (u.c [sizeof (long) - 1] == 1);
|
||||
}
|
||||
]], , ac_cv_c_byte_order=big,
|
||||
)
|
||||
|
||||
AC_TRY_RUN(
|
||||
[[int main (void)
|
||||
{ /* Are we little or big endian? From Harbison&Steele. */
|
||||
union
|
||||
{ long l ;
|
||||
char c [sizeof (long)] ;
|
||||
} u ;
|
||||
u.l = 1 ;
|
||||
return (u.c [0] == 1);
|
||||
}]], , ac_cv_c_byte_order=little,
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
)
|
||||
|
||||
if test $ac_cv_c_byte_order = big ; then
|
||||
ac_cv_c_big_endian=1
|
||||
ac_cv_c_little_endian=0
|
||||
elif test $ac_cv_c_byte_order = little ; then
|
||||
ac_cv_c_big_endian=0
|
||||
ac_cv_c_little_endian=1
|
||||
else
|
||||
ac_cv_c_big_endian=0
|
||||
ac_cv_c_little_endian=0
|
||||
|
||||
AC_MSG_WARN([[*****************************************************************]])
|
||||
AC_MSG_WARN([[*** Not able to determine endian-ness of target processor. ]])
|
||||
AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in ]])
|
||||
AC_MSG_WARN([[*** src/config.h may need to be hand editied. ]])
|
||||
AC_MSG_WARN([[*****************************************************************]])
|
||||
fi
|
||||
|
||||
]
|
||||
)# MN_C_FIND_ENDIAN
|
||||
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
dnl By default, many hosts won't let programs access large files;
|
||||
dnl one must use special compiler options to get large-file access to work.
|
||||
dnl For more details about this brain damage please see:
|
||||
dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
|
||||
|
||||
dnl Written by Paul Eggert <eggert@twinsun.com>.
|
||||
|
||||
dnl Internal subroutine of AC_SYS_EXTRA_LARGEFILE.
|
||||
dnl MN_SYS_EXTRA_LARGEFILE_FLAGS(FLAGSNAME)
|
||||
AC_DEFUN([MN_SYS_EXTRA_LARGEFILE_FLAGS],
|
||||
[AC_CACHE_CHECK([for $1 value to request large file support],
|
||||
ac_cv_sys_largefile_$1,
|
||||
[ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
|
||||
ac_cv_sys_largefile_$1=no
|
||||
ifelse($1, CFLAGS,
|
||||
[case "$host_os" in
|
||||
# IRIX 6.2 and later require cc -n32.
|
||||
changequote(, )dnl
|
||||
irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
|
||||
changequote([, ])dnl
|
||||
if test "$GCC" != yes; then
|
||||
ac_cv_sys_largefile_CFLAGS=-n32
|
||||
fi
|
||||
ac_save_CC="$CC"
|
||||
CC="$CC $ac_cv_sys_largefile_CFLAGS"
|
||||
AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
|
||||
CC="$ac_save_CC"
|
||||
esac])
|
||||
}])])
|
||||
|
||||
dnl Internal subroutine of AC_SYS_EXTRA_LARGEFILE.
|
||||
dnl AC_SYS_EXTRA_LARGEFILE_SPACE_APPEND(VAR, VAL)
|
||||
AC_DEFUN([AC_SYS_EXTRA_LARGEFILE_SPACE_APPEND],
|
||||
[case $2 in
|
||||
no) ;;
|
||||
?*)
|
||||
case "[$]$1" in
|
||||
'') $1=$2 ;;
|
||||
*) $1=[$]$1' '$2 ;;
|
||||
esac ;;
|
||||
esac])
|
||||
|
||||
dnl Internal subroutine of AC_SYS_EXTRA_LARGEFILE.
|
||||
dnl AC_SYS_EXTRA_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
|
||||
AC_DEFUN([AC_SYS_EXTRA_LARGEFILE_MACRO_VALUE],
|
||||
[AC_CACHE_CHECK([for $1], $2,
|
||||
[$2=no
|
||||
changequote(, )dnl
|
||||
$4
|
||||
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
||||
case "$ac_flag" in
|
||||
-D$1)
|
||||
$2=1 ;;
|
||||
-D$1=*)
|
||||
$2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
|
||||
esac
|
||||
done
|
||||
changequote([, ])dnl
|
||||
])
|
||||
if test "[$]$2" != no; then
|
||||
AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
|
||||
fi])
|
||||
|
||||
AC_DEFUN([AC_SYS_EXTRA_LARGEFILE],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_ARG_ENABLE(largefile,
|
||||
[ --disable-largefile omit support for large files])
|
||||
if test "$enable_largefile" != no; then
|
||||
AC_CHECK_TOOL(GETCONF, getconf)
|
||||
MN_SYS_EXTRA_LARGEFILE_FLAGS(CFLAGS)
|
||||
MN_SYS_EXTRA_LARGEFILE_FLAGS(LDFLAGS)
|
||||
MN_SYS_EXTRA_LARGEFILE_FLAGS(LIBS)
|
||||
|
||||
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
||||
case "$ac_flag" in
|
||||
no) ;;
|
||||
-D_FILE_OFFSET_BITS=*) ;;
|
||||
-D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
|
||||
-D_LARGE_FILES | -D_LARGE_FILES=*) ;;
|
||||
-D?* | -I?*)
|
||||
AC_SYS_EXTRA_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
|
||||
*)
|
||||
AC_SYS_EXTRA_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
|
||||
esac
|
||||
done
|
||||
AC_SYS_EXTRA_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
|
||||
AC_SYS_EXTRA_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
|
||||
AC_SYS_EXTRA_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
|
||||
ac_cv_sys_file_offset_bits,
|
||||
[Number of bits in a file offset, on hosts where this is settable.])
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 and later
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
ac_cv_sys_file_offset_bits=64 ;;
|
||||
esac]
|
||||
AC_SYS_EXTRA_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
|
||||
ac_cv_sys_largefile_source,
|
||||
[Define to make fseeko etc. visible, on some hosts.],
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 and later
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
ac_cv_sys_largefile_source=1 ;;
|
||||
esac])
|
||||
AC_SYS_EXTRA_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
|
||||
ac_cv_sys_large_files,
|
||||
[Define for large files, on AIX-style hosts.],
|
||||
[case "$host_os" in
|
||||
# AIX 4.2 and later
|
||||
aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
|
||||
ac_cv_sys_large_files=1 ;;
|
||||
esac])
|
||||
fi
|
||||
])
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
dnl @synopsis MN_GCC_VERSION
|
||||
dnl
|
||||
dnl Find the version of gcc.
|
||||
dnl @version 1.0 Nov 05 2007
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([MN_GCC_VERSION],
|
||||
[
|
||||
if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
|
||||
|
||||
AC_MSG_CHECKING([for version of $CC])
|
||||
GCC_VERSION=`$CC -dumpversion`
|
||||
AC_MSG_RESULT($GCC_VERSION)
|
||||
|
||||
changequote(,)dnl
|
||||
GCC_MINOR_VERSION=`echo $GCC_VERSION | sed "s/^[0-9]\+\.//" | sed "s/\..*//"`
|
||||
GCC_MAJOR_VERSION=`echo $GCC_VERSION | sed "s/\..*//"`
|
||||
changequote([,])dnl
|
||||
fi
|
||||
|
||||
AC_SUBST(GCC_VERSION)
|
||||
AC_SUBST(GCC_MAJOR_VERSION)
|
||||
AC_SUBST(GCC_MINOR_VERSION)
|
||||
|
||||
])# MN_GCC_VERSION
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,38 +0,0 @@
|
|||
dnl @synopsis MN_C99_FUNC_LLRINT
|
||||
dnl
|
||||
dnl Check whether C99's llrint function is available.
|
||||
dnl @version 1.1 Sep 30 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
AC_DEFUN([MN_C99_FUNC_LLRINT],
|
||||
[AC_CACHE_CHECK(for llrint,
|
||||
ac_cv_c99_llrint,
|
||||
[
|
||||
llrint_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="-lm"
|
||||
AC_TRY_LINK([
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
], int64_t x ; x = llrint(3.14159) ;, ac_cv_c99_llrint=yes, ac_cv_c99_llrint=no)
|
||||
|
||||
CFLAGS=$llrint_save_CFLAGS
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_c99_llrint" = yes; then
|
||||
AC_DEFINE(HAVE_LLRINT, 1,
|
||||
[Define if you have C99's llrint function.])
|
||||
fi
|
||||
])# MN_C99_FUNC_LLRINT
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
dnl @synopsis MN_C99_FUNC_LRINT
|
||||
dnl
|
||||
dnl Check whether C99's lrint function is available.
|
||||
dnl @version 1.3 Feb 12 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
AC_DEFUN([MN_C99_FUNC_LRINT],
|
||||
[AC_CACHE_CHECK(for lrint,
|
||||
ac_cv_c99_lrint,
|
||||
[
|
||||
lrint_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="-lm"
|
||||
AC_TRY_LINK([
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
|
||||
#include <math.h>
|
||||
], if (!lrint(3.14159)) lrint(2.7183);, ac_cv_c99_lrint=yes, ac_cv_c99_lrint=no)
|
||||
|
||||
CFLAGS=$lrint_save_CFLAGS
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_c99_lrint" = yes; then
|
||||
AC_DEFINE(HAVE_LRINT, 1,
|
||||
[Define if you have C99's lrint function.])
|
||||
fi
|
||||
])# MN_C99_FUNC_LRINT
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
dnl @synopsis MN_C99_FUNC_LRINTF
|
||||
dnl
|
||||
dnl Check whether C99's lrintf function is available.
|
||||
dnl @version 1.3 Feb 12 2002
|
||||
dnl @author Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this file for any
|
||||
dnl purpose is hereby granted without fee, provided that the above copyright
|
||||
dnl and this permission notice appear in all copies. No representations are
|
||||
dnl made about the suitability of this software for any purpose. It is
|
||||
dnl provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
AC_DEFUN([MN_C99_FUNC_LRINTF],
|
||||
[AC_CACHE_CHECK(for lrintf,
|
||||
ac_cv_c99_lrintf,
|
||||
[
|
||||
lrintf_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="-lm"
|
||||
AC_TRY_LINK([
|
||||
#define _ISOC9X_SOURCE 1
|
||||
#define _ISOC99_SOURCE 1
|
||||
#define __USE_ISOC99 1
|
||||
#define __USE_ISOC9X 1
|
||||
|
||||
#include <math.h>
|
||||
], if (!lrintf(3.14159)) lrintf(2.7183);, ac_cv_c99_lrintf=yes, ac_cv_c99_lrintf=no)
|
||||
|
||||
CFLAGS=$lrintf_save_CFLAGS
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_c99_lrintf" = yes; then
|
||||
AC_DEFINE(HAVE_LRINTF, 1,
|
||||
[Define if you have C99's lrintf function.])
|
||||
fi
|
||||
])# MN_C99_FUNC_LRINTF
|
||||
|
|
@ -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])])
|
|
@ -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
|
||||
])
|
|
@ -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)
|
||||
])
|
|
@ -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])])
|
|
@ -1,40 +1,499 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
ACLOCAL_AMFLAGS = -I M4
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src $(OS_SPECIFIC_CFLAGS)
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-werror
|
||||
|
||||
CLEANFILES = programs/*.wav octave-workspace
|
||||
|
||||
if FULL_SUITE
|
||||
if BUILD_OCTAVE_MOD
|
||||
octave_dir = Octave
|
||||
SUBDIRS = Octave
|
||||
endif
|
||||
endif
|
||||
|
||||
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 \
|
||||
CMakeLists.txt $(cmake_files) Win32
|
||||
|
||||
EXTRA_DIST = libsndfile.spec.in sndfile.pc.in
|
||||
cmake_files = cmake/ClipMode.cmake cmake/FindFLAC.cmake \
|
||||
cmake/CMakeAutoGen.cmake cmake/CMakeAutoGenScript.cmake \
|
||||
cmake/FindOgg.cmake cmake/FindVorbis.cmake cmake/FindSndio.cmake \
|
||||
cmake/FindSpeex.cmake cmake/FindSQLite3.cmake cmake/FindVorbisEnc.cmake \
|
||||
cmake/SndFileChecks.cmake cmake/TestInline.cmake \
|
||||
cmake/TestLargeFiles.cmake cmake/TestInline.c.in \
|
||||
cmake/FindOpus.cmake cmake/SndFileConfig.cmake.in
|
||||
|
||||
CLEANFILES = *~
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = sndfile.pc
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
|
||||
#===============================================================================
|
||||
|
||||
test: check-recursive
|
||||
test: check
|
||||
|
||||
# Target to make autogenerated files.
|
||||
genfiles :
|
||||
(cd src ; make genfiles)
|
||||
(cd tests ; make genfiles)
|
||||
# Need this target to force building of test programs.
|
||||
checkprograms: $(check_PROGRAMS)
|
||||
|
||||
########
|
||||
# src/ #
|
||||
########
|
||||
|
||||
testprogs :
|
||||
(cd src ; make testprogs)
|
||||
(cd tests ; make testprogs)
|
||||
BUILT_SOURCES = src/test_endswap.c
|
||||
|
||||
SYMBOL_FILES = src/Symbols.gnu-binutils src/Symbols.darwin src/libsndfile-1.def src/Symbols.os2 src/Symbols.static
|
||||
|
||||
test-tarball : build-test-tarball.mk
|
||||
make all
|
||||
make -f build-test-tarball.mk
|
||||
EXTRA_DIST += src/sndfile.h.in src/config.h.in src/test_endswap.tpl src/test_endswap.def \
|
||||
$(SYMBOL_FILES) src/create_symbols_file.py src/binheader_writef_check.py \
|
||||
src/GSM610/README src/GSM610/COPYRIGHT src/GSM610/ChangeLog \
|
||||
src/G72x/README src/G72x/README.original src/G72x/ChangeLog \
|
||||
src/make-static-lib-hidden-privates.sh \
|
||||
src/config.h.cmake
|
||||
|
||||
if USE_WIN_VERSION_FILE
|
||||
WIN_VERSION_FILE = src/version-metadata.rc
|
||||
else
|
||||
WIN_VERSION_FILE =
|
||||
endif
|
||||
|
||||
#===============================================================================
|
||||
|
||||
lib_LTLIBRARIES = src/libsndfile.la
|
||||
include_HEADERS = src/sndfile.hh
|
||||
nodist_include_HEADERS = src/sndfile.h
|
||||
src_libsndfile_la_CFLAGS = $(EXTERNAL_XIPH_CFLAGS)
|
||||
# MinGW requires -no-undefined if a DLL is to be built.
|
||||
src_libsndfile_la_LDFLAGS = -no-undefined -version-info $(SHARED_VERSION_INFO) $(SHLIB_VERSION_ARG)
|
||||
src_libsndfile_la_SOURCES = src/sndfile.c src/aiff.c src/au.c src/avr.c src/caf.c src/dwd.c src/flac.c src/g72x.c src/htk.c src/ircam.c \
|
||||
src/macos.c src/mat4.c src/mat5.c src/nist.c src/paf.c src/pvf.c src/raw.c src/rx2.c src/sd2.c \
|
||||
src/sds.c src/svx.c src/txw.c src/voc.c src/wve.c src/w64.c src/wavlike.c src/wav.c src/xi.c src/mpc2k.c src/rf64.c \
|
||||
src/ogg_vorbis.c src/ogg_speex.c src/ogg_pcm.c src/ogg_opus.c src/ogg_vcomment.c \
|
||||
src/common.h src/sfconfig.h src/sfendian.h src/wavlike.h src/sf_unistd.h src/ogg.h src/chanmap.h src/ogg_vcomment.h
|
||||
nodist_src_libsndfile_la_SOURCES = $(nodist_include_HEADERS)
|
||||
src_libsndfile_la_LIBADD = src/GSM610/libgsm.la src/G72x/libg72x.la src/ALAC/libalac.la \
|
||||
src/libcommon.la $(EXTERNAL_XIPH_LIBS) -lm
|
||||
EXTRA_src_libsndfile_la_DEPENDENCIES = $(SYMBOL_FILES)
|
||||
|
||||
noinst_LTLIBRARIES = src/libcommon.la
|
||||
src_libcommon_la_CFLAGS = $(EXTERNAL_XIPH_CFLAGS)
|
||||
src_libcommon_la_SOURCES = src/common.c src/file_io.c src/command.c src/pcm.c src/ulaw.c src/alaw.c \
|
||||
src/float32.c src/double64.c src/ima_adpcm.c src/ms_adpcm.c src/gsm610.c src/dwvw.c src/vox_adpcm.c \
|
||||
src/interleave.c src/strings.c src/dither.c src/cart.c src/broadcast.c src/audio_detect.c \
|
||||
src/ima_oki_adpcm.c src/ima_oki_adpcm.h src/alac.c src/chunk.c src/ogg.c src/chanmap.c \
|
||||
src/windows.c src/id3.c src/nms_adpcm.c $(WIN_VERSION_FILE)
|
||||
|
||||
check_PROGRAMS = src/test_main
|
||||
src_test_main_SOURCES = src/test_main.c src/test_main.h src/test_conversions.c src/test_float.c src/test_endswap.c \
|
||||
src/test_audio_detect.c src/test_log_printf.c src/test_file_io.c src/test_ima_oki_adpcm.c \
|
||||
src/test_strncpy_crlf.c src/test_broadcast_var.c src/test_cart_var.c \
|
||||
src/test_binheader_writef.c src/test_nms_adpcm.c
|
||||
src_test_main_LDADD = src/libcommon.la
|
||||
|
||||
##############
|
||||
# src/GSM610 #
|
||||
##############
|
||||
|
||||
noinst_LTLIBRARIES += src/GSM610/libgsm.la
|
||||
src_GSM610_libgsm_la_SOURCES = src/GSM610/config.h src/GSM610/gsm.h src/GSM610/gsm610_priv.h \
|
||||
src/GSM610/add.c src/GSM610/code.c src/GSM610/decode.c src/GSM610/gsm_create.c \
|
||||
src/GSM610/gsm_decode.c src/GSM610/gsm_destroy.c src/GSM610/gsm_encode.c \
|
||||
src/GSM610/gsm_option.c src/GSM610/long_term.c src/GSM610/lpc.c src/GSM610/preprocess.c \
|
||||
src/GSM610/rpe.c src/GSM610/short_term.c src/GSM610/table.c
|
||||
|
||||
############
|
||||
# src/G72x #
|
||||
############
|
||||
|
||||
noinst_LTLIBRARIES += src/G72x/libg72x.la
|
||||
src_G72x_libg72x_la_SOURCES = src/G72x/g72x.h src/G72x/g72x_priv.h \
|
||||
src/G72x/g721.c src/G72x/g723_16.c src/G72x/g723_24.c src/G72x/g723_40.c src/G72x/g72x.c
|
||||
|
||||
check_PROGRAMS += src/G72x/g72x_test
|
||||
src_G72x_g72x_test_SOURCES = src/G72x/g72x_test.c
|
||||
src_G72x_g72x_test_LDADD = src/G72x/libg72x.la
|
||||
|
||||
############
|
||||
# src/ALAC #
|
||||
############
|
||||
|
||||
noinst_LTLIBRARIES += src/ALAC/libalac.la
|
||||
src_ALAC_libalac_la_SOURCES = src/ALAC/ALACAudioTypes.h src/ALAC/ALACBitUtilities.h \
|
||||
src/ALAC/EndianPortable.h src/ALAC/aglib.h src/ALAC/dplib.h src/ALAC/matrixlib.h \
|
||||
src/ALAC/alac_codec.h src/ALAC/shift.h \
|
||||
src/ALAC/ALACBitUtilities.c src/ALAC/ag_dec.c \
|
||||
src/ALAC/ag_enc.c src/ALAC/dp_dec.c src/ALAC/dp_enc.c src/ALAC/matrix_dec.c \
|
||||
src/ALAC/matrix_enc.c src/ALAC/alac_decoder.c src/ALAC/alac_encoder.c
|
||||
|
||||
#===============================================================================
|
||||
# Generate an OS specific Symbols files. This is done when the author
|
||||
# builds the distribution tarball. There should be not need for the
|
||||
# end user to create these files.
|
||||
|
||||
# "$<" cannot portably be used in the recipe across Make implementations
|
||||
# https://www.gnu.org/software/autoconf/manual/autoconf.html#g_t_0024_003c-in-Ordinary-Make-Rules
|
||||
SYMBOL_SCRIPT = $(top_srcdir)/src/create_symbols_file.py
|
||||
|
||||
src/Symbols.gnu-binutils: $(SYMBOL_SCRIPT)
|
||||
$(PYTHON) $(SYMBOL_SCRIPT) linux $(VERSION) > $(top_srcdir)/$@
|
||||
|
||||
src/Symbols.darwin: $(SYMBOL_SCRIPT)
|
||||
$(PYTHON) $(SYMBOL_SCRIPT) darwin $(VERSION) > $(top_srcdir)/$@
|
||||
|
||||
src/libsndfile-1.def: $(SYMBOL_SCRIPT)
|
||||
$(PYTHON) $(SYMBOL_SCRIPT) win32 $(VERSION) > $(top_srcdir)/$@
|
||||
|
||||
src/Symbols.os2: $(SYMBOL_SCRIPT)
|
||||
$(PYTHON) $(SYMBOL_SCRIPT) os2 $(VERSION) > $(top_srcdir)/$@
|
||||
|
||||
src/Symbols.static: $(SYMBOL_SCRIPT)
|
||||
$(PYTHON) $(SYMBOL_SCRIPT) static $(VERSION) > $(top_srcdir)/$@
|
||||
|
||||
#===============================================================================
|
||||
# Building windows resource files (if needed).
|
||||
|
||||
.rc.lo:
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(RCFLAGS) $< -o $@
|
||||
|
||||
#===============================================================================
|
||||
# Disable autoheader.
|
||||
AUTOHEADER=echo
|
||||
|
||||
########
|
||||
# doc/ #
|
||||
########
|
||||
|
||||
if FULL_SUITE
|
||||
dist_html_DATA = doc/index.html doc/libsndfile.jpg doc/libsndfile.css doc/print.css doc/api.html \
|
||||
doc/command.html doc/bugs.html doc/sndfile_info.html doc/new_file_type.HOWTO \
|
||||
doc/win32.html doc/FAQ.html doc/lists.html doc/embedded_files.html doc/octave.html \
|
||||
doc/tutorial.html
|
||||
endif
|
||||
|
||||
#############
|
||||
# examples/ #
|
||||
#############
|
||||
|
||||
check_PROGRAMS += examples/make_sine examples/sfprocess examples/list_formats examples/generate examples/sndfilehandle \
|
||||
examples/sndfile-to-text examples/sndfile-loopify
|
||||
|
||||
examples_sndfile_to_text_SOURCES = examples/sndfile-to-text.c
|
||||
examples_sndfile_to_text_LDADD = src/libsndfile.la
|
||||
|
||||
examples_sndfile_loopify_SOURCES = examples/sndfile-loopify.c
|
||||
examples_sndfile_loopify_LDADD = src/libsndfile.la
|
||||
|
||||
examples_make_sine_SOURCES = examples/make_sine.c
|
||||
examples_make_sine_LDADD = src/libsndfile.la
|
||||
|
||||
examples_sfprocess_SOURCES = examples/sfprocess.c
|
||||
examples_sfprocess_LDADD = src/libsndfile.la
|
||||
|
||||
examples_list_formats_SOURCES = examples/list_formats.c
|
||||
examples_list_formats_LDADD = src/libsndfile.la
|
||||
|
||||
examples_generate_SOURCES = examples/generate.c
|
||||
examples_generate_LDADD = src/libsndfile.la
|
||||
|
||||
examples_sndfilehandle_SOURCES = examples/sndfilehandle.cc
|
||||
examples_sndfilehandle_LDADD = src/libsndfile.la
|
||||
|
||||
##########
|
||||
# tests/ #
|
||||
##########
|
||||
|
||||
TESTS_ENVIRONMENT = $(SHELL) tests/test_wrapper.sh
|
||||
|
||||
if ENABLE_TEST_COVERAGE
|
||||
CPP_TEST =
|
||||
else
|
||||
CPP_TEST = tests/cpp_test
|
||||
endif
|
||||
|
||||
TESTS = tests/pedantic-header-test.sh
|
||||
|
||||
check_PROGRAMS += tests/sfversion tests/floating_point_test tests/write_read_test \
|
||||
tests/lossy_comp_test tests/error_test tests/ulaw_test tests/alaw_test tests/dwvw_test \
|
||||
tests/peak_chunk_test tests/command_test tests/stdio_test \
|
||||
tests/pcm_test tests/headerless_test tests/pipe_test tests/header_test tests/misc_test \
|
||||
tests/raw_test tests/string_test tests/multi_file_test tests/chunk_test \
|
||||
tests/scale_clip_test tests/win32_test tests/aiff_rw_test tests/virtual_io_test \
|
||||
tests/locale_test tests/win32_ordinal_test tests/ogg_test tests/compression_size_test \
|
||||
tests/checksum_test tests/external_libs_test tests/rdwr_test tests/format_check_test $(CPP_TEST) \
|
||||
tests/channel_test tests/long_read_write_test tests/stdin_test tests/stdout_test \
|
||||
tests/dither_test tests/fix_this tests/largefile_test tests/benchmark tests/ogg_opus_test
|
||||
|
||||
BUILT_SOURCES += \
|
||||
tests/write_read_test.c \
|
||||
tests/pcm_test.c \
|
||||
tests/header_test.c \
|
||||
tests/utils.c \
|
||||
tests/scale_clip_test.c \
|
||||
tests/pipe_test.c \
|
||||
tests/rdwr_test.c \
|
||||
tests/floating_point_test.c \
|
||||
tests/benchmark.c
|
||||
|
||||
EXTRA_DIST += $(BUILT_SOURCES) \
|
||||
tests/write_read_test.tpl tests/write_read_test.def \
|
||||
tests/pcm_test.tpl tests/pcm_test.def \
|
||||
tests/header_test.tpl tests/header_test.def \
|
||||
tests/utils.tpl tests/utils.def \
|
||||
tests/scale_clip_test.tpl tests/scale_clip_test.def \
|
||||
tests/pipe_test.tpl tests/pipe_test.def \
|
||||
tests/rdwr_test.tpl tests/rdwr_test.def \
|
||||
tests/floating_point_test.tpl tests/floating_point_test.def \
|
||||
tests/benchmark.tpl tests/benchmark.def
|
||||
|
||||
# If we're cross compiling from Linux to Windows and running the test suite
|
||||
# under Wine, we need a symbolic link to the generated libsndfile DLL.
|
||||
|
||||
if LINUX_MINGW_CROSS_TEST
|
||||
|
||||
$(check_PROGRAMS) : libsndfile-1.dll
|
||||
|
||||
libsndfile-1.dll :
|
||||
$(LN_S) src/.libs/$@ $@
|
||||
|
||||
clean-local :
|
||||
-rm -f libsndfile-1.dll
|
||||
|
||||
endif
|
||||
|
||||
#===============================================================================
|
||||
|
||||
tests_sfversion_SOURCES = tests/sfversion.c
|
||||
tests_sfversion_LDADD = src/libsndfile.la
|
||||
|
||||
tests_write_read_test_SOURCES = tests/utils.c tests/generate.c tests/generate.h tests/write_read_test.c tests/utils.h
|
||||
tests_write_read_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_lossy_comp_test_SOURCES = tests/utils.c tests/lossy_comp_test.c tests/utils.h
|
||||
tests_lossy_comp_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_fix_this_SOURCES = tests/utils.c tests/fix_this.c tests/utils.h
|
||||
tests_fix_this_LDADD = src/libsndfile.la
|
||||
|
||||
tests_error_test_SOURCES = tests/error_test.c tests/utils.c tests/utils.h
|
||||
tests_error_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_ulaw_test_SOURCES = tests/utils.c tests/ulaw_test.c tests/utils.h
|
||||
tests_ulaw_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_alaw_test_SOURCES = tests/utils.c tests/alaw_test.c tests/utils.h
|
||||
tests_alaw_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_aiff_rw_test_SOURCES = tests/utils.c tests/aiff_rw_test.c tests/utils.h
|
||||
tests_aiff_rw_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_command_test_SOURCES = tests/command_test.c tests/utils.c tests/utils.h
|
||||
tests_command_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_locale_test_SOURCES = tests/locale_test.c tests/utils.c tests/utils.h
|
||||
tests_locale_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_largefile_test_SOURCES = tests/largefile_test.c tests/utils.c tests/utils.h
|
||||
tests_largefile_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_pcm_test_SOURCES = tests/pcm_test.c tests/utils.c tests/utils.h
|
||||
tests_pcm_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_headerless_test_SOURCES = tests/utils.c tests/headerless_test.c tests/utils.h
|
||||
tests_headerless_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_stdin_test_SOURCES = tests/stdin_test.c tests/utils.c tests/utils.h
|
||||
tests_stdin_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_stdout_test_SOURCES = tests/stdout_test.c tests/utils.h
|
||||
tests_stdout_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_stdio_test_SOURCES = tests/stdio_test.c tests/utils.c tests/utils.h
|
||||
tests_stdio_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_pipe_test_SOURCES = tests/pipe_test.c tests/utils.c tests/utils.h
|
||||
tests_pipe_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_benchmark_SOURCES = tests/benchmark.c tests/utils.h
|
||||
tests_benchmark_LDADD = src/libsndfile.la
|
||||
|
||||
tests_header_test_SOURCES = tests/header_test.c tests/utils.c tests/utils.h
|
||||
tests_header_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_misc_test_SOURCES = tests/misc_test.c tests/utils.c tests/utils.h
|
||||
tests_misc_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_raw_test_SOURCES = tests/raw_test.c tests/utils.c tests/utils.h
|
||||
tests_raw_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_string_test_SOURCES = tests/string_test.c tests/utils.c tests/utils.h
|
||||
tests_string_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_dither_test_SOURCES = tests/dither_test.c tests/utils.c tests/utils.h
|
||||
tests_dither_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_chunk_test_SOURCES = tests/chunk_test.c tests/utils.c tests/utils.h
|
||||
tests_chunk_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_multi_file_test_SOURCES = tests/multi_file_test.c tests/utils.c tests/utils.h
|
||||
tests_multi_file_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_virtual_io_test_SOURCES = tests/virtual_io_test.c tests/utils.c tests/utils.h
|
||||
tests_virtual_io_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_ogg_test_SOURCES = tests/ogg_test.c tests/utils.c tests/utils.h
|
||||
tests_ogg_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_ogg_opus_test_SOURCES = tests/ogg_opus_test.c tests/utils.c tests/utils.h
|
||||
tests_ogg_opus_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_compression_size_test_SOURCES = tests/compression_size_test.c tests/utils.c tests/utils.h tests/dft_cmp.h
|
||||
tests_compression_size_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_rdwr_test_SOURCES = tests/rdwr_test.c tests/utils.c tests/utils.h
|
||||
tests_rdwr_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_win32_test_SOURCES = tests/win32_test.c
|
||||
# Link lib here so that generating the testsuite tarball works correctly.
|
||||
tests_win32_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_win32_ordinal_test_SOURCES = tests/win32_ordinal_test.c tests/utils.c tests/utils.h
|
||||
tests_win32_ordinal_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_external_libs_test_SOURCES = tests/external_libs_test.c tests/utils.c tests/utils.h
|
||||
tests_external_libs_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_format_check_test_SOURCES = tests/format_check_test.c tests/utils.c tests/utils.h
|
||||
tests_format_check_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_channel_test_SOURCES = tests/channel_test.c tests/utils.c tests/utils.h
|
||||
tests_channel_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_long_read_write_test_SOURCES = tests/long_read_write_test.c tests/utils.c tests/utils.h tests/dft_cmp.h
|
||||
tests_long_read_write_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_cpp_test_SOURCES = tests/cpp_test.cc tests/utils.c tests/utils.h
|
||||
tests_cpp_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_checksum_test_SOURCES = tests/checksum_test.c tests/utils.c tests/utils.h
|
||||
tests_checksum_test_LDADD = src/libsndfile.la
|
||||
|
||||
# Lite remove start
|
||||
tests_dwvw_test_SOURCES = tests/dwvw_test.c tests/utils.c tests/utils.h
|
||||
tests_dwvw_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_floating_point_test_SOURCES = tests/utils.c tests/utils.h tests/dft_cmp.c tests/dft_cmp.h tests/floating_point_test.c
|
||||
tests_floating_point_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_peak_chunk_test_SOURCES = tests/peak_chunk_test.c tests/utils.c tests/utils.h
|
||||
tests_peak_chunk_test_LDADD = src/libsndfile.la
|
||||
|
||||
tests_scale_clip_test_SOURCES = tests/scale_clip_test.c tests/utils.c tests/utils.h
|
||||
tests_scale_clip_test_LDADD = src/libsndfile.la
|
||||
# Lite remove end
|
||||
|
||||
#===============================================================================
|
||||
# Autogen generated sources.
|
||||
# Coerce the multiple inputs -> multiple outputs problem
|
||||
# into suffix rules by "linearising" the dependency graph.
|
||||
# Yes, this sucks, but GNU make patterns aren't portable,
|
||||
# see also https://github.com/erikd/libsndfile/issues/369
|
||||
|
||||
SUFFIXES = .tpl .def
|
||||
|
||||
.tpl.def:
|
||||
touch $@
|
||||
|
||||
# unconditionally running touch on the .def
|
||||
# files is necessary to keep all timestamps
|
||||
# consistent, in order to prevent stale files
|
||||
# from calling autogen in tarball releases.
|
||||
.def.c:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $<
|
||||
cd $(top_srcdir)/$(@D) && autogen --writable $(<F)
|
||||
|
||||
# recommended Automake way for multi-output targets:
|
||||
# https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html
|
||||
tests/utils.h : tests/utils.c
|
||||
@if test -f $@; then :; else \
|
||||
cd $(top_srcdir) && \
|
||||
rm -f tests/utils.c && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) tests/utils.c; \
|
||||
fi
|
||||
|
||||
########
|
||||
# man/ #
|
||||
########
|
||||
|
||||
if FULL_SUITE
|
||||
dist_man_MANS = man/sndfile-info.1 man/sndfile-play.1 man/sndfile-convert.1 man/sndfile-cmp.1 \
|
||||
man/sndfile-metadata-get.1 man/sndfile-metadata-set.1 man/sndfile-concat.1 \
|
||||
man/sndfile-interleave.1 man/sndfile-deinterleave.1 man/sndfile-salvage.1
|
||||
|
||||
# Same manpage for both programs.
|
||||
man/sndfile-metadata-set.1: man/sndfile-metadata-get.1
|
||||
-rm -f $@
|
||||
cd $(top_srcdir)/man && $(LN_S) sndfile-metadata-get.1 sndfile-metadata-set.1
|
||||
|
||||
man/sndfile-deinterleave.1: man/sndfile-interleave.1
|
||||
-rm -f $@
|
||||
cd $(top_srcdir)/man && $(LN_S) sndfile-interleave.1 sndfile-deinterleave.1
|
||||
|
||||
#############
|
||||
# programs/ #
|
||||
#############
|
||||
|
||||
bin_PROGRAMS = programs/sndfile-info programs/sndfile-play programs/sndfile-convert programs/sndfile-cmp \
|
||||
programs/sndfile-metadata-set programs/sndfile-metadata-get programs/sndfile-interleave \
|
||||
programs/sndfile-deinterleave programs/sndfile-concat programs/sndfile-salvage
|
||||
endif
|
||||
|
||||
# required by test-sndfile-metadata-set.py
|
||||
check_PROGRAMS += programs/sndfile-metadata-set programs/sndfile-metadata-get
|
||||
|
||||
EXTRA_DIST += programs/test-sndfile-metadata-set.py
|
||||
|
||||
programs_sndfile_info_SOURCES = programs/sndfile-info.c programs/common.c programs/common.h
|
||||
programs_sndfile_info_LDADD = src/libsndfile.la
|
||||
|
||||
programs_sndfile_play_SOURCES = programs/sndfile-play.c programs/common.c programs/common.h
|
||||
programs_sndfile_play_LDADD = src/libsndfile.la $(OS_SPECIFIC_LINKS) $(ALSA_LIBS) $(SNDIO_LIBS)
|
||||
|
||||
programs_sndfile_convert_SOURCES = programs/sndfile-convert.c programs/common.c programs/common.h
|
||||
programs_sndfile_convert_LDADD = src/libsndfile.la
|
||||
|
||||
programs_sndfile_cmp_SOURCES = programs/sndfile-cmp.c programs/common.c programs/common.h
|
||||
programs_sndfile_cmp_LDADD = src/libsndfile.la
|
||||
|
||||
programs_sndfile_metadata_set_SOURCES = programs/sndfile-metadata-set.c programs/common.c programs/common.h
|
||||
programs_sndfile_metadata_set_LDADD = src/libsndfile.la
|
||||
|
||||
programs_sndfile_metadata_get_SOURCES = programs/sndfile-metadata-get.c programs/common.c programs/common.h
|
||||
programs_sndfile_metadata_get_LDADD = src/libsndfile.la
|
||||
|
||||
programs_sndfile_interleave_SOURCES = programs/sndfile-interleave.c programs/common.c programs/common.h
|
||||
programs_sndfile_interleave_LDADD = src/libsndfile.la
|
||||
|
||||
programs_sndfile_deinterleave_SOURCES = programs/sndfile-deinterleave.c programs/common.c programs/common.h
|
||||
programs_sndfile_deinterleave_LDADD = src/libsndfile.la
|
||||
|
||||
programs_sndfile_concat_SOURCES = programs/sndfile-concat.c programs/common.c programs/common.h
|
||||
programs_sndfile_concat_LDADD = src/libsndfile.la
|
||||
|
||||
programs_sndfile_salvage_SOURCES = programs/sndfile-salvage.c programs/common.c programs/common.h
|
||||
programs_sndfile_salvage_LDADD = src/libsndfile.la
|
||||
|
||||
############
|
||||
# regtest/ #
|
||||
############
|
||||
|
||||
if HAVE_SQLITE3
|
||||
check_PROGRAMS += regtest/sndfile-regtest
|
||||
endif
|
||||
|
||||
regtest_sndfile_regtest_SOURCES = regtest/regtest.h regtest/sndfile-regtest.c regtest/database.c regtest/checksum.c
|
||||
regtest_sndfile_CPPFLAGS = -I$(top_srcdir)/src $(SQLITE3_CFLAGS) $(OS_SPECIFIC_CFLAGS)
|
||||
regtest_sndfile_regtest_LDADD = src/libsndfile.la $(SQLITE3_LIBS)
|
||||
|
||||
################
|
||||
# test-tarball #
|
||||
################
|
||||
test-tarball : Scripts/build-test-tarball.mk
|
||||
$(MAKE) $(bin_PROGRAMS) $(check_PROGRAMS)
|
||||
$(MAKE) -f Scripts/build-test-tarball.mk
|
||||
|
|
|
@ -1,938 +0,0 @@
|
|||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
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 = .
|
||||
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
|
||||
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
$(srcdir)/libsndfile.spec.in $(srcdir)/sndfile.pc.in \
|
||||
$(srcdir)/build-test-tarball.mk.in COPYING Cfg/compile \
|
||||
Cfg/config.guess Cfg/config.sub Cfg/depcomp Cfg/install-sh \
|
||||
Cfg/missing Cfg/ltmain.sh $(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
|
||||
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/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_largefile.m4 \
|
||||
$(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/flexible_array.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)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
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 = libsndfile.spec sndfile.pc build-test-tarball.mk
|
||||
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
|
||||
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@
|
||||
GETCONF = @GETCONF@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
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@
|
||||
MAINT = @MAINT@
|
||||
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@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STRIP = @STRIP@
|
||||
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@
|
||||
htmldocdir = @htmldocdir@
|
||||
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@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
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-gcc-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
|
||||
CLEANFILES = *~
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = sndfile.pc
|
||||
m4datadir = $(datadir)/aclocal
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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
|
||||
.PRECIOUS: 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
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 $@
|
||||
build-test-tarball.mk: $(top_builddir)/config.status $(srcdir)/build-test-tarball.mk.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 shar distribution archives 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 distribution archives compressed with" \
|
||||
"legacy program 'compress' 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)/_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 \
|
||||
&& ../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
|
||||
|
||||
|
||||
#===============================================================================
|
||||
|
||||
test: check-recursive
|
||||
|
||||
# Target to make autogenerated files.
|
||||
genfiles :
|
||||
(cd src ; make genfiles)
|
||||
(cd tests ; make genfiles)
|
||||
|
||||
testprogs :
|
||||
(cd src ; make testprogs)
|
||||
(cd tests ; make testprogs)
|
||||
|
||||
test-tarball : build-test-tarball.mk
|
||||
make all
|
||||
make -f 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:
|
|
@ -1,3 +1,32 @@
|
|||
Version 1.0.28 (2017-04-02)
|
||||
* Fix buffer overruns in FLAC and ID3 handling code.
|
||||
* Move to variable length header storage.
|
||||
* Fix detection of Large File Support for 32 bit systems.
|
||||
* Remove large stack allocations in ALAC handling code.
|
||||
* Remove all use of Variable Length Arrays.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.27 (2016-06-19)
|
||||
* Fix an SF_INFO seekable flag regression introduced in 1.0.26.
|
||||
* Fix potential infinite loops on malformed input files.
|
||||
* Add string metadata read/write for CAF and RF64.
|
||||
* Add handling of CUE chunks.
|
||||
* Fix endian-ness issues in PAF files.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.26 (2015-11-22)
|
||||
* Fix for CVE-2014-9496, SD2 buffer read overflow.
|
||||
* Fix for CVE-2014-9756, file_io.c divide by zero.
|
||||
* Fix for CVE-2015-7805, AIFF heap write overflow.
|
||||
* Add support for ALAC encoder in a CAF container.
|
||||
* Add support for Cart chunks in WAV files.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.25 (2011-07-13)
|
||||
* Fix for Secunia Advisory SA45125, heap overflow in PAF file handler.
|
||||
* Accept broken WAV files with blockalign == 0.
|
||||
* Minor bug fixes and improvements.
|
||||
|
||||
Version 1.0.24 (2011-03-23)
|
||||
* WAV files now have an 18 byte u-law and A-law fmt chunk.
|
||||
* Document virtual I/O functionality.
|
||||
|
|
|
@ -39,10 +39,10 @@ QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
|
|||
# Use Octave's mkoctfile to do all the heavy lifting. Unfortunately, its
|
||||
# a little dumb so we need to guide it carefully.
|
||||
sndfile.oct : sndfile.o
|
||||
$(QUIET_GEN) $(MKOCTFILE) -v $(AM_CPPFLAGS) $(top_builddir)/Octave/$+ -L$(SNDFILEDIR)/.libs -L$(SNDFILEDIR) -lsndfile -o $(top_builddir)/Octave/$@ > /dev/null
|
||||
$(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 $(AM_CPPFLAGS) -c $+ -o $(top_builddir)/Octave/$@ > /dev/null
|
||||
$(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.
|
||||
|
@ -76,3 +76,4 @@ uninstall-local :
|
|||
|
||||
clean-local :
|
||||
rm -f sndfile.o sndfile.oct
|
||||
@if test $(abs_builddir) != $(abs_srcdir) ; then rm -f PKG_ADD ; fi
|
||||
|
|
|
@ -1,609 +0,0 @@
|
|||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
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
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||
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/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_largefile.m4 \
|
||||
$(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/flexible_array.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)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
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)
|
||||
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@
|
||||
GETCONF = @GETCONF@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
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@
|
||||
MAINT = @MAINT@
|
||||
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@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STRIP = @STRIP@
|
||||
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@
|
||||
htmldocdir = @htmldocdir@
|
||||
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@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
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: @MAINTAINER_MODE_TRUE@ $(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
|
||||
.PRECIOUS: 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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
|
||||
|
||||
|
||||
# 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 $(AM_CPPFLAGS) $(top_builddir)/Octave/$+ -L$(SNDFILEDIR)/.libs -L$(SNDFILEDIR) -lsndfile -o $(top_builddir)/Octave/$@ > /dev/null
|
||||
|
||||
sndfile.o : sndfile.cc
|
||||
$(QUIET_GEN) $(MKOCTFILE) -v $(AM_CPPFLAGS) -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
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,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.
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
** Copyright (C) 2007-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** This program is free software; you can redistribute it and/or modify
|
||||
** it under the terms of the GNU Lesser General Public License as published by
|
||||
** the Free Software Foundation; either version 2.1 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU Lesser General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU Lesser General Public License
|
||||
** along with this program; if not, write to the Free Software
|
||||
** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
int format_of_str (const std::string & fmt) ;
|
||||
|
||||
void string_of_format (std::string & fmt, int format) ;
|
|
@ -2,20 +2,28 @@
|
|||
|
||||
|
||||
# Check where we're being run from.
|
||||
if [ -d Octave ]; then
|
||||
if test -d Octave ; then
|
||||
cd Octave
|
||||
octave_src_dir=$(pwd)
|
||||
elif test -z "$octave_src_dir" ; then
|
||||
echo
|
||||
echo "Error : \$octave_src_dir is undefined."
|
||||
echo
|
||||
exit 1
|
||||
else
|
||||
octave_src_dir=$(cd $octave_src_dir && pwd)
|
||||
fi
|
||||
|
||||
# Find libsndfile shared object.
|
||||
libsndfile_lib_location=""
|
||||
|
||||
if [ -f "../src/.libs/libsndfile.so" ]; then
|
||||
if test -f "../src/.libs/libsndfile.so" ; then
|
||||
libsndfile_lib_location="../src/.libs/"
|
||||
elif [ -f "../src/libsndfile.so" ]; then
|
||||
elif test -f "../src/libsndfile.so" ; then
|
||||
libsndfile_lib_location="../src/"
|
||||
elif [ -f "../src/.libs/libsndfile.dylib" ]; then
|
||||
elif test -f "../src/.libs/libsndfile.dylib" ; then
|
||||
libsndfile_lib_location="../src/.libs/"
|
||||
elif [ -f "../src/libsndfile.dylib" ]; then
|
||||
elif test -f "../src/libsndfile.dylib" ; then
|
||||
libsndfile_lib_location="../src/"
|
||||
else
|
||||
echo
|
||||
|
@ -30,9 +38,9 @@ libsndfile_lib_location=`(cd $libsndfile_lib_location && pwd)`
|
|||
# Find sndfile.oct
|
||||
sndfile_oct_location=""
|
||||
|
||||
if [ -f .libs/sndfile.oct ]; then
|
||||
if test -f .libs/sndfile.oct ; then
|
||||
sndfile_oct_location=".libs"
|
||||
elif [ -f sndfile.oct ]; then
|
||||
elif test -f sndfile.oct ; then
|
||||
sndfile_oct_location="."
|
||||
else
|
||||
echo "Not able to find the sndfile.oct binaries we've just built."
|
||||
|
@ -47,7 +55,7 @@ case `file -b $sndfile_oct_location/sndfile.oct` in
|
|||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Not able to find the sndfile.oct binaries we've just built."
|
||||
echo "Not able to find the sndfile.oct binary we just built."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
@ -55,16 +63,19 @@ case `file -b $sndfile_oct_location/sndfile.oct` in
|
|||
|
||||
# Make sure the TERM environment variable doesn't contain anything wrong.
|
||||
unset TERM
|
||||
|
||||
# echo "octave_src_dir : $octave_src_dir"
|
||||
# echo "libsndfile_lib_location : $libsndfile_lib_location"
|
||||
# echo "sndfile_oct_location : $sndfile_oct_location"
|
||||
|
||||
export LD_LIBRARY_PATH="$libsndfile_lib_location:$LD_LIBRARY_PATH"
|
||||
if test ! -f PKG_ADD ; then
|
||||
cp $octave_src_dir/PKG_ADD .
|
||||
fi
|
||||
|
||||
octave_src_dir=`(cd $octave_src_dir && pwd)`
|
||||
export LD_LIBRARY_PATH="$libsndfile_lib_location:$LD_LIBRARY_PATH"
|
||||
|
||||
octave_script="$octave_src_dir/octave_test.m"
|
||||
|
||||
(cd $sndfile_oct_location && octave -qH $octave_script)
|
||||
|
||||
|
||||
res=$?
|
||||
echo
|
||||
exit $res
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
This is libsndfile, 1.0.24
|
||||
This is libsndfile, 1.0.28
|
||||
|
||||
libsndfile is a library of C routines for reading and writing
|
||||
files containing sampled audio data.
|
||||
|
@ -20,6 +20,9 @@ Bormann. Their original code can be found at :
|
|||
The src/G72x directory contains code written and released by Sun Microsystems
|
||||
under a suitably free license.
|
||||
|
||||
The src/ALAC directory contains code written and released by Apple Inc and
|
||||
released under the Apache license.
|
||||
|
||||
|
||||
LINUX
|
||||
-----
|
||||
|
@ -32,9 +35,12 @@ If you really do need to compile from source it should be as easy as:
|
|||
make
|
||||
make install
|
||||
|
||||
Since libsndfile optionally links against libFLAC, libogg and libvorbis, you
|
||||
will need to install appropriate versions of these libraries before running
|
||||
configure as above.
|
||||
Since libsndfile optionally links against libFLAC, libogg, libvorbis and
|
||||
libopus, you will need to install appropriate versions of these libraries
|
||||
before running configure as above.
|
||||
|
||||
You can use CMake now to build under Linux, also under Windows and MacOS, see
|
||||
README.md for details. CMake toolchain is usable, but still exterimental.
|
||||
|
||||
|
||||
UNIX
|
||||
|
@ -44,11 +50,13 @@ Compile as for Linux.
|
|||
|
||||
Win32/Win64
|
||||
-----------
|
||||
The default Windows compilers are nowhere near compliant with the 1999 ISO
|
||||
C Standard and hence not able to compile libsndfile.
|
||||
|
||||
Please use the libsndfile binaries available on the libsndfile web site.
|
||||
Official Windows binaries are compiled with Autotools and MinGW, but you can use
|
||||
CMake to generate solution for Visual Studio. Details are described in
|
||||
README.md.
|
||||
|
||||
It is still recommended to use the libsndfile binaries available on the
|
||||
libsndfile web site.
|
||||
|
||||
MacOSX
|
||||
------
|
||||
|
@ -63,3 +71,6 @@ The libsndfile home page is at :
|
|||
|
||||
http://www.mega-nerd.com/libsndfile/
|
||||
|
||||
Bugs and support questions can be raised at :
|
||||
|
||||
https://github.com/erikd/libsndfile/
|
||||
|
|
|
@ -0,0 +1,228 @@
|
|||
# libsndfile
|
||||
|
||||
[![Build Status](https://secure.travis-ci.org/erikd/libsndfile.svg?branch=master)](http://travis-ci.org/erikd/libsndfile)
|
||||
[![Build status](https://ci.appveyor.com/api/projects/status/github/erikd/libsndfile?branch=master?svg=true)](https://ci.appveyor.com/project/Erik13183/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 libopus-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 libopus 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
|
||||
|
||||
Although Autotools is the primary and recommended build toolchain, experimental
|
||||
CMake meta build generator is also available. The build process with CMake takes
|
||||
place in two stages. First, standard build files are created from configuration
|
||||
scripts. Then the platform's native build tools are used for the actual
|
||||
building. CMake can produce Microsoft Visual Studio project and solution files,
|
||||
Unix Makefiles, Xcode projects and [many more](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html).
|
||||
|
||||
Some IDE support CMake natively or with plugins, check you IDE documentation
|
||||
for details.
|
||||
|
||||
### Requirements
|
||||
|
||||
1. C99-compliant compiler toolchain (tested with GCC, Clang and Visual
|
||||
Studio 2015)
|
||||
2. CMake 3.1.3 or newer
|
||||
|
||||
There are some recommended packages to enable all features of libsndfile:
|
||||
|
||||
1. Ogg, Vorbis and FLAC libraries and headers to enable these formats support
|
||||
2. ALSA development package under Linux to build sndfile-play utility
|
||||
3. Sndio development package under BSD to build sndfile-play utility
|
||||
|
||||
### Building from command line
|
||||
|
||||
CMake can handle out-of-place builds, enabling several builds from
|
||||
the same source tree, and cross-compilation. The ability to build a directory
|
||||
tree outside the source tree is a key feature, ensuring that if a build
|
||||
directory is removed, the source files remain unaffected.
|
||||
|
||||
mkdir CMakeBuild
|
||||
cd CMakeBuild
|
||||
|
||||
Then run `cmake` command with directory where CMakeLists.txt script is located
|
||||
as argument (relative paths are supported):
|
||||
|
||||
cmake ..
|
||||
|
||||
This command will configure and write build script or solution to CMakeBuild
|
||||
directory. CMake is smart enough to create Unix makefiles under Linux or Visual
|
||||
Studio solution if you have Visual Studio installed, but you can configure
|
||||
[generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html)
|
||||
with `-G` command line parameter:
|
||||
|
||||
cmake .. -G"Unix Makefiles"
|
||||
|
||||
The build procedure depends on the selected generator. With "Unix Makefiles" you
|
||||
can type:
|
||||
|
||||
make & make install
|
||||
|
||||
With "Visual Studio" and some other generators you can open solution or project
|
||||
from `CMakeBuild` directory and build using IDE.
|
||||
|
||||
Finally, you can use unified command:
|
||||
|
||||
cmake --build .
|
||||
|
||||
CMake also provides Qt-based cross platform GUI, cmake-gui. Using it is trivial
|
||||
and does not require detailed explanations.
|
||||
|
||||
### Configuring CMake
|
||||
|
||||
You can pass additional options with `/D<parameter>=<value>` when you run
|
||||
`cmake` command. Some useful system options:
|
||||
|
||||
* `CMAKE_C_FLAGS` - additional C compiler flags
|
||||
* `CMAKE_BUILD_TYPE` - configuration type, `DEBUG`, `RELEASE`, `RELWITHDEBINFO`
|
||||
or `MINSIZEREL`. `DEBUG` is default
|
||||
* `CMAKE_INSTALL_PREFIX` - build install location, the same as `--prefix` option
|
||||
of `configure` script
|
||||
|
||||
Useful libsndfile options:
|
||||
|
||||
* `BUILD_SHARED_LIBS` - build shared library (DLL under Windows) when `ON`,
|
||||
build static library othervise. This option is `OFF` by default.
|
||||
* `BUILD_PROGRAMS` - build libsndfile's utilities from `programs/` directory,
|
||||
`ON` by default.
|
||||
* `BUILD_EXAMPLES` - build examples, `ON` by default.
|
||||
* `BUILD_TESTING` - build tests. Then you can run tests with `ctest` command,
|
||||
`ON` by default. Setting `BUILD_SHARED_LIBS` to `ON` disables this option.
|
||||
* `ENABLE_EXTERNAL_LIBS` - enable Ogg, Vorbis, FLAC and Opus support. This
|
||||
option is available and set to `ON` if all dependency libraries were found.
|
||||
* `ENABLE_CPU_CLIP` - enable tricky cpu specific clipper. Enabled and set to
|
||||
`ON` when CPU clips negative\positive. Don't touch it if you are not sure
|
||||
* `ENABLE_BOW_DOCS` - enable black-on-white documentation theme, `OFF` by
|
||||
default.
|
||||
* `ENABLE_EXPERIMENTAL` - enable experimental code. Don't use it if you are
|
||||
not sure. This option is `OFF` by default.
|
||||
* `ENABLE_CPACK` - enable [CPack](https://cmake.org/cmake/help/latest/module/CPack.html) support.
|
||||
This option is `ON` by default.
|
||||
* `ENABLE_PACKAGE_CONFIG` - generate and install [package config file](https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#config-file-packages).
|
||||
This option is `ON` by default.
|
||||
* `ENABLE_STATIC_RUNTIME` - enable static runtime on Windows platform, `OFF` by
|
||||
default.
|
||||
|
||||
**Note**: For MSVC compiler this option is depecated. Use `CMAKE_MSVC_RUNTIME_LIBRARY`
|
||||
option instead (CMake >= 3.15).
|
||||
* `ENABLE_COMPATIBLE_LIBSNDFILE_NAME` - set DLL name to `libsndfile-1.dll`
|
||||
(canonical name) on Windows platform, `sndfile.dll` otherwise, `OFF` by
|
||||
default. Library name can be different depending on platform. The well known
|
||||
DLL name on Windows platform is `libsndfile-1.dll`, because the only way to
|
||||
build Windows library before was MinGW toolchain with Autotools. This name
|
||||
is native for MinGW ecosystem, Autotools constructs it using MinGW platform
|
||||
rules from `sndfile` target. But when you build with CMake using native
|
||||
Windows compiler, the name is `sndfile.dll`. This is name for native Windows
|
||||
platform, because Windows has no library naming rules. It is preffered
|
||||
because you can search library using package manager or CMake's
|
||||
`find_library` command on any platform using the same `sndfile` name.
|
||||
|
||||
Deprecated options:
|
||||
|
||||
* `DISABLE_EXTERNAL_LIBS` - disable Ogg, Vorbis and FLAC support. Replaced by
|
||||
`ENABLE_EXTERNAL_LIBS`
|
||||
* `DISABLE_CPU_CLIP` - disable tricky cpu specific clipper. Replaced by
|
||||
`ENABLE_CPU_CLIP`
|
||||
* `BUILD_STATIC_LIBS` - build static library. Use `BUILD_SHARED_LIBS` instead
|
||||
|
||||
### Linking from CMake projects
|
||||
|
||||
First you need to add `FindOgg.cmake`, `FindVorbis.cmake`, `FindVorbisEnc.cmake`,
|
||||
`FindFLAC.cmake` and `FindOpus.cmake` files to some directory inside your CMake
|
||||
project (usually `cmake`) and add it to `CMAKE_MODULE_PATH`:
|
||||
|
||||
project(SomeApplication)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
Now you can search `libsndfile` library from your `CMakeLists.txt`
|
||||
with this command:
|
||||
|
||||
find_package(SndFile)
|
||||
|
||||
`SndFile_FOUND` is set to `ON` when library is found.
|
||||
|
||||
If `libsndfile` dependency is critical, you can add `REQUIRED` to
|
||||
`find_package`:
|
||||
|
||||
find_package(SndFile REQUIRED)
|
||||
|
||||
With with option `find_package` will terminate configuration process
|
||||
if `libsndfile` is not found.
|
||||
|
||||
You can also add version check:
|
||||
|
||||
find_package(SndFile 1.0.29)
|
||||
|
||||
`find_package` will report error, if `libsndfile` version is < 1.0.29.
|
||||
|
||||
You can combine `REQUIRED` and version if you need.
|
||||
|
||||
To link `libsndfile` library use:
|
||||
|
||||
target_link_libraries(my_application PRIVATE SndFile::sndfile)
|
||||
|
||||
### Notes for Windows users
|
||||
|
||||
First advice - set `ENABLE_STATIC_RUNTIME` to ON. This will remove dependencies
|
||||
on runtime DLLs.
|
||||
|
||||
Second advice is about Ogg, Vorbis FLAC and Opus support. Searching external
|
||||
libraries under Windows is a little bit tricky. The best way is to use
|
||||
[Vcpkg](https://github.com/Microsoft/vcpkg). You need to install static libogg,
|
||||
libvorbis, libflac and libopus libraries:
|
||||
|
||||
vcpkg install libogg:x64-windows-static libvorbis:x64-windows-static
|
||||
libflac:x64-windows-static opus:x64-windows-static libogg:x86-windows-static
|
||||
libvorbis:x86-windows-static libflac:x86-windows-static opus:x86-windows-static
|
||||
|
||||
Then and add this parameter to cmake command line:
|
||||
|
||||
-DCMAKE_TOOLCHAIN_FILE=<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake
|
||||
|
||||
You also need to set `VCPKG_TARGET_TRIPLET` because you use static libraries:
|
||||
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static
|
||||
|
||||
## 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
|
|
@ -0,0 +1,96 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# Copyright (C) 2013-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
#
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Neither the author nor the names of any contributors may be used
|
||||
# to endorse or promote products derived from this software without
|
||||
# specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Android NDK version number; eg r10, r10b etc
|
||||
ANDROID_NDK_VER=${ANDROID_NDK_VER:-r10}
|
||||
|
||||
# Android NDK gcc version; eg 4.8, 4.9 etc.
|
||||
ANDROID_GCC_VER=${ANDROID_GCC_VER:-4.9}
|
||||
|
||||
# Android API version; eg 14 (Android 4.0), 21 (Android 5.0) etc.
|
||||
ANDROID_API_VER=${ANDROID_API_VER:-14}
|
||||
|
||||
ANDROID_TARGET=${ANDROID_TARGET:-arm-linux-androideabi}
|
||||
|
||||
if test -z ${ANDROID_TOOLCHAIN_HOME} ; then
|
||||
echo "Environment variable ANDROID_TOOLCHAIN_HOME not defined."
|
||||
echo "This should point to the directory containing the Android NDK."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# No more user config beyond here.
|
||||
|
||||
BUILD_MACHINE=$(uname -s | tr 'A-Z' 'a-z')-$(uname -m)
|
||||
|
||||
function die_with {
|
||||
echo $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
export CROSS_COMPILE=${ANDROID_TARGET}
|
||||
|
||||
# Don't forget to adjust this to your NDK path
|
||||
export ANDROID_NDK=${ANDROID_TOOLCHAIN_HOME}/android-ndk-${ANDROID_NDK_VER}
|
||||
test -d ${ANDROID_NDK} || die_with "Error : ANDROID_NDK '$ANDROID_NDK' does not exist."
|
||||
|
||||
export ANDROID_PREFIX=${ANDROID_NDK}/toolchains/arm-linux-androideabi-${ANDROID_GCC_VER}/prebuilt/${BUILD_MACHINE}
|
||||
test -d ${ANDROID_PREFIX} || die_with "Error : ANDROID_PREFIX '$ANDROID_PREFIX' does not exist."
|
||||
|
||||
export SYSROOT=${ANDROID_NDK}/platforms/android-${ANDROID_API_VER}/arch-arm
|
||||
test -d ${SYSROOT} || die_with "Error : SYSROOT '$SYSROOT' does not exist."
|
||||
|
||||
export CROSS_PREFIX=${ANDROID_PREFIX}/bin/${CROSS_COMPILE}
|
||||
test -f ${CROSS_PREFIX}-gcc || die_with "Error : CROSS_PREFIX compiler '${CROSS_PREFIX}-gcc' does not exist."
|
||||
|
||||
|
||||
# Non-exhaustive lists of compiler + binutils
|
||||
# Depending on what you compile, you might need more binutils than that
|
||||
export CPP=${CROSS_PREFIX}-cpp
|
||||
export AR=${CROSS_PREFIX}-ar
|
||||
export AS=${CROSS_PREFIX}-as
|
||||
export NM=${CROSS_PREFIX}-nm
|
||||
export CC=${CROSS_PREFIX}-gcc
|
||||
export CXX=${CROSS_PREFIX}-g++
|
||||
export LD=${CROSS_PREFIX}-ld
|
||||
export RANLIB=${CROSS_PREFIX}-ranlib
|
||||
|
||||
# Don't mix up .pc files from your host and build target
|
||||
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
|
||||
|
||||
# Set up the needed FLAGS.
|
||||
export CFLAGS="${CFLAGS} -gstabs --sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${ANDROID_PREFIX}/include"
|
||||
export CXXFLAGS="${CXXFLAGS} -gstabs -fno-exceptions --sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${ANDROID_PREFIX}/include -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/include/ -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/libs/armeabi/include"
|
||||
|
||||
export CPPFLAGS="${CFLAGS}"
|
||||
export LDFLAGS="${LDFLAGS} -L${SYSROOT}/usr/lib -L${ANDROID_PREFIX}/lib"
|
||||
|
||||
# Create a symlink to the gdbclient.
|
||||
test -h gdbclient || ln -s ${ANDROID_PREFIX}/bin/arm-linux-androideabi-gdb gdbclient
|
||||
|
||||
./configure --host=${CROSS_COMPILE} --with-sysroot=${SYSROOT} "$@"
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash -eu
|
||||
|
||||
CFLAGS="-fsanitize=address -g" CXXFLAGS=${CFLAGS} ./configure
|
||||
|
|
@ -10,6 +10,11 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
|||
|
||||
HOST_TRIPLET = @HOST_TRIPLET@
|
||||
|
||||
SRC_BINDIR = @SRC_BINDIR@
|
||||
TEST_BINDIR = @TEST_BINDIR@
|
||||
|
||||
LIBRARY := $(SRC_BINDIR)libsndfile.so.$(LIB_VERSION)
|
||||
|
||||
LIB_VERSION := $(shell echo $(PACKAGE_VERSION) | sed -e 's/[a-z].*//')
|
||||
|
||||
TESTNAME = libsndfile-testsuite-$(HOST_TRIPLET)-$(PACKAGE_VERSION)
|
||||
|
@ -19,15 +24,12 @@ TARBALL = $(TESTNAME).tar.gz
|
|||
# Find the test programs by grepping the script for the programs it executes.
|
||||
testprogs := $(shell grep '^\./' tests/test_wrapper.sh | sed -e "s|./||" -e "s/ .*//" | sort | uniq)
|
||||
# Also add the programs not found by the above.
|
||||
testprogs += sfversion@EXEEXT@ stdin_test@EXEEXT@ stdout_test@EXEEXT@ cpp_test@EXEEXT@ win32_test@EXEEXT@
|
||||
testprogs += tests/sfversion$(EXEEXT) tests/stdin_test$(EXEEXT) tests/stdout_test$(EXEEXT) \
|
||||
tests/cpp_test$(EXEEXT) tests/win32_test$(EXEEXT)
|
||||
|
||||
# Find the single test program in src/ .
|
||||
srcprogs := $(shell if test -x src/.libs/test_main$(EXEEXT) ; then echo "src/.libs/test_main$(EXEEXT)" ; else echo "src/test_main$(EXEEXT)" ; fi)
|
||||
|
||||
libfiles := $(shell if test ! -z $(EXEEXT) ; then echo "src/libsndfile-1.def src/.libs/libsndfile-1.dll" ; else echo "src/.libs/libsndfile.so.$(LIB_VERSION)" ; fi)
|
||||
|
||||
files := $(addprefix tests/.libs/,$(subst @EXEEXT@,$(EXEEXT),$(testprogs))) $(libfiles) $(srcprogs)
|
||||
libfiles := $(shell if test ! -z $(EXEEXT) ; then echo "src/libsndfile-1.def src/.libs/libsndfile-1.dll" ; elif test -f $(LIBRARY) ; then echo $(LIBRARY) ; fi ; fi)
|
||||
|
||||
testbins := $(testprogs) $(libfiles)
|
||||
|
||||
all : $(TARBALL)
|
||||
|
||||
|
@ -44,13 +46,16 @@ $(TARBALL) : $(TESTNAME)/test_wrapper.sh
|
|||
@echo "Created : $(TARBALL)"
|
||||
@echo
|
||||
|
||||
$(TESTNAME)/test_wrapper.sh : $(files) tests/test_wrapper.sh tests/pedantic-header-test.sh
|
||||
$(TESTNAME)/test_wrapper.sh : tests/test_wrapper.sh tests/pedantic-header-test.sh
|
||||
rm -rf $(TESTNAME)
|
||||
mkdir -p $(TESTNAME)/tests/
|
||||
cp $(files) $(TESTNAME)/tests/
|
||||
echo
|
||||
echo $(testbins)
|
||||
echo
|
||||
cp $(testbins) $(TESTNAME)/tests/
|
||||
cp tests/test_wrapper.sh $(TESTNAME)/
|
||||
cp tests/pedantic-header-test.sh $(TESTNAME)/tests/
|
||||
chmod u+x $@
|
||||
|
||||
tests/test_wrapper.sh : tests/test_wrapper.sh.in
|
||||
(cd tests/ ; make $@)
|
||||
make $@
|
|
@ -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
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash -eu
|
||||
|
||||
rm -rf CMakeCache.txt CMakeFiles/ _Build
|
||||
|
||||
mkdir _Build
|
||||
cd _Build
|
||||
cmake ..
|
||||
cmake --build .
|
||||
ctest -V
|
|
@ -0,0 +1,256 @@
|
|||
#!/usr/bin/python -tt
|
||||
#
|
||||
# Copyright (C) 2005-2017 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 (";[^\s]"), "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" )
|
||||
|
||||
# Parens around single case argument.
|
||||
, ( re.compile ("\s+case\s+\([a-zA-Z0-9_]+\)\s+:"), "parens around single case argument" )
|
||||
|
||||
# Open curly at end of line.
|
||||
, ( re.compile ("\)\s*{\s*$"), "open curly brace at end of line" )
|
||||
|
||||
# Pre and post increment/decrment.
|
||||
, ( re.compile ("[^\(\[][+-]{2}[a-zA-Z0-9_]"), "space after pre increment/decrement" )
|
||||
, ( re.compile ("[a-zA-Z0-9_][+-]{2}[^\)\,]]"), "space before post increment/decrement" )
|
||||
]
|
||||
|
||||
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)
|
|
@ -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
|
||||
|
||||
# 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.
|
||||
|
||||
# http://man.openbsd.org/sed#r
|
||||
# http://man.openbsd.org/sed#E
|
||||
# http://netbsd.gw.com/cgi-bin/man-cgi?sed++NetBSD-current
|
||||
# https://github.com/freebsd/freebsd/blob/master/usr.bin/sed/main.c
|
||||
# http://git.savannah.gnu.org/gitweb/?p=sed.git;a=blob;f=sed/sed.c
|
||||
# GNU has -r and -E (undocumented); MacOS has -E but not -r; Sunos has neither.
|
||||
files=$(git diff-index --name-status --cached HEAD | grep -v ^D | sed -E "s/^[A-Z]+[A-Z0-9]*[ \t]+/ /")
|
||||
|
||||
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
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
case "$1" in
|
||||
w32)
|
||||
compiler_name=i686-w64-mingw32
|
||||
;;
|
||||
w64)
|
||||
compiler_name=x86_64-w64-mingw32
|
||||
;;
|
||||
*)
|
||||
echo "$0 (w32|w64) <other args>"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
shift
|
||||
|
||||
build_cpu=$(dpkg-architecture -qDEB_BUILD_GNU_CPU)
|
||||
build_host=$build_cpu-linux
|
||||
|
||||
./configure --host=$compiler_name --target=$compiler_name --build=$build_host \
|
||||
--program-prefix='' --disable-sqlite --disable-static $@
|
|
@ -0,0 +1,125 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
# If this is set to true (via the environment) then CRC checking will be
|
||||
# disabled in libogg giving fuzzers a better chance at finding something.
|
||||
disable_ogg_crc ?= false
|
||||
|
||||
# Build libsndfile as a dynamic/shared library, but statically link to
|
||||
# libFLAC, libogg, libopus and libvorbis
|
||||
|
||||
ogg_version = libogg-1.3.3
|
||||
ogg_sha256sum = 4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08
|
||||
|
||||
vorbis_version = libvorbis-1.3.6
|
||||
vorbis_sha256sum = af00bb5a784e7c9e69f56823de4637c350643deedaf333d0fa86ecdba6fcb415
|
||||
|
||||
flac_version = flac-1.3.2
|
||||
flac_sha256sum = 91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f
|
||||
|
||||
opus_version = opus-1.3
|
||||
opus_sha256sum = 4f3d69aefdf2dbaf9825408e452a8a414ffc60494c70633560700398820dc550
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Code follows.
|
||||
|
||||
ogg_tarball = $(ogg_version).tar.xz
|
||||
vorbis_tarball = $(vorbis_version).tar.xz
|
||||
flac_tarball = $(flac_version).tar.xz
|
||||
opus_tarball = $(opus_version).tar.gz
|
||||
|
||||
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 --enable-option-checking
|
||||
|
||||
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-* Build/opus-*
|
||||
rm -rf Build/bin Build/include Build/lib Build/share
|
||||
rm -f Build/Stamp/install Build/Stamp/extract Build/Stamp/sha256sum Build/Stamp/build-ogg
|
||||
|
||||
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/Tarballs/$(opus_tarball) : Build/Stamp/init
|
||||
(cd $(tarball_dir) && wget https://archive.mozilla.org/pub/opus/$(opus_tarball) -O $(opus_tarball))
|
||||
touch $@
|
||||
|
||||
Build/Stamp/tarballs : Build/Tarballs/$(flac_tarball) Build/Tarballs/$(ogg_tarball) Build/Tarballs/$(vorbis_tarball) Build/Tarballs/$(opus_tarball)
|
||||
touch $@
|
||||
|
||||
Build/Stamp/sha256sum : Build/Stamp/tarballs
|
||||
test `sha256sum $(tarball_dir)/$(ogg_tarball) | sed "s/ .*//"` = $(ogg_sha256sum)
|
||||
test `sha256sum $(tarball_dir)/$(vorbis_tarball) | sed "s/ .*//"` = $(vorbis_sha256sum)
|
||||
test `sha256sum $(tarball_dir)/$(flac_tarball) | sed "s/ .*//"` = $(flac_sha256sum)
|
||||
test `sha256sum $(tarball_dir)/$(opus_tarball) | sed "s/ .*//"` = $(opus_sha256sum)
|
||||
touch $@
|
||||
|
||||
Build/Stamp/extract : Build/Stamp/sha256sum
|
||||
# (cd Build && tar xf Tarballs/$(ogg_tarball))
|
||||
(cd Build && tar xf Tarballs/$(flac_tarball))
|
||||
(cd Build && tar xf Tarballs/$(vorbis_tarball))
|
||||
(cd Build && tar xf Tarballs/$(opus_tarball))
|
||||
touch $@
|
||||
|
||||
Build/Stamp/build-ogg : Build/Stamp/sha256sum
|
||||
ifeq ($(disable_ogg_crc), true)
|
||||
echo "Ogg/CRC enabled"
|
||||
(cd Build && git clone https://github.com/xiph/ogg $(ogg_version))
|
||||
(cd Build/$(ogg_version) && ./autogen.sh && CFLAGS=-fPIC ./configure $(config_options) --disable-crc && make all install)
|
||||
else
|
||||
echo "Ogg/CRC disabled"
|
||||
(cd Build && tar xf Tarballs/$(ogg_tarball))
|
||||
(cd Build/$(ogg_version) && CFLAGS=-fPIC ./configure $(config_options) && make all install)
|
||||
endif
|
||||
touch $@
|
||||
|
||||
Build/Stamp/install-libs : Build/Stamp/extract Build/Stamp/build-ogg
|
||||
(cd Build/$(vorbis_version) && CFLAGS=-fPIC ./configure $(config_options) && make all install)
|
||||
(cd Build/$(flac_version) && CFLAGS=-fPIC ./configure $(config_options) && make all install)
|
||||
(cd Build/$(opus_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#' Makefile
|
||||
sed -i 's#^EXTERNAL_XIPH_LIBS.*#EXTERNAL_XIPH_LIBS = -static $(pwd)/Build/lib/libFLAC.la $(pwd)/Build/lib/libvorbis.la $(pwd)/Build/lib/libvorbisenc.la $(pwd)/Build/lib/libopus.la $(pwd)/Build/lib/libogg.la -dynamic #' Makefile
|
||||
make clean
|
||||
touch $@
|
||||
|
||||
Build/Stamp/build : Build/Stamp/configure
|
||||
make all check
|
||||
touch $@
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = README-precompiled-dll.txt testprog.c
|
||||
|
|
@ -1,489 +0,0 @@
|
|||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
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
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||
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/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_largefile.m4 \
|
||||
$(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/flexible_array.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)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
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)
|
||||
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@
|
||||
GETCONF = @GETCONF@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
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@
|
||||
MAINT = @MAINT@
|
||||
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@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STRIP = @STRIP@
|
||||
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@
|
||||
htmldocdir = @htmldocdir@
|
||||
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@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
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: @MAINTAINER_MODE_TRUE@ $(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
|
||||
.PRECIOUS: 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,23 @@
|
|||
version: 1.0.29pre1-{build}
|
||||
image: Visual Studio 2017
|
||||
configuration: Debug
|
||||
platform:
|
||||
- Win32
|
||||
- x64
|
||||
install:
|
||||
- if %platform%==Win32 set VCPKG_TRIPLET=x86-windows
|
||||
- if %platform%==x64 set VCPKG_TRIPLET=x64-windows
|
||||
- vcpkg install libogg:%VCPKG_TRIPLET% libvorbis:%VCPKG_TRIPLET% libflac:%VCPKG_TRIPLET% sqlite3:%VCPKG_TRIPLET% opus:%VCPKG_TRIPLET%
|
||||
before_build:
|
||||
- mkdir CMakeBuild
|
||||
- cd CMakeBuild
|
||||
- if %platform%==Win32 set CMAKE_GENERATOR=Visual Studio 15 2017
|
||||
- if %platform%==x64 set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
|
||||
- cmake .. -G"%CMAKE_GENERATOR%" -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
build:
|
||||
project: c:\projects\libsndfile\CMakeBuild\sndfile.sln
|
||||
verbosity: minimal
|
||||
test_script:
|
||||
- ctest -V
|
||||
cache:
|
||||
C:\Tools\vcpkg\Installed -> appveyor.yml
|
|
@ -0,0 +1,176 @@
|
|||
#!/bin/sh
|
||||
# Run this to set up the build system: configure, makefiles, etc.
|
||||
# (based on the version in enlightenment's cvs)
|
||||
|
||||
package="libsndfile"
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
|
@ -1,125 +0,0 @@
|
|||
Index: Makefile.am
|
||||
===================================================================
|
||||
--- Makefile.am (revision 12938)
|
||||
+++ Makefile.am (working copy)
|
||||
@@ -1,5 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
+ACLOCAL_AMFLAGS = -I M4
|
||||
+
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
|
||||
|
||||
if BUILD_OCTAVE_MOD
|
||||
Index: configure.ac
|
||||
===================================================================
|
||||
--- configure.ac (revision 12938)
|
||||
+++ configure.ac (working copy)
|
||||
@@ -15,16 +15,13 @@
|
||||
AC_CONFIG_MACRO_DIR([M4])
|
||||
AC_CONFIG_HEADERS([src/config.h])
|
||||
|
||||
-AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION)
|
||||
+AM_INIT_AUTOMAKE
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
dnl Audacity policy: don't enable automatic rebuild of configure et al if
|
||||
dnl sources change
|
||||
AM_MAINTAINER_MODE([disable])
|
||||
|
||||
-dnl Add parameters for aclocal
|
||||
-AC_SUBST(ACLOCAL_AMFLAGS, "-I M4")
|
||||
-
|
||||
AC_LANG([C])
|
||||
|
||||
AC_PROG_CC
|
||||
Index: examples/Makefile.am
|
||||
===================================================================
|
||||
--- examples/Makefile.am (revision 12938)
|
||||
+++ examples/Makefile.am (working copy)
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
noinst_PROGRAMS = make_sine sfprocess list_formats generate sndfilehandle sndfile-to-text
|
||||
|
||||
-INCLUDES = -I$(top_srcdir)/src
|
||||
+AM_CPPFLAGS = -I$(top_srcdir)/src
|
||||
|
||||
sndfile_to_text_SOURCES = sndfile-to-text.c
|
||||
sndfile_to_text_LDADD = $(top_builddir)/src/libsndfile.la
|
||||
Index: Octave/Makefile.am
|
||||
===================================================================
|
||||
--- Octave/Makefile.am (revision 12938)
|
||||
+++ Octave/Makefile.am (working copy)
|
||||
@@ -21,7 +21,7 @@
|
||||
OCT_LIBS = @OCT_LIBS@
|
||||
|
||||
SNDFILEDIR = $(top_builddir)/src
|
||||
-INCLUDES = -I$(SNDFILEDIR)
|
||||
+AM_CPPFLAGS = -I$(SNDFILEDIR)
|
||||
|
||||
oct_module_srcs = sndfile.cc
|
||||
oct_module_files = sndfile.oct PKG_ADD
|
||||
@@ -39,10 +39,10 @@
|
||||
# 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
|
||||
+ $(QUIET_GEN) $(MKOCTFILE) -v $(AM_CPPFLAGS) $(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
|
||||
+ $(QUIET_GEN) $(MKOCTFILE) -v $(AM_CPPFLAGS) -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.
|
||||
Index: programs/Makefile.am
|
||||
===================================================================
|
||||
--- programs/Makefile.am (revision 12938)
|
||||
+++ programs/Makefile.am (working copy)
|
||||
@@ -7,7 +7,7 @@
|
||||
OS_SPECIFIC_CFLAGS = @OS_SPECIFIC_CFLAGS@
|
||||
OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
|
||||
|
||||
-INCLUDES = -I$(top_srcdir)/src $(OS_SPECIFIC_CFLAGS)
|
||||
+AM_CPPFLAGS = -I$(top_srcdir)/src $(OS_SPECIFIC_CFLAGS)
|
||||
|
||||
CLEANFILES = *~
|
||||
|
||||
Index: regtest/Makefile.am
|
||||
===================================================================
|
||||
--- regtest/Makefile.am (revision 12938)
|
||||
+++ regtest/Makefile.am (working copy)
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
noinst_HEADERS = regtest.h
|
||||
|
||||
-INCLUDES = -I$(top_srcdir)/src $(SQLITE3_CFLAGS) $(OS_SPECIFIC_CFLAGS)
|
||||
+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)
|
||||
Index: src/Makefile.am
|
||||
===================================================================
|
||||
--- src/Makefile.am (revision 12938)
|
||||
+++ src/Makefile.am (working copy)
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
SUBDIRS = GSM610 G72x
|
||||
|
||||
-INCLUDES = @EXTERNAL_CFLAGS@
|
||||
+AM_CPPFLAGS = @EXTERNAL_CFLAGS@
|
||||
|
||||
lib_LTLIBRARIES = libsndfile.la
|
||||
include_HEADERS = sndfile.hh
|
||||
Index: tests/Makefile.am
|
||||
===================================================================
|
||||
--- tests/Makefile.am (revision 12938)
|
||||
+++ tests/Makefile.am (working copy)
|
||||
@@ -6,7 +6,7 @@
|
||||
CPP_TEST = cpp_test
|
||||
endif
|
||||
|
||||
-INCLUDES = -I$(top_srcdir)/src
|
||||
+AM_CPPFLAGS = -I$(top_srcdir)/src
|
||||
|
||||
noinst_PROGRAMS = sfversion floating_point_test write_read_test \
|
||||
lossy_comp_test error_test ulaw_test alaw_test dwvw_test \
|
|
@ -0,0 +1,168 @@
|
|||
jobs:
|
||||
- job: Ubuntu_CMake
|
||||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
steps:
|
||||
- script: |
|
||||
sudo apt-get install -y autogen libogg-dev libvorbis-dev libflac-dev libopus-dev libasound2-dev libsqlite3-dev libspeex-dev
|
||||
displayName: Installing dependencies
|
||||
- script: |
|
||||
mkdir build
|
||||
displayName: Creating build directory
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'build'
|
||||
cmakeArgs: ' ..'
|
||||
- script: |
|
||||
cd build
|
||||
cmake --build .
|
||||
displayName: Building
|
||||
- script: |
|
||||
cd build
|
||||
ctest
|
||||
displayName: Testing
|
||||
|
||||
- job: Ubuntu_AutoTools
|
||||
pool:
|
||||
vmImage: 'Ubuntu-16.04'
|
||||
steps:
|
||||
- script: sudo apt-get install -y autogen libogg-dev libvorbis-dev libflac-dev libopus-dev libasound2-dev libsqlite3-dev libspeex-dev
|
||||
displayName: Installing dependencies
|
||||
- script: ./autogen.sh
|
||||
displayName: Bootstrapping
|
||||
- script: ./configure --enable-werror
|
||||
displayName: Configuring
|
||||
- script: make all
|
||||
displayName: Building
|
||||
- script: make check
|
||||
displayName: Testing
|
||||
- script: make distcheck
|
||||
displayName: Testing distribution
|
||||
|
||||
- job: Windows_CMake_VS2015_Win32
|
||||
pool:
|
||||
vmImage: 'vs2015-win2012r2'
|
||||
steps:
|
||||
- script: git clone https://github.com/microsoft/vcpkg
|
||||
displayName: Bootstraping Vcpkg
|
||||
- script: .\vcpkg\bootstrap-vcpkg.bat
|
||||
displayName: Bootstraping Vcpkg
|
||||
- script: .\vcpkg\vcpkg.exe install libogg libvorbis libflac opus sqlite3 speex
|
||||
displayName: Installing dependencies
|
||||
- script: |
|
||||
mkdir build
|
||||
displayName: Creating build directory
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'build'
|
||||
cmakeArgs: ' -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
|
||||
- script: |
|
||||
cd build
|
||||
cmake --build .
|
||||
displayName: Building
|
||||
- script: |
|
||||
cd build
|
||||
ctest
|
||||
displayName: Testing
|
||||
|
||||
- job: Windows_CMake_VS2015_Win64
|
||||
pool:
|
||||
vmImage: 'vs2015-win2012r2'
|
||||
steps:
|
||||
- script: git clone https://github.com/microsoft/vcpkg
|
||||
displayName: Bootstraping Vcpkg
|
||||
- script: .\vcpkg\bootstrap-vcpkg.bat
|
||||
displayName: Bootstraping Vcpkg
|
||||
- script: .\vcpkg\vcpkg.exe install libogg:x64-windows libvorbis:x64-windows libflac:x64-windows opus:x64-windows sqlite3:x64-windows speex:x64-windows
|
||||
displayName: Installing dependencies
|
||||
- script: |
|
||||
mkdir build
|
||||
displayName: Creating build directory
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'build'
|
||||
cmakeArgs: ' -G "Visual Studio 14 2015" -A x64 -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
|
||||
- script: |
|
||||
cd build
|
||||
cmake --build .
|
||||
displayName: Building
|
||||
- script: |
|
||||
cd build
|
||||
ctest
|
||||
displayName: Testing
|
||||
|
||||
- job: Windows_CMake_VS2017_Win32
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
||||
steps:
|
||||
- script: git clone https://github.com/microsoft/vcpkg
|
||||
displayName: Bootstraping Vcpkg
|
||||
- script: .\vcpkg\bootstrap-vcpkg.bat
|
||||
displayName: Bootstraping Vcpkg
|
||||
- script: .\vcpkg\vcpkg.exe install libogg libvorbis libflac opus sqlite3 speex
|
||||
displayName: Installing dependencies
|
||||
- script: |
|
||||
mkdir build
|
||||
displayName: Creating build directory
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'build'
|
||||
cmakeArgs: ' -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
|
||||
- script: |
|
||||
cd build
|
||||
cmake --build .
|
||||
displayName: Building
|
||||
- script: |
|
||||
cd build
|
||||
ctest
|
||||
displayName: Testing
|
||||
|
||||
- job: Windows_CMake_VS2017_Win64
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
||||
steps:
|
||||
- script: git clone https://github.com/microsoft/vcpkg
|
||||
displayName: Bootstraping Vcpkg
|
||||
- script: .\vcpkg\bootstrap-vcpkg.bat
|
||||
displayName: Bootstraping Vcpkg
|
||||
- script: .\vcpkg\vcpkg.exe install libogg:x64-windows libvorbis:x64-windows libflac:x64-windows opus:x64-windows sqlite3:x64-windows speex:x64-windows
|
||||
displayName: Installing dependencies
|
||||
- script: |
|
||||
mkdir build
|
||||
displayName: Creating build directory
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'build'
|
||||
cmakeArgs: ' -G "Visual Studio 15 2017" -A x64 -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ..'
|
||||
- script: |
|
||||
cd build
|
||||
cmake --build .
|
||||
displayName: Building
|
||||
- script: |
|
||||
cd build
|
||||
ctest
|
||||
displayName: Testing
|
||||
|
||||
- job: MacOS
|
||||
pool:
|
||||
vmImage: 'macOS-10.13'
|
||||
steps:
|
||||
- script: |
|
||||
brew update
|
||||
brew install autogen libogg libvorbis flac opus sqlite3 speex
|
||||
displayName: Installing dependencies
|
||||
- script: |
|
||||
mkdir build
|
||||
displayName: Creating build directory
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
workingDirectory: 'build'
|
||||
cmakeArgs: ' ..'
|
||||
- script: |
|
||||
cd build
|
||||
cmake --build .
|
||||
displayName: Building
|
||||
- script: |
|
||||
cd build
|
||||
ctest
|
||||
displayName: Testing
|
|
@ -0,0 +1,46 @@
|
|||
# CMake implementation of AutoGen
|
||||
# Copyright (C) 2017 Anonymous Maarten <anonymous.maarten@gmail.com>
|
||||
|
||||
set(AUTOGEN_SCRIPT "${CMAKE_MODULE_PATH}/CMakeAutoGenScript.cmake")
|
||||
|
||||
function(lsf_autogen DIR_REL NAME_WE)
|
||||
set(EXTS ${ARGN})
|
||||
set(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/${DIR_REL}/${NAME_WE}.def")
|
||||
set(OUTPUTS)
|
||||
foreach(EXT ${EXTS})
|
||||
list(APPEND OUTPUTS "${NAME_WE}.${EXT}")
|
||||
endforeach()
|
||||
add_autogen_target("${INPUT}" "${CMAKE_CURRENT_BINARY_DIR}/${DIR_REL}" ${OUTPUTS})
|
||||
endfunction()
|
||||
|
||||
function(add_autogen_target INPUT OUTPUTDIR)
|
||||
set(OUTPUTFILES "${ARGN}")
|
||||
|
||||
if (OUTPUTDIR)
|
||||
set(PREFIX "${OUTPUTDIR}/")
|
||||
else()
|
||||
set(PREFIX "")
|
||||
endif()
|
||||
|
||||
set(ARTIFACTS)
|
||||
foreach(OUTPUTFILE ${OUTPUTFILES})
|
||||
list(APPEND ARTIFACTS "${PREFIX}${OUTPUTFILE}")
|
||||
endforeach()
|
||||
|
||||
set(EXTRA_ARGS)
|
||||
if (AUTOGEN_DEBUG)
|
||||
list(APPEND EXTRA_ARGS "-DDEBUG=1")
|
||||
endif()
|
||||
if (OUTPUTDIR)
|
||||
list(APPEND EXTRA_ARGS "-DOUTPUTDIR=${OUTPUTDIR}")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${ARTIFACTS}
|
||||
COMMAND ${CMAKE_COMMAND} "-DDEFINITION=${INPUT}" ${EXTRA_ARGS} -P "${AUTOGEN_SCRIPT}"
|
||||
MAIN_DEPENDENCY "${INPUT}"
|
||||
DEPENDS "${AUTOGEN_SCRIPT}"
|
||||
COMMENT "CMakeAutoGen: generating ${OUTPUTFILES}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||
)
|
||||
endfunction()
|
|
@ -0,0 +1,442 @@
|
|||
# CMake implementation of AutoGen
|
||||
# Copyright (C) 2017 Anonymous Maarten <anonymous.maarten@gmail.com>
|
||||
|
||||
set(WS " \t\r\n")
|
||||
|
||||
function(cutoff_first_occurrence TEXT OCCURRENCE RESULT)
|
||||
string(FIND "${TEXT}" "${OCCURRENCE}" OCCURRENCE_INDEX)
|
||||
if (OCCURRENCE_INDEX EQUAL -1)
|
||||
set(${TEXT} "" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
string(LENGTH "${OCCURRENCE}" OCCURRENCE_LENGTH)
|
||||
math(EXPR CUTOFF_INDEX "${OCCURRENCE_INDEX}+${OCCURRENCE_LENGTH}")
|
||||
string(SUBSTRING "${TEXT}" ${CUTOFF_INDEX} -1 TEXT_REMAINDER)
|
||||
set(${RESULT} "${TEXT_REMAINDER}" PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
||||
|
||||
function(read_definition DEFINITION_FILENAME TEMPLATE_FILENAME DATA)
|
||||
file(READ "${DEFINITION_FILENAME}" DEFINITION_CONTENTS)
|
||||
|
||||
string(REGEX MATCH "autogen definitions ([a-zA-Z\\._-]+);[${WS}]*" TEMPLATE_MATCH "${DEFINITION_CONTENTS}")
|
||||
if (NOT TEMPLATE_MATCH)
|
||||
message(FATAL_ERROR "${DEFINITION_FILENAME} doest not contain an AutoGen definition.")
|
||||
endif()
|
||||
|
||||
get_filename_component(DEFINITION_DIR "${DEFINITION_FILENAME}" PATH)
|
||||
set(${TEMPLATE_FILENAME} "${DEFINITION_DIR}/${CMAKE_MATCH_1}" PARENT_SCOPE)
|
||||
if (DEBUG)
|
||||
message("found: TEMPLATE_FILENAME=${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
|
||||
cutoff_first_occurrence("${DEFINITION_CONTENTS}" "${TEMPLATE_MATCH}" DEFINITION_CONTENTS)
|
||||
|
||||
set(DEFINITION "")
|
||||
|
||||
while (1)
|
||||
string(REGEX MATCH "([a-zA-Z_][a-zA-Z0-9_]*)[${WS}]*=[${WS}]*{[${WS}]*" GROUPSTART_MATCH "${DEFINITION_CONTENTS}")
|
||||
if (NOT GROUPSTART_MATCH)
|
||||
break()
|
||||
endif()
|
||||
set(GROUPNAME "${CMAKE_MATCH_1}")
|
||||
cutoff_first_occurrence("${DEFINITION_CONTENTS}" "${GROUPSTART_MATCH}" DEFINITION_CONTENTS)
|
||||
if (DEBUG)
|
||||
message("found: GROUPNAME=${GROUPNAME}")
|
||||
endif()
|
||||
set(NBKEYS 0)
|
||||
set(GROUP_KEY_VALUES "")
|
||||
while (1)
|
||||
string(REGEX MATCH "^([a-zA-Z_][a-zA-Z0-9_]*)[${WS}]*=[${WS}]*(([\"']([${WS}a-zA-Z0-9_%\\\"<>\(\)\\.*+/?:,\\-]+)[\"'])|([a-zA-Z0-9_%\\]+))[${WS}]*;[${WS}]*" KEY_VALUE_MATCH "${DEFINITION_CONTENTS}")
|
||||
if (NOT KEY_VALUE_MATCH)
|
||||
break()
|
||||
endif()
|
||||
set(KEY "${CMAKE_MATCH_1}")
|
||||
if ("${CMAKE_MATCH_4}" STREQUAL "")
|
||||
set(VALUE "${CMAKE_MATCH_5}")
|
||||
else()
|
||||
string(REPLACE "\\\"" "\"" VALUE "${CMAKE_MATCH_4}")
|
||||
#set(VALUE "${CMAKE_MATCH_4}")
|
||||
endif()
|
||||
|
||||
if (DEBUG)
|
||||
message("found: KEY=${KEY}, VALUE=${VALUE}")
|
||||
endif()
|
||||
math(EXPR NBKEYS "${NBKEYS}+1")
|
||||
list(APPEND GROUP_KEY_VALUES "${KEY}" "${VALUE}")
|
||||
cutoff_first_occurrence("${DEFINITION_CONTENTS}" "${KEY_VALUE_MATCH}" DEFINITION_CONTENTS)
|
||||
endwhile()
|
||||
string(REGEX MATCH "^[${WS}]*}[${WS}]*;[${WS}]*" GROUPEND_MATCH "${DEFINITION_CONTENTS}")
|
||||
if (NOT GROUPEND_MATCH)
|
||||
message(FATAL_ERROR "Group ${GROUPNAME} did not finish.")
|
||||
endif()
|
||||
cutoff_first_occurrence("${DEFINITION_CONTENTS}" "${GROUPEND_MATCH}" DEFINITION_CONTENTS)
|
||||
list(APPEND DEFINITION "${GROUPNAME}" ${NBKEYS} ${GROUP_KEY_VALUES})
|
||||
endwhile()
|
||||
set(${DATA} "${DEFINITION}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(match_autogen_group TEXT START POS0 POS1 MATCH FOUND)
|
||||
string(SUBSTRING "${TEXT}" "${START}" -1 TEXT)
|
||||
string(REGEX MATCH "\\[\\+[${WS}]*([ a-zA-Z0-9=_$%\\(\\)\"\\+\\-]+)[${WS}]*\\+\\]" MATCH_GROUP "${TEXT}")
|
||||
if ("${MATCH_GROUP}" STREQUAL "")
|
||||
set(${FOUND} 0 PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
string(FIND "${TEXT}" "${MATCH_GROUP}" START_TEXT)
|
||||
math(EXPR POS0_var "${START}+${START_TEXT}")
|
||||
string(LENGTH "${MATCH_GROUP}" MATCH_LENGTH)
|
||||
math(EXPR POS1_var "${POS0_var}+${MATCH_LENGTH}")
|
||||
set(${POS0} "${POS0_var}" PARENT_SCOPE)
|
||||
set(${POS1} "${POS1_var}" PARENT_SCOPE)
|
||||
set(${FOUND} 1 PARENT_SCOPE)
|
||||
string(STRIP "${CMAKE_MATCH_1}" CONTENT)
|
||||
set("${MATCH}" "${CONTENT}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(append_output SUFFICES_FILENAMES TEXT POS0 POS1 FILTER)
|
||||
math(EXPR POS_LENGTH "${POS1}-${POS0}")
|
||||
string(LENGTH "${TEXT}" TEXT_LENGTH)
|
||||
string(SUBSTRING "${TEXT}" "${POS0}" "${POS_LENGTH}" TEXT_APPEND)
|
||||
if (DEBUG)
|
||||
message("appending ${POS0}:${POS1}, length=${POS_LENGTH}")
|
||||
endif()
|
||||
append_output_text("${SUFFICES_FILENAMES}" "${TEXT_APPEND}" "${FILTER}")
|
||||
endfunction()
|
||||
|
||||
function(append_output_text SUFFICES_FILENAMES TEXT_APPEND FILTER)
|
||||
string(LENGTH "${TEXT_APPEND}" TEXT_LENGTH)
|
||||
list(LENGTH SUFFICES_FILENAMES NB)
|
||||
math(EXPR NB_END "${NB}-1")
|
||||
foreach(INDEX RANGE 0 ${NB_END} 3)
|
||||
math(EXPR INDEX_1 "${INDEX}+1")
|
||||
math(EXPR INDEX_2 "${INDEX}+2")
|
||||
list(GET SUFFICES_FILENAMES ${INDEX} SUFFIX)
|
||||
list(GET SUFFICES_FILENAMES ${INDEX_1} FILENAME)
|
||||
list(GET SUFFICES_FILENAMES ${INDEX_2} TEMPFILENAME)
|
||||
set(WRITE_OK 1)
|
||||
if (FILTER)
|
||||
if (NOT "${SUFFIX}" STREQUAL "${FILTER}")
|
||||
set(WRITE_OK 0)
|
||||
endif()
|
||||
endif()
|
||||
if (WRITE_OK)
|
||||
if (DEBUG)
|
||||
message("Write: ${TEXT_LENGTH} characters to ${FILENAME}")
|
||||
endif()
|
||||
file(APPEND "${TEMPFILENAME}" "${TEXT_APPEND}")
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(output_finish SUFFICES_FILENAMES)
|
||||
list(LENGTH SUFFICES_FILENAMES NB)
|
||||
math(EXPR NB_END "${NB}-1")
|
||||
foreach(INDEX RANGE 0 ${NB_END} 3)
|
||||
math(EXPR INDEX_1 "${INDEX}+1")
|
||||
math(EXPR INDEX_2 "${INDEX}+2")
|
||||
list(GET SUFFICES_FILENAMES ${INDEX_1} FILENAME)
|
||||
list(GET SUFFICES_FILENAMES ${INDEX_2} TEMPFILENAME)
|
||||
file(RENAME "${TEMPFILENAME}" "${FILENAME}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(stack_push STACK_ARG)
|
||||
set(STACK_LIST "${${STACK_ARG}}")
|
||||
string(REPLACE ";" " " NEWITEM "${ARGN}")
|
||||
if (DEBUG)
|
||||
list(LENGTH STACK_LIST STACK_LENGTH)
|
||||
message("Pushing \"${NEWITEM}\" onto stack (length=${STACK_LENGTH})")
|
||||
endif()
|
||||
list(APPEND STACK_LIST "${NEWITEM}")
|
||||
set(${STACK_ARG} "${STACK_LIST}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(stack_pop STACK_ARG ITEM)
|
||||
set(STACK_LIST "${${STACK_ARG}}")
|
||||
list(LENGTH STACK_LIST STACK_LENGTH)
|
||||
if (STACK_LENGTH EQUAL 0)
|
||||
message(FATAL_ERROR "ENDFOR: stack is empty")
|
||||
endif()
|
||||
math(EXPR LAST_ITEM_INDEX "${STACK_LENGTH}-1")
|
||||
list(GET STACK_LIST "${LAST_ITEM_INDEX}" LAST_ITEM)
|
||||
list(REMOVE_AT STACK_LIST "${LAST_ITEM_INDEX}")
|
||||
string(REPLACE " " ";" LAST_ITEM_LIST "${LAST_ITEM}")
|
||||
if (DEBUG)
|
||||
message("Popping \"${LAST_ITEM}\" from stack (length=${STACK_LENGTH})")
|
||||
endif()
|
||||
set(${ITEM} "${LAST_ITEM_LIST}" PARENT_SCOPE)
|
||||
set(${STACK_ARG} "${STACK_LIST}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(stack_top STACK_ARG ITEM)
|
||||
set(STACK_LIST "${${STACK_ARG}}")
|
||||
list(LENGTH STACK_LIST STACK_LENGTH)
|
||||
if (STACK_LENGTH EQUAL 0)
|
||||
message(FATAL_ERROR "ENDFOR: stack is empty")
|
||||
endif()
|
||||
math(EXPR LAST_ITEM_INDEX "${STACK_LENGTH}-1")
|
||||
list(GET STACK_LIST "${LAST_ITEM_INDEX}" LAST_ITEM)
|
||||
string(REPLACE " " ";" LAST_ITEM_LIST "${LAST_ITEM}")
|
||||
if (DEBUG)
|
||||
message("Top of stack: \"${LAST_ITEM}\" from stack (length=${STACK_LENGTH})")
|
||||
endif()
|
||||
set(${ITEM} "${LAST_ITEM_LIST}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(stack_find_key STACK_LIST TEMPLATE_PARAMETERS KEY VALUE)
|
||||
list(REVERSE STACK_LIST)
|
||||
foreach(STACK_ITEM ${STACK_LIST})
|
||||
string(REPLACE " " ";" STACK_ITEM_LIST "${STACK_ITEM}")
|
||||
list(GET STACK_ITEM_LIST 3 TP_INDEX)
|
||||
math(EXPR TP_SIZE_INDEX "${TP_INDEX}+1")
|
||||
list(GET TEMPLATE_PARAMETERS ${TP_SIZE_INDEX} TP_SIZE)
|
||||
math(EXPR TP_KV_INDEX_START "${TP_INDEX}+2")
|
||||
math(EXPR TP_KV_INDEX_END "${TP_KV_INDEX_START}+2*${TP_SIZE}-1")
|
||||
foreach(TP_KV_INDEX RANGE ${TP_KV_INDEX_START} ${TP_KV_INDEX_END} 2)
|
||||
list(GET TEMPLATE_PARAMETERS ${TP_KV_INDEX} TP_KEY)
|
||||
if("${TP_KEY}" STREQUAL "${KEY}")
|
||||
math(EXPR TP_VALUE_INDEX "${TP_KV_INDEX}+1")
|
||||
list(GET TEMPLATE_PARAMETERS ${TP_VALUE_INDEX} TP_VALUE)
|
||||
set(${VALUE} "${TP_VALUE}" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
message(FATAL_ERROR "Unknown KEY=${KEY}")
|
||||
endfunction()
|
||||
|
||||
function(template_parameters_find_next_groupname_index TEMPLATE_PARAMETERS GROUPNAME INDEX_LAST INDEX_NEXT)
|
||||
if (${INDEX_LAST} LESS 0)
|
||||
set(INDEX 0)
|
||||
else ()
|
||||
math(EXPR INDEX_1 "1+(${INDEX_LAST})")
|
||||
list(GET TEMPLATE_PARAMETERS ${INDEX_1} GROUPNAME_INDEX_SIZE)
|
||||
math(EXPR INDEX "${INDEX_LAST}+1+2*${GROUPNAME_INDEX_SIZE}+1")
|
||||
endif()
|
||||
list(LENGTH TEMPLATE_PARAMETERS PARAMETERS_LENGTH)
|
||||
while (${INDEX} LESS ${PARAMETERS_LENGTH})
|
||||
list(GET TEMPLATE_PARAMETERS ${INDEX} GROUPNAME_AT_INDEX)
|
||||
if ("${GROUPNAME}" STREQUAL "${GROUPNAME_AT_INDEX}")
|
||||
set("${INDEX_NEXT}" ${INDEX} PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
math(EXPR INDEX_1 "${INDEX}+1")
|
||||
list(GET TEMPLATE_PARAMETERS ${INDEX_1} GROUPNAME_INDEX_SIZE)
|
||||
math(EXPR INDEX "${INDEX}+1+2*${GROUPNAME_INDEX_SIZE}+1")
|
||||
endwhile()
|
||||
set("${INDEX_NEXT}" -1 PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(calculate_line_number TEXT POSITION LINENUMBER_ARG)
|
||||
#math(EXPR INDEX_MAX "${POSITION}-1")
|
||||
string(SUBSTRING "${TEXT}" 0 ${POSITION} SUBTEXT)
|
||||
string(REGEX MATCHALL "\n" MATCH_NEWLINES "${SUBTEXT}")
|
||||
list(LENGTH MATCH_NEWLINES NBLINES)
|
||||
math(EXPR NBLINES "${NBLINES}+1")
|
||||
set(${LINENUMBER_ARG} ${NBLINES} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(parse_template TEMPLATE_FILENAME OUTPUT_DIR TEMPLATE_PARAMETERS)
|
||||
file(READ ${TEMPLATE_FILENAME} TEMPLATE_CONTENTS)
|
||||
set(POSITION 0)
|
||||
match_autogen_group("${TEMPLATE_CONTENTS}" "${POSITION}" POS0 POS1 AUTOGEN FOUND)
|
||||
if (NOT FOUND)
|
||||
message(FATAL_ERROR "Header of template not found")
|
||||
endif()
|
||||
string(REGEX MATCH "AutoGen5 template ([ a-zA-Z0-9]*)" SUFFICES_MATCH "${AUTOGEN}")
|
||||
if (NOT SUFFICES_MATCH)
|
||||
message(FATAL_ERROR "No output suffices found")
|
||||
endif()
|
||||
string(STRIP "${CMAKE_MATCH_1}" SUFFICES)
|
||||
string(REPLACE " " ";" SUFFICES "${SUFFICES}")
|
||||
set(SUFFICES_FILENAMES "")
|
||||
get_filename_component(TEMPLATE_NAME_WE "${TEMPLATE_FILENAME}" NAME_WE)
|
||||
foreach(SUFFIX ${SUFFICES})
|
||||
if ("${OUTPUT_DIR}" STREQUAL "")
|
||||
set(DIR_PREFIX "")
|
||||
else()
|
||||
set(DIR_PREFIX "${OUTPUT_DIR}/")
|
||||
endif()
|
||||
string(RANDOM LENGTH 64 RANDOMSTRING)
|
||||
set(FILENAME "${DIR_PREFIX}${TEMPLATE_NAME_WE}.${SUFFIX}")
|
||||
set(TEMPFILENAME "${DIR_PREFIX}${TEMPLATE_NAME_WE}${RANDOMSTRING}.${SUFFIX}")
|
||||
list(APPEND SUFFICES_FILENAMES "${SUFFIX}" "${FILENAME}" "${TEMPFILENAME}")
|
||||
file(WRITE "${FILENAME}" "")
|
||||
endforeach()
|
||||
if (DEBUG)
|
||||
message("Output files: ${SUFFICES_FILENAMES}")
|
||||
endif()
|
||||
set(WRITE_FILTER "")
|
||||
append_output("${SUFFICES_FILENAMES}" "${TEMPLATE_CONTENTS}" 0 "${POS0}" "${WRITE_FILTER}")
|
||||
math(EXPR POS1 "${POS1}+1")
|
||||
set(POSITION "${POS1}")
|
||||
if (DEBUG)
|
||||
message("Output: ${SUFFICES_FILENAMES}")
|
||||
endif()
|
||||
|
||||
set(STACK "")
|
||||
while (1)
|
||||
match_autogen_group("${TEMPLATE_CONTENTS}" "${POSITION}" POS0 POS1 GROUP_MATCH FOUND)
|
||||
if (NOT FOUND)
|
||||
if (DEBUG)
|
||||
message("No group found. Dumping rest of file.")
|
||||
endif()
|
||||
if (NOT "${STACK}" STREQUAL "")
|
||||
message(FATAL_ERROR "Stack not empty at end of file")
|
||||
endif()
|
||||
string(LENGTH "${TEMPLATE_CONTENTS}" TEXT_LENGTH)
|
||||
append_output("${SUFFICES_FILENAMES}" "${TEMPLATE_CONTENTS}" ${POSITION} ${TEXT_LENGTH} "${WRITE_FILTER}")
|
||||
break()
|
||||
endif()
|
||||
append_output("${SUFFICES_FILENAMES}" "${TEMPLATE_CONTENTS}" ${POSITION} ${POS0} "${WRITE_FILTER}")
|
||||
set(POSITION "${POS1}")
|
||||
|
||||
if (GROUP_MATCH MATCHES "^FOR")
|
||||
string(REPLACE " " ";" GROUP_MATCH_LIST "${GROUP_MATCH}")
|
||||
list(GET GROUP_MATCH_LIST 1 FOR_KEY)
|
||||
template_parameters_find_next_groupname_index("${TEMPLATE_PARAMETERS}" "${FOR_KEY}" -1 FOR_INDEX)
|
||||
if (DEBUG)
|
||||
message("FOR_KEY: ${FOR_KEY}")
|
||||
message("FOR_INDEX: ${FOR_INDEX}")
|
||||
endif()
|
||||
if (${FOR_KEY} LESS 0)
|
||||
message(FATAL_ERROR "FOR has key with empty list. Not implemented yet..")
|
||||
endif()
|
||||
stack_push(STACK FOR ${POSITION} ${FOR_KEY} ${FOR_INDEX})
|
||||
elseif (GROUP_MATCH MATCHES "^ENDFOR")
|
||||
string(REPLACE " " ";" GROUP_MATCH_LIST "${GROUP_MATCH}")
|
||||
list(GET GROUP_MATCH_LIST 1 ENDFOR_KEY)
|
||||
stack_pop(STACK FOR_ITEM)
|
||||
list(GET FOR_ITEM 0 FOR_FOR)
|
||||
if (NOT "${FOR_FOR}" STREQUAL "FOR")
|
||||
message(FATAL_ERROR "ENDFOR does not match last item: ${FOR_FOR}")
|
||||
endif()
|
||||
list(GET FOR_ITEM 1 FOR_POSITION)
|
||||
list(GET FOR_ITEM 2 FOR_KEY)
|
||||
if (NOT "${FOR_KEY}" STREQUAL "${ENDFOR_KEY}")
|
||||
calculate_line_number("${TEMPLATE_CONTENTS}" "${POSITION}" LINENUMBER)
|
||||
message("FOR and ENDFOR do not match. (line number ${LINENUMBER}) (FOR:${FOR_KEY}, ENDFOR:${ENDFOR_KEY})")
|
||||
endif()
|
||||
list(GET FOR_ITEM 3 FOR_INDEX_PREV)
|
||||
template_parameters_find_next_groupname_index("${TEMPLATE_PARAMETERS}" "${FOR_KEY}" ${FOR_INDEX_PREV} FOR_INDEX)
|
||||
if (DEBUG)
|
||||
message("FOR_INDEX was ${FOR_INDEX_PREV}, is now ${FOR_INDEX}")
|
||||
endif()
|
||||
if (${FOR_INDEX} LESS 0)
|
||||
if (DEBUG)
|
||||
message("ENDFOR: FOR_INDEX < 0 (no more key) ==> Continue")
|
||||
endif()
|
||||
else()
|
||||
set(POSITION ${FOR_POSITION})
|
||||
stack_push(STACK FOR ${FOR_POSITION} ${FOR_KEY} ${FOR_INDEX})
|
||||
if (DEBUG)
|
||||
message("ENDFOR: FOR_INDEX >= 0 (more keys available) ==> Back to position=${FOR_POSITION}")
|
||||
endif()
|
||||
endif()
|
||||
elseif (GROUP_MATCH MATCHES "^CASE")
|
||||
string(REGEX MATCH "^CASE[${WS}]+\\(([a-zA-Z]+)\\)" CASE_MATCH "${GROUP_MATCH}")
|
||||
if ("${CASE_MATCH}" STREQUAL "")
|
||||
message(FATAL_ERROR "Wrong CASE syntax")
|
||||
endif()
|
||||
set(CASE_KEY "${CMAKE_MATCH_1}")
|
||||
if (DEBUG)
|
||||
message("CASE: KEY=${CASE_KEY}")
|
||||
endif()
|
||||
stack_push(STACK CASE "${CASE_KEY}" ${POSITION})
|
||||
elseif (GROUP_MATCH MATCHES "^==")
|
||||
math(EXPR POSITION "${POSITION}+1")
|
||||
string(REGEX MATCH "^==[${WS}]+([a-zA-Z_][a-zA-Z0-9_]*)" CASE_MATCH "${GROUP_MATCH}")
|
||||
if ("${CASE_MATCH}" STREQUAL "")
|
||||
message(FATAL_ERROR "Wrong == syntax")
|
||||
endif()
|
||||
stack_top(STACK CASE_ITEM)
|
||||
list(GET CASE_ITEM 0 CASE_CASE)
|
||||
if(NOT "${CASE_CASE}" STREQUAL "CASE")
|
||||
message(FATAL_ERROR "== block must be in CASE. Top of stack=${CASE_CASE}")
|
||||
endif()
|
||||
set(CASE_VALUE "${CMAKE_MATCH_1}")
|
||||
if (DEBUG)
|
||||
message("case: == VALUE=${CASE_VALUE}")
|
||||
endif()
|
||||
list(GET CASE_ITEM 1 CASE_KEY)
|
||||
if ("${CASE_KEY}" STREQUAL "suffix")
|
||||
if (DEBUG)
|
||||
message("Setting write filter to ${CASE_VALUE}")
|
||||
endif()
|
||||
set(WRITE_FILTER "${CASE_VALUE}")
|
||||
else()
|
||||
message(FATAL_ERROR "CASE: unsupported argument ${CASE_KEY}")
|
||||
endif()
|
||||
elseif (GROUP_MATCH MATCHES "^ESAC")
|
||||
stack_pop(STACK CASE_ITEM)
|
||||
if (DEBUG)
|
||||
message("ESAC")
|
||||
endif()
|
||||
list(GET CASE_ITEM 0 CASE_CASE)
|
||||
if (NOT "${CASE_CASE}" STREQUAL "CASE")
|
||||
message(FATAL_ERROR "ESAC does not match last item: ${CASE_CASE}")
|
||||
endif()
|
||||
if ("${CASE_KEY}" STREQUAL "suffix")
|
||||
if (DEBUG)
|
||||
message("Removing write filter")
|
||||
endif()
|
||||
set(WRITE_FILTER "")
|
||||
else()
|
||||
message(FATAL_ERROR "CASE: unsupported argument ${CASE_KEY}")
|
||||
endif()
|
||||
else()
|
||||
string(REGEX MATCH "\\(([a-zA-Z0-9_$%\"${WS}\\+\\-]+)\\)" PARENTHESE_MATCH "${GROUP_MATCH}")
|
||||
if (NOT "${PARENTHESE_MATCH}" STREQUAL "")
|
||||
set(PARENTHESE_CONTENT "${CMAKE_MATCH_1}")
|
||||
string(REPLACE " " ";" PARENTHESE_LIST "${PARENTHESE_CONTENT}")
|
||||
list(GET PARENTHESE_LIST 0 PARENTHESE_COMMAND)
|
||||
if ("${PARENTHESE_COMMAND}" STREQUAL "get")
|
||||
list(GET PARENTHESE_LIST 1 KEY_QUOTED)
|
||||
string(REGEX MATCH "\\\"([a-zA-Z_${WS}]+)\\\"" KEY_MATCH "${KEY_QUOTED}")
|
||||
if ("${KEY_MATCH}" STREQUAL "")
|
||||
message(FATAL_ERROR "get: empty key")
|
||||
endif()
|
||||
set(KEY "${CMAKE_MATCH_1}")
|
||||
if (DEBUG)
|
||||
message("Get: key=${KEY}")
|
||||
endif()
|
||||
stack_find_key("${STACK}" "${TEMPLATE_PARAMETERS}" "${KEY}" VALUE)
|
||||
if (DEBUG)
|
||||
message("Get key=${KEY} ==> value=${VALUE}")
|
||||
endif()
|
||||
append_output_text("${SUFFICES_FILENAMES}" "${VALUE}" "${WRITE_FILTER}")
|
||||
elseif("${PARENTHESE_COMMAND}" STREQUAL "tpl-file-line")
|
||||
list(GET PARENTHESE_LIST 1 FORMAT_LINE)
|
||||
calculate_line_number("${TEMPLATE_CONTENTS}" "${POSITION}" LINENUMBER)
|
||||
append_output_text("${SUFFICES_FILENAMES}" "${LINENUMBER}" "${WRITE_FILTER}")
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown parenthese command: ${PARENTHESE_COMMAND}")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown command: ${GROUP_MATCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endwhile()
|
||||
if (NOT "${STACK}" STREQUAL "")
|
||||
message(FATAL_ERROR "STACK was not empty at EOF")
|
||||
endif()
|
||||
output_finish("${SUFFICES_FILENAMES}")
|
||||
endfunction()
|
||||
|
||||
if ("${DEFINITION}" STREQUAL "")
|
||||
message(FATAL_ERROR "Need definition file")
|
||||
endif()
|
||||
if (NOT EXISTS "${DEFINITION}")
|
||||
message(FATAL_ERROR "Definition file does not exist (${DEFINITION})")
|
||||
endif()
|
||||
|
||||
read_definition("${DEFINITION}" TEMPLATE_FILENAME DATA)
|
||||
if (DEBUG)
|
||||
message("${TEMPLATE_FILENAME}")
|
||||
message("${DATA}")
|
||||
endif()
|
||||
|
||||
parse_template("${TEMPLATE_FILENAME}" "${OUTPUTDIR}" "${DATA}")
|
|
@ -0,0 +1,92 @@
|
|||
include (CheckCSourceRuns)
|
||||
include (CMakePushCheckState)
|
||||
|
||||
macro (CLIP_MODE)
|
||||
|
||||
set (CLIP_MODE_POSITIVE_MESSAGE "Target processor clips on positive float to int conversion")
|
||||
set (CLIP_MODE_NEGATIVE_MESSAGE "Target processor clips on negative float to int conversion")
|
||||
|
||||
message (STATUS "Checking processor clipping capabilities...")
|
||||
|
||||
if (CMAKE_CROSSCOMPILING)
|
||||
|
||||
set (CLIP_MSG "disabled")
|
||||
set (CPU_CLIPS_POSITIVE FALSE CACHE BOOL ${CLIP_MODE_POSITIVE_MESSAGE})
|
||||
set (CPU_CLIPS_NEGATIVE FALSE CACHE BOOL ${CLIP_MODE_NEGATIVE_MESSAGE})
|
||||
|
||||
else (NOT CMAKE_CROSSCOMPILING)
|
||||
|
||||
cmake_push_check_state ()
|
||||
|
||||
set (CMAKE_REQUIRED_QUIET TRUE)
|
||||
if (LIBM_REQUIRED)
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${M_LIBRARY})
|
||||
endif ()
|
||||
|
||||
check_c_source_runs (
|
||||
"
|
||||
#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 ;
|
||||
}
|
||||
"
|
||||
CPU_CLIPS_POSITIVE)
|
||||
|
||||
check_c_source_runs (
|
||||
"
|
||||
#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 ;
|
||||
}
|
||||
"
|
||||
CPU_CLIPS_NEGATIVE)
|
||||
|
||||
cmake_pop_check_state ()
|
||||
|
||||
if (CPU_CLIPS_POSITIVE AND (NOT CPU_CLIPS_NEGATIVE))
|
||||
set (CLIP_MSG "positive")
|
||||
elseif (CPU_CLIPS_NEGATIVE AND (NOT CPU_CLIPS_POSITIVE))
|
||||
set (CLIP_MSG "negative")
|
||||
elseif (CPU_CLIPS_POSITIVE AND CPU_CLIPS_NEGATIVE)
|
||||
set (CLIP_MSG "both")
|
||||
else ()
|
||||
set (CLIP_MSG "none")
|
||||
endif ()
|
||||
|
||||
endif (CMAKE_CROSSCOMPILING)
|
||||
|
||||
message (STATUS "Checking processor clipping capabilities... ${CLIP_MSG}")
|
||||
|
||||
endmacro (CLIP_MODE)
|
|
@ -0,0 +1,67 @@
|
|||
# - Find FLAC
|
||||
# Find the native FLAC includes and libraries
|
||||
#
|
||||
# FLAC_INCLUDE_DIRS - where to find FLAC headers.
|
||||
# FLAC_LIBRARIES - List of libraries when using libFLAC.
|
||||
# FLAC_FOUND - True if libFLAC found.
|
||||
# FLAC_DEFINITIONS - FLAC compile definitons
|
||||
|
||||
if (FLAC_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set (FLAC_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (Ogg QUIET)
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules(PC_FLAC QUIET flac)
|
||||
|
||||
set(FLAC_VERSION ${PC_FLAC_VERSION})
|
||||
|
||||
find_path (FLAC_INCLUDE_DIR FLAC/stream_decoder.h
|
||||
HINTS
|
||||
${PC_FLAC_INCLUDEDIR}
|
||||
${PC_FLAC_INCLUDE_DIRS}
|
||||
${FLAC_ROOT}
|
||||
)
|
||||
|
||||
# MSVC built libraries can name them *_static, which is good as it
|
||||
# distinguishes import libraries from static libraries with the same extension.
|
||||
find_library (FLAC_LIBRARY
|
||||
NAMES
|
||||
FLAC
|
||||
libFLAC
|
||||
libFLAC_dynamic
|
||||
libFLAC_static
|
||||
HINTS
|
||||
${PC_FLAC_LIBDIR}
|
||||
${PC_FLAC_LIBRARY_DIRS}
|
||||
${FLAC_ROOT}
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set FLAC_FOUND to TRUE if
|
||||
# all listed variables are TRUE.
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (FLAC
|
||||
REQUIRED_VARS
|
||||
FLAC_LIBRARY
|
||||
FLAC_INCLUDE_DIR
|
||||
OGG_FOUND
|
||||
VERSION_VAR
|
||||
FLAC_VERSION
|
||||
)
|
||||
|
||||
if (FLAC_FOUND)
|
||||
set (FLAC_INCLUDE_DIRS ${FLAC_INCLUDE_DIR})
|
||||
set (FLAC_LIBRARIES ${FLAC_LIBRARY} ${OGG_LIBRARIES})
|
||||
if (NOT TARGET FLAC::FLAC)
|
||||
add_library(FLAC::FLAC UNKNOWN IMPORTED)
|
||||
set_target_properties(FLAC::FLAC PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${FLAC_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES Ogg::ogg
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(FLAC_INCLUDE_DIR FLAC_LIBRARY)
|
|
@ -0,0 +1,61 @@
|
|||
# - Find ogg
|
||||
# Find the native ogg includes and libraries
|
||||
#
|
||||
# OGG_INCLUDE_DIRS - where to find ogg.h, etc.
|
||||
# OGG_LIBRARIES - List of libraries when using ogg.
|
||||
# OGG_FOUND - True if ogg found.
|
||||
|
||||
if (OGG_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(OGG_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules (PC_OGG QUIET ogg>=1.3.0)
|
||||
|
||||
set (OGG_VERSION ${PC_OGG_VERSION})
|
||||
|
||||
find_path (OGG_INCLUDE_DIR ogg/ogg.h
|
||||
HINTS
|
||||
${PC_OGG_INCLUDEDIR}
|
||||
${PC_OGG_INCLUDE_DIRS}
|
||||
${OGG_ROOT}
|
||||
)
|
||||
# MSVC built ogg may be named ogg_static.
|
||||
# The provided project files name the library with the lib prefix.
|
||||
find_library (OGG_LIBRARY
|
||||
NAMES
|
||||
ogg
|
||||
ogg_static
|
||||
libogg
|
||||
libogg_static
|
||||
HINTS
|
||||
${PC_OGG_LIBDIR}
|
||||
${PC_OGG_LIBRARY_DIRS}
|
||||
${OGG_ROOT}
|
||||
)
|
||||
# Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (Ogg
|
||||
REQUIRED_VARS
|
||||
OGG_LIBRARY
|
||||
OGG_INCLUDE_DIR
|
||||
VERSION_VAR
|
||||
OGG_VERSION
|
||||
)
|
||||
|
||||
if (OGG_FOUND)
|
||||
set (OGG_LIBRARIES ${OGG_LIBRARY})
|
||||
set (OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR})
|
||||
|
||||
if(NOT TARGET Ogg::ogg)
|
||||
add_library(Ogg::ogg UNKNOWN IMPORTED)
|
||||
set_target_properties(Ogg::ogg PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${OGG_LIBRARIES}"
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (OGG_INCLUDE_DIR OGG_LIBRARY)
|
|
@ -0,0 +1,67 @@
|
|||
# - Find opus
|
||||
# Find the native opus includes and libraries
|
||||
#
|
||||
# OPUS_INCLUDE_DIRS - where to find opus.h, etc.
|
||||
# OPUS_LIBRARIES - List of libraries when using opus.
|
||||
# OPUS_FOUND - True if Opus found.
|
||||
|
||||
if (OPUS_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(OPUS_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (Ogg QUIET)
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules(PC_OPUS QUIET opus>=1.1)
|
||||
|
||||
set (OPUS_VERSION ${PC_OPUS_VERSION})
|
||||
|
||||
find_path (OPUS_INCLUDE_DIR opus/opus.h
|
||||
HINTS
|
||||
${PC_OPUS_INCLUDEDIR}
|
||||
${PC_OPUS_INCLUDE_DIRS}
|
||||
${OPUS_ROOT}
|
||||
)
|
||||
|
||||
# MSVC built opus may be named opus_static.
|
||||
# The provided project files name the library with the lib prefix.
|
||||
|
||||
find_library (OPUS_LIBRARY
|
||||
NAMES
|
||||
opus
|
||||
opus_static
|
||||
libopus
|
||||
libopus_static
|
||||
HINTS
|
||||
${PC_OPUS_LIBDIR}
|
||||
${PC_OPUS_LIBRARY_DIRS}
|
||||
${OPUS_ROOT}
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set OPUS_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (Opus
|
||||
REQUIRED_VARS
|
||||
OPUS_LIBRARY
|
||||
OPUS_INCLUDE_DIR
|
||||
OGG_FOUND
|
||||
VERSION_VAR
|
||||
OPUS_VERSION
|
||||
)
|
||||
|
||||
if (OPUS_FOUND)
|
||||
set (OPUS_LIBRARIES ${OPUS_LIBRARY})
|
||||
set (OPUS_INCLUDE_DIRS ${OPUS_INCLUDE_DIR})
|
||||
|
||||
if (NOT TARGET Opus::opus)
|
||||
add_library (Opus::opus UNKNOWN IMPORTED)
|
||||
set_target_properties (Opus::opus PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OPUS_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${OPUS_LIBRARIES}"
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(OPUS_INCLUDE_DIR OPUS_LIBRARY)
|
|
@ -0,0 +1,56 @@
|
|||
# - Find SQLITE3
|
||||
# Find the native SQLITE3 includes and libraries
|
||||
#
|
||||
# SQLITE3_INCLUDE_DIRS - where to find sqlite.h, etc.
|
||||
# SQLITE3_LIBRARIES - List of libraries when using SQLITE3.
|
||||
# SQLITE3_FOUND - True if SQLITE3 found.
|
||||
|
||||
if (SQLITE3_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set (SQLITE3_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules (PC_SQLITE3 QUIET sqlite3)
|
||||
|
||||
set (SQLITE3_VERSION ${PC_SQLITE3_VERSION})
|
||||
|
||||
find_path (SQLITE3_INCLUDE_DIR sqlite3.h
|
||||
HINTS
|
||||
${PC_SQLITE3_INCLUDEDIR}
|
||||
${PC_SQLITE3_INCLUDE_DIRS}
|
||||
${SQLITE3_ROOT}
|
||||
)
|
||||
|
||||
find_library (SQLITE3_LIBRARY
|
||||
NAMES
|
||||
sqlite3
|
||||
HINTS
|
||||
${PC_SQLITE3_LIBDIR}
|
||||
${PC_SQLITE3_LIBRARY_DIRS}
|
||||
${SQLITE3_ROOT}
|
||||
)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args (SQLITE3
|
||||
REQUIRED_VARS
|
||||
SQLITE3_LIBRARY
|
||||
SQLITE3_INCLUDE_DIR
|
||||
VERSION_VAR
|
||||
SQLITE3_VERSION
|
||||
)
|
||||
|
||||
if (SQLITE3_FOUND)
|
||||
set (SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIR})
|
||||
set (SQLITE3_LIBRARIES ${SQLITE3_LIBRARY})
|
||||
if (NOT TARGET SQLite3::SQLite3)
|
||||
add_library (SQLite3::SQLite3 UNKNOWN IMPORTED)
|
||||
set_target_properties (SQLite3::SQLite3 PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SQLITE3_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${SQLITE3_LIBRARIES}"
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (SQLITE3_INCLUDE_DIR SQLITE3_LIBRARY)
|
|
@ -0,0 +1,61 @@
|
|||
# - Find SoundIO (sndio) includes and libraries
|
||||
#
|
||||
# SNDIO_FOUND - True if SNDIO_INCLUDE_DIR & SNDIO_LIBRARY are
|
||||
# found
|
||||
# SNDIO_LIBRARIES - Set when SNDIO_LIBRARY is found
|
||||
# SNDIO_INCLUDE_DIRS - Set when SNDIO_INCLUDE_DIR is found
|
||||
#
|
||||
# SNDIO_INCLUDE_DIR - where to find sndio.h, etc.
|
||||
# SNDIO_LIBRARY - the sndio library
|
||||
#
|
||||
|
||||
if (SNDIO_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set (SNDIO_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules (PC_SNDIO QUIET sndio)
|
||||
|
||||
set (SNDIO_VERSION ${PC_SNDIO_VERSION})
|
||||
|
||||
find_path (SNDIO_INCLUDE_DIR
|
||||
NAMES
|
||||
sndio.h
|
||||
HINTS
|
||||
${PC_SNDIO_INCLUDEDIR}
|
||||
${PC_SNDIO_INCLUDE_DIRS}
|
||||
${SNDIO_ROOT}
|
||||
)
|
||||
|
||||
find_library (SNDIO_LIBRARY
|
||||
NAMES
|
||||
sndio
|
||||
HINTS
|
||||
${PC_SNDIO_LIBDIR}
|
||||
${PC_SNDIO_LIBRARY_DIRS}
|
||||
${SNDIO_ROOT}
|
||||
)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (Sndio
|
||||
REQUIRED_VARS
|
||||
SNDIO_LIBRARY
|
||||
SNDIO_INCLUDE_DIR
|
||||
VERSION_VAR
|
||||
SNDIO_VERSION
|
||||
)
|
||||
|
||||
if (SNDIO_FOUND)
|
||||
set (SNDIO_LIBRARIES ${SNDIO_LIBRARY})
|
||||
set (SNDIO_INCLUDE_DIRS ${SNDIO_INCLUDE_DIR})
|
||||
if (NOT TARGET Sndio::Sndio)
|
||||
add_library (Sndio::Sndio UNKNOWN IMPORTED)
|
||||
set_target_properties (Sndio::Sndio PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SNDIO_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${SNDIO_LIBRARIES}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced (SNDIO_INCLUDE_DIR SNDIO_LIBRARY)
|
|
@ -0,0 +1,55 @@
|
|||
# - Find Speex
|
||||
# Find the native Speex includes and libraries
|
||||
#
|
||||
# SPEEX_INCLUDE_DIRS - where to find speex.h, etc.
|
||||
# SPEEX_LIBRARIES - List of libraries when using Speex.
|
||||
# SPEEX_FOUND - True if Speex found.
|
||||
|
||||
if (SPEEX_INCLUDE_DIR)
|
||||
set (SPEEX_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules (PC_SPEEX QUIET speex)
|
||||
|
||||
set (SPEEX_VERSION ${PC_SPEEX_VERSION})
|
||||
|
||||
find_path (SPEEX_INCLUDE_DIR speex/speex.h
|
||||
HINTS
|
||||
${PC_SPEEX_INCLUDEDIR}
|
||||
${PC_SPEEX_INCLUDE_DIRS}
|
||||
${SPEEX_ROOT}
|
||||
)
|
||||
find_library (SPEEX_LIBRARY
|
||||
NAMES
|
||||
speex
|
||||
libspeex
|
||||
HINTS
|
||||
${PC_SPEEX_LIBDIR}
|
||||
${PC_SPEEX_LIBRARY_DIRS}
|
||||
${SPEEX_ROOT}
|
||||
)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (Speex
|
||||
REQUIRED_VARS
|
||||
SPEEX_LIBRARY
|
||||
SPEEX_INCLUDE_DIR
|
||||
VERSION_VAR
|
||||
SPEEX_VERSION
|
||||
)
|
||||
|
||||
if (SPEEX_FOUND)
|
||||
set (SPEEX_LIBRARIES ${SPEEX_LIBRARY})
|
||||
set (SPEEX_INCLUDE_DIRS ${SPEEX_INCLUDE_DIR})
|
||||
|
||||
if (NOT TARGET Speex::Speex)
|
||||
add_library (Speex::Speex UNKNOWN IMPORTED)
|
||||
set_target_properties (Speex::Speex PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SPEEX_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${SPEEX_LIBRARIES}"
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (SPEEX_INCLUDE_DIR SPEEX_LIBRARY)
|
|
@ -0,0 +1,64 @@
|
|||
# - Find vorbisenc
|
||||
# Find the native vorbisenc includes and libraries
|
||||
#
|
||||
# VORBIS_INCLUDE_DIRS - where to find vorbis.h, etc.
|
||||
# VORBIS_LIBRARIES - List of libraries when using vorbis.
|
||||
# VORBIS_FOUND - True if vorbis found.
|
||||
|
||||
if (VORBIS_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set (VORBIS_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (Ogg QUIET)
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules (PC_VORBIS QUIET vorbis)
|
||||
|
||||
set (VORBIS_VERSION ${PC_VORBIS_VERSION})
|
||||
|
||||
find_path (VORBIS_INCLUDE_DIR vorbis/codec.h
|
||||
HINTS
|
||||
${PC_VORBIS_INCLUDEDIR}
|
||||
${PC_VORBIS_INCLUDE_DIRS}
|
||||
${VORBIS_ROOT}
|
||||
)
|
||||
|
||||
find_library (VORBIS_LIBRARY
|
||||
NAMES
|
||||
vorbis
|
||||
vorbis_static
|
||||
libvorbis
|
||||
libvorbis_static
|
||||
HINTS
|
||||
${PC_VORBIS_LIBDIR}
|
||||
${PC_VORBIS_LIBRARY_DIRS}
|
||||
${VORBIS_ROOT}
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (Vorbis
|
||||
REQUIRED_VARS
|
||||
VORBIS_LIBRARY
|
||||
VORBIS_INCLUDE_DIR
|
||||
OGG_FOUND
|
||||
VERSION_VAR
|
||||
VORBIS_VERSION
|
||||
)
|
||||
|
||||
if (VORBIS_FOUND)
|
||||
set (VORBIS_INCLUDE_DIRS ${VORBIS_INCLUDE_DIR})
|
||||
set (VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${OGG_LIBRARIES})
|
||||
if (NOT TARGET Vorbis::Vorbis)
|
||||
add_library (Vorbis::Vorbis UNKNOWN IMPORTED)
|
||||
set_target_properties (Vorbis::Vorbis PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${VORBIS_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${VORBIS_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES Ogg::ogg
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (VORBIS_INCLUDE_DIR VORBIS_LIBRARY)
|
|
@ -0,0 +1,64 @@
|
|||
# - Find vorbisenc
|
||||
# Find the native vorbisenc includes and libraries
|
||||
#
|
||||
# VORBISENC_INCLUDE_DIRS - where to find vorbisenc.h, etc.
|
||||
# VORBISENC_LIBRARIES - List of libraries when using vorbisenc.
|
||||
# VORBISENC_FOUND - True if vorbisenc found.
|
||||
|
||||
if (VORBISENC_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set (VORBISENC_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (Vorbis QUIET)
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules (PC_VORBISENC QUIET vorbisenc)
|
||||
|
||||
set (VORBISENC_VERSION ${PC_VORBISENC_VERSION})
|
||||
|
||||
find_path (VORBISENC_INCLUDE_DIR vorbis/vorbisenc.h
|
||||
HINTS
|
||||
${PC_VORBISENC_INCLUDEDIR}
|
||||
${PC_VORBISENC_INCLUDE_DIRS}
|
||||
${VORBISENC_ROOT}
|
||||
)
|
||||
|
||||
find_library (VORBISENC_LIBRARY
|
||||
NAMES
|
||||
vorbisenc
|
||||
vorbisenc_static
|
||||
libvorbisenc
|
||||
libvorbisenc_static
|
||||
HINTS
|
||||
${PC_VORBISENC_LIBDIR}
|
||||
${PC_VORBISENC_LIBRARY_DIRS}
|
||||
${VORBISENC_ROOT}
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set VORBISENC_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (VorbisEnc
|
||||
REQUIRED_VARS
|
||||
VORBISENC_LIBRARY
|
||||
VORBISENC_INCLUDE_DIR
|
||||
VORBIS_FOUND
|
||||
VERSION_VAR
|
||||
VORBISENC_VERSION
|
||||
)
|
||||
|
||||
if (VORBISENC_FOUND)
|
||||
set (VORBISENC_INCLUDE_DIRS ${VORBISENC_INCLUDE_DIR})
|
||||
set (VORBISENC_LIBRARIES ${VORBISENC_LIBRARY} ${VORBIS_LIBRARIES})
|
||||
if (NOT TARGET Vorbis::VorbisEnc)
|
||||
add_library (Vorbis::VorbisEnc UNKNOWN IMPORTED)
|
||||
set_target_properties (Vorbis::VorbisEnc PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${VORBISENC_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${VORBISENC_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES Vorbis::Vorbis
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (VORBISENC_INCLUDE_DIR VORBISENC_LIBRARY)
|
|
@ -0,0 +1,241 @@
|
|||
include (CheckFunctionExists)
|
||||
include (CheckIncludeFile)
|
||||
include (CheckLibraryExists)
|
||||
include (CheckSymbolExists)
|
||||
include (CheckTypeSize)
|
||||
include (TestBigEndian)
|
||||
|
||||
include (TestInline)
|
||||
include (ClipMode)
|
||||
include(TestLargeFiles)
|
||||
|
||||
test_large_files (_LARGEFILES)
|
||||
|
||||
if (LARGE_FILES_DEFINITIONS)
|
||||
add_definitions(${LARGE_FILES_DEFINITIONS})
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
set(TYPEOF_SF_COUNT_T __int64)
|
||||
else ()
|
||||
set(TYPEOF_SF_COUNT_T int64_t)
|
||||
endif ()
|
||||
set (SF_COUNT_MAX 0x7fffffffffffffffll)
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package (ALSA)
|
||||
find_package (Sndio)
|
||||
endif ()
|
||||
|
||||
find_package(Ogg 1.3)
|
||||
find_package (VorbisEnc)
|
||||
find_package (FLAC)
|
||||
find_package (Opus)
|
||||
if (VORBIS_FOUND AND FLAC_FOUND AND OPUS_FOUND)
|
||||
set (HAVE_EXTERNAL_XIPH_LIBS 1)
|
||||
else ()
|
||||
set (HAVE_EXTERNAL_XIPH_LIBS 0)
|
||||
endif ()
|
||||
|
||||
find_package (Speex)
|
||||
find_package (SQLite3)
|
||||
|
||||
check_include_file (byteswap.h HAVE_BYTESWAP_H)
|
||||
check_include_file (dlfcn.h HAVE_DLFCN_H)
|
||||
check_include_file (direct.h HAVE_DIRECT_H)
|
||||
check_include_file (endian.h HAVE_ENDIAN_H)
|
||||
check_include_file (inttypes.h HAVE_INTTYPES_H)
|
||||
check_include_file (io.h HAVE_IO_H)
|
||||
check_include_file (stdint.h HAVE_STDINT_H)
|
||||
check_include_file (sys/time.h HAVE_SYS_TIME_H)
|
||||
check_include_file (sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file (unistd.h HAVE_UNISTD_H)
|
||||
|
||||
# Never checked
|
||||
# check_include_file (stdlib.h HAVE_STDLIB_H)
|
||||
# check_include_file (string.h HAVE_STRING_H)
|
||||
# check_include_file (strings.h HAVE_STRINGS_H)
|
||||
# check_include_file (sys/stat.h HAVE_SYS_STAT_H)
|
||||
# check_include_file (memory.h HAVE_MEMORY_H)
|
||||
|
||||
if (BUILD_TESTING)
|
||||
check_include_file (locale.h HAVE_LOCALE_H)
|
||||
check_include_file (sys/wait.h HAVE_SYS_WAIT_H)
|
||||
endif ()
|
||||
|
||||
check_type_size (int64_t SIZEOF_INT64_T)
|
||||
check_type_size (long SIZEOF_LONG)
|
||||
check_type_size (long\ long SIZEOF_LONG_LONG)
|
||||
check_type_size (ssize_t SIZEOF_SSIZE_T)
|
||||
check_type_size (wchar_t SIZEOF_WCHAR_T)
|
||||
|
||||
# Never used
|
||||
# check_type_size (loff_t SIZEOF_LOFF_T)
|
||||
# check_type_size (offt64_t SIZEOF_OFF64_T)
|
||||
|
||||
# Never checked
|
||||
# check_type_size (size_t SIZEOF_SIZE_T)
|
||||
|
||||
# Used in configre.ac
|
||||
# check_type_size (double SIZEOF_DOUBLE)
|
||||
# check_type_size (float SIZEOF_FLOAT)
|
||||
# check_type_size (int SIZEOF_INT)
|
||||
# check_type_size (short SIZEOF_SHORT)
|
||||
|
||||
if (ENABLE_TESTING)
|
||||
check_type_size (void* SIZEOF_VOIDP)
|
||||
endif()
|
||||
|
||||
if ((SIZEOF_OFF_T EQUAL 8) OR (SIZEOF_LOFF_T EQUAL 8) OR (SIZEOF_OFF64_T EQUAL 8))
|
||||
set (TYPEOF_SF_COUNT_T "int64_t")
|
||||
set (SF_COUNT_MAX "0x7FFFFFFFFFFFFFFFLL")
|
||||
set (SIZEOF_SF_COUNT_T 8)
|
||||
else ()
|
||||
if (WIN32)
|
||||
set (TYPEOF_SF_COUNT_T "__int64")
|
||||
set (SF_COUNT_MAX "0x7FFFFFFFFFFFFFFFLL")
|
||||
set (SIZEOF_SF_COUNT_T 8)
|
||||
else ()
|
||||
message ("")
|
||||
message ("*** The configure process has determined that this system is capable")
|
||||
message ("*** of Large File Support but has not been able to find a type which")
|
||||
message ("*** is an unambiguous 64 bit file offset.")
|
||||
message ("*** Please contact the author to help resolve this problem.")
|
||||
message ("")
|
||||
message (FATAL_ERROR "Bad file offset type.")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
check_type_size (${TYPEOF_SF_COUNT_T} SIZEOF_SF_COUNT_T)
|
||||
|
||||
if (NOT WIN32)
|
||||
check_library_exists (m floor "" LIBM_REQUIRED)
|
||||
if (LIBM_REQUIRED)
|
||||
list (APPEND CMAKE_REQUIRED_LIBRARIES m)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
check_library_exists (sqlite3 sqlite3_close "" HAVE_SQLITE3)
|
||||
|
||||
check_function_exists (fstat HAVE_FSTAT)
|
||||
check_function_exists (fstat64 HAVE_FSTAT64)
|
||||
check_function_exists (gettimeofday HAVE_GETTIMEOFDAY)
|
||||
check_function_exists (gmtime HAVE_GMTIME)
|
||||
check_function_exists (gmtime_r HAVE_GMTIME_R)
|
||||
check_function_exists (localtime HAVE_LOCALTIME)
|
||||
check_function_exists (localtime_r HAVE_LOCALTIME_R)
|
||||
check_function_exists (lseek HAVE_LSEEK)
|
||||
check_function_exists (open HAVE_OPEN)
|
||||
check_function_exists (read HAVE_READ)
|
||||
check_function_exists (write HAVE_WRITE)
|
||||
check_function_exists (lrint HAVE_LRINT)
|
||||
check_function_exists (lrintf HAVE_LRINTF)
|
||||
|
||||
if (NOT WIN32)
|
||||
check_function_exists (ftruncate HAVE_FTRUNCATE)
|
||||
check_function_exists (fsync HAVE_FSYNC)
|
||||
endif ()
|
||||
|
||||
if (BUILD_TESTING)
|
||||
check_function_exists (pipe HAVE_PIPE)
|
||||
check_function_exists (setlocale HAVE_SETLOCALE)
|
||||
check_function_exists (waitpid HAVE_WAITPID)
|
||||
endif ()
|
||||
|
||||
# Never checked
|
||||
# check_function_exists (calloc HAVE_CALLOC)
|
||||
# check_function_exists (free HAVE_FREE)
|
||||
# check_function_exists (getpagesize HAVE_GETPAGESIZE)
|
||||
# check_function_exists (malloc HAVE_MALLOC)
|
||||
# check_function_exists (realloc HAVE_REALLOC)
|
||||
# check_function_exists (snprintf HAVE_SNPRINTF)
|
||||
# check_function_exists (vsnprintf HAVE_VSNPRINTF)
|
||||
# check_function_exists (floor HAVE_FLOOR)
|
||||
# check_function_exists (fmod HAVE_FMOD)
|
||||
|
||||
# Never used
|
||||
# check_function_exists (mmap HAVE_MMAP)
|
||||
# check_function_exists (ceil HAVE_CEIL)
|
||||
# check_function_exists (lround HAVE_LROUND)
|
||||
# check_function_exists (lseek64 HAVE_LSEEK64)
|
||||
|
||||
|
||||
check_symbol_exists (S_IRGRP sys/stat.h HAVE_DECL_S_IRGRP)
|
||||
|
||||
test_big_endian (WORDS_BIGENDIAN)
|
||||
if (WORDS_BIGENDIAN)
|
||||
set (CPU_IS_BIG_ENDIAN 1)
|
||||
else ()
|
||||
set (CPU_IS_LITTLE_ENDIAN 1)
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
set (OS_IS_WIN32 1)
|
||||
set (USE_WINDOWS_API 1)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set (WIN32_TARGET_DLL 1)
|
||||
endif ()
|
||||
if (MINGW)
|
||||
add_definitions (-D__USE_MINGW_ANSI_STDIO=1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
||||
set (OS_IS_OPENBSD 1)
|
||||
endif ()
|
||||
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))
|
||||
set (COMPILER_IS_GCC 1)
|
||||
endif ()
|
||||
|
||||
test_inline ()
|
||||
clip_mode ()
|
||||
|
||||
if (MSVC)
|
||||
add_definitions (-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE)
|
||||
endif (MSVC)
|
||||
|
||||
if (ENABLE_STATIC_RUNTIME)
|
||||
if (MSVC)
|
||||
foreach (flag_var
|
||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
)
|
||||
if (${flag_var} MATCHES "/MD")
|
||||
string (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
||||
endif ()
|
||||
endforeach (flag_var)
|
||||
endif (MSVC)
|
||||
if (MINGW)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
|
||||
set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -static-libgcc -s")
|
||||
set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS} -static-libgcc -static-libstdc++ -s")
|
||||
endif (MINGW)
|
||||
elseif (NOT ENABLE_STATIC_RUNTIME)
|
||||
if (MSVC)
|
||||
foreach (flag_var
|
||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
)
|
||||
if (${flag_var} MATCHES "/MT")
|
||||
string (REGEX REPLACE "/MT" "/MD" ${flag_var} "${${flag_var}}")
|
||||
endif (${flag_var} MATCHES "/MT")
|
||||
endforeach (flag_var)
|
||||
endif ()
|
||||
if (MINGW)
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (CMAKE_CXX_FLAGS "")
|
||||
set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
|
||||
endif ()
|
||||
endif ( )
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
find_package (PythonInterp REQUIRED)
|
||||
endif()
|
|
@ -0,0 +1,30 @@
|
|||
set(SndFile_VERSION @PROJECT_VERSION@)
|
||||
set(SndFile_VERSION_MAJOR @PROJECT_VERSION_MAJOR@)
|
||||
set(SndFile_VERSION_MINOR @PROJECT_VERSION_MINOR@)
|
||||
set(SndFile_VERSION_PATCH @PROJECT_VERSION_PATCH@)
|
||||
|
||||
set (SndFile_WITH_EXTERNAL_LIBS @SndFile_WITH_EXTERNAL_LIBS@)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include (CMakeFindDependencyMacro)
|
||||
|
||||
find_dependency (Ogg 1.3)
|
||||
find_dependency (VorbisEnc)
|
||||
find_dependency (FLAC)
|
||||
find_dependency (Opus)
|
||||
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/SndFileTargets.cmake)
|
||||
|
||||
set_and_check (SndFile_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
||||
set (SNDFILE_INCLUDE_DIR ${SndFile_INCLUDE_DIR})
|
||||
|
||||
set (SndFile_LIBRARY SndFile::sndfile)
|
||||
set (SNDFILE_LIBRARY SndFile::sndfile)
|
||||
set (SndFile_LIBRARIES SndFile::sndfile)
|
||||
set (SNDFILE_LIBRARIES SndFile::sndfile)
|
||||
|
||||
|
||||
check_required_components(SndFile)
|
||||
|
||||
set (SNDFILE_FOUND 1)
|
|
@ -0,0 +1,10 @@
|
|||
static @INLINE_KEYWORD@ void test_inline(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int main (void)
|
||||
{
|
||||
test_inline ();
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
macro (TEST_INLINE)
|
||||
if (NOT DEFINED INLINE_CODE)
|
||||
message (STATUS "Checking for inline...")
|
||||
set (INLINE_KEYWORD "inline")
|
||||
configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c)
|
||||
try_compile (HAVE_INLINE "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c")
|
||||
if (HAVE_INLINE)
|
||||
message (STATUS "Checking for inline... supported")
|
||||
else ()
|
||||
message (STATUS "Checking for inline... not supported")
|
||||
|
||||
message (STATUS "Checking for __inline...")
|
||||
set (INLINE_KEYWORD "__inline")
|
||||
configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c)
|
||||
try_compile (HAVE___INLINE "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c")
|
||||
if (HAVE___INLINE)
|
||||
message (STATUS "Checking for __inline... supported")
|
||||
else ()
|
||||
message (STATUS "Checking for __inline... not supported")
|
||||
|
||||
message (STATUS "Checking for __inline__...")
|
||||
set (INLINE_KEYWORD "__inline__")
|
||||
configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c)
|
||||
try_compile (HAVE___INLINE "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c")
|
||||
if (HAVE___INLINE)
|
||||
message (STATUS "Checking for __inline__... supported")
|
||||
|
||||
message (STATUS "Checking for __inline__...")
|
||||
set (INLINE_KEYWORD "__inline__")
|
||||
configure_file (cmake/TestInline.c.in ${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/cmake/TestInline.c)
|
||||
try_compile (HAVE___INLINE__ "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/TestInline.c")
|
||||
else ()
|
||||
message (STATUS "Checking for __inline__... not supported")
|
||||
set (INLINE_KEYWORD "")
|
||||
endif ()
|
||||
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (HAVE_INLINE)
|
||||
set (INLINE_CODE "/* #undef inline */" CACHE INTERNAL "")
|
||||
elseif (HAVE___INLINE)
|
||||
set (INLINE_CODE "#define inline __inline" CACHE INTERNAL "")
|
||||
elseif (HAVE___INLINE__)
|
||||
set (INLINE_CODE "#define inline __inline__" CACHE INTERNAL "")
|
||||
else ()
|
||||
set (INLINE_CODE "#define inline " CACHE INTERNAL "")
|
||||
endif ()
|
||||
endif ()
|
||||
endmacro (TEST_INLINE)
|
|
@ -0,0 +1,121 @@
|
|||
include (CheckIncludeFile)
|
||||
include (CheckTypeSize)
|
||||
include (CMakePushCheckState)
|
||||
|
||||
macro (TEST_LARGE_FILES VARIABLE)
|
||||
|
||||
if (NOT DEFINED ${VARIABLE})
|
||||
|
||||
cmake_push_check_state()
|
||||
|
||||
message (STATUS "")
|
||||
message (STATUS "")
|
||||
message (STATUS "Checking large files support...")
|
||||
|
||||
if (WIN32)
|
||||
set (${VARIABLE} 1 CACHE INTERNAL "Result of tests for large file support" FORCE)
|
||||
message (STATUS "")
|
||||
message (STATUS "Result of checking large files support: supported with WinAPI")
|
||||
else ()
|
||||
|
||||
message (STATUS "")
|
||||
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(stddef.h HAVE_STDDEF_H)
|
||||
message (STATUS "")
|
||||
|
||||
message (STATUS "Checking size of off_t without any definitions:")
|
||||
check_type_size (off_t SIZEOF_OFF_T)
|
||||
message (STATUS "Checking of off_t without any definitions: ${SIZEOF_OFF_T}")
|
||||
if (SIZEOF_OFF_T EQUAL 8)
|
||||
set (LARGE_FILES_DEFINITIONS "" CACHE INTERNAL "64-bit off_t required definitions")
|
||||
set (FILE64 TRUE)
|
||||
else ()
|
||||
unset (HAVE_SIZEOF_OFF_T CACHE)
|
||||
unset (SIZEOF_OFF_T CACHE)
|
||||
unset (SIZEOF_OFF_T_CODE CACHE)
|
||||
cmake_pop_check_state()
|
||||
set (FILE64 FALSE)
|
||||
endif ()
|
||||
|
||||
if (NOT FILE64)
|
||||
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} /D_FILE_OFFSET_BITS=64)
|
||||
message (STATUS "")
|
||||
message (STATUS "Checking size of off_t with _FILE_OFFSET_BITS=64:")
|
||||
check_type_size (off_t SIZEOF_OFF_T)
|
||||
message (STATUS "Checking size of off_t with _FILE_OFFSET_BITS=64: ${SIZEOF_OFF_T}")
|
||||
if (SIZEOF_OFF_T EQUAL 8)
|
||||
set (_FILE_OFFSET_BITS 64 CACHE INTERNAL "")
|
||||
set (_FILE_OFFSET_BITS_CODE "#define _FILE_OFFSET_BITS 64" CACHE INTERNAL "")
|
||||
set (LARGE_FILES_DEFINITIONS ${LARGE_FILES_DEFINITIONS} "/D_FILE_OFFSET_BITS=64" CACHE INTERNAL "64-bit off_t required definitions")
|
||||
set (FILE64 TRUE)
|
||||
else ()
|
||||
set (_FILE_OFFSET_BITS_CODE "" CACHE INTERNAL "")
|
||||
unset (HAVE_SIZEOF_OFF_T CACHE)
|
||||
unset (SIZEOF_OFF_T CACHE)
|
||||
unset (SIZEOF_OFF_T_CODE CACHE)
|
||||
cmake_pop_check_state()
|
||||
set (FILE64 FALSE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT FILE64)
|
||||
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} /D_LARGE_FILES)
|
||||
message (STATUS "")
|
||||
message (STATUS "Checking size of off_t with _LARGE_FILES:")
|
||||
check_type_size (off_t SIZEOF_OFF_T)
|
||||
message (STATUS "Checking size of off_t with _LARGE_FILES: ${SIZEOF_OFF_T}")
|
||||
if (SIZEOF_OFF_T EQUAL 8)
|
||||
set (_LARGE_FILES 1 CACHE INTERNAL "")
|
||||
set (LARGE_FILES_DEFINITIONS ${LARGE_FILES_DEFINITIONS} "/D_LARGE_FILES" CACHE INTERNAL "64-bit off_t required definitions")
|
||||
set (FILE64 TRUE)
|
||||
else ()
|
||||
unset (HAVE_SIZEOF_OFF_T CACHE)
|
||||
unset (SIZEOF_OFF_T CACHE)
|
||||
unset (SIZEOF_OFF_T_CODE CACHE)
|
||||
cmake_pop_check_state()
|
||||
set (FILE64 FALSE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT FILE64)
|
||||
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} /D_LARGEFILE_SOURCE)
|
||||
unset (HAVE_SIZEOF_OFF_T CACHE)
|
||||
unset (SIZEOF_OFF_T CACHE)
|
||||
unset (SIZEOF_OFF_T_CODE CACHE)
|
||||
message (STATUS "")
|
||||
message (STATUS "Checking size of off_t with _LARGEFILE_SOURCE:")
|
||||
check_type_size (off_t SIZEOF_OFF_T)
|
||||
message (STATUS "Checking size of off_t with _LARGEFILE_SOURCE: ${SIZEOF_OFF_T}")
|
||||
if (SIZEOF_OFF_T EQUAL 8)
|
||||
set (_LARGEFILE_SOURCE 1 CACHE INTERNAL "")
|
||||
set (LARGE_FILES_DEFINITIONS ${LARGE_FILES_DEFINITIONS} "/D_LARGEFILE_SOURCE" CACHE INTERNAL "64-bit off_t required definitions")
|
||||
set (FILE64 TRUE)
|
||||
else ()
|
||||
cmake_pop_check_state()
|
||||
set (FILE64 FALSE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
message (STATUS "")
|
||||
if (FILE64)
|
||||
set (${VARIABLE} 1 CACHE INTERNAL "Result of tests for large file support" FORCE)
|
||||
if (NOT SIZEOF_OFF_T_REQURED_DEFINITIONS)
|
||||
message (STATUS "Result of checking large files support: supported")
|
||||
else ()
|
||||
message (STATUS "Result of checking large files support: supported with ${LARGE_FILES_DEFINITIONS}")
|
||||
message (STATUS "Add LARGE_FILES_DEFINITIONS to your compiler definitions or configure with _FILE_OFFSET_BITS,")
|
||||
message (STATUS "_FILE_OFFSET_BITS_CODE, _LARGE_FILES and _LARGEFILE_SOURCE variables.")
|
||||
endif ()
|
||||
else ()
|
||||
message ("Result of checking large files support: not supported")
|
||||
set (${VARIABLE} 0 CACHE INTERNAL "Result of test for large file support" FORCE)
|
||||
endif ()
|
||||
message ("")
|
||||
message ("")
|
||||
|
||||
endif ()
|
||||
|
||||
endif (NOT DEFINED ${VARIABLE})
|
||||
|
||||
endmacro (TEST_LARGE_FILES VARIABLE)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -26,7 +26,8 @@
|
|||
<A HREF="#Q006">Q6 : What's the best format for storing temporary files?</A><BR/>
|
||||
<A HREF="#Q007">Q7 : On Linux/Unix/MacOS X, what's the best way of detecting the
|
||||
presence of libsndfile?</A><BR/>
|
||||
<A HREF="#Q008">Q8 : But I just want a simple Makefile! What do I do?</A><BR/>
|
||||
<A HREF="#Q008">Q8 : I have libsndfile installed and now I want to use it. I
|
||||
just want a simple Makefile! What do I do?</A><BR/>
|
||||
<A HREF="#Q009">Q9 : How about adding the ability to write/read sound files to/from
|
||||
memory buffers?</A><BR/>
|
||||
<A HREF="#Q010">Q10 : Reading a 16 bit PCM file as normalised floats and then
|
||||
|
@ -49,8 +50,7 @@
|
|||
<A HREF="#Q019">Q19 : I have project files for Visual Studio / XCode / Whatever. Why
|
||||
don't you distribute them with libsndfile?
|
||||
</A><BR/>
|
||||
<A HREF="#Q020">Q20 : Why doesn't libsndfile support MP3? Lots of other Open Source
|
||||
projects support it!
|
||||
<A HREF="#Q020">Q20 : Why doesn't libsndfile support MP3?
|
||||
</A><BR/>
|
||||
<A HREF="#Q021">Q21 : How do I use libsndfile in a closed source or commercial program
|
||||
and comply with the license?
|
||||
|
@ -95,7 +95,7 @@ If you can't find either then the answer is no.
|
|||
</UL>
|
||||
<P>
|
||||
As documented
|
||||
<A HREF="http://www.mega-nerd.com/libsndfile/api.html#note1">here</A>
|
||||
<A HREF="api.html#note1">here</A>
|
||||
there is now a well defined behaviour which ensures that no matter what the
|
||||
bit width of the source file, the scaling always does something sensible.
|
||||
This makes it safe to read 8, 16, 24 and 32 bit PCM files using sf_read_short()
|
||||
|
@ -116,7 +116,7 @@ case.
|
|||
<P>
|
||||
To fix this I suggest that you install the GNU Bash shell, rename /bin/sh to
|
||||
/bin/sh.old and make a symlink from /bin/sh to the bash shell.
|
||||
Bash is designed to behave as a Bourne shell when is is called as /bin/sh.
|
||||
Bash is designed to behave as a Bourne shell when it is called as /bin/sh.
|
||||
</P>
|
||||
<P>
|
||||
When I did this on my iBook running MacOS X, compile times dropped from 13 minutes
|
||||
|
@ -133,7 +133,7 @@ It seems that the Solaris Bourne shell disagrees with GNU libtool.
|
|||
<P>
|
||||
To fix this I suggest that you install the GNU Bash shell, rename /bin/sh to
|
||||
/bin/sh.old and make a symlink from /bin/sh to the bash shell.
|
||||
Bash is designed to behave as a Bourne shell when is is called as /bin/sh.
|
||||
Bash is designed to behave as a Bourne shell when it is called as /bin/sh.
|
||||
</P>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
@ -246,7 +246,8 @@ libsndfile configure process. For instance on my system I get this:
|
|||
<!-- ========================================================================= -->
|
||||
|
||||
<A NAME="Q008"></A>
|
||||
<H2><BR/><B>Q8 : But I just want a simple Makefile! What do I do?</B></H2>
|
||||
<H2><BR/><B>Q8 : I have libsndfile installed and now I want to use it. I just want
|
||||
a simple Makefile! What do I do?</B></H2>
|
||||
|
||||
<P>
|
||||
The <B>pkg-config</B> program makes finding the correct compiler flag values and
|
||||
|
@ -339,7 +340,7 @@ other than normalized floats in the application.
|
|||
Alternatives to normalized floats are the <b>short</b> and <b>int</b> data
|
||||
types (ie using sf_read_short or sf_read_int) or using un-normalized floats
|
||||
(see
|
||||
<a href="http://www.mega-nerd.com/libsndfile/command.html#SFC_SET_NORM_FLOAT">
|
||||
<a href="command.html#SFC_SET_NORM_FLOAT">
|
||||
SFC_SET_NORM_FLOAT</a>).
|
||||
</P>
|
||||
<P>
|
||||
|
@ -389,11 +390,12 @@ is the risk of breaking something that currently works.
|
|||
</B></H2>
|
||||
|
||||
<P>
|
||||
An <tt>item</tt>tt> is a single sample of the data type you are reading; ie a
|
||||
An <tt>item</tt> is a single sample of the data type you are reading; ie a
|
||||
single <tt>short</tt> value for <tt>sf_read_short</tt> or a single <tt>float</tt>
|
||||
for <tt>sf_read_float</tt>.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
For a sound file with only one channel, a frame is the same as a item (ie a
|
||||
single sample) while for multi channel sound files, a single frame contains a
|
||||
single item for each channel.
|
||||
|
@ -412,7 +414,7 @@ on a stereo file, first using items:
|
|||
</PRE>
|
||||
|
||||
<P>
|
||||
and now readng the exact same amount of data using frames:
|
||||
and now reading the exact same amount of data using frames:
|
||||
</P>
|
||||
|
||||
<PRE>
|
||||
|
@ -640,7 +642,7 @@ CPU and run them on the other, the test suite will fail.
|
|||
</P>
|
||||
|
||||
<P>
|
||||
Part of the problem is the the CPU endian-ness is detected at configure time.
|
||||
Part of the problem is that the CPU endian-ness is detected at configure time.
|
||||
Yes, I know the Apple compiler defines one of the macros __LITTLE_ENDIAN__
|
||||
and __BIG_ENDIAN__, but those macros are not part of the 1999 ISO C Standard
|
||||
and they are not portable.
|
||||
|
@ -726,42 +728,18 @@ Hence, I'm not willing to enter into an arrangement like that again.
|
|||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q020"></A>
|
||||
<H2><BR/><B>Q20 : Why doesn't libsndfile support MP3? Lots of other Open Source
|
||||
projects support it!
|
||||
<H2><BR/><B>Q20 : Why doesn't libsndfile support MP3?
|
||||
</B></H2>
|
||||
|
||||
<P>
|
||||
MP3 is not supported for one very good reason; doing so requires the payment
|
||||
of licensing fees.
|
||||
As can be seen from
|
||||
<a href="http://www.mp3licensing.com/royalty/software.html">
|
||||
mp3licensing.com</a>
|
||||
the required royalty payments are not cheap.
|
||||
In the past, MP3 was not supported because the technology behind MP3 was
|
||||
patented.
|
||||
Those patents have now expired and there is an
|
||||
<a href="https://github.com/erikd/libsndfile/issues/258">
|
||||
open ticket</a>
|
||||
to implement MP3 support.
|
||||
</P>
|
||||
|
||||
<p>
|
||||
Yes, I know other libraries ignore the licensing requirements, but their legal
|
||||
status is extremely dubious.
|
||||
At any time, the body selling the licenses could go after the authors of those
|
||||
libraries.
|
||||
Some of those authors may be students and hence wouldn't be worth pursuing.
|
||||
</P>
|
||||
|
||||
<p>
|
||||
However, libsndfile is released under the name of a company, Mega Nerd Pty Ltd;
|
||||
a company which has income from from libsamplerate licensing, libsndfile based
|
||||
consulting income and other unrelated consulting income.
|
||||
Adding MP3 support to libsndfile could place that income would be under legal
|
||||
threat.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Fortunately, Ogg Vorbis exists as an alternative to MP3.
|
||||
Support for Ogg Vorbis was added to libsndfile (mostly due to the efforts of
|
||||
John ffitch of the Csound project) in version 1.0.18.
|
||||
</p>
|
||||
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="Q021"></A>
|
||||
<H2><BR/><B>Q21 : How do I use libsndfile in a closed source or commercial program
|
||||
|
@ -842,7 +820,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.24
|
||||
Version : 1.0.28
|
||||
</P>
|
||||
|
||||
</BODY>
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
htmldir = $(htmldocdir)
|
||||
html_DATA = index.html libsndfile.jpg libsndfile.css api.html command.html \
|
||||
bugs.html sndfile_info.html new_file_type.HOWTO pkgconfig.html \
|
||||
win32.html FAQ.html lists.html embedded_files.html octave.html \
|
||||
dither.html tutorial.html
|
||||
|
||||
EXTRA_DIST = $(html_DATA)
|
||||
|
|
@ -1,551 +0,0 @@
|
|||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
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
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(srcdir)/libsndfile.css.in
|
||||
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/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_largefile.m4 \
|
||||
$(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/flexible_array.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)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
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)
|
||||
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@
|
||||
GETCONF = @GETCONF@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
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@
|
||||
MAINT = @MAINT@
|
||||
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@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STRIP = @STRIP@
|
||||
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 = $(htmldocdir)
|
||||
htmldocdir = @htmldocdir@
|
||||
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@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
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 pkgconfig.html \
|
||||
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: @MAINTAINER_MODE_TRUE@ $(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
|
||||
.PRECIOUS: 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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
|
||||
|
||||
|
||||
# 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:
|
|
@ -34,7 +34,7 @@
|
|||
Every effort is made to keep these documents up-to-date, error free and
|
||||
unambiguous.
|
||||
However, since maintaining the documentation is the least fun part of working
|
||||
on libsndfile, these docs can and do fall behind the behaviour of library.
|
||||
on libsndfile, these docs can and do fall behind the behaviour of the library.
|
||||
If any errors, omissions or ambiguities are found, please notify me (erikd)
|
||||
at mega-nerd dot com.
|
||||
</P>
|
||||
|
@ -63,6 +63,7 @@ The functions of libsndfile are defined as follows:
|
|||
#include <sndfile.h>
|
||||
|
||||
SNDFILE* <A HREF="#open">sf_open</A> (const char *path, int mode, SF_INFO *sfinfo) ;
|
||||
SNDFILE* <A HREF="#open">sf_wchar_open</A> (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
|
||||
SNDFILE* <A HREF="#open_fd">sf_open_fd</A> (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;
|
||||
SNDFILE* <A HREF="#open_virtual">sf_open_virtual</A> (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data) ;
|
||||
int <A HREF="#check">sf_format_check</A> (const SF_INFO *info) ;
|
||||
|
@ -121,6 +122,18 @@ SNDFILE* is an anonymous pointer to data which is private to the library.
|
|||
SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The sf_open() function opens the sound file at the specified path.
|
||||
The filename is byte encoded, but may be utf-8 on Linux, while on Mac OS X it
|
||||
will use the filesystem character set.
|
||||
On Windows, there is also a Windows specific sf_wchar_open() that takes a
|
||||
UTF16_BE encoded filename.
|
||||
</P>
|
||||
|
||||
<PRE>
|
||||
SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The SF_INFO structure is for passing data between the calling function and the library
|
||||
when opening a file for reading or writing. It is defined in sndfile.h as follows:
|
||||
|
@ -524,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) ;
|
||||
|
@ -533,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) ;
|
||||
|
@ -567,27 +555,55 @@ 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>
|
||||
|
||||
<P>
|
||||
Note: The only difference between the "items" and "frames" versions of
|
||||
each read function is the units in which the object count is specified
|
||||
- calling sf_readf_short with a count argument of N, on a SNDFILE with
|
||||
C channels, is the same as calling sf_read_short with a count argument
|
||||
of N*C. The buffer pointed to by "ptr" should be the same number of
|
||||
bytes in each case.
|
||||
</P>
|
||||
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
Note: The data type used by the calling program and the data format of
|
||||
the file do not need to be the same. For instance, it is possible to
|
||||
open a 16 bit PCM encoded WAV file and read the data using
|
||||
sf_read_float(). The library seamlessly converts between the two
|
||||
formats on-the-fly. See
|
||||
<A HREF="#note1">Note 1</A>.
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
The sf_read_XXXX and sf_readf_XXXX functions return the number of
|
||||
items or frames read, respectively. Unless the end of the file was
|
||||
reached during the read, the return value should equal the number of
|
||||
objects requested. Attempts to read beyond the end of the file will
|
||||
not result in an error but will cause the read functions to return
|
||||
less than the number of objects requested or 0 if already at the end
|
||||
of the file.
|
||||
</P>
|
||||
|
||||
<A NAME="write"></A>
|
||||
<H2><BR><B>File Write Functions (Items)</B></H2>
|
||||
<H2><BR><B>File Write Functions</B></H2>
|
||||
|
||||
<PRE>
|
||||
sf_count_t sf_write_short (SNDFILE *sndfile, short *ptr, sf_count_t items) ;
|
||||
|
@ -596,27 +612,7 @@ already at the end of the file.
|
|||
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.
|
||||
</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
|
||||
<A HREF="#note1">Note 1</A>.
|
||||
</P>
|
||||
<P>
|
||||
The sf_write_XXXX functions return the number of items written (which should be the
|
||||
same as the items parameter).
|
||||
</P>
|
||||
|
||||
<A NAME="writef"></A>
|
||||
<H2><BR><B>File Write Functions (Frames)</B></H2>
|
||||
|
||||
<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) ;
|
||||
|
@ -625,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>
|
||||
The sf_writef_XXXX functions return the number of frames written (which should be the
|
||||
same as the frames parameter).
|
||||
For items-count functions, the items parameter specifies the size of
|
||||
the array and must be an integer product of the number of channels or
|
||||
an error will occur.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
For the frames-count functions, the array is expected to be large enough
|
||||
to hold a number of items equal to the product of frames and the
|
||||
number of channels.
|
||||
</P>
|
||||
|
||||
<P>As with the read functions <A HREF="#read">above</A>, the only
|
||||
difference in the items and frames version of each write function is
|
||||
the units in which the buffer size is specified. Again, the data type
|
||||
used by the calling program and the data format of the file do not
|
||||
need to be the same (<A HREF="#note1">Note 1</A>).
|
||||
</P>
|
||||
|
||||
<P>
|
||||
The sf_write_XXXX and sf_writef_XXXX functions respectively return the
|
||||
number of items or frames written (which should be the same as the
|
||||
items or frames parameter).
|
||||
</P>
|
||||
|
||||
|
||||
<A NAME="raw"></A>
|
||||
<H2><BR><B>Raw File Read and Write Functions</B></H2>
|
||||
<!-- pepper -->
|
||||
|
@ -692,7 +709,11 @@ The <B>str_type</B> parameter can be any one of the following string types:
|
|||
SF_STR_SOFTWARE,
|
||||
SF_STR_ARTIST,
|
||||
SF_STR_COMMENT,
|
||||
SF_STR_DATE
|
||||
SF_STR_DATE,
|
||||
SF_STR_ALBUM,
|
||||
SF_STR_LICENSE,
|
||||
SF_STR_TRACKNUMBER,
|
||||
SF_STR_GENRE
|
||||
} ;
|
||||
</PRE>
|
||||
|
||||
|
@ -710,9 +731,20 @@ It returns zero on success and non-zero on error.
|
|||
The error code can be converted to a string using sf_error_number().
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Strings passed to and retrieved from these two functions are assumed to be
|
||||
utf-8.
|
||||
However, while formats like Ogg/Vorbis and FLAC fully support utf-8, others
|
||||
like WAV and AIFF officially only support ASCII.
|
||||
Writing utf-8 strings to WAV and AIF files with libsndfile will work when read
|
||||
back with libsndfile, but may not work with other programs.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
|
||||
The suggested method of dealing with tags retrived using sf_get_string() is to
|
||||
assume they are utf-8.
|
||||
Similarly if you have a string in some exotic format like utf-16, it should be
|
||||
encoded to utf-8 before being written using libsndfile.
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
@ -721,8 +753,9 @@ The error code can be converted to a string using sf_error_number().
|
|||
<H2><BR><B>Note 1</B></H2>
|
||||
<!-- pepper -->
|
||||
<P>
|
||||
When converting between integer PCM formats of differing size (ie using sf_read_int()
|
||||
to read a 16 bit PCM encoded WAV file) libsndfile obeys one simple rule:
|
||||
When converting between integer PCM formats of differing size
|
||||
(e.g. using sf_read_int() to read a 16 bit PCM encoded WAV file)
|
||||
libsndfile obeys one simple rule:
|
||||
</P>
|
||||
|
||||
<P CLASS=indent_block>
|
||||
|
@ -766,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.24
|
||||
Version : 1.0.28
|
||||
</P>
|
||||
<!-- pepper -->
|
||||
<!-- pepper -->
|
||||
|
|
|
@ -68,9 +68,8 @@
|
|||
problems.
|
||||
</P>
|
||||
<P>
|
||||
Once you have the above information you should email it to one of the
|
||||
<A HREF="lists.html">mailing lists</a>
|
||||
(posting to these lists is limited to the list subscribers).
|
||||
Once you have the above information you should submit a ticket on the libsnfile
|
||||
<A HREF="https://github.com/erikd/libsndfile/issues">github issue tracker</A>.
|
||||
|
||||
</P>
|
||||
</BODY>
|
||||
|
|
|
@ -49,6 +49,10 @@
|
|||
<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_GET_CURRENT_SF_INFO">SFC_GET_CURRENT_SF_INFO</A></TD>
|
||||
<TD>Retrieve <CODE>SF_INFO</CODE> struct of opened file.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_CALC_SIGNAL_MAX">SFC_CALC_SIGNAL_MAX</A></TD>
|
||||
<TD>Calculate the measured maximum signal value.</TD>
|
||||
|
@ -177,22 +181,27 @@
|
|||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_WAVEX_GET_AMBISONIC">SFC_GET_AMBISONIC</A></TD>
|
||||
<TD><A HREF="#SFC_WAVEX_GET_AMBISONIC">SFC_WAVEX_GET_AMBISONIC</A></TD>
|
||||
<TD>Test a WAVEX file for Ambisonic format</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_WAVEX_SET_AMBISONIC">SFC_SET_AMBISONIC</A></TD>
|
||||
<TD><A HREF="#SFC_WAVEX_SET_AMBISONIC">SFC_WAVEX_SET_AMBISONIC</A></TD>
|
||||
<TD>Modify a WAVEX header for Ambisonic format</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_SET_VBR_ENCODING_QUALITY">SFC_SET_VBR_ENCODING_QUALITY</A></TD>
|
||||
<TD>Set the the Variable Bit Rate encoding quality</TD>
|
||||
<TD>Set the Variable Bit Rate encoding quality</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_RAW_NEEDS_ENDSWAP">SFC_RAW_NEEDS_ENDSWAP</a></td>
|
||||
<TD><A HREF="#SFC_SET_COMPRESSION_LEVEL">SFC_SET_COMPRESSION_LEVEL</A></TD>
|
||||
<TD>Set the compression level.</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_RAW_DATA_NEEDS_ENDSWAP">SFC_RAW_DATA_NEEDS_ENDSWAP</a></td>
|
||||
<TD>Determine if raw data needs endswapping</TD>
|
||||
</TR>
|
||||
|
||||
|
@ -206,6 +215,68 @@
|
|||
<TD>Set the Broadcast Chunk info</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_GET_CHANNEL_MAP_INFO">SFC_GET_CHANNEL_MAP_INFO</A></TD>
|
||||
<TD>Retrieve the channel map info</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_SET_CHANNEL_MAP_INFO">SFC_SET_CHANNEL_MAP_INFO</A></TD>
|
||||
<TD>Set the channel map info</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_SET_CART_INFO">SFC_SET_CART_INFO</A></TD>
|
||||
<TD>Set the Cart Chunk info</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_GET_CART_INFO">SFC_GET_CART_INFO</A></TD>
|
||||
<TD>Retrieve the Cart Chunk info</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_GET_LOOP_INFO">SFC_GET_LOOP_INFO</A></TD>
|
||||
<TD>Get loop info</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_GET_INSTRUMENT">SFC_GET_INSTRUMENT</A></TD>
|
||||
<TD>Get instrument info</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_SET_INSTRUMENT">SFC_SET_INSTRUMENT</A></TD>
|
||||
<TD>Set instrument info</TD>
|
||||
</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>
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_GET_ORIGINAL_SAMPLERATE">SFC_GET_ORIGINAL_SAMPLERATE</A></TD>
|
||||
<TD>Get original samplerate</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><A HREF="#SFC_SET_ORIGINAL_SAMPLERATE">SFC_SET_ORIGINAL_SAMPLERATE</A></TD>
|
||||
<TD>Set original samplerate</TD>
|
||||
</TR>
|
||||
<!--
|
||||
<TR>
|
||||
<TD><A HREF="#add-dither">add dither</A></TD>
|
||||
|
@ -231,7 +302,7 @@ Parameters:
|
|||
sndfile : Not used
|
||||
cmd : SFC_GET_LIB_VERSION
|
||||
data : A pointer to a char buffer
|
||||
datasize : The size of the the buffer
|
||||
datasize : The size of the buffer
|
||||
</PRE>
|
||||
<P>
|
||||
Example:
|
||||
|
@ -266,7 +337,7 @@ Parameters:
|
|||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_GET_LOG_INFO
|
||||
data : A pointer to a char buffer
|
||||
datasize : The size of the the buffer
|
||||
datasize : The size of the buffer
|
||||
</PRE>
|
||||
<P>
|
||||
Example:
|
||||
|
@ -287,6 +358,38 @@ 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_CURRENT_SF_INFO"></A>
|
||||
<H2><BR><B>SFC_GET_CURRENT_SF_INFO</B></H2>
|
||||
<P>
|
||||
Retrieve <CODE>SF_INFO</CODE> struct of opened file.
|
||||
</P>
|
||||
<P>
|
||||
<CODE>SFC_GET_CURRENT_SF_INFO</CODE> command copies <CODE>SF_INFO</CODE> struct of
|
||||
<CODE>sndfile</CODE> object to provided buffer.
|
||||
</P>
|
||||
|
||||
<P>
|
||||
Parameters:
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_GET_CURRENT_SF_INFO
|
||||
data : A pointer to a valid SF_INFO* pointer
|
||||
datasize : sizeof (SF_INFO)
|
||||
</PRE>
|
||||
<P>
|
||||
Example:
|
||||
</P>
|
||||
<PRE>
|
||||
SF_INFO sfinfo ;
|
||||
sf_command (sndfile, SFC_GET_CURRENT_SF_INFO, sfinfo, sizeof (SF_INFO)) ;
|
||||
</PRE>
|
||||
|
||||
<DL>
|
||||
<DT>Return value:</DT>
|
||||
<DD><DD>Zero on success, non-zero otherwise.
|
||||
</DL>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="SFC_CALC_SIGNAL_MAX"></A>
|
||||
<H2><BR><B>SFC_CALC_SIGNAL_MAX</B></H2>
|
||||
|
@ -1243,7 +1346,7 @@ Parameters:
|
|||
</P>
|
||||
<DL>
|
||||
<DT>Return value: </DT>
|
||||
<DD>SF_AMBISONIC_NONE or SF_AMBISONIC_B_FORMAT or zero if the file format
|
||||
<DD>SF_AMBISONIC_NONE or SF_AMBISONIC_B_FORMAT or zero if the file format
|
||||
does not support ambisonic formats.
|
||||
</DL>
|
||||
|
||||
|
@ -1280,9 +1383,11 @@ This command is currently only supported for files with SF_FORMAT_WAVEX format.
|
|||
<A NAME="SFC_SET_VBR_ENCODING_QUALITY"></A>
|
||||
<H2><BR><B>SFC_SET_VBR_ENCODING_QUALITY</B></H2>
|
||||
<P>
|
||||
Set the the Variable Bit Rate encoding quality.
|
||||
Set the Variable Bit Rate encoding quality.
|
||||
The encoding quality value should be between 0.0 (lowest quality) and 1.0
|
||||
(highest quality).
|
||||
Currenly this command is only implemented for FLAC and Ogg/Vorbis files.
|
||||
It has no effect on un-compressed file formats.
|
||||
</P>
|
||||
<P>
|
||||
Parameters:
|
||||
|
@ -1298,13 +1403,43 @@ The command must be sent before any audio data is written to the file.
|
|||
<P>
|
||||
</P>
|
||||
<DL>
|
||||
<DT>Return value: </DT>
|
||||
<DD>Zero on success, non-zero otherwise.
|
||||
<DT>Return value:</DT>
|
||||
<dd>SF_TRUE if VBR encoding quality was set.
|
||||
SF_FALSE otherwise.
|
||||
</DL>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="SFC_RAW_NEEDS_ENDSWAP"></A>
|
||||
<H2><BR><B>SFC_RAW_NEEDS_ENDSWAP</B></H2>
|
||||
<A NAME="SFC_SET_COMPRESSION_LEVEL"></A>
|
||||
<H2><BR><B>SFC_SET_COMPRESSION_LEVEL</B></H2>
|
||||
<P>
|
||||
Set the compression level.
|
||||
The compression level should be between 0.0 (minimum compression level) and 1.0
|
||||
(highest compression level).
|
||||
Currenly this command is only implemented for FLAC and Ogg/Vorbis files.
|
||||
It has no effect on un-compressed file formats.
|
||||
</P>
|
||||
<P>
|
||||
Parameters:
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_SET_COMPRESSION_LEVEL
|
||||
data : A pointer to a double value
|
||||
datasize : sizeof (double)
|
||||
</PRE>
|
||||
<P>
|
||||
The command must be sent before any audio data is written to the file.
|
||||
</P>
|
||||
<P>
|
||||
</P>
|
||||
<DL>
|
||||
<DT>Return value:</DT>
|
||||
<dd>SF_TRUE if compression level was set.
|
||||
SF_FALSE otherwise.
|
||||
</DL>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="SFC_RAW_DATA_NEEDS_ENDSWAP"></A>
|
||||
<H2><BR><B>SFC_RAW_DATA_NEEDS_ENDSWAP</B></H2>
|
||||
<P>
|
||||
Determine if raw data read using
|
||||
<a href="api.html#raw">
|
||||
|
@ -1320,7 +1455,7 @@ machine.
|
|||
Parameters:
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_RAW_NEEDS_ENDSWAP
|
||||
cmd : SFC_RAW_DATA_NEEDS_ENDSWAP
|
||||
data : NULL
|
||||
datasize : 0
|
||||
</PRE>
|
||||
|
@ -1392,7 +1527,528 @@ Parameters:
|
|||
<DT>Return value: </DT>
|
||||
<DD>SF_TRUE if setting the Broadcast Extension chunk was successful and SF_FALSE
|
||||
otherwise.
|
||||
|
||||
</DL>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="SFC_GET_CHANNEL_MAP_INFO"></A>
|
||||
<H2><BR><B>SFC_GET_CHANNEL_MAP_INFO</B></H2>
|
||||
<P>
|
||||
Retrieve the channel map contained in an AIFF or CAF Channel Layout chunk.
|
||||
</P>
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_GET_CHANNEL_MAP_INFO
|
||||
data : a pointer to an array of int, the same size as the number of channels in the file
|
||||
datasize : number of channels * sizeof (int)
|
||||
</PRE>
|
||||
<P>
|
||||
Channel map positions are defined in an enum in <sndfile.h>.
|
||||
</P>
|
||||
|
||||
<DL>
|
||||
<DT>Return value: </DT>
|
||||
<DD>SF_TRUE if the file contained a Channel Layout chunk or SF_FALSE otherwise.
|
||||
</DL>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="SFC_SET_CHANNEL_MAP_INFO"></A>
|
||||
<H2><BR><B>SFC_SET_CHANNEL_MAP_INFO</B></H2>
|
||||
<P>
|
||||
Set the channel map contained in an AIFF or CAF Channel Layout chunk.
|
||||
</P>
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_SET_CHANNEL_MAP_INFO
|
||||
data : a pointer to an array of int, the same size as the number of channels in the file
|
||||
datasize : number of channels * sizeof (int)
|
||||
</PRE>
|
||||
|
||||
<DL>
|
||||
<DT>Return value: </DT>
|
||||
<DD>SF_TRUE if setting the Channel Layout chunk was successful and SF_FALSE otherwise.
|
||||
|
||||
</DL>
|
||||
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="SFC_GET_CART_INFO"></A>
|
||||
<H2><BR><B>SFC_GET_CART_INFO</B></H2>
|
||||
<P>Retrieve the Cart Chunk from WAV (and related) files. Based on AES46 standard for CartChunk (see <a href="http://www.cartchunk.org/">CartChunk.org</a> for more information.
|
||||
</P>
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_GET_CART_INFO
|
||||
data : a pointer to an SF_CART_INFO struct
|
||||
datasize : sizeof (SF_CART_INFO)
|
||||
</PRE>
|
||||
<P>
|
||||
The SF_CART_INFO struct is defined in <sndfile.h> as:
|
||||
</P>
|
||||
<PRE>
|
||||
#define SF_CART_INFO_VAR(p_tag_text_size) \
|
||||
struct
|
||||
{ char version [4] ;
|
||||
char title [64] ;
|
||||
char artist [64] ;
|
||||
char cut_id [64] ;
|
||||
char client_id [64] ;
|
||||
char category [64] ;
|
||||
char classification [64] ;
|
||||
char out_cue [64] ;
|
||||
char start_date [10] ;
|
||||
char start_time [8] ;
|
||||
char end_date [10] ;
|
||||
char end_time [8] ;
|
||||
char producer_app_id [64] ;
|
||||
char producer_app_version [64] ;
|
||||
char user_def [64] ;
|
||||
long level_reference ;
|
||||
SF_CART_TIMER post_timers [8] ;
|
||||
char reserved [276] ;
|
||||
char url [1024] ;
|
||||
unsigned int tag_text_size ;
|
||||
char tag_text[p_tag_text_size] ;
|
||||
}
|
||||
</PRE>
|
||||
|
||||
<DL>
|
||||
<DT>Return value: </DT>
|
||||
<DD>SF_TRUE if the file contained a Cart chunk or SF_FALSE
|
||||
otherwise.
|
||||
</DL>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="SFC_SET_CART_INFO"></A>
|
||||
<H2><BR><B>SFC_SET_CART_INFO</B></H2>
|
||||
<P>
|
||||
Set the Cart Chunk for WAV (and related) files.
|
||||
</P>
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_SET_CART_INFO
|
||||
data : a pointer to an SF_CART_INFO struct
|
||||
datasize : sizeof (SF_CART_INFO)
|
||||
</PRE>
|
||||
|
||||
<DL>
|
||||
<DT>Return value: </DT>
|
||||
<DD>SF_TRUE if setting the Cart chunk was successful and SF_FALSE
|
||||
otherwise.
|
||||
</DL>
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
<A NAME="SFC_GET_LOOP_INFO"></A>
|
||||
<H2><BR><B>SFC_GET_LOOP_INFO</B></H2>
|
||||
<P>
|
||||
Retrieve loop information for file including time signature, length in
|
||||
beats and original MIDI base note
|
||||
</P>
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_GET_LOOP_INFO
|
||||
data : a pointer to an SF_LOOP_INFO struct
|
||||
datasize : sizeof (SF_LOOP_INFO)
|
||||
</PRE>
|
||||
<P>
|
||||
The SF_BROADCAST_INFO struct is defined in <sndfile.h> as:
|
||||
</P>
|
||||
<PRE>
|
||||
typedef struct
|
||||
{ short time_sig_num ; /* any positive integer > 0 */
|
||||
short time_sig_den ; /* any positive power of 2 > 0 */
|
||||
int loop_mode ; /* see SF_LOOP enum */
|
||||
|
||||
int num_beats ; /* this is NOT the amount of quarter notes !!!*/
|
||||
/* a full bar of 4/4 is 4 beats */
|
||||
/* a full bar of 7/8 is 7 beats */
|
||||
|
||||
float bpm ; /* suggestion, as it can be calculated using other fields:*/
|
||||
/* file's lenght, file's sampleRate and our time_sig_den*/
|
||||
/* -> bpms are always the amount of _quarter notes_ per minute */
|
||||
|
||||
int root_key ; /* MIDI note, or -1 for None */
|
||||
int future [6] ;
|
||||
} SF_LOOP_INFO ;
|
||||
</PRE>
|
||||
<P>
|
||||
Example:
|
||||
</P>
|
||||
<PRE>
|
||||
SF_LOOP_INFO loop;
|
||||
sf_command (sndfile, SFC_GET_LOOP_INFO, &loop, sizeof (loop)) ;
|
||||
</PRE>
|
||||
<DL>
|
||||
<DT>Return value:</DT>
|
||||
<DD>SF_TRUE if the file header contains loop information for the file.
|
||||
SF_FALSE otherwise.
|
||||
</DL>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
|
||||
<A NAME="SFC_GET_INSTRUMENT"></A>
|
||||
<H2><BR><B>SFC_GET_INSTRUMENT</B></H2>
|
||||
<P>
|
||||
Retrieve instrument information from file including MIDI base note,
|
||||
keyboard mapping and looping informations(start/stop and mode).
|
||||
</P>
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_GET_INSTRUMENT
|
||||
data : a pointer to an SF_INSTRUMENT struct
|
||||
datasize : sizeof (SF_INSTRUMENT)
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
The SF_INSTRUMENT struct is defined in <sndfile.h> as:
|
||||
</P>
|
||||
<PRE>
|
||||
enum
|
||||
{ /*
|
||||
** The loop mode field in SF_INSTRUMENT will be one of the following.
|
||||
*/
|
||||
SF_LOOP_NONE = 800,
|
||||
SF_LOOP_FORWARD,
|
||||
SF_LOOP_BACKWARD,
|
||||
SF_LOOP_ALTERNATING
|
||||
} ;
|
||||
|
||||
typedef struct
|
||||
{ int gain ;
|
||||
char basenote, detune ;
|
||||
char velocity_lo, velocity_hi ;
|
||||
char key_lo, key_hi ;
|
||||
int loop_count ;
|
||||
|
||||
struct
|
||||
{ int mode ;
|
||||
unsigned int start ;
|
||||
unsigned int end ;
|
||||
unsigned int count ;
|
||||
} loops [16] ; /* make variable in a sensible way */
|
||||
} SF_INSTRUMENT ;
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Example:
|
||||
</P>
|
||||
<PRE>
|
||||
SF_INSTRUMENT inst ;
|
||||
sf_command (sndfile, SFC_GET_INSTRUMENT, &inst, sizeof (inst)) ;
|
||||
</PRE>
|
||||
<DL>
|
||||
<DT>Return value:</DT>
|
||||
<dd>SF_TRUE if the file header contains instrument information for the
|
||||
file. SF_FALSE otherwise.
|
||||
</DL>
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
|
||||
<A NAME="SFC_SET_INSTRUMENT"></A>
|
||||
<H2><BR><B>SFC_SET_INSTRUMENT</B></H2>
|
||||
<P>
|
||||
Set the instrument information for the file.
|
||||
</P>
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_SET_INSTRUMENT
|
||||
data : a pointer to an SF_INSTRUMENT struct
|
||||
datasize : sizeof (SF_INSTRUMENT)
|
||||
</PRE>
|
||||
<P>
|
||||
Example:
|
||||
</P>
|
||||
<PRE>
|
||||
SF_INSTRUMENT inst ;
|
||||
sf_command (sndfile, SFC_SET_INSTRUMENT, &inst, sizeof (inst)) ;
|
||||
</PRE>
|
||||
<DL>
|
||||
<DT>Return value:</DT>
|
||||
<dd>SF_TRUE if the file header contains instrument information for the
|
||||
file. SF_FALSE otherwise.
|
||||
</DL>
|
||||
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
<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, &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 <sndfile.h> 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, &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, &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>
|
||||
<P>
|
||||
Enable auto downgrade from RF64 to WAV.
|
||||
</P>
|
||||
<P>
|
||||
The EBU recomendation is that when writing RF64 files and the resulting file is
|
||||
less than 4Gig in size, it should be downgraded to a WAV file (WAV files have a
|
||||
maximum size of 4Gig).
|
||||
libsndfile doesn't follow the EBU recommendations exactly, , mainly because the
|
||||
test suite needs to be able test reading/writing RF64 files without having to
|
||||
generate files larger than 4 gigabytes.
|
||||
</P>
|
||||
<p>
|
||||
Note: This command should be issued before the first bit of audio data has been
|
||||
written to the file.
|
||||
Calling this command after audio data has been written will return the current
|
||||
value of this setting, but will not allow it to be changed.
|
||||
</p>
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_RF64_AUTO_DOWNGRADE
|
||||
data : NULL
|
||||
datasize : SF_TRUE or SF_FALSE
|
||||
</PRE>
|
||||
<P>
|
||||
Example:
|
||||
</P>
|
||||
<PRE>
|
||||
/* Enable auto downgrade on file close. */
|
||||
sf_command (sndfile, SFC_RF64_AUTO_DOWNGRADE, NULL, SF_TRUE) ;
|
||||
</PRE>
|
||||
<DL>
|
||||
<DT>Return value:</DT>
|
||||
<dd>Returns SF_TRUE if SFC_RF64_AUTO_DOWNGRADE is set and SF_FALSE
|
||||
otherwise.
|
||||
</DL>
|
||||
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="SFC_GET_ORIGINAL_SAMPLERATE"></A>
|
||||
<H2><BR><B>SFC_GET_ORIGINAL_SAMPLERATE</B></H2>
|
||||
<P>
|
||||
Get original samplerate metadata.
|
||||
</P>
|
||||
<P>
|
||||
The Opus audio codec stores audio data independent of samplerate, but only
|
||||
supports encoding or decoding at 8000Hz, 12000Hz, 16000Hz, 24000HZ or 48000Hz.
|
||||
Opus includes a header field to record the original source input samplerate, and
|
||||
a samplerate converter may be used if needed.
|
||||
</p>
|
||||
<P>
|
||||
This command gets the original samplerate header field. It does not enable any
|
||||
(non-existent) samplerate conversion, nor change the current decoder samplerate.
|
||||
</P>
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_GET_ORIGINAL_SAMPLERATE
|
||||
data : pointer to an integer
|
||||
datasize : sizeof (int)
|
||||
</PRE>
|
||||
<P>
|
||||
Example:
|
||||
</P>
|
||||
<PRE>
|
||||
/* Get the original sample rate */
|
||||
int original_samplerate ;
|
||||
sf_command (sndfile, SFC_GET_ORIGINAL_SAMPLERATE, &original_samplerate, sizeof (original_samplerate)) ;
|
||||
</PRE>
|
||||
<DL>
|
||||
<DT>Return value:</DT>
|
||||
<dd>Returns SF_TRUE on success, SF_FALSE otherwise.
|
||||
<dd>The passed integer is set to the value of the original samplerate.
|
||||
</DL>
|
||||
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
<A NAME="SFC_SET_ORIGINAL_SAMPLERATE"></A>
|
||||
<H2><BR><B>SFC_SET_ORIGINAL_SAMPLERATE</B></H2>
|
||||
<P>
|
||||
Set original samplerate metadata.
|
||||
</P>
|
||||
<P>
|
||||
The Opus audio codec stores audio data independent of samplerate, but only
|
||||
supports encoding or decoding at 8000Hz, 12000Hz, 16000Hz, 24000HZ or 48000Hz.
|
||||
Opus includes a header field to record the original source input samplerate, and
|
||||
a samplerate converter may be used if needed.
|
||||
</p>
|
||||
<p>
|
||||
When writing an Opus file this command sets the original samplerate header field
|
||||
to the provided value, which is then stored in the file. This has no effect on
|
||||
the current encoder samplerate.
|
||||
</p>
|
||||
<p>
|
||||
When reading an Opus file this command overrides the original samplerate value
|
||||
as read from the file. libsndfile uses this value to choose what samplerate
|
||||
to decode at, rounding up to the nearest valid Opus samplerate. After a
|
||||
successful call, the file samplerate and frames count may have changed.
|
||||
</p>
|
||||
<p>
|
||||
Note: This command should be issued before the first bit of audio data has been
|
||||
read from or written to the file.
|
||||
</p>
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<PRE>
|
||||
sndfile : A valid SNDFILE* pointer
|
||||
cmd : SFC_SET_ORIGINAL_SAMPLERATE
|
||||
data : pointer to an integer
|
||||
datasize : sizeof (int)
|
||||
</PRE>
|
||||
<P>
|
||||
Example:
|
||||
</P>
|
||||
<PRE>
|
||||
/* Store the original sample rate as 44100 */
|
||||
int original_samplerate 44100;
|
||||
sf_command (sndfile, SFC_SET_ORIGINAL_SAMPLERATE, &original_samplerate, sizeof (input_samplerate)) ;
|
||||
</PRE>
|
||||
<DL>
|
||||
<DT>Return value:</DT>
|
||||
<dd>Returns SF_TRUE on success, SF_FALSE otherwise.
|
||||
<dd>On write, can only succeed if no data has been written.
|
||||
<dd>On read, if successful, <a HREF="#SFC_GET_CURRENT_SF_INFO">SFC_GET_CURRENT_SF_INFO</a>
|
||||
should be called to determine the new frames count and samplerate
|
||||
</DL>
|
||||
|
||||
|
||||
|
||||
<!-- ========================================================================= -->
|
||||
|
||||
|
||||
|
@ -1402,7 +2058,7 @@ Parameters:
|
|||
<A HREF="http://www.mega-nerd.com/libsndfile/">
|
||||
http://www.mega-nerd.com/libsndfile/</A>.
|
||||
<BR>
|
||||
Version : 1.0.24
|
||||
Version : 1.0.25
|
||||
</P>
|
||||
|
||||
</BODY>
|
||||
|
|
|
@ -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>
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -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>
|
|
@ -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.24">
|
||||
<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">
|
||||
|
@ -68,7 +68,6 @@
|
|||
<LI>Every platform supported by Debian GNU/Linux including x86_64-linux-gnu,
|
||||
i486-linux-gnu, powerpc-linux-gnu, sparc-linux-gnu, alpha-linux-gnu,
|
||||
mips-linux-gnu and armel-linux-gnu.</LI>
|
||||
<LI>arm-linux-androideab (Android phones OS)</LI>
|
||||
<LI>powerpc-apple-darwin7.0 (Mac OS X 10.3)</LI>
|
||||
<LI>sparc-sun-solaris2.8 (using gcc)</LI>
|
||||
<LI>mips-sgi-irix5.3 (using gcc)</LI>
|
||||
|
@ -163,7 +162,7 @@
|
|||
|
||||
<TR><TD>Signed 24 bit PCM</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
<TD ALIGN="center">R/W</TD><TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD>
|
||||
<TD> </TD><TD ALIGN="center">R/W</TD><TD> </TD><TD> </TD><TD> </TD>
|
||||
<TD> </TD><TD> </TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD><TD ALIGN="center">R/W</TD>
|
||||
</TR>
|
||||
|
@ -293,7 +292,7 @@ and
|
|||
I have decided that I will not be adding support for MPEG Layer 3 (commonly
|
||||
known as MP3) due to the patent issues surrounding this file format.
|
||||
See
|
||||
<a href="http://www.mega-nerd.com/libsndfile/FAQ.html#Q020">
|
||||
<a href="FAQ.html#Q020">
|
||||
the FAQ</a>
|
||||
for more.
|
||||
</P>
|
||||
|
@ -367,6 +366,14 @@ and
|
|||
<LI>Version 1.0.22 (October 04 2010) Bunch of minor bug fixes.
|
||||
<LI>Version 1.0.23 (October 10 2010) Minor bug fixes.
|
||||
<LI>Version 1.0.24 (March 23 2011) Minor bug fixes.
|
||||
<LI>Version 1.0.25 (July 13 2011) Fix for Secunia Advisory SA45125. Minor bug fixes and
|
||||
improvements.
|
||||
<LI>Version 1.0.26 (November 22 2015) Fix for CVE-2014-9496, CVE-2014-9756 and CVE-2015-7805.
|
||||
Add ALAC/CAF support. Minor bug fixes and improvements.
|
||||
<LI>Version 1.0.27 (June 19 2016) Fix a seek regression in 1.0.26. Add metadata read/write
|
||||
for CAF and RF64. FIx PAF endian-ness issue.
|
||||
<LI>Version 1.0.28 (April 2 2017) Fix buffer overruns in FLAC and ID3 handling code. Reduce default
|
||||
header memory requirements. Fix detection of Large File Support for 32 bit systems.
|
||||
</UL>
|
||||
|
||||
<A NAME="Similar"></A>
|
||||
|
@ -428,22 +435,28 @@ and
|
|||
</P>
|
||||
<UL>
|
||||
<LI>Source code as a .tar.gz :
|
||||
<A HREF="files/libsndfile-1.0.24.tar.gz">libsndfile-1.0.24.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.24.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.24-w32-setup.exe">
|
||||
libsndfile-1.0.24-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.24-w64-setup.exe">
|
||||
libsndfile-1.0.24-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>
|
||||
|
|
|
@ -83,6 +83,8 @@ h4 {
|
|||
pre {
|
||||
font-family : courier, monospace ;
|
||||
font-size : medium ;
|
||||
margin-left : 6% ;
|
||||
margin-right : 6% ;
|
||||
}
|
||||
a:link { color : #9090FF ; }
|
||||
a:visited { color : #5050FF ; }
|
||||
|
|
|
@ -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...
|
||||
|
|
@ -15,21 +15,21 @@
|
|||
<BR>
|
||||
<H1><B>libsndfile and GNU Octave</B></H1>
|
||||
<P>
|
||||
<A HREF="http://www.octave.org/">GNU Octave</A> is a high-level interactive
|
||||
language for numerical computations.
|
||||
<A HREF="http://www.octave.org/">GNU Octave</A> is a high-level interactive
|
||||
language for numerical computations.
|
||||
There are currently two development streams, a stable 2.0.X series and a
|
||||
development 2.1.X series.
|
||||
Octave reads and writes data in binary formats that were originally developed
|
||||
for
|
||||
for
|
||||
<A HREF="http://www.mathworks.com/">MATLAB</A>.
|
||||
Version 2.0.X of Octave uses binary data files compatible with MATLAB
|
||||
version 4.2 while Octave 2.1.X uses binary data files compatible
|
||||
with MATLAB version 5.0 as well as being able to read the older MATLAB 4.2
|
||||
with MATLAB version 5.0 as well as being able to read the older MATLAB 4.2
|
||||
format.
|
||||
</P>
|
||||
<P>
|
||||
From version 1.0.1 of libsndfile onwards, libsndfile has the ability of reading
|
||||
and writing a small subset of the binary data files used by both versions
|
||||
From version 1.0.1 of libsndfile onwards, libsndfile has the ability of reading
|
||||
and writing a small subset of the binary data files used by both versions
|
||||
of GNU Octave.
|
||||
This gives people using GNU Octave for audio based work an easy method of
|
||||
moving audio data between GNU Octave and other programs which use libsndfile.
|
||||
|
@ -37,22 +37,22 @@
|
|||
<P>
|
||||
For instance it is now possible to do the following:
|
||||
</P>
|
||||
|
||||
|
||||
<UL>
|
||||
<LI> Load a WAV file into a sound file editor such as
|
||||
<LI> Load a WAV file into a sound file editor such as
|
||||
<A HREF="http://www.metadecks.org/software/sweep/">Sweep</A>.
|
||||
<LI> Save it as a MAT4 file.
|
||||
<LI> Load the data into Octave for manipulation.
|
||||
<LI> Save the modified data.
|
||||
<LI> Save the modified data.
|
||||
<LI> Reload it in Sweep.
|
||||
</UL>
|
||||
<P>
|
||||
Another example would be using the MAT4 or MAT5 file formats as a format which
|
||||
can be easily loaded into Octave for viewing/analyzing as well as a format
|
||||
can be easily loaded into Octave for viewing/analyzing as well as a format
|
||||
which can be played with command line players such as the one included with
|
||||
libsndfile.
|
||||
</P>
|
||||
|
||||
|
||||
<H2><B>Details</B></H2>
|
||||
<P>
|
||||
Octave, like most programming languages, uses variables to store data, and
|
||||
|
@ -70,7 +70,7 @@
|
|||
<PRE>
|
||||
octave:1 > samplerate = 44100 ;
|
||||
octave:2 > wavedata = sin ((0:1023)*2*pi/1024) ;
|
||||
octave:3 > save sine.mat samplerate wavedata
|
||||
octave:3 > save sine.mat samplerate wavedata
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
|
@ -84,7 +84,7 @@
|
|||
<P>
|
||||
In addition, libsndfile contains a command line program which which is able
|
||||
to play the correct types of Octave files.
|
||||
Using this command line player <B>sndfile-play</B> and a third Octave script
|
||||
Using this command line player <B>sndfile-play</B> and a third Octave script
|
||||
file allows Octave data to be played from within Octave on any of the platforms
|
||||
which <B>sndfile-play</B> supports (at the moment: Linux, MacOS X, Solaris and
|
||||
Win32).
|
||||
|
@ -100,8 +100,8 @@
|
|||
</P>
|
||||
|
||||
<P>
|
||||
There are some other Octave scripts for audio to be found
|
||||
<A HREF="http://octave.sourceforge.net/index/audio.html">here</A>.
|
||||
There are some other Octave scripts for audio to be found
|
||||
<A HREF="http://octave.sourceforge.net/audio/index.html">here</A>.
|
||||
</P>
|
||||
|
||||
<BR>
|
||||
|
@ -109,7 +109,7 @@
|
|||
|
||||
<HR>
|
||||
<P>
|
||||
The libsndfile home page is here :
|
||||
The libsndfile home page is here :
|
||||
<A HREF="http://www.mega-nerd.com/libsndfile/">
|
||||
http://www.mega-nerd.com/libsndfile/</A>.
|
||||
</P>
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
libsndfile : pkg-config
|
||||
</TITLE>
|
||||
<META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
|
||||
<LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
|
||||
<LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<BR>
|
||||
<H1>libsndfile and pkg-config</H1>
|
||||
|
||||
<P>
|
||||
From version 1.0.0 libsndfile has had the ability to read and write files of
|
||||
greater than 2 Gig in size on most OSes even if sizeof (long) == 4.
|
||||
OSes which support this feature include Linux (2.4 kernel, glibc6) on x86, PPC and
|
||||
probably others, Win32, MacOS X, *BSD, Solaris and probably others.
|
||||
OSes on 64 bit processors where the default compile environment is LP64 (longs and
|
||||
pointers are 64 bit ie Linux on DEC/Compaq/HP Alpha processors) automatically
|
||||
support large file access.
|
||||
</P>
|
||||
<P>
|
||||
Other OSes including Linux on 32 bit processors, 32 bit Solaris and others require
|
||||
special compiler flags to add large file support.
|
||||
This applies to both the compilation of the library itself and the compilation of
|
||||
programs which link to the library.
|
||||
</P>
|
||||
<P>
|
||||
Note : People using Win32, MacOS (both OS X and pre-OS X) or *BSD can disregard the
|
||||
rest of this document as it does not apply to either of these OSes.
|
||||
</P>
|
||||
<P>
|
||||
The <B>pkg-config</B> program makes finding the correct compiler flag values and
|
||||
library location far easier.
|
||||
During the installation of libsndfile, a file named <B>sndfile.pc</B> is installed
|
||||
in the directory <B>${libdir}/pkgconfig</B> (ie if libsndfile is installed in
|
||||
<B>/usr/local/lib</B>, <B>sndfile.pc</B> will be installed in
|
||||
<B>/usr/local/lib/pkgconfig/</B>).
|
||||
</P>
|
||||
<P>
|
||||
In order for pkg-config to find sndfile.pc it may be necessary to point the
|
||||
environment variable <B>PKG_CONFIG_PATH</B> in the right direction.
|
||||
</P>
|
||||
<PRE>
|
||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Then, to compile a C file into an object file, the command would be:
|
||||
</P>
|
||||
<PRE>
|
||||
gcc `pkg-config --cflags sndfile` -c somefile.c
|
||||
</PRE>
|
||||
<P>
|
||||
and to link a number of objects into an executable that links against libsndfile,
|
||||
the command would be:
|
||||
</P>
|
||||
<PRE>
|
||||
gcc `pkg-config --libs sndfile` obj1.o obj2.o -o program
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Obviously all this can be rolled into a Makefile for easier maintenance.
|
||||
</P>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,14 @@
|
|||
body {
|
||||
background:white;
|
||||
color:black;
|
||||
}
|
||||
|
||||
h1{
|
||||
background:white;
|
||||
color:black;
|
||||
}
|
||||
|
||||
h2 {
|
||||
background:white;
|
||||
color:#666;
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
noinst_PROGRAMS = make_sine sfprocess list_formats generate sndfilehandle sndfile-to-text
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src
|
||||
|
||||
sndfile_to_text_SOURCES = sndfile-to-text.c
|
||||
sndfile_to_text_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
|
||||
|
|
@ -1,733 +0,0 @@
|
|||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
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)
|
||||
subdir = examples
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/Cfg/depcomp
|
||||
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/clip_mode.m4 \
|
||||
$(top_srcdir)/M4/endian.m4 $(top_srcdir)/M4/extra_largefile.m4 \
|
||||
$(top_srcdir)/M4/extra_pkg.m4 \
|
||||
$(top_srcdir)/M4/flexible_array.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)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
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_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_to_text_SOURCES) $(sndfilehandle_SOURCES)
|
||||
DIST_SOURCES = $(generate_SOURCES) $(list_formats_SOURCES) \
|
||||
$(make_sine_SOURCES) $(sfprocess_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
|
||||
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@
|
||||
GETCONF = @GETCONF@
|
||||
GREP = @GREP@
|
||||
HAVE_AUTOGEN = @HAVE_AUTOGEN@
|
||||
HAVE_MKOCTFILE = @HAVE_MKOCTFILE@
|
||||
HAVE_OCTAVE = @HAVE_OCTAVE@
|
||||
HAVE_OCTAVE_CONFIG = @HAVE_OCTAVE_CONFIG@
|
||||
HAVE_WINE = @HAVE_WINE@
|
||||
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@
|
||||
MAINT = @MAINT@
|
||||
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@
|
||||
SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
|
||||
SQLITE3_LIBS = @SQLITE3_LIBS@
|
||||
STRIP = @STRIP@
|
||||
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@
|
||||
htmldocdir = @htmldocdir@
|
||||
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@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
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
|
||||
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
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .cc .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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
|
||||
.PRECIOUS: 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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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-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-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:
|
||||
|
||||
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
|
||||
|
||||
|
||||
# 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:
|
|
@ -30,8 +30,6 @@
|
|||
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "sfconfig.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -98,6 +96,8 @@ encode_file (const char *infilename, const char *outfilename, int filetype)
|
|||
k = 16 - strlen (outfilename) ;
|
||||
PUT_DOTS (k) ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
if (! (infile = sf_open (infilename, SFM_READ, &sfinfo)))
|
||||
{ printf ("Error : could not open file : %s\n", infilename) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
|
|
|
@ -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 {}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** Copyright (C) 2001-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
** Copyright (C) 2001-2014 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
|
@ -41,17 +41,10 @@ int
|
|||
main (void)
|
||||
{ SF_FORMAT_INFO info ;
|
||||
SF_INFO sfinfo ;
|
||||
char buffer [128] ;
|
||||
int format, major_count, subtype_count, m, s ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
buffer [0] = 0 ;
|
||||
sf_command (NULL, SFC_GET_LIB_VERSION, buffer, sizeof (buffer)) ;
|
||||
if (strlen (buffer) < 1)
|
||||
{ printf ("Line %d: could not retrieve lib version.\n", __LINE__) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
printf ("Version : %s\n\n", buffer) ;
|
||||
printf ("Version : %s\n\n", sf_version_string ()) ;
|
||||
|
||||
sf_command (NULL, SFC_GET_FORMAT_MAJOR_COUNT, &major_count, sizeof (int)) ;
|
||||
sf_command (NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &subtype_count, sizeof (int)) ;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** Copyright (C) 1999-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
** Copyright (C) 1999-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
|
@ -55,8 +55,8 @@ main (void)
|
|||
int *buffer ;
|
||||
|
||||
if (! (buffer = malloc (2 * SAMPLE_COUNT * sizeof (int))))
|
||||
{ printf ("Malloc failed.\n") ;
|
||||
exit (0) ;
|
||||
{ printf ("Error : Malloc failed.\n") ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
@ -68,6 +68,7 @@ main (void)
|
|||
|
||||
if (! (file = sf_open ("sine.wav", SFM_WRITE, &sfinfo)))
|
||||
{ printf ("Error : Not able to open output file.\n") ;
|
||||
free (buffer) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
|
@ -82,8 +83,10 @@ main (void)
|
|||
} ;
|
||||
}
|
||||
else
|
||||
{ printf ("makesine can only generate mono or stereo files.\n") ;
|
||||
exit (1) ;
|
||||
{ printf ("Error : make_sine can only generate mono or stereo files.\n") ;
|
||||
sf_close (file) ;
|
||||
free (buffer) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
if (sf_write_int (file, buffer, sfinfo.channels * SAMPLE_COUNT) !=
|
||||
|
@ -91,6 +94,7 @@ main (void)
|
|||
puts (sf_strerror (file)) ;
|
||||
|
||||
sf_close (file) ;
|
||||
return 0 ;
|
||||
free (buffer) ;
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** Copyright (C) 2001-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
** Copyright (C) 2001-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
|
@ -7,15 +7,15 @@
|
|||
** 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.
|
||||
** * 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
|
||||
|
@ -31,12 +31,13 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Include this header file to use functions from libsndfile. */
|
||||
#include <sndfile.h>
|
||||
|
||||
/* This will be the length of the buffer used to hold.frames while
|
||||
** we process them.
|
||||
/* This will be the length of the buffer used to hold.frames while
|
||||
** we process them.
|
||||
*/
|
||||
#define BUFFER_LEN 1024
|
||||
|
||||
|
@ -49,31 +50,35 @@ static void process_data (double *data, int count, int channels) ;
|
|||
|
||||
int
|
||||
main (void)
|
||||
{ /* This is a buffer of double precision floating point values
|
||||
** which will hold our data while we process it.
|
||||
*/
|
||||
static double data [BUFFER_LEN] ;
|
||||
{ /* This is a buffer of double precision floating point values
|
||||
** which will hold our data while we process it.
|
||||
*/
|
||||
static double data [BUFFER_LEN] ;
|
||||
|
||||
/* A SNDFILE is very much like a FILE in the Standard C library. The
|
||||
** sf_open function return an SNDFILE* pointer when they sucessfully
|
||||
/* A SNDFILE is very much like a FILE in the Standard C library. The
|
||||
** sf_open function return an SNDFILE* pointer when they sucessfully
|
||||
** open the specified file.
|
||||
*/
|
||||
SNDFILE *infile, *outfile ;
|
||||
*/
|
||||
SNDFILE *infile, *outfile ;
|
||||
|
||||
/* A pointer to an SF_INFO stutct is passed to sf_open.
|
||||
** On read, the library fills this struct with information about the file.
|
||||
** On write, the struct must be filled in before calling sf_open.
|
||||
*/
|
||||
SF_INFO sfinfo ;
|
||||
int readcount ;
|
||||
const char *infilename = "input.wav" ;
|
||||
const char *outfilename = "output.wav" ;
|
||||
/* A pointer to an SF_INFO struct is passed to sf_open.
|
||||
** On read, the library fills this struct with information about the file.
|
||||
** On write, the struct must be filled in before calling sf_open.
|
||||
*/
|
||||
SF_INFO sfinfo ;
|
||||
int readcount ;
|
||||
const char *infilename = "input.wav" ;
|
||||
const char *outfilename = "output.wav" ;
|
||||
|
||||
/* Here's where we open the input file. We pass sf_open the file name and
|
||||
** a pointer to an SF_INFO struct.
|
||||
** On successful open, sf_open returns a SNDFILE* pointer which is used
|
||||
** for all subsequent operations on that file.
|
||||
** If an error occurs during sf_open, the function returns a NULL pointer.
|
||||
/* The SF_INFO struct must be initialized before using it.
|
||||
*/
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
/* Here's where we open the input file. We pass sf_open the file name and
|
||||
** a pointer to an SF_INFO struct.
|
||||
** On successful open, sf_open returns a SNDFILE* pointer which is used
|
||||
** for all subsequent operations on that file.
|
||||
** If an error occurs during sf_open, the function returns a NULL pointer.
|
||||
**
|
||||
** If you are trying to open a raw headerless file you will need to set the
|
||||
** format and channels fields of sfinfo before calling sf_open(). For
|
||||
|
@ -82,56 +87,56 @@ main (void)
|
|||
**
|
||||
** sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_16 ;
|
||||
** sfinfo.channels = 2 ;
|
||||
*/
|
||||
if (! (infile = sf_open (infilename, SFM_READ, &sfinfo)))
|
||||
{ /* Open failed so print an error message. */
|
||||
printf ("Not able to open input file %s.\n", infilename) ;
|
||||
/* Print the error message from libsndfile. */
|
||||
puts (sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
*/
|
||||
if (! (infile = sf_open (infilename, SFM_READ, &sfinfo)))
|
||||
{ /* Open failed so print an error message. */
|
||||
printf ("Not able to open input file %s.\n", infilename) ;
|
||||
/* Print the error message from libsndfile. */
|
||||
puts (sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
if (sfinfo.channels > MAX_CHANNELS)
|
||||
{ printf ("Not able to process more than %d channels\n", MAX_CHANNELS) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
/* Open the output file. */
|
||||
if (! (outfile = sf_open (outfilename, SFM_WRITE, &sfinfo)))
|
||||
{ printf ("Not able to open output file %s.\n", outfilename) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
if (sfinfo.channels > MAX_CHANNELS)
|
||||
{ printf ("Not able to process more than %d channels\n", MAX_CHANNELS) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
/* Open the output file. */
|
||||
if (! (outfile = sf_open (outfilename, SFM_WRITE, &sfinfo)))
|
||||
{ printf ("Not able to open output file %s.\n", outfilename) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
/* While there are.frames in the input file, read them, process
|
||||
** them and write them to the output file.
|
||||
*/
|
||||
while ((readcount = sf_read_double (infile, data, BUFFER_LEN)))
|
||||
{ process_data (data, readcount, sfinfo.channels) ;
|
||||
sf_write_double (outfile, data, readcount) ;
|
||||
} ;
|
||||
/* While there are.frames in the input file, read them, process
|
||||
** them and write them to the output file.
|
||||
*/
|
||||
while ((readcount = sf_read_double (infile, data, BUFFER_LEN)))
|
||||
{ process_data (data, readcount, sfinfo.channels) ;
|
||||
sf_write_double (outfile, data, readcount) ;
|
||||
} ;
|
||||
|
||||
/* Close input and output files. */
|
||||
sf_close (infile) ;
|
||||
sf_close (outfile) ;
|
||||
/* Close input and output files. */
|
||||
sf_close (infile) ;
|
||||
sf_close (outfile) ;
|
||||
|
||||
return 0 ;
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
||||
static void
|
||||
process_data (double *data, int count, int channels)
|
||||
{ double channel_gain [MAX_CHANNELS] = { 0.5, 0.8, 0.1, 0.4, 0.4, 0.9 } ;
|
||||
int k, chan ;
|
||||
int k, chan ;
|
||||
|
||||
/* Process the data here.
|
||||
** If the soundfile contains more then 1 channel you need to take care of
|
||||
** the data interleaving youself.
|
||||
** Current we just apply a channel dependant gain.
|
||||
*/
|
||||
/* Process the data here.
|
||||
** If the soundfile contains more then 1 channel you need to take care of
|
||||
** the data interleaving youself.
|
||||
** Current we just apply a channel dependant gain.
|
||||
*/
|
||||
|
||||
for (chan = 0 ; chan < channels ; chan ++)
|
||||
for (k = chan ; k < count ; k+= channels)
|
||||
data [k] *= channel_gain [chan] ;
|
||||
for (chan = 0 ; chan < channels ; chan ++)
|
||||
for (k = chan ; k < count ; k+= channels)
|
||||
data [k] *= channel_gain [chan] ;
|
||||
|
||||
return ;
|
||||
return ;
|
||||
} /* process_data */
|
||||
|
||||
|
|
|
@ -0,0 +1,180 @@
|
|||
/*
|
||||
** Copyright (C) 1999-2015 Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
**
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the author nor the names of any contributors may be used
|
||||
** to endorse or promote products derived from this software without
|
||||
** specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
** A quick/rough hack to add SF_INSTRUMENT data to a file. It compiles, but
|
||||
** no guarantees beyond that. Happy to receive patches to fix/improve it.
|
||||
**
|
||||
** Code for this was stolen from programs/sndfile-convert.c and related code.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <sndfile.h>
|
||||
|
||||
#define BUFFER_LEN (1 << 14)
|
||||
|
||||
|
||||
typedef struct
|
||||
{ char *infilename, *outfilename ;
|
||||
SF_INFO infileinfo, outfileinfo ;
|
||||
} OptionData ;
|
||||
|
||||
const char * program_name (const char * argv0) ;
|
||||
static void sfe_copy_data_int (SNDFILE *outfile, SNDFILE *infile, int channels) ;
|
||||
static void add_instrument_data (SNDFILE *outfile, const SF_INFO * in_info) ;
|
||||
|
||||
static void
|
||||
usage_exit (const char *progname)
|
||||
{
|
||||
printf ("\nUsage : %s <input file> <output file>\n", progname) ;
|
||||
puts ("") ;
|
||||
exit (1) ;
|
||||
} /* usage_exit */
|
||||
|
||||
int
|
||||
main (int argc, char * argv [])
|
||||
{ const char *progname, *infilename, *outfilename ;
|
||||
SNDFILE *infile = NULL, *outfile = NULL ;
|
||||
SF_INFO in_sfinfo, out_sfinfo ;
|
||||
|
||||
progname = program_name (argv [0]) ;
|
||||
|
||||
if (argc < 3 || argc > 5)
|
||||
usage_exit (progname) ;
|
||||
|
||||
infilename = argv [argc-2] ;
|
||||
outfilename = argv [argc-1] ;
|
||||
|
||||
if (strcmp (infilename, outfilename) == 0)
|
||||
{ printf ("Error : Input and output filenames are the same.\n\n") ;
|
||||
usage_exit (progname) ;
|
||||
} ;
|
||||
|
||||
if (strlen (infilename) > 1 && infilename [0] == '-')
|
||||
{ printf ("Error : Input filename (%s) looks like an option.\n\n", infilename) ;
|
||||
usage_exit (progname) ;
|
||||
} ;
|
||||
|
||||
if (outfilename [0] == '-')
|
||||
{ printf ("Error : Output filename (%s) looks like an option.\n\n", outfilename) ;
|
||||
usage_exit (progname) ;
|
||||
} ;
|
||||
|
||||
memset (&in_sfinfo, 0, sizeof (in_sfinfo)) ;
|
||||
|
||||
if ((infile = sf_open (infilename, SFM_READ, &in_sfinfo)) == NULL)
|
||||
{ printf ("Not able to open input file %s.\n", infilename) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
memcpy (&out_sfinfo, &in_sfinfo, sizeof (out_sfinfo)) ;
|
||||
/* Open the output file. */
|
||||
if ((outfile = sf_open (outfilename, SFM_WRITE, &out_sfinfo)) == NULL)
|
||||
{ printf ("Not able to open output file %s : %s\n", outfilename, sf_strerror (NULL)) ;
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
/* Add the loop data */
|
||||
add_instrument_data (outfile, &in_sfinfo) ;
|
||||
|
||||
/* Copy the audio data */
|
||||
sfe_copy_data_int (outfile, infile, in_sfinfo.channels) ;
|
||||
|
||||
sf_close (infile) ;
|
||||
sf_close (outfile) ;
|
||||
|
||||
return 0 ;
|
||||
} /* main */
|
||||
|
||||
const char *
|
||||
program_name (const char * argv0)
|
||||
{ const char * tmp ;
|
||||
|
||||
tmp = strrchr (argv0, '/') ;
|
||||
argv0 = tmp ? tmp + 1 : argv0 ;
|
||||
|
||||
/* Remove leading libtool name mangling. */
|
||||
if (strstr (argv0, "lt-") == argv0)
|
||||
return argv0 + 3 ;
|
||||
|
||||
return argv0 ;
|
||||
} /* program_name */
|
||||
|
||||
static void
|
||||
sfe_copy_data_int (SNDFILE *outfile, SNDFILE *infile, int channels)
|
||||
{ static int data [BUFFER_LEN] ;
|
||||
int frames, readcount ;
|
||||
|
||||
frames = BUFFER_LEN / channels ;
|
||||
readcount = frames ;
|
||||
|
||||
while (readcount > 0)
|
||||
{ readcount = sf_readf_int (infile, data, frames) ;
|
||||
sf_writef_int (outfile, data, readcount) ;
|
||||
} ;
|
||||
|
||||
return ;
|
||||
} /* sfe_copy_data_int */
|
||||
|
||||
static void
|
||||
add_instrument_data (SNDFILE *file, const SF_INFO *info)
|
||||
{ SF_INSTRUMENT instr ;
|
||||
|
||||
memset (&instr, 0, sizeof (instr)) ;
|
||||
|
||||
instr.gain = 1 ;
|
||||
instr.basenote = 0 ;
|
||||
instr.detune = 0 ;
|
||||
instr.velocity_lo = 0 ;
|
||||
instr.velocity_hi = 0 ;
|
||||
instr.key_lo = 0 ;
|
||||
instr.key_hi = 0 ;
|
||||
instr.loop_count = 1 ;
|
||||
|
||||
instr.loops [0].mode = SF_LOOP_FORWARD ;
|
||||
instr.loops [0].start = 0 ;
|
||||
instr.loops [0].end = info->frames ;
|
||||
instr.loops [0].count = 0 ;
|
||||
|
||||
if (sf_command (file, SFC_SET_INSTRUMENT, &instr, sizeof (instr)) == SF_FALSE)
|
||||
{ printf ("\n\nLine %d : sf_command (SFC_SET_INSTRUMENT) failed.\n\n", __LINE__) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
return ;
|
||||
} /* add_instrument_data */
|
||||
|
|
@ -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>
|
||||
**
|
||||
** All rights reserved.
|
||||
**
|
||||
|
@ -34,14 +34,25 @@
|
|||
#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") ;
|
||||
} ;
|
||||
} ;
|
||||
|
@ -68,16 +85,27 @@ convert_to_text (SNDFILE * infile, FILE * outfile, int channels)
|
|||
int
|
||||
main (int argc, char * argv [])
|
||||
{ char *progname, *infilename, *outfilename ;
|
||||
SNDFILE *infile = NULL ;
|
||||
SNDFILE *infile = NULL ;
|
||||
FILE *outfile = NULL ;
|
||||
SF_INFO sfinfo ;
|
||||
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] ;
|
||||
|
@ -101,6 +129,8 @@ main (int argc, char * argv [])
|
|||
return 1 ;
|
||||
} ;
|
||||
|
||||
memset (&sfinfo, 0, sizeof (sfinfo)) ;
|
||||
|
||||
if ((infile = sf_open (infilename, SFM_READ, &sfinfo)) == NULL)
|
||||
{ printf ("Not able to open input file %s.\n", infilename) ;
|
||||
puts (sf_strerror (NULL)) ;
|
||||
|
@ -116,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) ;
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
From 41da64d9270b2fa10c93ce74dea014fe8f0bd303 Mon Sep 17 00:00:00 2001
|
||||
From: Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
Date: Sat, 5 Nov 2011 09:49:14 +1100
|
||||
Subject: [PATCH] src/id3.c : Fix a stack overflow when parsing a file with multiple ID3 headers.
|
||||
|
||||
---
|
||||
ChangeLog | 8 ++++++++
|
||||
src/id3.c | 11 ++++++++---
|
||||
2 files changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ChangeLog b/ChangeLog
|
||||
index 380aa4c..3fe35fc 100644
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -1,3 +1,11 @@
|
||||
+2011-11-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
+
|
||||
+ * src/id3.c
|
||||
+ Fix a stack overflow that can occur when parsing a file with multiple
|
||||
+ ID3 headers which would cause libsndfile to go into an infinite recursion
|
||||
+ until it blew the stack. Thanks to Anders Svensson for supplying an example
|
||||
+ file.
|
||||
+
|
||||
2011-10-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/double64.c src/float32.c src/common.h
|
||||
diff --git a/src/id3.c b/src/id3.c
|
||||
index a1a189e..2fd0a0b 100644
|
||||
--- a/src/id3.c
|
||||
+++ b/src/id3.c
|
||||
@@ -40,11 +40,16 @@ id3_skip (SF_PRIVATE * psf)
|
||||
offset = (offset << 7) | (buf [8] & 0x7f) ;
|
||||
offset = (offset << 7) | (buf [9] & 0x7f) ;
|
||||
|
||||
- psf_binheader_readf (psf, "j", make_size_t (offset)) ;
|
||||
-
|
||||
psf_log_printf (psf, "ID3 length : %d\n--------------------\n", offset) ;
|
||||
|
||||
- psf->fileoffset = 10 + offset ;
|
||||
+ /* Never want to jump backwards in a file. */
|
||||
+ if (offset < 0)
|
||||
+ return 0 ;
|
||||
+
|
||||
+ /* Calculate new file offset and position ourselves there. */
|
||||
+ psf->fileoffset += offset + 10 ;
|
||||
+ psf_binheader_readf (psf, "p", psf->fileoffset) ;
|
||||
+
|
||||
return 1 ;
|
||||
} ;
|
||||
|
||||
--
|
||||
1.7.4.1
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
Index: libsndfile/src/id3.c
|
||||
===================================================================
|
||||
--- libsndfile/src/id3.c (revision 11748)
|
||||
+++ libsndfile/src/id3.c (working copy)
|
||||
@@ -32,7 +32,7 @@
|
||||
{ unsigned char buf [10] ;
|
||||
|
||||
memset (buf, 0, sizeof (buf)) ;
|
||||
- psf_binheader_readf (psf, "pb", 0, buf, 10) ;
|
||||
+ psf_binheader_readf (psf, "pb", (size_t)0, buf, 10) ;
|
||||
|
||||
if (buf [0] == 'I' && buf [1] == 'D' && buf [2] == '3')
|
||||
{ int offset = buf [6] & 0x7f ;
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
/* Calculate new file offset and position ourselves there. */
|
||||
psf->fileoffset += offset + 10 ;
|
||||
- psf_binheader_readf (psf, "p", psf->fileoffset) ;
|
||||
+ psf_binheader_readf (psf, "p", (size_t)psf->fileoffset) ;
|
||||
|
||||
return 1 ;
|
||||
} ;
|
|
@ -1,81 +0,0 @@
|
|||
Index: lib-src/libsndfile/Makefile.am
|
||||
===================================================================
|
||||
--- lib-src/libsndfile/Makefile.am (revision 13510)
|
||||
+++ lib-src/libsndfile/Makefile.am (working copy)
|
||||
@@ -8,7 +8,7 @@
|
||||
octave_dir = Octave
|
||||
endif
|
||||
|
||||
-SUBDIRS = M4 man doc Win32 src $(octave_dir) examples regtest tests programs
|
||||
+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
|
||||
Index: lib-src/libsndfile/Makefile.in
|
||||
===================================================================
|
||||
--- lib-src/libsndfile/Makefile.in (revision 13510)
|
||||
+++ lib-src/libsndfile/Makefile.in (working copy)
|
||||
@@ -412,7 +412,7 @@
|
||||
ACLOCAL_AMFLAGS = -I M4
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
|
||||
@BUILD_OCTAVE_MOD_TRUE@octave_dir = Octave
|
||||
-SUBDIRS = M4 man doc Win32 src $(octave_dir) examples regtest tests programs
|
||||
+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
|
||||
CLEANFILES = *~
|
||||
Index: lib-src/libsndfile/configure
|
||||
===================================================================
|
||||
--- lib-src/libsndfile/configure (revision 13510)
|
||||
+++ lib-src/libsndfile/configure (working copy)
|
||||
@@ -18986,11 +18986,10 @@
|
||||
$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
|
||||
+#if test x"$ac_cv_prog_HAVE_AUTOGEN" = "xno" ; then
|
||||
+# AC_MSG_WARN([[Touching files in directory tests/.]])
|
||||
+# touch tests/*.c tests/*.h
|
||||
+# fi
|
||||
|
||||
#====================================================================================
|
||||
# Settings for the HTML documentation.
|
||||
@@ -22427,5 +22426,5 @@
|
||||
echo
|
||||
fi
|
||||
|
||||
-(cd src && make genfiles)
|
||||
-(cd tests && make genfiles)
|
||||
+#(cd src && make genfiles)
|
||||
+#(cd tests && make genfiles)
|
||||
Index: lib-src/libsndfile/configure.ac
|
||||
===================================================================
|
||||
--- lib-src/libsndfile/configure.ac (revision 13510)
|
||||
+++ lib-src/libsndfile/configure.ac (working copy)
|
||||
@@ -457,10 +457,10 @@
|
||||
AC_MSG_WARN([[******************************************************************]])
|
||||
fi
|
||||
|
||||
-if test x"$ac_cv_prog_HAVE_AUTOGEN" = "xno" ; then
|
||||
- AC_MSG_WARN([[Touching files in directory tests/.]])
|
||||
- touch tests/*.c tests/*.h
|
||||
- fi
|
||||
+#if test x"$ac_cv_prog_HAVE_AUTOGEN" = "xno" ; then
|
||||
+# AC_MSG_WARN([[Touching files in directory tests/.]])
|
||||
+# touch tests/*.c tests/*.h
|
||||
+# fi
|
||||
|
||||
#====================================================================================
|
||||
# Settings for the HTML documentation.
|
||||
@@ -691,5 +691,5 @@
|
||||
echo
|
||||
fi
|
||||
|
||||
-(cd src && make genfiles)
|
||||
-(cd tests && make genfiles)
|
||||
+#(cd src && make genfiles)
|
||||
+#(cd tests && make genfiles)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue