auth: Restructure userok
[openafs.git] / acinclude.m4
index 5478a22..8782488 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"
@@ -1201,7 +1201,7 @@ AC_CHECK_HEADERS(stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.h grp.h)
 AC_CHECK_HEADERS(netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h)
 AC_CHECK_HEADERS(mntent.h sys/vfs.h sys/param.h sys/fs_types.h sys/fstyp.h)
 AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h sys/pag.h)
-AC_CHECK_HEADERS(windows.h direct.h sys/ipc.h sys/resource.h)
+AC_CHECK_HEADERS(windows.h direct.h sys/ipc.h sys/resource.h sys/un.h)
 AC_CHECK_HEADERS(security/pam_modules.h ucontext.h regex.h sys/statvfs.h sys/statfs.h sys/bitypes.h)
 AC_CHECK_HEADERS(linux/errqueue.h,,,[#include <linux/types.h>])
 AC_CHECK_HEADERS(et/com_err.h)
@@ -1243,11 +1243,59 @@ else
 fi
 AC_SUBST(BUILD_LOGIN)
 
-AC_CHECK_FUNCS(snprintf strlcat strlcpy flock getrlimit)
-AC_CHECK_FUNCS(setprogname getprogname sigaction mkstemp vsnprintf strerror strcasestr)
-AC_CHECK_FUNCS(setvbuf vsyslog getcwd)
-AC_CHECK_FUNCS(regcomp regexec regerror)
-AC_CHECK_FUNCS(fseeko64 ftello64)
+AC_CHECK_FUNCS([ \
+       arc4random \
+       daemon \
+       flock \
+       fseeko64 \
+       ftello64 \
+       getcwd \
+       getegid \
+       geteuid \
+       getgid \
+       getuid \
+       getprogname \
+       getrlimit \
+       issetugid \
+       mkstemp \
+       pread \
+       preadv \
+       pwrite \
+       pwritev \
+       regcomp \
+       regerror \
+       regexec \
+       setitimer \
+       setprogname \
+       setvbuf \
+       sigaction \
+       snprintf \
+       strcasestr \
+       strerror \
+       strlcat \
+       strlcpy \
+       timegm \
+       vsnprintf \
+       vsyslog \
+])
+
+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" && \
@@ -1260,6 +1308,7 @@ else
 fi
 
 AC_TYPE_SIGNAL
+OPENAFS_RETSIGTYPE
 AC_CHECK_SIZEOF(void *)
 AC_CHECK_SIZEOF(unsigned long long)
 AC_CHECK_SIZEOF(unsigned long)
@@ -1282,8 +1331,6 @@ AC_SIZEOF_TYPE(long)
 
 AC_HEADER_PAM_CONST
 
-AC_CHECK_FUNCS(timegm)
-AC_CHECK_FUNCS(daemon)
 
 dnl Directory PATH handling
 if test "x$enable_transarc_paths" = "xyes"  ; then 
@@ -1386,7 +1433,6 @@ AC_SUBST(HELPER_SPLINTCFG)
 
 mkdir -p ${TOP_OBJDIR}/src/JAVA/libjafs
 
-
 dnl Check to see if crypt lives in a different library
 AC_CHECK_LIB(crypt, crypt, LIB_crypt="-lcrypt")
 AC_SUBST(LIB_crypt)
@@ -1408,4 +1454,7 @@ struct labeltest struct_labeltest = {
 [AC_MSG_RESULT(no)
 ])
 
+dnl Eventually, this will look for the system one, or for OpenSSL
+LIB_hcrypto="-lafshcrypto"
+AC_SUBST(LIB_hcrypto)
 ])