I using makefile.linux. libpng library is not linking
against zlib, only png test programs are, so i needed
to add a -lz to the target for libpng.
I think the right solution is making libpng to link
with libz instead of forcing external applications to
link with libz. It's a libpng dependency.
I discovered this problem with a linking error using
gdk-pixbuf-csource binary from the gtk-2.8.6 package.