mesa: implement packing of DEPTH_STENCIL & FLOAT_32_UNSIGNED_INT_24_8_REV combo
[mesa.git] / configure.ac
index 5a54370b51d28e3cbb55690d5910fb5897dcfa8f..dde13c9b57d13f09de071be1dea30eb582114c28 100644 (file)
@@ -22,8 +22,8 @@ LIBDRM_REQUIRED=2.4.24
 LIBDRM_RADEON_REQUIRED=2.4.24
 LIBDRM_INTEL_REQUIRED=2.4.24
 LIBDRM_NOUVEAU_REQUIRED=0.6
-DRI2PROTO_REQUIRED=2.1
-GLPROTO_REQUIRED=1.4.11
+DRI2PROTO_REQUIRED=2.6
+GLPROTO_REQUIRED=1.4.14
 LIBDRM_XORG_REQUIRED=2.4.24
 LIBKMS_XORG_REQUIRED=1.0.0
 
@@ -570,6 +570,11 @@ AC_ARG_ENABLE([xorg],
         [enable support for X.Org DDX API @<:@default=no@:>@])],
     [enable_xorg="$enableval"],
     [enable_xorg=no])
+AC_ARG_ENABLE([xa],
+    [AS_HELP_STRING([--enable-xa],
+        [enable build of the XA X Acceleration API @<:@default=no@:>@])],
+    [enable_xa="$enableval"],
+    [enable_xa=no])
 AC_ARG_ENABLE([d3d1x],
     [AS_HELP_STRING([--enable-d3d1x],
         [enable support for Direct3D 10 & 11 low-level API @<:@default=no@:>@])],
@@ -597,9 +602,9 @@ AC_ARG_ENABLE([gallium_gbm],
     [AS_HELP_STRING([--enable-gallium-gbm],
         [enable optional gbm state tracker (not required for
          gbm support in Gallium)
-         @<:@default=disable@:>@])],
+         @<:@default=auto@:>@])],
     [enable_gallium_gbm="$enableval"],
-    [enable_gallium_gbm=no])
+    [enable_gallium_gbm=auto])
 
 # Option for Gallium drivers
 GALLIUM_DRIVERS_DEFAULT="r300,r600,swrast"
@@ -617,6 +622,7 @@ if test "x$enable_opengl" = xno -a \
         "x$enable_gles2" = xno -a \
         "x$enable_openvg" = xno -a \
         "x$enable_xorg" = xno -a \
+        "x$enable_xa" = xno -a \
         "x$enable_d3d1x" = xno; then
     AC_MSG_ERROR([at least one API should be enabled])
 fi
@@ -1386,6 +1392,14 @@ fi
 dnl
 dnl gbm Gallium configuration
 dnl
+if test "x$enable_gallium_gbm" = xauto; then
+    case "$enable_gbm$HAVE_ST_EGL$with_egl_platforms" in
+        yesyes*drm*)
+            enable_gallium_gbm=yes ;;
+         *)
+            enable_gallium_gbm=no ;;
+    esac
+fi
 if test "x$enable_gallium_gbm" = xyes; then
     if test "x$with_gallium_drivers" = x; then
         AC_MSG_ERROR([cannot enable gbm_gallium without Gallium])
@@ -1413,6 +1427,14 @@ if test "x$enable_xorg" = xyes; then
     HAVE_ST_XORG=yes
 fi
 
+dnl
+dnl XA configuration
+dnl
+if test "x$enable_xa" = xyes; then
+    GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
+    HAVE_ST_XA=yes
+fi
+
 dnl
 dnl OpenVG configuration
 dnl
@@ -1713,9 +1735,13 @@ yes)
                WAYLAND_EGL_LIB_DEPS="$WAYLAND_LIBS $LIBDRM_LIBS"
                 GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
        fi
-        if test "$plat" = "drm" && test "x$enable_gbm" = no; then
+        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]) ;;
+        esac
     done
     EGL_PLATFORMS="$egl_platforms"
     ;;
@@ -1798,7 +1824,8 @@ dnl
 dnl Gallium helper functions
 dnl
 gallium_check_st() {
-    if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes; then
+    if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes ||
+        test "x$HAVE_ST_XA" = xyes; then
          if test "x$have_libdrm" != xyes; then
             AC_MSG_ERROR([DRI or Xorg DDX requires libdrm >= $LIBDRM_REQUIRED])
          fi
@@ -1810,6 +1837,9 @@ gallium_check_st() {
     if test "x$HAVE_ST_XORG" = xyes && test "x$3" != x; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3"
     fi
+    if test "x$HAVE_ST_XA" = xyes && test "x$4" != x; then
+         GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $4"
+    fi
 }
 
 gallium_require_llvm() {
@@ -1830,7 +1860,7 @@ if test "x$with_gallium_drivers" != x; then
     for driver in $gallium_drivers; do
         case "x$driver" in
         xsvga)
-            gallium_check_st "svga/drm" "dri-vmwgfx" "xorg-vmwgfx"
+            gallium_check_st "svga/drm" "dri-vmwgfx" "xorg-vmwgfx" "xa-vmwgfx"
             ;;
         xi915)
             gallium_check_st "i915/drm" "dri-i915" "xorg-i915"