Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / libcfs / autoconf / lustre-libcfs.m4
index e536a79..c200cae 100644 (file)
@@ -241,6 +241,24 @@ CFLAGS="$tmp_flags"
 ])
 
 
+# check if task_struct with rcu memeber
+AC_DEFUN([LIBCFS_TASK_RCU],
+[AC_MSG_CHECKING([if task_struct has a rcu field])
+LB_LINUX_TRY_COMPILE([
+       #include <linux/sched.h>
+],[
+        struct task_struct tsk;
+
+        tsk.rcu.next = NULL;
+],[
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(HAVE_TASK_RCU, 1,
+                  [task_struct has rcu field])
+],[
+        AC_MSG_RESULT([no])
+])
+])
+
 # LIBCFS_TASKLIST_LOCK
 # 2.6.18 remove tasklist_lock export
 AC_DEFUN([LIBCFS_TASKLIST_LOCK],
@@ -415,7 +433,6 @@ LB_LINUX_TRY_COMPILE([
 ])
 ])
 
-
 #
 # LIBCFS_PROG_LINUX
 #
@@ -434,6 +451,7 @@ LIBCFS_FUNC_SHOW_TASK
 LIBCFS_U64_LONG_LONG
 LIBCFS_SSIZE_T_LONG
 LIBCFS_SIZE_T_LONG
+LIBCFS_TASK_RCU
 # 2.6.18
 LIBCFS_TASKLIST_LOCK
 # 2.6.19
@@ -491,6 +509,21 @@ AC_CHECK_TYPE([spinlock_t],
 # lnet/utils/wirecheck.c
 AC_CHECK_FUNCS([strnlen])
 
+AC_CHECK_TYPE([umode_t],
+       [AC_DEFINE(HAVE_UMODE_T, 1, [umode_t is defined])],
+       [],
+       [#include <signal.h>])
+
+AC_CHECK_TYPE([__u64],
+       [AC_DEFINE(HAVE___U64, 1, [__u64 is defined])],
+       [],
+       [#include <signal.h>])
+
+AC_CHECK_TYPE([__s64],
+       [AC_DEFINE(HAVE___S64, 1, [__s64 is defined])],
+       [],
+       [#include <signal.h>])
+
 # --------  Check for required packages  --------------