X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure.ac;h=41d2cc834fc5f21c31492b22786e845f3a02a8ad;hb=a8ada8f787706fc587df5b5f4509821036ae731f;hp=df9941d6ffa16dff97f5295ba75196d0a7da4d3f;hpb=7a9ef97721a142329de74ccb15d99a0b0d53d6d3;p=netatalk.git diff --git a/configure.ac b/configure.ac index df9941d6..41d2cc83 100644 --- a/configure.ac +++ b/configure.ac @@ -592,7 +592,6 @@ if test x"$this_os" = "xfreebsd"; then AC_MSG_RESULT([ * FreeBSD specific configuration]) AC_DEFINE(BSD4_4, 1, [BSD compatiblity macro]) AC_DEFINE(FREEBSD, 1, [Define if OS is FreeBSD]) - AC_DEFINE(OPEN_NOFOLLOW_ERRNO, EMLINK, errno returned by open with O_NOFOLLOW) fi @@ -601,7 +600,6 @@ if test x"$this_os" = "xkfreebsd-gnu"; then AC_MSG_RESULT([ * GNU/kFreeBSD specific configuration]) 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 @@ -832,41 +830,8 @@ AC_ARG_ENABLE(sendfile, if test x"$netatalk_cv_search_sendfile" = x"yes"; then case "$host_os" in *linux*) - AC_DEFINE(SENDFILE_FLAVOR_LINUX,1,[Whether linux sendfile() API is available]) - AC_MSG_CHECKING([for sendfile() syscall]) - AC_CACHE_CHECK([for sendfile support], - [netatalk_cv_HAVE_SENDFILE], - [AC_TRY_LINK( - [#include ], - [int tofd, fromfd; - off_t offset; - size_t total; - ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);], - [netatalk_cv_HAVE_SENDFILE=yes] - )] - ) - - # Try and cope with broken Linux sendfile.... - AC_CACHE_CHECK([for broken Linux sendfile support], - [netatalk_cv_HAVE_BROKEN_LINUX_SENDFILE], - [AC_TRY_LINK( - [#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) - #undef _FILE_OFFSET_BITS - #endif - #include ], - [int tofd, fromfd; - off_t offset; - size_t total; - ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);], - [netatalk_cv_HAVE_SENDFILE=yes; - AC_DEFINE(LINUX_BROKEN_SENDFILE_API,1,[Whether Linux sendfile() is broken])] - )] - ) - if test x"$netatalk_cv_HAVE_SENDFILE" = x"yes"; then - AC_MSG_RESULT(yes); - else - AC_MSG_RESULT(no); - fi + AC_DEFINE(SENDFILE_FLAVOR_LINUX,1,[Whether linux sendfile() API is available]) + AC_CHECK_FUNC([sendfile], [netatalk_cv_HAVE_SENDFILE=yes]) ;; *solaris*) @@ -886,7 +851,6 @@ if test x"$netatalk_cv_search_sendfile" = x"yes"; then esac if test x"$netatalk_cv_HAVE_SENDFILE" = x"yes"; then - AC_DEFINE(HAVE_SENDFILE,1,[Whether sendfile() is available]) AC_DEFINE(WITH_SENDFILE,1,[Whether sendfile() should be used]) fi fi @@ -1356,6 +1320,7 @@ AC_OUTPUT([Makefile distrib/config/netatalk-config distrib/initscripts/Makefile distrib/m4/Makefile + distrib/systemd/Makefile doc/Makefile etc/Makefile etc/afpd/Makefile