shithub: libsamplerate

Download patch

ref: 73967ed786f5ee5aaa37aa6314dc45c341d79433
parent: ed804732ff7e164114bd0be8f5777edd38a73035
author: Erik de Castro Lopo <erikd@mega-nerd.com>
date: Tue May 13 18:07:57 EDT 2008

configure.ac : Make use of libsndfile optional.

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-13  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
+
+    * configure.ac
+    Make use of libsndfile optional. Patch from Samuli Suominen.
+
 2008-04-26  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
 
     * Win32/libsamplerate-0.def
--- a/configure.ac
+++ b/configure.ac
@@ -132,8 +132,15 @@
 
 #====================================================================================
 # Check for libsndfile which is required for the test and example programs.
+AC_ARG_ENABLE(sndfile,
+	AC_HELP_STRING([--disable-sndfile], [disable support for sndfile (default=autodetect)]),
+	[ enable_sndfile=$enableval ], [ enable_sndfile=yes ])
 
-PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.6, ac_cv_sndfile=1, ac_cv_sndfile=0)
+if test "x$enable_sndfile" = "xyes"; then
+	PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.6, ac_cv_sndfile=1, ac_cv_sndfile=0)
+else
+	ac_cv_sndfile=0
+fi
 
 AC_DEFINE_UNQUOTED([HAVE_SNDFILE],$ac_cv_sndfile,[Set to 1 if you have libsndfile.])