+2023-04-26 Po Lu <luangruo@yahoo.com> (tiny change)
+ Bruno Haible <bruno@clisp.org>
+
+ gnulib-tool: For conditional dependencies, generate portable sh code.
+ * gnulib-tool (func_emit_autoconf_snippets): Avoid sh syntax
+ 'if ! variable', that does not work with Solaris /bin/sh.
+ * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Likewise.
+
2023-04-25 Bruno Haible <bruno@clisp.org>
expm1 tests: Avoid test failure on 32-bit mingw.
#! /bin/sh
#
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
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"`
shellvar = module.getShellVar()
emit += ' %s ()\n' % shellfunc
emit += ' {\n'
- emit += ' if ! $%s; then\n' % shellvar
+ emit += ' if $%s; then :; else\n' % shellvar
emit += self.autoconfSnippet(module, fileassistant, toplevel,
disable_libtool, disable_gettext, replace_auxdir, ' ')
emit += ' %s=true\n' % shellvar