afs: define NUMPAGGROUPS once
[openafs.git] / acinclude.m4
index f215319..829050e 100644 (file)
@@ -111,6 +111,11 @@ AC_ARG_ENABLE([pthreaded-ubik],
          enabled)])],
     [],
     [enable_pthreaded_ubik="yes"])
+AC_ARG_ENABLE([ubik-read-while-write],
+    [AS_HELP_STRING([--enable-ubik-read-while-write],
+       [enable vlserver read from db cache during write locks (EXPERIMENTAL)])],
+    [],
+    [enable_ubik_read_while_write="no"])
 
 dnl Kernel module build options.
 AC_ARG_WITH([linux-kernel-headers],
@@ -947,6 +952,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h])
                 AC_CHECK_LINUX_STRUCT([file_system_type], [mount], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode_operations], [truncate], [fs.h])
+                AC_CHECK_LINUX_STRUCT([inode_operations], [get_link], [fs.h])
                 AC_CHECK_LINUX_STRUCT([key], [payload.value], [key.h])
                 AC_CHECK_LINUX_STRUCT([key_type], [instantiate_prep], [key-type.h])
                 AC_CHECK_LINUX_STRUCT([key_type], [match_preparse], [key-type.h])
@@ -1047,6 +1053,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_FUNC([page_follow_link],
                                     [#include <linux/fs.h>],
                                     [page_follow_link(0,0);])
+                AC_CHECK_LINUX_FUNC([page_get_link],
+                                    [#include <linux/fs.h>],
+                                    [page_get_link(0,0,0);])
                 AC_CHECK_LINUX_FUNC([page_offset],
                                     [#include <linux/pagemap.h>],
                                     [page_offset(NULL);])
@@ -1094,6 +1103,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_FUNC([inode_nohighmem],
                                     [#include <linux/fs.h>],
                                     [inode_nohighmem(NULL);])
+                AC_CHECK_LINUX_FUNC([inode_lock],
+                                    [#include <linux/fs.h>],
+                                    [inode_lock(NULL);])
 
                 dnl Consequences - things which get set as a result of the
                 dnl                above tests
@@ -1224,11 +1236,15 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 if test -f "$LINUX_KERNEL_PATH/include/linux/mm_inline.h"; then
                  AC_DEFINE(HAVE_MM_INLINE_H, 1, [define if you have mm_inline.h header file])
                 fi
-                if test "x$ac_cv_linux_kernel_page_follow_link" = "xyes" -o "x$ac_cv_linux_func_i_put_link_takes_cookie" = "xyes"; then
+                if test "x$ac_cv_linux_func_page_get_link" = "xyes" -o "x$ac_cv_linux_func_i_put_link_takes_cookie" = "xyes"; then
                  AC_DEFINE(USABLE_KERNEL_PAGE_SYMLINK_CACHE, 1, [define if your kernel has a usable symlink cache API])
                 else
                  AC_MSG_WARN([your kernel does not have a usable symlink cache API])
                 fi
+                if test "x$ac_cv_linux_func_page_get_link" != "xyes" -a "x$ac_cv_linux_struct_inode_operations_has_get_link" = "xyes"; then
+                       AC_MSG_ERROR([Your kernel does not use follow_link - not supported without symlink cache API])
+                       exit 1
+                fi
                 :
                fi
                if test "x$enable_linux_d_splice_alias_extra_iput" = xyes; then
@@ -1398,6 +1414,10 @@ else
 fi
 AC_SUBST(USE_UNIX_SOCKETS)
 
+if test "$enable_ubik_read_while_write" = "yes"; then
+       AC_DEFINE(UBIK_READ_WHILE_WRITE, 1, [define if you want to enable ubik read while write])
+fi
+
 if test "$enable_namei_fileserver" = "yes"; then
        AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
        VFSCK=""
@@ -1582,7 +1602,7 @@ if test "$enable_debug_locks" = yes; then
 fi
 
 if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_pam" = yes; then
-       HAVE_PAM="YES"
+       HAVE_PAM="yes"
 else
        HAVE_PAM="no"
 fi