From bda48b382477f2a6478ebd86b67cb63ac391854e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 8 Jun 2000 07:40:55 +0000 Subject: - changed HAVE_KERNEL_OPLOCKS to HAVE_KERNEL_OPLOCKS_IRIX - added autoconf test for HAVE_KERNEL_OPLOCKS_LINUX (This used to be commit 0368f68529a9244663c199068e95d1a1d93152fa) --- source3/configure.in | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index 742d50da49..2738255b13 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -704,13 +704,30 @@ if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then AC_DEFINE(HAVE_UX_UT_SYSLEN) fi -AC_CACHE_CHECK([for kernel oplock type definitions],samba_cv_HAVE_KERNEL_OPLOCKS,[ +AC_CACHE_CHECK([for Linux kernel oplocks],samba_cv_HAVE_KERNEL_OPLOCKS_LINUX,[ +AC_TRY_RUN([ +#include +#include +#ifndef F_GETLEASE +#define F_GETLEASE 13 +#endif +main() { + int fd = open("/dev/null", O_RDONLY); + return fcntl(fd, F_GETLEASE, 0) == -1; +} +], +samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes,samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no,samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross)]) +if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then + AC_DEFINE(HAVE_KERNEL_OPLOCKS_LINUX) +fi + +AC_CACHE_CHECK([for IRIX kernel oplock type definitions],samba_cv_HAVE_KERNEL_OPLOCKS_IRIX,[ AC_TRY_COMPILE([#include #include ], [oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;], -samba_cv_HAVE_KERNEL_OPLOCKS=yes,samba_cv_HAVE_KERNEL_OPLOCKS=no)]) -if test x"$samba_cv_HAVE_KERNEL_OPLOCKS" = x"yes"; then - AC_DEFINE(HAVE_KERNEL_OPLOCKS) +samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes,samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no)]) +if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then + AC_DEFINE(HAVE_KERNEL_OPLOCKS_IRIX) fi AC_CACHE_CHECK([for irix specific capabilities],samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES,[ -- cgit