diff mbox

[ovs-dev] autoconf: Fix missing AS_VAR_APPEND for version 2.63.

Message ID 1455760822-117996-1-git-send-email-u9012063@gmail.com
State Superseded
Headers show

Commit Message

William Tu Feb. 18, 2016, 2 a.m. UTC
autoconf version 2.63 does not have AS_VAR_APPEND, resulting errors below:
tests/testsuite.tmp:3863: error: possibly undefined macro: AS_VAR_APPEND
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
      make[2]: *** [tests/testsuite] Error 1

Signed-off-by: William Tu <u9012063@gmail.com>
---
 m4/compat.at | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ben Pfaff Feb. 22, 2016, 6:01 p.m. UTC | #1
On Wed, Feb 17, 2016 at 06:00:21PM -0800, William Tu wrote:
> autoconf version 2.63 does not have AS_VAR_APPEND, resulting errors below:
> tests/testsuite.tmp:3863: error: possibly undefined macro: AS_VAR_APPEND
>       If this token and others are legitimate, please use m4_pattern_allow.
>       See the Autoconf documentation.
>       make[2]: *** [tests/testsuite] Error 1
> 
> Signed-off-by: William Tu <u9012063@gmail.com>

Thanks for pointing out the problem, I'd forgotten about the need for
backward compatibility here.

However, this implementation is going to bite us eventually because it
doesn't allow for polymorphic variable names, as in
e.g. AS_VAR_APPEND([var$n], [123]).

I sent out an alternative series, can you test it with Autoconf 2.63?
Thanks.

My series is:
        https://patchwork.ozlabs.org/patch/586442/
        https://patchwork.ozlabs.org/patch/586443/
        https://patchwork.ozlabs.org/patch/586444/

Thanks,

Ben.
William Tu Feb. 23, 2016, 5:51 a.m. UTC | #2
Hi Ben,

I've tested the 3 patches using autoconf 2.63 and they work fine.
One minor thing is that the first patch has some extra space before
m4_define.

Regards,
William

On Mon, Feb 22, 2016 at 10:01 AM, Ben Pfaff <blp@ovn.org> wrote:

> On Wed, Feb 17, 2016 at 06:00:21PM -0800, William Tu wrote:
> > autoconf version 2.63 does not have AS_VAR_APPEND, resulting errors
> below:
> > tests/testsuite.tmp:3863: error: possibly undefined macro: AS_VAR_APPEND
> >       If this token and others are legitimate, please use
> m4_pattern_allow.
> >       See the Autoconf documentation.
> >       make[2]: *** [tests/testsuite] Error 1
> >
> > Signed-off-by: William Tu <u9012063@gmail.com>
>
> Thanks for pointing out the problem, I'd forgotten about the need for
> backward compatibility here.
>
> However, this implementation is going to bite us eventually because it
> doesn't allow for polymorphic variable names, as in
> e.g. AS_VAR_APPEND([var$n], [123]).
>
> I sent out an alternative series, can you test it with Autoconf 2.63?
> Thanks.
>
> My series is:
>         https://patchwork.ozlabs.org/patch/586442/
>         https://patchwork.ozlabs.org/patch/586443/
>         https://patchwork.ozlabs.org/patch/586444/
>
> Thanks,
>
> Ben.
>
Ben Pfaff Feb. 26, 2016, 8:49 p.m. UTC | #3
On Mon, Feb 22, 2016 at 09:51:08PM -0800, William Tu wrote:
> Hi Ben,
> 
> I've tested the 3 patches using autoconf 2.63 and they work fine.

Thanks.  I applied them to master.

> One minor thing is that the first patch has some extra space before
> m4_define.

That's indentation: the m4_define is nested within the m4_ifndef.
diff mbox

Patch

diff --git a/m4/compat.at b/m4/compat.at
index 736f1ff..607d1eb 100644
--- a/m4/compat.at
+++ b/m4/compat.at
@@ -30,3 +30,7 @@  m4_ifndef([AT_FAIL_IF],
 m4_ifndef([AS_VAR_COPY],
   [m4_define([AS_VAR_COPY],
     [AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])])
+
+m4_ifndef([AS_VAR_APPEND],
+  [m4_define([AS_VAR_APPEND],
+      [$1=$$1$2])])