summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPaolo Bonzini2010-01-13 09:52:53 +0100
committerAnthony Liguori2010-01-14 00:14:14 +0100
commitf91672e56467532e2eea4ba3d0e903af17f1ab9d (patch)
treef541e09a04189d9eb9a6e6ef9d4b17b177e1abdf /configure
parentpcnet: remove dead nested assignment, spotted by clang (diff)
downloadqemu-f91672e56467532e2eea4ba3d0e903af17f1ab9d.tar.gz
qemu-f91672e56467532e2eea4ba3d0e903af17f1ab9d.tar.xz
qemu-f91672e56467532e2eea4ba3d0e903af17f1ab9d.zip
use cross-prefix for pkgconfig
Since pkgconfig can give different output for different targets, it should be tried with the cross-compilation prefix first. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 14 insertions, 5 deletions
diff --git a/configure b/configure
index 1ddb3a119a..a287efaec9 100755
--- a/configure
+++ b/configure
@@ -966,6 +966,15 @@ EOF
fi
##########################################
+# pkgconfig probe
+
+pkgconfig="${cross_prefix}pkg-config"
+if ! test -x "$(which $pkgconfig 2>/dev/null)"; then
+ # likely not cross compiling, or hope for the best
+ pkgconfig=pkg-config
+fi
+
+##########################################
# Sparse probe
if test "$sparse" != "no" ; then
if test -x "$(which cgcc 2>/dev/null)"; then
@@ -1048,8 +1057,8 @@ if test "$vnc_tls" != "no" ; then
#include <gnutls/gnutls.h>
int main(void) { gnutls_session_t s; gnutls_init(&s, GNUTLS_SERVER); return 0; }
EOF
- vnc_tls_cflags=`pkg-config --cflags gnutls 2> /dev/null`
- vnc_tls_libs=`pkg-config --libs gnutls 2> /dev/null`
+ vnc_tls_cflags=`$pkgconfig --cflags gnutls 2> /dev/null`
+ vnc_tls_libs=`$pkgconfig --libs gnutls 2> /dev/null`
if compile_prog "$vnc_tls_cflags" "$vnc_tls_libs" ; then
vnc_tls=yes
libs_softmmu="$vnc_tls_libs $libs_softmmu"
@@ -1321,7 +1330,7 @@ if test "$check_utests" != "no" ; then
#include <check.h>
int main(void) { suite_create("qemu test"); return 0; }
EOF
- check_libs=`pkg-config --libs check`
+ check_libs=`$pkgconfig --libs check`
if compile_prog "" $check_libs ; then
check_utests=yes
libs_tools="$check_libs $libs_tools"
@@ -1340,8 +1349,8 @@ if test "$bluez" != "no" ; then
#include <bluetooth/bluetooth.h>
int main(void) { return bt_error(0); }
EOF
- bluez_cflags=`pkg-config --cflags bluez 2> /dev/null`
- bluez_libs=`pkg-config --libs bluez 2> /dev/null`
+ bluez_cflags=`$pkgconfig --cflags bluez 2> /dev/null`
+ bluez_libs=`$pkgconfig --libs bluez 2> /dev/null`
if compile_prog "$bluez_cflags" "$bluez_libs" ; then
bluez=yes
libs_softmmu="$bluez_libs $libs_softmmu"