[enable Linux syscall probing (defaults to autodetect)])],
[],
[enable_linux_syscall_probing="maybe"])
+AC_ARG_ENABLE([linux-d_splice_alias-extra-iput],
+ [AS_HELP_STRING([--enable-linux-d_splice_alias-extra-iput],
+ [Linux has introduced an incompatible behavior change in the
+ d_splice_alias function with no reliable way to determine which
+ behavior will be produced. If Linux commit
+ 51486b900ee92856b977eacfc5bfbe6565028070 (or equivalent) has been
+ applied to your kernel, disable this option. If that commit is
+ not present in your kernel, enable this option. We apologize
+ that you are required to know this about your running kernel.])],
+ [],
+ [case $system in
+ *-linux*)
+ AS_IF([test "x$LOGNAME" != "xbuildslave" &&
+ test "x$LOGNAME" != "xbuildbot"],
+ [AC_ERROR([Linux users must specify either
+ --enable-linux-d_splice_alias-extra-iput or
+ --disable-linux-d_splice_alias-extra-iput])],
+ [enable_linux_d_splice_alias_extra_iput="no"])
+ esac
+ ])
AC_ARG_WITH([crosstools-dir],
[AS_HELP_STRING([--with-crosstools-dir=path],
[use path for native versions of rxgen, compile_et and config])
case "$GUESS_LINUX_VERSION" in
2.2.*) AFS_SYSKVERS=22 ;;
2.4.*) AFS_SYSKVERS=24 ;;
- 2.6.* | 3.*) AFS_SYSKVERS=26 ;;
+ [2.6.* | [3-9]* | [1-2][0-9]*]) AFS_SYSKVERS=26 ;;
*) AC_MSG_ERROR(Couldn't guess your Linux version [2]) ;;
esac
;;
if test "x${AFS_SYSKVERS}" = "x"; then
AC_MSG_ERROR(Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname.)
fi
+ if test "x${AFS_SYSKVERS}" = "x24" ||
+ test "x${AFS_SYSKVERS}" = "x22"; then
+ AC_MSG_ERROR([Linux 2.4.x and older are no longer supported by OpenAFS. Please use an OpenAFS 1.6.x release on those systems.])
+ fi
_AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
AFS_SYSNAME="$_AFS_SYSNAME"
AC_TRY_KBUILD(
*_obsd52) AFS_PARAM_COMMON=param.obsd52.h ;;
*_obsd53) AFS_PARAM_COMMON=param.obsd53.h ;;
*_obsd54) AFS_PARAM_COMMON=param.obsd54.h ;;
- *_linux22) AFS_PARAM_COMMON=param.linux22.h ;;
- *_linux24) AFS_PARAM_COMMON=param.linux24.h ;;
*_linux26) AFS_PARAM_COMMON=param.linux26.h ;;
# Linux alpha adds an extra underscore for no good reason.
- *_linux_22) AFS_PARAM_COMMON=param.linux22.h ;;
- *_linux_24) AFS_PARAM_COMMON=param.linux24.h ;;
*_linux_26) AFS_PARAM_COMMON=param.linux26.h ;;
*_fbsd_*) AFS_PARAM_COMMON=param.generic_fbsd.h ;;
esac
LINUX_KBUILD_USES_EXTRA_CFLAGS
LINUX_KERNEL_COMPILE_WORKS
+ dnl Operation signature checks
+ AC_CHECK_LINUX_OPERATION([inode_operations], [follow_link], [no_nameidata],
+ [#include <linux/fs.h>],
+ [const char *],
+ [struct dentry *dentry, void **link_data])
+ AC_CHECK_LINUX_OPERATION([inode_operations], [put_link], [no_nameidata],
+ [#include <linux/fs.h>],
+ [void],
+ [struct inode *inode, void *link_data])
+
dnl Check for header files
AC_CHECK_LINUX_HEADER([config.h])
AC_CHECK_LINUX_HEADER([completion.h])
AC_CHECK_LINUX_TYPE([kuid_t], [uidgid.h])
dnl Check for structure elements
+ AC_CHECK_LINUX_STRUCT([address_space], [backing_dev_info], [fs.h])
AC_CHECK_LINUX_STRUCT([address_space_operations],
[write_begin], [fs.h])
AC_CHECK_LINUX_STRUCT([backing_dev_info], [name],
AC_CHECK_LINUX_STRUCT([inode], [i_blksize], [fs.h])
AC_CHECK_LINUX_STRUCT([inode], [i_mutex], [fs.h])
AC_CHECK_LINUX_STRUCT([inode], [i_security], [fs.h])
+ AC_CHECK_LINUX_STRUCT([file], [f_path], [fs.h])
AC_CHECK_LINUX_STRUCT([file_operations], [flock], [fs.h])
AC_CHECK_LINUX_STRUCT([file_operations], [iterate], [fs.h])
AC_CHECK_LINUX_STRUCT([file_operations], [read_iter], [fs.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])
+ AC_CHECK_LINUX_STRUCT([msghdr], [msg_iter], [socket.h])
AC_CHECK_LINUX_STRUCT([nameidata], [path], [namei.h])
AC_CHECK_LINUX_STRUCT([proc_dir_entry], [owner], [proc_fs.h])
AC_CHECK_LINUX_STRUCT([super_block], [s_bdi], [fs.h])
AC_CHECK_LINUX_STRUCT([task_struct], [sigmask_lock], [sched.h])
AC_CHECK_LINUX_STRUCT([task_struct], [tgid], [sched.h])
AC_CHECK_LINUX_STRUCT([task_struct], [thread_info], [sched.h])
+ AC_CHECK_LINUX_STRUCT([task_struct], [total_link_count], [sched.h])
LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM
dnl Check for typed structure elements
dnl Function existence checks
+ AC_CHECK_LINUX_FUNC([__vfs_read],
+ [#include <linux/fs.h>],
+ [__vfs_read(NULL, NULL, 0, NULL);])
AC_CHECK_LINUX_FUNC([bdi_init],
[#include <linux/backing-dev.h>],
[bdi_init(NULL);])
AC_CHECK_LINUX_FUNC([hlist_unhashed],
[#include <linux/list.h>],
[hlist_unhashed(0);])
+ AC_CHECK_LINUX_FUNC([ihold],
+ [#include <linux/fs.h>],
+ [ihold(NULL);])
AC_CHECK_LINUX_FUNC([i_size_read],
[#include <linux/fs.h>],
[i_size_read(NULL);])
AC_CHECK_LINUX_FUNC([sock_create_kern],
[#include <linux/net.h>],
[sock_create_kern(0, 0, 0, NULL);])
+ AC_CHECK_LINUX_FUNC([sock_create_kern_ns],
+ [#include <linux/net.h>],
+ [sock_create_kern(NULL, 0, 0, 0, NULL);])
AC_CHECK_LINUX_FUNC([splice_direct_to_actor],
[#include <linux/splice.h>],
[splice_direct_to_actor(NULL,NULL,NULL);])
fi
:
fi
+ if test "x$enable_linux_d_splice_alias_extra_iput" = xyes; then
+ AC_DEFINE(D_SPLICE_ALIAS_LEAK_ON_ERROR, 1, [for internal use])
+ fi
dnl Linux-only, but just enable always.
AC_DEFINE(AFS_CACHE_BYPASS, 1, [define to activate cache bypassing Unix client])
esac
fi
AC_SUBST(XBSA_CFLAGS)
AC_SUBST(XBSA_XLIBS)
+XLIBS="$XBSA_XLIBS $XLIBS"
dnl checks for header files.
AC_HEADER_STDC