Re: AC_INCLUDES_DEFAULT
Eric Blake <[email protected]>
| Newsgroups | gmane.comp.sysutils.autoconf.bugs |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
On 3/19/19 10:19 AM, Reuben Thomas wrote:
> I'm trying to use this macro to indicate which headers should be used for
> e.g. AC_CHECK_SIZEOF, but the argument I supply is just copied verbatim
> into configure, and not used to set ac_includes_default. What am I doing
> wrong?
>
> For example:
>
> AC_INIT(foo, 0.1)
> AC_INCLUDES_DEFAULT([#include "foo.h"])
>
> I just find a line in configure with
>
> #include "foo.h"
>
> which is just a comment to m4.
That is behaving as documented. From the manual:
@defmac AC_INCLUDES_DEFAULT (@ovar{include-directives})
@acindex{INCLUDES_DEFAULT}
Expand to @var{include-directives} if present and nonempty, otherwise to:
...
If you want to see the default includes, you have to invoke
AC_INCLUDES_DEFAULT with an empty argument.
The manual does not describe a way to override the shell variable
$ac_includes_default at configure runtime. Looking at the
implementation in lib/autoconf/headers.m4, the variable is assigned via
m4_divert_text([DEFAULTS]) during AC_CHECK_INCLUDES_DEFAULT (which in
turn is required by a number of places, including when
AC_INCLUDES_DEFAULT is invoked without an argument), if you wanted to
try and override a different setting of that shell variable to be
effective at the point where the rest of configure then relies on the
contents of the variable.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlyRGHoACgkQp6FrSiUn Q2pp9gf5Ack2JYpewyhR3l1b6o+58xy7Z3vUbU1vBu6wvFdFJyvbBngVldDiO6+p FJf4gBBnz7qm7JYhF6lmvOSIlqqileoON8GVQn0n+zu8DwfNwQbAKgDSl2fnKFdD e71/lWQSKDMHwkOKANOHZzPMPBdqBUYf72MGnjjegk83yj8J/aEGfpCY2TgqPbb5 J0/rIaVxTQw8HvkLUzaeOk0BakKnIAIrs4nhzF4dRNkgllbwOxwMHdEpLEguHe/j xtHITc2pcTOyWHlbgC9Yrxjhtt79AyDH2Joa1ilLJ8nOQ/gCTZcx+C5igVGfMmEQ Zr1DOz3d+HIYgtbeeTjxADFFEMRBnQ== =mlQ1 -----END PGP SIGNATURE-----