From a7c60e0b67c069d1e6e52207c35605016c3e9861 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 8 Mar 2010 00:40:58 +1100 Subject: [PATCH] build: added getpass() tests --- lib/replace/wscript | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/replace/wscript b/lib/replace/wscript index 9312db4ac05..a7955a69926 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -261,6 +261,18 @@ def configure(conf): cflags=conf.env.VISIBILITY_CFLAGS, define='HAVE_VISIBILITY_ATTR') + # use this later -> conf.recurse('.', name='getpass') + + if conf.CHECK_FUNCS('getpass getpassphrase'): + # if we have both, then we prefer getpassphrase + conf.DEFINE(REPLACE_GETPASS_BY_GETPASSPHRASE, 1) + conf.DEFINE(REPLACE_GETPASS, 1) + + conf.CHECK_CODE('''#include "getpass.c" + int main(void) { return 0; }''', + addmain=False, + define='REPLACE_GETPASS', + cflags='-DNO_CONFIG_H') def build(bld): bld.set_rpath()