bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error: possibly undefined macro: AC_CHECK_HEADERS_ONCE


From: Stepan Kasal
Subject: Re: error: possibly undefined macro: AC_CHECK_HEADERS_ONCE
Date: Thu, 25 Aug 2005 18:02:06 +0200
User-agent: Mutt/1.4.1i

Hello,

On Thu, Aug 25, 2005 at 05:06:55PM +0200, Bruno Haible wrote:
>  AC_INIT(regexp, 1.0, clisp-list)
> +AC_GNU_SOURCE
>  AC_CONFIG_SRCDIR(regexp.lisp)

> That might be a little too early,  [...]
> I would put it after the determination of CC and CPP, but
> before all AC_CHECK_HEADER and AC_CHECK_FUNC tests:
>...
>  AC_PROG_CC
>  AC_PROG_CPP
>  AC_AIX
> +AC_GNU_SOURCE
>  AC_HEADER_STDC

yes, this is probably a good idea.  The gnulib manual also says that gl_EARLY
should be called right after AC_PROG_CC.

But as far as the artificial configure.ac is concerned, I think calling
AC_GNU_SOURCE right after AC_INIT doesn't make it worse, so it can be
left the way I did it.

> [...] because AC_GNU_SOURCE emits a definition into the config header,
> but before AC_CONFIG_HEADERS it doesn't know the file name...

No, AC_CONFIG_HEADERS has nothing to do with this.  During the run of
./configure, the AC_DEFINES are collected.  At the end of the day,
AC_OUTPUT engraves them all into all config headers.

>From the perspective of Autoconf and ./configure, config headers can
be declared anywhere (between AC_INIT and AC_OUTPUT, of course).

>From the perspective of autoheader, the name of the first of the declared
config headers is important.  But autoheader doesn't care about AC_DEFINEs,
and it has nothing to do with ./configure execution.

All these facts should be deducable from the Autoconf manual.  I have
recently fixed some of this in CVS; if the CVS version of manual doesn't
describe the situation clearly, suggestions are welcome.

Have a nice day,
        Stepan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]