AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(netatalk, ${NETATALK_VERSION})
AM_CONFIG_HEADER(config.h)
+AM_MAINTAINER_MODE([enable])
dnl Checks for programs.
AC_PROG_AWK
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)])
)
-
AC_ARG_ENABLE(redhat,
- [ --enable-redhat use redhat-style sysv configuration ],[
+ [ --enable-redhat obsoleted ],[
+ echo "ERROR: --enable-redhat is obsoleted. Use --enable-redhat-sysv or --enable-redhat-systemd."
+ echo "exit 1"
+ exit 1
+ ]
+)
+
+AC_ARG_ENABLE(redhat-sysv,
+ [ --enable-redhat-sysv use redhat-style sysv (upstart) configuration ],[
if test "$enableval" = "yes"; then
- sysv_style=redhat
+ sysv_style=redhat-sysv
fi
AC_MSG_RESULT([enabling redhat-style sysv support])
]
)
+AC_ARG_ENABLE(redhat-systemd,
+ [ --enable-redhat-systemd use redhat-style systemd (>=Fedora15) configuration ],[
+ if test "$enableval" = "yes"; then
+ sysv_style=redhat-systemd
+ fi
+ AC_MSG_RESULT([enabling redhat-style systemd support])
+ ]
+)
+
AC_ARG_ENABLE(suse,
[ --enable-suse use suse-style sysv configuration ],[
if test "$enableval" = "yes"; then
]
)
-AC_ARG_ENABLE(cobalt,
- [ --enable-cobalt use cobalt-style sysv configuration ],
- if test "$enableval" = "yes"; then
- sysv_style=cobalt
- fi
- AC_MSG_RESULT([enabling cobalt-style sysv support])
-)
-
AC_ARG_ENABLE(netbsd,
[ --enable-netbsd use NetBSD-style rc.d configuration ],
if test "x$enableval" = "xyes"; then
case "$this_os" in
linux) AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions])
;;
+ *kfreebsd-gnu*) AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions])
+ ;;
esac
dnl --------------------- operating system specific flags (port from sys/*)
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
+ 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])
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
AM_CONDITIONAL(BUILD_PAM, test x$compile_pam = xyes)
AM_CONDITIONAL(USE_PGP, test x$compile_pgp = xyes)
AM_CONDITIONAL(DEFAULT_HOOK, test x$neta_cv_have_libgcrypt != xyes && test x$neta_cv_have_openssl != xyes)
-AM_CONDITIONAL(USE_COBALT, test x$sysv_style = xcobalt)
AM_CONDITIONAL(USE_NETBSD, test x$sysv_style = xnetbsd)
-AM_CONDITIONAL(USE_REDHAT, test x$sysv_style = xredhat)
+AM_CONDITIONAL(USE_REDHAT_SYSV, test x$sysv_style = xredhat-sysv)
+AM_CONDITIONAL(USE_REDHAT_SYSTEMD, test x$sysv_style = xredhat-systemd)
AM_CONDITIONAL(USE_SUSE, test x$sysv_style = xsuse)
AM_CONDITIONAL(USE_SHADOWPW, test x$shadowpw = xyes)
AM_CONDITIONAL(USE_TRU64, test x$sysv_style = xtru64)
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
bin/cnid/cnid2_create
bin/getzones/Makefile
bin/megatron/Makefile
- bin/misc/Makefile
+ bin/misc/Makefile
bin/nbp/Makefile
bin/pap/Makefile
bin/psorder/Makefile
bin/uniconv/Makefile
config/Makefile
- config/pam/Makefile
+ config/pam/Makefile
contrib/Makefile
contrib/macusers/Makefile
contrib/macusers/macusers
contrib/printing/Makefile
contrib/shell_utils/Makefile
- contrib/shell_utils/afpd-mtab.pl
- contrib/shell_utils/apple_dump
+ contrib/shell_utils/apple_dump
contrib/shell_utils/asip-status.pl
contrib/timelord/Makefile
contrib/a2boot/Makefile