Skip to content

buildconf hangs with IRIX m4 #1471

@canavan

Description

@canavan

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.

curl/libcurl version

bagder/fake-rand-for-big-endian

operating system

IRIX 6.5.30

Patch

diff --git a/buildconf b/buildconf
index 0d998c2..976734a 100755
--- a/buildconf
+++ b/buildconf
@@ -255,7 +255,7 @@ echo "buildconf: libtoolize version $lt_version (ok)"
#--------------------------------------------------------------------------

m4 check

-m4=(${M4:-m4} --version || ${M4:-gm4} --version) 2>/dev/null | head -n 1;
+m4=(${M4:-m4} --version 0<&- || ${M4:-gm4} --version) 2>/dev/null 0<&- | head -n 1;
m4_version=echo $m4 | sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'

if { echo $m4 | grep "GNU" >/dev/null 2>&1; } then

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions