autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc -mno-cygwin and autoconf 2.50


From: Tim Van Holder
Subject: Re: gcc -mno-cygwin and autoconf 2.50
Date: 30 May 2001 08:23:16 +0200

On 29 May 2001 23:20:26 +0200, Teun Burgers wrote:
> Hi
> 
> I am maintaining the configure script for
> gnugo (http://www.fsf.org/software/gnugo/)
> 
> Under autoconf 2.13 when you had AC_EXEEXT
> in you configure.in you could do under cygwin
> a mingw32 build as follows:
> 
> env CC='gcc -mno-cygwin' ./configure
> 
> AC_EXEEXT would set ac_cv_mingw32=yes,
> so you were able to test for mingw32.
> 
> For instance I had the test
> if test $ac_cv_mingw32=yes;then
>    LIBS="$LIBS -lwsock32"
> fi
> 
> Under autoconf 2.50 this does not work,
> since ac_canonical_host will detect cygwin.
> 
> I can work around this by writing a header
> test for __MINGW32__
> What do you think is the best solution to this problem?
> 

Either that, or patching config.guess so it'll detect the right
environment to begin with.
Problem is that you're really using Cygwin, which just happens to be
able to behave like mingw32 - so some tests for cygwin may actually do
the right thing.  For example, using gcc -mno-cygwin does not cause a
change in behaviour for tools other than gcc; so if some configure.in
checks $host for cygwinnity, it might be to decide whether it should use
the system's sed or not - that test should behave in a cygwin-like
fashion for you as well, regardless of whether you're generating mingw32
code.

Of course, if you need to specify CC anyway, you might as well specify
your host system too:

    ./configure CC='gcc -mno-cygwin' --host=i386-pc-mingw32

After all, you're basically cross-compiling, aren't you.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]