]> arthur.barton.de Git - netatalk.git/blobdiff - configure.in
Revert change from 3194183
[netatalk.git] / configure.in
index 9dad52e1cfb9aa3b4cc2a51a863dbaee547f3c8c..125f51fb498359031a32969f961d72a92cc8accd 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.241 2010-04-03 07:11:33 franklahm Exp $
+dnl $Id: configure.in,v 1.244 2010-04-13 08:05:06 franklahm Exp $
 dnl configure.in for netatalk
 
 AC_INIT(etc/afpd/main.c)
@@ -597,6 +597,8 @@ dnl       /usr/include or similar places.
 LIBS="$LIBS -L\$(top_srcdir)/libatalk"
 CFLAGS="-I\$(top_srcdir)/include $CFLAGS -I\$(top_srcdir)/sys"
 
+AC_DEFINE(OPEN_NOFOLLOW_ERRNO, ELOOP, errno returned by open with O_NOFOLLOW)
+
 dnl --------------------------------------------------------------------------
 dnl specific configuration comes in here:
 dnl --------------------------------------------------------------------------
@@ -650,6 +652,7 @@ if test x"$this_os" = "xfreebsd"; then
        AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
        AC_DEFINE(FREEBSD, 1, [Define if OS is FreeBSD])
        AC_DEFINE(SENDFILE_FLAVOR_BSD, 1, [Define if the sendfile() function uses BSD semantics])
+    AC_DEFINE(OPEN_NOFOLLOW_ERRNO, EMLINK, errno returned by open with O_NOFOLLOW)
 fi
 
 dnl ----- HP-UX 11 specific -----
@@ -795,8 +798,10 @@ dnl ----- NetBSD specific -----
 if test x"$this_os" = "xnetbsd"; then 
        AC_MSG_RESULT([ * NetBSD specific configuration])
        AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro])
-       AC_DEFINE(NETBSD, 1, [Define if OS is FreeBSD])
-       CFLAGS="-I\$(top_srcdir)/sys/netbsd -I/usr/include/kerberosIV $CFLAGS"
+       AC_DEFINE(NETBSD, 1, [Define if OS is NetBSD])
+    AC_DEFINE(OPEN_NOFOLLOW_ERRNO, EFTYPE, errno returned by open with O_NOFOLLOW)
+
+       CFLAGS="-I\$(top_srcdir)/sys/netbsd $CFLAGS"
        need_dash_r=yes 
 
        dnl ----- NetBSD does not have crypt.h, uses unistd.h -----
@@ -823,7 +828,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; 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])
@@ -1018,19 +1023,26 @@ AC_ARG_ENABLE(overwrite,
 AC_MSG_RESULT([$OVERWRITE_CONFIG])
 
 dnl --------------------- check for ACL support
-neta_cv_nfsv4acl="no"
 AC_MSG_CHECKING([if NFSv4 ACL Support should be enabled])
 AC_ARG_ENABLE(nfsv4acls,
-       [  --enable-nfsv4acls      enable NFSv4 ACL Support],[
+       [  --enable-nfsv4acls      enable NFSv4 ACL Support (auto)],[
        if test x"$enableval" = x"yes"; then
           AC_MSG_RESULT([yes])
           neta_cv_nfsv4acl="yes"
        else
           AC_MSG_RESULT([no])
+          neta_cv_nfsv4acl="no"
        fi],[
-          AC_MSG_RESULT([no])
+          AC_MSG_RESULT([auto])
+          neta_cv_nfsv4acl="yes"
        ]
 )
+
+if test x"$this_os" != x"solaris" && test x"$neta_cv_nfsv4acl" = x"yes" ; then
+               AC_MSG_NOTICE([NFSv4 ACL Support only available on (Open)Solaris])
+        neta_cv_nfsv4acl="no"
+fi
+
 if test x$neta_cv_nfsv4acl = xyes; then
        AC_CHECK_HEADER([ldap.h],,[
                AC_MSG_ERROR([ACL Support need the LDAP client headers not found.])
@@ -1055,7 +1067,7 @@ fi
 AC_SUBST(LIBATALK_ACLS)
 
 dnl --------------------- check for Extended Attributes support
-neta_cv_eas="files"
+neta_cv_eas="ad"
 neta_cv_eas_sys_found=no
 neta_cv_eas_sys_not_found=no
 
@@ -1080,6 +1092,22 @@ case "$this_os" in
                    [neta_cv_eas_sys_not_found=yes])
   ;;
 
+  'freebsd')
+    AC_CHECK_FUNCS([extattr_delete_fd extattr_delete_file extattr_delete_link],
+                   [neta_cv_eas_sys_found=yes],
+                   [neta_cv_eas_sys_not_found=yes])
+    AC_CHECK_FUNCS([extattr_get_fd extattr_get_file extattr_get_link],,
+                   [neta_cv_eas_sys_not_found=yes])
+    AC_CHECK_FUNCS([extattr_list_fd extattr_list_file extattr_list_link],,
+                   [neta_cv_eas_sys_not_found=yes])
+    AC_CHECK_FUNCS([extattr_set_fd extattr_set_file extattr_set_link],,
+                   [neta_cv_eas_sys_not_found=yes])
+  ;;
+
+  *freebsd4* | *dragonfly* )
+    AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work])
+  ;;
+
   *)
        AC_SEARCH_LIBS(getxattr, [attr])
 
@@ -1133,22 +1161,9 @@ if test x"$ac_cv_func_getxattr" = x"yes" ; then
        fi
 fi
 
-# Check if we have extattr
-case "$this_os" in
-  *freebsd4* | *dragonfly* )
-    AC_DEFINE(BROKEN_EXTATTR, 1, [Does extattr API work])
-    ;;
-  *)
-    AC_CHECK_FUNCS(extattr_delete_fd extattr_delete_file extattr_delete_link)
-    AC_CHECK_FUNCS(extattr_get_fd extattr_get_file extattr_get_link)
-    AC_CHECK_FUNCS(extattr_list_fd extattr_list_file extattr_list_link)
-    AC_CHECK_FUNCS(extattr_set_fd extattr_set_file extattr_set_link)
-    ;;
-esac
-
 if test "x$neta_cv_eas_sys_found" = "xyes" ; then
    if test "x$neta_cv_eas_sys_not_found" != "xyes" ; then
-      neta_cv_eas="$neta_cv_eas | native"
+      neta_cv_eas="$neta_cv_eas | sys"
    fi
 fi