autoconf
[Top][All Lists]
Advanced

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

Re: How to get a literal #undef into config.h


From: Brian
Subject: Re: How to get a literal #undef into config.h
Date: Tue, 25 Oct 2005 08:45:57 -0600

Great thanks for the tips. I see its a bit chicken and egg, but is there a
reason config.h couldn't just define HAVE_CONFIG_H?

On 10/25/05, Stepan Kasal <address@hidden> wrote:
>
> 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
>
>
> _______________________________________________
> Autoconf mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/autoconf
>



--
Cheers,
Brian Mingus
AIM, Skype: BReflection
Google talk: address@hidden
Phone: (720) 771-2599

reply via email to

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