--- origsrc/totem-2.28.2/configure.in	2009-10-26 06:27:03.000000000 -0500
+++ src/totem-2.28.2/configure.in	2009-11-09 00:14:20.122107200 -0600
@@ -801,6 +801,22 @@ AC_SUBST([AM_CFLAGS])
 AC_SUBST([AM_CXXFLAGS])
 AC_SUBST([AM_LDFLAGS])
 
+dnl ================================================================
+dnl Win32 plugin support
+dnl ================================================================
+case "$host_os" in
+	cygwin*|mingw*)
+		platform_win32=yes
+		win32_plugin_ldflags="-no-undefined -Wl,\$(top_builddir)/src/libtotem.a"
+		;;
+	*)
+		platform_win32=no
+		win32_plugin_ldflags=
+		;;
+esac
+AM_CONDITIONAL(PLATFORM_WIN32, test "x$platform_win32" = "xyes")
+AC_SUBST(win32_plugin_ldflags)
+
 AC_OUTPUT([
 Makefile
 totem.spec
--- origsrc/totem-2.28.2/lib/Makefile.am	2009-09-29 09:47:26.000000000 -0500
+++ src/totem-2.28.2/lib/Makefile.am	2009-11-09 00:14:20.122107200 -0600
@@ -27,6 +27,7 @@ libtotemscrsaver_la_LDFLAGS =				\
 	$(AM_LDFLAGS)
 
 libtotemscrsaver_la_LIBADD =				\
+	$(GTK_LIBS)						\
 	$(DBUS_LIBS)					\
 	$(XTEST_LIBS)
 
--- origsrc/totem-2.28.2/src/Makefile.am	2009-10-21 09:17:05.000000000 -0500
+++ src/totem-2.28.2/src/Makefile.am	2009-11-09 00:15:14.956202800 -0600
@@ -1,4 +1,4 @@
-SUBDIRS = plugins backend
+SUBDIRS = backend . plugins
 
 bin_PROGRAMS = totem totem-video-thumbnailer totem-video-indexer totem-audio-preview
 libexec_PROGRAMS =
@@ -16,7 +16,7 @@ common_defines = \
 	-DBINDIR=\""$(bindir)"\"			\
 	$(DISABLE_DEPRECATED)
 
-modules_flags = -export_dynamic -avoid-version -module -no-undefined
+modules_flags = -export-dynamic -avoid-version -module -no-undefined
 
 # Totem UI ltlibrary (used by browser plugins)
 
@@ -183,6 +183,11 @@ totem_CFLAGS =				\
 totem_LDFLAGS = \
 	$(AM_LDFLAGS)
 
+if PLATFORM_WIN32
+totem_LDFLAGS += \
+	-Wl,--export-all-symbols -Wl,--out-implib,libtotem.a
+endif
+
 totem_LDADD =						\
 	libtotem_main.la				\
 	$(DEPENDENCY_LIBS)				\
@@ -285,8 +290,8 @@ test_properties_page_LDFLAGS = \
 	$(AM_LDFLAGS)
 
 test_properties_page_LDADD = 					\
-	backend/libbaconvideowidget.la				\
 	plugins/properties/libbaconvideowidgetproperties.la	\
+	backend/libbaconvideowidget.la				\
 	libtotem_player.la					\
 	$(DEPENDENCY_LIBS)					\
 	$(NAUTILUS_LIBS)					\
@@ -355,6 +360,12 @@ totem_audio_preview_LDADD = \
 	$(XVIDMODE_LIBS)		\
 	$(X_LIBS)
 
+plugins/libtotemmodule.la:
+	cd $(@D) ; $(MAKE) $(@F)
+
+plugins/properties/libbaconvideowidgetproperties.la:
+	cd $(@D) ; $(MAKE) $(@F)
+
 CLEANFILES =			\
 	*.bak			\
 	core*			\
--- origsrc/totem-2.28.2/src/backend/Makefile.am	2009-10-21 09:17:05.000000000 -0500
+++ src/totem-2.28.2/src/backend/Makefile.am	2009-11-09 00:14:20.137707200 -0600
@@ -58,6 +58,7 @@ libbaconvideowidget_la_LIBADD =	\
 	$(XVIDMODE_LIBS)	\
 	$(MM_LIBS)		\
 	$(GST_LIBS)		\
+	$(GTK_LIBS)		\
 	$(EXTRA_BACKEND_LIBS)	\
 	$(X_LIBS)		\
 	$(MISSING_PLUGINS_LIBS)
--- origsrc/totem-2.28.2/src/plugins/bemused/Makefile.am	2009-09-29 09:47:30.000000000 -0500
+++ src/totem-2.28.2/src/plugins/bemused/Makefile.am	2009-11-09 00:14:20.137707200 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/bemused
 plugin_LTLIBRARIES = libbemused.la
--- origsrc/totem-2.28.2/src/plugins/brasero-disc-recorder/Makefile.am	2009-09-29 09:47:30.000000000 -0500
+++ src/totem-2.28.2/src/plugins/brasero-disc-recorder/Makefile.am	2009-11-09 00:14:20.137707200 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/brasero-disc-recorder
 plugin_LTLIBRARIES = libbrasero-disc-recorder.la
--- origsrc/totem-2.28.2/src/plugins/galago/Makefile.am	2009-09-29 09:47:31.000000000 -0500
+++ src/totem-2.28.2/src/plugins/galago/Makefile.am	2009-11-09 00:14:20.137707200 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/galago
 plugin_LTLIBRARIES = libtgp.la
--- origsrc/totem-2.28.2/src/plugins/gromit/Makefile.am	2009-09-29 09:47:31.000000000 -0500
+++ src/totem-2.28.2/src/plugins/gromit/Makefile.am	2009-11-09 00:14:20.153307200 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/gromit
 plugin_LTLIBRARIES = libgromit.la
@@ -22,7 +22,7 @@ common_defines = \
 
 libgromit_la_SOURCES = totem-gromit.c
 libgromit_la_LDFLAGS = $(modules_flags)
-libgromit_la_LIBADD = 
+libgromit_la_LIBADD = $(DBUS_LIBS)
 libgromit_la_CPPFLAGS = $(common_defines)
 
 libgromit_la_CFLAGS = \
--- origsrc/totem-2.28.2/src/plugins/lirc/Makefile.am	2009-09-29 09:47:31.000000000 -0500
+++ src/totem-2.28.2/src/plugins/lirc/Makefile.am	2009-11-09 00:14:20.153307200 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/lirc
 plugin_LTLIBRARIES = liblirc.la
--- origsrc/totem-2.28.2/src/plugins/media-player-keys/Makefile.am	2009-10-21 09:17:06.000000000 -0500
+++ src/totem-2.28.2/src/plugins/media-player-keys/Makefile.am	2009-11-09 00:14:20.153307200 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/media-player-keys
 plugin_LTLIBRARIES = libmedia_player_keys.la
--- origsrc/totem-2.28.2/src/plugins/ontop/Makefile.am	2009-09-29 09:47:31.000000000 -0500
+++ src/totem-2.28.2/src/plugins/ontop/Makefile.am	2009-11-09 00:14:20.168907200 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/ontop
 plugin_LTLIBRARIES = libontop.la
@@ -22,7 +22,7 @@ common_defines = \
 
 libontop_la_SOURCES = totem-ontop.c
 libontop_la_LDFLAGS = $(modules_flags)
-libontop_la_LIBADD = $(top_builddir)/lib/libtotemscrsaver.la
+libontop_la_LIBADD = $(top_builddir)/lib/libtotemscrsaver.la
 libontop_la_CPPFLAGS = $(common_defines)
 
 libontop_la_CFLAGS = \
--- origsrc/totem-2.28.2/src/plugins/properties/Makefile.am	2009-09-29 09:47:31.000000000 -0500
+++ src/totem-2.28.2/src/plugins/properties/Makefile.am	2009-11-09 00:14:20.168907200 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/properties
 plugin_LTLIBRARIES = libmovie-properties.la
@@ -24,7 +24,7 @@ common_defines = \
 
 libmovie_properties_la_SOURCES = totem-movie-properties.c
 libmovie_properties_la_LDFLAGS = $(modules_flags)
-libmovie_properties_la_LIBADD = libbaconvideowidgetproperties.la
+libmovie_properties_la_LIBADD = libbaconvideowidgetproperties.la $(GTK_LIBS)
 libmovie_properties_la_CPPFLAGS = $(common_defines)
 
 libmovie_properties_la_CFLAGS = \
--- origsrc/totem-2.28.2/src/plugins/publish/Makefile.am	2009-10-21 09:17:06.000000000 -0500
+++ src/totem-2.28.2/src/plugins/publish/Makefile.am	2009-11-09 00:14:20.168907200 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/publish
 plugin_LTLIBRARIES = libpublish.la
--- origsrc/totem-2.28.2/src/plugins/sample-vala/Makefile.am	2009-09-29 09:47:31.000000000 -0500
+++ src/totem-2.28.2/src/plugins/sample-vala/Makefile.am	2009-11-09 00:14:20.168907200 -0600
@@ -7,7 +7,7 @@ plugin_in_files = sample-vala.totem-plug
 %.totem-plugin: %.totem-plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
 
 if ENABLE_VALA
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugin_LTLIBRARIES = libsample-vala.la
 # override to _not_ install the test plugins
@@ -29,6 +29,7 @@ common_defines = \
 
 nodist_libsample_vala_la_SOURCES = $(BUILT_SOURCES)
 libsample_vala_la_LDFLAGS = $(modules_flags)
+libsample_vala_la_LIBADD = $(VALA_LIBS)
 libsample_vala_la_CPPFLAGS = $(common_defines)
 
 libsample_vala_la_CFLAGS = \
--- origsrc/totem-2.28.2/src/plugins/screensaver/Makefile.am	2009-09-29 09:47:31.000000000 -0500
+++ src/totem-2.28.2/src/plugins/screensaver/Makefile.am	2009-11-09 00:14:20.184507300 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/screensaver
 plugin_LTLIBRARIES = libscreensaver.la
@@ -22,7 +22,7 @@ common_defines = \
 
 libscreensaver_la_SOURCES = totem-screensaver.c
 libscreensaver_la_LDFLAGS = $(modules_flags)
-libscreensaver_la_LIBADD = $(top_builddir)/lib/libtotemscrsaver.la
+libscreensaver_la_LIBADD = $(top_builddir)/lib/libtotemscrsaver.la $(SCREENSAVER_LIBS)
 libscreensaver_la_CPPFLAGS = $(common_defines)
 
 libscreensaver_la_CFLAGS = \
--- origsrc/totem-2.28.2/src/plugins/screenshot/Makefile.am	2009-10-21 09:17:06.000000000 -0500
+++ src/totem-2.28.2/src/plugins/screenshot/Makefile.am	2009-11-09 00:14:20.184507300 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/screenshot
 uidir = $(plugindir)
@@ -34,6 +34,7 @@ libscreenshot_la_SOURCES = \
 	totem-gallery-progress.c	\
 	totem-gallery-progress.h
 libscreenshot_la_LDFLAGS = $(modules_flags)
+libscreenshot_la_LIBADD = $(GTK_LIBS) $(SCREENSAVER_LIBS)
 libscreenshot_la_CPPFLAGS = \
 	$(common_defines)		\
 	-I$(top_srcdir)/src/backend	\
--- origsrc/totem-2.28.2/src/plugins/sidebar-test/Makefile.am	2009-09-29 09:47:32.000000000 -0500
+++ src/totem-2.28.2/src/plugins/sidebar-test/Makefile.am	2009-11-09 00:14:20.184507300 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/sidebar-test
 plugin_LTLIBRARIES = libsidebar-test.la
@@ -24,6 +24,7 @@ common_defines = \
 
 libsidebar_test_la_SOURCES = totem-sidebar-test.c
 libsidebar_test_la_LDFLAGS = $(modules_flags)
+libsidebar_test_la_LIBADD = $(GTK_LIBS)
 libsidebar_test_la_CPPFLAGS = $(common_defines)
 
 libsidebar_test_la_CFLAGS = \
--- origsrc/totem-2.28.2/src/plugins/skipto/Makefile.am	2009-09-29 09:47:32.000000000 -0500
+++ src/totem-2.28.2/src/plugins/skipto/Makefile.am	2009-11-09 00:14:20.200107300 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/skipto
 uidir = $(plugindir)
@@ -30,6 +30,7 @@ libskipto_la_SOURCES = \
 	totem-skipto.c		\
 	totem-skipto.h
 libskipto_la_LDFLAGS = $(modules_flags)
+libskipto_la_LIBADD = $(GTK_LIBS)
 libskipto_la_CPPFLAGS = \
 	$(common_defines)		\
 	-I$(top_srcdir)/src/backend	\
--- origsrc/totem-2.28.2/src/plugins/thumbnail/Makefile.am	2009-09-29 09:47:32.000000000 -0500
+++ src/totem-2.28.2/src/plugins/thumbnail/Makefile.am	2009-11-09 00:14:20.200107300 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/thumbnail
 plugin_LTLIBRARIES = libthumbnail.la
@@ -22,7 +22,7 @@ common_defines = \
 
 libthumbnail_la_SOURCES = totem-thumbnail.c
 libthumbnail_la_LDFLAGS = $(modules_flags)
-libthumbnail_la_LIBADD = 
+libthumbnail_la_LIBADD = $(GTK_LIBS)
 libthumbnail_la_CPPFLAGS = $(common_defines)
 
 libthumbnail_la_CFLAGS = \
--- origsrc/totem-2.28.2/src/plugins/tracker/Makefile.am	2009-09-29 09:47:32.000000000 -0500
+++ src/totem-2.28.2/src/plugins/tracker/Makefile.am	2009-11-09 00:14:20.200107300 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export-dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/tracker
 plugin_LTLIBRARIES = libtracker.la
--- origsrc/totem-2.28.2/src/plugins/youtube/Makefile.am	2009-10-21 09:17:06.000000000 -0500
+++ src/totem-2.28.2/src/plugins/youtube/Makefile.am	2009-11-09 04:33:07.285258900 -0600
@@ -1,4 +1,4 @@
-modules_flags = -export_dynamic -avoid-version -module
+modules_flags = -export_dynamic -avoid-version -module $(win32_plugin_ldflags)
 
 plugindir = $(PLUGINDIR)/youtube
 plugin_LTLIBRARIES = libyoutube.la
@@ -25,7 +25,7 @@ common_defines = \
 
 libyoutube_la_SOURCES = totem-youtube.c
 libyoutube_la_LDFLAGS = $(modules_flags)
-libyoutube_la_LIBADD = $(LIBGDATA_LIBS)
+libyoutube_la_LIBADD = $(GTK_LIBS) $(LIBGDATA_LIBS)
 libyoutube_la_CPPFLAGS = $(common_defines)
 
 libyoutube_la_CFLAGS = \
