diff -ru a/config/python.m4 b/config/python.m4 --- a/config/python.m4 2011-08-17 14:09:35.000000000 +0100 +++ b/config/python.m4 2011-08-18 07:49:35.000000000 +0100 @@ -70,7 +70,13 @@ else # Old way: use libpython from python_configdir python_libdir="${python_configdir}" - python_libspec="-L${python_libdir} -lpython${python_ldversion}" + # If available : use python_ldversion + if test x"${python_ldversion}" != x"" + then + python_libspec="-L${python_libdir} -lpython${python_ldversion}" + else + python_libspec="-L${python_libdir} -lpython${python_version}" + fi fi python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"` diff -ru a/configure b/configure --- a/configure 2011-08-17 14:09:35.000000000 +0100 +++ b/configure 2011-08-18 07:53:42.000000000 +0100 @@ -7267,7 +7267,13 @@ else # Old way: use libpython from python_configdir python_libdir="${python_configdir}" - python_libspec="-L${python_libdir} -lpython${python_ldversion}" + # If available : use python_ldversion + if test x"${python_ldversion}" != x"" + then + python_libspec="-L${python_libdir} -lpython${python_ldversion}" + else + python_libspec="-L${python_libdir} -lpython${python_version}" + fi fi python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`