nginx build against zlib-1.2.4 fails

Maxim Dounin mdounin at mdounin.ru
Mon Mar 22 18:12:03 MSK 2010


Hello!

On Sun, Mar 21, 2010 at 09:02:03PM +0530, Vinay Y S wrote:

> zlib-1.2.4 has been released recently and it's default Makefile has changed.
> It now only contains distclean target and no target named 'clean' before
> ./configure is run. Hence, nginx source build against zlib-1.2.4 fails.
> Please fix this in the next release.

Patch.

Maxim Dounin
-------------- next part --------------
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1269270496 -10800
# Node ID 6a72c21f59aad403db620ac364a31ef71c44278a
# Parent  dd7104f21940d9026698b6db4a52622f49745caa
Fix --with-zlib used with zlib 1.2.4.

New zlib 1.2.4 has no Makefile out of the box.  Only stub present with the
target "distclean".  Use it instead of "clean" as it does what we need and
compatible with old versions.

Test with all zlib versions currently available on official site: 1.1.3,
1.1.4, 1.2.1, 1.2.2, 1.2.3, 1.2.4.

diff --git a/auto/lib/zlib/make b/auto/lib/zlib/make
--- a/auto/lib/zlib/make
+++ b/auto/lib/zlib/make
@@ -53,7 +53,7 @@ END
 
 $ZLIB/libz.a:	$NGX_MAKEFILE
 	cd $ZLIB \\
-	&& \$(MAKE) clean \\
+	&& \$(MAKE) distclean \\
 	&& cp contrib/asm586/match.S . \\
 	&& CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\
 		./configure \\
@@ -70,7 +70,7 @@ END
 
 $ZLIB/libz.a:	$NGX_MAKEFILE
 	cd $ZLIB \\
-	&& \$(MAKE) clean \\
+	&& \$(MAKE) distclean \\
 	&& cp contrib/asm686/match.S . \\
 	&& CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\
 		./configure \\
@@ -103,7 +103,7 @@ if [ $done = NO ]; then
 
 $ZLIB/libz.a:	$NGX_MAKEFILE
 	cd $ZLIB \\
-	&& \$(MAKE) clean \\
+	&& \$(MAKE) distclean \\
 	&& CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
 		./configure \\
 	&& \$(MAKE) libz.a


More information about the nginx mailing list