]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix yesterday's regression in AS_IF.
authorEric Blake <ebb9@byu.net>
Wed, 15 Apr 2009 01:06:27 +0000 (19:06 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 15 Apr 2009 01:26:29 +0000 (19:26 -0600)
* lib/m4sugar/m4sh.m4 (_AS_IF_ELSE): Don't corrupt $? in else
branch; it is up to the user to avoid syntax errors.
* tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Adjust test.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/m4sugar/m4sh.m4
tests/m4sh.at

index 68cd41663e73826d6526637a29e49da9e7b040a0..feaabe6f3b50e1b4962c535d9bb76a0522b4ef3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-14  Eric Blake  <ebb9@byu.net>
+
+       Fix yesterday's regression in AS_IF.
+       * lib/m4sugar/m4sh.m4 (_AS_IF_ELSE): Don't corrupt $? in else
+       branch; it is up to the user to avoid syntax errors.
+       * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Adjust test.
+
 2009-04-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Add traces for AM_SILENT_RULES.
index 052c7eb1021217fe3ab5363129feaf5f20ab0c4c..3c05201aec15825780d0103facb5c843fd82713e 100644 (file)
@@ -609,7 +609,7 @@ m4_define([_AS_IF],
 ])
 m4_define([_AS_IF_ELSE],
 [m4_ifnblank([$1],
-[else :
+[else
   $1
 ])])
 
index 5f7dc847b340333992c01893f3fef736c5bd4193..065a9dda8676c17a9320291144524ff016c0ee6b 100644 (file)
@@ -862,8 +862,11 @@ AS_CASE([foo], [foo], m4_do(AS_CASE([bar], [bar], [echo sixteen])))
 dnl Handle blank arguments.
 AS_IF([false], [:], [ ]) && AS_CASE([foo], [foo], []
 ) && echo seventeen
-m4_define([empty])AS_IF([false], [:], [empty]
+m4_define([empty])AS_IF([:], [empty]
 ) && AS_CASE([foo], [foo], [empty]) && echo eighteen
+dnl We can't handle AS_IF([false], [:], [empty]) unless m4_expand is
+dnl taught how to handle m4_require.  The user is responsible for
+dnl avoiding the syntax error in that case.
 
 # check that require works correctly
 m4_for([n], 1, 9, [],