summaryrefslogtreecommitdiff
path: root/source3/wscript
diff options
context:
space:
mode:
authorAurélien Aptel <aurelien.aptel@gmail.com>2013-08-07 16:34:22 +0200
committerAndreas Schneider <asn@samba.org>2014-02-19 18:22:29 +0100
commit95f9e60ef70a1925a463038f41476400b8990d5c (patch)
tree4fa17b625af07e3a295340b9ba3e5f32a2e65a1a /source3/wscript
parent92356e1524b97abc7e8f8fb5c7e625dc200de277 (diff)
downloadsamba-95f9e60ef70a1925a463038f41476400b8990d5c.tar.gz
s3: add --with-libarchive to build configuration
* skip tar tests if disabled * print error message when using disabled command * autodetection of libarchive Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> [ddiss@samba.org: rebased against makefile cleanup] Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript20
1 files changed, 16 insertions, 4 deletions
diff --git a/source3/wscript b/source3/wscript
index 31ec1a24118..8382160d1c8 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -43,6 +43,7 @@ def set_options(opt):
opt.SAMBA3_ADD_OPTION('dmapi', default=None) # None means autodetection
opt.SAMBA3_ADD_OPTION('fam', default=None) # None means autodetection
opt.SAMBA3_ADD_OPTION('profiling-data', default=False)
+ opt.SAMBA3_ADD_OPTION('libarchive', default=None)
opt.SAMBA3_ADD_OPTION('cluster-support', default=None)
@@ -75,10 +76,6 @@ def configure(conf):
if sys.platform != 'openbsd5':
conf.ADD_LDFLAGS("-Wl,--export-dynamic", testflags=True)
- # libarchive in smbclient
- conf.CHECK_HEADERS('archive.h')
- conf.CHECK_LIB('libarchive')
-
conf.CHECK_HEADERS('execinfo.h libexc.h libunwind.h netdb.h')
conf.CHECK_HEADERS('linux/falloc.h')
@@ -197,6 +194,21 @@ main() {
elif check_for_fam:
Logs.warn('no suitable FAM library found')
+ # check for libarchive (tar command in smbclient)
+ use_libarchive = False
+ # None means autodetect
+ if Options.options.with_libarchive is None:
+ Logs.info("Checking for libarchive existence")
+ if conf.CHECK_HEADERS('archive.h') and conf.CHECK_LIB('archive'):
+ use_libarchive = True
+ elif Options.options.with_libarchive == True:
+ conf.CHECK_HEADERS('archive.h', mandatory=True)
+ conf.CHECK_LIB('archive', mandatory=True)
+ use_libarchive = True
+
+ if use_libarchive:
+ conf.DEFINE('SAMBA_LIBARCHIVE_LIBS', '-larchive')
+
# check for DMAPI libs
Logs.info("Checking for DMAPI library existence")
conf.env['dmapi_lib'] = ''