-dnl $Id: configure.in,v 1.233 2009-11-27 21:15:48 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)
AC_FUNC_UTIME_NULL
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)
+AC_CHECK_FUNCS(backtrace_symbols setlocale nl_langinfo strlcpy strlcat setlinebuf dirfd pselect)
AC_CHECK_FUNCS(waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64)
-AC_CHECK_FUNCS(strlcpy strlcat setlinebuf gethostid dirfd)
+AC_CHECK_FUNC(renameat, AC_DEFINE([_ATFILE_SOURCE], 1, AT file source))
AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
AC_CACHE_SAVE
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.])
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
[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 | native"
+ neta_cv_eas="$neta_cv_eas | sys"
fi
fi
+dnl --------------------- Check if realpath() takes NULL
+AC_CACHE_CHECK([if the realpath function allows a NULL argument],
+ neta_cv_REALPATH_TAKES_NULL, [
+ AC_TRY_RUN([
+ #include <stdio.h>
+ #include <limits.h>
+ #include <signal.h>
+
+ void exit_on_core(int ignored) {
+ exit(1);
+ }
+
+ main() {
+ char *newpath;
+ signal(SIGSEGV, exit_on_core);
+ newpath = realpath("/tmp", NULL);
+ exit((newpath != NULL) ? 0 : 1);
+ }],
+ neta_cv_REALPATH_TAKES_NULL=yes,
+ neta_cv_REALPATH_TAKES_NULL=no,
+ neta_cv_REALPATH_TAKES_NULL=cross
+ )
+ ]
+)
+
+if test x"$neta_cv_REALPATH_TAKES_NULL" = x"yes"; then
+ AC_DEFINE(REALPATH_TAKES_NULL,1,[Whether the realpath function allows NULL])
+fi
+
dnl --------------------- Netatalk Webmin
NETATALK_WEBMIN
contrib/Makefile
contrib/macusers/Makefile
contrib/macusers/macusers
- contrib/nu/Makefile
- contrib/nu/nu
contrib/printing/Makefile
contrib/shell_utils/Makefile
contrib/shell_utils/afpd-mtab.pl
contrib/shell_utils/apple_cp
+ contrib/shell_utils/apple_dump
contrib/shell_utils/apple_mv
contrib/shell_utils/apple_rm
contrib/shell_utils/asip-status.pl
libatalk/cnid/Makefile
libatalk/cnid/cdb/Makefile
libatalk/cnid/last/Makefile
- libatalk/cnid/mtab/Makefile
libatalk/cnid/dbd/Makefile
libatalk/cnid/tdb/Makefile
libatalk/compat/Makefile