summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-10-30 15:49:55 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-10-30 15:49:55 +0000
commita2e002ff7913ce93aa0f7dbedd2123dce5f1a9cd (patch)
tree8898f7adcaa7d4a75d21286f918c1a32a7c93993 /configure
parent3f3285491dd52014852a56135c90e428c8b507ea (diff)
parent7b2b797cf0addac789ba858fdbd95c55128d72d5 (diff)
Merge remote-tracking branch 'remotes/vivier2/tags/qemu-trivial-for-3.1-pull-request' into staging
QEMU trivial patches collected between June and October 2018 (Thank you to Thomas Huth) v2: fix 32bit build with updated patch (v3) from Philippe Mathieu-Daudé built in a 32bit debian sid chroot # gpg: Signature made Tue 30 Oct 2018 11:23:01 GMT # gpg: using RSA key F30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/qemu-trivial-for-3.1-pull-request: milkymist-minimac2: Use qemu_log_mask(GUEST_ERROR) instead of error_report ppc: move at24c to its own CONFIG_ symbol hw/intc/gicv3: Remove useless parenthesis around DIV_ROUND_UP macro hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro tests/bios-tables-test: Remove an useless cast xen: Use the PCI_DEVICE macro qobject: Catch another straggler for use of qdict_put_str() configure: Support pkg-config for zlib tests: Fix typos in comments and help message (found by codespell) cpu.h: fix a typo in comment linux-user: fix comment s/atomic_write/atomic_set/ qemu-iotests: make 218 executable scripts/qemu.py: remove trailing quotes on docstring scripts/decodetree.py: remove unused imports docs/devel/testing.rst: add missing newlines after code block qemu-iotests: fix filename containing checks tests/tcg/README: fix location for lm32 tests memory.h: fix typos in comments vga_int: remove unused function protype configs/alpha: Remove unused CONFIG_PARALLEL_ISA switch Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure40
1 files changed, 23 insertions, 17 deletions
diff --git a/configure b/configure
index 1c473ce95b..a898e21c68 100755
--- a/configure
+++ b/configure
@@ -2151,23 +2151,6 @@ EOF
fi
fi
-#########################################
-# zlib check
-
-if test "$zlib" != "no" ; then
- cat > $TMPC << EOF
-#include <zlib.h>
-int main(void) { zlibVersion(); return 0; }
-EOF
- if compile_prog "" "-lz" ; then
- :
- else
- error_exit "zlib check failed" \
- "Make sure to have the zlib libs and headers installed."
- fi
-fi
-LIBS="$LIBS -lz"
-
##########################################
# lzo check
@@ -3479,6 +3462,29 @@ if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then
fi
fi
+#########################################
+# zlib check
+
+if test "$zlib" != "no" ; then
+ if $pkg_config --exists zlib; then
+ zlib_cflags=$($pkg_config --cflags zlib)
+ zlib_libs=$($pkg_config --libs zlib)
+ QEMU_CFLAGS="$zlib_cflags $QEMU_CFLAGS"
+ LIBS="$zlib_libs $LIBS"
+ else
+ cat > $TMPC << EOF
+#include <zlib.h>
+int main(void) { zlibVersion(); return 0; }
+EOF
+ if compile_prog "" "-lz" ; then
+ LIBS="$LIBS -lz"
+ else
+ error_exit "zlib check failed" \
+ "Make sure to have the zlib libs and headers installed."
+ fi
+ fi
+fi
+
##########################################
# SHA command probe for modules
if test "$modules" = yes; then