render / rpms / qemu

Forked from rpms/qemu 9 months ago
Clone

Blame 0108-iscsi-look-for-pkg-config-file-too.patch

Paolo Bonzini 308236
From: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini 308236
Subject: [PATCH 3/6] iscsi: look for pkg-config file too
Paolo Bonzini 308236
Date: Tue,  5 Mar 2013 18:05:22 +0100
Paolo Bonzini 308236
Paolo Bonzini 308236
Due to library conflicts, Fedora will have to put libiscsi in
Paolo Bonzini 308236
/usr/lib/iscsi.  Simplify configuration by using a pkg-config
Paolo Bonzini 308236
file.  The Fedora package will distribute one, and the patch
Paolo Bonzini 308236
to add it has been sent to upstream libiscsi as well.
Paolo Bonzini 308236
Paolo Bonzini 308236
Cc: qemu-stable@nongnu.org
Paolo Bonzini 308236
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini 308236
---
Paolo Bonzini 308236
 configure | 8 +++++++-
Paolo Bonzini 308236
 1 file changed, 7 insertions(+), 1 deletion(-)
Paolo Bonzini 308236
Paolo Bonzini 308236
diff --git a/configure b/configure
Paolo Bonzini 308236
index 2f98c5a..a9a7c99 100755
Paolo Bonzini 308236
--- a/configure
Paolo Bonzini 308236
+++ b/configure
Paolo Bonzini 308236
@@ -2803,7 +2803,13 @@ if test "$libiscsi" != "no" ; then
Paolo Bonzini 308236
 #include <iscsi/iscsi.h>
Paolo Bonzini 308236
 int main(void) { iscsi_unmap_sync(NULL,0,0,0,NULL,0); return 0; }
Paolo Bonzini 308236
 EOF
Paolo Bonzini 308236
-  if compile_prog "" "-liscsi" ; then
Paolo Bonzini 308236
+  if $pkg_config --atleast-version=1.7.0 libiscsi --modversion >/dev/null 2>&1; then
Paolo Bonzini 308236
+    libiscsi="yes"
Paolo Bonzini 308236
+    libiscsi_cflags=$($pkg_config --cflags libiscsi 2>/dev/null)
Paolo Bonzini 308236
+    libiscsi_libs=$($pkg_config --libs libiscsi 2>/dev/null)
Paolo Bonzini 308236
+    CFLAGS="$CFLAGS $libiscsi_cflags"
Paolo Bonzini 308236
+    LIBS="$LIBS $libiscsi_libs"
Paolo Bonzini 308236
+  elif compile_prog "" "-liscsi" ; then
Paolo Bonzini 308236
     libiscsi="yes"
Paolo Bonzini 308236
     LIBS="$LIBS -liscsi"
Paolo Bonzini 308236
   else
Paolo Bonzini 308236
-- 
Paolo Bonzini 308236
1.8.1.2