fi
AC_ARG_ENABLE(debug,
-[ --enable-debug Turn on debugging],
+AC_HELP_STRING([--enable-debug], [Turn on debugging]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
AM_CONDITIONAL(DEBUG, test "x$debug" = xtrue)
AC_ARG_ENABLE(sse,
-[ --enable-sse Enable SSE support by asserting that the OS supports SSE instructions],
+AC_HELP_STRING([--enable-sse], [Enable SSE support by asserting that the OS supports SSE instructions]),
[case "${enableval}" in
yes) sse_os=true ;;
no) sse_os=false ;;
fi
AC_ARG_ENABLE(3dnow,
-[ --disable-3dnow Disable 3DNOW! optimizations],
+AC_HELP_STRING([--disable-3dnow], [Disable 3DNOW! optimizations]),
[case "${enableval}" in
yes) use_3dnow=true ;;
no) use_3dnow=false ;;
fi
AC_ARG_ENABLE(altivec,
-[ --disable-altivec Disable Altivec optimizations],
+AC_HELP_STRING([--disable-altivec], [Disable Altivec optimizations]),
[case "${enableval}" in
yes) use_altivec=true ;;
no) use_altivec=false ;;
fi
AC_ARG_ENABLE(local-xmms-plugin,
-[ --enable-local-xmms-plugin Install XMMS plugin to ~/.xmms/Plugins instead of system location],
+AC_HELP_STRING([--enable-local-xmms-plugin], [Install XMMS plugin to ~/.xmms/Plugins instead of system location]),
[case "${enableval}" in
yes) install_xmms_plugin_locally=true ;;
no) install_xmms_plugin_locally=false ;;
esac],[install_xmms_plugin_locally=false])
AM_CONDITIONAL(FLaC__INSTALL_XMMS_PLUGIN_LOCALLY, test "x$install_xmms_plugin_locally" = xtrue)
+AC_ARG_ENABLE(thorough-tests,
+AC_HELP_STRING([--disable-thorough-tests], [Disable thorough (long) testing, do only basic tests]),
+[case "${enableval}" in
+ yes) thorough_tests=true ;;
+ no) thorough_tests=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-thorough-tests) ;;
+esac],[thorough_tests=true])
AC_ARG_ENABLE(exhaustive-tests,
-[ --enable-exhaustive-tests Enable exhaustive testing],
+AC_HELP_STRING([--enable-exhaustive-tests], [Enable exhaustive testing (VERY long)]),
[case "${enableval}" in
yes) exhaustive_tests=true ;;
no) exhaustive_tests=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-exhaustive-tests) ;;
esac],[exhaustive_tests=false])
-AM_CONDITIONAL(FLaC__EXHAUSTIVE_TESTS, test "x$exhaustive_tests" = xtrue)
-if test "x$exhaustive_tests" = xtrue ; then
-AC_DEFINE(FLAC__EXHAUSTIVE_TESTS)
-AH_TEMPLATE(FLAC__EXHAUSTIVE_TESTS, [define to run even more tests])
+if test "x$thorough_tests" = xfalse ; then
+FLAC__TEST_LEVEL=0
+elif test "x$exhaustive_tests" = xfalse ; then
+FLAC__TEST_LEVEL=1
+else
+FLAC__TEST_LEVEL=2
fi
+AC_SUBST(FLAC__TEST_LEVEL)
AC_ARG_ENABLE(valgrind-testing,
AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]),
[case "${enableval}" in
- yes) valgrind_testing=true ;;
- no) valgrind_testing=false ;;
+ yes) FLAC__TEST_WITH_VALGRIND=yes ;;
+ no) FLAC__TEST_WITH_VALGRIND=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind-testing) ;;
-esac],[valgrind_testing=false])
-AM_CONDITIONAL(FLaC__VALGRIND_TESTING, test "x$valgrind_testing" = xtrue)
-if test "x$valgrind_testing" = xtrue ; then
-AC_DEFINE(FLAC__VALGRIND_TESTING)
-AH_TEMPLATE(FLAC__VALGRIND_TESTING, [define to enable use of Valgrind in testers])
-fi
+esac],[FLAC__TEST_WITH_VALGRIND=no])
+AC_SUBST(FLAC__TEST_WITH_VALGRIND)
AC_ARG_ENABLE(doxygen-docs,
AC_HELP_STRING([--disable-doxygen-docs], [Disable API documentation building via Doxygen]),
<li>
build system:
<ul>
- <li>Added support for building on OS/2 with EMX (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1229495&group_id=13478&atid=113478">SF #1229495</a>)</li>
- <li>Added <span class="argument">--disable-doxygen-docs</span> to <span class="command">configure</span> for disabling Doxygen-based API doc generation (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1365935&group_id=13478&atid=313478">SF #1365935</a>).</li>
+ <li>Added support for building on OS/2 with EMX (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1229495&group_id=13478&atid=113478">SF #1229495</a>)</li>
+ <li>Added <span class="argument">--disable-doxygen-docs</span> to <span class="command">configure</span> for disabling Doxygen-based API doc generation (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1365935&group_id=13478&atid=313478">SF #1365935</a>).</li>
+ <li>Added <span class="argument">--disable-thorough-tests</span> to <span class="command">configure</span> to do the basic library, stream, and tool tests in a reasonable time (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1077948&group_id=13478&atid=363478">SF #1077948</a>).</li>
<li>Added large file support with <span class="argument">AC_SYS_LARGEFILE</span>; use <span class="argument">--disable-largefile</span> with <span class="command">configure</span> to disable.</li>
</ul>
</li>
# restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution.
-if FLaC__EXHAUSTIVE_TESTS
-FLAC__EXHAUSTIVE_TESTS = yes
-else
-FLAC__EXHAUSTIVE_TESTS = no
-endif
-
-if FLaC__VALGRIND_TESTING
-FLAC__VALGRIND = yes
-else
-FLAC__VALGRIND = no
-endif
-
-TESTS_ENVIRONMENT = FLAC__EXHAUSTIVE_TESTS=$(FLAC__EXHAUSTIVE_TESTS) FLAC__VALGRIND=$(FLAC__VALGRIND)
+TESTS_ENVIRONMENT = FLAC__TEST_LEVEL=@FLAC__TEST_LEVEL@ FLAC__TEST_WITH_VALRGIND=@FLAC__TEST_WITH_VALGRIND@
SUBDIRS = cuesheets
./test_metaflac.sh \
./test_grabbag.sh \
./test_seeking.sh \
- ./test_streams.sh \
- ./test_bins.sh
+ ./test_streams.sh
EXTRA_DIST = \
Makefile.lite \
CONFIG = $(DEFAULT_CONFIG)
all: clean
- $(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libFLAC.sh $(CONFIG)
- $(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libFLAC++.sh $(CONFIG)
- $(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libOggFLAC.sh $(CONFIG)
- $(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libOggFLAC++.sh $(CONFIG)
- $(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_flac.sh $(CONFIG)
- $(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_metaflac.sh $(CONFIG)
- $(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_grabbag.sh $(CONFIG)
- $(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_seeking.sh $(CONFIG)
- $(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_streams.sh $(CONFIG)
- $(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_bins.sh $(CONFIG)
-
-debug : FLAC__EXHAUSTIVE_TESTS=FLAC__EXHAUSTIVE_TESTS=yes
-valgrind: FLAC__EXHAUSTIVE_TESTS=FLAC__EXHAUSTIVE_TESTS=no
-release : FLAC__EXHAUSTIVE_TESTS=FLAC__EXHAUSTIVE_TESTS=yes
-
-debug : FLAC__VALGRIND=FLAC__VALGRIND=no
-valgrind: FLAC__VALGRIND=FLAC__VALGRIND=yes
-release : FLAC__VALGRIND=FLAC__VALGRIND=no
+ $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_libFLAC.sh $(CONFIG)
+ $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_libFLAC++.sh $(CONFIG)
+ $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_libOggFLAC.sh $(CONFIG)
+ $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_libOggFLAC++.sh $(CONFIG)
+ $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_flac.sh $(CONFIG)
+ $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_metaflac.sh $(CONFIG)
+ $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_grabbag.sh $(CONFIG)
+ $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_seeking.sh $(CONFIG)
+ $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_streams.sh $(CONFIG)
+ $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_bins.sh $(CONFIG)
+
+debug : FLAC__TEST_LEVEL=FLAC__TEST_LEVEL=2
+valgrind: FLAC__TEST_LEVEL=FLAC__TEST_LEVEL=1
+release : FLAC__TEST_LEVEL=FLAC__TEST_LEVEL=2
+
+debug : FLAC__TEST_WITH_VALGRIND=FLAC__TEST_WITH_VALGRIND=no
+valgrind: FLAC__TEST_WITH_VALGRIND=FLAC__TEST_WITH_VALGRIND=yes
+release : FLAC__TEST_WITH_VALGRIND=FLAC__TEST_WITH_VALGRIND=no
debug : CONFIG = debug
valgrind: CONFIG = debug
run_flac ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_bins.valgrind.log
else
flac $*
done
done
done
- if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
+ if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
test_file $binfile $channels $bps "-b 16384 -m -r 8 -l 32 -e -p $disable"
fi
done
run_flac ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_flac.valgrind.log
else
flac $*
run_metaflac ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_flac.valgrind.log
else
metaflac $*
run_test_cuesheet ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_cuesheet $* 4>>test_grabbag.valgrind.log
else
test_cuesheet $*
run_test_libFLACpp ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libFLAC++ $* 4>>test_libFLAC++.valgrind.log
else
test_libFLAC++ $*
run_test_libFLAC ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libFLAC $* 4>>test_libFLAC.valgrind.log
else
test_libFLAC $*
run_test_libOggFLACpp ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libOggFLAC++ $* 4>>test_libOggFLAC++.valgrind.log
else
test_libOggFLAC++ $*
run_test_libOggFLAC ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libOggFLAC $* 4>>test_libOggFLAC.valgrind.log
else
test_libOggFLAC $*
run_flac ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_metaflac.valgrind.log
else
flac $*
run_metaflac ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_metaflac.valgrind.log
else
metaflac $*
run_flac ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_seeking.valgrind.log
else
flac $*
run_metaflac ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_seeking.valgrind.log
else
metaflac $*
run_test_seeking ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_seeking $* 4>>test_seeking.valgrind.log
else
test_seeking $*
run_flac ()
{
- if [ x"$FLAC__VALGRIND" = xyes ] ; then
+ if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_streams.valgrind.log
else
flac $*
echo OK
}
-if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
+if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
max_lpc_order=32
else
max_lpc_order=16
echo "Testing option variations..."
for f in 00 01 02 03 04 ; do
for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do
- for opt in 0 1 2 4 5 6 8 ; do
- for extras in '' '-p' '-e' ; do
- test_file sine16-$f 1 16 "-$opt $extras $disable"
+ if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
+ for opt in 0 1 2 4 5 6 8 ; do
+ for extras in '' '-p' '-e' ; do
+ if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
+ test_file sine16-$f 1 16 "-$opt $extras $disable"
+ fi
+ done
done
- done
- if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
- test_file sine16-$f 1 16 "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable"
+ if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
+ test_file sine16-$f 1 16 "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable"
+ fi
fi
done
done
for f in 10 11 12 13 14 15 16 17 18 19 ; do
for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do
- for opt in 0 1 2 4 5 6 8 ; do
- for extras in '' '-p' '-e' ; do
- test_file sine16-$f 2 16 "-$opt $extras $disable"
+ if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
+ for opt in 0 1 2 4 5 6 8 ; do
+ for extras in '' '-p' '-e' ; do
+ if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
+ test_file sine16-$f 2 16 "-$opt $extras $disable"
+ fi
+ done
done
- done
- if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
- test_file sine16-$f 2 16 "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable"
+ if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
+ test_file sine16-$f 2 16 "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable"
+ fi
fi
done
done
echo "Testing noise..."
for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do
- for channels in 1 2 4 8 ; do
- for bps in 8 16 24 ; do
- for opt in 0 1 2 3 4 5 6 7 8 ; do
- for extras in '' '-p' '-e' ; do
- for blocksize in '' '--lax -b 32' '--lax -b 32768' '--lax -b 65535' ; do
- test_file noise $channels $bps "-$opt $extras $blocksize $disable"
+ if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
+ for channels in 1 2 4 8 ; do
+ if [ $channels -le 2 ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
+ for bps in 8 16 24 ; do
+ for opt in 0 1 2 3 4 5 6 7 8 ; do
+ for extras in '' '-p' '-e' ; do
+ if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
+ for blocksize in '' '--lax -b 32' '--lax -b 32768' '--lax -b 65535' ; do
+ if [ -z "$blocksize" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
+ test_file noise $channels $bps "-$opt $extras $blocksize $disable"
+ fi
+ done
+ fi
+ done
done
+ if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
+ test_file noise $channels $bps "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable"
+ fi
done
- done
- if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
- test_file noise $channels $bps "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable"
fi
done
- done
+ fi
done