Commit 044aa69e authored by Anthony Chan's avatar Anthony Chan Committed by Pavan Balaji
Browse files

bugfix when PATH or CLASSPATH contains ...::..., so path_elem could be empty.

[svn breadcrumb: r752 @ https://svn.mcs.anl.gov/repos/mpi/tools/mpe2]
parent 4fd06d37
......@@ -270,7 +270,7 @@ if test -n "$PATH" ; then
dnl 3rd argument, TEST-ACTION, may contain code in modifying IFS
jac_PATH=`echo $PATH | sed 's/:/ /g'`
for dir in ${jac_PATH} ; do
if test -d $dir -a -x "$dir/$2" ; then
if test -d "$dir" -a -x "$dir/$2" ; then
$1="$dir/$2"
# Not all releases work. Try a simple program
if test -n "[$]$1" ; then
......@@ -579,8 +579,10 @@ AC_DEFUN(JAC_CHECK_CYGPATH, [
AC_MSG_CHECKING([for cygpath])
jac_hasProg=no
IFS="${IFS= }"; pac_saved_ifs="$IFS"; IFS=":"
dnl need to "" $path_elem because PATH may contains ...::...,
dnl hence $path_elem could be empty
for path_elem in $PATH ; do
if test -d $path_elem -a -x "$path_elem/cygpath" ; then
if test -d "$path_elem" -a -x "$path_elem/cygpath" ; then
jac_hasProg=yes
break
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment