package/libssh: add option to enable server support
authorHeiko Thiery <heiko.thiery@kontron.com>
Wed, 25 Sep 2019 12:17:26 +0000 (14:17 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 27 Sep 2019 20:58:56 +0000 (22:58 +0200)
This patch adds Config.in option for ssh server support.

Signed-off-by: Heiko Thiery <heiko.thiery@kontron.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libssh/Config.in
package/libssh/libssh.mk

index 3dbfa7d5615b4fac6342858d63419b1872917d26..a6cf1f89605469ab33a7c17be391e44bd23cab38 100644 (file)
@@ -13,6 +13,15 @@ config BR2_PACKAGE_LIBSSH
 
          http://www.libssh.org/
 
+if BR2_PACKAGE_LIBSSH
+
+config BR2_PACKAGE_LIBSSH_SERVER
+       bool "server"
+       help
+         Enable libssh server support
+
+endif
+
 comment "libssh needs a toolchain w/ dynamic library, threads"
        depends on BR2_USE_MMU
        depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
index d5f22c29a08e4253e66008461fd9aaff82fee65f..b8464ed2bfbeec91bad1e2cc664e53a77aeeea0d 100644 (file)
@@ -14,12 +14,17 @@ LIBSSH_INSTALL_STAGING = YES
 LIBSSH_SUPPORTS_IN_SOURCE_BUILD = NO
 LIBSSH_CONF_OPTS = \
        -DWITH_STACK_PROTECTOR=OFF \
-       -DWITH_SERVER=OFF \
        -DWITH_EXAMPLES=OFF
 
 # cmake older than 3.10 require this to avoid try_run() in FindThreads
 LIBSSH_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF
 
+ifeq ($(BR2_PACKAGE_LIBSSH_SERVER),y)
+LIBSSH_CONF_OPTS += -DWITH_SERVER=ON
+else
+LIBSSH_CONF_OPTS += -DWITH_SERVER=OFF
+endif
+
 ifeq ($(BR2_PACKAGE_ZLIB),y)
 LIBSSH_CONF_OPTS += -DWITH_ZLIB=ON
 LIBSSH_DEPENDENCIES += zlib