[seahorse] Always enable SSH support.



commit d3ae1996064d8391c89bd1356733bdf4db4454b4
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Mon Oct 30 14:41:40 2017 +0100

    Always enable SSH support.
    
    This is a basic feature we want to support.
    
    Also: using the `--disable-ssh` option actually failed to compile.

 Makefile.am         |    5 +----
 common/config.vapi  |    1 -
 configure.ac        |   28 +++++++---------------------
 src/Makefile.am     |    7 +------
 src/seahorse-main.c |    5 ++---
 ssh/backend.vala    |    6 ++----
 6 files changed, 13 insertions(+), 39 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index d0f3a1a..38b576f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -99,15 +99,12 @@ include libegg/Makefile.am
 include libseahorse/Makefile.am
 include gkr/Makefile.am
 include src/Makefile.am
+include ssh/Makefile.am
 
 if WITH_PGP
 include pgp/Makefile.am
 endif
 
-if WITH_SSH
-include ssh/Makefile.am
-endif
-
 if WITH_PKCS11
 include pkcs11/Makefile.am
 endif
diff --git a/common/config.vapi b/common/config.vapi
index 7ce46ba..54e7b8b 100644
--- a/common/config.vapi
+++ b/common/config.vapi
@@ -9,7 +9,6 @@ namespace Config
        public const string PACKAGE;
        public const string GETTEXT_PACKAGE;
 
-       public const bool WITH_SSH;
        public const string SSH_PATH;
        public const string SSH_KEYGEN_PATH;
 }
diff --git a/configure.ac b/configure.ac
index 7789ef4..0c2cb77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -429,29 +429,16 @@ AM_CONDITIONAL(WITH_PKCS11, test "$enable_pkcs11" = "yes")
 # -----------------------------------------------------------------------------
 #  SSH
 
-AC_ARG_ENABLE(ssh,
-        AC_HELP_STRING([--disable-ssh], 
-        [Support for managing SSH keys]))
-        
-if test "x$enable_ssh" = "xno"; then
-    echo "disabling ssh support"
-else
+AC_PATH_PROG(SSH_KEYGEN_PATH, ssh-keygen, "failed")
+AC_PATH_PROG(SSH_PATH, ssh, "failed")
 
-    AC_PATH_PROG(SSH_KEYGEN_PATH, ssh-keygen, "failed")
-    AC_PATH_PROG(SSH_PATH, ssh, "failed")
-    
-    if test $SSH_KEYGEN_PATH != "failed" && 
-       test $SSH_PATH != "failed"; then
-        enable_ssh="yes"
-        AC_DEFINE(WITH_SSH, 1, [With SSH Support])
-        AC_DEFINE_UNQUOTED(SSH_KEYGEN_PATH, "$SSH_KEYGEN_PATH", [Path to ssh-keygen])
-        AC_DEFINE_UNQUOTED(SSH_PATH, "$SSH_PATH", [Path to ssh])
-    fi
-    
+if test $SSH_KEYGEN_PATH == "failed" || test $SSH_PATH == "failed"; then
+    AC_MSG_ERROR([ssh and ssh-keygen are required binaries])
+else
+    AC_DEFINE_UNQUOTED(SSH_KEYGEN_PATH, "$SSH_KEYGEN_PATH", [Path to ssh-keygen])
+    AC_DEFINE_UNQUOTED(SSH_PATH, "$SSH_PATH", [Path to ssh])
 fi
 
-AM_CONDITIONAL(WITH_SSH, test "$enable_ssh" = "yes")
-
 # -----------------------------------------------------------------------------
 # Compilation and linking options
 #
@@ -578,7 +565,6 @@ PKCS11 Support:             $enable_pkcs11
 PGP Support:                $enable_pgp
   GnuPG Version:            $have_gpg
   GPGME Version:            $have_gpgme
-SSH Support:                $enable_ssh
 Keyserver Support:          $with_keyserver
   LDAP:                     $with_ldap
   HKP:                      $enable_hkp
diff --git a/src/Makefile.am b/src/Makefile.am
index 52031a0..315890e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,4 @@
+SSH_LDADD = libseahorse-ssh.a
 
 if WITH_PGP
 PGP_LDADD = libseahorse-pgp.a
@@ -5,12 +6,6 @@ else
 PGP_LDADD = 
 endif
 
-if WITH_SSH
-SSH_LDADD = libseahorse-ssh.a
-else
-SSH_LDADD = 
-endif
-
 if WITH_PKCS11
 PKCS11_LDADD = libseahorse-pkcs11.a
 else
diff --git a/src/seahorse-main.c b/src/seahorse-main.c
index b5ad1d5..dcc34f2 100644
--- a/src/seahorse-main.c
+++ b/src/seahorse-main.c
@@ -55,12 +55,11 @@ on_application_startup (GApplication *application,
                         gpointer user_data)
 {
        /* Initialize the various components */
+       seahorse_ssh_backend_initialize ();
+
 #ifdef WITH_PGP
        seahorse_pgp_backend_initialize ();
 #endif
-#ifdef WITH_SSH
-       seahorse_ssh_backend_initialize ();
-#endif
 #ifdef WITH_PKCS11
        seahorse_pkcs11_backend_initialize ();
 #endif
diff --git a/ssh/backend.vala b/ssh/backend.vala
index 9380f0c..0bbaeca 100644
--- a/ssh/backend.vala
+++ b/ssh/backend.vala
@@ -72,10 +72,8 @@ public class Seahorse.Ssh.Backend : GLib.Object, Gcr.Collection, Seahorse.Backen
     }
 
     public static void initialize() {
-        if (Config.WITH_SSH) {
-            instance = new Backend();
-            Generate.register();
-        }
+        instance = new Backend();
+        Generate.register();
     }
 
     public Source get_dot_ssh() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]