1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

build: add configure option to control vfs_snapper build

vfs_snapper is currently built if dbus development headers / libraries
are detected during configure. This commit adds new --disable-snapper
and --enable-snapper (default) configure parameters. When enabled,
configure will fail if the dbus development headers / libraries are
missing.

Signed-off-by: Matt Taylor <liverbugg@rinux.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon May 25 01:16:46 UTC 2020 on sn-devel-184
This commit is contained in:
Matt Taylor 2020-05-11 15:26:41 -04:00 committed by Andrew Bartlett
parent e05e9df781
commit 7ae03a19b3

View File

@ -74,6 +74,7 @@ def options(opt):
opt.samba_add_onoff_option('glusterfs', with_name="enable", without_name="disable", default=True)
opt.samba_add_onoff_option('cephfs', with_name="enable", without_name="disable", default=True)
opt.samba_add_onoff_option('snapper', with_name="enable", without_name="disable", default=True)
opt.add_option('--enable-vxfs',
help=("enable support for VxFS (default=no)"),
@ -1752,11 +1753,16 @@ main() {
if Options.options.enable_vxfs:
conf.DEFINE('HAVE_VXFS', '1')
if conf.CHECK_CFG(package='dbus-1', args='--cflags --libs',
if Options.options.with_snapper:
if conf.CHECK_CFG(package='dbus-1', args='--cflags --libs',
msg='Checking for dbus', uselib_store="DBUS-1"):
if (conf.CHECK_HEADERS('dbus/dbus.h', lib='dbus-1')
if (conf.CHECK_HEADERS('dbus/dbus.h', lib='dbus-1')
and conf.CHECK_LIB('dbus-1', shlib=True)):
conf.DEFINE('HAVE_DBUS', '1')
conf.DEFINE('HAVE_DBUS', '1')
else:
conf.fatal("vfs_snapper is enabled but prerequisite DBUS libraries "
"or headers not found. Use --disable-snapper to disable "
"vfs_snapper support.");
if conf.CHECK_CFG(package='liburing', args='--cflags --libs',
msg='Checking for liburing package', uselib_store="URING"):