When using the conditional dependencies feature of Gnulib, several
functions are emitted into configure scripts that use 'if ! ...'.

This syntax is not portable in practice, as discussed in the Autoconf
manual[1].  Because in this instance the construct is emitted into
configure scripts, this has minor shell portability implications on
downstream projects.  It is usually very easy to work around this
problem, so let's do so here.

[1] 
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/autoconf.html#index-_0021

* gnulib-tool (func_emit_autoconf_snippets): Avoid outputting
'if ! ...' constructs into downstream configure scrips.
---
 gnulib-tool | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnulib-tool b/gnulib-tool
index 2ba5dec65d..e7185958ff 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -4480,7 +4480,7 @@ func_emit_autoconf_snippets ()
           func_module_shellvar_name "$module"
           echo "  $shellfunc ()"
           echo '  {'
-          echo "    if ! \$$shellvar; then"
+          echo "    if \$$shellvar; then :; else"
           func_emit_autoconf_snippet "      "
           echo "      $shellvar=true"
           deps=`func_get_dependencies $module | sed -e 
"$sed_dependencies_without_conditions"`
-- 
2.26.2


Reply via email to