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: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Message-ID: <009301c0ad33$13de5890$9865fea9@edward> From: "edward" To: "Robert Collins" , "Akim Demaille" Cc: , References: <035401c0ac91$3ba21fd0$0200a8c0 AT lifelesswks><022001c0accf$29b724d0$0200a8c0 AT lifelesswks> <009901c0ad30$edf3d7b0$0200a8c0 AT lifelesswks> Subject: Re: updated win32 macro Date: Thu, 15 Mar 2001 04:33:43 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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-Apparently-From: Swiftnsavv AT aol DOT com ----- Original Message ----- From: "Robert Collins" To: "Akim Demaille" Cc: ; Sent: Thursday, March 15, 2001 4:18 AM Subject: Re: updated win32 macro > ----- Original Message ----- > From: "Akim Demaille" > To: "Robert Collins" > Cc: ; > Sent: Thursday, March 15, 2001 8:23 PM > Subject: Re: updated win32 macro > > > > > > | Sample code to use it in configure.in, when the program _needs_ the > > | win32 API: > > | > > | AC_CANONICAL_HOST > > | > > | case "${host}" in > > | *-*-cygwin*) > > | AC_PROG_CC_WIN32 > > | if $ac_cc_win32; then > > | dnl do nothing here - any header checks /library checks etc > > | later in configure.in will now pass > > | else > > | echo "configure: error: Win32 API needed and no > acceptable > > | cc could be found" 1>&2; > > | exit 1; > > | fi ;; > > | esac > > > > 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. > 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 =) > > Rob