From 9906b3f3f22649481dc60d3bcefedea5440225b3 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 6 Jan 2012 18:50:38 -0800 Subject: [PATCH] configure.ac: add --enable-sndfile --- configure.ac | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 052bfd60..1df71e4e 100644 --- a/configure.ac +++ b/configure.ac @@ -153,9 +153,15 @@ if test "$ac_cv_varargs_macros" = "yes"; then [Defined when c99 style varargs macros are supported]) fi -PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.4, HAVE_SNDFILE=1) -if test "${HAVE_SNDFILE}" = "1"; then - AC_DEFINE(HAVE_SNDFILE,1,[Define to enable libsndfile support]) +AC_ARG_ENABLE(sndfile, + AC_HELP_STRING([--enable-sndfile],[compile with sndfile [[default=auto]]]), + [with_sndfile=$enableval], + with_sndfile="yes") +if test "$with_sndfile" = "yes"; then + PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.4, HAVE_SNDFILE=1, HAVE_SNDFILE=0) + if test "${HAVE_SNDFILE}" = "1"; then + AC_DEFINE(HAVE_SNDFILE,1,[Define to enable libsndfile support]) + fi fi dnl Enable samplerate support (auto) -- 2.26.2