[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_TRY_COMPILE() annoyances with 2.63b
From: |
Mike Frysinger |
Subject: |
Re: AC_TRY_COMPILE() annoyances with 2.63b |
Date: |
Sun, 5 Apr 2009 21:19:04 -0400 |
User-agent: |
KMail/1.11.1 (Linux/2.6.28; KDE/4.2.1; x86_64; ; ) |
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.
- AC_TRY_COMPILE() annoyances with 2.63b, Mike Frysinger, 2009/04/05
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Eric Blake, 2009/04/05
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Mike Frysinger, 2009/04/05
- Re: AC_TRY_COMPILE() annoyances with 2.63b,
Mike Frysinger <=
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Eric Blake, 2009/04/06
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Mike Frysinger, 2009/04/06
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Ralf Wildenhues, 2009/04/06
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Mike Frysinger, 2009/04/06
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Eric Blake, 2009/04/06
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Ralf Wildenhues, 2009/04/07
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Ralf Wildenhues, 2009/04/07
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Mike Frysinger, 2009/04/07
- Re: AC_TRY_COMPILE() annoyances with 2.63b, Andreas Schwab, 2009/04/07
- AS_IF optimization (was: AC_TRY_COMPILE() annoyances with 2.63b), Eric Blake, 2009/04/07