summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-04-17 22:33:37 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-04-17 22:33:37 -0700
commitd2bdf58f902a774a11ae2f065561a759a054904e (patch)
tree2c2b31298ed1304d46e61f164f98dc7e99b3483f /configure
parentd7bfa8d761ac9656063f9b456f773bf54e4b6bf3 (diff)
downloadtxr-d2bdf58f902a774a11ae2f065561a759a054904e.tar.gz
txr-d2bdf58f902a774a11ae2f065561a759a054904e.tar.bz2
txr-d2bdf58f902a774a11ae2f065561a759a054904e.zip
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.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 7 insertions, 0 deletions
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" \