[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get a literal #undef into config.h
From: |
Stepan Kasal |
Subject: |
Re: How to get a literal #undef into config.h |
Date: |
Tue, 25 Oct 2005 12:49:42 +0200 |
User-agent: |
Mutt/1.4.1i |
Hello,
On Mon, Oct 24, 2005 at 06:44:07PM -0600, Brian wrote:
> I need to get #undef KEY into config.h, but even with AH_VERBATIM or
> AH_BOTTOM autoheader turns it into #define KEY 1.
use
AH_BOTTOM([#include <custom.h>])
and place your corrections to custom.h. It is "bottom", so you have all
the tesults of autoconf checks at your hand.
gawk-3.1.5.tar.bz2 can serve as an example of this technique.
> While i'm at it, is it necessary to have -DHAVE_CONFIG_H? Not that I see a
> way to get rid of it, just trying to clean up the command line.
It's easy to get rid of it:
AC_CONFIG_COMMANDS_PRE([DEFS=])
Bot you could break some things which rely on this define:
1) gnulib -- most of gnulib modules rely on HAVE_CONFIG_H
2) ansi2knr.c -- if you are using the ansi2knr option of Automake.
In theory, small projects need not use config.h; DEFS would then become a
list of all defines, -DHAVE_STRING_H=1 -DVERSION=1.0.0 etc.
gnulib and ansi2knr.c still try to be compatible with this.
Have a nice day,
Stepan Kasal