bug-gnulib
[Top][All Lists]
Advanced

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

Re: Gnulib needed in AC_CHECK_HEADERS


From: Sylvain Beucler
Subject: Re: Gnulib needed in AC_CHECK_HEADERS
Date: Wed, 26 Dec 2007 21:35:35 +0100
User-agent: Mutt/1.5.17 (2007-11-01)

On Wed, Dec 26, 2007 at 06:24:35PM +0100, Bruno Haible wrote:
> Sylvain Beucler wrote:
> > it seems alloca.h is not yet present at ./configure time
> > (there's only gnulib/lib/alloca.in.h). So AC_CHECK_HEADERS fails
> > anyway:
> > 
> > configure:14417: checking SDL.h usability
> > configure:14434: i586-mingw32msvc-gcc -c -g -O2
> > -I/usr/local/cross-tools/i386-mingw32/include/SDL -D_GNU_SOURCE=1 
> > -Dmain=SDL_main 
> > -I/usr/local/cross-tools/i386-mingw32/include/SDL -D_GNU_SOURCE=1 
> > -Dmain=SDL_main
> > -I../gnulib/lib -I./gnulib/lib conftest.c >&5
> > In file included from 
> > /usr/local/cross-tools/i386-mingw32/include/SDL/SDL_main.h:26,
> >                  from 
> > /usr/local/cross-tools/i386-mingw32/include/SDL/SDL.h:28,
> >                  from conftest.c:117:
> > /usr/local/cross-tools/i386-mingw32/include/SDL/SDL_stdinc.h:169:22: error: 
> > alloca.h: No such
> > file or directory
> 
> This should be fixable by using AH_VERBATIM instead of AC_DEFINE to define
> HAVE_ALLOCA_H. As I understand it, AC_DEFINE makes the macro available
> immediately, at configure time, whereas AH_VERBATIM makes it available only
> after configuration, when config.h is created.

Hi,

It seems to me that somehow alloca.h should be available for the tests
(since we will use alloca.h during the actual compilation). Not using
alloca.h during tests would make the test environment different than
the compilation environment. alloca.h could be pre-created or provided
in a temporary include path. Just my 2c :)

> See patch below (untested).

I get:
/usr/bin/m4:configure.ac:90: recursion limit of 1024 exceeded, use -L<N> to 
change it


> Paul Eggert wrote:
> > Well, it _has_ been 3 years.  If the backward-compatibility gorp is
> > causing real problems, perhaps it's time to bite the bullet and drop
> > it, something like the following.  This won't affect coreutils or
> > diffutils or tar or any modernish program.  What would it hurt?
> 
> The problems mentioned in the 2004 thread
>   http://lists.gnu.org/archive/html/bug-gnulib/2004-04/threads.html#00021
> have not gone away.
>   - The autoconf manual still recommends to include <alloca.h> only if
>     HAVE_ALLOCA_H.
>   - fnmatch.c and regex.c are still included in gcc's libiberty. Its regex.c
>     also includes <alloca.h> only if HAVE_ALLOCA_H.
> 
> So, if AH_VERBATIM solves Sylvain's problem, I would prefer to not disturb
> all the sources which follow the advice in the autoconf manual.
> 
> Paul, what do you think?
> 
> Bruno




reply via email to

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