]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Make the
authorGary V. Vaughan <gary@gnu.org>
Tue, 20 Apr 2004 19:16:34 +0000 (19:16 +0000)
committerGary V. Vaughan <gary@gnu.org>
Tue, 20 Apr 2004 19:16:34 +0000 (19:16 +0000)
best tool so far counter rely on the tool path variable name to
avoid checks for one tool being affected by the results of running
the length check on a previous tool.

ChangeLog
lib/autoconf/programs.m4

index 2c8106760bde17190b1a466ce4b90f2c99c7869e..5426ac65e78d1e1a9329d7401ff06f54b6492966 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-04-20  Gary V. Vaughan  <gary@gnu.org>
 
+       * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Make the
+       best tool so far counter rely on the tool path variable name to
+       avoid checks for one tool being affected by the results of running
+       the length check on a previous tool.
+
        * lib/autoconf/programs.m4 (_AC_PROG_GREP): Take an additional
        match expression argument, as different greps have different
        regular expression flavours.
index 3375830afa0a65d6c27ef42f1ceee9107795e82d..233fb4de7703f3bbc4853475fd8468d55ebaa016 100644 (file)
@@ -468,12 +468,15 @@ m4_define([_AC_FEATURE_CHECK_LENGTH],
     cp "$tmp/conftest.in" "$tmp/conftest.nl"
     echo '$4' >> "$tmp/conftest.nl"
     $3 < "$tmp/conftest.nl" >"$tmp/conftest.out" || break
-   diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
+    diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
     ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_max-0}; then
+    if test $ac_count -gt ${$1_max-0}; then
       # Best one so far, save it but keep looking for a better one
       $2="$$1"
-      ac_max=$ac_count
+dnl   # Using $1_max so that each tool feature checked gets its
+dnl   # own variable.  Don't reset it otherwise the implied search
+dnl   # for best performing tool in a list breaks down.
+      $1_max=$ac_count
     fi
     # 10*(2^10) chars as input seems more than enough
     test $ac_count -gt 10 && break