]> arthur.barton.de Git - netatalk.git/blobdiff - configure.in
Merge sf/master
[netatalk.git] / configure.in
index 98d045d7ff8215a74d02bae1168a9f1f1b710279..bbdee98320a9a0b1916bfe568d01df45bf3e4cb0 100644 (file)
@@ -73,7 +73,13 @@ AC_FUNC_WAIT3
 AC_CHECK_FUNCS(getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strcasestr strstr strtoul strchr memcpy)
 AC_CHECK_FUNCS(backtrace_symbols setlocale nl_langinfo strlcpy strlcat setlinebuf dirfd pselect access pread pwrite)
 AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
-AC_CHECK_FUNC(renameat, AC_DEFINE([_ATFILE_SOURCE], 1, AT file source)) 
+ac_neta_haveatfuncs=yes
+AC_CHECK_FUNCS(openat renameat fstatat unlinkat, , ac_neta_haveatfuncs=no)
+if test x"$ac_neta_haveatfuncs" = x"yes" ; then
+   AC_DEFINE([_ATFILE_SOURCE], 1, AT file source)
+   AC_DEFINE([HAVE_ATFUNCS], 1, whether at funcs are available)
+fi
+
 AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
 
 AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
@@ -249,39 +255,7 @@ AC_ARG_ENABLE(debugging,
        ]
 )
 
-
-afp3=no
-afp3set=no
-AC_MSG_CHECKING([whether AFP 3.x calls should be enabled])
-AC_ARG_ENABLE(afp3,
-       [  --disable-afp3          disable AFP 3.x calls],
-       [
-           if test x"$enableval" != x"no"; then
-               afp3set=yes
-               afp3=yes
-               AC_MSG_RESULT([yes])
-           else
-               AC_MSG_RESULT([no])
-           fi
-       ],[
-           AC_MSG_RESULT([yes])
-           afp3=yes
-       ]
-)
-
-if test x"$afp3" = x"yes"; then
-        AC_SYS_LARGEFILE([
-               AC_DEFINE(AFP3x, 1, [Define to enable AFP 3.x support])
-       ],[
-               if test x"$afp3set" = x"yes"; then
-                       AC_MSG_ERROR([AFP 3.x support requires Large File Support.])
-               else
-                       AC_MSG_WARN([AFP 3.x support requires Large File Support. AFP3.x support disabled])
-                       afp3=no
-               fi
-       ])
-fi
-
+AC_SYS_LARGEFILE([], AC_MSG_ERROR([AFP 3.x support requires Large File Support.]))
 AC_CHECK_ICONV
 
 dnl ----------- A NOTE ABOUT DROPKLUDGE
@@ -778,7 +752,7 @@ if test x"$this_os" = "xsolaris"; then
 
        solaris_module=no
        AC_MSG_CHECKING([if we can build Solaris kernel module])
-       if test -x /usr/ccs/bin/ld && test x$netatalk_cv_ddp_enabled = yes ; then
+       if test -x /usr/ccs/bin/ld && test x"$netatalk_cv_ddp_enabled" = x"yes" ; then
                solaris_module=yes
        fi
        AC_MSG_RESULT([$solaris_module])
@@ -1100,13 +1074,27 @@ if test x"$with_acl_support" = x"yes" ; then
                                        acl_perm_t perm;
                                        return acl_get_perm_np(permset_d, perm);
                                ],
-                               [samba_cv_HAVE_ACL_GET_PERM_NP=yes],
-                               [samba_cv_HAVE_ACL_GET_PERM_NP=no])
+                               [netatalk_cv_HAVE_ACL_GET_PERM_NP=yes],
+                               [netatalk_cv_HAVE_ACL_GET_PERM_NP=no])
                                LIBS=$acl_LIBS
                        ])
                        if test x"netatalk_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
                                AC_DEFINE(HAVE_ACL_GET_PERM_NP,1,[Whether acl_get_perm_np() is available])
                        fi
+
+                       AC_CACHE_CHECK([for acl_from_mode], netatalk_cv_HAVE_ACL_FROM_MODE,[
+                               acl_LIBS=$LIBS
+                               LIBS="$LIBS $ACL_LIBS"
+                AC_CHECK_FUNCS(acl_from_mode,
+                               [netatalk_cv_HAVE_ACL_FROM_MODE=yes],
+                               [netatalk_cv_HAVE_ACL_FROM_MODE=no])
+                               LIBS=$acl_LIBS
+                       ])
+                       if test x"netatalk_cv_HAVE_ACL_FROM_MODE" = x"yes"; then
+                               AC_DEFINE(HAVE_ACL_FROM_MODE,1,[Whether acl_from_mode() is available])
+                       fi
+
+
                else
                        AC_MSG_NOTICE(ACL support is not avaliable)
                        AC_DEFINE(HAVE_NO_ACLS,1,[Whether no ACLs support is available])
@@ -1116,6 +1104,7 @@ if test x"$with_acl_support" = x"yes" ; then
 fi
 
 if test x"$with_acl_support" = x"yes" ; then
+   AC_CHECK_HEADERS([acl/libacl.h])
     AC_DEFINE(HAVE_ACLS,1,[Whether ACLs support is available])
     AC_SUBST(ACL_LIBS)
 fi
@@ -1288,6 +1277,7 @@ AM_CONDITIONAL(USE_DEBIAN, test x$sysv_style = xdebian)
 AM_CONDITIONAL(USE_UNDEF, test x$sysv_style = x)
 AM_CONDITIONAL(USE_BDB, test x$bdb_required = xyes)
 AM_CONDITIONAL(USE_APPLETALK, test x$netatalk_cv_ddp_enabled = xyes)
+AM_CONDITIONAL(HAVE_ATFUNCS, test x"$ac_neta_haveatfuncs" = x"yes")
 
 dnl --------------------- generate files