From 4412eb9d008d259cebafa7062d4826d69e67d89c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 12 Jan 2011 00:43:26 +0100 Subject: s3-waf: more fallocate checks stolen from autoconf. Guenther --- source3/wscript | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'source3') diff --git a/source3/wscript b/source3/wscript index 3e83c12f28d..561f65dd703 100644 --- a/source3/wscript +++ b/source3/wscript @@ -88,6 +88,7 @@ def configure(conf): conf.ADD_LDFLAGS("-Wl,--export-dynamic", testflags=True) conf.CHECK_HEADERS('execinfo.h libexc.h libunwind.h netdb.h') + conf.CHECK_HEADERS('linux/falloc.h') conf.CHECK_FUNCS('getcwd fchown chmod fchmod mknod mknod64') conf.CHECK_FUNCS('strtol strchr strupr chflags') @@ -335,6 +336,35 @@ return acl_get_perm_np(permset_d, perm); headers='sys/types.h sys/statfs.h', execute=True) + if conf.CONFIG_SET('HAVE_FALLOCATE'): + conf.CHECK_CODE(''' + #if defined(HAVE_UNISTD_H) + #include + #endif + #include + #define _GNU_SOURCE + #include + #if defined(HAVE_LINUX_FALLOC_H) + #include + #endif + int ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 10);''', + 'HAVE_LINUX_FALLOCATE', + msg="Checking whether the Linux 'fallocate' function is available") + if conf.CONFIG_SET('HAVE_FALLOCATE64'): + conf.CHECK_CODE(''' + #if defined(HAVE_UNISTD_H) + #include + #endif + #include + #define _GNU_SOURCE + #include + #if defined(HAVE_LINUX_FALLOC_H) + #include + #endif + int ret = fallocate64(0, FALLOC_FL_KEEP_SIZE, 0, 10);''', + 'HAVE_LINUX_FALLOCATE64', + msg="Checking whether the Linux 'fallocate64' function is available") + default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam pdb_ldap auth_sam auth_unix auth_winbind auth_wbc auth_server auth_domain auth_builtin auth_netlogond vfs_default -- cgit