[Top][All Lists]

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

Re: _AC_FEATURE_CHECK_LENGTH bug (Was: Re: 4-gary-AC_PROG_GREP.patch)

From: Gary V. Vaughan
Subject: Re: _AC_FEATURE_CHECK_LENGTH bug (Was: Re: 4-gary-AC_PROG_GREP.patch)
Date: Wed, 21 Apr 2004 13:59:57 +0100
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

Hash: SHA1

Hi Albert,

Albert Chin wrote:
| On Tue, Apr 20, 2004 at 10:06:01PM +0100, Gary V.Vaughan wrote:
|>On 20 Apr 2004, at 21:08, Albert Chin wrote:
|>>On Tue, Apr 20, 2004 at 06:23:40PM +0100, Gary V. Vaughan wrote:
|>>>Applied the relevant part of Alberts original patch.
|>>What about the rest of the patch?
|>It hasn't arrived in the mailman archives yet, but a few minutes after I
|>posted the above, I posted this:
| Huh? I posted a link to the patch in the mailman archive:
| hadn't
arrived in the archive when I made that post, so I pasted it in:

|>Gary V. Vaughan wrote:
|>>Alexandre Duret-Lutz wrote:
|>>| My impressions is that your change will cause the test to exit
|>>| as soon as a working tool is found, although the intent was to
|>>| try many names of the tool and return the better one.  The
|>>| original `break 2' looks correct to me: it exits the tests for
|>>| the current name of the tool and continues with other names.

|>>The encapsulation within that macro set isn't ideal, but the break 2 is
|>>an optimisation.
| The 'break 2' assumes too much. The changelog entry reasons why.
|        * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH):
|        Don't assume `break 2' will break out of parent loop as
|        we don't know how deeply nested we are (AC_PROG_GREP
|        nests 3-deep).

All of the users of _AC_PATH_PROG_FEATURE_CHECK are 3 for loops deep.

1: _AS_PATH_WALK([$4],
2: [for ac_prog in $2; do
3:   for ac_exec_ext in '' $ac_executable_extensions; do

| Am I missing something? Should we not break out early so we can test
| all values in $2?

Hmmm... actually I think it should be a 'break 3', since we don't want
to check the rest of $PATH for another suitable ac_prog.  I think I
forgot to update it after I put the ac_exec_ext loop in when I was
factoring the original libtool macros...

However, if _AC_PATH_PROG_FLAVOR_GNU fails on every tool found, we can't
break out of the nested for loops just as soon as ac_cv_path_$1 is set
because the while loop in _AC_FEATURE_CHECK_LENGTH keeps setting it every
time it finds a better $ac_path_$1.  Breaking out early would find the
first tool, rather than the best.

- --
Gary V. Vaughan      ())_.  address@hidden,}
Research Scientist   ( '/
GNU Hacker           / )=
Technical Author   `(_~)_
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


reply via email to

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