From 27e8b99287ea2aa76c1ba5de3316cee5ef937b78 Mon Sep 17 00:00:00 2001 From: Cosmin Truta Date: Wed, 10 Apr 2019 22:23:25 -0400 Subject: [PATCH] pngminus: Use the system zlib by default If a zlib source tree exists besides the libpng source tree in the same parent directory, the pngminus build may fail, unless the zlib tree is built fully. In order to avoid this failing scenario, do not use the custom-built zlib by default. (The custom-built zlib is still necessary on platforms that lack a system-built zlib.) --- contrib/pngminus/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contrib/pngminus/Makefile b/contrib/pngminus/Makefile index 7eb503a2b..4bba07961 100644 --- a/contrib/pngminus/Makefile +++ b/contrib/pngminus/Makefile @@ -11,9 +11,14 @@ PNGINC = -I../.. PNGLIB_SHARED = -L../.. -lpng PNGLIB_STATIC = ../../libpng.a -ZINC = -I../../../zlib -ZLIB_SHARED = -L../../../zlib -lz -ZLIB_STATIC = ../../../zlib/libz.a +# Uncomment the following if you have a custom zlib build at ../../../zlib +#ZINC = -I../../../zlib +#ZLIB_SHARED = -L../../../zlib -lz +#ZLIB_STATIC = ../../../zlib/libz.a + +# Use the system zlib otherwise +ZLIB_SHARED = -lz +ZLIB_STATIC = -lz CPPFLAGS = $(PNGINC) $(ZINC) CFLAGS =