* aclocal.in (%file_includes): New variable.
(scan_configure_dep): Compile $m4_include_rx and $ac_require_rx once.
(scan_file): Scan for included files, and process these files
recursively. Fill %file_includes and %file_contents. Return the
list of included files, not the contents.
(scan_m4_files): Adjust calls to scan_files.
(strip_redundant_includes): New function.
(trace_used_macros): Call it.
(write_aclocal): Likewise. Also check the mtime of included files.
* tests/Makfile.am (TESTS): Add acloca14.test.
* tests/acloca14.test: New file.
Report from Phil Edwards.