diff options
-rw-r--r-- | configure.ac | 67 |
1 files changed, 39 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac index fc1c28eb244..fb7c4a68417 100644 --- a/configure.ac +++ b/configure.ac @@ -1434,18 +1434,9 @@ if test "x$enable_egl" = xyes; then 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 @@ -1723,6 +1714,9 @@ esac 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. @@ -1740,28 +1734,45 @@ if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then 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]) ;; |