Hello Stepan, Akim, * Stepan Kasal wrote on Fri, Jun 02, 2006 at 02:07:48PM CEST: > On Wed, May 31, 2006 at 08:56:41PM +0200, Akim Demaille wrote: > > However my point about the name of the condition remains. AC_SUBST > > covers only the *_TRUE and *_FALSE part. > > Then I second Ralf's and Alexandre's[1] question: > What would that be good for? I didn't get it the first time either. But: the expansion of AM_CONDITIONAL not only contains $1_TRUE and $1_FALSE, both of which are AC_SUBSTed and thus ok to use, but also $1, namely in the error message: AC_MSG_ERROR([[conditional "$1" was never defined. [...] ]]) This will flag the error. But can't this be solved much cheaper, see below? It would still allow you to get all other uses flagged. :-) I don't know if, for your purposes, @&t@ should rather be put after every character, or only once after the first would suffice. (If the general idea is deemed ok, I can write a test.) Cheers, Ralf * m4/cond.m4 (AM_CONDITIONAL): Hide the plain `$1' from m4_pattern_forbid by putting a `@&t@' in it. Index: m4/cond.m4 =================================================================== RCS file: /cvs/automake/automake/m4/cond.m4,v retrieving revision 1.14 diff -u -r1.14 cond.m4 --- m4/cond.m4 9 Apr 2006 07:46:55 -0000 1.14 +++ m4/cond.m4 2 Jun 2006 15:10:41 -0000 @@ -7,7 +7,7 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -29,6 +29,6 @@ fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. + AC_MSG_ERROR([[conditional "]m4_bpatsubst([$1], [^\(.\)], [\1@&t@])[" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf