summaryrefslogtreecommitdiffstats
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
commit3c0f686162cfd3bd04feec24d687a5610f921d01 (patch)
tree2c2b31298ed1304d46e61f164f98dc7e99b3483f
parentab3a0ff7212753b5df32b7afc836bb367fef6de0 (diff)
downloadtxr-3c0f686162cfd3bd04feec24d687a5610f921d01.tar.gz
txr-3c0f686162cfd3bd04feec24d687a5610f921d01.tar.bz2
txr-3c0f686162cfd3bd04feec24d687a5610f921d01.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.
-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" \