$NetBSD: patch-ab,v 1.2 2005/09/08 19:06:03 rpaulo Exp $ --- Makefile.orig 2005-05-21 23:39:44.000000000 +0100 +++ Makefile 2005-09-07 23:27:16.000000000 +0100 @@ -458,19 +458,12 @@ # libpng config ifdef WITH_PNG CDEFS += -DWITH_PNG -CFLAGS += $(shell libpng-config --cflags) +CFLAGS += $(shell pkg-config --cflags libpng12) -# seems like older libpng versions are broken and need this -PNGCONFIG_FLAGS = --ldflags --libs ifdef STATIC -ifdef OSX -# Seems like we need a tiny hack for OSX static to work -LIBS += $(shell libpng-config --prefix)/lib/libpng.a -else -LIBS += $(shell libpng-config --static $(PNGCONFIG_FLAGS)) -endif +LIBS += $(shell pkg-config --static libpng12) else -LIBS += $(shell libpng-config --L_opts $(PNGCONFIG_FLAGS)) +LIBS += $(shell pkg-config --libs libpng12) endif endif