* Paolo Bonzini wrote on Sun, Nov 16, 2008 at 10:53:32PM CET:
>
> Or use `expr "$[]@" || test $? = 1` if it is portable.
Thanks, that's better. I pushed this.
It is portable in the sense that, there are shells which won't propagate
the exit status to outside the `...` anyway, but I don't see what we can
do about that except parse "$@" ourselves maybe.
Cheers,
Ralf
Simplify, avoid unbalanced parentheses from last change.
* lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE): Simplify, avoid
unbalanced parentheses from last change.
Spotted by Eric Blake, fix suggested by Paolo Bonzini.
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 56697ad..2c592c6 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -1742,8 +1742,7 @@
AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_ARITH_WORKS))"])],
}'],
[as_func_arith ()
{
- as_val=`expr "$[]@"`
- case $? in 0|1) :;; *) false;; esac
+ as_val=`expr "$[]@" || test $? -eq 1`
}]) # as_func_arith
])