Fix for platforms that do not have 'getconf'.

The trick: use "_check_for_util getconf", before uses of check_for_sysutil.

Tested on Linux and Solaris.
This commit is contained in:
Laurent Rineau 2007-03-14 21:38:18 +00:00
parent 7935f735e0
commit 8a67f904d9
1 changed files with 10 additions and 6 deletions

View File

@ -617,14 +617,18 @@ _check_printf()
# (they should be on a unix system, but ...)
check_for_utils()
{
# Set ${GETCONF} to /bin/true if you do not want to use it.
POSIX_UTILITIES_PATH="`${GETCONF:-getconf} CS_PATH`"
if [ -n "${POSIX_UTILITIES_PATH}" ]; then
POSIX_UTILITIES_PATH="`echo ${POSIX_UTILITIES_PATH} | ${_sed} -e 's/:/ /g'`"
log_print "Path for Posix utilities: ${POSIX_UTILITIES_PATH}"
_which=real_which
_check_for_util getconf n
if [ -n "${_getconf}" ]; then
# Set ${GETCONF} to /bin/true if you do not want to use it.
POSIX_UTILITIES_PATH="`${GETCONF:-${_getconf}} CS_PATH`"
if [ -n "${POSIX_UTILITIES_PATH}" ]; then
POSIX_UTILITIES_PATH="`echo ${POSIX_UTILITIES_PATH} | ${_sed} -e 's/:/ /g'`"
log_print "Path for Posix utilities: ${POSIX_UTILITIES_PATH}"
fi
fi
_which=real_which
_check_for_sysutil basename y
_check_for_sysutil dirname y
_check_for_sysutil uname y