summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index e705c469..ff8c7b61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -347,14 +347,23 @@ AC_ARG_ENABLE([ssh-agent],
AC_HELP_STRING([--disable-ssh-agent],
[Don't include SSH agent in gnome-keyring]))
+AC_PATH_PROG([SSH_AGENT], [ssh-agent], [false])
+AC_DEFINE_UNQUOTED(SSH_AGENT, "$SSH_AGENT", [The path to ssh-agent])
+
+AC_PATH_PROG([SSH_ADD], [ssh-add], [false])
+AC_DEFINE_UNQUOTED(SSH_ADD, "$SSH_ADD", [The path to ssh-add])
+
if test "$enable_ssh_agent" != "no"; then
- AC_DEFINE(WITH_SSH, 1, [Whether to build SSH agent or not])
- ssh_status="yes"
-else
- ssh_status="no"
+ if test "$SSH_AGENT" = "false" -o "$SSH_ADD" = "false"; then
+ enable_ssh_agent=no
+ else
+ enable_ssh_agent=yes
+ AC_DEFINE(WITH_SSH, 1, [Whether to build SSH agent or not])
+ fi
fi
AM_CONDITIONAL(WITH_SSH, test "$enable_ssh_agent" != "no")
+ssh_status="$enable_ssh_agent"
# --------------------------------------------------------------------
# libgcrypt