]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(_AS_LINENO_WORKS): Do not surround body with {}, as that triggers a
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 Oct 2001 20:07:48 +0000 (20:07 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 Oct 2001 20:07:48 +0000 (20:07 +0000)
bug in Bash 2.05.

lib/m4sugar/m4sh.m4

index e18bf5b572a296a2656fd6013e28162e525ee551..f7764073e217b3fe2f76fbc4e96acba87c2dd057 100644 (file)
@@ -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
 # ------------------