Hi there,

we have a project where we use the configure script to search for some helper 
tools and write the paths to the package.m4 for the autotest test suite. We do 
this with

configure.ac:
        AC_PATH_PROGS(WGET, [wget], not found)
        AC_PATH_PROGS(HEAD, [head], not found)
        AC_PATH_PROGS(TAIL, [tail], not found)
        ...
        AC_CONFIG_FILES(tests/package.m4)

tests/package.m4.in:
        m4_define([WGET], [...@wget@])
        m4_define([HEAD], [...@head@])
        m4_define([TAIL], [...@tail@])
        ...

A testcase using WGET can then check whether or not it is set to "not found" 
and either continue the test or skip it.

This all works, but if (by accident), a check in configure.ac is deleted, say 
than one for WGET, then tests/package.m4 ends up with an unresolved 
substitution:

        m4_define([WGET], [...@wget@])

Then, creating the test suite using the makefile target

        $(TESTSUITE): $(srcdir)/testsuite.at
                $(AUTOM4TE) --language=autotest -I '$(srcdir)' -o $...@.tmp 
$...@.at
                mv $...@.tmp $@

runs into an infinite loop, allocating lots of memory. I attached a zip file 
containing the files and the command that reproduce this result.


I have very little knowledge about what's going on in autom4te, and I know that 
this scenario is a user error. However, I think that Autoconf should give a 
warning if substitution remain unresolved -- anything but an infinite loop 
would be helpful.

More information:

        m4 (GNU M4) 1.4.13
        autoconf (GNU Autoconf) 2.65

Best regards,
Niels.

Reply via email to