diff --git a/Makefile.am b/Makefile.am
index 03fa352..7e11d24 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,10 +18,6 @@ ACLOCAL_AMFLAGS = -I build ${ACLOCAL_FLAGS}
 
 DIST_SUBDIRS = src doc util boilerplate test perf
 SUBDIRS = src doc util
-# libpng is required for our test programs
-if CAIRO_HAS_PNG_FUNCTIONS
-SUBDIRS += boilerplate test perf
-endif
 
 configure: cairo-version.h
 
diff --git a/Makefile.in b/Makefile.in
index e29609c..f33a339 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -106,8 +106,6 @@ host_triplet = @host@
 EXTRA_PROGRAMS =
 TESTS =
 check_PROGRAMS =
-# libpng is required for our test programs
-@CAIRO_HAS_PNG_FUNCTIONS_TRUE@am__append_1 = boilerplate test perf
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/build/aclocal.cairo.m4 \
@@ -718,7 +716,7 @@ MAINTAINERCLEANFILES = Makefile.in $(srcdir)/aclocal.m4 \
 #	$(NULL)
 ACLOCAL_AMFLAGS = -I build ${ACLOCAL_FLAGS}
 DIST_SUBDIRS = src doc util boilerplate test perf
-SUBDIRS = src doc util $(am__append_1)
+SUBDIRS = src doc util
 DISTCHECK_CONFIGURE_FLAGS = \
 	--enable-gtk-doc \
 	--enable-test-surfaces \
