shithub: sox

Download patch

ref: fb92431481665504f559f1c4308b4c28339db499
parent: 70c85915eace83142b84e4f65f5db421cf0c09e3
author: Mans Rullgard <mans@mansr.com>
date: Sun Aug 9 20:30:54 EDT 2020

build: add PNG_LIBS conditionally

For consistency with other optional libraries, add PNG_LIBS only
if libpng is actually used.

--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -73,9 +73,13 @@
     libsox_la_SOURCES += spectrogram.c
 endif
 
+libsox_la_LIBADD =
+
 # Libraries required by libsox for file handlers, effects, or utils;
 # regardless if libltdl is used or not.
-libsox_la_LIBADD = @PNG_LIBS@
+if HAVE_PNG
+libsox_la_LIBADD += @PNG_LIBS@
+endif
 if HAVE_MAGIC
 libsox_la_LIBADD += @MAGIC_LIBS@
 endif