[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: why not check $PATH for m4?

From: Eric Blake
Subject: Re: why not check $PATH for m4?
Date: Mon, 05 Feb 2007 06:06:36 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20061207 Thunderbird/ Mnenhy/

Hash: SHA1

According to Chris Pickett on 2/4/2007 10:18 PM:
>> The PATH check occurs at ./configure time for autoconf, not at runtime
>> during autom4te, as a runtime check would noticeably slow down autoconf
>> and automake.
> Out of sheer curiousity, did anyone perform experiments to verify that a
> runtime PATH check is noticeably slower?  Why is it slower?  Is it
> because it must look for binaries named m4 in each directory on the
> path?  That seems about as slow as when I just type m4 and hit enter at
> a prompt, which is, needless to say, relatively unslow.

I guess it's not just the speed, but also the question of what
command-line arguments m4 accepts.  autom4te learns at configure time
whether m4 supports --debugfile (added in 1.4.7) or --error-output
(deprecated, removed in alpha 1.9a if you compile from CVS).

On the other hand, autom4te DOES start out with the following check (not
to mention this check is out of date with the inclusion of my recent patch
to reject 1.4.4 and earlier as buggy):

| # $M4.
| my $m4 = $ENV{"M4"} || '/bin/m4';
| # Some non-GNU m4's don't reject the --help option, so give them /dev/null.
| fatal "need GNU m4 1.4 or later: $m4"
|   if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";
| # Set some high recursion limit as the default limit, 250, has already
| # been hit with AC_OUTPUT.  Don't override the user's choice.
| $m4 .= ' --nesting-limit=1024'
|   if " $m4 " !~ / (--nesting-limit(=[0-9]+)?|-L[0-9]*) /;

So maybe it is worth moving the PATH search for M4 out of ./configure and
into autom4te, but still prefering $M4 if set.

>> Don't work too hard, make some time for fun as well!
> I like your signature :)

Thanks - that's the first comment it has received.  The credit goes to my
wife (who graciously lets me spend my fun time on open source software).

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


reply via email to

[Prev in Thread] Current Thread [Next in Thread]