build: add additional libreplace conditional sources
[nivanova/samba-autobuild/.git] / lib / replace / wscript
index 39e75c06c7a72f4e1ba4bdf4a0e64da824508a07..63f96313dd92184d8ba2662f7ab8053598836d36 100644 (file)
@@ -374,8 +374,6 @@ def configure(conf):
 
 
 def build(bld):
-    bld.set_rpath()
-
     # libreplace needs to put the library in the right build groups
     # as libreplace is a base library for everything, even for our
     # compilers, we need libreplace to build very early
@@ -383,9 +381,12 @@ def build(bld):
 
     REPLACE_SOURCE = 'replace.c snprintf.c'
 
-
-    if bld.CONFIG_SET('REPLACE_STRPTIME'):
-        REPLACE_SOURCE += ' strptime.c'
+    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'
+    if not bld.CONFIG_SET('HAVE_CONNECT'):       REPLACE_SOURCE += ' socket.c'
 
     bld.SAMBA_LIBRARY('replace',
                       source=REPLACE_SOURCE,