From nobody Thu Nov 6 12:15:32 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540900218813542.9858828535466; Tue, 30 Oct 2018 04:50:18 -0700 (PDT) Received: from localhost ([::1]:52424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHSXJ-0001rL-ES for importer@patchew.org; Tue, 30 Oct 2018 07:50:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHS9r-0002mv-SN for qemu-devel@nongnu.org; Tue, 30 Oct 2018 07:26:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHS9h-0004wx-5q for qemu-devel@nongnu.org; Tue, 30 Oct 2018 07:25:54 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:36277) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gHS95-0003N3-Os; Tue, 30 Oct 2018 07:25:16 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MfYc4-1fbleG2Ssa-00g3MY; Tue, 30 Oct 2018 12:24:12 +0100 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MfYc4-1fbleG2Ssa-00g3MY; Tue, 30 Oct 2018 12:24:12 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Tue, 30 Oct 2018 12:23:30 +0100 Message-Id: <20181030112337.17973-14-laurent@vivier.eu> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181030112337.17973-1-laurent@vivier.eu> References: <20181030112337.17973-1-laurent@vivier.eu> X-Provags-ID: V03:K1:7fBwOV45VO0pIDxAfapM/ah0RhizImgZJxgvW5VAB+D0Q8q0Qjs 5+96auVkeKmjT68irIXPp395Iu9qoJkYtJcIqmumqdxcac6arB5JvBmaivSFXhYdIQfAn/B IdQPh6kULgZSvyn4xLfmcD6xkvdzjQD7wTrzQaFnj8DDTiu6skX3OaX0HNkr/1el05Ioo1n PEghlp0GRDR8B+FtI9jyA== X-UI-Out-Filterresults: notjunk:1;V01:K0:JFjVUsmZIcY=:6A+G8CXaCFLZaUJAAJZS9e N12OXqNNFERafHKukwqPjmBIy+w7VvO5UdezU+TkRXrcuOkplzUubU5JKhppnD8S0M71w/ScS Ik36JRtLoGSvtrN6Zv+TxxHat6lUzMmH7NoD5NPmrSyB3ujIoEKAVEJenYmDcAOhj1jyEh7tb DEEaFCx1w1RztjgDVD0ppXivcAOjGuJV3221XIHh94bdNTRcthUiopiCTeTvN82Yb3pcVk8UA VbgzjyAPSrPg+U6Q1BL0+Q/43mZkEAqhy5swU9H9xnUQXymv3c8QfvxRVPgc2gCOb8R9CJ6Y3 qaBBYAjLFkud8d1KU6Q1ghPu6FWTaqc0jOxcWxxUZUb5SKIiKD4Z8BCP1zqcRFnZXldBHBqLU 0YM0oSzbymNIKo4kYd/mOU1gz85w3PWzJB9IF6FhDOfU9ZnIWdhLkmz5HtccGelBdPlWa20of BUMH7rX6A6MLspGtcM11yM0EMwtjCFy1mg3pcDeWU+UNoEuJ4wADhHtT+nrYqJb1uEi9btwR7 EltaY9/WqqTfDaVGEBpeTH7tbKHaCKwiXcdD1pVi1s6jG60i0SPts0wpJzwHsomU3vFkviiFZ +oOwNxxAdzO14fUOJk/yPY1EEUFn8H/rsMi8NZWKbn1j8vPRV7VhwUjPP3P89kAIo2RoukKoc B4feq/mP7ox6KmjO5fnvpXWkL+y7FyfeVbJNZZGK7njxOB5+Pmi6i6OKnpQBcpo7Ovds= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.134 Subject: [Qemu-devel] [PULL v2 13/20] configure: Support pkg-config for zlib X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S. Tsirkin" , Jason Wang , Michael Tokarev , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Stefano Stabellini , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Michael Walle , Anthony Perard , xen-devel@lists.xenproject.org, Laurent Vivier , Thomas Huth , Fam Zheng , Eduardo Habkost , Stefan Weil , Riku Voipio , qemu-arm@nongnu.org, Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Kevin Wolf , Markus Armbruster , Laurent Vivier , Max Reitz , Igor Mammedov , Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Stefan Weil This is needed for builds with the mingw64-* packages from Cygwin, but also works for Linux. Move the zlib test also more to the end because users should get information on the really important missing packages (which also require zlib) first. Signed-off-by: Stefan Weil Reviewed-by: Stefan Hajnoczi Message-Id: <20180712192603.11599-1-sw@weilnetz.de> Signed-off-by: Laurent Vivier --- configure | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 1ee09bd112..a02df30dde 100755 --- a/configure +++ b/configure @@ -2151,23 +2151,6 @@ EOF fi fi =20 -######################################### -# zlib check - -if test "$zlib" !=3D "no" ; then - cat > $TMPC << EOF -#include -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=3D"$LIBS -lz" - ########################################## # lzo check =20 @@ -3479,6 +3462,29 @@ if ! compile_prog "$glib_cflags -Werror" "$glib_libs= " ; then fi fi =20 +######################################### +# zlib check + +if test "$zlib" !=3D "no" ; then + if $pkg_config --exists zlib; then + zlib_cflags=3D$($pkg_config --cflags zlib) + zlib_libs=3D$($pkg_config --libs zlib) + QEMU_CFLAGS=3D"$zlib_cflags $QEMU_CFLAGS" + LIBS=3D"$zlib_libs $LIBS" + else + cat > $TMPC << EOF +#include +int main(void) { zlibVersion(); return 0; } +EOF + if compile_prog "" "-lz" ; then + LIBS=3D"$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" =3D yes; then --=20 2.17.2