From: Andrew Bartlett Date: Thu, 10 May 2018 01:04:35 +0000 (+1200) Subject: build: Make --with-libarchive the default X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=78c8e699a8e34ebe69b704b455733050fd195af6 build: Make --with-libarchive the default This means that those not wanting to link to libarchive will just need to build --without-libarchive. In general, we prefer that optional libraries be required by default so that they are not accidentially missed, particularly in packages. Signed-off-by: Andrew Bartlett Reviewed-by: Stefan Metzmacher Reviewed-by: Gary Lockyer --- diff --git a/source3/client/clitar.c b/source3/client/clitar.c index b8009c92cb68..b598bde4ee80 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -1837,7 +1837,7 @@ static NTSTATUS path_base_name(TALLOC_CTX *ctx, const char *path, char **_base) #else -#define NOT_IMPLEMENTED DEBUG(0, ("tar mode not compiled. build with --with-libarchive\n")) +#define NOT_IMPLEMENTED DEBUG(0, ("tar mode not compiled. build used --without-libarchive\n")) int cmd_block(void) { diff --git a/source3/wscript b/source3/wscript index e6d9936fb160..7a1c579ef671 100644 --- a/source3/wscript +++ b/source3/wscript @@ -55,7 +55,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('libarchive', default=True) opt.SAMBA3_ADD_OPTION('cluster-support', default=False) @@ -218,12 +218,16 @@ main() { # None means autodetect, True/False means enable/disable conf.SET_TARGET_TYPE('archive', 'EMPTY') if Options.options.with_libarchive is not False: - libarchive_mandatory = Options.options.with_libarchive == True Logs.info("Checking for libarchive existence") if conf.CHECK_HEADERS('archive.h') and conf.CHECK_LIB('archive', shlib=True): conf.CHECK_FUNCS_IN('archive_read_support_filter_all archive_read_free', 'archive') - elif libarchive_mandatory: - conf.fatal('libarchive support requested, but not found') + else: + conf.fatal("libarchive support not found. " + "Try installing libarchive-dev or libarchive-devel. " + "Otherwise, use --without-libarchive to " + "build without libarchive support. " + "libarchive support is required for the smbclient " + "tar-file mode") # check for DMAPI libs if Options.options.with_dmapi == False: