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 <js...@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