diff --git a/src/tools/guess-mpidefs b/src/tools/guess-mpidefs index c8b6f559b4..473806b32c 100755 --- a/src/tools/guess-mpidefs +++ b/src/tools/guess-mpidefs @@ -71,7 +71,7 @@ function get_mpi_include () fi outlist="" for word in ${inlist} ; do - len=`echo "${word}" | grep -o "^\-I" | wc -c` + len=`echo "${word}" | grep -o "^-I" 2>/dev/null | wc -c` if [ ${len} -ge 3 ] ; then outlist="${outlist} ${word}" fi @@ -112,7 +112,7 @@ function get_mpi_link () fi outlist="" for word in ${inlist} ; do - len=`echo "${word}" | grep -o "^\-L" | wc -c` + len=`echo "${word}" | grep -o "^-L" | wc -c` if [ ${len} -ge 3 ] ; then outlist="${outlist} ${word}" fi @@ -153,7 +153,7 @@ function get_mpi_lib () fi outlist="" for word in ${inlist} ; do - len=`echo "${word}" | grep -o "^\-l" | wc -c` + len=`echo "${word}" | grep -o "^-l" | wc -c` if [ ${len} -ge 3 ] ; then outlist="${outlist} ${word}" fi