Remove explicit dependency on zlib.
It is unnecessary.
--- configure.orig	2018-03-28 12:28:08.000000000 -0700
+++ configure	2019-02-20 15:37:34.000000000 -0700
@@ -13946,7 +13946,7 @@
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltiff -ljpeg -lz -lm $LIBS"
+LIBS="-ltiff -ljpeg $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -13979,7 +13979,7 @@
 if test "x$ac_cv_lib_tiff_TIFFWriteScanline" = xyes; then :
   ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
 if test "x$ac_cv_header_tiffio_h" = xyes; then :
-  TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz'; tiff_ok=yes
+  TIFF='tiff'; LIBTIFF='-ltiff -ljpeg'; tiff_ok=yes
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** TIFF loader will not be built (TIFF header files not found) ***" >&5
 $as_echo "$as_me: WARNING: *** TIFF loader will not be built (TIFF header files not found) ***" >&2;}
@@ -13993,7 +13993,7 @@
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltiff34 -lz -lm $LIBS"
+LIBS="-ltiff34 $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -14026,7 +14026,7 @@
 if test "x$ac_cv_lib_tiff34_TIFFFlushData" = xyes; then :
   ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
 if test "x$ac_cv_header_tiffio_h" = xyes; then :
-  TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz'; tiff_ok=yes
+  TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg'; tiff_ok=yes
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** TIFF loader will not be built (TIFF header files not found) ***" >&5
 $as_echo "$as_me: WARNING: *** TIFF loader will not be built (TIFF header files not found) ***" >&2;}
@@ -14245,7 +14245,7 @@
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng -lz -lm $LIBS"
+LIBS="-lpng $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -14311,7 +14311,7 @@
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $png_ok" >&5
 $as_echo "$png_ok" >&6; }
         if test "$png_ok" = yes; then
-          PNG='png'; LIBPNG='-lpng -lz'
+          PNG='png'; LIBPNG='-lpng'
         else
           as_fn_error but it is too old. See http://www.libpng.org/pub/png/libpng.html. "*** libpng12 found" "$LINENO" 5
         fi
