[Top][All Lists]

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

inconsistent seach orders in AC_PATH_PROGS vs AC_PATH_PROGS_FEATURE_CHEC

From: dmitrii . pasechnik
Subject: inconsistent seach orders in AC_PATH_PROGS vs AC_PATH_PROGS_FEATURE_CHECK
Date: Thu, 10 Sep 2020 12:23:23 +0100

One expects that the macro AC_PATH_PROGS_FEATURE_CHECK
traverses the list of programs in its 2nd argument
in the same way as  AC_PATH_PROGS,
i.e. the outermost loop is over the list of programs.

But in  AC_PATH_PROGS_FEATURE_CHECK the outer loop is
over the PATH entries, making it in general impossible to 
select programs in the list in order specified (without modifying the
path), while this is often very desirable.

This is easy to correct, just rewrite the corresponding part of
the body of _AC_PATH_PROGS_FEATURE_CHECK as follows.

  for ac_prog in $2; do
  # Loop through the user's path and test for each of PROGNAME-LIST
    [for ac_exec_ext in '' $ac_executable_extensions; do
      AS_EXECUTABLE_P(["$ac_path_$1"]) || continue
      $ac_path_$1_found && break 3

If this is an acceptable change, I'd be glad to provide a patch.


reply via email to

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