diff --git a/Makefile.am b/Makefile.am
index 115e5f9..b7e93c2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,6 +33,8 @@
 # compiler, headers, and libraries are used as for a normal build.
 DISTCHECK_CONFIGURE_FLAGS=$(DISTCHECK_CONFIG_FLAGS)
 
+DISTCLEANFILES = _configs.sed magick/magick-config.h
+
 ## Make sure these will be cleaned even when they're not built by default.
 CLEANFILES = \
 	$(LTDL_CLEANFILES) \