Here is a first patch that adds the "--with-soabi" option.
--with-soabi=yes or --with-soabi sets SOABI to the computed value (cpython-32m when I tried it). This is the default behavior on Linux.
--with-soabi=no or --without-soabi sets SOABI to the empty string, and removes the additional searched extensions from imp.get_suffixes(). This is the default behavior on all other platforms.
--with-soabi=<tag> sets SOABI to the given string. Then imp.get_suffixes() contains the following extensions: [".tag.so", "module.tag.so", ".so", "module.so"]
The patch is not yet complete, it does not modify the suffixes in the dynload_* files for platforms other than Linux.
Windows support will come after. It requires more thoughts because there is no Makefile to read at runtime.
But it's the first time I change the ./configure script, so please comment on this first patch.