waf: Check for libnscd
authorChristof Schmitt <cs@samba.org>
Tue, 12 Feb 2019 19:28:32 +0000 (12:28 -0700)
committerKarolin Seeger <kseeger@samba.org>
Thu, 21 Feb 2019 15:17:22 +0000 (16:17 +0100)
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.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13787

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Feb 13 17:58:33 CET 2019 on sn-devel-144

(cherry picked from commit 3a793497796395ffa3efda5807bdb1ca8e09e35b)

Autobuild-User(v4-9-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-9-test): Thu Feb 21 16:17:23 CET 2019 on sn-devel-144

source3/wscript
source3/wscript_build

index 47b5512208182038624a95eb297ce12c1a77ae80..42f60551bcd8bbc6671939dbbf80ff882e82af0f 100644 (file)
@@ -1646,6 +1646,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
index 36cfd5dada7955be99821e2ee0925118123fdbf8..40d93cbcae52d93e8ddf8a4c7dcdb15ea6dab22e 100644 (file)
@@ -181,6 +181,7 @@ bld.SAMBA3_SUBSYSTEM('pdb',
                         LIBCLI_AUTH
                         flag_mapping
                         samba-credentials
+                        nscd
                         ''')
 
 bld.SAMBA3_LIBRARY('smbldaphelper',