summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <Pixel>2002-01-13 15:42:03 +0000
committerPixel <Pixel>2002-01-13 15:42:03 +0000
commit718469e240675b161006ee4f2d5d52de9ad14f2f (patch)
tree4687903664832fda31f6fcdaa68bbff660c64604
parent8db9fd8117d02604d4bbe7a6c943f912f5fc7b03 (diff)
Zlib test & patch.Projets-FAC
-rw-r--r--acconfig.h1
-rw-r--r--configure.in19
-rw-r--r--zconf.h-patch13
3 files changed, 32 insertions, 1 deletions
diff --git a/acconfig.h b/acconfig.h
index d4dba2c..62df7e4 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -1,3 +1,4 @@
+#undef HAVE_WD_ZLIB
#undef HAVE_LIBINTL_H
/* Define to 1 if NLS is requested. */
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
diff --git a/zconf.h-patch b/zconf.h-patch
new file mode 100644
index 0000000..c0c872f
--- /dev/null
+++ b/zconf.h-patch
@@ -0,0 +1,13 @@
+--- zconf.h Wed Jul 8 19:55:27 1998
++++ zconf.h Thu Dec 6 00:55:46 2001
+@@ -228,8 +228,8 @@
+ typedef uLong FAR uLongf;
+
+ #ifdef STDC
+- typedef void FAR *voidpf;
+- typedef void *voidp;
++# define voidpf void FAR *
++# define voidp void *
+ #else
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;