meson: add libssh2 build dependency

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina 2020-04-29 11:07:42 +02:00
parent 5604e26f7a
commit ff312f185e
4 changed files with 12 additions and 34 deletions

View 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

View File

@ -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])
])

View 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(),
}

View 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')