On Tue, Nov 04, 2014 at 04:35:30PM +0100, Pino Toscano wrote:
Instead of querying distutils.sysconfig for the library name, just
use
the $PYTHON_LIBS returned by pkg-config. This makes sure the tests can
link even with a libpython in a non-standard library directory.
---
configure.ac | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 87e066c..1bf291c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1216,20 +1216,14 @@ AS_IF([test "x$enable_python" != "xno"],[
AC_MSG_RESULT([$PYTHON_EXT_SUFFIX])
dnl Look for some optional symbols in libpython.
- old_LIBS="$LIBS"
-
- PYTHON_BLDLIBRARY=`$PYTHON -c "import distutils.sysconfig; \
- print
(distutils.sysconfig.get_config_var('BLDLIBRARY'))"`
AC_CHECK_LIB([c],[PyCapsule_New],
[AC_DEFINE([HAVE_PYCAPSULE_NEW],1,
[Found PyCapsule_New in libpython.])],
- [],[$PYTHON_BLDLIBRARY])
+ [],[$PYTHON_LIBS])
AC_CHECK_LIB([c],[PyString_AsString],
[AC_DEFINE([HAVE_PYSTRING_ASSTRING],1,
[Found PyString_AsString in libpython.])],
- [],[$PYTHON_BLDLIBRARY])
-
- LIBS="$old_LIBS"
+ [],[$PYTHON_LIBS])
fi
AC_SUBST(PYTHON_PREFIX)
--
1.9.3
Will this break hillu's change (commit ad5b5f96da53)?
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW