| > Maybe AC_DEFINE(`echo FOO`) used to be understood by autoheader, but
| > it was a misfeature. In the general case, this cannot be done,
| > hence it must never work :)
|
| AC_DEFINE_UNQUOTED(`echo FOO`). Why can't it work? What happened in
| 2.13 was that you ended up with
|
| cat << END
| #undef `echo FOO`
| END
:) This is what I call not to work properly :) Try with your $x for
instance. It would work only for trivial examples.
| in configure. I can't see a problem with this.
|
| - Macro: AC_DEFINE_UNQUOTED (VARIABLE, [VALUE], [DESCRIPTION])
| Like `AC_DEFINE', but three shell expansions are
| performed--once--on VARIABLE and VALUE: variable expansion (`$'),
| command substitution (``'), and backslash escaping (`\'). Single
| and double quote characters in the value have no special meaning.
| Use this macro instead of `AC_DEFINE' when VARIABLE or VALUE is a
| shell variable. Examples:
|
| AC_DEFINE_UNQUOTED(config_machfile, "$machfile")
| AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups)
| AC_DEFINE_UNQUOTED($ac_tr_hdr)
Arg, you are right.
| If this can't ever work, perhaps this text from the *2.14a* manual
| should be abolished. _UNQUOTED can't ever work.
The point of _UNQUOTED is to evaluate the VALUE. I was not aware the
documentation said you could compute the variable too.
Actually, you still can, since it just means that the mini here doc
which is issued is unquoted. But I would not call this a feature.
Still, IMNSHO we should remove the third example, and the fact that
the 1st arg is evaluated from the documentation.
| > What is the problem you are trying to address here?
|
| I want to do things with parameters to autoconf macros. Like
| AC_CHECK_FUNCS(foo) defines HAVE_FOO, not HAVE_foo.
Then do not use this, this is a dead end. Rather, check how macros
such as AC_CHECK_FUNCS are doing their job. Pay attention to the AH_
series of macros, and how they use AC_TR_CPP etc. to normalize foo
into HAVE_FOO etc.
The idea is dead simple: autoconf, and autoheader, have no clue on how
to evaluate sh code. So they need literals where they need to know
something. And for instance autoheader needs to know what are the
symbols you intend to define in order to prepare the templates.