delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/03/15/10:55:51

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: <029701c0ad60$66becd60$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: "Akim Demaille" <akim AT epita DOT fr>
Cc: <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><00c801c0ad36$01ec3370$0200a8c0 AT lifelesswks><mv466hb5ohw DOT fsf AT nostromo DOT lrde DOT epita DOT fr><011a01c0ad41$c0fbc9a0$0200a8c0 AT lifelesswks><mv4snkf43ot DOT fsf AT nostromo DOT lrde DOT epita DOT fr><01b801c0ad4b$9b2f1380$0200a8c0 AT lifelesswks><mv4k85r42vu DOT fsf AT nostromo DOT lrde DOT epita DOT fr><01c401c0ad4c$7e469ad0$0200a8c0 AT lifelesswks><mv4bsr341z1 DOT fsf AT nostromo DOT lrde DOT epita DOT fr><000001c0ad53$b37dc9b0$9865fea9 AT edward> <3AB0C6A2 DOT 8AFE126C AT yahoo DOT com><023d01c0ad57$68af41d0$0200a8c0 AT lifelesswks><026c01c0ad5b$4a2a76e0$0200a8c0 AT lifelesswks> <mv4zoen1456 DOT fsf AT nostromo DOT lrde DOT epita DOT fr>
Subject: Re: win32 compiler test V3a
Date: Fri, 16 Mar 2001 01:58:25 +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 14:52:39.0046 (UTC) FILETIME=[94735A60:01C0AD5F]

This is a multi-part message in MIME format.

------=_NextPart_000_0294_01C0ADBC.96A84180
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit


----- Original Message -----
From: "Akim Demaille" <akim AT epita DOT fr>
To: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
Cc: <cygwin-apps AT sources DOT redhat DOT com>; <autoconf AT gnu DOT org>
Sent: Friday, March 16, 2001 1:46 AM
Subject: Re: win32 compiler test V3a


>
> | Hopefully this is it (barring a rename on the high level interface.
> | I missed the CPPFLAGS in the last version..
> | If you're code is portable this is effective with a simple
> | AC_API_WIN32
>
> You should really read the CVS Autoconf documentation.  Your quotation
> is dangerous at some points, and there are a few suggestions in there
> on how to unobfuscate M4 code.

I've been going through it as I went through this work.. thanks for the
improvements.


> | AC_REQUIRE([AC_PROG_CC])
>
> dnl at the end

what do you mean by this?

>
> | echo $ECHO_N "checking how to access the Win32 API..." >&6
>
> This is wrong, use the AC_FD_* if you need to, otherwise you certainly
> mean AC_MSG_*

The curse of reading other peoples code : I got this from a
/usr/share/aclocal/ routine

>
> | WIN32FLAGS=
> | AC_TRY_COMPILE(,[#ifndef WIN32
> | #ifndef _WIN32
> | #error WIN32 or _WIN32 not defined
> | #endif
> | #endif],
>
> #error is suspected to cause problems, although I don't recall having
> seen it happen.  Please indent cpp directives.

I'm not quite sure whether you meant indent all of them a certain
amount, or use heirarchical indenting on them..

>
> Huh?  Don't, AC_DEFUN did for you.

Oops. misread a comment in the autoconf manual, Thanks.

> | AC_DEFUN(AC_PROG_CXX_WIN32, [
>
> Same comments.
>
> | AC_DEFUN(AC_API_WIN32, [
> | dnl high level interface for finding out compiler support for win32.
> |
> | AC_LANG_CASE([C], AC_PROG_CC_WIN32 [CFLAGS="$WIN32FLAGS $CFLAGS"
> | CPPFLAGS="$WIN32FLAGS $CPPFLAGS"],
> |              [C++], AC_PROG_CXX_WIN32 [CXXFLAGS="$WIN32FLAGS
$CXXFLAGS"
> | CPPFLAGS="$WIN32FLAGS $CPPFLAGS"],
> |              [echo "No macro support for WIN32 with $_AC_LANG"
> |                 exit 1])
> | ])
>
> Use AC_FATAL.  Quote the exec parts.  And in fact, just factor
> AC_PROG_CXX_WIN32 as an AC_REQUIRE of this macros.
>
I had a problem with _AC_LANG not being found by autoconf with your
suggested code. In fact I'm not sure that $_AC_LANG will be found
either.

Rob

------=_NextPart_000_0294_01C0ADBC.96A84180
Content-Type: application/octet-stream;
	name="acinclude.m4"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="acinclude.m4"

dnl COMPILER WIN32 support =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
# figure out how to run CC with access to the win32 api if present=0A=
# configure that as the CC program, =0A=
# WIN32 may be present with WINE, under cygwin, or under mingw,=0A=
# or cross compilers targeting those same three targets.=0A=
# as it happens, I can only test cygwin, so extra input here will be =
appreciated=0A=
# send bug reports to Robert Collins <rbtcollins AT hotmail DOT com>=0A=
#=0A=
# logic: is CC already configured? if not, call AC_PROG_CC.=0A=
# if so - try it. If that doesn't work ,try -mwin32. If that doesn't =
work, fail=0A=
#=0A=
# 2001-03-15 - Changed from yes/no to true/false -suggested by Lars J =
Aas<larsa AT sim DOT no>=0A=
# 	* Change true to : - suggest by Alexandre Oliva =
<oliva AT lsd DOT ic DOT unicamp DOT br>=0A=
#	* changed layout on the basis of autoconf mailing list:=0A=
#		there are now two interfaces, a language specific one which sets=0A=
#		or clears WIN32 && WIN32FLAGS as appropriate=0A=
#	* m4 Syntax fixup: Akim Demaille <akim AT epita DOT fr>=0A=
#=0A=
# All faults& bugs are mine - Robert=0A=
=0A=
AC_DEFUN([AC_PROG_CC_WIN32], [=0A=
AC_REQUIRE([AC_PROG_CC])=0A=
AC_MSG_CHECKING([how to access the Win32 API])=0A=
WIN32FLAGS=3D=0A=
AC_TRY_COMPILE(,[#ifndef WIN32=0A=
    #ifndef _WIN32=0A=
	#error WIN32 or _WIN32 not defined=0A=
    #endif=0A=
#endif], [=0A=
dnl found windows.h with the current config.=0A=
AC_MSG_RESULT([present by default])=0A=
], [=0A=
dnl try -mwin32=0A=
ac_compile_save=3D"$ac_compile"=0A=
dnl we change CC so config.log looks correct=0A=
save_CC=3D"$CC"=0A=
ac_compile=3D"$ac_compile -mwin32"=0A=
CC=3D"$CC -mwin32"=0A=
AC_TRY_COMPILE(,[#ifndef WIN32=0A=
    #ifndef _WIN32=0A=
	#error WIN32 or _WIN32 not defined=0A=
    #endif=0A=
#endif], [=0A=
dnl found windows.h using -mwin32=0A=
AC_MSG_RESULT([found via -mwin32])=0A=
ac_compile=3D"$ac_compile_save"=0A=
CC=3D"$save_CC"=0A=
WIN32FLAGS=3D"-mwin32"=0A=
], [=0A=
ac_compile=3D"$ac_compile_save"=0A=
CC=3D"$save_CC"=0A=
AC_MSG_RESULT([not found])=0A=
])=0A=
])=0A=
=0A=
])=0A=
=0A=
=0A=
# figure out how to run CXX with access to the win32 api if present=0A=
# configure that as the CXX program,=0A=
# WIN32 may be present with WINE, under cygwin, or under mingw,=0A=
# or cross compilers targeting those same three targets.=0A=
# as it happens, I can only test cygwin, so extra input here will be =
appreciated=0A=
# send bug reports to Robert Collins <rbtcollins AT hotmail DOT com>=0A=
=0A=
AC_DEFUN([AC_PROG_CXX_WIN32], [=0A=
AC_MSG_CHECKING([how to access the Win32 API])=0A=
WIN32FLAGS=3D=0A=
AC_TRY_COMPILE(,[#ifndef WIN32=0A=
    #ifndef _WIN32=0A=
	#error WIN32 or _WIN32 not defined=0A=
    #endif=0A=
#endif], [=0A=
dnl found windows.h with the current config.=0A=
AC_MSG_RESULT([present by default])=0A=
], [=0A=
dnl try -mwin32=0A=
ac_compile_save=3D"$ac_compile"=0A=
dnl we change CC so config.log looks correct=0A=
save_CXX=3D"$CXX"=0A=
ac_compile=3D"$ac_compile -mwin32"=0A=
CXX=3D"$CXX -mwin32"=0A=
AC_TRY_COMPILE(,[#ifndef WIN32=0A=
    #ifndef _WIN32=0A=
	#error WIN32 or _WIN32 not defined=0A=
    #endif=0A=
#endif], [=0A=
dnl found windows.h using -mwin32=0A=
AC_MSG_RESULT([found via -mwin32])=0A=
ac_compile=3D"$ac_compile_save"=0A=
CXX=3D"$save_CXX"=0A=
WIN32FLAGS=3D"-mwin32"=0A=
], [=0A=
ac_compile=3D"$ac_compile_save"=0A=
CXX=3D"$save_CXX"=0A=
AC_MSG_RESULT([not found])=0A=
])=0A=
])=0A=
=0A=
])=0A=
=0A=
=0A=
AC_DEFUN(AC_API_WIN32, [=0A=
dnl high level interface for finding out compiler support for win32.=0A=
=0A=
AC_LANG_CASE([C],	AC_PROG_CC_WIN32 [CFLAGS=3D"$WIN32FLAGS $CFLAGS"=0A=
CPPFLAGS=3D"$WIN32FLAGS $CPPFLAGS"],=0A=
             [C++],	AC_PROG_CXX_WIN32 [CXXFLAGS=3D"$WIN32FLAGS $CXXFLAGS"=0A=
CPPFLAGS=3D"$WIN32FLAGS $CPPFLAGS"],=0A=
             [AC_FATAL([No macro support for WIN32 with $_AC_LANG]) ])=0A=
])=0A=
=0A=
dnl end compiler WIN32 support =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=

------=_NextPart_000_0294_01C0ADBC.96A84180--

- Raw text -


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