The source archive already has the appropriate cygwin patch applied.
To remove and revert to a 'clean' libpng-1.0.11
  mv <libpngtop>/CYGWIN-PATCHES/libpng-1.0.11-X.patch <libpngtop>/..
  cd <libpngtop>
  patch -p1 -R < ../libpng-1.0.11-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:
  zlib-1.1.3-6
	
Canonical Homepage:
ftp://ftp.freesoftware.com/pub/png/libpng.html

Canonical Download:
ftp://ftp.freesoftware.com/pub/png/
ftp://swrinde.nde.swri.edu/pub/png-group/src/

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

To build for cygwin: 

unpack libpng-1.0.11-X-src.tar.gz
cd libpng-1.0.11
cp scripts/makefile.cygwin Makefile
make
make test
make install prefix=/usr

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'

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

To link this library with your projects:
  #1) include png.h and pngconf.h
  #2) to link with the static library, use '-static' on the link line and
      use '-DPNG_STATIC -DZLIB_STATIC' when compiling your .c into a .o
      The -DZLIB_STATIC is necessary even if you don't use libz yourself, 
      since libpng depends on libz. You do not need to include the zlib 
      headers in your project unless you use libz explicitly.
      Note that the official cygwin ports of both PNG and ZLIB recognize
      '-DALL_STATIC' as a synonym for '-DPNG_STATIC' or '-DZLIB_STATIC'
      respectively, so you can use that single -Ddefine instead of a
      whole list of them...
  #3) to link with the dll compile and link as usual; no special flags
      or -Ddefines are necessary

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

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

Files included in the binary distro

<prefix>/include/png.h
<prefix>/include/pngconf.h
<prefix>/lib/libpng.a
<prefix>/lib/libpng.dll.a
<prefix>/bin/cygpng2.dll
<prefix>/man/man3/libpng.3
<prefix>/man/man3/libpngpf.3
<prefix>/doc/Cygwin/libpng-1.0.9.README (this file)
<prefix>/doc/libpng-1.0.11/README (the normal libpng README)
<prefix>/doc/libpng-1.0.11/*      (other DOC files from libpng)

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

Port Notes:

---------- 1.0.11 --------------

No additional cygwin-specific changes, except updating to .11 release

---------- 1.0.9 ---------------

Version 1.0.9-3: as always, the dll is named cygpng2.dll.  See notes 
  below.  Also, the -DALL_STATIC synonym for -DPNG_STATIC (and
  -DZLIB_STATIC) was added.  Although the binary package does 
  not contain assembler routines, asm acceleration DOES work
  with both DLL and static builds and with -mwin32 or without.

---------- 1.0.8 ---------------

Version 1.0.8-2 contains the 1.0.9pre3 patches.  However, I kept the 
  1.0.8 number since the 9pre3 patches ONLY affect the assembler
  routines, and the cygwin precompiled packages do NOT use the
  assember stuff.  Thus, the only change from 1.0.8-1 to 1.0.8-2
  is the dll name change (see below).

As of 1.0.8-2, the dll is named "cygpng2.dll" NOT "libpng.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 "libpng.dll" you may either recompile 
  your app so that it links with libpng.dll.a/cygpng2.dll, or install
  *just* the dll from libpng-1.0.8-1.tar.gz into your /usr/bin 
  directory.

The dll is VERSIONED. (i.e. "cygpng2.dll" NOT "cygpng.dll") because
  the png developers will soon release libpng-2.x.y, which has an
  entirely different ABI/API.  To enable the upcoming version and 
  this one to coexist, the dll's are versioned (versioning is not
  necessary for static libs until AFTER the release of 2.x.y; 
  but you've got to think ahead for the dynamic libs).

The png-developers specify that the interface version number (IVN) 
  of the current 1.x.y series is "2" and the IVN of the upcoming
  2.x.y series will be "3".  I suppose IVN = 1 was for the 0.x.y
  pre-releases. 

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 '-mno-win32' is used or not)

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

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

