bug-autoconf
[Top][All Lists]
Advanced

[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.

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

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

Dima




reply via email to

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