+# This check is incomplete. mingw32's zlib is found but the build fails.
+AC_ARG_ENABLE(zlib,
+[ --enable-zlib Use an external zlib library to allow decompressing
+ data on the fly.],
+[enableval2=$enableval],
+[enableval2=no])
+if test $enableval2 = yes; then
+ AC_CHECK_LIB(z, zlibVersion, , [
+ AC_MSG_ERROR([Unable to find a copy of zlib. The zlib library
+is necessary to enable compresion support. ])
+ ])
+ AC_DEFINE(FEATURE_ZLIB,1,
+ [ Define to 1 to use compression through the zlib library. ])
+fi
+
+