----- Original Message -----
From: "Akim Demaille" <[EMAIL PROTECTED]>
To: "Robert Collins" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
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
acinclude.m4