On Sunday 05 April 2009 21:01:29 Mike Frysinger wrote: > On Sunday 05 April 2009 20:46:03 Eric Blake wrote: > > That said, autoconf could probably be taught that, for some macros, an > > argument of all whitespace is morally equivalent to an empty argument. > > Patches welcome. > > i'm not an expert by any means with internal autoconf/m4. if there's a m4 > helper function to test whether an argument contains something other than > whitespace, then the change to m4sh.m4:_AS_IF is trivial ... use that > rather than m4_ifvaln([$1],....
to answer my own question and to post a patch, m4_normalize can be used: diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index 88881b1..605918b 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -606,7 +606,7 @@ m4_define([_AS_IF], m4_default([$2], [:]) ]) m4_define([_AS_IF_ELSE], -[m4_ifvaln([$1], +[m4_ifvaln(m4_normalize([$1]), [else $1])]) this should "fix" every macro that uses AS_IF with an "else" argument. it certainly fixes my test case. -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Autoconf mailing list Autoconf@gnu.org http://lists.gnu.org/mailman/listinfo/autoconf