version: 1.2.32
source: libpng.org
This is a part of my UnixImageIO framework. A script is available to build the framework from sources.
Important note: Security holes in earlier versions of libpng are fixed quickly when found. Please make sure to get the latest version of the source.
change the lines:
typedef unsigned long png_uint_32; typedef long png_int_32;
to:
typedef unsigned int png_uint_32; typedef int png_int_32;
In the libpng source:
export MACOSX_DEPLOYMENT_TARGET=10.5 ./configure --disable-static --without-libpng-compat --disable-dependency-tracking \ CFLAGS="-Os -arch ppc -arch i386 -arch ppc64 -arch x86_64" make sudo make install
No need for pngconf.h patch.
In the libpng source:
export MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --disable-static --without-libpng-compat --disable-dependency-tracking CFLAGS="-Os -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" make sudo make install
On Panther and for a generic single-arch build.
In the libpng source:
./configure --disable-static --without-libpng-compat --disable-dependency-tracking CFLAGS=-Os make sudo make install