shithub: libsamplerate

Download patch

ref: 3224a2af1158a46e059aec84e88fae48d0dcfd49
parent: 1730b91ccd498b22f740e326d2fbc954b8f92cfe
author: David Seifert <soap@gentoo.org>
date: Sat Jun 10 11:48:00 EDT 2017

Install `sndfile-resample` only if libsndfile is enabled and found

* Installing a non-working executable to show a mere information
  banner is considered bad style and serves to only confuse users.
  See also:
  https://bugs.gentoo.org/show_bug.cgi?id=408849

--- a/configure.ac
+++ b/configure.ac
@@ -180,6 +180,8 @@
 		HAVE_SNDFILE=0
 	])
 
+AM_CONDITIONAL([HAVE_LIBSNDFILE], [test "x$ac_cv_sndfile" = "xyes"])
+
 #====================================================================================
 # Check for ALSA.
 
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,7 +1,9 @@
 # This file was automatically generated
 # DO NOT EDIT!
 
+if HAVE_LIBSNDFILE
 bin_PROGRAMS = sndfile-resample
+endif
 
 check_PROGRAMS = varispeed-play timewarp-file
 
@@ -15,8 +17,10 @@
 
 #===============================================================================
 
+if HAVE_LIBSNDFILE
 sndfile_resample_SOURCES = sndfile-resample.c
 sndfile_resample_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS)
+endif
 
 varispeed_play_SOURCES = varispeed-play.c audio_out.c audio_out.h
 varispeed_play_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS) $(OS_SPECIFIC_LINKS)