From: Paul Eggert Date: Wed, 31 Oct 2001 20:07:48 +0000 (+0000) Subject: (_AS_LINENO_WORKS): Do not surround body with {}, as that triggers a X-Git-Tag: AUTOCONF-2.52f~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dfeb49d8eafbc26c07f369b6de5400f5293bc56;p=thirdparty%2Fautoconf.git (_AS_LINENO_WORKS): Do not surround body with {}, as that triggers a bug in Bash 2.05. --- diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index e18bf5b57..f7764073e 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -462,14 +462,18 @@ fi # _AS_LINENO_WORKS # --------------- # Succeed if the currently executing shell supports LINENO. +# This macro does not expand to a single shell command, so be careful +# when using it. Surrounding the body of this macro with {} would +# cause "bash -c '_ASLINENO_WORKS'" to fail (with Bash 2.05, anyway), +# but that bug is irrelevant to our use of LINENO. m4_define([_AS_LINENO_WORKS], -[{ +[ as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" -}]) + test "x$as_lineno_3" = "x$as_lineno_2" dnl +]) # _AS_LINENO_PREPARE # ------------------