configure-check-for-timegm-20021001
[openafs.git] / acinclude.m4
index 0edd742..55fd5f2 100644 (file)
@@ -140,8 +140,16 @@ case $system in
                 LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
                 LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
                 LINUX_INODE_SETATTR_RETURN_TYPE
+                LINUX_COMPLETION_H_EXISTS
+                LINUX_EXPORTS_TASKLIST_LOCK
                 LINUX_NEED_RHCONFIG
                 LINUX_WHICH_MODULES
+                if test "x$ac_cv_linux_exports_tasklist_lock" = "xyes" ; then
+                 AC_DEFINE(EXPORTED_TASKLIST_LOCK)
+                fi
+                if test "x$ac_cv_linux_completion_h_exists" = "xyes" ; then
+                 AC_DEFINE(COMPLETION_H_EXISTS)
+                fi
                 if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
                  AC_DEFINE(INODE_SETATTR_NOT_VOID)
                 fi
@@ -169,6 +177,11 @@ case $system in
                SOLARIS_UFSVFS_HAS_DQRWLOCK
                SOLARIS_PROC_HAS_P_COREFILE
                 ;;
+        *-sunos*)
+               MKAFS_OSTYPE=SUNOS
+               enable_kernel_module=no
+                AC_MSG_RESULT(sun4)
+                ;;
         *-hpux*)
                MKAFS_OSTYPE=HPUX
                 AC_MSG_RESULT(hp_ux)
@@ -226,6 +239,9 @@ if test "x$with_afs_sysname" != "x"; then
 else
        AC_MSG_CHECKING(your AFS sysname)
        case $host in
+               i386-unknown-openbsd3.1)
+                       AFS_SYSNAME="i386_obsd31"
+                       ;;
                i?86-*-freebsd4.2*)
                        AFS_SYSNAME="i386_fbsd_42"
                        ;;
@@ -287,6 +303,12 @@ else
                powerpc-apple-darwin5.5*)
                        AFS_SYSNAME="ppc_darwin_14"
                        ;;
+               powerpc-apple-darwin6.0*)
+                       AFS_SYSNAME="ppc_darwin_60"
+                       ;;
+               powerpc-apple-darwin6.1*)
+                       AFS_SYSNAME="ppc_darwin_60"
+                       ;;
                sparc-sun-solaris2.5*)
                        AFS_SYSNAME="sun4x_55"
                        ;;
@@ -302,6 +324,9 @@ else
                sparc-sun-solaris2.9)
                        AFS_SYSNAME="sun4x_59"
                        ;;
+               sparc-sun-sunos4*)
+                       AFS_SYSNAME="sun4_413"
+                       ;;
                i386-pc-solaris2.7)
                        AFS_SYSNAME="sunx86_57"
                        ;;
@@ -317,6 +342,9 @@ else
                alpha*-dec-osf5.0*)
                        AFS_SYSNAME="alpha_dux50"
                        ;;
+               alpha*-dec-osf5.1*)
+                       AFS_SYSNAME="alpha_dux51"
+                       ;;
                mips-sgi-irix6.5)
                        AFS_SYSNAME="sgi_65"
                        ;;
@@ -372,8 +400,37 @@ case $AFS_SYSNAME in
        *_darwin*)
                DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist
                DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist
+                dnl the test below fails on darwin, even if the CPPFLAGS below
+                dnl are added. the headers from Kernel.Framework must be used
+                dnl when KERNEL is defined.
+
+                dnl really, such a thing isn't guaranteed to work on any 
+                dnl platform until the kernel cflags from MakefileProto are
+                dnl known to configure
+               AC_DEFINE(HAVE_STRUCT_BUF)
                ;;
+        *)
+AC_MSG_CHECKING(for definition of struct buf)
+dnl save_CPPFLAGS="$CPPFLAGS"
+dnl CPPFLAGS="$CPPFLAGS -DKERNEL -D_KERNEL -D__KERNEL -D__KERNEL__"
+AC_CACHE_VAL(ac_cv_have_struct_buf, [
+       ac_cv_have_struct_buf=no
+       AC_TRY_COMPILE(
+               [#include <sys/buf.h>],
+               [struct buf x;
+               printf("%d\n", sizeof(x));],
+               ac_cv_have_struct_buf=yes,)
+       ]
+)
+dnl CPPFLAGS="$save_CPPFLAGS"
+AC_MSG_RESULT($ac_cv_have_struct_buf)
+if test "$ac_cv_have_struct_buf" = yes; then
+       AC_DEFINE(HAVE_STRUCT_BUF)
+fi
+;;
 esac
+
+
 AC_CACHE_VAL(ac_cv_sockaddr_len,
 [
 AC_MSG_CHECKING([if struct sockaddr has sa_len field])
@@ -515,10 +572,13 @@ 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)
 AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h)
 AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h)
-AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h)
+AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h ucontext.h)
 
 AC_CHECK_FUNCS(utimes random srandom getdtablesize snprintf re_comp re_exec)
-AC_CHECK_FUNCS(setprogname getprogname)
+AC_CHECK_FUNCS(setprogname getprogname sigaction)
+AC_CHECK_TYPE(ssize_t, int)
+
+AC_CHECK_FUNCS(timegm)
 
 dnl Directory PATH handling
 if test "x$enable_transarc_paths" = "xyes"  ; then