No subject


Sun Feb 6 21:13:14 PST 2011


0800<br>
Subject: [PATCH] Adding --enable-egl-dri2-x11&amp;drm option.<br><br>---<br=
>=A0<a href=3D"http://configure.ac">configure.ac</a> |=A0=A0 34 +++++++++++=
++++++++++-------------<br>=A01 files changed, 21 insertions(+), 13 deletio=
ns(-)<br>
<br>diff --git a/<a href=3D"http://configure.ac">configure.ac</a> b/<a href=
=3D"http://configure.ac">configure.ac</a><br>index 46938f4..18c2731 100644<=
br>--- a/<a href=3D"http://configure.ac">configure.ac</a><br>+++ b/<a href=
=3D"http://configure.ac">configure.ac</a><br>
@@ -1091,6 +1091,20 @@ if test &quot;x$enable_egl&quot; =3D xno; then<br>=
=A0=A0=A0=A0=A0=A0=A0=A0 AC_MSG_ERROR([cannot enable OpenVG without EGL])<b=
r>=A0=A0=A0=A0 fi<br>=A0fi<br>+<br>+AC_ARG_ENABLE([egl-dri2-x11],<br>+=A0=
=A0=A0 [AS_HELP_STRING([--enable-egl-dri2-x11],<br>
+=A0=A0=A0=A0=A0=A0=A0 [enable EGL egl-dri2-x11 driver, <br>+=A0=A0=A0=A0=
=A0=A0=A0 Just omits libudev package checking. @&lt;:@default=3Ddisabled@:&=
gt;@])],<br>+=A0=A0=A0 [enable_egl_dri2_x11=3D&quot;$enableval&quot;],<br>+=
=A0=A0=A0 [enable_egl_dri2_x11=3Dno])<br>+<br>
+AC_ARG_ENABLE([egl-dri2-drm],<br>+=A0=A0=A0 [AS_HELP_STRING([--enable-egl-=
dri2-drm],<br>+=A0=A0=A0=A0=A0=A0=A0 [enable EGL egl-dri2-drm driver. @&lt;=
:@default=3Ddisabled@:&gt;@])],<br>+=A0=A0=A0 [enable_egl_dri2_drm=3D&quot;=
$enableval&quot;],<br>+=A0=A0=A0 [enable_egl_dri2_drm=3Dno])<br>
+<br>=A0if test &quot;x$enable_egl&quot; =3D xyes; then<br>=A0=A0=A0=A0 SRC=
_DIRS=3D&quot;$SRC_DIRS egl&quot;<br>=A0=A0=A0=A0 EGL_LIB_DEPS=3D&quot;$DLO=
PEN_LIBS -lpthread&quot;<br>@@ -1100,20 +1114,14 @@ if test &quot;x$enable_=
egl&quot; =3D xyes; then<br>
=A0=A0=A0=A0=A0=A0=A0=A0 if test &quot;$mesa_driver&quot; =3D xlib -o &quot=
;$mesa_driver&quot; =3D dri; then<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 E=
GL_DRIVERS_DIRS=3D&quot;glx&quot;<br>=A0=A0=A0=A0=A0=A0=A0=A0 fi<br>-<br>-=
=A0=A0=A0=A0=A0=A0=A0 if test &quot;$mesa_driver&quot; =3D dri; then<br>+=
=A0=A0=A0=A0=A0=A0=A0 if test &quot;x$enable_egl_dri2_x11&quot; =3D xyes -o=
 &quot;x$enable_egl_dri2_drm&quot; =3D xyes -a &quot;$mesa_driver&quot; =3D=
 dri; then<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 # build egl_dri2 when xcb-dri2 is avai=
lable<br>-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CHECK_MODULES([XCB_DRI2], [=
x11-xcb xcb-dri2 xcb-xfixes],<br>-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=
=A0 =A0=A0=A0 =A0 [have_xcb_dri2=3Dyes],[have_xcb_dri2=3Dno])<br>-=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CHECK_MODULES([LIBUDEV], [libudev &gt; 150],<b=
r>
-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0 [have_libudev=3D=
yes],[have_libudev=3Dno])<br>-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <br>-=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0 if test &quot;$have_xcb_dri2&quot; =3D yes; the=
n<br>-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 EGL_DRIVER_DRI2=3Ddri2<=
br>-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEFINES=3D&quot;$DEFINES =
-DHAVE_XCB_DRI2&quot;<br>
-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if test &quot;$have_libudev&=
quot; =3D yes; then<br>-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0 DEFINES=3D&quot;$DEFINES -DHAVE_LIBUDEV&quot;<br>-=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0 fi<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CH=
ECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes])<br>
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 EGL_DRIVER_DRI2=3Ddri2<br>+=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0 DEFINES=3D&quot;$DEFINES -DHAVE_XCB_DRI2&quot;<br>+=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if test &quot;x$enable_egl_dri2_drm&quot;=
 =3D xyes; then<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CHECK=
_MODULES([LIBUDEV], [libudev &gt; 150])<br>
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEFINES=3D&quot;$DEFINES -DH=
AVE_LIBUDEV&quot;<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fi<br>=A0=A0=A0=
=A0 fi<br>=A0<br>-- <br>1.7.0.4<br><br><br>Arthur<br><br><br><div class=3D"=
gmail_quote">2011/2/3 Kristian H=F8gsberg <span dir=3D"ltr">&lt;<a href=3D"=
mailto:krh at bitplanet.net">krh at bitplanet.net</a>&gt;</span><br>
<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><=
div class=3D"h5">On Thu, Feb 3, 2011 at 9:15 AM, Dan Nicholson &lt;<a href=
=3D"mailto:dbn.lists at gmail.com">dbn.lists at gmail.com</a>&gt; wrote:<br>

&gt; On Thu, Feb 3, 2011 at 5:26 AM, Arthur Zhu<br>
&gt; &lt;<a href=3D"mailto:xiaoxiaomuyusajiangtian at gmail.com">xiaoxiaomuyus=
ajiangtian at gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Thanks your good suggestions.<br>
&gt;&gt;<br>
&gt;&gt; Arthur<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; From 7034307045f1d334e25adf7f739c5144a9afcb46 Mon Sep 17 00:00:00 =
2001<br>
&gt;&gt; From: Arthur Zhu &lt;<a href=3D"mailto:xiaoxiaomuyusajiangtian at gma=
il.com">xiaoxiaomuyusajiangtian at gmail.com</a>&gt;<br>
&gt;&gt; Date: Thu, 3 Feb 2011 21:12:04 +0800<br>
&gt;&gt; Subject: [PATCH] Adding -enable-egl-dri2 option.<br>
&gt;&gt;<br>
&gt;&gt; ---<br>
&gt;&gt; =A0<a href=3D"http://configure.ac" target=3D"_blank">configure.ac<=
/a> |=A0=A0 26 ++++++++++++--------------<br>
&gt;&gt; =A01 files changed, 12 insertions(+), 14 deletions(-)<br>
&gt;&gt;<br>
&gt;&gt; diff --git a/<a href=3D"http://configure.ac" target=3D"_blank">con=
figure.ac</a> b/<a href=3D"http://configure.ac" target=3D"_blank">configure=
.ac</a><br>
&gt;&gt; index 46938f4..bd50767 100644<br>
&gt;&gt; --- a/<a href=3D"http://configure.ac" target=3D"_blank">configure.=
ac</a><br>
&gt;&gt; +++ b/<a href=3D"http://configure.ac" target=3D"_blank">configure.=
ac</a><br>
&gt;&gt; @@ -1091,6 +1091,12 @@ if test &quot;x$enable_egl&quot; =3D xno; t=
hen<br>
&gt;&gt; =A0=A0=A0=A0=A0=A0=A0=A0 AC_MSG_ERROR([cannot enable OpenVG withou=
t EGL])<br>
&gt;&gt; =A0=A0=A0=A0 fi<br>
&gt;&gt; =A0fi<br>
&gt;&gt; +<br>
&gt;&gt; +AC_ARG_ENABLE([egl-dri2],<br>
&gt;&gt; +=A0=A0=A0 [AS_HELP_STRING([--enable-egl-dri2],<br>
&gt;&gt; +=A0=A0=A0=A0=A0=A0=A0 [enable EGL egl-dri2 driver @&lt;:@default=
=3Ddisabled@:&gt;@])],<br>
&gt;&gt; +=A0=A0=A0 [enable_egl_dri2=3D&quot;$enableval&quot;],<br>
&gt;&gt; +=A0=A0=A0 [enable_egl_dri2=3Dno])<br>
&gt;&gt; =A0if test &quot;x$enable_egl&quot; =3D xyes; then<br>
&gt;&gt; =A0=A0=A0=A0 SRC_DIRS=3D&quot;$SRC_DIRS egl&quot;<br>
&gt;&gt; =A0=A0=A0=A0 EGL_LIB_DEPS=3D&quot;$DLOPEN_LIBS -lpthread&quot;<br>
&gt;&gt; @@ -1100,21 +1106,13 @@ if test &quot;x$enable_egl&quot; =3D xyes;=
 then<br>
&gt;&gt; =A0=A0=A0=A0=A0=A0=A0=A0 if test &quot;$mesa_driver&quot; =3D xlib=
 -o &quot;$mesa_driver&quot; =3D dri; then<br>
&gt;&gt; =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 EGL_DRIVERS_DIRS=3D&quot;glx&=
quot;<br>
&gt;&gt; =A0=A0=A0=A0=A0=A0=A0=A0 fi<br>
&gt;&gt; -<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0 if test &quot;$mesa_driver&quot; =3D dri; t=
hen<br>
&gt;&gt; +=A0=A0=A0=A0=A0=A0=A0 if test &quot;x$enable_egl_dri2&quot; =3D x=
yes -a &quot;$mesa_driver&quot; =3D dri; then<br>
&gt;&gt; =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 # build egl_dri2 when xcb-dri=
2 is available<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CHECK_MODULES([XCB_DRI2], [=
x11-xcb xcb-dri2 xcb-xfixes],<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0 [have_x=
cb_dri2=3Dyes],[have_xcb_dri2=3Dno])<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CHECK_MODULES([LIBUDEV], [l=
ibudev &gt; 150],<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0 [have_l=
ibudev=3Dyes],[have_libudev=3Dno])<br>
&gt;&gt; -<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if test &quot;$have_xcb_dri2&qu=
ot; =3D yes; then<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 EGL_DRIVER_DRI2=3Dd=
ri2<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEFINES=3D&quot;$DE=
FINES -DHAVE_XCB_DRI2&quot;<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if test &quot;$have=
_libudev&quot; =3D yes; then<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEFINES=
=3D&quot;$DEFINES -DHAVE_LIBUDEV&quot;<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fi<br>
&gt;&gt; -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 fi<br>
&gt;&gt; +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CHECK_MODULES([XCB_DRI2], [=
x11-xcb xcb-dri2 xcb-xfixes])<br>
&gt;&gt; +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 EGL_DRIVER_DRI2=3Ddri2<br>
&gt;&gt; +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEFINES=3D&quot;$DEFINES -DHAVE=
_XCB_DRI2&quot;<br>
&gt;&gt; +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CHECK_MODULES([LIBUDEV], [l=
ibudev &gt; 150])<br>
&gt;&gt; +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEFINES=3D&quot;$DEFINES -DHAVE=
_LIBUDEV&quot;<br>
&gt;<br>
&gt; I didn&#39;t notice this the first time, but there are a couple change=
s of<br>
&gt; the semantics. Now if you say --enable-egl-dri2, configure will fail<b=
r>
&gt; if you don&#39;t have XCB_DRI2. I think that&#39;s OK since the user h=
as to<br>
&gt; explicitly enable the option.<br>
<br>
</div></div>In fact, I think that&#39;s better because we&#39;ve had proble=
ms in the past<br>
with egl_dri2 not working on X11 because configure silently failed to<br>
find the xcb devel headers. =A0Having an option to explicitly request<br>
that and fail it not available is very useful.<br>
<div class=3D"im"><br>
&gt; However, now the LIBUDEV dependency is<br>
&gt; unconditional, too. Is libudev required for egl-dri2?<br>
<br>
</div>It&#39;s required for drm-only (X-less) functionality of egl-dri2. =
=A0I<br>
think it makes sense to split this option into --enable-egl-dri2-x11<br>
and --enable-egl-dri2-drm, and then check for xcb and udev<br>
respectively.<br>
<font color=3D"#888888"><br>
Kristian<br>
</font></blockquote></div><br>

--90e6ba53a502389a87049baaeb97--


More information about the wayland-devel mailing list