s3-waf: add configure/declaration checks for fdatasync, readahead and splice.
authorGünther Deschner <gd@samba.org>
Tue, 7 Dec 2010 14:33:51 +0000 (15:33 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 7 Dec 2010 15:50:23 +0000 (16:50 +0100)
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Dec  7 16:50:23 CET 2010 on sn-devel-104

source3/wscript

index 8f6ad598d02c61b72f9a79e8d8152087ba6880af..da9a9db4b894dc32e70e02aeca3b8a49e5a46088 100644 (file)
@@ -121,6 +121,18 @@ def configure(conf):
     #FIXME: for some reason this one still fails
     conf.CHECK_FUNCS_IN('yp_get_default_domain', 'nsl')
     conf.CHECK_FUNCS_IN('dn_expand _dn_expand __dn_expand', 'resolv')
+    conf.CHECK_DECLS('fdatasync', reverse=True)
+    conf.CHECK_DECLS('readahead', reverse=True, headers='fcntl.h')
+
+    if conf.CHECK_CODE('''
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+long ret = splice(0,0,1,0,400,0);
+''',
+        'HAVE_LINUX_SPLICE',
+        headers='fcntl.h'):
+        conf.CHECK_DECLS('splice', reverse=True, headers='fcntl.h')
 
     # Check for inotify support
     conf.CHECK_HEADERS('linux/inotify.h asm/unistd.h sys/inotify.h')