Defend against ancient versions of zlib by checking that zlib.h

defines z_streamp.
This commit is contained in:
Tom Lane 2001-04-23 15:14:58 +00:00
parent a933bceacf
commit 19c97b8579
2 changed files with 249 additions and 267 deletions

509
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -674,8 +674,11 @@ AC_CHECK_LIB(resolv, main)
AC_CHECK_LIB([[unix]], main)
AC_SEARCH_LIBS(crypt, crypt)
AC_CHECK_LIB(bind, __inet_ntoa)
dnl only consider libz to be present if we find <zlib.h> as well
AC_CHECK_HEADER(zlib.h, [
dnl Only consider libz to be present if we find <zlib.h> as well;
dnl furthermore, check that <zlib.h> defines z_streamp (versions before
dnl about 1.0.4 did not). While we could work around the lack of z_streamp,
dnl it seems unwise to encourage people to use such old zlib versions...
AC_EGREP_HEADER(z_streamp, zlib.h, [
AC_CHECK_LIB(z, inflate)
])