White space only
[ghc-hetmet.git] / aclocal.m4
index 0432ed3..8593b89 100644 (file)
@@ -100,7 +100,7 @@ AC_DEFUN([FP_PROG_CONTEXT_DIFF],
 [echo foo > conftest1
 echo foo > conftest2
 fp_cv_context_diff=no
-for fp_var in '-C 1' '-c1'
+for fp_var in '-U 1' '-u1' '-C 1' '-c1'
 do
   if diff $fp_var conftest1 conftest2 > /dev/null 2>&1; then
     fp_cv_context_diff="diff $fp_var"
@@ -268,6 +268,16 @@ dnl for a happy source tree and point the build system at that instead.
 dnl
 AC_DEFUN([FPTOOLS_HAPPY],
 [AC_PATH_PROG(HappyCmd,happy,)
+# Happy is passed to Cabal, so we need a native path
+if test "x$HostPlatform"  = "xi386-unknown-mingw32" && \
+   test "${OSTYPE}"      != "msys"                  && \
+   test "${HappyCmd}"    != ""
+then
+    # Canonicalise to <drive>:/path/to/gcc
+    HappyCmd=`cygpath -m ${HappyCmd}`
+    AC_MSG_NOTICE([normalized happy command to $HappyCmd])
+fi
+
 AC_CACHE_CHECK([for version of happy], fptools_cv_happy_version,
 changequote(, )dnl
 [if test x"$HappyCmd" != x; then
@@ -297,6 +307,15 @@ dnl Darn, I forgot to make Haddock print out its version number when
 dnl invoked with -v.  We could try generating some HTML and grepping
 dnl through that to find the version number, but I think we'll make
 dnl do without it for now.
+# Haddock is passed to Cabal, so we need a native path
+if test "x$HostPlatform"  = "xi386-unknown-mingw32" && \
+   test "${OSTYPE}"      != "msys"                  && \
+   test "${HaddockCmd}"  != ""
+then
+    # Canonicalise to <drive>:/path/to/gcc
+    HaddockCmd=`cygpath -m ${HaddockCmd}`
+    AC_MSG_NOTICE([normalized haddock command to $HaddockCmd])
+fi
 ])
 
 dnl
@@ -306,6 +325,15 @@ dnl
 AC_DEFUN([FPTOOLS_ALEX],
 [
 AC_PATH_PROG(AlexCmd,alex,)
+# Alex is passed to Cabal, so we need a native path
+if test "x$HostPlatform"  = "xi386-unknown-mingw32" && \
+   test "${OSTYPE}"      != "msys"                  && \
+   test "${AlexCmd}"     != ""
+then
+    # Canonicalise to <drive>:/path/to/gcc
+    AlexCmd=`cygpath -m ${AlexCmd}`
+fi
+
 AC_CACHE_CHECK([for version of alex], fptools_cv_alex_version,
 changequote(, )dnl
 [if test x"$AlexCmd" != x; then
@@ -984,6 +1012,11 @@ AC_CACHE_CHECK([for extra options to pass gcc when compiling via C], [fp_cv_gcc_
      )],
      [])
   ;;
+  sparc-*-solaris2) 
+    FP_COMPARE_VERSIONS([$fp_gcc_version], [-ge], [4.2],
+      [fp_cv_gcc_extra_opts="$fp_cv_gcc_extra_opts -fno-toplevel-reorder"],
+      [])
+  ;;
  esac
 ])
 AC_SUBST([GccExtraViaCOpts],$fp_cv_gcc_extra_opts)