summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-05 08:25:13 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-05 02:39:08 +0200
commitc03398ec0f499eef8981274019cc7b4db09415c2 (patch)
treec9dae832fe3fe617330c82d995d5d4a3c73156aa
parentdb1f2779791d250a01e2405a2f901bab4ade4efd (diff)
downloadsamba-c03398ec0f499eef8981274019cc7b4db09415c2.tar.gz
samba-c03398ec0f499eef8981274019cc7b4db09415c2.tar.xz
samba-c03398ec0f499eef8981274019cc7b4db09415c2.zip
build: Add getconf LFS_CFLAGS support to waf build
-rw-r--r--buildtools/wafsamba/samba_conftests.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index d53d7a82e8..1838b57c96 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -18,11 +18,29 @@ def CHECK_ICONV(conf, define='HAVE_NATIVE_ICONV'):
@conf
def CHECK_LARGEFILE(conf, define='HAVE_LARGEFILE'):
'''see what we need for largefile support'''
+ getconf_cflags = conf.CHECK_COMMAND(['getconf', 'LFS_CFLAGS']);
+ if getconf_cflags is not False:
+ if (conf.CHECK_CODE('return !(sizeof(off_t) >= 8)',
+ define='WORKING_GETCONF_LFS_CFLAGS',
+ execute=True,
+ cflags=getconf_cflags,
+ msg='Checking getconf large file support flags work')):
+ conf.ADD_CFLAGS(getconf_cflags)
+ getconf_cflags_list=TO_LIST(getconf_cflags)
+ for flag in getconf_cflags_list:
+ if flag[:2] == "-D":
+ flag_split = flag[2:].split('=')
+ if len(flag_split) == 1:
+ conf.DEFINE(flag_split[0], '1')
+ else:
+ conf.DEFINE(flag_split[0], flag_split[1])
+
if conf.CHECK_CODE('return !(sizeof(off_t) >= 8)',
define,
execute=True,
- msg='Checking for large file support'):
+ msg='Checking for large file support without additional flags'):
return True
+
if conf.CHECK_CODE('return !(sizeof(off_t) >= 8)',
define,
execute=True,