diff options
author | Ralph Boehme <slow@samba.org> | 2019-04-17 16:42:20 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-08-08 20:24:32 +0000 |
commit | 12ef7b38437f4a4211fa3dce3e3c1e76a3d3df78 (patch) | |
tree | 4500dde43fa71a21e36587e32004c58206ba0696 /source3/wscript | |
parent | 25c5012c53f4d8efbe04ee8d3c8af256fec592a7 (diff) | |
download | samba-12ef7b38437f4a4211fa3dce3e3c1e76a3d3df78.tar.gz |
s3:wscript: enable Spotlight by default
Now that we have a no-op backend that is always available, we can compile mdssvc
by default.
The new behaviour is:
option not used Default: build mdsvc with available backends
from autodetection
--disable-spotlight Do not build mdssvc
--enable-spotlight Build mdssvc and require a real backend
(currently Tracker, in the future also Elasticsearch)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/wscript')
-rw-r--r-- | source3/wscript | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/source3/wscript b/source3/wscript index 59aa4350ef0..ae3b03825a2 100644 --- a/source3/wscript +++ b/source3/wscript @@ -78,7 +78,8 @@ def options(opt): help=("enable support for VxFS (default=no)"), action="store_true", dest='enable_vxfs', default=False) - opt.samba_add_onoff_option('spotlight', with_name="enable", without_name="disable", default=False) + # default = None means autodetection + opt.samba_add_onoff_option('spotlight', with_name="enable", without_name="disable", default=None) def configure(conf): default_static_modules = [] @@ -1675,28 +1676,38 @@ main() { define=None, on_target=False) + with_spotlight_tracker_backend = ( + conf.CONFIG_SET('HAVE_TRACKER') + and conf.CONFIG_SET('HAVE_GLIB') + and conf.env['BISON'] + and conf.env['FLEX'] + and conf.CONFIG_GET('HAVE_UTF8_NORMALISATION') + ) + conf.env.with_spotlight = False - if Options.options.with_spotlight: + if Options.options.with_spotlight is not False: backends = ['noindex'] - if conf.CONFIG_SET('HAVE_TRACKER') and conf.CONFIG_SET('HAVE_GLIB'): - conf.env.spotlight_backend_tracker = True - backends.append('tracker') - conf.DEFINE('HAVE_SPOTLIGHT_BACKEND_TRACKER', '1') - - if conf.env.spotlight_backend_tracker: - if not conf.env['BISON']: - conf.fatal("Spotlight support requested but bison missing") - if not conf.env['FLEX']: - conf.fatal("Spotlight support requested but flex missing") - if not conf.CONFIG_GET('HAVE_UTF8_NORMALISATION'): - conf.fatal("Missing support for Unicode normalisation. " - "Try installing icu-dev or libicu-devel.") + if not conf.env['BISON']: + Logs.warn("Spotlight support requested but bison missing") + if not conf.env['FLEX']: + Logs.warn("Spotlight support requested but flex missing") + if not conf.CONFIG_GET('HAVE_UTF8_NORMALISATION'): + Logs.warn("Missing support for Unicode normalisation. " + "Try installing icu-dev or libicu-devel.") if not conf.CONFIG_SET('HAVE_TRACKER'): Logs.warn('Missing libtracker-sparql development files for Spotlight backend "tracker"') if not conf.CONFIG_SET('HAVE_GLIB'): Logs.warn('Missing glib-2.0 development files for Spotlight backend "tracker"') + if with_spotlight_tracker_backend: + conf.env.spotlight_backend_tracker = True + backends.append('tracker') + conf.DEFINE('HAVE_SPOTLIGHT_BACKEND_TRACKER', '1') + + if Options.options.with_spotlight is True and not conf.env.spotlight_backend_tracker: + conf.fatal("Unmet dependencies for Spotlight backend") + Logs.info("Building with Spotlight support, available backends: %s" % ', '.join(backends)) default_static_modules.extend(TO_LIST('rpc_mdssvc_module')) conf.DEFINE('WITH_SPOTLIGHT', '1') |