summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/wafsamba/samba_third_party.py6
l---------ctdb/third_party1
-rwxr-xr-xctdb/wscript15
-rwxr-xr-xlib/ldb/wscript18
-rw-r--r--source4/torture/winbind/wscript_build2
-rwxr-xr-xsource4/torture/wscript_build16
-rw-r--r--testsuite/headers/wscript_build2
-rw-r--r--third_party/popt/wscript2
-rw-r--r--wscript9
-rw-r--r--wscript_build2
10 files changed, 53 insertions, 20 deletions
diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py
index b62bcc8ec51..408d5579a7e 100644
--- a/buildtools/wafsamba/samba_third_party.py
+++ b/buildtools/wafsamba/samba_third_party.py
@@ -33,3 +33,9 @@ def CHECK_ZLIB(conf):
implied_deps='replace')
Build.BuildContext.CHECK_ZLIB = CHECK_ZLIB
+
+@conf
+def CHECK_POPT(conf):
+ return conf.CHECK_BUNDLED_SYSTEM('popt', checkfunctions='poptGetContext', headers='popt.h')
+
+Build.BuildContext.CHECK_POPT = CHECK_POPT
diff --git a/ctdb/third_party b/ctdb/third_party
new file mode 120000
index 00000000000..d838c05a862
--- /dev/null
+++ b/ctdb/third_party
@@ -0,0 +1 @@
+../third_party \ No newline at end of file
diff --git a/ctdb/wscript b/ctdb/wscript
index 389afbbc5e6..5014f056e55 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -12,7 +12,7 @@ while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
srcdir = srcdir + '/..'
sys.path.insert(0, srcdir + '/buildtools/wafsamba')
-import wafsamba, samba_dist, Options, Logs
+import wafsamba, samba_dist, Options, Logs, Utils
import samba_utils, samba_version
env = samba_utils.LOAD_ENVIRONMENT()
@@ -66,7 +66,14 @@ def configure(conf):
Options.options.disable_python = True
conf.RECURSE('lib/replace')
- conf.RECURSE('lib/popt')
+ if conf.CHECK_FOR_THIRD_PARTY():
+ conf.RECURSE('third_party/popt')
+ else:
+ if not conf.CHECK_POPT():
+ raise Utils.WafError('popt development packages have not been found\nIf third_party is installed, check that it is in the proper place.')
+ else:
+ conf.define('USING_SYSTEM_POPT', 1)
+
conf.RECURSE('lib/talloc')
conf.RECURSE('lib/tevent')
conf.RECURSE('lib/tdb')
@@ -155,7 +162,9 @@ def configure(conf):
def build(bld):
bld.RECURSE('lib/replace')
- bld.RECURSE('lib/popt')
+ if bld.CHECK_FOR_THIRD_PARTY():
+ bld.RECURSE('third_party/popt')
+
bld.RECURSE('lib/talloc')
bld.RECURSE('lib/tevent')
bld.RECURSE('lib/tdb')
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index ba75d675d89..be045448711 100755
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -16,7 +16,8 @@ sys.path.insert(0, srcdir + '/buildtools/wafsamba')
import wafsamba, samba_dist, Options
samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc
- lib/tdb:lib/tdb lib/tdb:lib/tdb lib/tevent:lib/tevent lib/popt:lib/popt
+ lib/tdb:lib/tdb lib/tdb:lib/tdb lib/tevent:lib/tevent
+ third_party/popt:third_party/popt
buildtools:buildtools''')
@@ -31,7 +32,15 @@ def set_options(opt):
def configure(conf):
conf.RECURSE('lib/tdb')
conf.RECURSE('lib/tevent')
- conf.RECURSE('lib/popt')
+
+ if conf.CHECK_FOR_THIRD_PARTY():
+ conf.RECURSE('third_party/popt')
+ else:
+ if not conf.CHECK_POPT():
+ raise Utils.WafError('popt development packages have not been found.\nIf third_party is installed, check that it is in the proper place.')
+ else:
+ conf.define('USING_SYSTEM_POPT', 1)
+
conf.RECURSE('lib/replace')
conf.find_program('python', var='PYTHON')
conf.find_program('xsltproc', var='XSLTPROC')
@@ -75,7 +84,10 @@ def configure(conf):
def build(bld):
bld.RECURSE('lib/tevent')
- bld.RECURSE('lib/popt')
+
+ if os.path.exists('third_party'):
+ bld.RECURSE('third_party/popt')
+
bld.RECURSE('lib/replace')
bld.RECURSE('lib/tdb')
diff --git a/source4/torture/winbind/wscript_build b/source4/torture/winbind/wscript_build
index 0ae98528d1d..0def23ea0d1 100644
--- a/source4/torture/winbind/wscript_build
+++ b/source4/torture/winbind/wscript_build
@@ -6,6 +6,6 @@ bld.SAMBA_MODULE('TORTURE_WINBIND',
autoproto='proto.h',
subsystem='smbtorture',
init_function='torture_winbind_init',
- deps='wbclient winbind-client torture PAM_ERRORS',
+ deps='popt wbclient winbind-client torture PAM_ERRORS',
internal_module=True
)
diff --git a/source4/torture/wscript_build b/source4/torture/wscript_build
index 4ba7675214a..39192b02a0c 100755
--- a/source4/torture/wscript_build
+++ b/source4/torture/wscript_build
@@ -3,7 +3,7 @@
bld.SAMBA_SUBSYSTEM('TORTURE_UTIL',
source='util_smb.c',
- public_deps='torture POPT_CREDENTIALS',
+ public_deps='torture popt POPT_CREDENTIALS',
deps='smbclient-raw'
)
@@ -12,7 +12,7 @@ bld.SAMBA_MODULE('TORTURE_BASIC',
source='basic/base.c basic/misc.c basic/scanner.c basic/utable.c basic/charset.c basic/mangle_test.c basic/denytest.c basic/aliases.c basic/locking.c basic/secleak.c basic/rename.c basic/dir.c basic/delete.c basic/unlink.c basic/disconnect.c basic/delaywrite.c basic/attr.c basic/properties.c',
allow_warnings=True,
subsystem='smbtorture',
- deps='LIBCLI_SMB POPT_CREDENTIALS TORTURE_UTIL smbclient-raw TORTURE_RAW',
+ deps='LIBCLI_SMB popt POPT_CREDENTIALS TORTURE_UTIL smbclient-raw TORTURE_RAW',
internal_module=True,
autoproto='basic/proto.h',
init_function='torture_base_init'
@@ -25,7 +25,7 @@ bld.SAMBA_MODULE('TORTURE_RAW',
autoproto='raw/proto.h',
subsystem='smbtorture',
init_function='torture_raw_init',
- deps='LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE POPT_CREDENTIALS TORTURE_UTIL',
+ deps='LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE popt POPT_CREDENTIALS TORTURE_UTIL',
internal_module=True
)
@@ -55,7 +55,7 @@ bld.SAMBA_MODULE('torture_rpc',
autoproto='rpc/proto.h',
subsystem='smbtorture',
init_function='torture_rpc_init',
- deps='ndr-table RPC_NDR_UNIXINFO dcerpc-samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL RPC_NDR_NETLOGON dcerpc-atsvc RPC_NDR_DRSUAPI RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER RPC_NDR_NTSVCS WB_HELPER samba-net LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP service process_model RPC_NDR_BROWSER LIBCLI_DRSUAPI TORTURE_DFS RPC_NDR_FSRVP '+heimdal_specific['rpc'][1],
+ deps='ndr-table RPC_NDR_UNIXINFO dcerpc-samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL RPC_NDR_NETLOGON dcerpc-atsvc RPC_NDR_DRSUAPI RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER RPC_NDR_NTSVCS WB_HELPER samba-net LIBCLI_AUTH popt POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP service process_model RPC_NDR_BROWSER LIBCLI_DRSUAPI TORTURE_DFS RPC_NDR_FSRVP '+heimdal_specific['rpc'][1],
internal_module=True
)
@@ -85,7 +85,7 @@ bld.SAMBA_MODULE('TORTURE_AUTH',
source='auth/ntlmssp.c auth/pac.c auth/smbencrypt.c',
autoproto='auth/proto.h',
subsystem='smbtorture',
- deps='LIBCLI_SMB gensec auth4 authkrb5 POPT_CREDENTIALS smbpasswdparser torture com_err gensec_ntlmssp',
+ deps='LIBCLI_SMB gensec auth4 authkrb5 popt POPT_CREDENTIALS smbpasswdparser torture com_err gensec_ntlmssp',
internal_module=True
)
@@ -114,7 +114,7 @@ bld.SAMBA_MODULE('TORTURE_UNIX',
bld.SAMBA_MODULE('TORTURE_LDAP',
source='ldap/common.c ldap/basic.c ldap/schema.c ldap/uptodatevector.c ldap/cldap.c ldap/netlogon.c ldap/cldapbench.c ldap/ldap_sort.c ldap/nested_search.c',
subsystem='smbtorture',
- deps='cli-ldap cli_cldap samdb POPT_CREDENTIALS torture ldbsamba',
+ deps='cli-ldap cli_cldap samdb popt POPT_CREDENTIALS torture ldbsamba',
internal_module=True,
autoproto='ldap/proto.h',
init_function='torture_ldap_init'
@@ -136,7 +136,7 @@ bld.SAMBA_MODULE('TORTURE_NET',
autoproto='libnet/proto.h',
subsystem='smbtorture',
init_function='torture_net_init',
- deps='samba-net POPT_CREDENTIALS torture_rpc PROVISION',
+ deps='samba-net popt POPT_CREDENTIALS torture_rpc PROVISION',
internal_module=True
)
@@ -146,7 +146,7 @@ bld.SAMBA_MODULE('TORTURE_NTP',
autoproto='ntp/proto.h',
subsystem='smbtorture',
init_function='torture_ntp_init',
- deps='POPT_CREDENTIALS torture_rpc',
+ deps='popt POPT_CREDENTIALS torture_rpc',
internal_module=True
)
diff --git a/testsuite/headers/wscript_build b/testsuite/headers/wscript_build
index 635c8641fc6..f612ad92615 100644
--- a/testsuite/headers/wscript_build
+++ b/testsuite/headers/wscript_build
@@ -35,7 +35,7 @@ for lib in ['talloc', 'tevent', 'tdb', 'ldb', 'popt' ]:
cflags += bld.env.CPPPATH_ST % p + ' '
if not bld.env.USING_SYSTEM_POPT:
- cflags += bld.env.CPPPATH_ST % '../lib/popt'
+ cflags += bld.env.CPPPATH_ST % '../third_party/popt'
if bld.env.DEVELOPER_MODE:
bld.SAMBA_BINARY('test_headers',
diff --git a/third_party/popt/wscript b/third_party/popt/wscript
index d6228418900..e81572c7b71 100644
--- a/third_party/popt/wscript
+++ b/third_party/popt/wscript
@@ -5,7 +5,7 @@ import Options
def configure(conf):
conf.CHECK_HEADERS('float.h')
- if conf.CHECK_BUNDLED_SYSTEM('popt', checkfunctions='poptGetContext', headers='popt.h'):
+ if conf.CHECK_POPT():
conf.define('USING_SYSTEM_POPT', 1)
def build(bld):
diff --git a/wscript b/wscript
index 377ab66edc6..76e1f384cd7 100644
--- a/wscript
+++ b/wscript
@@ -124,6 +124,7 @@ def configure(conf):
if conf.CHECK_FOR_THIRD_PARTY():
conf.RECURSE('third_party/iniparser/src')
conf.RECURSE('third_party/zlib')
+ conf.RECURSE('third_party/popt')
else:
if not conf.CHECK_INIPARSER():
raise Utils.WafError('iniparser development packages have not been found.\nIf third_party is installed, check that it is in the proper place.')
@@ -133,7 +134,12 @@ def configure(conf):
if not conf.CHECK_ZLIB():
raise Utils.WafError('zlib development packages have not been found.\nIf third_party is installed, check that it is in the proper place.')
else:
- conf.define('USING_SYSTEM_ZLIB',1);
+ conf.define('USING_SYSTEM_ZLIB',1)
+
+ if not conf.CHECK_POPT():
+ raise Utils.WafError('popt development packages have not been found.\nIf third_party is installed, check that it is in the proper place.')
+ else:
+ conf.define('USING_SYSTEM_POPT', 1)
conf.RECURSE('lib/ldb')
@@ -159,7 +165,6 @@ def configure(conf):
conf.RECURSE('nsswitch')
conf.RECURSE('lib/socket_wrapper')
conf.RECURSE('lib/uid_wrapper')
- conf.RECURSE('lib/popt')
conf.RECURSE('lib/subunit/c')
conf.RECURSE('libcli/smbreadline')
conf.RECURSE('lib/crypto')
diff --git a/wscript_build b/wscript_build
index 328038f1bb0..b0718177c54 100644
--- a/wscript_build
+++ b/wscript_build
@@ -74,7 +74,7 @@ bld.RECURSE('lib/uid_wrapper')
if bld.CHECK_FOR_THIRD_PARTY():
bld.RECURSE('third_party/iniparser/src')
bld.RECURSE('third_party/zlib')
-bld.RECURSE('lib/popt')
+ bld.RECURSE('third_party/popt')
bld.RECURSE('source4/lib/stream')
bld.RECURSE('lib/afs')
bld.RECURSE('lib/util')