autoconf
[Top][All Lists]
Advanced

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

Re: How to generate a config.h with ONLY my #defines?


From: Joakim Tjernlund
Subject: Re: How to generate a config.h with ONLY my #defines?
Date: Sun, 23 Oct 2011 14:35:42 +0200

Bob Friesenhahn <address@hidden> wrote on 2011/10/21 20:25:27:
>
> On Fri, 21 Oct 2011, Joakim Tjernlund wrote:
>
> > I want to control the exact contents of this file to only hold the
> > explicit AC_DEFINE's I do in configure.ac so I can avoid any symbol
> > collisions.
> >
> > Is this possible somehow?
>
> Yes, and no.  This is how I do it in GraphicsMagick:
>
> # Generate configure header.
> AC_CONFIG_HEADERS([magick/magick_config.h magick/magick_config_api.h])
>
> The first listed configuration header is automatically managed by
> Autoconf and includes whatever it prefers.  The second listed
> configuration header is managed by me and requires a
> manually-maintained magick_config_api.h.in file, which must be a
> subset of configuration defines from the first listed file.

I see, got it to work here.
It is, like you said, tedious and error prone to maintain the second
file manually.
autoheader really needs some way to just care for explicit AC_DEFINE
in configure.ac though.

 Jocke




reply via email to

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