summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
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()