summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-08 00:40:58 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:46 +1000
commita7c60e0b67c069d1e6e52207c35605016c3e9861 (patch)
treec5d323b023e4428229d9351711b32380a5458c35 /lib/replace
parentb2f7e4b5e2bf3da9bf2aca9a0c0ffd5d8408b2e8 (diff)
downloadsamba-a7c60e0b67c069d1e6e52207c35605016c3e9861.tar.gz
samba-a7c60e0b67c069d1e6e52207c35605016c3e9861.tar.bz2
samba-a7c60e0b67c069d1e6e52207c35605016c3e9861.zip
build: added getpass() tests
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/wscript12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 9312db4ac0..a7955a6992 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()