darwin-new-systypes-20040317
[openafs.git] / acinclude.m4
index ed2002c..b3473a3 100644 (file)
@@ -23,6 +23,8 @@ AC_ARG_ENABLE( bos-restricted-mode,
 [  --enable-bos-restricted-mode        enable bosserver restricted mode which disables certain bosserver functionality],, enable_bos_restricted_mode="no")
 AC_ARG_ENABLE( bos-new-config,
 [  --enable-bos-new-config             enable bosserver pickup of BosConfig.new on restarts],, enable_bos_new_config="no")
+AC_ARG_ENABLE( largefile-fileserver,
+[  --enable-largefile-fileserver        enable large file support in fileserver],, enable_largefile_fileserver="no")
 AC_ARG_ENABLE( namei-fileserver,
 [  --enable-namei-fileserver           force compilation of namei fileserver in preference to inode fileserver],, enable_namei_fileserver="no")
 AC_ARG_ENABLE( supergroups,
@@ -32,7 +34,7 @@ AC_ARG_ENABLE( fast-restart,
 AC_ARG_ENABLE( bitmap-later,
 [  --enable-bitmap-later               enable fast startup of file server by not reading bitmap till needed],, enable_bitmap_later="no")
 AC_ARG_ENABLE( full-vos-listvol-switch,
-[  --enable-full-vos-listvol-switch     enable vos full listvol switch for formatted output],, enable_full_vos_listvol_switch="no")
+[  --disable-full-vos-listvol-switch    disable vos full listvol switch for formatted output],, enable_full_vos_listvol_switch="yes")
 AC_ARG_WITH(dux-kernel-headers,
 [  --with-dux-kernel-headers=path      use the kernel headers found at path(optional, defaults to first match in /usr/sys)]
 )
@@ -42,6 +44,9 @@ AC_ARG_WITH(linux-kernel-headers,
 AC_ARG_WITH(bsd-kernel-headers,
 [  --with-bsd-kernel-headers=path      use the kernel headers found at path(optional, defaults to /usr/src/sys)]
 )
+AC_ARG_WITH(bsd-kernel-build,
+[  --with-bsd-kernel-build=path        use the kernel build found at path(optional, defaults to KSRC/i386/compile/GENERIC)]
+)
 AC_ARG_ENABLE(kernel-module,
 [  --disable-kernel-module                     disable compilation of the kernel module (defaults to enabled)],, enable_kernel_module="yes"
 )
@@ -488,6 +493,18 @@ else
                powerpc-apple-darwin6.5*)
                        AFS_SYSNAME="ppc_darwin_60"
                        ;;
+               powerpc-apple-darwin7.0*)
+                       AFS_SYSNAME="ppc_darwin_70"
+                       ;;
+               powerpc-apple-darwin7.1*)
+                       AFS_SYSNAME="ppc_darwin_70"
+                       ;;
+               powerpc-apple-darwin7.2*)
+                       AFS_SYSNAME="ppc_darwin_70"
+                       ;;
+               powerpc-apple-darwin7.3*)
+                       AFS_SYSNAME="ppc_darwin_70"
+                       ;;
                sparc-sun-solaris2.5*)
                        AFS_SYSNAME="sun4x_55"
                        ;;
@@ -533,6 +550,9 @@ else
                powerpc-*-linux*)
                        AFS_SYSNAME="ppc_linuxXX"
                        ;;
+               powerpc64-*-linux*)
+                       AFS_SYSNAME="ppc64_linuxXX"
+                       ;;
                alpha*-linux*)
                        AFS_SYSNAME="alpha_linux_XX"
                        ;;
@@ -557,6 +577,12 @@ else
                power*-ibm-aix4.3*)
                        AFS_SYSNAME="rs_aix42"
                        ;;
+               power*-ibm-aix5.1*)
+                       AFS_SYSNAME="rs_aix51"
+                       ;;
+               power*-ibm-aix5.2*)
+                       AFS_SYSNAME="rs_aix52"
+                       ;;
                x86_64-*-linux-gnu)
                        AFS_SYSNAME="amd64_linuxXX"
                        ;;
@@ -684,6 +710,24 @@ else
         done    
   fi    
 
+  dnl darwin wants it, aix hates it
+  AC_MSG_CHECKING(for the useability of arpa/nameser_compat.h)
+  AC_TRY_COMPILE([
+  #include <stdlib.h>
+  #include <stdio.h>
+  #include <sys/types.h>
+  #include <sys/socket.h>
+  #include <netinet/in.h>
+  #include <arpa/inet.h>
+  #include <arpa/nameser.h>
+  #include <arpa/nameser_compat.h>
+  #include <resolv.h>
+  ], [static int i; i = 0;],
+  [AC_MSG_RESULT(yes)
+   AC_DEFINE(HAVE_ARPA_NAMESER_COMPAT_H)],
+  [AC_MSG_RESULT(no)
+   ])
+
   openafs_save_libs="$LIBS"
   AC_MSG_CHECKING([for res_search])
   AC_FUNC_RES_SEARCH
@@ -745,6 +789,19 @@ else
        BSD_KERNEL_PATH="/usr/src/sys"
 fi
 
+if test "x$with_bsd_kernel_build" != "x"; then
+       BSD_KERNEL_BUILD="$with_bsd_kernel_build"
+else
+       case $AFS_SYSNAME in
+               i386_fbsd_4?)
+                       BSD_KERNEL_BUILD="${BSD_KERNEL_PATH}/compile/GENERIC"
+                       ;;
+               i386_fbsd_5?)
+                       BSD_KERNEL_BUILD="${BSD_KERNEL_PATH}/i386/compile/GENERIC"
+                       ;;
+       esac
+fi
+
 # Fast restart
 if test "$enable_supergroups" = "yes"; then
        AC_DEFINE(SUPERGROUPS, 1, [define if you want to have support for nested pts groups])
@@ -770,6 +827,10 @@ if test "$enable_bos_new_config" = "yes"; then
        AC_DEFINE(BOS_NEW_CONFIG, 1, [define if you want to enable automatic renaming of BosConfig.new to BosConfig at startup])
 fi
 
+if test "$enable_largefile_fileserver" = "yes"; then
+       AC_DEFINE(AFS_LARGEFILE_ENV, 1, [define if you want large file fileserver])
+fi
+
 if test "$enable_namei_fileserver" = "yes"; then
        AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
 fi
@@ -808,7 +869,7 @@ AC_CHECK_HEADERS(stdlib.h string.h unistd.h fcntl.h sys/time.h sys/file.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)
-AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h)
+AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h sys/user.h)
 AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h ucontext.h regex.h)
 
 if test "$ac_cv_header_security_pam_modules_h" = "yes"; then
@@ -886,6 +947,7 @@ AC_SUBST(ENABLE_KERNEL_MODULE)
 AC_SUBST(LIB_AFSDB)
 AC_SUBST(LINUX_KERNEL_PATH)
 AC_SUBST(BSD_KERNEL_PATH)
+AC_SUBST(BSD_KERNEL_BUILD)
 AC_SUBST(LINUX_VERSION)
 AC_SUBST(MKAFS_OSTYPE)
 AC_SUBST(TOP_OBJDIR)