--- old/make/autoconf/lib-bundled.m4 2017-12-04 11:56:06.456193540 +0100 +++ new/make/autoconf/lib-bundled.m4 2017-12-04 11:56:06.280193538 +0100 @@ -183,6 +183,17 @@ if test "x${ZLIB_FOUND}" = "xyes"; then USE_EXTERNAL_LIBZ=true AC_MSG_RESULT([system]) + + AC_MSG_CHECKING([for system zlib functionality]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include "zlib.h"]], + [[inflateValidate(NULL, 0);]])], + [AC_MSG_RESULT([ok])], + [ + AC_MSG_RESULT([not ok]) + AC_MSG_ERROR([System zlib not working or not up to date (at least version 1.2.9 required)]) + ] + ) else AC_MSG_RESULT([system not found]) AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])