[project @ 2003-06-27 16:53:07 by stolz]
[ghc-hetmet.git] / configure.in
index b505440..12ebf1e 100644 (file)
@@ -373,7 +373,7 @@ case $HostPlatform in
   i386-unknown-mingw32 | i386-unknown-cygwin32)
        # convert $hardtop to a path that mingw will understand too
        cyghardtop=${hardtop}
-       hardtop=`cygpath -m ${cyghardtop}`
+       hardtop=`cygpath -w ${cyghardtop} | sed -e 's@\\\\@/@g'`
        hardtop_plat=`cygpath -w ${cyghardtop} | sed -e 's@\\\\@\\\\\\\\@g'`
        ;;
   *)
@@ -692,7 +692,15 @@ AC_SUBST(CompressCmd)
 AC_SUBST(CompressSuffix)
 
 dnl ** check for ghc-pkg command
-AC_PATH_PROG(GhcPkgCmd,ghc-pkg)
+changequote(, )dnl
+ghc_pkg_guess=`echo $WithGhc | sed 's@ghc\([^/\\]*\)$@ghc-pkg\1@'`
+changequote([, ])dnl
+if $ghc_pkg_guess -l >/dev/null 2>/dev/null; then
+   GhcPkgCmd=$ghc_pkg_guess
+   AC_MSG_NOTICE([using $ghc_pkg_guess for ghc-pkg])
+else
+   AC_PATH_PROG(GhcPkgCmd,ghc-pkg)
+fi
 
 AC_ARG_WITH(greencard,
 [  --with-greencard=<greencard compiler>