--- libpng/scripts/makefile.darwin.orig	2004-12-03 00:14:31.000000000 +0000
+++ libpng/scripts/makefile.darwin	2006-04-10 21:55:35.000000000 +0100
@@ -7,7 +7,7 @@
 # For conditions of distribution and use, see copyright notice in png.h
 
 # where "make install" puts libpng.a, libpng12.dylib, png.h and pngconf.h
-prefix=/usr/local
+prefix=??PREFIX??
 
 # Where the zlib library and include files are located
 #ZLIBLIB=/usr/local/lib
@@ -16,8 +16,8 @@
 ZLIBINC=../zlib
 
 CC=cc
-CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz
+CFLAGS=??EXTRA_CFLAGS?? -I$(ZLIBINC) -Wall -O3 -funroll-loops
+LDFLAGS=??EXTRA_LDFLAGS?? -L. -L$(ZLIBLIB) -lpng12 -lz
 
 #RANLIB=echo
 RANLIB=ranlib
@@ -58,7 +58,7 @@
 .c.pic.o:
 	$(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
 
-all: libpng.a $(LIBNAME).dylib pngtest libpng.pc libpng-config
+all: libpng.a pngtest libpng.pc libpng-config
 
 libpng.a: $(OBJS)
 	ar rc $@ $(OBJS)
@@ -164,7 +164,7 @@
 	chmod 755 $(DB)/$(LIBNAME)-config
 	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
 
-install: install-static install-shared install-man install-config
+install: install-static install-man install-config
 
 # If you installed in $(DESTDIR), test-installed won't work until you
 # move the library to its final location.  Use test-dd to test it
