@@ -4221,12 +4221,25 @@ echo "$as_me: error: Python not found" >&2;}
4221
4221
fi
4222
4222
4223
4223
4224
+ echo "$as_me:$LINENO: checking for Python distutils module" >&5
4225
+ echo $ECHO_N "checking for Python distutils module... $ECHO_C" >&6
4226
+ if "${PYTHON}" 2>&- -c 'import distutils'
4227
+ then
4228
+ echo "$as_me:$LINENO: result: yes" >&5
4229
+ echo "${ECHO_T}yes" >&6
4230
+ else
4231
+ echo "$as_me:$LINENO: result: no" >&5
4232
+ echo "${ECHO_T}no" >&6
4233
+ { { echo "$as_me:$LINENO: error: distutils module not found" >&5
4234
+ echo "$as_me: error: distutils module not found" >&2;}
4235
+ { (exit 1); exit 1; }; }
4236
+ fi
4224
4237
echo "$as_me:$LINENO: checking Python installation directories" >&5
4225
4238
echo $ECHO_N "checking Python installation directories... $ECHO_C" >&6
4226
4239
python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
4227
4240
python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
4228
4241
python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
4229
- python_configdir="${python_execprefix}/lib/python${python_version}/ config"
4242
+ python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print os.path.join(f(plat_specific=1,standard_lib=1),' config')"`
4230
4243
python_includespec="-I${python_prefix}/include/python${python_version}"
4231
4244
if test "$python_prefix" != "$python_execprefix"; then
4232
4245
python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"