diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-02-22 18:14:28 +0100 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-04-02 10:52:33 -0500 |
commit | 0c918dd600fa6b3c7494b3dad743464242948a7a (patch) | |
tree | 6e47490ccd1fece1614e4d410c024f6d98b683fa | |
parent | a8b090ef08872dad68acb2afbb0f81c44c4132e6 (diff) | |
download | qemu-0c918dd600fa6b3c7494b3dad743464242948a7a.tar.gz |
iscsi: look for pkg-config file too
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>
(cherry picked from commit 3c33ea9640758bb625e110a77673e5abfd184e54)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rwxr-xr-x | configure | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -2759,7 +2759,13 @@ if test "$libiscsi" != "no" ; then #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 |