diff options
author | Ian Lynagh <igloo@earth.li> | 2007-06-05 14:50:43 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-06-05 14:50:43 +0000 |
commit | e43dbbde2f2c1d06908ee91b1319c489797b0849 (patch) | |
tree | 4e11a6f6a2aa7440f5965d788af81eb6dbdfeed3 /aclocal.m4 | |
parent | 1a74e14655acb56919ac74bd92c116c7d01d7c30 (diff) | |
download | haskell-e43dbbde2f2c1d06908ee91b1319c489797b0849.tar.gz |
Fix normalisation of path to find
The old code didn't work on Mac OS X, as "which" returns successfully
when it can't find the program.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index eca417a455..0a6d27b104 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -611,11 +611,15 @@ echo foo > conftest.txt $fp_prog_find conftest.txt -print > conftest.out 2>&1 if grep '^conftest.txt$' conftest.out > /dev/null 2>&1 ; then # OK, looks like a real "find". - if which cygpath 1> /dev/null 2> /dev/null - then - fp_prog_find=`cygpath --mixed "$fp_prog_find"` - AC_MSG_NOTICE([Converted to "$fp_prog_find"]) - fi + case $HostPlatform in + *mingw32) + if test x${OSTYPE} != xmsys + then + fp_prog_find="`cygpath --mixed ${fp_prog_find}`" + AC_MSG_NOTICE([normalized find command to $fp_prog_find]) + fi ;; + *) ;; + esac FindCmd="$fp_prog_find" else # Found a poor WinDoze version of "find", ignore it. |