From 0c089cf264eb94a7162ac157eb1dee3f3ac578a4 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 08 Oct 2012 20:52:47 -0400 Subject: Improve IFS setting in find_dep_*() in configure. --- (limited to 'configure') diff --git a/configure b/configure index 1302b59..31a9185 100755 --- a/configure +++ b/configure @@ -244,20 +244,20 @@ find_dep_cmd() ${quiet} || printf 'checking for %s... ' "${dep}" - _old_ifs="${IFS}" - IFS=: + IFS=':' for _element in ${PATH}; do + unset IFS : ${_element=-.} if [ -f "${_element}/${_dep}" -a -x "${_element}/${_dep}" ]; then ${quiet} || printf '%s/%s\n' "${_element}" "${_dep}" eval "${_dep}"=\"${_element}/${_dep}\" - IFS="${_old_ifs}" return 0 fi done - IFS="${_old_ifs}" + unset IFS + ${quiet} || printf 'not found\n' missing_deps='true' return 1 @@ -269,20 +269,20 @@ find_dep_lib() ${quiet} || printf 'checking for %s... ' "${dep}" - _old_ifs="${IFS}" - IFS=: + IFS=':' for _element in ${libdir}:${PATH}; do + unset IFS : ${_element=-.} if [ -f "${_element}/${_dep}" -a -x "${_element}/${_dep}" ]; then ${quiet} || printf '%s/%s\n' "${_element}" "${_dep}" eval "${_dep}"=\"${_element}/${_dep}\" - IFS="${_old_ifs}" return 0 fi done - IFS="${_old_ifs}" + unset IFS + ${quiet} || printf 'not found\n' missing_deps='true' return 1 -- cgit v0.9.1