oksh-noxz

[fork] Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh).
git clone https://noxz.tech/git/oksh-noxz.git
oksh-noxz

commit: 4fc32512e9dccc5275c2656b2b441639950d0d33
parent: 9b48daaacbdf059637baf745eb30dbe71adaa1cf
author: Brian Callahan <bcallah@openbsd.org>
date:   Mon, 21 Feb 2022 13:14:47 -0500
Add --enable-small, which disable curses and extended history.
It's a bit of a misnomer--only saves about 5 KB with clang.
I noticed that oasis was using -DSMALL, so might as well offer the
knob.
Mconfigure15+++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/configure b/configure
@@ -781,6 +781,7 @@ curses=1
 instsh=0
 static=0
 lto=0
+small=0
 strip=1
 
 # Options
@@ -825,6 +826,14 @@ do
 	  instsh=0
 	fi
 	;;
+    --disable-small|--enable-small)
+	if [ "x$opt" = "x--enable-small" ] ; then
+	  small=1
+	  curses=0
+	else
+	  small=0
+	fi
+	;;
     --disable-static|--enable-static)
 	if [ "x$opt" = "x--enable-static" ] ; then
 	  static=1
@@ -868,6 +877,8 @@ do
 	echo "Enable link-time optimization [default=no]"
 	printf "  --enable-sh             "
 	echo "Install additional sh executable [default=no]"
+	printf "  --enable-small          "
+	echo "Disable curses and extended history [default=no]"
 	printf "  --enable-static         "
 	echo "Statically link executables [default=no]"
 	printf "  --no-thanks             "
@@ -1060,6 +1071,10 @@ else
   fi
 fi
 
+if [ $small -ne 0 ] ; then
+  cflags="$cflags -DSMALL"
+fi
+
 cat << EOF > pconfig.h
 /* This file automatically generated by configure.  */