1. Mike Frysinger
  2. gd


Mike Frysinger  committed 5b950c0

add a --with-zlib flag to control -lz usage

  • Participants
  • Parent commits 9c7cc51
  • Branches master

Comments (0)

Files changed (1)

File configure.ac

View file
 dnl zlib is required
-  [LIBS="-lz $LIBS"
-   AC_DEFINE(HAVE_LIBZ, 1, [ Define if you have zlib. ])],
-  [AC_MSG_WARN([zlib is required - see http://www.gzip.org/zlib/])])
+[  --with-zlib=DIR         where to find the zlib library])
+if test "$with_zlib" != no; then
+  AC_CHECK_LIB(z,deflate,
+    [LIBS="-lz $LIBS"
+     AC_DEFINE(HAVE_LIBZ, 1, [Define if you have zlib.])
+     with_zlib=yes],
+    [AC_MSG_WARN([zlib is required - see http://www.gzip.org/zlib/])
+     with_zlib=no])
 dnl libpng is required
 ** Configuration summary for $PACKAGE $VERSION:
+   Support for Zlib:                 $with_zlib
    Support for PNG library:          $with_png
    Support for JPEG library:         $ac_cv_lib_jpeg_jpeg_set_defaults
    Support for VPX library:          $ac_cv_lib_vpx_vpx_codec_destroy