shithub: libsamplerate

Download patch

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

Use $(...) instead of @...@ for precious variables

* AC_SUBST creates the variable assignment transparently:

    var = @var@

  hence there is no need to directly include @var@-style
  replacements, which cannot be overridden when running Make.

--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -8,23 +8,19 @@
 check_PROGRAMS = varispeed-play timewarp-file
 
 SAMPLERATEDIR =../src
-AM_CPPFLAGS = -I$(srcdir)/$(SAMPLERATEDIR) @OS_SPECIFIC_INCLUDES@
+AM_CPPFLAGS = -I$(srcdir)/$(SAMPLERATEDIR) $(OS_SPECIFIC_INCLUDES)
+AM_CFLAGS = $(SNDFILE_CFLAGS)
 
-OS_SPECIFIC_LINKS = @OS_SPECIFIC_LINKS@
-
-SNDFILE_LIBS = @SNDFILE_LIBS@ @ALSA_LIBS@
-AM_CFLAGS = @SNDFILE_CFLAGS@
-
 #===============================================================================
 
 if HAVE_LIBSNDFILE
 sndfile_resample_SOURCES = sndfile-resample.c
-sndfile_resample_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS)
+sndfile_resample_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS) $(ALSA_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)
+varispeed_play_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS) $(ALSA_LIBS) $(OS_SPECIFIC_LINKS)
 
 timewarp_file_SOURCES = timewarp-file.c
-timewarp_file_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS)
+timewarp_file_LDADD = $(SAMPLERATEDIR)/libsamplerate.la $(SNDFILE_LIBS) $(ALSA_LIBS)
 
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,7 +15,7 @@
 SRC_SOURCES = samplerate.c src_sinc.c $(COEFF_HDRS) src_zoh.c src_linear.c
 
 # MinGW requires -no-undefined if a DLL is to be built.
-libsamplerate_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@ @SHLIB_VERSION_ARG@
+libsamplerate_la_LDFLAGS = -no-undefined -version-info $(SHARED_VERSION_INFO) $(SHLIB_VERSION_ARG)
 libsamplerate_la_SOURCES = $(SRC_SOURCES) $(noinst_HEADERS)
 libsamplerate_la_LIBADD  = -lm
 
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -39,15 +39,15 @@
 reset_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
 
 multi_channel_test_SOURCES = multi_channel_test.c util.c calc_snr.c
-multi_channel_test_CFLAGS = @FFTW3_CFLAGS@
+multi_channel_test_CFLAGS = $(FFTW3_CFLAGS)
 multi_channel_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
 
 snr_bw_test_SOURCES = snr_bw_test.c calc_snr.c util.c util.h
-snr_bw_test_CFLAGS = @FFTW3_CFLAGS@
+snr_bw_test_CFLAGS = $(FFTW3_CFLAGS)
 snr_bw_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
 
 callback_test_SOURCES = callback_test.c util.c util.h
-callback_test_CFLAGS = @FFTW3_CFLAGS@
+callback_test_CFLAGS = $(FFTW3_CFLAGS)
 callback_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
 
 float_short_test_SOURCES = float_short_test.c util.c util.h
@@ -57,19 +57,19 @@
 downsample_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la
 
 varispeed_test_SOURCES = varispeed_test.c util.c util.h calc_snr.c
-varispeed_test_CFLAGS = @FFTW3_CFLAGS@
+varispeed_test_CFLAGS = $(FFTW3_CFLAGS)
 varispeed_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
 
 # This program is for evaluating other sample rate converters.
 
-throughput_test_CFLAGS = $(AM_CFLAGS) @FFTW3_CFLAGS@
+throughput_test_CFLAGS = $(AM_CFLAGS) $(FFTW3_CFLAGS)
 throughput_test_SOURCES = throughput_test.c  util.c calc_snr.c
 throughput_test_LDADD  = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
 
-multichan_throughput_test_CFLAGS = $(AM_CFLAGS) @FFTW3_CFLAGS@
+multichan_throughput_test_CFLAGS = $(AM_CFLAGS) $(FFTW3_CFLAGS)
 multichan_throughput_test_SOURCES = multichan_throughput_test.c  util.c calc_snr.c
 multichan_throughput_test_LDADD  = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS)
 
 src_evaluate_SOURCES = src-evaluate.c calc_snr.c util.c
-src_evaluate_CFLAGS = @SNDFILE_CFLAGS@ @FFTW3_CFLAGS@
+src_evaluate_CFLAGS = $(SNDFILE_CFLAGS) $(FFTW3_CFLAGS)
 src_evaluate_LDADD = $(SNDFILE_LIBS) $(FFTW3_LIBS)