OPENWSMAN_REQUIRED="2.2.3"
LIBPCAP_REQUIRED="1.0.0"
LIBNL_REQUIRED="1.1"
-LIBSSH2_REQUIRED="1.0"
-LIBSSH2_TRANSPORT_REQUIRED="1.3"
dnl Checks for C compiler.
AC_PROG_CC
LIBVIRT_CHECK_SANLOCK
LIBVIRT_CHECK_SASL
LIBVIRT_CHECK_SELINUX
+LIBVIRT_CHECK_SSH2
LIBVIRT_CHECK_UDEV
LIBVIRT_CHECK_YAJL
AC_HELP_STRING([--with-openvz], [add OpenVZ support @<:@default=check@:>@]),[],[with_openvz=check])
AC_ARG_WITH([vmware],
AC_HELP_STRING([--with-vmware], [add VMware support @<:@default=yes@:>@]),[],[with_vmware=yes])
-AC_ARG_WITH([libssh2],
- AC_HELP_STRING([--with-libssh2], [libssh2 location @<:@default=check@:>@]),[],[with_libssh2=check])
AC_ARG_WITH([phyp],
AC_HELP_STRING([--with-phyp], [add PHYP support @<:@default=check@:>@]),[],[with_phyp=check])
AC_ARG_WITH([xenapi],
(use auto for default paths on some platforms)
@<:@default=auto@:>@]),
[],[with_chrdev_lock_files=auto])
-AC_ARG_WITH([libssh2_transport],
- AC_HELP_STRING([--with-libssh2_transport], [libssh2 location @<:@default=check@:>@]),[],[with_libssh2_transport=check])
dnl
dnl in case someone want to build static binaries
dnl
-dnl check for libssh2 (PHYP and libssh2 transport)
+dnl check for PHYP
dnl
-LIBSSH2_CFLAGS=""
-LIBSSH2_LIBS=""
-
-if test "$with_phyp" = "yes" || test "$with_phyp" = "check" ||
- test "$with_libssh2_transport" = "yes" || test "$with_libssh2_transport" = "check"; then
- PKG_CHECK_MODULES([LIBSSH2], [libssh2 >= $LIBSSH2_REQUIRED], [
- if test "$with_phyp" = "check"; then
- with_phyp=yes
- fi
- if $PKG_CONFIG "libssh2 >= $LIBSSH2_TRANSPORT_REQUIRED"; then
- if test "$with_libssh2_transport" = "check"; then
- with_libssh2_transport=yes
- fi
- else
- if test "$with_libssh2_transport" = "check"; then
- with_libssh2_transport=no
- AC_MSG_NOTICE([libssh2 >= $LIBSSH2_TRANSPORT_REQUIRED is required for libssh2 transport])
- fi
- if test "$with_libssh2_transport" = "yes"; then
- AC_MSG_ERROR([libssh2 >= $LIBSSH2_TRANSPORT_REQUIRED is required for libssh2 transport])
- fi
- fi
- ], [
- if test "$with_phyp" = "check"; then
- with_phyp=no
- AC_MSG_NOTICE([libssh2 is required for Phyp driver, disabling it])
- fi
- if test "$with_phyp" = "yes"; then
- AC_MSG_ERROR([libssh2 >= $LIBSSH2_REQUIRED is required for Phyp driver])
- fi
- if test "$with_libssh2_transport" = "check"; then
- with_libssh2_transport=no
- AC_MSG_NOTICE([libssh2 >= $LIBSSH2_TRANSPORT_REQUIRED is required for libssh2 transport])
- fi
- if test "$with_libssh2_transport" = "yes"; then
- AC_MSG_ERROR([libssh2 >= $LIBSSH2_TRANSPORT_REQUIRED is required for libssh2 transport])
- fi
- ])
+if test "$with_phyp" != "no"; then
+ if test "$with_ssh2" = "no" ; then
+ if test "$with_phyp" = "check"; then
+ with_phyp=no
+ else
+ AC_MSG_ERROR([libssh2 is required for Phyp driver])
+ fi
+ else
+ with_phyp=yes
+ fi
fi
if test "$with_phyp" = "yes"; then
AC_DEFINE_UNQUOTED([WITH_PHYP], 1, [whether IBM HMC / IVM driver is enabled])
fi
-if test "$with_libssh2_transport" = "yes"; then
- AC_DEFINE_UNQUOTED([WITH_SSH2], 1, [whether libssh2 transport is enabled])
-fi
AM_CONDITIONAL([WITH_PHYP],[test "$with_phyp" = "yes"])
-AM_CONDITIONAL([WITH_SSH2], [test "$with_libssh2_transport" = "yes"])
-
-AC_SUBST([LIBSSH2_CFLAGS])
-AC_SUBST([LIBSSH2_LIBS])
dnl virsh libraries
AC_CHECK_HEADERS([readline/readline.h])
LIBVIRT_RESULT_SANLOCK
LIBVIRT_RESULT_SASL
LIBVIRT_RESULT_SELINUX
+LIBVIRT_RESULT_SSH2
LIBVIRT_RESULT_UDEV
LIBVIRT_RESULT_YAJL
AC_MSG_NOTICE([ libxml: $LIBXML_CFLAGS $LIBXML_LIBS])
else
AC_MSG_NOTICE([openwsman: no])
fi
-if test "$with_libssh2" != "no" ; then
-AC_MSG_NOTICE([ libssh2: $LIBSSH2_CFLAGS $LIBSSH2_LIBS])
-else
-AC_MSG_NOTICE([ libssh2: no])
-fi
if test "$with_gnutls" != "no" ; then
AC_MSG_NOTICE([ gnutls: $GNUTLS_CFLAGS $GNUTLS_LIBS])
else
%define with_systemd 0%{!?_without_systemd:0}
%define with_numad 0%{!?_without_numad:0}
%define with_firewalld 0%{!?_without_firewalld:0}
-%define with_libssh2_transport 0%{!?_without_libssh2_transport:0}
+%define with_libssh2 0%{!?_without_libssh2:0}
# Non-server/HV driver defaults which are always enabled
%define with_python 0%{!?_without_python:1}
# Enable libssh2 transport for new enough distros
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
-%define with_libssh2_transport 0%{!?_without_libssh2_transport:1}
+%define with_libssh2 0%{!?_without_libssh2:1}
%endif
# Disable some drivers when building without libvirt daemon.
%if %{with_fuse}
BuildRequires: fuse-devel >= 2.8.6
%endif
-%if %{with_phyp} || %{with_libssh2_transport}
-%if %{with_libssh2_transport}
+%if %{with_phyp} || %{with_libssh2}
BuildRequires: libssh2-devel >= 1.3.0
-%else
-BuildRequires: libssh2-devel
-%endif
%endif
%if %{with_netcf}
# work correctly & doesn't have onerous dependencies
Requires: cyrus-sasl-md5
%endif
-%if %{with_libssh2_transport}
-Requires: libssh2 >= 1.3.0
-%endif
%description client
Shared libraries and client binaries needed to access to the
--- /dev/null
+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_CHECK_SSH2],[
+ LIBVIRT_CHECK_PKG([SSH2], [libssh2], [1.3])
+])
+
+AC_DEFUN([LIBVIRT_RESULT_SSH2],[
+ LIBVIRT_RESULT_LIB([SSH2])
+])