Mercurial > dovecot > original-hg > dovecot-1.2
changeset 529:3a1be480d16a HEAD
buggy checks. we were supposed to compile them, not run. plus fixes for
freebsd-sendfile checking so that it fails with linux.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 28 Oct 2002 05:42:14 +0200 |
parents | a95b1ccff82e |
children | e815df17e52e |
files | configure.in |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in Mon Oct 28 05:35:05 2002 +0200 +++ b/configure.in Mon Oct 28 05:42:14 2002 +0200 @@ -282,11 +282,12 @@ dnl * Linux compatible mremap() AC_MSG_CHECKING([Linux compatible mremap()]) -AC_TRY_RUN([ +AC_TRY_COMPILE([ #include <unistd.h> #define __USE_GNU #include <sys/mman.h> - int main() { mremap(0, 0, 0, MREMAP_MAYMOVE); } +], [ + mremap(0, 0, 0, MREMAP_MAYMOVE); ], [ AC_DEFINE(HAVE_LINUX_MREMAP) AC_MSG_RESULT(yes) @@ -296,9 +297,10 @@ dnl * Linux compatible sendfile() AC_MSG_CHECKING([Linux compatible sendfile()]) -AC_TRY_RUN([ +AC_TRY_COMPILE([ #include <sys/sendfile.h> - int main() { sendfile(0, 0, (void *) 0, 0); } +], [ + sendfile(0, 0, (void *) 0, 0); ], [ AC_DEFINE(HAVE_LINUX_SENDFILE) AC_MSG_RESULT(yes) @@ -308,11 +310,13 @@ dnl * FreeBSD compatible sendfile() AC_MSG_CHECKING([FreeBSD compatible sendfile()]) -AC_TRY_RUN([ +AC_TRY_COMPILE([ #include <sys/types.h> #include <sys/socket.h> #include <sys/uio.h> - int main() { sendfile(0, 0, 0, 0, (void *) 0, (void *) 0, 0); } +], [ + struct sf_hdtr hdtr; + sendfile(0, 0, 0, 0, &hdtr, (void *) 0, 0); ], [ AC_DEFINE(HAVE_FREEBSD_SENDFILE) AC_MSG_RESULT(yes)