Hilko Bengen
2011-Dec-10 21:16 UTC
[Libguestfs] [PATCH] Fixed checks for libpython features
The python3.1 package shipped with Debian/squeeze does not have the 'mu' suffix that was assumed before. --- configure.ac | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 28243a2..c2b684b 100644 --- a/configure.ac +++ b/configure.ac @@ -738,19 +738,20 @@ AS_IF([test "x$enable_python" != "xno"], AC_MSG_RESULT([$PYTHON_INSTALLDIR]) fi - dnl Look for libpython and some optional symbols in it. + dnl Look for some optional symbols in libpython. old_LIBS="$LIBS" - if test "x$PYTHON_VERSION_MAJOR" = "x3"; then - dnl libpython3 is called "libpython3.Xmu.so" - LIBPYTHON="python${PYTHON_VERSION}mu" - else - LIBPYTHON="python$PYTHON_VERSION" - fi - AC_CHECK_LIB([$LIBPYTHON], [PyList_Size], [], - [AC_MSG_FAILURE([$LIBPYTHON is not installed])]) - AC_CHECK_FUNCS([PyCapsule_New \ - PyString_AsString]) + 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]) + AC_CHECK_LIB([c],[PyString_AsString], + [AC_DEFINE([HAVE_PYSTRING_ASSTRING],1, + [Found PyString_AsString in libpython])], + [],[$PYTHON_BLDLIBRARY]) + LIBS="$old_LIBS" fi -- 1.7.7.3
Richard W.M. Jones
2011-Dec-22 16:34 UTC
[Libguestfs] [PATCH] Fixed checks for libpython features
On Sat, Dec 10, 2011 at 10:16:55PM +0100, Hilko Bengen wrote:> The python3.1 package shipped with Debian/squeeze does not have the > 'mu' suffix that was assumed before.Thanks -- applied. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
Maybe Matching Threads
- Re: [PATCH 7/9] python: fix detection of libpython features
- [PATCH 7/9] python: fix detection of libpython features
- [PATCH nbdkit] python: Drop support for Python 2.
- [PATCH nbdkit] python: Turn python exceptions into nbdkit errors properly.
- [PATCH 1/2] Add type checking, support integers as value