diff options
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 5 | ||||
-rw-r--r-- | lib/replace/wscript | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index dc4bf8f220..76878a166b 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -14,10 +14,11 @@ from samba_utils import * @runonce @conf -def DEFINE(conf, d, v): +def DEFINE(conf, d, v, add_to_cflags=False): '''define a config option''' conf.define(d, v, quote=False) - conf.env.append_value('CCDEFINES', d + '=' + str(v)) + if add_to_cflags: + conf.env.append_value('CCDEFINES', d + '=' + str(v)) @runonce def CHECK_HEADER(conf, h, add_headers=True): diff --git a/lib/replace/wscript b/lib/replace/wscript index a7955a6992..0f3689a808 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -47,8 +47,8 @@ def configure(conf): # check for pkgconfig conf.check_cfg(atleast_pkgconfig_version='0.0.0') - conf.DEFINE('_GNU_SOURCE', 1) - conf.DEFINE('_XOPEN_SOURCE_EXTENDED', 1) + conf.DEFINE('_GNU_SOURCE', 1, add_to_cflags=True) + conf.DEFINE('_XOPEN_SOURCE_EXTENDED', 1, add_to_cflags=True) conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) conf.CHECK_HEADERS('unistd.h sys/types.h stdlib.h stdio.h stddef.h') |