From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWh9S-0005zu-IV for qemu-devel@nongnu.org; Fri, 19 Feb 2016 04:15:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWh9N-0003BR-Nx for qemu-devel@nongnu.org; Fri, 19 Feb 2016 04:15:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWh9N-0003B6-IF for qemu-devel@nongnu.org; Fri, 19 Feb 2016 04:14:57 -0500 From: Gerd Hoffmann Date: Fri, 19 Feb 2016 10:14:39 +0100 Message-Id: <1455873289-349-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1455873289-349-1-git-send-email-kraxel@redhat.com> References: <1455873289-349-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 02/12] configure: add dma-buf support detection. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: spice-devel@lists.freedesktop.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann Set CONFIG_OPENGL_DMABUF in case both mesa and libepoxy are new enough to have support for dma-buf import/export. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- configure | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 0aa249b..0c0472a 100755 --- a/configure +++ b/configure @@ -279,6 +279,7 @@ smartcard=3D"" libusb=3D"" usb_redir=3D"" opengl=3D"" +opengl_dmabuf=3D"no" zlib=3D"yes" lzo=3D"" snappy=3D"" @@ -3274,7 +3275,7 @@ libs_softmmu=3D"$libs_softmmu $fdt_libs" # opengl probe (for sdl2, gtk, milkymist-tmu2) =20 if test "$opengl" !=3D "no" ; then - opengl_pkgs=3D"epoxy" + opengl_pkgs=3D"epoxy libdrm gbm" if $pkg_config $opengl_pkgs x11; then opengl_cflags=3D"$($pkg_config --cflags $opengl_pkgs) $x11_cflags" opengl_libs=3D"$($pkg_config --libs $opengl_pkgs) $x11_libs" @@ -3292,6 +3293,18 @@ if test "$opengl" !=3D "no" ; then fi fi =20 +if test "$opengl" =3D "yes"; then + cat > $TMPC << EOF +#include +#ifndef EGL_MESA_image_dma_buf_export +# error mesa/epoxy lacks support for dmabufs (mesa 10.6+) +#endif +int main(void) { return 0; } +EOF + if compile_prog "" "" ; then + opengl_dmabuf=3Dyes + fi +fi =20 ########################################## # archipelago probe @@ -4752,6 +4765,7 @@ echo "smartcard support $smartcard" echo "libusb $libusb" echo "usb net redir $usb_redir" echo "OpenGL support $opengl" +echo "OpenGL dmabufs $opengl_dmabuf" echo "libiscsi support $libiscsi" echo "libnfs support $libnfs" echo "build guest agent $guest_agent" @@ -5050,6 +5064,7 @@ if test "$gtk" =3D "yes" ; then echo "CONFIG_GTK=3Dy" >> $config_host_mak echo "CONFIG_GTKABI=3D$gtkabi" >> $config_host_mak echo "GTK_CFLAGS=3D$gtk_cflags" >> $config_host_mak + echo "GTK_LIBS=3D$gtk_libs" >> $config_host_mak if test "$gtk_gl" =3D "yes" ; then echo "CONFIG_GTK_GL=3Dy" >> $config_host_mak fi @@ -5158,6 +5173,9 @@ if test "$opengl" =3D "yes" ; then echo "CONFIG_OPENGL=3Dy" >> $config_host_mak echo "OPENGL_CFLAGS=3D$opengl_cflags" >> $config_host_mak echo "OPENGL_LIBS=3D$opengl_libs" >> $config_host_mak + if test "$opengl_dmabuf" =3D "yes" ; then + echo "CONFIG_OPENGL_DMABUF=3Dy" >> $config_host_mak + fi fi =20 if test "$lzo" =3D "yes" ; then --=20 1.8.3.1