[Mesa-dev] [PATCH] Adding -enable-egl-dri2 option. Happy Chinese Spring Festival!
Dan Nicholson
dbn.lists at gmail.com
Thu Feb 3 06:15:42 PST 2011
On Thu, Feb 3, 2011 at 5:26 AM, Arthur Zhu
<xiaoxiaomuyusajiangtian at gmail.com> wrote:
>
> Thanks your good suggestions.
>
> Arthur
>
>
> From 7034307045f1d334e25adf7f739c5144a9afcb46 Mon Sep 17 00:00:00 2001
> From: Arthur Zhu <xiaoxiaomuyusajiangtian at gmail.com>
> Date: Thu, 3 Feb 2011 21:12:04 +0800
> Subject: [PATCH] Adding -enable-egl-dri2 option.
>
> ---
> configure.ac | 26 ++++++++++++--------------
> 1 files changed, 12 insertions(+), 14 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 46938f4..bd50767 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1091,6 +1091,12 @@ if test "x$enable_egl" = xno; then
> AC_MSG_ERROR([cannot enable OpenVG without EGL])
> fi
> fi
> +
> +AC_ARG_ENABLE([egl-dri2],
> + [AS_HELP_STRING([--enable-egl-dri2],
> + [enable EGL egl-dri2 driver @<:@default=disabled@:>@])],
> + [enable_egl_dri2="$enableval"],
> + [enable_egl_dri2=no])
> if test "x$enable_egl" = xyes; then
> SRC_DIRS="$SRC_DIRS egl"
> EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread"
> @@ -1100,21 +1106,13 @@ if test "x$enable_egl" = xyes; then
> if test "$mesa_driver" = xlib -o "$mesa_driver" = dri; then
> EGL_DRIVERS_DIRS="glx"
> fi
> -
> - if test "$mesa_driver" = dri; then
> + if test "x$enable_egl_dri2" = xyes -a "$mesa_driver" = dri; then
> # build egl_dri2 when xcb-dri2 is available
> - PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes],
> - [have_xcb_dri2=yes],[have_xcb_dri2=no])
> - PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
> - [have_libudev=yes],[have_libudev=no])
> -
> - if test "$have_xcb_dri2" = yes; then
> - EGL_DRIVER_DRI2=dri2
> - DEFINES="$DEFINES -DHAVE_XCB_DRI2"
> - if test "$have_libudev" = yes; then
> - DEFINES="$DEFINES -DHAVE_LIBUDEV"
> - fi
> - fi
> + PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes])
> + EGL_DRIVER_DRI2=dri2
> + DEFINES="$DEFINES -DHAVE_XCB_DRI2"
> + PKG_CHECK_MODULES([LIBUDEV], [libudev > 150])
> + DEFINES="$DEFINES -DHAVE_LIBUDEV"
I didn't notice this the first time, but there are a couple changes of
the semantics. Now if you say --enable-egl-dri2, configure will fail
if you don't have XCB_DRI2. I think that's OK since the user has to
explicitly enable the option. However, now the LIBUDEV dependency is
unconditional, too. Is libudev required for egl-dri2?
--
Dan
More information about the mesa-dev
mailing list