autoconf-patches
[Top][All Lists]
Advanced

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

8-gary-_AC_FEATURE_CHECK_LENGTH-factor-break.patch


From: Gary V. Vaughan
Subject: 8-gary-_AC_FEATURE_CHECK_LENGTH-factor-break.patch
Date: Thu, 22 Apr 2004 10:13:40 +0100
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay to commit?
- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
__________________________________________________________
This patch notification generated by cvsapply version 0.13
http://savannah.gnu.org/projects/cvs-utils
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAh4zEFRMICSmD1gYRAuZpAJ9Vsj2sv7LKC/d6UM7YndEidZxDqQCcC4XC
/HBL1+b9vul0aG2QAi6qXgE=
=gQLS
-----END PGP SIGNATURE-----
Index: ChangeLog
from  Albert Chin-A-Young <address@hidden>,
        Gary V. Vaughan  <address@hidden>

        * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Don't guess
        how deeply nested we are when a suitable tool is found, set the
        ac_path_TOOL_found flag.
        (_AC_PATH_PROG_FEATURE_CHECK): Encapsulate knowledge of how deeply
        nested we are in this macro.  Break out of all 3 nested loops if
        ac_path_TOOL_found is set.

Index: lib/autoconf/programs.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/programs.m4,v
retrieving revision 1.26
diff -u -p -u -r1.26 programs.m4
--- lib/autoconf/programs.m4 21 Apr 2004 13:04:57 -0000 1.26
+++ lib/autoconf/programs.m4 22 Apr 2004 09:14:15 -0000
@@ -413,13 +413,15 @@ m4_define([_AC_PROG_GREP],
 # $ac_cv_path_VARIABLE to the path of an acceptable program, or else
 # _AC_PATH_PROG_FEATURE_CHECK will report that no acceptable program
 # was found, and abort.  If a suitable $ac_path_VARIABLE is found,
-# `break 3' will accept it without any further checks.
+# setting $ac_path_VARIABLE_found will accept it without any further
+# checks.
 m4_define([_AC_PATH_PROG_FEATURE_CHECK],
 [# Extract the first word of "$2" to use in msg output
 if test -z "$$1"; then
 set dummy $2; ac_prog_name=$[2]
 AC_CACHE_VAL([ac_cv_path_$1],
 [AS_TMPDIR([$1])
+ac_path_$1_found=false
 # Loop through the user's path and test for each of PROGNAME-LIST
 _AS_PATH_WALK([$4],
 [for ac_prog in $2; do
@@ -427,8 +429,10 @@ _AS_PATH_WALK([$4],
     ac_path_$1="$as_dir/$ac_prog$ac_exec_ext"
     test -f "$ac_path_$1" || continue
     $3
+    $ac_path_$1_found && break 3
   done
-done])
+done
+])
 rm -rf "$tmp"
 ])
 $1="$ac_cv_path_$1"
@@ -452,14 +456,11 @@ fi
 # iteration by appending (optionally, MATCH-STRING and) a newline
 # to the file, and using the result as input to CHECK-CMD.
 m4_define([_AC_FEATURE_CHECK_LENGTH],
-[if AS_EXECUTABLE_P(["$$1"]); then
+[$$1_found || if AS_EXECUTABLE_P(["$$1"]); then
   # Check for GNU $1 and select it if it is found.
   _AC_PATH_PROG_FLAVOR_GNU([$$1],
-    [$2="$$1"
-    break 3
-  ])
-
-  ac_count=0
+    [$2="$$1" $1_found=:],
+  [ac_count=0
   echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
   while :
   do
@@ -480,7 +481,7 @@ dnl   # for best performing tool in a li
     fi
     # 10*(2^10) chars as input seems more than enough
     test $ac_count -gt 10 && break
-  done
+  done])
 fi
 ])
 

reply via email to

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