From: Paul Eggert Date: Mon, 12 Aug 2013 16:05:58 +0000 (-0700) Subject: Minor zlib configuration tweaks. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~304 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1d238bc75ac833eb28a72f24cc1acd79ec5999d7;p=emacs.git Minor zlib configuration tweaks. * configure.ac (HAVE_ZLIB): Don't assume zlib is linked if PNG is. * src/decompress.c (fn_inflateInit2) [!WINDOWSNT]: Don't assume presence of fn_inflateInit2_ zlib internal function. --- diff --git a/ChangeLog b/ChangeLog index 641cbefce20..f579c5226f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-08-12 Paul Eggert + + Minor zlib configuration tweaks. + * configure.ac (HAVE_ZLIB): Don't assume zlib is linked if PNG is. + 2013-08-12 Eli Zaretskii * configure.ac (LIBZ): Comment on w32 peculiarities regarding LIBZ. diff --git a/configure.ac b/configure.ac index 5daf84be2ba..b6c7dacd997 100644 --- a/configure.ac +++ b/configure.ac @@ -2946,21 +2946,12 @@ AC_SUBST(LIBPNG) HAVE_ZLIB=no LIBZ= if test "${with_zlib}" != "no"; then - if test "${HAVE_PNG}" = "yes"; then - ### PNG depends on zlib, so if we have PNG, we have zlib. - ### Note: w32 does not link against libpng, but instead loads it - ### dynamically, but it also does the same with zlib. So it is OK - ### not to have -lz in LIBZ on w32. - HAVE_ZLIB=yes - else - ### No PNG, so check zlib ourselves. - OLIBS=$LIBS - AC_SEARCH_LIBS([inflateEnd], [z], [HAVE_ZLIB=yes]) - LIBS=$OLIBS - case $ac_cv_search_inflateEnd in - -*) LIBZ=$ac_cv_search_inflateEnd ;; - esac - fi + OLIBS=$LIBS + AC_SEARCH_LIBS([inflateEnd], [z], [HAVE_ZLIB=yes]) + LIBS=$OLIBS + case $ac_cv_search_inflateEnd in + -*) LIBZ=$ac_cv_search_inflateEnd ;; + esac fi if test "${HAVE_ZLIB}" = "yes"; then AC_DEFINE([HAVE_ZLIB], 1, [Define to 1 if you have the zlib library (-lz).]) diff --git a/src/ChangeLog b/src/ChangeLog index 3a8fcfe7e9c..cf851d5bec0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-08-12 Paul Eggert + + Minor zlib configuration tweaks. + * decompress.c (fn_inflateInit2) [!WINDOWSNT]: + Don't assume presence of fn_inflateInit2_ zlib internal function. + 2013-08-12 Lars Magne Ingebrigtsen * decompress.c (Fzlib_decompress_gzipped_region): Rename to diff --git a/src/decompress.c b/src/decompress.c index 3605d446e5a..4e4e3a9c7dc 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -67,17 +67,17 @@ init_zlib_functions (void) return 1; } +#define fn_inflateInit2(strm, windowBits) \ + fn_inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) + #else /* !WINDOWSNT */ -#define fn_inflateInit2_ inflateInit2_ +#define fn_inflateInit2 inflateInit2 #define fn_inflate inflate #define fn_inflateEnd inflateEnd #endif /* WINDOWSNT */ -#define fn_inflateInit2(strm, windowBits) \ - fn_inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) - struct decompress_unwind_data {