configure: python: RHEL 6 doesn't have sysconfig, use distutils.sysconfig instead.

This works on recent Python as well.
This commit is contained in:
Richard W.M. Jones
2013-06-28 12:57:07 +01:00
parent 7f4048f9d5
commit cd9f40945d

View File

@@ -1158,8 +1158,8 @@ AS_IF([test "x$enable_python" != "xno"],[
AC_MSG_CHECKING([for Python extension suffix (PEP-3149)])
if test -z "$PYTHON_EXT_SUFFIX"; then
python_ext_suffix=`$PYTHON -c "import sysconfig; \
print (sysconfig.get_config_var('EXT_SUFFIX') or sysconfig.get_config_var('SO'))"`
python_ext_suffix=`$PYTHON -c "import distutils.sysconfig; \
print (distutils.sysconfig.get_config_var('EXT_SUFFIX') or distutils.sysconfig.get_config_var('SO'))"`
PYTHON_EXT_SUFFIX=$python_ext_suffix
fi
AC_MSG_RESULT([$PYTHON_EXT_SUFFIX])