[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix chdir-long.m4 caching

From: Eric Blake-1
Subject: Re: Fix chdir-long.m4 caching
Date: Tue, 26 Sep 2006 12:28:15 -0700 (PDT)

> Well, here you go.  First, the patch makes the `AC_CACHE_CHECK' test
> fail, so is incomplete.  So here's a patch to fix the test, also test
> that we warn in the literal case, and add a case with a m4 macro.  This
> is where my previous patch failed.  I guess you'd suggest I need to rip
> off a set of `[]' quotes from the second argument of AC_CACHE_CHECK.
> I'd argue that this could be a backward incompatibility for user code.

Ouch - that means AS_LITERAL_IF gets things wrong when we pass
a macro that expands to a non-literal.  This sounds like you uncovered
a bigger bug, and I'm not sure what impact it would have if we changed
AS_LITERAL_IF to check for m4 macros, and/or change AS_VAR_SET
to properly quote.

> So here's an updated patch that hopefully catches this as well.  I'll
> apply in a couple of days, given absense of objections.  (I'm usually a
> bit reluctant to just "fix" testcases: after all, somebody may have
> added them on purpose, so that exactly that code continues to work as
> intended.)

Agreed; I'll play with it over a couple of days.

+# A little hack, as AT_CHECK_M4 already uses `stderr' to normalize it.
+AT_CHECK_AUTOCONF([2>&1], [], [stdout])

Why not fix AT_CHECK_M4 instead?  This borrows from what I did for
the M4 testsuite:

2006-09-26  Eric Blake  <address@hidden>

        * tests/ (AT_CHECK_M4): Allow users to request stderr
        without hacks.

Index: tests/
RCS file: /sources/autoconf/autoconf/tests/,v
retrieving revision 1.35
diff -u -r1.35
--- tests/      11 Sep 2006 16:42:57 -0000      1.35
+++ tests/      26 Sep 2006 19:24:38 -0000
@@ -106,7 +106,7 @@
        s/^autom4te: [^ ]*m4 /autom4te: m4 /
        s/^autom4te: [^ ]*m4\.exe /autom4te: m4 /
        s/ (E[A-Z]*)$//
-    ' stderr]], [0],[$4])])
+    ' stderr >&2]], [0], [], [$4])])

View this message in context:
Sent from the Gnu - Autoconf - Patches mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]