From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgXz5-0005uX-Q5 for qemu-devel@nongnu.org; Fri, 10 Apr 2015 08:24:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgXz0-0005ri-Tv for qemu-devel@nongnu.org; Fri, 10 Apr 2015 08:24:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgXz0-0005rU-KU for qemu-devel@nongnu.org; Fri, 10 Apr 2015 08:24:26 -0400 Date: Fri, 10 Apr 2015 13:24:20 +0100 From: "Daniel P. Berrange" Message-ID: <20150410122420.GG10368@redhat.com> References: <1428615372-615-1-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1428615372-615-1-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH] configure: improve multiarch support for pkgconfig Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, stefanha@redhat.com, pbonzini@redhat.com On Thu, Apr 09, 2015 at 05:36:12PM -0400, John Snow wrote: > 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 > --- > 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 IIUC, this overrides any setting of PKG_CONFIG_LIBDIR that the developer may have set themselves before running configure. Please only set this, if PKG_CONFIG_LIBDIR is not already present in the environment. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|