From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NStZJ-00016W-8J for qemu-devel@nongnu.org; Thu, 07 Jan 2010 09:42:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NStZC-0000zA-56 for qemu-devel@nongnu.org; Thu, 07 Jan 2010 09:42:30 -0500 Received: from [199.232.76.173] (port=39726 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NStZB-0000yw-UO for qemu-devel@nongnu.org; Thu, 07 Jan 2010 09:42:25 -0500 Received: from mx20.gnu.org ([199.232.41.8]:9431) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NStZB-0007yd-LI for qemu-devel@nongnu.org; Thu, 07 Jan 2010 09:42:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NStZA-0000F8-Uh for qemu-devel@nongnu.org; Thu, 07 Jan 2010 09:42:25 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o07EgKQx029268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 7 Jan 2010 09:42:22 -0500 Received: from localhost.localdomain (vpn2-11-178.ams2.redhat.com [10.36.11.178]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o07EgIoT005391 for ; Thu, 7 Jan 2010 09:42:20 -0500 From: Paolo Bonzini Date: Thu, 7 Jan 2010 15:42:16 +0100 Message-Id: <1262875338-4104-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1262875338-4104-1-git-send-email-pbonzini@redhat.com> References: <1262875338-4104-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/3] use cross-prefix for pkg-config List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Since pkg-config can give different output for different targets, it should be tried with the cross-compilation prefix first. (Note that the autoconf macro for pkg-config uses AC_PATH_TOOL, which also tries to add the prefix). Signed-off-by: Paolo Bonzini --- configure | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 18aed43..a6acff2 100755 --- a/configure +++ b/configure @@ -965,6 +965,15 @@ EOF fi ########################################## +# pkgconfig probe + +pkgconfig="${cross_prefix}pkg-config" +if ! test -x "$(which $pkgconfig 2>/dev/null)"; then + # hosed installation, hope for the best + pkgconfig=pkg-config +fi + +########################################## # Sparse probe if test "$sparse" != "no" ; then if test -x "$(which cgcc 2>/dev/null)"; then @@ -1047,8 +1056,8 @@ if test "$vnc_tls" != "no" ; then #include 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" @@ -1320,7 +1329,7 @@ if test "$check_utests" != "no" ; then #include 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" @@ -1339,8 +1348,8 @@ if test "$bluez" != "no" ; then #include 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" -- 1.6.5.2