-dnl $Id: configure.in,v 1.242 2010-04-07 14:25:24 hat001 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)
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 --------------------------------------------------------------------------
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 -----
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 -----
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])
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.])
[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])
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 | sys"