doc: correct help for 'bos getlog' -restricted mode
[openafs.git] / acinclude.m4
index f8a0e23..a676c8e 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],
@@ -693,6 +698,14 @@ else
                        AFS_SYSNAME="x86_darwin_150"
                        OSXSDK="macosx10.11"
                        ;;
+               x86_64-apple-darwin16.*)
+                       AFS_SYSNAME="x86_darwin_160"
+                       OSXSDK="macosx10.12"
+                       ;;
+               i?86-apple-darwin16.*)
+                       AFS_SYSNAME="x86_darwin_160"
+                       OSXSDK="macosx10.12"
+                       ;;
                sparc-sun-solaris2.8)
                        AFS_SYSNAME="sun4x_58"
                        ;;
@@ -912,10 +925,15 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                                          [#include <linux/fs.h>],
                                          [void],
                                          [struct inode *inode, void *link_data])
+                AC_CHECK_LINUX_OPERATION([inode_operations], [rename], [takes_flags],
+                                         [#include <linux/fs.h>],
+                                         [int],
+                                         [struct inode *oinode, struct dentry *odentry,
+                                               struct inode *ninode, struct dentry *ndentry,
+                                               unsigned int flags])
 
                 dnl Check for header files
                 AC_CHECK_LINUX_HEADER([config.h])
-                AC_CHECK_LINUX_HEADER([completion.h])
                 AC_CHECK_LINUX_HEADER([exportfs.h])
                 AC_CHECK_LINUX_HEADER([freezer.h])
                 AC_CHECK_LINUX_HEADER([key-type.h])
@@ -936,6 +954,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_STRUCT([ctl_table], [ctl_name], [sysctl.h])
                 AC_CHECK_LINUX_STRUCT([dentry], [d_u.d_alias], [dcache.h])
                 AC_CHECK_LINUX_STRUCT([dentry_operations], [d_automount], [dcache.h])
+                AC_CHECK_LINUX_STRUCT([group_info], [gid], [cred.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_alloc_sem], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_blkbits], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_blksize], [fs.h])
@@ -948,6 +967,8 @@ 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])
                 AC_CHECK_LINUX_STRUCT([key_type], [preparse], [key-type.h])
@@ -1041,9 +1062,15 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_FUNC([kernel_setsockopt],
                                     [#include <linux/net.h>],
                                     [kernel_setsockopt(NULL, 0, 0, NULL, 0);])
+                AC_CHECK_LINUX_FUNC([locks_lock_file_wait],
+                                    [#include <linux/fs.h>],
+                                    [locks_lock_file_wait(NULL, NULL);])
                 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);])
@@ -1063,6 +1090,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_FUNC([set_nlink],
                                     [#include <linux/fs.h>],
                                     [set_nlink(NULL, 1);])
+                AC_CHECK_LINUX_FUNC([setattr_prepare],
+                                    [#include <linux/fs.h>],
+                                    [setattr_prepare(NULL, NULL);])
                 AC_CHECK_LINUX_FUNC([sock_create_kern],
                                     [#include <linux/net.h>],
                                     [sock_create_kern(0, 0, 0, NULL);])
@@ -1072,6 +1102,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_FUNC([splice_direct_to_actor],
                                     [#include <linux/splice.h>],
                                     [splice_direct_to_actor(NULL,NULL,NULL);])
+                AC_CHECK_LINUX_FUNC([default_file_splice_read],
+                                    [#include <linux/fs.h>],
+                                    [default_file_splice_read(NULL,NULL,NULL, 0, 0);])
                 AC_CHECK_LINUX_FUNC([svc_addr_in],
                                     [#include <linux/sunrpc/svc.h>],
                                     [svc_addr_in(NULL);])
@@ -1085,6 +1118,12 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                                     [#include <linux/kernel.h>
                                      #include <linux/kthread.h>],
                                     [kthread_run(NULL, NULL, "test");])
+                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
@@ -1215,11 +1254,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
@@ -1389,6 +1432,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=""
@@ -1422,6 +1469,8 @@ if test "$enable_tivoli_tsm" = "yes"; then
        XBSADIR2=/opt/tivoli/tsm/client/api/bin/xopen
        XBSADIR3=/usr/tivoli/tsm/client/api/bin/sample
        XBSADIR4=/opt/tivoli/tsm/client/api/bin/sample
+       XBSADIR5=/usr/tivoli/tsm/client/api/bin64/sample
+       XBSADIR6=/opt/tivoli/tsm/client/api/bin64/sample
 
        if test -r "$XBSADIR3/dsmapifp.h"; then
                XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR3"
@@ -1431,6 +1480,14 @@ if test "$enable_tivoli_tsm" = "yes"; then
                XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR4"
                XBSA_XLIBS="-ldl"
                AC_MSG_RESULT([yes, $XBSA_CFLAGS])
+       elif test -r "$XBSADIR5/dsmapifp.h"; then
+               XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR5"
+               XBSA_XLIBS="-ldl"
+               AC_MSG_RESULT([yes, $XBSA_CFLAGS])
+       elif test -r "$XBSADIR6/dsmapifp.h"; then
+               XBSA_CFLAGS="-Dxbsa -DNEW_XBSA -I$XBSADIR6"
+               XBSA_XLIBS="-ldl"
+               AC_MSG_RESULT([yes, $XBSA_CFLAGS])
        elif test -r "$XBSADIR1/xbsa.h"; then
                XBSA_CFLAGS="-Dxbsa -I$XBSADIR1"
                XBSA_XLIBS=""
@@ -1563,7 +1620,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
@@ -1585,6 +1642,7 @@ AC_SUBST(INSTALL_KAUTH)
 
 AC_CHECK_FUNCS([ \
        arc4random \
+       closelog \
        fcntl \
        fseeko64 \
        ftello64 \
@@ -1596,6 +1654,7 @@ AC_CHECK_FUNCS([ \
        getrlimit \
        issetugid \
        mkstemp \
+       openlog \
        poll \
        pread \
        preadv \
@@ -1613,6 +1672,7 @@ AC_CHECK_FUNCS([ \
        strerror \
        sysconf \
        sysctl \
+       syslog \
        tdestroy \
        timegm \
 ])