diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-01-07 09:48:38 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-01-08 23:38:07 +0100 |
commit | 7a3dc668528f398458851aca5d27ff789414343a (patch) | |
tree | f8793627a19c3ebd0e5881796c8dd2fd0b9d2650 /buildtools | |
parent | ab4b988ba2ba85ec2bfb01d7711d6870b3e0f710 (diff) | |
download | samba-7a3dc668528f398458851aca5d27ff789414343a.tar.gz samba-7a3dc668528f398458851aca5d27ff789414343a.tar.xz samba-7a3dc668528f398458851aca5d27ff789414343a.zip |
wafsamba: move compiler / cflags related stuff from lib/replace to wafsamba
We should have this just in one central place.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'buildtools')
-rwxr-xr-x | buildtools/wafsamba/wscript | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 1a30d2fa93..917a692153 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -363,6 +363,27 @@ def configure(conf): conf.DEFINE('_GNU_SOURCE', 1, add_to_cflags=True) conf.DEFINE('_XOPEN_SOURCE_EXTENDED', 1, add_to_cflags=True) + # on Tru64 certain features are only available with _OSF_SOURCE set to 1 + # and _XOPEN_SOURCE set to 600 + if conf.env['SYSTEM_UNAME_SYSNAME'] == 'OSF1': + conf.DEFINE('_OSF_SOURCE', 1, add_to_cflags=True) + conf.DEFINE('_XOPEN_SOURCE', 600, add_to_cflags=True) + + # SCM_RIGHTS is only avail if _XOPEN_SOURCE iѕ defined on IRIX + if conf.env['SYSTEM_UNAME_SYSNAME'] == 'IRIX': + conf.DEFINE('_XOPEN_SOURCE', 600, add_to_cflags=True) + conf.DEFINE('_BSD_TYPES', 1, add_to_cflags=True) + + # Try to find the right extra flags for C99 initialisers + for f in ["", "-AC99", "-qlanglvl=extc99", "-qlanglvl=stdc99", "-c99"]: + if conf.CHECK_CFLAGS([f], ''' +struct foo {int x;char y;}; +struct foo bar = { .y = 'X', .x = 1 }; +'''): + if f != "": + conf.ADD_CFLAGS(f) + break + # get the base headers we'll use for the rest of the tests conf.CHECK_HEADERS('stdio.h sys/types.h sys/stat.h stdlib.h stddef.h memory.h string.h', add_headers=True) |