diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-01-07 11:13:04 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-01-08 23:38:07 +0100 |
commit | d744c7c080d81121b84a592a95761e03c2a1090c (patch) | |
tree | ffc5c0fff2ca7d41962d858453c6703fcf32c766 /buildtools/wafsamba | |
parent | 46fdd6221e9c64b459e0d05e6d02d89deb8dafb5 (diff) | |
download | samba-d744c7c080d81121b84a592a95761e03c2a1090c.tar.gz |
wafsamba: make it possible to specify ADDITIONAL_{CFLAGS,LDFLAGS} as env var to ./configure
CFLAGS and LDFLAGS are also used during the configure checks and might impact
their results.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index 043a9f474a9..8d84a5e4069 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -703,6 +703,19 @@ int main(void) { if Options.options.pedantic: conf.ADD_CFLAGS('-W', testflags=True) + + # Let people pass an additional ADDITIONAL_{CFLAGS,LDFLAGS} + # environment variables which are only used the for final build. + # + # The CFLAGS and LDFLAGS environment variables are also + # used for the configure checks which might impact their results. + conf.add_os_flags('ADDITIONAL_CFLAGS') + if conf.env.ADDITIONAL_CFLAGS and conf.CHECK_CFLAGS(conf.env['ADDITIONAL_CFLAGS']): + conf.env['EXTRA_CFLAGS'].extend(conf.env['ADDITIONAL_CFLAGS']) + conf.add_os_flags('ADDITIONAL_LDFLAGS') + if conf.env.ADDITIONAL_LDFLAGS and conf.CHECK_LDFLAGS(conf.env['ADDITIONAL_LDFLAGS']): + conf.env['EXTRA_LDFLAGS'].extend(conf.env['ADDITIONAL_LDFLAGS']) + if path is None: conf.write_config_header('config.h', top=True) else: |