gbranden pushed a commit to branch master
in repository groff.
commit ad97cd53baa041e9e8736022779f609e2deeae8d
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Mar 30 00:39:42 2025 -0500
[build]: Look harder for POSIX shells.
* m4/groff.m4 (GROFF_PROG_SH): Search more aggressively for Bourne/
Korn-style shells that stand a better chance of being POSIX-conforming
in ways we require than, oh, say, Solaris 10 /bin/sh. Search for
bash, ksh, dash, and ash in that order. If none are found, use
/bin/sh anyway and surrender to our run-time fate.
---
ChangeLog | 9 +++++++++
m4/groff.m4 | 13 +++++++++----
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8e9d43efa..9bc5b62b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2025-03-30 G. Branden Robinson <[email protected]>
+
+ * m4/groff.m4 (GROFF_PROG_SH): Search more aggressively for
+ Bourne/Korn-style shells that stand a better chance of being
+ POSIX-conforming in ways we require than, oh, say, Solaris 10
+ /bin/sh. Search for bash, ksh, dash, and ash in that order.
+ If none are found, use /bin/sh anyway and surrender to our
+ run-time fate.
+
2025-03-29 G. Branden Robinson <[email protected]>
* m4/groff.m4 (GROFF_PROG_SH_IS_POSIX_8_CONFORMING): Rename
diff --git a/m4/groff.m4 b/m4/groff.m4
index ac3c3d32b..8657fdfa2 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -1823,12 +1823,17 @@ AC_DEFUN([GROFF_PROG_TEST_SUPPORTS_EF_OPTION],
AC_DEFUN([GROFF_PROG_SH], [
AC_REQUIRE([GROFF_PROG_TEST_SUPPORTS_EF_OPTION])
- POSIX_SHELL_PROG=/bin/sh
+ POSIX_SHELL_PROG=no
if test "$test_ef_works" = no
then
- # Use Bash if it is available; otherwise programs must complain at
- # runtime if the environment is non-conforming to POSIX.
- AC_PATH_PROGS([POSIX_SHELL_PROG], [bash], [no])
+ # Try to find a shell that is likely to be more modern than the
+ # system's /bin/sh; otherwise programs must complain at runtime if
+ # the environment is non-conforming to POSIX.
+ AC_PATH_PROGS([POSIX_SHELL_PROG], [bash ksh dash ash], [no])
+ fi
+ if test "$POSIX_SHELL_PROG" = no
+ then
+ POSIX_SHELL_PROG=/bin/sh
fi
AC_SUBST([POSIX_SHELL_PROG])
])
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit