Rx: Treat rx_minPeerTimeout not as a minimum but as padding
[openafs.git] / acinclude.m4
index 43df10c..70b27fd 100644 (file)
@@ -463,11 +463,11 @@ else
                        vm=${v#*.}
                        AFS_SYSNAME="amd64_fbsd_${vM}${vm}"
                        ;;
-               i386-*-dragonfly2.2*)
-                       AFS_SYSNAME="i386_dfbsd_23"
-                       ;;
-               i386-*-dragonfly2.3*)
-                       AFS_SYSNAME="i386_dfbsd_23"
+               i386-*-dragonfly?.*)
+                       v=${host#*dragonfly}
+                       vM=${v%.*}
+                       vm=${v#*.}
+                       AFS_SYSNAME="i386_dfbsd_${vM}${vm}"
                        ;;
                i?86-*-netbsd*1.6[[M-Z]]*)
                        AFS_SYSNAME="i386_nbsd20"
@@ -886,7 +886,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 LINUX_POSIX_TEST_LOCK_CONFLICT_ARG
                 LINUX_KERNEL_SOCK_CREATE
                 LINUX_EXPORTS_KEY_TYPE_KEYRING
-                LINUX_KEYS_HAVE_SESSION_TO_PARENT
                 LINUX_NEED_RHCONFIG
                 LINUX_RECALC_SIGPENDING_ARG_TYPE
                 LINUX_EXPORTS_TASKLIST_LOCK
@@ -927,7 +926,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 ])
 
                 dnl Packaging and SMP build
-                if test "x$with_linux_kernel_packaging" = "xno" ; then
+                if test "x$with_linux_kernel_packaging" != "xyes" ; then
                   LINUX_WHICH_MODULES
                 else
                   AC_SUBST(MPS,'SP')
@@ -981,6 +980,16 @@ dnl Linux-only, but just enable always.
                AC_DEFINE(AFS_CACHE_BYPASS, 1, [define to activate cache bypassing Unix client])
 esac
 
+AC_CACHE_CHECK([if compiler has __sync_add_and_fetch],
+    [ac_cv_sync_fetch_and_add],
+    [AC_TRY_LINK(, [int var; return __sync_add_and_fetch(&var, 1);],
+                   [ac_cv_sync_fetch_and_add=yes],
+                   [ac_cv_sync_fetch_and_add=no])
+])
+AS_IF([test "$ac_cv_sync_fetch_and_add" = "yes"],
+      [AC_DEFINE(HAVE_SYNC_FETCH_AND_ADD, 1,
+               [define if your C compiler has __sync_add_and_fetch])])
+
 AC_CACHE_CHECK([if struct sockaddr has sa_len field],
     [ac_cv_sockaddr_len],
     [AC_TRY_COMPILE( [#include <sys/types.h>
@@ -1258,6 +1267,10 @@ AC_CHECK_FUNCS([ \
        getrlimit \
        issetugid \
        mkstemp \
+       pread \
+       preadv \
+       pwrite \
+       pwritev \
        regcomp \
        regerror \
        regexec \
@@ -1275,6 +1288,49 @@ AC_CHECK_FUNCS([ \
        vsyslog \
 ])
 
+dnl Functions that we're going to try and get from libroken
+
+AC_REPLACE_FUNCS([ \
+       err \
+       errx \
+       getprogname \
+       strlcpy \
+       verr \
+       verrx \
+       vwarn \
+       vwarnx \
+       warn \
+       warnx \
+])
+
+dnl Headers that we're going to try and get from libroken
+AC_CHECK_HEADERS([ \
+       err.h \
+])
+
+ROKEN_HEADERS=
+AS_IF([test "$ac_cv_header_err_h" != "yes" ],
+      [ROKEN_HEADERS="$ROKEN_HEADERS err.h"],
+      [])
+AC_SUBST(ROKEN_HEADERS)
+
+AC_MSG_CHECKING([for positional I/O])
+if test "$ac_cv_func_pread" = "yes" && \
+        test "$ac_cv_func_pwrite" = "yes"; then
+   AC_DEFINE(HAVE_PIO, 1, [define if you have pread() and pwrite()])
+   AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_MSG_CHECKING([for vectored positional I/O])
+if test "$ac_cv_func_preadv" = "yes" && \
+        test "$ac_cv_func_pwritev" = "yes"; then
+   AC_DEFINE(HAVE_PIOV, 1, [define if you have preadv() and pwritev()])
+   AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+
 AC_MSG_CHECKING([for POSIX regex library])
 if test "$ac_cv_header_regex_h" = "yes" && \
        test "$ac_cv_func_regcomp" = "yes" && \
@@ -1433,6 +1489,24 @@ struct labeltest struct_labeltest = {
 [AC_MSG_RESULT(no)
 ])
 
+AC_MSG_CHECKING([checking for dirfd])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+]],
+        [[DIR *d = 0; dirfd(d);]])],
+        [ac_rk_have_dirfd=yes], [ac_rk_have_dirfd=no])
+if test "$ac_rk_have_dirfd" = "yes" ; then
+        AC_DEFINE_UNQUOTED(HAVE_DIRFD, 1, [have a dirfd function/macro])
+fi
+AC_MSG_RESULT($ac_rk_have_dirfd)
+
+OPENAFS_HAVE_STRUCT_FIELD(DIR, dd_fd, [#include <sys/types.h>
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif])
+
 dnl Eventually, this will look for the system one, or for OpenSSL
 LIB_hcrypto="-lafshcrypto"
 AC_SUBST(LIB_hcrypto)