ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/03/15/04:56:05

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Message-ID: <00c801c0ad36$01ec3370$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: "Akim Demaille" <akim AT epita DOT fr>
Cc: "Alexandre Oliva" <oliva AT lsd DOT ic DOT unicamp DOT br>,
<cygwin-apps AT sources DOT redhat DOT com>, <autoconf AT gnu DOT org>
References: <035401c0ac91$3ba21fd0$0200a8c0 AT lifelesswks><022001c0accf$29b724d0$0200a8c0 AT lifelesswks><orelvz60mr DOT fsf AT guarana DOT lsd DOT ic DOT unicamp DOT br><007f01c0ad2e$f3dc5d20$0200a8c0 AT lifelesswks><00a301c0ad32$57ad0220$0200a8c0 AT lifelesswks> <mv4elvz5pma DOT fsf AT nostromo DOT lrde DOT epita DOT fr>
Subject: Re: updated win32 macro
Date: Thu, 15 Mar 2001 20:54:50 +1100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-OriginalArrivalTime: 15 Mar 2001 09:49:10.0764 (UTC) FILETIME=[2F7802C0:01C0AD35]


----- Original Message -----
From: "Akim Demaille" <akim AT epita DOT fr>


> >>>>> "Robert" == Robert Collins <robert DOT collins AT itdomain DOT com DOT au>
writes:
>
> Robert> It looks like the cc result is not used from cache - so I
> Robert> don't think this test should allow caching. Also I have a
> Robert> question on the caching: I need to cache _the change needed to
> Robert> CC_... Is that temporary variable automatically cached?
>
> If you ac_cv_ it, yes.  But never display a cache variable to the
> user.

Understood (now).

> You macro, indeed, is fragile to the changes of LANG.  I'm not sure
>
> AC_PROG_CC_WIN32
> AC_LANG(C++)
> AC_LANG(C)
> echo $ac_compile
>
> will display what you hope it would.  And actually, now that coffee
> suddenly breaks my mind free, I just understood you meant to do here:
>
> ac_cc_win32=yes
> ac_compile="$ac_compile -mwin32"
> ac_link="$ac_link -mwin32"
> CC="$CC -mwin32"
>
> this is `wrong'.  ac_compile and friends are not evaluated at their
> definition, but at their uses.  So you need not (and must not) change
> them at all.  Changing CC is a bad idea.  And BTW, my suggestion
> behind the C++ stuff was that, IMHO, you should not set CC, or maybe
> at least provide the user with a means to get the switch, say the
> variable $WIN32CFLAGS.

Ah, Well I answered a different question then :]

> AC_LANG_COMPILER_MWIN32([YES-WIN32], [NOT-WIN32])
>
> I would be able to write
>
> AC_LANG_COMPILER_MWIN32([CC="$CC $WIN32CFLAGS])
> CXX="$CXX $WIN32CFLAGS"
>

Ok problem here: that might not be valid for CXX. AFAIK it happens to be
on cygwin, but I can't vouch for other scenarios (WINE comes to mind
again). For that reason I suggest a separate test for each language.

I've copied from your next email to prevent us having 20 concurrent
threads..

> Then it seems to me that the interface is not right.  Maybe something
> like
>
> AC_HEADER_WINDOWS

Good suggestion. Then the developer can simply check for HAVE_WINDOWS_H
afterwards.. I like :]
What about the language specific issues? Or should AC_HEADER_WINDOWS
look for _every_ compiler that it knows how to set WIN32 on?

>
> which would do the whole thing might be what you need.  Also, why do
> you set CC and not CFLAGS (and maybe LDFLAGS)?  This is a tricky
> question, I often wondered, not only in the present case.
>

Because I misunderstood the ac_* variable vs the CAPITALISED ONES.
Does this mean I get to set CC again?

Rob


- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019