diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-09-24 06:45:05 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-09-24 03:51:07 +0200 |
commit | 2e51c386beff808e74c8c1f360a6f4db30fe74b5 (patch) | |
tree | 50506722df57808bb123d499170203f5a377c686 /lib/replace/wscript | |
parent | 0727ad73212ff3cfe7e78249504b0209e082d7c4 (diff) | |
download | samba-2e51c386beff808e74c8c1f360a6f4db30fe74b5.tar.gz samba-2e51c386beff808e74c8c1f360a6f4db30fe74b5.tar.bz2 samba-2e51c386beff808e74c8c1f360a6f4db30fe74b5.zip |
lib/replace: Look for special flags needed for c99
This is normally handled by the waf core, but for HP-UX we currently fail.
The autoconf code hard-codes a case for HP-UX, but I want to try testing
it using a generic system first.
Andrew Bartlett
Diffstat (limited to 'lib/replace/wscript')
-rw-r--r-- | lib/replace/wscript | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript index 58053057d7..d5b2631cfd 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -43,6 +43,16 @@ def configure(conf): 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 + conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h') conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h') conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h') |