---
configure.ac | 9 +++++++++
python/Makefile.am | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 3714c60..aa63110 100644
--- a/configure.ac
+++ b/configure.ac
@@ -327,6 +327,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"
@@ -348,6 +356,7 @@ AS_IF([test "x$enable_python" != "xno"],
AC_SUBST(PYTHON_VERSION)
AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_INSTALLDIR)
+ AC_SUBST(PYTHON_EXT_SUFFIX)
])
AM_CONDITIONAL([HAVE_PYTHON],
[test "x$PYTHON" != "xno" && test
"x$PYTHON_CFLAGS" != "x" && test
"x$PYTHON_INSTALLDIR" != "x"])
diff --git a/python/Makefile.am b/python/Makefile.am
index ead52b4..034f9c7 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -36,7 +36,7 @@ libhivexmod_la_SOURCES = hivex-py.c
libhivexmod_la_CFLAGS = -Wall $(PYTHON_CFLAGS) \
-I$(top_srcdir)/lib -I$(top_builddir)/lib
libhivexmod_la_LIBADD = $(top_builddir)/lib/libhivex.la
-libhivexmod_la_LDFLAGS = -avoid-version -shared
+libhivexmod_la_LDFLAGS = -avoid-version -shared -module -shrext $(PYTHON_EXT_SUFFIX)
TESTS_ENVIRONMENT = \
PYTHONPATH=$(builddir):$(builddir)/.libs
--
1.7.10.4