Skip to content

Commit

Permalink
Abort from configure when which command is missing (PR#18510).
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84286 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
kalibera committed Apr 19, 2023
1 parent 9c55843 commit 079f17d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions configure
Expand Up @@ -5433,6 +5433,10 @@ fi
done
test -n "$WHICH" || WHICH="which"

if test "${WHICH}" = which ; then
as_fn_error $? "which is required but missing" "$LINENO" 5
fi

## Make
: ${MAKE=make}

Expand Down Expand Up @@ -27054,7 +27058,7 @@ _ACEOF
# flags.
r_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $r_verb"
(eval echo $as_me:27059: \"$ac_link\") >&5
(eval echo $as_me:27063: \"$ac_link\") >&5
r_c_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
echo "$r_c_v_output" >&5
CFLAGS=$r_save_CFLAGS
Expand Down Expand Up @@ -27130,7 +27134,7 @@ _ACEOF
# flags.
r_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $r_cv_prog_c_v"
(eval echo $as_me:27135: \"$ac_link\") >&5
(eval echo $as_me:27139: \"$ac_link\") >&5
r_c_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
echo "$r_c_v_output" >&5
CFLAGS=$r_save_CFLAGS
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Expand Up @@ -680,6 +680,12 @@ AC_PATH_PROGS(SED, sed, /bin/sed, [/usr/xpg4/bin:$PATH])
## 'which' is not POSIX, and might be a shell builtin or alias
## (but should not be in 'sh')
AC_PATH_PROGS(WHICH, which, which)
if test "${WHICH}" = which ; then
## needed to build and run R
## ends up hard-coded in the utils package
AC_MSG_ERROR([[which is required but missing]])
fi

## Make
: ${MAKE=make}
AC_SUBST(MAKE)
Expand Down

0 comments on commit 079f17d

Please sign in to comment.