]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: add libssh2 build dependency
authorPavel Hrdina <phrdina@redhat.com>
Wed, 29 Apr 2020 09:07:42 +0000 (11:07 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:26:59 +0000 (09:26 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
configure.ac
m4/virt-ssh2.m4 [deleted file]
meson.build
meson_options.txt

index e43abbe4dd790106ba71cb1f69edcf5ab359cffd..2ab059e6d92260e09d30f5282cac483b6f8f8ee6 100644 (file)
@@ -96,7 +96,6 @@ fi
 # RPC, we don't need several libraries.
 if test "$with_remote" = "no" ; then
   with_libvirtd=no
-  with_ssh2=no
   with_sasl=no
 fi
 # Stateful drivers are useful only when building the daemon.
@@ -121,7 +120,6 @@ LIBVIRT_ARG_POLKIT
 LIBVIRT_ARG_SANLOCK
 LIBVIRT_ARG_SASL
 LIBVIRT_ARG_SELINUX
-LIBVIRT_ARG_SSH2
 LIBVIRT_ARG_UDEV
 LIBVIRT_ARG_VIRTUALPORT
 LIBVIRT_ARG_WIRESHARK
@@ -140,7 +138,6 @@ LIBVIRT_CHECK_PTHREAD
 LIBVIRT_CHECK_SANLOCK
 LIBVIRT_CHECK_SASL
 LIBVIRT_CHECK_SELINUX
-LIBVIRT_CHECK_SSH2
 LIBVIRT_CHECK_UDEV
 LIBVIRT_CHECK_VIRTUALPORT
 LIBVIRT_CHECK_WIRESHARK
@@ -437,7 +434,6 @@ LIBVIRT_RESULT_RBD
 LIBVIRT_RESULT_SANLOCK
 LIBVIRT_RESULT_SASL
 LIBVIRT_RESULT_SELINUX
-LIBVIRT_RESULT_SSH2
 LIBVIRT_RESULT_UDEV
 LIBVIRT_RESULT_VIRTUALPORT
 LIBVIRT_RESULT_XDR
diff --git a/m4/virt-ssh2.m4 b/m4/virt-ssh2.m4
deleted file mode 100644 (file)
index f712f81..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-dnl The libssh2.so library
-dnl
-dnl Copyright (C) 2012-2013 Red Hat, Inc.
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library.  If not, see
-dnl <http://www.gnu.org/licenses/>.
-dnl
-
-AC_DEFUN([LIBVIRT_ARG_SSH2],[
-  LIBVIRT_ARG_WITH_FEATURE([SSH2], [libssh2], [check], [1.3])
-])
-
-AC_DEFUN([LIBVIRT_CHECK_SSH2],[
-  LIBVIRT_CHECK_PKG([SSH2], [libssh2], [1.3])
-])
-
-AC_DEFUN([LIBVIRT_RESULT_SSH2],[
-  LIBVIRT_RESULT_LIB([SSH2])
-])
index 5afbdd6a36cf311f09bf444c4fde5d579eba5c8b..79dfae7e67480690292cece45f929a2e0fd9f1f7 100644 (file)
@@ -1150,6 +1150,16 @@ else
   libssh_dep = dependency('', required: false)
 endif
 
+libssh2_version = '1.3'
+if get_option('driver_remote').enabled()
+  libssh2_dep = dependency('libssh2', version: '>=' + libssh2_version, required: get_option('libssh2'))
+  if libssh2_dep.found()
+    conf.set('WITH_SSH2', 1)
+  endif
+else
+  libssh2_dep = dependency('', required: false)
+endif
+
 use_macvtap = false
 if not get_option('macvtap').disabled()
   if (cc.has_header_symbol('linux/if_link.h', 'MACVLAN_MODE_BRIDGE') and
@@ -1317,6 +1327,7 @@ libs_summary = {
   'libnl': libnl_dep.found(),
   'libpcap': libpcap_dep.found(),
   'libssh': libssh_dep.found(),
+  'libssh2': libssh2_dep.found(),
   'macvtap': conf.has('WITH_MACVTAP'),
   'readline': readline_dep.found(),
 }
index 459c7b8a8def0da499c957ab5c7bb60775015860..b4cef7bd6173f90791dc80228d48d67f6dd16d32 100644 (file)
@@ -27,6 +27,7 @@ option('hal', type: 'feature', value: 'auto', description: 'hal support')
 option('libiscsi', type: 'feature', value: 'auto', description: 'libiscsi support')
 option('libpcap', type: 'feature', value: 'auto', description: 'libpcap support')
 option('libssh', type: 'feature', value: 'auto', description: 'libssh support')
+option('libssh2', type: 'feature', value: 'auto', description: 'libssh2 support')
 option('macvtap', type: 'feature', value: 'auto', description: 'enable macvtap device')
 option('readline', type: 'feature', value: 'auto', description: 'readline support')