2013-04-21 00:14:03 +00:00
|
|
|
From 868600d91f1c165cdd91f293870af0ca351c6025 Mon Sep 17 00:00:00 2001
|
2013-03-11 16:25:17 +00:00
|
|
|
From: Paolo Bonzini <pbonzini@redhat.com>
|
2013-04-21 00:14:03 +00:00
|
|
|
Date: Fri, 22 Feb 2013 18:14:28 +0100
|
|
|
|
Subject: [PATCH] iscsi: look for pkg-config file too
|
2013-03-11 16:25:17 +00:00
|
|
|
|
|
|
|
Due to library conflicts, Fedora will have to put libiscsi in
|
|
|
|
/usr/lib/iscsi. Simplify configuration by using a pkg-config
|
|
|
|
file. The Fedora package will distribute one, and the patch
|
|
|
|
to add it has been sent to upstream libiscsi as well.
|
|
|
|
|
|
|
|
Cc: qemu-stable@nongnu.org
|
|
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
2013-04-21 00:14:03 +00:00
|
|
|
(cherry picked from commit 3c33ea9640758bb625e110a77673e5abfd184e54)
|
2013-03-11 16:25:17 +00:00
|
|
|
---
|
|
|
|
configure | 8 +++++++-
|
|
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/configure b/configure
|
2013-04-21 00:14:03 +00:00
|
|
|
index 6af2806..12d506c 100755
|
2013-03-11 16:25:17 +00:00
|
|
|
--- a/configure
|
|
|
|
+++ b/configure
|
2013-04-21 00:14:03 +00:00
|
|
|
@@ -2632,7 +2632,13 @@ if test "$libiscsi" != "no" ; then
|
2013-03-11 16:25:17 +00:00
|
|
|
#include <iscsi/iscsi.h>
|
|
|
|
int main(void) { iscsi_unmap_sync(NULL,0,0,0,NULL,0); return 0; }
|
|
|
|
EOF
|
|
|
|
- if compile_prog "" "-liscsi" ; then
|
|
|
|
+ if $pkg_config --atleast-version=1.7.0 libiscsi --modversion >/dev/null 2>&1; then
|
|
|
|
+ libiscsi="yes"
|
|
|
|
+ libiscsi_cflags=$($pkg_config --cflags libiscsi 2>/dev/null)
|
|
|
|
+ libiscsi_libs=$($pkg_config --libs libiscsi 2>/dev/null)
|
|
|
|
+ CFLAGS="$CFLAGS $libiscsi_cflags"
|
|
|
|
+ LIBS="$LIBS $libiscsi_libs"
|
|
|
|
+ elif compile_prog "" "-liscsi" ; then
|
|
|
|
libiscsi="yes"
|
|
|
|
LIBS="$LIBS -liscsi"
|
|
|
|
else
|