patch 9.1.0669: if_python: stable python ABI not used by default

Problem:  stable python ABI not used by default
Solution: Enable stable python ABI v3.8 when building with python3/dyn
          by default, update the default Python3 version to 3.8 for
          MS-Windows (Ken Takata)

closes: #15470
related: #15457

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/configure.ac b/src/configure.ac
index 29cd926..43832dc 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1539,12 +1539,21 @@
       AC_MSG_RESULT(yep)
 
       dnl -- get the stable ABI version if passed in
+      python3_stable_abi_default=3.8
       AC_MSG_CHECKING(--with-python3-stable-abi argument)
       AC_SUBST(vi_cv_var_python3_stable_abi)
-      AC_ARG_WITH(python3-stable-abi, [  --with-python3-stable-abi=VERSION  stable ABI version to target (e.g. 3.8)],
-        vi_cv_var_python3_stable_abi="$withval"; AC_MSG_RESULT($vi_cv_var_python3_stable_abi),
-        AC_MSG_RESULT(no))
-      if test "X$vi_cv_var_python3_stable_abi" != "X"; then
+      AC_ARG_WITH(python3-stable-abi, [  --with-python3-stable-abi=VERSION  stable ABI version to target (default: 3.8)],
+        [
+	 if test "X$withval" = "Xyes"; then
+	   vi_cv_var_python3_stable_abi=$python3_stable_abi_default
+	 else
+	   vi_cv_var_python3_stable_abi="$withval"
+	 fi
+	 AC_MSG_RESULT($vi_cv_var_python3_stable_abi)],
+        [
+	 vi_cv_var_python3_stable_abi=$python3_stable_abi_default
+	 AC_MSG_RESULT(no. defaults to $python3_stable_abi_default.)])
+      if test "X$vi_cv_var_python3_stable_abi" != "Xno"; then
         AC_CACHE_VAL(vi_cv_var_python3_stable_abi_hex,
         [
          vi_cv_var_python3_stable_abi_hex=`