diff --git a/Makefile.am b/Makefile.am
index 6e7bb1d..be78945 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,8 @@ DISTCHECK_CONFIGURE_FLAGS = --disable-icon-mapping
 
 SUBDIRS = po $(SVGSRCDIR)
 
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
 theme_in_files = index.theme.in.in
 theme_DATA = $(theme_in_files:.theme.in.in=.theme)
 
diff --git a/configure.ac b/configure.ac
index d2fa3ff..97a751d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,6 +3,7 @@ AC_PREREQ(2.53)
 
 AC_INIT([gnome-icon-theme], [3.9.5],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-icon-theme])
+AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SRCDIR([index.theme.in.in])
 
 AM_INIT_AUTOMAKE([1.9 dist-xz no-dist-gzip tar-ustar foreign])
