From: Gary V. Vaughan Date: Tue, 20 Apr 2004 19:16:34 +0000 (+0000) Subject: * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Make the X-Git-Tag: AUTOCONF-2.59c~716 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=265fcd39864ac62eebdfdf1c52d79e34f4f62200;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 2c8106760..5426ac65e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-04-20 Gary V. Vaughan + * 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. diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4 index 3375830af..233fb4de7 100644 --- a/lib/autoconf/programs.m4 +++ b/lib/autoconf/programs.m4 @@ -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