From 8a67f904d96c15d098f228b0eb35b86402892fd8 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 14 Mar 2007 21:38:18 +0000 Subject: [PATCH] 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. --- Installation/install_cgal | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Installation/install_cgal b/Installation/install_cgal index 25a060c3361..dd6892cff61 100755 --- a/Installation/install_cgal +++ b/Installation/install_cgal @@ -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