summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/wafsamba/samba_third_party.py5
-rw-r--r--third_party/resolv_wrapper/resolv_wrapper.c (renamed from lib/resolv_wrapper/resolv_wrapper.c)0
-rw-r--r--third_party/resolv_wrapper/wscript (renamed from lib/resolv_wrapper/wscript)4
-rw-r--r--third_party/wscript3
-rw-r--r--wscript6
-rw-r--r--wscript_build2
6 files changed, 15 insertions, 5 deletions
diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py
index 917f8b92956..99336154def 100644
--- a/buildtools/wafsamba/samba_third_party.py
+++ b/buildtools/wafsamba/samba_third_party.py
@@ -49,3 +49,8 @@ Build.BuildContext.CHECK_SOCKET_WRAPPER = CHECK_SOCKET_WRAPPER
def CHECK_NSS_WRAPPER(conf):
return conf.CHECK_BUNDLED_SYSTEM_PKG('nss_wrapper', minversion='1.1.3')
Build.BuildContext.CHECK_NSS_WRAPPER = CHECK_NSS_WRAPPER
+
+@conf
+def CHECK_RESOLV_WRAPPER(conf):
+ return conf.CHECK_BUNDLED_SYSTEM_PKG('resolv_wrapper', minversion='1.1.4')
+Build.BuildContext.CHECK_RESOLV_WRAPPER = CHECK_RESOLV_WRAPPER
diff --git a/lib/resolv_wrapper/resolv_wrapper.c b/third_party/resolv_wrapper/resolv_wrapper.c
index 48018be8039..48018be8039 100644
--- a/lib/resolv_wrapper/resolv_wrapper.c
+++ b/third_party/resolv_wrapper/resolv_wrapper.c
diff --git a/lib/resolv_wrapper/wscript b/third_party/resolv_wrapper/wscript
index 25371ed80be..be3e82be3ea 100644
--- a/lib/resolv_wrapper/wscript
+++ b/third_party/resolv_wrapper/wscript
@@ -5,7 +5,7 @@ import os
VERSION="1.1.4"
def configure(conf):
- if conf.CHECK_BUNDLED_SYSTEM('resolv_wrapper', minversion=VERSION, set_target=False):
+ if conf.CHECK_RESOLV_WRAPPER():
conf.DEFINE('USING_SYSTEM_RESOLV_WRAPPER', 1)
libresolv_wrapper_so_path = 'libresolv_wrapper.so'
else:
@@ -80,7 +80,7 @@ def configure(conf):
# Create full path to resolv_wrapper
blddir = os.path.realpath(conf.blddir)
- libresolv_wrapper_so_path = blddir + '/default/lib/resolv_wrapper/libresolv-wrapper.so'
+ libresolv_wrapper_so_path = blddir + '/default/third_party/resolv_wrapper/libresolv-wrapper.so'
conf.DEFINE('LIBRESOLV_WRAPPER_SO_PATH', libresolv_wrapper_so_path)
conf.DEFINE('RESOLV_WRAPPER', 1)
diff --git a/third_party/wscript b/third_party/wscript
index 9c6bccffb61..a39c1ebdc10 100644
--- a/third_party/wscript
+++ b/third_party/wscript
@@ -54,6 +54,7 @@ def configure(conf):
if conf.CONFIG_GET('ENABLE_SELFTEST'):
conf.RECURSE('socket_wrapper')
conf.RECURSE('nss_wrapper')
+ conf.RECURSE('resolv_wrapper')
def build(bld):
@@ -82,3 +83,5 @@ def build(bld):
bld.RECURSE('socket_wrapper')
if bld.CONFIG_GET('NSS_WRAPPER'):
bld.RECURSE('nss_wrapper')
+ if bld.CONFIG_GET('RESOLV_WRAPPER'):
+ bld.RECURSE('resolv_wrapper')
diff --git a/wscript b/wscript
index 30cf0251738..771555a1c04 100644
--- a/wscript
+++ b/wscript
@@ -166,6 +166,11 @@ def configure(conf):
else:
conf.define('USING_SYSTEM_NSS_WRAPPER', 1)
+ if not conf.CHECK_RESOLV_WRAPPER():
+ raise Utils.WafError('resolv_wrapper package has not been found.\nIf third_party is installed, check that it is in the proper place.')
+ else:
+ conf.define('USING_SYSTEM_RESOLV_WRAPPER', 1)
+
conf.RECURSE('lib/ldb')
if not (Options.options.without_ad_dc):
@@ -194,7 +199,6 @@ def configure(conf):
conf.RECURSE('lib/crypto')
conf.RECURSE('pidl')
if conf.CONFIG_GET('ENABLE_SELFTEST'):
- conf.RECURSE('lib/resolv_wrapper')
conf.RECURSE('lib/uid_wrapper')
if Options.options.with_pam:
conf.RECURSE('lib/pam_wrapper')
diff --git a/wscript_build b/wscript_build
index d3982a39634..2e892280398 100644
--- a/wscript_build
+++ b/wscript_build
@@ -69,8 +69,6 @@ bld.RECURSE('source4/lib/cmdline')
bld.RECURSE('source4/lib/http')
if bld.CONFIG_GET('PAM_WRAPPER') and Options.options.with_pam:
bld.RECURSE('lib/pam_wrapper')
-if bld.CONFIG_GET('RESOLV_WRAPPER'):
- bld.RECURSE('lib/resolv_wrapper')
if bld.CONFIG_GET('UID_WRAPPER'):
bld.RECURSE('lib/uid_wrapper')
if bld.CHECK_FOR_THIRD_PARTY():