8248158: Configure fails with autoconf not found even though it's installed

Reviewed-by: erikj, ihse, stooke
This commit is contained in:
Galder Zamarreno 2020-08-05 11:59:10 +02:00 committed by Severin Gehwolf
parent 97bbbbba51
commit 96f56eb4fc
4 changed files with 13 additions and 14 deletions

View File

@ -72,7 +72,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
UTIL_REQUIRE_PROGS(UNAME, uname)
UTIL_REQUIRE_PROGS(UNIQ, uniq)
UTIL_REQUIRE_PROGS(WC, wc)
UTIL_REQUIRE_PROGS(WHICH, which)
UTIL_REQUIRE_PROGS(XARGS, xargs)
# Then required tools that require some special treatment.

View File

@ -78,11 +78,11 @@ generated_script="$build_support_dir/generated-configure.sh"
###
autoconf_missing_help() {
APT_GET="`which apt-get 2> /dev/null | grep -v '^no apt-get in'`"
YUM="`which yum 2> /dev/null | grep -v '^no yum in'`"
BREW="`which brew 2> /dev/null | grep -v '^no brew in'`"
ZYPPER="`which zypper 2> /dev/null | grep -v '^no zypper in'`"
CYGWIN="`which cygpath 2> /dev/null | grep -v '^no cygpath in'`"
APT_GET="`type -p apt-get 2> /dev/null`"
YUM="`type -p yum 2> /dev/null`"
BREW="`type -p brew 2> /dev/null`"
ZYPPER="`type -p zypper 2> /dev/null`"
CYGWIN="`type -p cygpath 2> /dev/null`"
if test "x$ZYPPER" != x; then
PKGHANDLER_COMMAND="sudo zypper install autoconf"
@ -111,7 +111,7 @@ generate_configure_script() {
exit 1
fi
else
AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
AUTOCONF="`type -p autoconf 2> /dev/null`"
if test "x$AUTOCONF" = x; then
echo
echo "Autoconf is not found on the PATH, and AUTOCONF is not set."

View File

@ -601,7 +601,7 @@ AC_DEFUN([UTIL_REQUIRE_BUILTIN_PROGS],
UTIL_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
if test "x[$]$1" = x; then
AC_MSG_NOTICE([Required tool $2 not found in PATH, checking built-in])
if command -v $2 > /dev/null 2>&1; then
if type -p $2 > /dev/null 2>&1; then
AC_MSG_NOTICE([Found $2 as shell built-in. Using it])
$1="$2"
else

View File

@ -242,7 +242,7 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE_CYGWIN],
new_path=`$CYGPATH -u "$path"`
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
new_path=`type -p "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
@ -258,7 +258,7 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE_CYGWIN],
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$path"`
new_path=`$WHICH "$new_path" 2> /dev/null`
new_path=`type -p "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
@ -324,7 +324,7 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE_MSYS],
UTIL_REWRITE_AS_UNIX_PATH(new_path)
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
new_path=`type -p "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
@ -336,7 +336,7 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE_MSYS],
new_path="$path"
UTIL_REWRITE_AS_UNIX_PATH(new_path)
new_path=`$WHICH "$new_path" 2> /dev/null`
new_path=`type -p "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in MSYS causing which
# to not find them
if test "x$new_path" = x \
@ -392,7 +392,7 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE_WSL],
# Now try to locate executable using which
new_path_bak="$new_path"
new_path=`$WHICH "$new_path" 2> /dev/null`
new_path=`type -p "$new_path" 2> /dev/null`
# bat and cmd files are not considered executable in WSL
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
@ -409,7 +409,7 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE_WSL],
new_path="$path"
UTIL_REWRITE_AS_UNIX_PATH([new_path])
new_path_bak="$new_path"
new_path=`$WHICH "$new_path" 2> /dev/null`
new_path=`type -p "$new_path" 2> /dev/null`
# bat and cmd files are not considered executable in WSL
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \