summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
1 files changed, 18 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index da4182e..ff5eaec 100644
--- a/configure.in
+++ b/configure.in
@@ -80,7 +80,24 @@ AC_CHECK_FUNCS(getcwd getwd putenv strdup memmove memset select poll)
AC_CHECK_FUNCS(strerror strrchr strstr mempcpy nl_langinfo strcspn)
AC_SEARCH_LIBS(socket,socket)
AC_SEARCH_LIBS(gethostbyname,nsl)
-AC_SEARCH_LIBS(deflate,z)
+AC_SEARCH_LIBS(gzwrite,z)
+if test x$ac_cv_search_deflate != xno ; then
+ AC_CACHE_CHECK([for well defined gzwrite in zlib.h], ac_cv_wd_gzwrite,
+ AC_TRY_COMPILE(
+ [#include <zlib.h>],
+ [const void * buf; gzwrite(NULL, buf, 0);],
+ [AC_DEFINE(HAVE_WD_ZLIB)
+ ac_cv_wd_gzwrite="yes"],
+ [ac_cv_wd_gzwrite="no"]
+ AC_ERROR([You have a broken zconf.h and compiler pair. You]
+ [should patch this using the zconf.h-patch file.])
+ )
+ )
+else
+ AC_ERROR([This library needs the zlib library. You can found]
+ [it at the url: http://www.zlib.org])
+fi
+
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_VPRINTF