summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/wscript15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 511cbeac30..9af1e57050 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -295,10 +295,19 @@ def configure(conf):
def build(bld):
bld.RECURSE('buildtools/wafsamba')
- REPLACE_SOURCE = 'replace.c snprintf.c'
+ REPLACE_H_SOURCE = 'replace.c snprintf.c'
+
+ if bld.CONFIG_SET('REPLACE_STRPTIME'): REPLACE_H_SOURCE += ' strptime.c'
+ if not bld.CONFIG_SET('HAVE_TIMEGM'): REPLACE_H_SOURCE += ' timegm.c'
+
+ bld.SAMBA_SUBSYSTEM('LIBREPLACE_H',
+ REPLACE_H_SOURCE,
+ cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
+ group='compiler_libraries'
+ )
+
+ REPLACE_SOURCE = REPLACE_H_SOURCE
- if bld.CONFIG_SET('REPLACE_STRPTIME'): REPLACE_SOURCE += ' strptime.c'
- if not bld.CONFIG_SET('HAVE_TIMEGM'): REPLACE_SOURCE += ' timegm.c'
if not bld.CONFIG_SET('HAVE_GETIFADDRS'): REPLACE_SOURCE += ' getifaddrs.c'
if not bld.CONFIG_SET('HAVE_DLOPEN'): REPLACE_SOURCE += ' dlfcn.c'
if not bld.CONFIG_SET('HAVE_SOCKETPAIR'): REPLACE_SOURCE += ' socketpair.c'