X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=configure.ac;h=547f864f94021ce9e62857924b4b1da4976ad751;hb=a69327edb251674e7828445fbf1263ffc55823a2;hp=f25589c792134e1697a257b164e69b1a3d8d2014;hpb=37fe79750c2a2f72567e0655b697eaab3ad720e8;p=ghc-hetmet.git diff --git a/configure.ac b/configure.ac index f25589c..547f864 100644 --- a/configure.ac +++ b/configure.ac @@ -452,11 +452,16 @@ dnl Find 'hardtop_plat', the native format for 'hardtop' (i.e., right kind of \d dnl case $HostPlatform in i386-unknown-mingw32 | i386-unknown-cygwin32) - # convert $hardtop to a path that mingw will understand too - cyghardtop=${hardtop} - hardtop=`cygpath -w ${cyghardtop} | sed -e 's@\\\\@/@g'` - hardtop_plat=`cygpath -w ${cyghardtop} | sed -e 's@\\\\@\\\\\\\\@g'` - ;; + if test ${OSTYPE} != "msys" + then + # convert $hardtop to a path that mingw will understand too + cyghardtop=${hardtop} + hardtop=`cygpath -w ${cyghardtop} | sed -e 's@\\\\@/@g'` + hardtop_plat=`cygpath -w ${cyghardtop} | sed -e 's@\\\\@\\\\\\\\@g'` + else + hardtop_plat=${hardtop} + fi + ;; *) hardtop_plat=${hardtop} ;; @@ -515,9 +520,13 @@ AC_ARG_WITH(gcc, [AC_HELP_STRING([--with-gcc=ARG], [Use ARG as the path to GCC [default=autodetect]])], [WhatGccIsCalled="$withval" - if test "x$HostPlatform" = "xi386-unknown-mingw32"; then - # Canonicalise to :/path/to/gcc - withval=`cygpath -w ${withval} | sed -e 's@\\\\@/@g' ` + if test "x$HostPlatform" = "xi386-unknown-mingw32" + then + if test ${OSTYPE} != "msys" + then + # Canonicalise to :/path/to/gcc + withval=`cygpath -w ${withval} | sed -e 's@\\\\@/@g' ` + fi fi; CC="$withval"], [WhatGccIsCalled="gcc"] @@ -774,7 +783,12 @@ case $Catalog in glafp*) case $HostOS_CPP in mingw32) - Catalog=`cygpath -w $hardtop/$Catalog` + if test ${OSTYPE} == "msys" + then + Catalog=$hardtop/$Catalog + else + Catalog=`cygpath -w $hardtop/$Catalog` + fi ;; *) Catalog=$hardtop/$Catalog ;; @@ -1198,7 +1212,7 @@ else fi dnl ** check for math library -AC_CHECK_LIB([m], [main], [LIBM="-lm"], [LIBM=]) +AC_CHECK_LIB([m], [atan], [LIBS="-lm $LIBS"; LIBM="-lm"], [LIBM=]) AC_SUBST([LIBM]) dnl ** check for X Window System @@ -1309,8 +1323,6 @@ else AC_SUBST(HaveRtldNow) fi -FPTOOLS_CHECK_LIB_NOWARN(m, atan) - dnl ---------- usleep ---------- dnl --- stolen from guile configure --- dnl --- FIXME: /usr/include/unistd.h can't be right? @@ -1388,7 +1400,13 @@ FPTOOLS_UNDERSCORE dnl ** check for ld, and whether ld has -x option AC_PATH_PROG(LdCmdRaw, ld) case $HostOS_CPP in - mingw32) LdCmd=`cygpath -w ${LdCmdRaw} | sed -e 's@\\\\@/@g' ` + mingw32) + if test ${OSTYPE} == "msys" + then + LdCmd=${LdCmdRaw} + else + LdCmd=`cygpath -w ${LdCmdRaw} | sed -e 's@\\\\@/@g' ` + fi ;; *) LdCmd=${LdCmdRaw} ;;