From d2bdf58f902a774a11ae2f065561a759a054904e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 17 Apr 2020 22:33:37 -0700 Subject: configure: detect more good shells. * configure: There is a clue in the PS2 and PS4 variables. If these are present and have the values "> " and "+ " the shell could be Dash or newer NetBSD Ash, which got PS4 circa 2004. The Solaris XPG shell also has these. --- configure | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 2f78a8af..8ba00895 100755 --- a/configure +++ b/configure @@ -49,6 +49,13 @@ while true ; do break fi + # If the shell has PS2 and PS4 with these values, it is + # probably a good shell: late-model Ash, Dash or the XPG + # shell on Solaris and perhaps others. + if test "x$PS2" = "x> " && test "x$PS4" = "x+ " ; then + break + fi + # Slow path: find a suitable shell. # First choice is $CONFIG_SHELL, a convention from GNU Autoconf. for shell in "$CONFIG_SHELL" \ -- cgit v1.2.3