1.1 --- a/common/autoconf/basics_windows.m4 Sat Nov 03 16:15:26 2012 -0700 1.2 +++ b/common/autoconf/basics_windows.m4 Sat Nov 03 16:28:14 2012 -0700 1.3 @@ -172,6 +172,13 @@ 1.4 1.5 # Now try to locate executable using which 1.6 new_path=`$WHICH "$new_path" 2> /dev/null` 1.7 + # bat and cmd files are not always considered executable in cygwin causing which 1.8 + # to not find them 1.9 + if test "x$new_path" = x \ 1.10 + && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 1.11 + && test "x`$LS \"$path\" 2>/dev/null`" != x; then 1.12 + new_path=`$CYGPATH -u "$path"` 1.13 + fi 1.14 if test "x$new_path" = x; then 1.15 # Oops. Which didn't find the executable. 1.16 # The splitting of arguments from the executable at a space might have been incorrect, 1.17 @@ -181,6 +188,13 @@ 1.18 arguments="EOL" 1.19 new_path=`$CYGPATH -u "$path"` 1.20 new_path=`$WHICH "$new_path" 2> /dev/null` 1.21 + # bat and cmd files are not always considered executable in cygwin causing which 1.22 + # to not find them 1.23 + if test "x$new_path" = x \ 1.24 + && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ 1.25 + && test "x`$LS \"$path\" 2>/dev/null`" != x; then 1.26 + new_path=`$CYGPATH -u "$path"` 1.27 + fi 1.28 if test "x$new_path" = x; then 1.29 # It's still not found. Now this is an unrecoverable error. 1.30 AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])