This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: updated win32 macro


----- Original Message -----
From: "edward" <tailbert@yahoo.com>
To: "Robert Collins" <robert.collins@itdomain.com.au>; "Akim Demaille"
<akim@epita.fr>
Cc: <cygwin-apps@sources.redhat.com>; <autoconf@gnu.org>
Sent: Thursday, March 15, 2001 8:33 PM
Subject: Re: updated win32 macro


>
> ----- Original Message -----
> From: "Robert Collins" <robert.collins@itdomain.com.au>
> To: "Akim Demaille" <akim@epita.fr>
> Cc: <cygwin-apps@sources.redhat.com>; <autoconf@gnu.org>
> Sent: Thursday, March 15, 2001 4:18 AM
> Subject: Re: updated win32 macro
>
>
> > ----- Original Message -----
> > From: "Akim Demaille" <akim@epita.fr>
> > To: "Robert Collins" <robert.collins@itdomain.com.au>
> > Cc: <cygwin-apps@sources.redhat.com>; <autoconf@gnu.org>
> > Sent: Thursday, March 15, 2001 8:23 PM
> > Subject: Re: updated win32 macro
> >
> >
> > >
> > > My opinion is that AC_PROG_CC_WIN32 should contain an AC_REQUIRE
of
> > > AC_CANONICAL_HOST, and should ensure the case $host itself.
> > >
>
> that's my suggestion as well.
>
> > Why? There is no side effect if it is tested for on platforms other
than
> > cygwin. And by being a little bit more generic less changes will be
> > needed to work with (say) WINE. Or on a cross-compile chain.
>
> you don't lose any generality. what you gain is assurance that you are
> testing on a relevant platform.

No we don't - that was my point - by wrapping it in a case statement, if
someone ports Win32 to linux, and addes -mwin32 to gcc on linux, it
won't work. See my just mailed reply to Akim for a much better test
method (once my brain was fed Coca Cola :] ).

> > And the developer writing the configure test will still need to
decide
> > what to do if it fails && they are compiling on cygwin, so they
still
> > need a case statement.
>
> ps. you might consider extending it to handle optional arguments, a-la
>
> AC_PROG_CC_WIN32(HAVE_WIN32, [echo imma winnie], [echo imma no win])
>
> implementation is left as an exercise to you =)

I thought about that, and I figure that the answer is: If you don't want
Win32, don't call the macro. Dead easy.

Rob



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]