The "which" command is not always installed, but configure.ac uses it in
the function AC_HWCAP_CONTAINS_FLAG to force invocation of the executable
"true" rather than the shell builtin with the same name. (The point here
is to get LD_SHOW_AUXV=1 evaluated by the dynamic loader.)
Another option might be to hard-wire the location /bin/true, because the
filesystem hierarchy standard requires it to be there. However, the FHS
doesn't apply to BSDs and at least some FreeBSD versions do not stick to
that specific rule.
On the other hand, the "env" command seems to be available on all relevant
platforms, so use that instead.
AC_DEFUN([AC_HWCAP_CONTAINS_FLAG],[
AUXV_CHECK_FOR=$1
AC_MSG_CHECKING([if AT_HWCAP contains the $AUXV_CHECK_FOR indicator])
- if LD_SHOW_AUXV=1 `which true` | grep ^AT_HWCAP | grep -q -w ${AUXV_CHECK_FOR}
+ if env LD_SHOW_AUXV=1 true | grep ^AT_HWCAP | grep -q -w ${AUXV_CHECK_FOR}
then
AC_MSG_RESULT([yes])
AC_SUBST([$2],[yes])