[PATCH] waf: Check for libnscd

Christof Schmitt cs at samba.org
Tue Feb 12 22:34:29 UTC 2019


From 7a3efe1d87b2cccdb07d76e687d490f66a3ed098 Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Tue, 12 Feb 2019 12:28:32 -0700
Subject: [PATCH] waf: Check for libnscd

The check was in the old autoconf, but not in waf. As the code is still
in source3/lib/util_nscd.c, add the check for libnscd to allow building
and using the code.

Signed-off-by: Christof Schmitt <cs at samba.org>
---
 source3/wscript       | 3 +++
 source3/wscript_build | 1 +
 2 files changed, 4 insertions(+)

diff --git a/source3/wscript b/source3/wscript
index 0cd7f40317a..e5d519d7fc8 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1648,6 +1648,9 @@ main() {
 
     conf.CHECK_HEADERS('rpc/xdr.h', lib='tirpc')
 
+    if conf.CHECK_FUNCS_IN('nscd_flush_cache', 'nscd', headers='libnscd.h'):
+        conf.DEFINE('HAVE_NSCD_FLUSH_CACHE', '1')
+
     forced_static_modules.extend(TO_LIST('auth_builtin auth_sam auth_winbind'))
     default_static_modules.extend(TO_LIST('''pdb_smbpasswd pdb_tdbsam
                                       auth_unix
diff --git a/source3/wscript_build b/source3/wscript_build
index 11c877818c2..6f6d74211ba 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -178,6 +178,7 @@ bld.SAMBA3_SUBSYSTEM('pdb',
                         LIBCLI_AUTH
                         flag_mapping
                         samba-credentials
+                        nscd
                         ''')
 
 bld.SAMBA3_LIBRARY('smbldaphelper',
-- 
2.17.0



More information about the samba-technical mailing list