[dovecot-cvs] dovecot configure.in,1.36,1.37

cras at procontrol.fi cras at procontrol.fi
Mon Oct 28 05:42:16 EET 2002


Update of /home/cvs/dovecot
In directory danu:/tmp/cvs-serv6866

Modified Files:
	configure.in 
Log Message:
buggy checks. we were supposed to compile them, not run. plus fixes for
freebsd-sendfile checking so that it fails with linux.



Index: configure.in
===================================================================
RCS file: /home/cvs/dovecot/configure.in,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- configure.in	28 Oct 2002 03:35:05 -0000	1.36
+++ configure.in	28 Oct 2002 03:42:14 -0000	1.37
@@ -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)




More information about the dovecot-cvs mailing list