Received: from eggs.gnu.org ([2001:4830:134:3::10]:57496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTLWu-0005wa-S7 for qemu-devel@nongnu.org; Sun, 14 Sep 2014 21:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTLWq-0000qG-Iw for qemu-devel@nongnu.org; Sun, 14 Sep 2014 21:56:36 -0400 Received: from [59.151.112.132] (port=53060 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTLWq-0000pF-7W for qemu-devel@nongnu.org; Sun, 14 Sep 2014 21:56:32 -0400 From: Hu Tao Date: Mon, 15 Sep 2014 09:53:58 +0800 Message-ID: <1410746038-10488-1-git-send-email-hutao@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] configure: check for pixman-1 version List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann commit a93a3af9 introduces use of PIXMAN_TYPE_RGBA, but it's only available in pixman >=3D 0.21.8. If pixman doesn't meet the version requirement, qemu will fail to build with following message: /home/hutao/qemu/ui/qemu-pixman.c: In function =E2=80=98qemu_pixelformat_fr= om_pixman=E2=80=99: /home/hutao/qemu/ui/qemu-pixman.c:42: error: =E2=80=98PIXMAN_TYPE_RGBA=E2= =80=99 undeclared (first use in this function) /home/hutao/qemu/ui/qemu-pixman.c:42: error: (Each undeclared identifier is= reported only once /home/hutao/qemu/ui/qemu-pixman.c:42: error: for each function it appears i= n.) This patch fixes the problem by checking the pixman version. Reported-by: Andreas Gustafsson Signed-off-by: Hu Tao --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 961bf6f..1a9daa5 100755 --- a/configure +++ b/configure @@ -2737,7 +2737,7 @@ fi if test "$pixman" =3D ""; then if test "$want_tools" =3D "no" -a "$softmmu" =3D "no"; then pixman=3D"none" - elif $pkg_config pixman-1 > /dev/null 2>&1; then + elif $pkg_config --atleast-version=3D0.21.8 pixman-1 > /dev/null 2>&1; t= hen pixman=3D"system" else pixman=3D"internal" @@ -2753,11 +2753,12 @@ if test "$pixman" =3D "none"; then pixman_cflags=3D pixman_libs=3D elif test "$pixman" =3D "system"; then + # pixman version has been checked above pixman_cflags=3D`$pkg_config --cflags pixman-1` pixman_libs=3D`$pkg_config --libs pixman-1` else if test ! -d ${source_path}/pixman/pixman; then - error_exit "pixman not present. Your options:" \ + error_exit "pixman >=3D 0.21.8 not present. Your options:" \ " (1) Preferred: Install the pixman devel package (any recent" \ " distro should have packages as Xorg needs pixman too)." \ " (2) Fetch the pixman submodule, using:" \ --=20 1.8.0