[gst-cvs] gst-python: plugin: fix the manual loading of libpythonX.Y.so.

Alessandro Decina alessandro at kemper.freedesktop.org
Thu Aug 26 08:19:22 PDT 2010


Module: gst-python
Branch: master
Commit: 31a61551b4a7aac88c6b8bed04509ea812a8a950
URL:    http://cgit.freedesktop.org/gstreamer/gst-python/commit/?id=31a61551b4a7aac88c6b8bed04509ea812a8a950

Author: Alessandro Decina <alessandro.d at gmail.com>
Date:   Wed Aug 25 12:36:14 2010 +0200

plugin: fix the manual loading of libpythonX.Y.so.

---

 acinclude.m4       |   11 +++++++++--
 plugin/Makefile.am |    2 +-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 4b9972c..25f27e6 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -73,8 +73,15 @@ AC_DEFUN([AM_CHECK_PYTHON_LIBS],
 AC_MSG_CHECKING(for libraries required to embed python)
 dnl deduce PYTHON_LIBS
 py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
-PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
-PYTHON_LIB_LOC="${py_prefix}/lib" 
+if $PYTHON-config --help 2>/dev/null; then
+  PYTHON_LIBS=`$PYTHON-config --ldflags 2>/dev/null`
+  PYTHON_LIB=`$PYTHON -c "import distutils.sysconfig as s; print s.get_python_lib(standard_lib=1)"`
+  PYTHON_LIB_LOC=$PYTHON_LIB/config
+else
+  asd
+  PYTHON_LIBS="-L${py_prefix}/lib -lpython${PYTHON_VERSION}"
+  PYTHON_LIB_LOC="${py_prefix}/lib"
+fi
 AC_SUBST(PYTHON_LIBS)
 AC_SUBST(PYTHON_LIB_LOC)
 dnl check if the headers exist:
diff --git a/plugin/Makefile.am b/plugin/Makefile.am
index a8b6342..fc961a0 100644
--- a/plugin/Makefile.am
+++ b/plugin/Makefile.am
@@ -7,4 +7,4 @@ INCLUDES = $(PYGOBJECT_CFLAGS) $(GST_CFLAGS)\
 
 libgstpython_la_SOURCES = gstpythonplugin.c
 libgstpython_la_LDFLAGS = -module -avoid-version
-libgstpython_la_LIBADD = $(GST_LIBS) $(PYTHON_LIBS)
+libgstpython_la_LIBADD = $(GST_LIBS)





More information about the Gstreamer-commits mailing list