On Fri, Jul 29, 2005 at 12:13:11AM +0100, Ian Lynagh wrote:
>
> The problem here is apparently that $target isn't geting set for
>
> case $target in
> *msys*|*mingw*)
> SYS=windows
> ;;
> esac
>
> in configure.ac without AC_CANONICAL_TARGET, which in turn means
> dragging in config.{sub,guess}. Does anyone know why this has (I assume)
> worked for other people in the past but doesn't for Vaclav now?
I don't greatly mind including config.guess, but am wondering if it isn't
an awfully big stick with which to solve this problem. Since we already
require that ghc be available, mightn't we be able to write a little
haskell test program that checks whether we're in windows? I imagine
something trivial like
cat > config.hs <<EOF
#ifdef WIN32
main = putStr "windows"
#else
main = fail "not windows"
#endif
EOF
ghc -cpp -o config.test config.hs
SYS=`./config.test`
Only ideally this would be written as an m4 macro in aclocal.m4 using
TRY_RUN_GHC... which could actually come out to something like
TRY_RUN_GHC([
{-# OPTIONS -cpp #-}
#ifdef WIN32
main = putStr "windows"
#else
main = fail "not windows"
#endif
], [SYS=windows],
[SYS=other],
dnl The following indicates that the compile itself failed (shouldn't happen)
[SYS=unknown])
This would seem prettier than including the entire config.guess and
config.sub (which check for interesting systems like the Cray T3D--the
first supercomputer I ever used was a Cray T3E... but it's retired now).
--
David Roundy
http://www.darcs.net
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel