diff options
author | Ian Lynagh <igloo@earth.li> | 2007-04-06 15:18:22 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-04-06 15:18:22 +0000 |
commit | 5c789e424c1461c1dadfd38c44fcb9e8f38bf755 (patch) | |
tree | 6467bad90d99d7400c460e01bde1d973d05893cf /aclocal.m4 | |
parent | de777ba42eb12b6a20e548a959b23b60179d9b57 (diff) | |
download | haskell-5c789e424c1461c1dadfd38c44fcb9e8f38bf755.tar.gz |
Fixes for building the libraries with cabal on Windows
* configure can be told where ld is
* make an hsc2hs-inplace.bat
* tell Setup configure about foo.bar rather than foo on Windows
* tell Setup configure to pass a --with-cc=$(CC) argument to ./configure
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 1daac0405a..5755dbe6e7 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -319,24 +319,30 @@ AC_SUBST(AlexVersion) # Sets the output variable LdCmd to the (non-Cygwin version of the) full path # of ld. Exits if no ld can be found AC_DEFUN([FP_PROG_LD], -[AC_PATH_PROG([fp_prog_ld_raw], [ld]) -if test -z "$fp_prog_ld_raw"; then - AC_MSG_ERROR([cannot find ld in your PATH, no idea how to link]) +[ +if test -z "$1" +then + AC_PATH_PROG([fp_prog_ld_raw], [ld]) + if test -z "$fp_prog_ld_raw"; then + AC_MSG_ERROR([cannot find ld in your PATH, no idea how to link]) + fi + LdCmd=$fp_prog_ld_raw + case $HostPlatform in + *mingw32) if test x${OSTYPE} != xmsys; then + LdCmd="`cygpath -w ${fp_prog_ld_raw} | sed -e 's@\\\\@/@g'`" + AC_MSG_NOTICE([normalized ld command to $LdCmd]) + fi + # Insist on >= ld-2.15.x, since earlier versions doesn't handle + # the generation of relocatable object files with large amounts + # of relocations correctly. (cf. HSbase.o splittage-hack) + fp_prog_ld_version=`${LdCmd} --version | sed -n '/GNU ld/p' | tr -cd 0-9 | cut -b1-3` + FP_COMPARE_VERSIONS([$fp_prog_ld_version],[-lt],[214], + [AC_MSG_ERROR([GNU ld version later than 2.14 required to compile GHC on Windows.])])[]dnl + ;; + esac +else + LdCmd="$1" fi -LdCmd=$fp_prog_ld_raw -case $HostPlatform in - *mingw32) if test x${OSTYPE} != xmsys; then - LdCmd="`cygpath -w ${fp_prog_ld_raw} | sed -e 's@\\\\@/@g'`" - AC_MSG_NOTICE([normalized ld command to $LdCmd]) - fi - # Insist on >= ld-2.15.x, since earlier versions doesn't handle - # the generation of relocatable object files with large amounts - # of relocations correctly. (cf. HSbase.o splittage-hack) - fp_prog_ld_version=`${LdCmd} --version | sed -n '/GNU ld/p' | tr -cd 0-9 | cut -b1-3` - FP_COMPARE_VERSIONS([$fp_prog_ld_version],[-lt],[214], - [AC_MSG_ERROR([GNU ld version later than 2.14 required to compile GHC on Windows.])])[]dnl - ;; -esac AC_SUBST([LdCmd]) ])# FP_PROG_LD |