From patchwork Mon Mar 16 09:10:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 450433 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9AAD51400B7 for ; Mon, 16 Mar 2015 20:11:17 +1100 (AEDT) Received: from localhost ([::1]:47971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXR3K-00021c-Aa for incoming@patchwork.ozlabs.org; Mon, 16 Mar 2015 05:11:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXR33-0001WW-9i for qemu-devel@nongnu.org; Mon, 16 Mar 2015 05:10:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXR2x-0002pE-Vh for qemu-devel@nongnu.org; Mon, 16 Mar 2015 05:10:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXR2x-0002p8-Pr for qemu-devel@nongnu.org; Mon, 16 Mar 2015 05:10:51 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 695048F31F for ; Mon, 16 Mar 2015 09:10:51 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-53.ams2.redhat.com [10.36.116.53]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2G9AoFf016183; Mon, 16 Mar 2015 05:10:50 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 8F1AB808B5; Mon, 16 Mar 2015 10:10:49 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 16 Mar 2015 10:10:37 +0100 Message-Id: <1426497037-18209-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , quintela@redhat.com Subject: [Qemu-devel] [PATCH for-2.3] opengl: fix configure test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Re-add the glx compile test to configure. We can't use pkg-config to probe for glx, and as long as milkymist-tmu2 privately uses glx (due to opengl infrastructure in qemu not being ready yet) we must continue to test for glx to avoid build failures. Reported-by: Juan Quintela Signed-off-by: Gerd Hoffmann Reviewed-by: Max Reitz --- configure | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/configure b/configure index b858756..f74a6fd 100755 --- a/configure +++ b/configure @@ -3119,9 +3119,24 @@ libs_softmmu="$libs_softmmu $fdt_libs" ########################################## # opengl probe (for sdl2, milkymist-tmu2) + +# GLX probe, used by milkymist-tmu2 +# this is temporary, code will be switched to egl mid-term. +cat > $TMPC << EOF +#include +#include +#include +int main(void) { glBegin(0); glXQueryVersion(0,0,0); return 0; } +EOF +if compile_prog "" "-lGL -lX11" ; then + have_glx=yes +else + have_glx=no +fi + if test "$opengl" != "no" ; then - opengl_pkgs="gl glx" - if $pkg_config $opengl_pkgs x11; then + opengl_pkgs="gl" + if $pkg_config $opengl_pkgs x11 && test "$have_glx" = "yes"; then opengl_cflags="$($pkg_config --cflags $opengl_pkgs) $x11_cflags" opengl_libs="$($pkg_config --libs $opengl_pkgs) $x11_libs" opengl=yes