DEVEL15-linux-disable-readahad-20081108
[openafs.git] / src / cf / linux-test4.m4
index 65df334..1d95461 100644 (file)
@@ -1051,3 +1051,56 @@ AC_DEFUN([LINUX_EXPORTS_PROC_ROOT_FS], [
     AC_DEFINE([EXPORTED_PROC_ROOT_FS], 1, [define if proc_root_fs is exported])
   fi])
  
+AC_DEFUN([LINUX_D_PATH_TAKES_STRUCT_PATH], [
+  AC_MSG_CHECKING([if d_path() takes a struct path argument])
+  AC_CACHE_VAL([ac_cv_linux_d_path_takes_struct_path], [
+    AC_TRY_KBUILD(
+[#include <linux/dcache.h>],
+[struct path *p;
+d_path(p, NULL, 0);],
+      ac_cv_linux_d_path_takes_struct_path=yes,
+      ac_cv_linux_d_path_takes_struct_path=no)])
+  AC_MSG_RESULT($ac_cv_linux_d_path_takes_struct_path)
+  if test "x$ac_cv_linux_d_path_takes_struct_path" = "xyes"; then
+    AC_DEFINE([D_PATH_TAKES_STRUCT_PATH], 1, [define if d_path() takes a struct path argument])
+  fi])
+AC_DEFUN([LINUX_NEW_EXPORT_OPS], [
+  AC_MSG_CHECKING([if kernel uses new export ops])
+  AC_CACHE_VAL([ac_cv_linux_new_export_ops], [
+    AC_TRY_KBUILD(
+[#include <linux/exportfs.h>],
+[struct export_operations _eops;
+_eops.fh_to_parent(NULL, NULL, 0, 0);],
+      ac_cv_linux_new_export_ops=yes,
+      ac_cv_linux_new_export_ops=no)])
+  AC_MSG_RESULT($ac_cv_linux_new_export_ops)
+  if test "x$ac_cv_linux_new_export_ops" = "xyes"; then
+    AC_DEFINE([NEW_EXPORT_OPS], 1, [define if kernel uses new export ops])
+  fi])
+AC_DEFUN([LINUX_SEMAPHORE_H_EXISTS], [
+  AC_MSG_CHECKING([for linux/semaphore.h existance])
+  AC_CACHE_VAL([ac_cv_linux_semaphore_h_exists], [
+    AC_TRY_KBUILD(
+[#include <linux/semaphore.h>],
+[return;],
+      ac_cv_linux_semaphore_h_exists=yes,
+      ac_cv_linux_semaphore_h_exists=no)])
+  AC_MSG_RESULT($ac_cv_linux_semaphore_h_exists)
+  if test "x$ac_cv_linux_semaphore_h_exists" = "xyes"; then
+    AC_DEFINE([LINUX_SEMAPHORE_H], 1, [define if linux/semaphore.h exists])
+  fi])
+
+AC_DEFUN([LINUX_HAVE_BDI_INIT], [
+  AC_MSG_CHECKING([for linux bdi_init()])
+  AC_CACHE_VAL([ac_cv_linux_bdi_init], [
+    AC_TRY_KBUILD(
+[#include <linux/backing-dev.h>],
+[bdi_init(NULL);],
+      ac_cv_linux_bdi_init=yes,
+      ac_cv_linux_bdi_init=no)])
+  AC_MSG_RESULT($ac_cv_linux_bdi_init)
+  if test "x$ac_cv_linux_bdi_init" = "xyes"; then
+    AC_DEFINE([HAVE_BDI_INIT], 1, [define if your kernel has a bdi_init()])
+  fi])