mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
third_party/popt: Initial support for popt.
ctdb, ldb, and samba are supported builds for third_party popt. Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
8cc966747d
commit
38de110b02
@ -33,3 +33,9 @@ def CHECK_ZLIB(conf):
|
|||||||
implied_deps='replace')
|
implied_deps='replace')
|
||||||
|
|
||||||
Build.BuildContext.CHECK_ZLIB = CHECK_ZLIB
|
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
|
||||||
|
1
ctdb/third_party
Symbolic link
1
ctdb/third_party
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../third_party
|
15
ctdb/wscript
15
ctdb/wscript
@ -12,7 +12,7 @@ while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
|
|||||||
srcdir = srcdir + '/..'
|
srcdir = srcdir + '/..'
|
||||||
sys.path.insert(0, srcdir + '/buildtools/wafsamba')
|
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
|
import samba_utils, samba_version
|
||||||
|
|
||||||
env = samba_utils.LOAD_ENVIRONMENT()
|
env = samba_utils.LOAD_ENVIRONMENT()
|
||||||
@ -66,7 +66,14 @@ def configure(conf):
|
|||||||
Options.options.disable_python = True
|
Options.options.disable_python = True
|
||||||
|
|
||||||
conf.RECURSE('lib/replace')
|
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/talloc')
|
||||||
conf.RECURSE('lib/tevent')
|
conf.RECURSE('lib/tevent')
|
||||||
conf.RECURSE('lib/tdb')
|
conf.RECURSE('lib/tdb')
|
||||||
@ -155,7 +162,9 @@ def configure(conf):
|
|||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
bld.RECURSE('lib/replace')
|
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/talloc')
|
||||||
bld.RECURSE('lib/tevent')
|
bld.RECURSE('lib/tevent')
|
||||||
bld.RECURSE('lib/tdb')
|
bld.RECURSE('lib/tdb')
|
||||||
|
@ -16,7 +16,8 @@ sys.path.insert(0, srcdir + '/buildtools/wafsamba')
|
|||||||
import wafsamba, samba_dist, Options
|
import wafsamba, samba_dist, Options
|
||||||
|
|
||||||
samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc
|
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''')
|
buildtools:buildtools''')
|
||||||
|
|
||||||
|
|
||||||
@ -31,7 +32,15 @@ def set_options(opt):
|
|||||||
def configure(conf):
|
def configure(conf):
|
||||||
conf.RECURSE('lib/tdb')
|
conf.RECURSE('lib/tdb')
|
||||||
conf.RECURSE('lib/tevent')
|
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.RECURSE('lib/replace')
|
||||||
conf.find_program('python', var='PYTHON')
|
conf.find_program('python', var='PYTHON')
|
||||||
conf.find_program('xsltproc', var='XSLTPROC')
|
conf.find_program('xsltproc', var='XSLTPROC')
|
||||||
@ -75,7 +84,10 @@ def configure(conf):
|
|||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
bld.RECURSE('lib/tevent')
|
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/replace')
|
||||||
bld.RECURSE('lib/tdb')
|
bld.RECURSE('lib/tdb')
|
||||||
|
|
||||||
|
@ -6,6 +6,6 @@ bld.SAMBA_MODULE('TORTURE_WINBIND',
|
|||||||
autoproto='proto.h',
|
autoproto='proto.h',
|
||||||
subsystem='smbtorture',
|
subsystem='smbtorture',
|
||||||
init_function='torture_winbind_init',
|
init_function='torture_winbind_init',
|
||||||
deps='wbclient winbind-client torture PAM_ERRORS',
|
deps='popt wbclient winbind-client torture PAM_ERRORS',
|
||||||
internal_module=True
|
internal_module=True
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
bld.SAMBA_SUBSYSTEM('TORTURE_UTIL',
|
bld.SAMBA_SUBSYSTEM('TORTURE_UTIL',
|
||||||
source='util_smb.c',
|
source='util_smb.c',
|
||||||
public_deps='torture POPT_CREDENTIALS',
|
public_deps='torture popt POPT_CREDENTIALS',
|
||||||
deps='smbclient-raw'
|
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',
|
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,
|
allow_warnings=True,
|
||||||
subsystem='smbtorture',
|
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,
|
internal_module=True,
|
||||||
autoproto='basic/proto.h',
|
autoproto='basic/proto.h',
|
||||||
init_function='torture_base_init'
|
init_function='torture_base_init'
|
||||||
@ -25,7 +25,7 @@ bld.SAMBA_MODULE('TORTURE_RAW',
|
|||||||
autoproto='raw/proto.h',
|
autoproto='raw/proto.h',
|
||||||
subsystem='smbtorture',
|
subsystem='smbtorture',
|
||||||
init_function='torture_raw_init',
|
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
|
internal_module=True
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ bld.SAMBA_MODULE('torture_rpc',
|
|||||||
autoproto='rpc/proto.h',
|
autoproto='rpc/proto.h',
|
||||||
subsystem='smbtorture',
|
subsystem='smbtorture',
|
||||||
init_function='torture_rpc_init',
|
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
|
internal_module=True
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ bld.SAMBA_MODULE('TORTURE_AUTH',
|
|||||||
source='auth/ntlmssp.c auth/pac.c auth/smbencrypt.c',
|
source='auth/ntlmssp.c auth/pac.c auth/smbencrypt.c',
|
||||||
autoproto='auth/proto.h',
|
autoproto='auth/proto.h',
|
||||||
subsystem='smbtorture',
|
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
|
internal_module=True
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ bld.SAMBA_MODULE('TORTURE_UNIX',
|
|||||||
bld.SAMBA_MODULE('TORTURE_LDAP',
|
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',
|
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',
|
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,
|
internal_module=True,
|
||||||
autoproto='ldap/proto.h',
|
autoproto='ldap/proto.h',
|
||||||
init_function='torture_ldap_init'
|
init_function='torture_ldap_init'
|
||||||
@ -136,7 +136,7 @@ bld.SAMBA_MODULE('TORTURE_NET',
|
|||||||
autoproto='libnet/proto.h',
|
autoproto='libnet/proto.h',
|
||||||
subsystem='smbtorture',
|
subsystem='smbtorture',
|
||||||
init_function='torture_net_init',
|
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
|
internal_module=True
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ bld.SAMBA_MODULE('TORTURE_NTP',
|
|||||||
autoproto='ntp/proto.h',
|
autoproto='ntp/proto.h',
|
||||||
subsystem='smbtorture',
|
subsystem='smbtorture',
|
||||||
init_function='torture_ntp_init',
|
init_function='torture_ntp_init',
|
||||||
deps='POPT_CREDENTIALS torture_rpc',
|
deps='popt POPT_CREDENTIALS torture_rpc',
|
||||||
internal_module=True
|
internal_module=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ for lib in ['talloc', 'tevent', 'tdb', 'ldb', 'popt' ]:
|
|||||||
cflags += bld.env.CPPPATH_ST % p + ' '
|
cflags += bld.env.CPPPATH_ST % p + ' '
|
||||||
|
|
||||||
if not bld.env.USING_SYSTEM_POPT:
|
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:
|
if bld.env.DEVELOPER_MODE:
|
||||||
bld.SAMBA_BINARY('test_headers',
|
bld.SAMBA_BINARY('test_headers',
|
||||||
|
2
third_party/popt/wscript
vendored
2
third_party/popt/wscript
vendored
@ -5,7 +5,7 @@ import Options
|
|||||||
def configure(conf):
|
def configure(conf):
|
||||||
conf.CHECK_HEADERS('float.h')
|
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)
|
conf.define('USING_SYSTEM_POPT', 1)
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
|
9
wscript
9
wscript
@ -124,6 +124,7 @@ def configure(conf):
|
|||||||
if conf.CHECK_FOR_THIRD_PARTY():
|
if conf.CHECK_FOR_THIRD_PARTY():
|
||||||
conf.RECURSE('third_party/iniparser/src')
|
conf.RECURSE('third_party/iniparser/src')
|
||||||
conf.RECURSE('third_party/zlib')
|
conf.RECURSE('third_party/zlib')
|
||||||
|
conf.RECURSE('third_party/popt')
|
||||||
else:
|
else:
|
||||||
if not conf.CHECK_INIPARSER():
|
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.')
|
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():
|
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.')
|
raise Utils.WafError('zlib development packages have not been found.\nIf third_party is installed, check that it is in the proper place.')
|
||||||
else:
|
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')
|
conf.RECURSE('lib/ldb')
|
||||||
|
|
||||||
@ -159,7 +165,6 @@ def configure(conf):
|
|||||||
conf.RECURSE('nsswitch')
|
conf.RECURSE('nsswitch')
|
||||||
conf.RECURSE('lib/socket_wrapper')
|
conf.RECURSE('lib/socket_wrapper')
|
||||||
conf.RECURSE('lib/uid_wrapper')
|
conf.RECURSE('lib/uid_wrapper')
|
||||||
conf.RECURSE('lib/popt')
|
|
||||||
conf.RECURSE('lib/subunit/c')
|
conf.RECURSE('lib/subunit/c')
|
||||||
conf.RECURSE('libcli/smbreadline')
|
conf.RECURSE('libcli/smbreadline')
|
||||||
conf.RECURSE('lib/crypto')
|
conf.RECURSE('lib/crypto')
|
||||||
|
@ -74,7 +74,7 @@ bld.RECURSE('lib/uid_wrapper')
|
|||||||
if bld.CHECK_FOR_THIRD_PARTY():
|
if bld.CHECK_FOR_THIRD_PARTY():
|
||||||
bld.RECURSE('third_party/iniparser/src')
|
bld.RECURSE('third_party/iniparser/src')
|
||||||
bld.RECURSE('third_party/zlib')
|
bld.RECURSE('third_party/zlib')
|
||||||
bld.RECURSE('lib/popt')
|
bld.RECURSE('third_party/popt')
|
||||||
bld.RECURSE('source4/lib/stream')
|
bld.RECURSE('source4/lib/stream')
|
||||||
bld.RECURSE('lib/afs')
|
bld.RECURSE('lib/afs')
|
||||||
bld.RECURSE('lib/util')
|
bld.RECURSE('lib/util')
|
||||||
|
Loading…
Reference in New Issue
Block a user