summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/wscript40
-rwxr-xr-xsource3/wscript_build35
-rwxr-xr-xwscript1
3 files changed, 42 insertions, 34 deletions
diff --git a/source3/libsmb/wscript b/source3/libsmb/wscript
new file mode 100644
index 0000000000..6260945c11
--- /dev/null
+++ b/source3/libsmb/wscript
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+
+import Options, Logs
+
+def configure(conf):
+ if conf.CHECK_BUNDLED_SYSTEM_PKG('smbclient', minversion='0'):
+ conf.define('USING_SYSTEM_LIBSMBCLIENT', 1)
+
+def build(bld):
+ if bld.CONFIG_SET('USING_SYSTEM_LIBSMBCLIENT'):
+ Logs.info("\tSelected system libsmbclient build")
+ return
+
+ Logs.info("\tSelected embedded libsmbclient build")
+ bld.SAMBA3_LIBRARY('smbclient',
+ source='''
+ libsmb_cache.c
+ libsmb_compat.c
+ libsmb_context.c
+ libsmb_dir.c
+ libsmb_file.c
+ libsmb_misc.c
+ libsmb_path.c
+ libsmb_printjob.c
+ libsmb_server.c
+ libsmb_stat.c
+ libsmb_xattr.c
+ libsmb_setget.c''',
+ public_deps='''
+ talloc
+ param
+ libsmb
+ KRBCLIENT
+ msrpc3
+ libcli_lsa3''',
+ public_headers='../include/libsmbclient.h',
+ abi_directory='ABI',
+ abi_match='smbc_*',
+ vnum='0.1.0',
+ pc_files='smbclient.pc')
diff --git a/source3/wscript_build b/source3/wscript_build
index f6f1436e7f..bd9241476c 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -462,23 +462,6 @@ RPCCLIENT_SRC = '''${RPCCLIENT_SRC1}'''
LIBSMBCLIENT_THREAD_SRC = '''libsmb/libsmb_thread_impl.c
libsmb/libsmb_thread_posix.c'''
-LIBSMBCLIENT_SRC0 = '''libsmb/libsmb_cache.c
- libsmb/libsmb_compat.c
- libsmb/libsmb_context.c
- libsmb/libsmb_dir.c
- libsmb/libsmb_file.c
- libsmb/libsmb_misc.c
- libsmb/libsmb_path.c
- libsmb/libsmb_printjob.c
- libsmb/libsmb_server.c
- libsmb/libsmb_stat.c
- libsmb/libsmb_xattr.c
- libsmb/libsmb_setget.c'''
-
-LIBSMBCLIENT_SRC1 = '''${LIBSMBCLIENT_SRC0}'''
-
-LIBSMBCLIENT_SRC = '${LIBSMBCLIENT_SRC1}'
-
LIBSMBSHAREMODES_SRC0 = 'libsmb/smb_share_modes.c'
LIBSMBSHAREMODES_SRC = '${LIBSMBSHAREMODES_SRC0}'
@@ -666,23 +649,6 @@ bld.SAMBA3_LIBRARY('netapi',
vnum='0',
vars=locals())
-bld.SAMBA3_LIBRARY('smbclient',
- source=LIBSMBCLIENT_SRC,
- public_deps='''
- talloc
- param
- libsmb
- KRBCLIENT
- msrpc3
- libcli_lsa3
- ''',
- public_headers='include/libsmbclient.h',
- abi_directory='libsmb/ABI',
- abi_match='smbc_*',
- vnum='0.1.0',
- pc_files='libsmb/smbclient.pc',
- vars=locals())
-
bld.SAMBA3_LIBRARY('smbsharemodes',
source=LIBSMBSHAREMODES_SRC,
public_deps='''talloc tdb_compat''',
@@ -1614,6 +1580,7 @@ bld.RECURSE('libgpo/gpext')
bld.RECURSE('lib/pthreadpool')
bld.RECURSE('librpc')
bld.RECURSE('librpc/idl')
+bld.RECURSE('libsmb')
bld.RECURSE('modules')
bld.RECURSE('pam_smbpass')
bld.RECURSE('passdb')
diff --git a/wscript b/wscript
index 15e1ce51bf..f96327c90d 100755
--- a/wscript
+++ b/wscript
@@ -105,6 +105,7 @@ def configure(conf):
conf.RECURSE('selftest')
conf.RECURSE('source3')
conf.RECURSE('lib/addns')
+ conf.RECURSE('source3/libsmb')
conf.SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS()