No subject
Sun Feb 6 21:13:14 PST 2011
0800<br>
Subject: [PATCH] Adding --enable-egl-dri2-x11&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 "x$enable_egl" =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. @<:@default=3Ddisabled@:&=
gt;@])],<br>+=A0=A0=A0 [enable_egl_dri2_x11=3D"$enableval"],<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. @<=
:@default=3Ddisabled@:>@])],<br>+=A0=A0=A0 [enable_egl_dri2_drm=3D"=
$enableval"],<br>+=A0=A0=A0 [enable_egl_dri2_drm=3Dno])<br>
+<br>=A0if test "x$enable_egl" =3D xyes; then<br>=A0=A0=A0=A0 SRC=
_DIRS=3D"$SRC_DIRS egl"<br>=A0=A0=A0=A0 EGL_LIB_DEPS=3D"$DLO=
PEN_LIBS -lpthread"<br>@@ -1100,20 +1114,14 @@ if test "x$enable_=
egl" =3D xyes; then<br>
=A0=A0=A0=A0=A0=A0=A0=A0 if test "$mesa_driver" =3D xlib -o "=
;$mesa_driver" =3D dri; then<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 E=
GL_DRIVERS_DIRS=3D"glx"<br>=A0=A0=A0=A0=A0=A0=A0=A0 fi<br>-<br>-=
=A0=A0=A0=A0=A0=A0=A0 if test "$mesa_driver" =3D dri; then<br>+=
=A0=A0=A0=A0=A0=A0=A0 if test "x$enable_egl_dri2_x11" =3D xyes -o=
"x$enable_egl_dri2_drm" =3D xyes -a "$mesa_driver" =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 > 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 "$have_xcb_dri2" =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"$DEFINES =
-DHAVE_XCB_DRI2"<br>
-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if test "$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"$DEFINES -DHAVE_LIBUDEV"<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"$DEFINES -DHAVE_XCB_DRI2"<br>+=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if test "x$enable_egl_dri2_drm"=
=3D xyes; then<br>+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CHECK=
_MODULES([LIBUDEV], [libudev > 150])<br>
+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEFINES=3D"$DEFINES -DH=
AVE_LIBUDEV"<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"><<a href=3D"=
mailto:krh at bitplanet.net">krh at bitplanet.net</a>></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 <<a href=
=3D"mailto:dbn.lists at gmail.com">dbn.lists at gmail.com</a>> wrote:<br>
> On Thu, Feb 3, 2011 at 5:26 AM, Arthur Zhu<br>
> <<a href=3D"mailto:xiaoxiaomuyusajiangtian at gmail.com">xiaoxiaomuyus=
ajiangtian at gmail.com</a>> wrote:<br>
>><br>
>> Thanks your good suggestions.<br>
>><br>
>> Arthur<br>
>><br>
>><br>
>> From 7034307045f1d334e25adf7f739c5144a9afcb46 Mon Sep 17 00:00:00 =
2001<br>
>> From: Arthur Zhu <<a href=3D"mailto:xiaoxiaomuyusajiangtian at gma=
il.com">xiaoxiaomuyusajiangtian at gmail.com</a>><br>
>> Date: Thu, 3 Feb 2011 21:12:04 +0800<br>
>> Subject: [PATCH] Adding -enable-egl-dri2 option.<br>
>><br>
>> ---<br>
>> =A0<a href=3D"http://configure.ac" target=3D"_blank">configure.ac<=
/a> |=A0=A0 26 ++++++++++++--------------<br>
>> =A01 files changed, 12 insertions(+), 14 deletions(-)<br>
>><br>
>> 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>
>> index 46938f4..bd50767 100644<br>
>> --- a/<a href=3D"http://configure.ac" target=3D"_blank">configure.=
ac</a><br>
>> +++ b/<a href=3D"http://configure.ac" target=3D"_blank">configure.=
ac</a><br>
>> @@ -1091,6 +1091,12 @@ if test "x$enable_egl" =3D xno; t=
hen<br>
>> =A0=A0=A0=A0=A0=A0=A0=A0 AC_MSG_ERROR([cannot enable OpenVG withou=
t EGL])<br>
>> =A0=A0=A0=A0 fi<br>
>> =A0fi<br>
>> +<br>
>> +AC_ARG_ENABLE([egl-dri2],<br>
>> +=A0=A0=A0 [AS_HELP_STRING([--enable-egl-dri2],<br>
>> +=A0=A0=A0=A0=A0=A0=A0 [enable EGL egl-dri2 driver @<:@default=
=3Ddisabled@:>@])],<br>
>> +=A0=A0=A0 [enable_egl_dri2=3D"$enableval"],<br>
>> +=A0=A0=A0 [enable_egl_dri2=3Dno])<br>
>> =A0if test "x$enable_egl" =3D xyes; then<br>
>> =A0=A0=A0=A0 SRC_DIRS=3D"$SRC_DIRS egl"<br>
>> =A0=A0=A0=A0 EGL_LIB_DEPS=3D"$DLOPEN_LIBS -lpthread"<br>
>> @@ -1100,21 +1106,13 @@ if test "x$enable_egl" =3D xyes;=
then<br>
>> =A0=A0=A0=A0=A0=A0=A0=A0 if test "$mesa_driver" =3D xlib=
-o "$mesa_driver" =3D dri; then<br>
>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 EGL_DRIVERS_DIRS=3D"glx&=
quot;<br>
>> =A0=A0=A0=A0=A0=A0=A0=A0 fi<br>
>> -<br>
>> -=A0=A0=A0=A0=A0=A0=A0 if test "$mesa_driver" =3D dri; t=
hen<br>
>> +=A0=A0=A0=A0=A0=A0=A0 if test "x$enable_egl_dri2" =3D x=
yes -a "$mesa_driver" =3D dri; then<br>
>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 # build egl_dri2 when xcb-dri=
2 is available<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_x=
cb_dri2=3Dyes],[have_xcb_dri2=3Dno])<br>
>> -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CHECK_MODULES([LIBUDEV], [l=
ibudev > 150],<br>
>> -=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>
>> -<br>
>> -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if test "$have_xcb_dri2&qu=
ot; =3D yes; then<br>
>> -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 EGL_DRIVER_DRI2=3Dd=
ri2<br>
>> -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEFINES=3D"$DE=
FINES -DHAVE_XCB_DRI2"<br>
>> -=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if test "$have=
_libudev" =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"$DEFINES -DHAVE_LIBUDEV"<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 fi<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 EGL_DRIVER_DRI2=3Ddri2<br>
>> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEFINES=3D"$DEFINES -DHAVE=
_XCB_DRI2"<br>
>> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 PKG_CHECK_MODULES([LIBUDEV], [l=
ibudev > 150])<br>
>> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 DEFINES=3D"$DEFINES -DHAVE=
_LIBUDEV"<br>
><br>
> I didn't notice this the first time, but there are a couple change=
s of<br>
> the semantics. Now if you say --enable-egl-dri2, configure will fail<b=
r>
> if you don't have XCB_DRI2. I think that's OK since the user h=
as to<br>
> explicitly enable the option.<br>
<br>
</div></div>In fact, I think that's better because we'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>
> However, now the LIBUDEV dependency is<br>
> unconditional, too. Is libudev required for egl-dri2?<br>
<br>
</div>It'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