[project @ 2001-12-06 13:05:03 by sewardj]
[ghc-hetmet.git] / configure.in
index 5483184..44451a7 100644 (file)
@@ -35,6 +35,17 @@ if test x"$srcdir" != 'x.' ; then
     exit 1
 fi
 
+#
+# Remove common automounter nonsense + convert from UNC to DOS style paths
+# (UNC awareness isn't quite there yet for cygwin32-beta18 and consituent tools.)
+#
+hardtop=`pwd`
+hardtop=`echo $hardtop | sed 's|^/tmp_mnt.*\(/local/.*\)$|\1|' | sed 's|^/tmp_mnt/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|' | sed 's|^//\(.\)/|\1:/|' `
+
+echo ''
+echo "*** The top of your build tree is: $hardtop"
+# subst of hardtop is done below after we've computed hardtop_plat.
+
 dnl--------------------------------------------------------------------
 dnl * Choose host(/target/build) platform
 dnl--------------------------------------------------------------------
@@ -326,27 +337,19 @@ dnl AC_SUBST(TargetVendor_CPP)
 AC_SUBST(exeext)
 
 #
-# Remove common automounter nonsense + convert from UNC to DOS style paths
-# (UNC awareness isn't quite there yet for cygwin32-beta18 and consituent tools.)
-#
-hardtop=`pwd`
-hardtop=`echo $hardtop | sed 's|^/tmp_mnt.*\(/local/.*\)$|\1|' | sed 's|^/tmp_mnt/|/|' | sed 's|^/grasp_tmp|/local/grasp_tmp|' | sed 's|^//\(.\)/|\1:/|' `
-
-echo ''
-echo "*** The top of your build tree is: $hardtop"
+# The native format for 'hardtop' (i.e., right kind of slashes on a Win32 box).
+# (but with b-slashes being escaped).
 case $HostPlatform in
-  i386-unknown-mingw32)
-       hardtop_plat=`cygpath -w ${hardtop}`
-       ;;
-  i386-unknown-cygwin32)
-       hardtop_plat=`cygpath -w ${hardtop}`
+  i386-unknown-mingw32 | i386-unknown-cygwin32)
+       # get rid off /cygdrive/ prefix
+       hardtop=`echo ${hardtop} | sed -e 's%^/cygdrive/\(.\)/%\1:/%' `
+       hardtop_plat=`cygpath -w ${hardtop} | sed -e 's@\\\\@\\\\\\\\@g' `
        ;;
   *)
        hardtop_plat=${hardtop}
        ;;
 esac
 AC_SUBST(hardtop)
-# The native format (i.e., right kind of slashes on a Win32 box).
 AC_SUBST(hardtop_plat)
 
 dnl --------------------------------------------------------------