Simon Butcher wrote:
> 
> Hi Bruce,
> 
> Sorry for the delayed reply, I'm running around like a headless cook as
> I'm about to go live in Europe for several months. Quite a life-style
> change!

I guess so!  And my wife and I just decided to go to Melbourne this December...

> In options.def, I have:
> 
> flag = {
>    name         = "version";
>    value        = "v";
>    max          = "3";
>    descrip      = "Print version and copyright information";
> };
> 
> The name "version" is logical, as it allows for "--version", but
> unfortunately autoconf and automake define a nuisance of a define called
> 'VERSION' in the autoconf.h file, along with 'PACKAGE_VERSION' and so
> forth. When it comes time to write something such as COUNT_OPT(VERSION),
> I get this:
[[...]]
> src/ircd/ircd.cpp:69:43: pasting "INDEX_OPT_" and "" "" does not give a
> valid preprocessing token
> src/ircd/ircd.cpp: In function `int main(int, char**)':
> src/ircd/ircd.cpp:69: error: `INDEX_OPT_' undeclared (first use this
> function)

That argues well for every product/package to have a pretty-likely-to-
be-unique prefix on their names and avoid names that properly belong
to end users, e.g. VERSION.  As you said later, #undef the spurious
one emitted by autoconf.

Cheers & good luck on your European assignment - Bruce



Reply via email to