[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoheader failing with multiple source AC_CONFIG_HEADERS
From: |
Noah Misch |
Subject: |
Re: autoheader failing with multiple source AC_CONFIG_HEADERS |
Date: |
Fri, 15 Jun 2007 16:24:44 -0700 |
User-agent: |
Mutt/1.5.9i |
On Thu, Jun 14, 2007 at 12:09:16PM +0100, Ross Burton wrote:
> I want to add some custom tests to config.h, so I do this:
>
> AC_CONFIG_HEADERS([config.h:config.h.in:config.h.post])
>
> Which I interpret from the documentation as generate config.h from
> config.h.in and config.h.post.
Correct.
> I have created config.h.post, and want
> autoheader to generate config.h.in. However, when autoheader runs it
> creates a file called "config.h.in:config.h.post".
This is certainly the wrong behavior. I'm not so sure of how to improve on it,
besides refusing to generate any header for this. In your example, a human can
easily guess that `config.h.in' is the header to be generated. Other cases will
be unclear; which header should `autoheader' generate of these?
AC_CONFIG_HEADERS([config.h:config.1:config.2:config.3:config.4])
For now, you can work around the problem like this:
1) Change configure.ac to use `AC_CONFIG_HEADERS([autoconfig.h])'.
2) Move `config.h.post' to `config.h' and add `#include <autoconfig.h>' up top.
If you need defines substituted into the current content of config.h.post,
you'll need to shuffle things a bit more.