- Issue #16754: Fix the incorrect shared library extension on linux. Introduce
  two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
  SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
diff --git a/configure.ac b/configure.ac
index 19cf1ae..0ab4430 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1721,14 +1721,30 @@
 esac
 
 # Set info about shared libraries.
-AC_SUBST(SO)
+AC_SUBST(SHLIB_SUFFIX)
 AC_SUBST(LDSHARED)
 AC_SUBST(LDCXXSHARED)
 AC_SUBST(BLDSHARED)
 AC_SUBST(CCSHARED)
 AC_SUBST(LINKFORSHARED)
 
-AC_DEFINE_UNQUOTED(SHLIB_EXT, "$SO", [Define this to be extension of shared libraries (including the dot!).])
+# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
+# -- usually .so, .sl on HP-UX, .dll on Cygwin
+AC_MSG_CHECKING(the extension of shared libraries)
+if test -z "$SHLIB_SUFFIX"; then
+	case $ac_sys_system in
+	hp*|HP*)
+		case `uname -m` in
+			ia64) SHLIB_SUFFIX=.so;;
+	  		*)    SHLIB_SUFFIX=.sl;;
+		esac
+		;;
+	CYGWIN*)   SHLIB_SUFFIX=.dll;;
+	*)	   SHLIB_SUFFIX=.so;;
+	esac
+fi
+AC_MSG_RESULT($SHLIB_SUFFIX)
+
 # LDSHARED is the ld *command* used to create shared library
 # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
 # (Shared libraries in this instance are shared modules to be loaded into
@@ -3754,41 +3770,18 @@
 SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
 AC_MSG_RESULT($SOABI)
 
+AC_SUBST(EXT_SUFFIX)
+case $ac_sys_system in
+    Linux*|GNU*)
+	EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
+    *)
+	EXT_SUFFIX=${SHLIB_SUFFIX};;
+esac
+
 AC_MSG_CHECKING(LDVERSION)
 LDVERSION='$(VERSION)$(ABIFLAGS)'
 AC_MSG_RESULT($LDVERSION)
 
-# SO is the extension of shared libraries `(including the dot!)
-# -- usually .so, .sl on HP-UX, .dll on Cygwin
-AC_MSG_CHECKING(SO)
-if test -z "$SO"
-then
-	case $ac_sys_system in
-	hp*|HP*)
-		case `uname -m` in
-			ia64) SO=.so;;
-	  		*)    SO=.sl;;
-		esac
-		;;
-	CYGWIN*)   SO=.dll;;
-	Linux*|GNU*)
-		   SO=.${SOABI}.so;;
-	*)	   SO=.so;;
-	esac
-else
-	# this might also be a termcap variable, see #610332
-	echo
-	echo '====================================================================='
-	echo '+                                                                   +'
-	echo '+ WARNING: You have set SO in your environment.                     +'
-	echo '+ Do you really mean to change the extension for shared libraries?  +'
-	echo '+ Continuing in 10 seconds to let you to ponder.                    +'
-	echo '+                                                                   +'
-	echo '====================================================================='
-	sleep 10
-fi
-AC_MSG_RESULT($SO)
-
 # Check whether right shifting a negative integer extends the sign bit
 # or fills with zeros (like the Cray J90, according to Tim Peters).
 AC_MSG_CHECKING(whether right shift extends the sign bit)