egl: Only enable GLX backend if X11 EGL platform is enabled
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 29 Nov 2012 20:11:13 +0000 (15:11 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 30 Nov 2012 16:08:03 +0000 (11:08 -0500)
We don't want to compile in a bunch of X11 dependencies in libEGL if
we can't run EGL on X11.

configure.ac

index 4fb454407b400d99ff4c8b33545c85b0a8f23c09..fc554dd4c03cb0cf1e2f5dd15e8f0cfa6122da6b 100644 (file)
@@ -1273,10 +1273,6 @@ if test "x$enable_egl" = xyes; then
 
     if test "$enable_static" != yes; then
         # build egl_glx when libGL is built
-        if test "x$enable_glx" = xyes; then
-           HAVE_EGL_DRIVER_GLX=1
-        fi
-
         PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
                           [have_libudev=yes],[have_libudev=no])
         if test "$have_libudev" = yes; then
@@ -1545,6 +1541,10 @@ for plat in $egl_platforms; do
 
        x11)
                PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 >= 1.8 xcb-xfixes])
+
+                if test "x$enable_glx" = xyes; then
+                        HAVE_EGL_DRIVER_GLX=1
+                fi
                ;;
 
        drm)