[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_INCLUDES_DEFAULT
From: |
Eric Blake |
Subject: |
Re: AC_INCLUDES_DEFAULT |
Date: |
Tue, 19 Mar 2019 11:27:38 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
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
Description: OpenPGP digital signature