Trying to build a git checkout of curl on IRIX fails when buildconf attempts to determine the m4 version if the system m4 is used. Apparently, /usr/bin/m4 ignores the --version parameter and waits for input from stdin. Adjusting the path such that a gnu m4 is found first fixes this.
I expected the following
Since the test is intended to weed out non-GNU m4, providing a meaningful error message would be nice.
I've failed so far in my attempts to cause /usr/bin/m4 --version to throw an error, but closing stdin or piping an empty string into m4 at least allows the check to report the problem, although gm4 is not considered at all in this case.