autoconf
[Top][All Lists]
Advanced

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

Re: Unneeded PACKAGE_TARNAME in config.h


From: Steven G. Johnson
Subject: Re: Unneeded PACKAGE_TARNAME in config.h
Date: Wed, 30 Apr 2003 19:33:57 -0400 (EDT)

Your argument "for" prefixing every macro sounds to me like a strong
argument against!  As you point out, it means changing *every* place in
your code (maybe including code you didn't write yourself) that refers to
an autoconf macro to use the new name...a painful and error-prone prospect
if your project is of any size.

In contrast, having a separate manual fooconf.h.in avoids these
difficulties.  Moreover, it involves only *one* file and is probably quite
easy to write since your installed header file is unlikely to require more
than a few configure-dependent symbols (anything more than that may
indicate some design flaw in your library interface).  (I would even put
the defines in your main foo.h header file, on the principle that fewer
installed files is better.)

Steven

On Thu, 1 May 2003, Guido Draheim wrote:
> Au contraire, what can be easier than injecting a single macro
> into your configure script? No need to manually edit a myconf.h.in
> file, and to keep it sane along! Sure, one does not need _all_
> the symbols generated, well. - And there's one more thing: people
> that use autoconf are used to set #ifdef HAVE_* things all around,
> and they can switch over just easily. So you come around and turn
> your program into a library (a common way of evolution by the way)
> with all those HAVE_* things around and in the headers, now all
> you need to do is to place #ifdef PKG_HAVE_* things in there instead.
> It couldn't be easier! No brainwork here! How do you beat that? ;-)=)





reply via email to

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