1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib/replace: Add test for what flag we need for -Werror behaviour

This commit is contained in:
Andrew Bartlett 2012-09-29 14:36:41 +10:00
parent 837f47d630
commit 931ed2509d

View File

@ -53,6 +53,15 @@ struct foo bar = { .y = 'X', .x = 1 };
conf.ADD_CFLAGS(f)
break
# Try to find the right extra flags for -Werror behaviour
for f in ["-Werror", "-w2", "-errwarn"]:
if conf.CHECK_CFLAGS([f], '''
'''):
if not 'WERROR_CFLAGS' in conf.env:
conf.env['WERROR_CFLAGS'] = []
conf.env['WERROR_CFLAGS'].extend([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')