--- config_office-orig/configure.in	2006-08-17 10:43:11.000000000 +0200
+++ config_office/configure.in	2006-08-17 10:48:43.000000000 +0200
@@ -718,6 +718,7 @@ case "$build_os" in
 		test_x=yes
 		test_gtk=yes
 		build_cairo=yes
+		build_gstreamer=yes
 		test_kde=yes
 		test_cups=yes
 		_os=SunOS
@@ -745,6 +746,7 @@ case "$build_os" in
 		test_x=yes
 		test_gtk=yes
 		build_cairo=yes
+		build_gstreamer=yes
 		test_kde=yes
 		test_cups=yes
 		if getconf GNU_LIBPTHREAD_VERSION |grep -q NPTL; then
@@ -767,12 +769,14 @@ case "$build_os" in
 		test_cups=yes
 		test_gtk=no
 		build_cairo=no
+		build_gstreamer=no
 		_os=Darwin
 		;;
 	freebsd*)
 		test_x=yes
 		test_gtk=yes
 		build_cairo=yes
+		build_gstreamer=yes
 		test_kde=yes
 		test_cups=yes
 		AC_MSG_CHECKING([the FreeBSD operating system release])
@@ -805,6 +809,7 @@ case "$build_os" in
 		test_x=yes
 		test_gtk=yes
 		build_cairo=yes
+		build_gstreamer=yes
 		test_kde=yes
 		test_cups=no
 		PTHREAD_CFLAGS="-pthread"
@@ -4602,6 +4607,26 @@ AC_SUBST(CAIRO_CFLAGS)
 AC_SUBST(CAIRO_LIBS)
 
 dnl ===================================================================
+dnl Check whether the GStreamer libraries are available.
+dnl ===================================================================
+
+ENABLE_GSTREAMER=""
+
+if test  "$build_gstreamer" = "yes"; then
+
+    AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend])
+    if test "x$enable_gstreamer" != "xno" ; then
+        ENABLE_GSTREAMER="TRUE"
+	AC_MSG_RESULT([yes])
+	PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 )
+    else
+	     AC_MSG_RESULT([no])
+    fi
+fi
+
+AC_SUBST(ENABLE_GSTREAMER)
+
+dnl ===================================================================
 dnl Check whether the Qt and KDE libraries are available.
 dnl ===================================================================
 
--- config_office-orig/set_soenv.in	2006-08-17 10:43:11.000000000 +0200
+++ config_office/set_soenv.in	2006-08-17 11:05:37.000000000 +0200
@@ -1495,6 +1495,7 @@ ToFile( "ENABLE_STATIC_GTK", "@ENABLE_ST
 ToFile( "ENABLE_DBUS",       "@ENABLE_DBUS@",      "e" );
 ToFile( "DBUS_PACKAGE",      "@DBUS_PACKAGE@",     "e" );
 ToFile( "ENABLE_CAIRO",      "@ENABLE_CAIRO@",     "e" );
+ToFile( "ENABLE_GSTREAMER",  "@ENABLE_GSTREAMER@", "e" );
 ToFile( "ENABLE_GNOMEVFS",   "@ENABLE_GNOMEVFS@",  "e" );
 ToFile( "ENABLE_KDE",        "@ENABLE_KDE@",       "e" );
 ToFile( "KDE_CFLAGS",        "@KDE_CFLAGS@",       "e" );
