[Mesa-dev] [PATCH] Adding -enable-egl-dri2 option. Happy Chinese Spring Festival!

Arthur Zhu xiaoxiaomuyusajiangtian at gmail.com
Tue Feb 1 05:41:48 PST 2011


From: Arthur Zhu <arthur.zhuyong at gmail.com>

---
 configure.ac |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index 46938f4..8a429a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1100,23 +1100,24 @@ if test "x$enable_egl" = xyes; then
         if test "$mesa_driver" = xlib -o "$mesa_driver" = dri; then
             EGL_DRIVERS_DIRS="glx"
         fi
+    fi
+fi
 
+AC_ARG_ENABLE([egl-dri2],
+    [AS_HELP_STRING([--enable-egl-dri2],
+        [enable egl-dri2 driver. @<:@default=disabled@:>@])],
+    [enable_egl_dri2="$enableval"],
+    [enable_egl_dri2=no])
+if test "x$enable_egl_dri2" = xyes; then
+    if test "$enable_static" != yes; then
         if test "$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
-	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"
+        fi
         EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS $EGL_DRIVER_DRI2"
     fi
 fi
-- 
1.7.0.4



More information about the mesa-dev mailing list