qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] configure: improve multiarch support for pkgconfig
@ 2015-04-09 21:36 John Snow
  2015-04-10 12:06 ` Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: John Snow @ 2015-04-09 21:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, John Snow, stefanha, pbonzini

This will improve the multi-arch compilation for hosts using gcc.
configurations using clang won't see an improvement, but also won't
see a regression.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 configure | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/configure b/configure
index 826d6fd..d27729a 100755
--- a/configure
+++ b/configure
@@ -1759,6 +1759,20 @@ if ! has "$pkg_config_exe"; then
 fi
 
 ##########################################
+# pkg-config multi-arch probe
+
+if $cc -print-multiarch >/dev/null 2>&1; then
+    mlibdir=$($cc -print-multiarch $QEMU_CFLAGS)
+fi
+if test -z "${mlibdir}"; then
+    mlibdir=$($cc --print-multi-os-directory $QEMU_CFLAGS)
+fi
+
+if [ -n "${mlibdir}" ] && [ -d "/usr/lib/${mlibdir}/pkgconfig" ]; then
+    export PKG_CONFIG_LIBDIR="/usr/lib/${mlibdir}/pkgconfig"
+fi
+
+##########################################
 # NPTL probe
 
 if test "$linux_user" = "yes"; then
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-10 14:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-09 21:36 [Qemu-devel] [PATCH] configure: improve multiarch support for pkgconfig John Snow
2015-04-10 12:06 ` Paolo Bonzini
2015-04-10 12:21 ` Stefan Hajnoczi
2015-04-10 12:55   ` Peter Maydell
2015-04-10 14:06     ` John Snow
2015-04-10 13:59   ` Gerd Hoffmann
2015-04-10 14:15     ` John Snow
2015-04-10 14:24       ` Gerd Hoffmann
2015-04-10 12:24 ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).