[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/11] block/ssh: Require libssh2 >= 1.2.8.
|
From: |
Stefan Hajnoczi |
|
Subject: |
[Qemu-devel] [PATCH 01/11] block/ssh: Require libssh2 >= 1.2.8. |
|
Date: |
Fri, 26 Apr 2013 13:44:22 +0200 |
From: "Richard W.M. Jones" <address@hidden>
libssh2 >= 1.2.8 is required to enable this block device (because
that version introduced the libssh2_session_handshake call).
Change the test to use pkg-config exclusively. If the user requests
--enable-libssh2 and the minimum version is not available, then the
following error is displayed:
$ ./configure --enable-libssh2
ERROR: libssh2 >= 1.2.8 required for --enable-libssh2
If --enable-libssh2 is not specified, then the feature is silently
disabled if sufficiently new libssh2 is not available.
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
configure | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/configure b/configure
index ee2e7e8..8188a7c 100755
--- a/configure
+++ b/configure
@@ -2364,35 +2364,19 @@ fi
##########################################
# libssh2 probe
+min_libssh2_version=1.2.8
if test "$libssh2" != "no" ; then
- cat > $TMPC <<EOF
-#include <stdio.h>
-#include <libssh2.h>
-#include <libssh2_sftp.h>
-int main(void) {
- LIBSSH2_SESSION *session;
- session = libssh2_session_init ();
- (void) libssh2_sftp_init (session);
- return 0;
-}
-EOF
-
- if $pkg_config libssh2 --modversion >/dev/null 2>&1; then
+ if $pkg_config --atleast-version=$min_libssh2_version libssh2 >/dev/null 2>&1
+ then
libssh2_cflags=`$pkg_config libssh2 --cflags`
libssh2_libs=`$pkg_config libssh2 --libs`
- else
- libssh2_cflags=
- libssh2_libs="-lssh2"
- fi
-
- if compile_prog "$libssh2_cflags" "$libssh2_libs" ; then
libssh2=yes
libs_tools="$libssh2_libs $libs_tools"
libs_softmmu="$libssh2_libs $libs_softmmu"
QEMU_CFLAGS="$QEMU_CFLAGS $libssh2_cflags"
else
if test "$libssh2" = "yes" ; then
- feature_not_found "libssh2"
+ error_exit "libssh2 >= $min_libssh2_version required for
--enable-libssh2"
fi
libssh2=no
fi
--
1.8.1.4
- [Qemu-devel] [PATCH 04/11] qemu-iotests: A few more bdrv_pread/pwrite tests, (continued)
- [Qemu-devel] [PATCH 04/11] qemu-iotests: A few more bdrv_pread/pwrite tests, Stefan Hajnoczi, 2013/04/15
- [Qemu-devel] [PATCH 05/11] qemu-iotests: Add test for -drive options, Stefan Hajnoczi, 2013/04/15
- [Qemu-devel] [PATCH 07/11] ide: refuse WIN_READ_NATIVE_MAX on empty device, Stefan Hajnoczi, 2013/04/15
- [Qemu-devel] [PATCH 06/11] qemu-iotests: filter QEMU_PROG in 051.out, Stefan Hajnoczi, 2013/04/15
- [Qemu-devel] [PATCH 10/11] iotests: Add 'check -ssh' option to test Secure Shell block device., Stefan Hajnoczi, 2013/04/15
- [Qemu-devel] [PATCH 09/11] block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk., Stefan Hajnoczi, 2013/04/15
- [Qemu-devel] [PATCH 08/11] block: Add support for Secure Shell (ssh) block device., Stefan Hajnoczi, 2013/04/15
- [Qemu-devel] [PATCH 11/11] rbd: add an asynchronous flush, Stefan Hajnoczi, 2013/04/15
- [Qemu-devel] [PULL 00/11] Block patches, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 01/11] block: Introduce bdrv_writev_vmstate, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 01/11] block/ssh: Require libssh2 >= 1.2.8.,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 02/11] savevm: Implement block_writev_buffer(), Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 03/11] block: Introduce bdrv_pwritev() for qcow2_save_vmstate, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 02/11] sheepdog: add discard/trim support for sheepdog, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 03/11] sheepdog: use BDRV_SECTOR_SIZE, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 04/11] qemu-iotests: A few more bdrv_pread/pwrite tests, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 04/11] sheepdog: implement .bdrv_co_is_allocated(), Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 05/11] block: Disable driver-specific options for 1.5, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 05/11] qemu-iotests: Add test for -drive options, Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 06/11] rbd: Fix use after free in rbd_open(), Stefan Hajnoczi, 2013/04/26
- [Qemu-devel] [PATCH 06/11] qemu-iotests: filter QEMU_PROG in 051.out, Stefan Hajnoczi, 2013/04/26