GD needs a patch to handle libpng 1.4. Edit gd_png.c and change:
if (!png_check_sig (sig, 8)) { /* bad signature */
to:
if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
In the libgd source:
export MACOSX_DEPLOYMENT_TARGET=10.6 ./configure --mandir=/usr/local/share/man --disable-dependency-tracking \ --without-x --without-xpm --without-fontconfig \ CFLAGS="-Os -arch i386 -arch x86_64" make sudo make install
If you want Xpm support, you must install X11 and remove --without-xpm from the configure line above. Be aware that it is very likely that X11's freetype will be found instead of yours.
In the libgd source:
export MACOSX_DEPLOYMENT_TARGET=10.5 ./configure --mandir=/usr/local/share/man --disable-dependency-tracking \ --without-x --without-xpm --without-fontconfig \ CFLAGS="-Os -arch ppc -arch i386 -arch ppc64 -arch x86_64" make sudo make install
In the libgd source:
export MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --mandir=/usr/local/share/man --disable-dependency-tracking \ --without-x --without-xpm --without-fontconfig \ CFLAGS="-Os -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" make sudo make install
In the libgd source:
./configure --mandir=/usr/local/share/man --disable-dependency-tracking \ --without-x --without-xpm --without-fontconfig CFLAGS=-Os make sudo make install
If you want Xpm support, you must install X11 and remove --without-xpm from the configure line above. Be aware that it is very likely that X11's freetype will be found instead of yours.
To use the UnixImageIO and FreeType frameworks instead of /usr/local libraries, insert these lines right after the ./configure line:
--with-png=/Library/Frameworks/UnixImageIO.framework/unix \ --with-freetype=/Library/Frameworks/FreeType.framework/unix \ --with-jpeg=/Library/Frameworks/UnixImageIO.framework/unix \