Add AC_CONFIG_MACRO_DIR([m4]) to configure.ac and -I m4 to ACLOCAL_AMFLAGS in Makefile.am, as suggested by libtoolize.