X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure.in;h=b90d14cea1284bb08224360b5937d4224c4417e4;hb=0bc1f040edf0e9414eb1f0979605155a5a14d483;hp=5c8031d81243f5950f467536f018015e5f8659c5;hpb=9947f1e56c60b8f2fd5ccd47d4a1a4cf55c341c8;p=netatalk.git diff --git a/configure.in b/configure.in index 5c8031d8..b90d14ce 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.227 2009-11-17 16:17:13 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) @@ -135,9 +135,9 @@ AC_TYPE_SIGNAL 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 ]) AC_CACHE_SAVE @@ -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 ----- @@ -713,14 +716,21 @@ fi dnl ----- see etc/afpd/quota.c AC_DEFINE(HAVE_BROKEN_DBTOB, 1, [Define if dbtob is broken]) - netatalk_cv_linux_sendfile=no + netatalk_cv_linux_sendfile=yes + AC_MSG_CHECKING([use sendfile syscall]) AC_ARG_ENABLE(sendfile, - [ --enable-sendfile use sendfile syscall default (no) ],[ - if test "$enableval" = "yes"; then - netatalk_cv_linux_sendfile=yes + [ --disable-sendfile disable linux sendfile syscall],[ + if test x"$enableval" = x"no"; then + netatalk_cv_linux_sendfile=no + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([yes]) + fi - AC_MSG_RESULT([enabling sendfile syscall]) - ] + ],[ + AC_MSG_RESULT([yes]) + ] + ) if test x"$netatalk_cv_linux_sendfile" = "xyes"; then @@ -788,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 ----- @@ -1048,7 +1060,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 @@ -1139,15 +1151,41 @@ case "$this_os" in ;; esac -echo neta_cv_eas_sys_found = $neta_cv_eas_sys_found -echo neta_cv_eas_sys_not_found = $neta_cv_eas_sys_not_found - 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 + #include + #include + + 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 @@ -1193,7 +1231,6 @@ AC_OUTPUT([Makefile bin/afile/Makefile bin/afppasswd/Makefile bin/cnid/Makefile - bin/cnid/cnid_maint bin/cnid/cnid2_create bin/getzones/Makefile bin/megatron/Makefile @@ -1203,19 +1240,17 @@ AC_OUTPUT([Makefile bin/psorder/Makefile bin/uniconv/Makefile config/Makefile + config/pam/Makefile contrib/Makefile - contrib/acltests/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/apple_cleanup contrib/shell_utils/asip-status.pl contrib/timelord/Makefile contrib/a2boot/Makefile @@ -1241,12 +1276,9 @@ AC_OUTPUT([Makefile libatalk/asp/Makefile libatalk/atp/Makefile libatalk/cnid/Makefile - libatalk/cnid/db3/Makefile libatalk/cnid/cdb/Makefile libatalk/cnid/last/Makefile - libatalk/cnid/mtab/Makefile libatalk/cnid/dbd/Makefile - libatalk/cnid/hash/Makefile libatalk/cnid/tdb/Makefile libatalk/compat/Makefile libatalk/dsi/Makefile