ldb: set -Wl,-no-undefined only on standalone build
authorAndrew Bartlett <abartlet@samba.org>
Tue, 5 Jul 2011 05:55:25 +0000 (15:55 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 5 Jul 2011 08:37:30 +0000 (10:37 +0200)
This ensures that the flag is not propogated to other projects, such
as Samba's source3 waf build.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Jul  5 10:37:30 CEST 2011 on sn-devel-104

lib/ldb/wscript

index f1845546650b175397194c2901b634a42e3b64ce..a8d9bf70ca1c8db19a3fcb4a80d5f992a899a4ee 100755 (executable)
@@ -66,12 +66,12 @@ def configure(conf):
         if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
             conf.env.ENABLE_LDAP_BACKEND = True
 
-    conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
+        # we don't want any libraries or modules to rely on runtime
+        # resolution of symbols
+        if sys.platform != "openbsd4":
+            conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
 
-    # we don't want any libraries or modules to rely on runtime
-    # resolution of symbols
-    if sys.platform != "openbsd4":
-        conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
+    conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
 
     conf.SAMBA_CONFIG_H()