On Tue, Jun 04, 2013 at 12:35:27AM +0200, Hilko Bengen wrote:
---
configure.ac | 9 +++++++++
python/Makefile.am | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index ea403c3..00ef507 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1163,6 +1163,14 @@ AS_IF([test "x$enable_python" != "xno"],[
AC_MSG_RESULT([$PYTHON_INSTALLDIR])
fi
+ AC_MSG_CHECKING([for Python extension suffix (PEP-3149)])
+ if test -z "$PYTHON_EXT_SUFFIX"; then
+ python_ext_suffix=`$PYTHON -c "import sysconfig; \
+ print
(sysconfig.get_config_var('EXT_SUFFIX') or
sysconfig.get_config_var('SO'))"`
+ PYTHON_EXT_SUFFIX=$python_ext_suffix
+ fi
+ AC_MSG_RESULT([$PYTHON_EXT_SUFFIX])
+
dnl Look for some optional symbols in libpython.
old_LIBS="$LIBS"
@@ -1183,6 +1191,7 @@ AS_IF([test "x$enable_python" != "xno"],[
AC_SUBST(PYTHON_PREFIX)
AC_SUBST(PYTHON_VERSION)
AC_SUBST(PYTHON_INSTALLDIR)
+ AC_SUBST(PYTHON_EXT_SUFFIX)
])
AM_CONDITIONAL([HAVE_PYTHON],
[test "x$PYTHON" != "xno" && test
"x$PYTHON_LIBS" != "x" ])
diff --git a/python/Makefile.am b/python/Makefile.am
index ecc25d5..d513695 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -56,7 +56,7 @@ libguestfsmod_la_LIBADD = \
$(LIBVIRT_LIBS) \
../gnulib/lib/libgnu.la
-libguestfsmod_la_LDFLAGS = -avoid-version -shared
+libguestfsmod_la_LDFLAGS = -avoid-version -shared -module -shrext $(PYTHON_EXT_SUFFIX)
TESTS_ENVIRONMENT = $(top_builddir)/run --test
ACK
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top