Index: Makefile.am
===================================================================
RCS file: /cvs/gstreamer/gst-python/Makefile.am,v
retrieving revision 1.39
diff -u -p -u -p -r1.39 Makefile.am
--- Makefile.am	3 Jul 2006 13:32:08 -0000	1.39
+++ Makefile.am	13 Aug 2006 14:04:37 -0000
@@ -1,4 +1,4 @@
-SUBDIRS = codegen gst examples testsuite pkgconfig
+SUBDIRS = codegen gst examples plugin testsuite pkgconfig
 
 EXTRA_DIST = \
 	ltihooks.py \
Index: acinclude.m4
===================================================================
RCS file: /cvs/gstreamer/gst-python/acinclude.m4,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 acinclude.m4
--- acinclude.m4	11 Feb 2004 17:38:15 -0000	1.2
+++ acinclude.m4	13 Aug 2006 14:04:37 -0000
@@ -60,3 +60,24 @@ $1],dnl
 $2])
 CPPFLAGS="$save_CPPFLAGS"
 ])
+
+dnl a macro to check for ability to embed python
+dnl  AM_CHECK_PYTHON_LIBS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl function also defines PYTHON_LIBS
+AC_DEFUN([AM_CHECK_PYTHON_LIBS],
+[AC_REQUIRE([AM_CHECK_PYTHON_HEADERS])
+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" 
+AC_SUBST(PYTHON_LIBS)
+AC_SUBST(PYTHON_LIB_LOC)
+dnl check if the headers exist:
+save_LIBS="$LIBS"
+LIBS="$LIBS $PYTHON_LIBS"
+AC_TRY_LINK_FUNC(Py_Initialize, dnl
+         [LIBS="$save_LIBS"; AC_MSG_RESULT(yes); $1], dnl
+         [LIBS="$save_LIBS"; AC_MSG_RESULT(no); $2])
+
+])
Index: configure.ac
===================================================================
RCS file: /cvs/gstreamer/gst-python/configure.ac,v
retrieving revision 1.121
diff -u -p -u -p -r1.121 configure.ac
--- configure.ac	20 Jul 2006 17:05:22 -0000	1.121
+++ configure.ac	13 Aug 2006 14:04:37 -0000
@@ -68,6 +68,7 @@ dnl check for GStreamer
 GST_MAJORMINOR=0.10
 AC_SUBST(GST_MAJORMINOR)
 PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ)
+AC_DEFINE_UNQUOTED(GST_MAJORMINOR, "$GST_MAJORMINOR", [Gst MajorMinor version])
 AC_SUBST(GST_CFLAGS)
 AC_SUBST(GST_LIBS)
 
@@ -254,6 +255,20 @@ dnl add debugging options ...
 
 GST_VALGRIND_CHECK()
 
+dnl Stuff needed for the python plugin loader
+
+AM_CHECK_PYTHON_LIBS(,[AC_MSG_ERROR(could not find Python lib)])
+
+GST_SET_PLUGINDIR
+
+
+dnl Stuff needed for the python plugin loader
+
+AM_CHECK_PYTHON_LIBS(,[AC_MSG_ERROR(could not find Python lib)])
+
+GST_SET_PLUGINDIR
+
+
 AC_OUTPUT([
   Makefile
   codegen/Makefile
@@ -264,6 +279,7 @@ AC_OUTPUT([
   pkgconfig/Makefile
   pkgconfig/gst-python.pc
   pkgconfig/gst-python-uninstalled.pc
+  plugin/Makefile
   testsuite/Makefile
   gst-python.spec
 ])
