Skip to content

Commit 7996e03

Browse files
Samuel Cabrerocryptomilk
authored andcommitted
wscript: Add --with-systemd-userdb option
Signed-off-by: Samuel Cabrero <[email protected]> Reviewed-by: Andreas Schneider <[email protected]>
1 parent 849f959 commit 7996e03

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

source3/wscript

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,16 @@ msg.msg_accrightslen = sizeof(fd);
595595
conf.env.build_winbind = True
596596
conf.DEFINE('WITH_WINBIND', '1')
597597

598+
if Options.options.with_systemd_userdb:
599+
conf.CHECK_CFG(package='libvarlink', args='"libvarlink >= 24" --cflags --libs',
600+
msg='Checking for libvarlink >= 24', mandatory=True)
601+
if conf.CHECK_HEADERS('varlink.h', lib='varlink') and conf.CHECK_LIB('varlink', shlib=True):
602+
if conf.CHECK_FUNCS_IN('varlink_service_new', 'varlink', headers='varlink.h'):
603+
conf.env.with_systemd_userdb = True
604+
conf.DEFINE('WITH_SYSTEMD_USERDB', '1')
605+
if not conf.env.with_systemd_userdb:
606+
conf.fatal("libvarlink not found.")
607+
598608
conf.find_program('awk', var='AWK')
599609

600610
conf.CHECK_HEADERS('asm/types.h')

wscript

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ def options(opt):
173173
help=('Build with Azure Entra ID support.'),
174174
action='store_true', dest='enable_himmelblau')
175175

176+
opt.samba_add_onoff_option('systemd-userdb',
177+
help=("Build winbind with support for systemd "
178+
"User/Group Record Lookup API via "
179+
"Varlink"),
180+
default=False)
176181

177182
def configure(conf):
178183
if Options.options.SAMBA_VERSION_VENDOR_SUFFIX:

0 commit comments

Comments
 (0)