]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
_AS_PATH_WALK: Use AS_IF for IF-NOT-FOUND argument.
authorZack Weinberg <zackw@panix.com>
Sat, 10 Oct 2020 18:07:53 +0000 (14:07 -0400)
committerZack Weinberg <zackw@panix.com>
Sat, 10 Oct 2020 18:07:53 +0000 (14:07 -0400)
The construct _AS_PATH_WALK was using to conditionally execute its
IF-NOT-FOUND argument, was a little too fragile: relatively natural
variations in usage, such as putting the final `])` on a line by
itself, could cause shell syntax errors.  Use AS_IF instead.

* lib/m4sugar/m4sh.m4: Use AS_IF to execute IF-NOT-FOUND conditionally.

lib/m4sugar/m4sh.m4

index bd4d2b9e8f410d7c3525dab2ebb23e69ddfaa24b..a1c1cd475cff2b61f945cd024b617231664cff89 100644 (file)
@@ -1363,7 +1363,7 @@ do
   m4_ifvaln([$3], [as_found=false])dnl
 done
 IFS=$as_save_IFS
-m4_ifvaln([$3], [$as_found || { $3; }])dnl
+m4_ifvaln([$3], [AS_IF([$as_found], [], [$3])])dnl
 ])