ref: 1369ed69529c6e83b67f406bf8f15bf82f0197be
parent: 4e35a1170171ca80a3834fec06731f9fcd0ca90b
author: cbagwell <cbagwell>
date: Sun Jan 28 21:08:56 EST 2007
Cleanups while trying to get --without-sndfile not to cause --without-samplerate to also happen.
--- a/m4/samplerate.m4
+++ b/m4/samplerate.m4
@@ -11,15 +11,11 @@
# Test for libsamplerate, and define SAMPLERATE_CFLAGS and SAMPLERATE_LIBS
AC_DEFUN([SOX_PATH_SAMPLERATE],
[dnl
-have_samplerate="no"
-SAMPLERATE_CFLAGS=""
-SAMPLERATE_LIBS=""
-
# Step 1: Use pkg-config if available
m4_ifdef([PKG_CHECK_MODULES],
[# PKG_CHECK_MODULES available
- PKG_CHECK_MODULES([SAMPLERATE], [samplerate], [$1], [$2])
- have_samplerate="maybe"],
+ PKG_CHECK_MODULES(SAMPLERATE, samplerate, have_samplerate="maybe",
+ have_samplerate="no")],
[# PKG_CHECK_MODULES is unavailable, search for pkg-config program
AC_PATH_PROG([PKGCONFIG], [pkg-config], [none])
if test "$PKGCONFIG" != "none" && `$PKGCONFIG --exists samplerate`
--- a/m4/sndfile.m4
+++ b/m4/sndfile.m4
@@ -11,15 +11,11 @@
# Test for libsndfile, and define SNDFILE_CFLAGS and SNDFILE_LIBS
AC_DEFUN([SOX_PATH_SNDFILE],
[dnl
-have_sndfile="no"
-SNDFILE_CFLAGS=""
-SNDFILE_LIBS=""
-
# Step 1: Use pkg-config if available
m4_ifdef([PKG_CHECK_MODULES],
[# PKG_CHECK_MODULES available
- PKG_CHECK_MODULES([SNDFILE], [sndfile], [$1], [$2])
- have_sndfile="maybe"],
+ PKG_CHECK_MODULES(SNDFILE, sndfile, have_sndfile="maybe",
+ have_sndfile="no")],
[# PKG_CHECK_MODULES is unavailable, search for pkg-config program
AC_PATH_PROG([PKGCONFIG], [pkg-config], [none])
if test "$PKGCONFIG" != "none" && `$PKGCONFIG --exists sndfile`
--- a/src/handlers.c
+++ b/src/handlers.c
@@ -52,9 +52,6 @@
st_sl_format_fn,
st_smp_format_fn,
st_snd_format_fn,
-#ifdef HAVE_SNDFILE_H
- st_sndfile_format_fn,
-#endif
st_sphere_format_fn,
#ifdef HAVE_SUN_AUDIO
st_sun_format_fn,
@@ -75,6 +72,11 @@
st_wav_format_fn,
st_wve_format_fn,
st_xa_format_fn,
+ /* Prefer internal formats over libsndfile. Can be overridden
+ * by using -t sndfile. */
+#ifdef HAVE_SNDFILE_H
+ st_sndfile_format_fn,
+#endif
NULL
};