Re: Support AX_CXX_COMPILE_STDCXX_11 macro in autoconf

Keith Marshall <[email protected]> Sat, 18 Jan 2020 22:18:00 +0000
Newsgroups gmane.comp.gnu.mingw.user
Organization MinGW.org Project
Message-ID <[email protected]>
On 18/01/2020 21:33, Anton Shepelev wrote:
> I had a warning about another macro:
> 
>    configure.ac:215: warning: macro `AM_PATH_ALSA' not found in library
> 
> which is indeed missing from my system,

The "AM_" namespace belongs to automake; automake knows this, and marks
it as a reserved namespace, so will issue diagnostics for unexpanded
macros within it.

> but it said nothing about AX_CXX_COMPILE_STDCXX_11.  Yet, it still is
> there in the generated script, unexpanded.
OTOH, the "AX_" namespace is an arbitrary choice of the independently
maintained autoconf extension macro archive; autoconf neither explicitly
supports this, nor AFAIK reserves the namespace.  Thus, unless your
configure.ac, or some m4 file either explicitly, or implicitly included
by autoconf marks "AX_" as a reserved namespace, any macros within that
namespace which are undefined at autoconf run time will be silently
copied, unexpanded, in the generated configure script.

>> Did you regenerate the configure script _after_ you copied
>> the m4 macro definition to your aclocal directory?  The
>> diagnostic suggests that you didn't.
> 
> Now I did.
> 
>> I don't see any mention of an autoconf version constraint, in the
>> documentation, to which you refer, for AX_CXX_COMPILE_STDCXX_11;
>> what makes you think that there may be one?>
> I thought so because it didn't work after I "installed" this macro
> into /usr/share/aclocal/ .
It isn't sufficient to just dump a macro file in /usr/share/aclocal; you
need to ensure that configure.ac includes, either directly or
indirectly, an m4_include reference for that macro file, _and_ that
autoconf is told to search in /usr/local/aclocal -- IIRC, it may not
automatically search there, (but I may be wrong).

> Now that I have regenerated the configuration script, seen
> no warning about this macro, and it has remained unexpanded,
> I don't know what to suggest.  I have made sure my
> `autogen.sh' invokes `autoconf'.

But does it supply a "-I /usr/local/aclocal" argument, to set that
search path, and does configure.ac have an m4_include for the macro
file, (and ideally an m4_pattern_forbid notification for the "AX_"
namespace).

And BTW, if you are struggling with autotool issues, you may get more
focused advice from autoconf-mXXj517/[email protected] (for autoconf), or automake-mXXj517/[email protected]
(for automake).

-- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F

_______________________________________________
MinGW-Users mailing list
[email protected]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.osdn.me/mailman/listinfo/mingw-users
Also: mailto:[email protected]?subject=unsubscribe
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEwZ7AGBVH3lDh1I9TwK02xjR+Wj8FAl4jhBgACgkQwK02xjR+
Wj8GKg/8DDyXI3SYfswwsSY6ld3nGfCLoI1uSnJ+7Ae/ZUd/Oh9U4YRosZtm9tpC
Cn96PmpjDL1XXU/QOTnUmCioOeYSmwfDkO9v1GTi5VdD+wNArcY6Av4xBYf+FhGF
vhY+DJ7oQHYsayUCFC6YT+nxbi1W+Xs/YAf65ulTOpeMTNQuN3IOGnEPh5piX/Qe
mo1GRJ8ws1dUieQwb/zqKpvN1+4/wKpCRsYKFYPSsyvrwgxbtzdR5k5R34L4fDFU
dybBUpq/max/BJPG/RJOQS8EVsAl78pdl562ov1PyZqk35cPNMn6kJ1zSLIYbVUd
CIuF2QFwGDuHeVyzTmSktTJZiT/D84U1UHjg5GLQDw5T5NZ92hp61ue90et6IF01
AI8RiyiU9d0qjWXv3hQWhQ0ar4CN4AFDKyK6Mh8XogeLeIDfKHExAePZOzIom1qp
NlT1NEbwfPNyGP8IQOP6v5GDepGG62cbF/EjTkfP7THrv+X1YD7vDbsMDs44bXSW
skblJ8N6iGC0mg0Nyl+vJZCrhRr8cMt3IyoJGS7zy+JEVldbFbH4ZhcHNO68ljKp
0hataa6vP4UCDV880hsW9Vgzht1OGf865VmxnlG0s6z5w2YUtAEEu3k3TNQZBkz2
Pk7VpyQ0U+0JgI6C3EijoWk2ef6EzcAiZvVYwNzAXF9oFN7viZk=
=MVnO
-----END PGP SIGNATURE-----