The source archive already has the appropriate cygwin patch applied.
To remove and revert to a 'clean' zlib-1.1.3:
  mv <zlibtop>/CYGWIN-PATCHES/zlib-1.1.3-X.patch <zlibtop>/..
  cd <zlibtop>
  patch -p1 -R < ../zlib-1.1.3-X.patch

------------------

Requirements:
  gcc-2.95.2-7 or later
       this was released around Jan 31, 2001.  The '-mno-win32'
       switch was inverted to '-mwin32' at that time.
  binutils-20001221-1 or later 
       this was released on Dec 21, 2000. 

Direct Dependencies:
  none
	
Canonical Homepage:
http://www.info-zip.org/pub/infozip/zlib

Canonical Download:
ftp://ftp.info-zip.org/pub/infozip/zlib/zlib-1.1.3.tar.gz

------------------

To link this library with your projects:
  #1) include zlib.h and zconf.h
  #2) to link with the static library, use '-static' on the link line and
      use '-DZLIB_STATIC' when compiling your .c into a .o
      Note that the official cygwin port of ZLIB recognizes '-DALL_STATIC'
      as a synonym for -DZLIB_STATIC, so you can use that -Ddefine 
      instead.
  #3) to link with the dll compile and link as usual; no special flags
      or -Ddefines are necessary

See the makefile and inspect how minigzip.exe, example.exe (dll) and 
minigzip-stat.exe, example-stat.exe (static) are compiled and linked.

------------------

To build the library for cygwin: 

unpack zlib-1.1.3-X-src.tar.gz
cd zlib-1.1.3
./configure --prefix=/usr
make
make test
make install

This will build both a static lib and a dll with an import library.
It will also build and run the tests using both versions of the
library, so you will see two identical outputs when running 'make test'

------------------

Files included in the binary distro

<prefix>/bin/cygz.dll
<prefix>/lib/libz.a
<prefix>/lib/libz.dll.a
<prefix>/include/zlib.h
<prefix>/include/zconf.h
<prefix>/man/man3/zlib.3
<prefix>/doc/Cygwin/zlib-1.1.3.README (this file)
<prefix>/doc/zlib-1.1.3/README (the normal zlib README)
<prefix>/doc/zlib-1.1.3/FAQ    (the normal zlib FAQ)

------------------

Port Notes:

1.1.3-6: Added -DALL_STATIC synonym for -DZLIB_STATIC

As of 1.1.3-5, the dll is named "cygz.dll" NOT "libz.dll".  This 
  helps to avoid dll naming conflicts between cygwin dll's and 
  dlls from other platforms (native, pw, etc).  If you have an
  executable that depends on "libz.dll" you may either recompile 
  your app so that it links with libz.dll.a/cygz.dll, or install
  *just* the dll from zlib-1.1.3-4.tar.gz into your /usr/bin 
  directory.

The dll is NOT versioned. (i.e. "cygz.dll" NOT "cygz1.dll") because
  the libz package and interface is quite stable, and its interface
  is not anticipated to change in the foreseeable future.

OS_TYPE is unix (0x03) not Win9x/NT (0x0b)

All #ifdef (WIN32) statements are guarded with '&& !(__CYGWIN__)' or 
  expanded with '|| (__CYGWIN__)' as appropriate. So, the cygwin 
  version should work whether 'WIN32' is defined or not (e.g.
  whether '-mwin32' is used or not)

Binary package does NOT include the 586 or 686 optimized assembler
  code. See Makefile.in for instructions on how to enable 
  assembler optimizations.

Most of the patches in zlib-1.1.3-X.patch have been submitted to 
  zlib. Since Jean-loup Gailly seems to be MIA, the other maintainer
  of zlib, Greg Roelofs, has placed a cygwin patch in the 'contrib'
  directory of the ftp site: 
    ftp://ftp.info-zip.org/pub/infozip/zlib/contrib
  The patch in that contrib directory contains most of the important
  parts of this patch. However, until an official zlib-1.1.4 is
  released with those changes included, cygwin-zlib will be 
  distributed with a patch against a 'clean' zlib-1.1.3 and thus 
  will duplicate the changes in the patches Greg has accepted.

Cygwin port maintained by: Charles Wilson cwilson@ece.gatech.edu
