i965: Combine some dead code elimination NOP'ing code.
[mesa.git] / configure.ac
index 56e91f00784c20e7f74db985eb607b477dc41674..3e2d79abdf682257d690cfe6248014e85ae7a67a 100644 (file)
@@ -76,6 +76,7 @@ LIBDRM_NVVIEUX_REQUIRED=2.4.66
 LIBDRM_NOUVEAU_REQUIRED=2.4.66
 LIBDRM_FREEDRENO_REQUIRED=2.4.74
 LIBDRM_VC4_REQUIRED=2.4.69
+LIBDRM_ETNAVIV_REQUIRED=2.4.74
 DRI2PROTO_REQUIRED=2.6
 DRI3PROTO_REQUIRED=1.0
 PRESENTPROTO_REQUIRED=1.0
@@ -83,7 +84,7 @@ GLPROTO_REQUIRED=1.4.14
 LIBOMXIL_BELLAGIO_REQUIRED=0.0
 LIBVA_REQUIRED=0.38.0
 VDPAU_REQUIRED=1.1
-WAYLAND_REQUIRED=1.2.0
+WAYLAND_REQUIRED=1.11
 XCB_REQUIRED=1.9.3
 XCBDRI2_REQUIRED=1.8
 XCBGLX_REQUIRED=1.8.1
@@ -1233,7 +1234,7 @@ GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast"
 AC_ARG_WITH([gallium-drivers],
     [AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@],
         [comma delimited Gallium drivers list, e.g.
-        "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl"
+        "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl,etnaviv,imx"
         @<:@default=r300,r600,svga,swrast@:>@])],
     [with_gallium_drivers="$withval"],
     [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
@@ -1597,6 +1598,9 @@ AC_ARG_ENABLE([driglx-direct],
 dnl
 dnl libGL configuration per driver
 dnl
+if test "x$enable_glx" != xno; then
+    PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
+fi
 case "x$enable_glx" in
 xxlib | xgallium-xlib)
     # Xlib-based GLX
@@ -1610,7 +1614,6 @@ xxlib | xgallium-xlib)
     ;;
 xdri)
     # DRI-based GLX
-    PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
 
     # find the DRI deps for libGL
     dri_modules="x11 xext xdamage xfixes x11-xcb xcb xcb-glx >= $XCBGLX_REQUIRED"
@@ -1710,8 +1713,9 @@ AC_ARG_ENABLE([glx-tls],
     [GLX_USE_TLS=yes])
 AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
 
-AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
-      [DEFINES="${DEFINES} -DGLX_USE_TLS"])
+if test "x$GLX_USE_TLS" = xyes; then
+    DEFINES="$DEFINES -DGLX_USE_TLS"
+fi
 
 dnl Read-only text section on x86 hardened platforms
 AC_ARG_ENABLE([glx-read-only-text],
@@ -2077,7 +2081,7 @@ if test "x$enable_xvmc" = xyes -o \
         "x$enable_va" = xyes; then
     if test x"$enable_dri3" = xyes; then
         PKG_CHECK_MODULES([VL], [xcb-dri3 xcb-present xcb-sync xshmfence >= $XSHMFENCE_REQUIRED
-                                 x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
+                                 xcb-xfixes x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
     else
         PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
     fi
@@ -2381,7 +2385,7 @@ dnl
 dnl Gallium helper functions
 dnl
 gallium_require_llvm() {
-    if test "x$enable_gallium_llvm" == "xyes"; then
+    if test "x$enable_gallium_llvm" = "xyes"; then
         llvm_check_version_for $LLVM_REQUIRED_GALLIUM "gallium"
     else
         AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
@@ -2505,6 +2509,14 @@ if test -n "$with_gallium_drivers"; then
             PKG_CHECK_MODULES([FREEDRENO], [libdrm_freedreno >= $LIBDRM_FREEDRENO_REQUIRED])
             require_libdrm "freedreno"
             ;;
+        xetnaviv)
+            HAVE_GALLIUM_ETNAVIV=yes
+            PKG_CHECK_MODULES([ETNAVIV], [libdrm_etnaviv >= $LIBDRM_ETNAVIV_REQUIRED])
+            require_libdrm "etnaviv"
+            ;;
+       ximx)
+            HAVE_GALLIUM_IMX=yes
+            ;;
         xswrast)
             HAVE_GALLIUM_SOFTPIPE=yes
             if test "x$MESA_LLVM" = x1 && test "x$enable_gallium_llvm" == "xyes";  then
@@ -2559,6 +2571,12 @@ if test "x$enable_gallium_llvm" == "xyes"; then
     llvm_add_default_components "gallium"
 fi
 
+dnl We need to validate some needed dependencies for renderonly drivers.
+
+if test "x$HAVE_GALLIUM_ETNAVIV" != xyes -a "x$HAVE_GALLIUM_IMX" == xyes  ; then
+    AC_ERROR([Building with imx requires etnaviv])
+fi
+
 dnl Set LLVM_LIBS - This is done after the driver configuration so
 dnl that drivers can add additional components to LLVM_COMPONENTS.
 dnl Previously, gallium drivers were updating LLVM_LIBS directly
@@ -2623,6 +2641,8 @@ AM_CONDITIONAL(HAVE_GALLIUM_RADEON_COMMON, test "x$HAVE_GALLIUM_R600" = xyes -o
                                                 "x$HAVE_GALLIUM_RADEONSI" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_NOUVEAU, test "x$HAVE_GALLIUM_NOUVEAU" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_FREEDRENO, test "x$HAVE_GALLIUM_FREEDRENO" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_ETNAVIV, test "x$HAVE_GALLIUM_ETNAVIV" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_IMX, test "x$HAVE_GALLIUM_IMX" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_SOFTPIPE, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_LLVMPIPE, test "x$HAVE_GALLIUM_LLVMPIPE" = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_SWR, test "x$HAVE_GALLIUM_SWR" = xyes)
@@ -2776,6 +2796,8 @@ AC_CONFIG_FILES([Makefile
                src/gallium/drivers/svga/Makefile
                src/gallium/drivers/swr/Makefile
                src/gallium/drivers/trace/Makefile
+               src/gallium/drivers/etnaviv/Makefile
+               src/gallium/drivers/imx/Makefile
                src/gallium/drivers/vc4/Makefile
                src/gallium/drivers/virgl/Makefile
                src/gallium/state_trackers/clover/Makefile
@@ -2805,6 +2827,8 @@ AC_CONFIG_FILES([Makefile
                src/gallium/targets/xvmc/Makefile
                src/gallium/tests/trivial/Makefile
                src/gallium/tests/unit/Makefile
+               src/gallium/winsys/etnaviv/drm/Makefile
+               src/gallium/winsys/imx/drm/Makefile
                src/gallium/winsys/freedreno/drm/Makefile
                src/gallium/winsys/i915/drm/Makefile
                src/gallium/winsys/intel/drm/Makefile