Linux: use %pI4 if NIPQUAD is not available
[openafs.git] / acinclude.m4
index d2cb0f5..2e76651 100644 (file)
@@ -86,11 +86,6 @@ AC_ARG_ENABLE([namei-fileserver],
          fileserver])],
     , 
     [enable_namei_fileserver="default"])
-AC_ARG_ENABLE([cache-bypass],
-    [AS_HELP_STRING([--enable-cache-bypass],
-        [enable client support for cache bypass])],
-    , 
-    [enable_cache_bypass="no"])
 AC_ARG_ENABLE([supergroups],
     [AS_HELP_STRING([--enable-supergroups],
         [enable support for nested pts groups])],
@@ -102,26 +97,11 @@ AC_ARG_ENABLE([bitmap-later],
          needed])],
     , 
     [enable_bitmap_later="no"])
-AC_ARG_ENABLE([demand-attach-fs],
-    [AS_HELP_STRING([--enable-demand-attach-fs],
-        [enable Demand Attach Fileserver (please see documentation)])],
-    , 
-    [enable_demand_attach_fs="no"])
-AC_ARG_ENABLE([disconnected],
-    [AS_HELP_STRING([--enable-disconnected],
-        [enable disconnected support in cache manager (experimental)])],
-    , 
-    [enable_disconnected="no"])
 AC_ARG_ENABLE([unix-sockets],
     [AS_HELP_STRING([--disable-unix-sockets],
         [disable use of unix domain sockets for fssync (defaults to enabled)])],
     ,
     [enable_unix_sockets="yes"])
-AC_ARG_ENABLE([icmp-pmtu-discovery],
-    [AS_HELP_STRING([--enable-icmp-pmtu-discovery],
-        [enable path MTU discovery by decoding ICMP unreachable replies])],
-    , 
-    [enable_icmp_pmtu_discovery="no"])
 AC_ARG_ENABLE([tivoli-tsm],
     [AS_HELP_STRING([--enable-tivoli-tsm],
         [enable use of the Tivoli TSM API libraries for butc support])],
@@ -281,7 +261,10 @@ AC_PROG_LN_S
 AC_PROG_RANLIB
 AC_PROG_YACC
 AM_PROG_LEX
+dnl if we are flex, be lex-compatible
+OPENAFS_LEX_IS_FLEX([AC_SUBST([LEX], ["$LEX -l"])])
 
+OPENAFS_FORCE_ABS_INSTALL
 OPENAFS_CHECK_BIGENDIAN
 OPENAFS_PRINTF_TAKES_Z_LEN
 
@@ -412,6 +395,10 @@ case $system in
                MKAFS_OSTYPE=DARWIN
                 AC_MSG_RESULT(x86_darwin)
                 ;;
+        x86_64-*-darwin*)
+               MKAFS_OSTYPE=DARWIN
+                AC_MSG_RESULT(x86_darwin)
+                ;;
        i386-*-freebsd*)
                MKAFS_OSTYPE=FBSD
                AC_MSG_RESULT(i386_fbsd)
@@ -546,6 +533,9 @@ else
                i?86-apple-darwin10.*)
                        AFS_SYSNAME="x86_darwin_100"
                        ;;
+               x86_64-apple-darwin10.*)
+                       AFS_SYSNAME="x86_darwin_100"
+                       ;;
                sparc-sun-solaris2.5*)
                        AFS_SYSNAME="sun4x_55"
                        enable_login="yes"
@@ -982,6 +972,8 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 fi
                 :
                fi
+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 struct sockaddr has sa_len field],
@@ -1125,18 +1117,6 @@ if test "$enable_bitmap_later" = "yes"; then
        AC_DEFINE(BITMAP_LATER, 1, [define if you want to salvager to check bitmasks later])
 fi
 
-if test "$enable_demand_attach_fs" = "yes"; then
-       AC_DEFINE(DEMAND_ATTACH_ENABLE, 1, [define if you want the demand attach fileserver])
-       DEMAND_ATTACH="yes"
-else
-       DEMAND_ATTACH="no"
-fi
-AC_SUBST(DEMAND_ATTACH)
-
-if test "$enable_disconnected" = "yes"; then
-       AC_DEFINE(AFS_DISCON_ENV, 1, [define if you want support for disconnected operation])
-fi
-
 if test "$enable_unix_sockets" = "yes"; then
        AC_DEFINE(USE_UNIX_SOCKETS, 1, [define if you want to use UNIX sockets for fssync.])
        USE_UNIX_SOCKETS="yes"
@@ -1145,15 +1125,9 @@ else
 fi
 AC_SUBST(USE_UNIX_SOCKETS)
 
-if test "$enable_icmp_pmtu_discovery" = "yes"; then
-   if test "$ac_cv_setsockopt_iprecverr" = "yes"; then
-       AC_DEFINE(ADAPT_PMTU, 1, [define if you want to decode icmp unreachable packets to discover path mtu])
-   fi
-fi
-
-if test "$enable_cache_bypass" = "yes"; then
-       AC_DEFINE(AFS_CACHE_BYPASS, 1, [define to activate cache bypassing Unix client])
-fi
+dnl if test "$ac_cv_setsockopt_iprecverr" = "yes"; then
+dnl    AC_DEFINE(ADAPT_PMTU, 1, [define if you want to decode icmp unreachable packets to discover path mtu])
+dnl fi
 
 if test "$enable_namei_fileserver" = "yes"; then
        AC_DEFINE(AFS_NAMEI_ENV, 1, [define if you want to want namei fileserver])
@@ -1222,7 +1196,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)
+AC_CHECK_HEADERS(windows.h direct.h sys/ipc.h sys/resource.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)
@@ -1264,10 +1238,11 @@ else
 fi
 AC_SUBST(BUILD_LOGIN)
 
-AC_CHECK_FUNCS(snprintf strlcat strlcpy flock)
+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_MSG_CHECKING([for POSIX regex library])
 if test "$ac_cv_header_regex_h" = "yes" && \
        test "$ac_cv_func_regcomp" = "yes" && \
@@ -1297,6 +1272,7 @@ AC_CHECK_TYPE([socklen_t],[],
         [Define to int if <sys/socket.h> does not define.])],
 [#include <sys/types.h>
 #include <sys/socket.h>])
+AC_CHECK_TYPES(off64_t)
 AC_SIZEOF_TYPE(long)
 
 AC_HEADER_PAM_CONST
@@ -1405,4 +1381,8 @@ 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)
 ])