diff options
author | Hilko Bengen <bengen@hilluzination.de> | 2011-12-10 22:16:55 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-12-22 16:34:43 +0000 |
commit | ad5b5f96da53a6f51424e22e26f2d8a325eec681 (patch) | |
tree | 65c47d66c2bf19d30b9d3b92d20cbf3743c63a7c | |
parent | be1419a442d9936e737fb2ca6f0fdba36a048964 (diff) | |
download | libguestfs-ad5b5f96da53a6f51424e22e26f2d8a325eec681.tar.gz libguestfs-ad5b5f96da53a6f51424e22e26f2d8a325eec681.tar.xz libguestfs-ad5b5f96da53a6f51424e22e26f2d8a325eec681.zip |
Fixed checks for libpython features
The python3.1 package shipped with Debian/squeeze does not have the
'mu' suffix that was assumed before.
-rw-r--r-- | configure.ac | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index 0374b66e..40f67aad 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 |