Make flac dependency optional by providing a --without-flac option, as requested in bug #114228. Index: libsndfile-1.0.12/configure.ac =================================================================== --- libsndfile-1.0.12.orig/configure.ac +++ libsndfile-1.0.12/configure.ac @@ -322,15 +322,19 @@ if test x$ac_cv_header_alsa_asoundlib_h #==================================================================================== # Check for FLAC -FLAC_LIBS="" -AC_CHECK_HEADERS(FLAC/all.h) -if test x$ac_cv_header_FLAC_all_h = xyes ; then +AC_ARG_WITH([flac], AC_HELP_STRING([--without-flac], [Disable FLAC support (default: check)])) + +if test "x$with_flac" != "xno"; then + FLAC_LIBS="" + AC_CHECK_HEADERS(FLAC/all.h) + if test x$ac_cv_header_FLAC_all_h = xyes ; then AC_CHECK_LIB(FLAC, FLAC__seekable_stream_encoder_set_tell_callback, HAVE_FLAC_1_1_1="yes") if test "x$HAVE_FLAC_1_1_1" = xyes ; then AC_DEFINE(HAVE_FLAC_1_1_1, [1], [Define to 1 if you have libflac 1.1.1]) fi FLAC_LIBS="-lFLAC" fi +fi #==================================================================================== # Test for sanity when cross-compiling.