Skip to content
Snippets Groups Projects
Commit 06f7e893 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Added version check of zlib.h.

Rev: src/modules/Gz/configure.in:1.4
parent 12429eab
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,16 @@ sinclude(../module_configure.in) ...@@ -6,6 +6,16 @@ sinclude(../module_configure.in)
if test x$with_zlib = xyes ; then if test x$with_zlib = xyes ; then
AC_CHECK_HEADERS(zlib.h) AC_CHECK_HEADERS(zlib.h)
if test $ac_cv_header_zlib_h = yes ; then
AC_MSG_CHECKING([if libz.h is new enough])
AC_TRY_LINK([
#include <zlib.h>
],[
int main(int argc, char **argv)
{
return((Z_NO_COMPRESSION|Z_VERSION_ERROR) & 0);
}
],[ AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no); ac_cv_header_zlib_h=no ])
if test $ac_cv_header_zlib_h = yes ; then if test $ac_cv_header_zlib_h = yes ; then
AC_CHECK_LIB(z, compress, [ AC_CHECK_LIB(z, compress, [
AC_DEFINE(HAVE_LIBZ) AC_DEFINE(HAVE_LIBZ)
...@@ -14,6 +24,7 @@ if test x$with_zlib = xyes ; then ...@@ -14,6 +24,7 @@ if test x$with_zlib = xyes ; then
AC_CHECK_LIB(gz, compress)) AC_CHECK_LIB(gz, compress))
fi fi
fi fi
fi
AC_OUTPUT(Makefile,echo FOO >stamp-h ) AC_OUTPUT(Makefile,echo FOO >stamp-h )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment