if test "$have_libudev" = yes; then
DEFINES="$DEFINES -DHAVE_LIBUDEV"
fi
+
if test "x$enable_dri" = xyes; 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])
- if test "$have_xcb_dri2" = yes; then
- HAVE_EGL_DRIVER_DRI2=1
- # workaround a bug in xcb-dri2 generated by xcb-proto 1.6
- save_LIBS="$LIBS"
- AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [],
- [DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"])
- LIBS="$save_LIBS"
- fi
+ HAVE_EGL_DRIVER_DRI2=1
fi
fi
AC_SUBST([VG_LIB_DEPS])
AC_SUBST([EGL_CLIENT_APIS])
+dnl
+dnl EGL Platforms configuration
+dnl
AC_ARG_WITH([egl-platforms],
[AS_HELP_STRING([--with-egl-platforms@<:@=DIRS...@:>@],
[comma delimited native platforms libEGL supports, e.g.
AC_MSG_ERROR([cannot build egl state tracker without EGL library])
fi
-# verify the requested driver directories exist
+# Do per-EGL platform setups and checks
egl_platforms=`IFS=', '; echo $with_egl_platforms`
for plat in $egl_platforms; do
- test -d "$srcdir/src/gallium/state_trackers/egl/$plat" || \
- AC_MSG_ERROR([EGL platform '$plat' does not exist])
- if test "$plat" = "fbdev"; then
- GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/fbdev"
- fi
- if test "$plat" = "null"; then
- GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null"
- fi
- if test "$plat" = "wayland"; then
+ case "$plat" in
+ fbdev|null)
+ GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/$plat"
+ ;;
+
+ wayland)
PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server],, \
[AC_MSG_ERROR([cannot find libwayland-client])])
- GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
+ GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
+
+ m4_ifdef([WAYLAND_SCANNER_RULES],
+ [WAYLAND_SCANNER_RULES(['$(top_srcdir)/src/egl/wayland/wayland-drm/protocol'])])
+ ;;
+
+ x11)
+ PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes])
+ # workaround a bug in xcb-dri2 generated by xcb-proto 1.6
+ save_LIBS="$LIBS"
+ AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [],
+ [DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"])
+ LIBS="$save_LIBS"
+ ;;
+
+ drm)
+ test "x$enable_gbm" = "xno" &&
+ AC_MSG_ERROR([EGL platform drm needs gbm])
+ ;;
+
+ android|gdi)
+ ;;
+
+ *)
+ AC_MSG_ERROR([EGL platform '$plat' does not exist])
+ ;;
+ esac
- m4_ifdef([WAYLAND_SCANNER_RULES],
- [WAYLAND_SCANNER_RULES(['$(top_srcdir)/src/egl/wayland/wayland-drm/protocol'])])
- fi
- if test "$plat" = "drm" && test "x$enable_gbm" = "xno"; then
- AC_MSG_ERROR([EGL platform drm needs gbm])
- fi
case "$plat$have_libudev" in
waylandno|drmno)
AC_MSG_ERROR([cannot build $plat platfrom without udev]) ;;