diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.in b/configure.in index ff5eaec..15d876b 100644 --- a/configure.in +++ b/configure.in @@ -80,12 +80,14 @@ 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(gzwrite,z) +AC_SEARCH_LIBS(deflate,z) if test x$ac_cv_search_deflate != xno ; then + OLDCPPFLAGS=$CPPFLAGS + CPPFLAGS="-Werror" 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);], + [const char * buf = "Poide"; gzwrite(NULL, buf, 10);], [AC_DEFINE(HAVE_WD_ZLIB) ac_cv_wd_gzwrite="yes"], [ac_cv_wd_gzwrite="no"] @@ -93,8 +95,9 @@ if test x$ac_cv_search_deflate != xno ; then [should patch this using the zconf.h-patch file.]) ) ) + CPPFLAGS=$OLDCPPFLAGS else - AC_ERROR([This library needs the zlib library. You can found] + AC_ERROR([This library needs the zlib library. You can find] [it at the url: http://www.zlib.org]) fi |