[Top][All Lists]

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

Re: AC_DEFINE* with 2 args discouraged?

From: Guido Draheim
Subject: Re: AC_DEFINE* with 2 args discouraged?
Date: Mon, 01 Dec 2003 20:51:15 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313

Ralf Wildenhues wrote:
* Guido Draheim wrote on Mon, Dec 01, 2003 at 09:25:39AM CET:

Ralf Wildenhues wrote:


Now current CVS autoheader (2.59a) gives me
|autoheader: warning: missing template: _LIBFOO_FEATURE_BAZ
|autoheader: Use AC_DEFINE([_LIBFOO_FEATURE_BAZ], [], [Description])

Is this deprecated usage?  How is my goal best accomplished?
Is having duplicate sets of defines in config.h/libfoo_conf.h the
solution of choice?  Then I'd suggest the description in
info '( Symbols' to be more precise (where
only the usage with one parameter is explicitly discouraged).

You do know about AX_PREFIX_CONFIG_H, do you?

No, I didn't before.  Looks like a good idea, except for the minor
cosmetic issue of having numerous exposed macros which do not belong
to the library interface.  Thanks for the suggestion, though, this
looks like the easiest and least error-prone solution.

yes and yes and yes. It puts in a lot but those defines are not
for the library user anyway - make up derived exported #defines
in your main library header and document them. It's simply a very
easy and safe solution, and it makes it a _lot_ easier to turn
some procedure package into a library project. It just needs an
extra macro and an extra #include, the rest will follow. ;-)

BTW, current CVS autotools will break the example given in
ax_prefix_config_h.m4 unless obsolete AM_CONFIG_HEADER is replaced

It does work on my system but those are not cvs level. Hmmmm.

Still there is the Autoconf documentation issue with AC_DEFINE*,
namely that I would like to know if usage with 2 args is deprecated.

the manual says "`autoheader' needs you to document all
of the symbols that you might use; i.e., there must be at least one
`AC_DEFINE' or one `AC_DEFINE_UNQUOTED' call with a third argument for
each symbol" ... here I see "there MUST be (at least one)".

have fun,
-- guido                        
GCS/E/S/P C++/++++$ ULHS L++w- N++@ d(+-) s+a- r+@>+++ y++ 5++X- (geekcode)

reply via email to

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