diff --git a/src/modules/files/configure.in b/src/modules/files/configure.in
index 5778818c60eeca0bcba96ab915e517d581e95865..a39ea26da259da5179dbbb721206107370418f52 100644
--- a/src/modules/files/configure.in
+++ b/src/modules/files/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.45 1998/05/17 19:08:41 grubba Exp $
+# $Id: configure.in,v 1.46 1998/05/17 21:04:23 grubba Exp $
 AC_INIT(file.c)
 AC_CONFIG_HEADER(file_machine.h)
 
@@ -146,6 +146,82 @@ fi
 
 else :; fi
 
+if test x$ac_cv_func_statvfs = xyes ; then
+  AC_MSG_CHECKING(if the struct statvfs exists)
+  AC_CACHE_VAL(pike_cv_struct_statvfs, [
+    AC_TRY_COMPILE([
+#ifndef POSIX_SOURCE
+#define POSIX_SOURCE
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_SYSPROTO_H
+#include <sys/sysproto.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <sys/stat.h>
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+    ], [
+      struct statfs st;
+    ], [ pike_cv_struct_statvfs=yes
+    ], [ pike_cv_struct_statvfs=no
+    ])
+  ])
+  AC_MSG_RESULT($pike_cv_struct_statvfs)
+
+  if test x$pike_cv_struct_statvfs = xyes; then
+    AC_DEFINE(HAVE_STRUCT_STATVFS)
+
+    AC_MSG_CHECKING(if the struct statvfs has the member f_basetype)
+    AC_CACHE_VAL(pike_cv_struct_statvfs_f_basetype, [
+      AC_TRY_COMPILE([
+#ifndef POSIX_SOURCE
+#define POSIX_SOURCE
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_SYSPROTO_H
+#include <sys/sysproto.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <sys/stat.h>
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+      ], [
+        struct statvfs st;
+        st.f_basetype = 0;
+      ], [ pike_cv_struct_statvfs_f_basetype=yes
+      ], [ pike_cv_struct_statvfs_f_basetype=no
+      ])
+    ])
+    AC_MSG_RESULT($pike_cv_struct_statvfs_f_basetype)
+    if test x$pike_cv_struct_statfs_f_bavail = xyes; then
+      AC_DEFINE(HAVE_STATVFS_F_BASETYPE)
+    else :; fi
+  else :; fi
+else :; fi
+
 if test x$ac_cv_func_statfs = xyes ; then
   AC_MSG_CHECKING(if statfs takes 2(BSD) or 4(SysV) arguments)
   AC_CACHE_VAL(pike_cv_func_sysv_statfs, [