--- config_office/configure.in	2007-03-22 16:54:38.000000000 +0100
+++ config_office/configure.in	2007-03-29 15:24:14.000000000 +0200
@@ -5030,16 +5030,28 @@ dnl Gnome VFS check
 dnl ===================================================================
 
 ENABLE_GNOMEVFS=""
+GNOMEVFS_HAS_LOCKING=""
 AC_MSG_CHECKING([whether to enable GNOME VFS support])
 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes"; then
     ENABLE_GNOMEVFS="TRUE"
     AC_MSG_RESULT([yes])
     PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 )
     PKG_CHECK_MODULES( GCONF, gconf-2.0 )
+
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $GNOMEVFS_CFLAGS"
+    AC_CHECK_DECL(GNOME_VFS_OPEN_LOCKED,
+                  GNOMEVFS_HAS_LOCKING="YES",,
+                  [#include <libgnomevfs/gnome-vfs-handle.h>])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_RESTORE
 else
     AC_MSG_RESULT([no])
 fi
 AC_SUBST(ENABLE_GNOMEVFS)
+AC_SUBST(GNOMEVFS_HAS_LOCKING)
 
 dnl ===================================================================
 dnl Check whether the gtk 2.0 libraries are available.
--- config_office/set_soenv.in	2007-03-22 16:54:38.000000000 +0100
+++ config_office/set_soenv.in	2007-03-29 15:17:34.000000000 +0200
@@ -1549,5 +1549,6 @@ ToFile( "DBUS_PACKAGE",      "@DBUS_PACK
 ToFile( "ENABLE_CAIRO",      "@ENABLE_CAIRO@",     "e" );
 ToFile( "ENABLE_GNOMEVFS",   "@ENABLE_GNOMEVFS@",  "e" );
+ToFile( "GNOMEVFS_HAS_LOCKING","@GNOMEVFS_HAS_LOCKING@",  "e" );
 ToFile( "ENABLE_KDE",        "@ENABLE_KDE@",       "e" );
 ToFile( "KDE_CFLAGS",        "@KDE_CFLAGS@",       "e" );
 ToFile( "KDE_LIBS",          "@KDE_LIBS@",         "e" );
