[Mesa-dev] [PATCH 06/10] build: Stop using GALLIUM_STATE_TRACKERS_DIRS for SUBDIRS

Matt Turner mattst88 at gmail.com
Mon Feb 25 11:21:28 PST 2013


configure still uses it to print the enabled state trackers.
---
 Makefile.am                            |   51 +++++++++++++++++++++++++++-----
 configure.ac                           |   47 +++++++++++++----------------
 src/gallium/state_trackers/Makefile.am |   23 --------------
 3 files changed, 64 insertions(+), 57 deletions(-)
 delete mode 100644 src/gallium/state_trackers/Makefile.am

diff --git a/Makefile.am b/Makefile.am
index 6eabe90..3aefb45 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,10 +37,6 @@ if HAVE_OPENGL_ES2
 SUBDIRS += src/mapi/es2api
 endif
 
-if HAVE_OPENVG
-SUBDIRS += src/mapi/vgapi
-endif
-
 if NEED_OPENGL_COMMON
 SUBDIRS += src/glsl src/mesa
 endif
@@ -60,10 +56,49 @@ endif
 if HAVE_GALLIUM
 SUBDIRS +=				\
 	src/gallium/auxiliary		\
-	src/gallium/drivers		\
-	src/gallium/state_trackers	\
-	src/gallium/winsys		\
-	src/gallium/targets
+	src/gallium/drivers
+
+if HAVE_X11_DRIVER
+SUBDIRS += src/gallium/state_trackers/glx
+endif
+
+if HAVE_DRI
+SUBDIRS += src/gallium/state_trackers/dri
+endif
+
+if HAVE_GALLIUM_EGL
+SUBDIRS += src/gallium/state_trackers/egl
+endif
+
+if HAVE_GALLIUM_GBM
+SUBDIRS += src/gallium/state_trackers/gbm
+endif
+
+if HAVE_ST_XORG
+SUBDIRS += src/gallium/state_trackers/xorg
+endif
+
+if HAVE_ST_XA
+SUBDIRS += src/gallium/state_trackers/xa
+endif
+
+if HAVE_OPENVG
+SUBDIRS += src/mapi/vgapi src/gallium/state_trackers/vega
+endif
+
+if HAVE_ST_XVMC
+SUBDIRS += src/gallium/state_trackers/xvmc
+endif
+
+if HAVE_ST_VDPAU
+SUBDIRS += src/gallium/state_trackers/vdpau
+endif
+
+if HAVE_CLOVER
+SUBDIRS += src/gallium/state_trackers/clover
+endif
+
+SUBDIRS += src/gallium/winsys src/gallium/targets
 
 if HAVE_GALLIUM_TESTS
 SUBDIRS += src/gallium/tests/trivial src/gallium/tests/unit
diff --git a/configure.ac b/configure.ac
index 4027f6e..5984987 100644
--- a/configure.ac
+++ b/configure.ac
@@ -776,12 +776,10 @@ esac
 if test "x$enable_dri" = xyes; then
     GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/dri"
     GALLIUM_STATE_TRACKERS_DIRS="dri $GALLIUM_STATE_TRACKERS_DIRS"
-    HAVE_ST_DRI="yes"
 fi
 
 AC_SUBST([GALLIUM_TARGET_DIRS])
 AC_SUBST([GALLIUM_WINSYS_DIRS])
-AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
 AC_SUBST([MESA_LLVM])
 
 # Check for libdrm
@@ -1254,14 +1252,14 @@ if test "x$enable_gallium_egl" = xyes; then
 
     GALLIUM_STATE_TRACKERS_DIRS="egl $GALLIUM_STATE_TRACKERS_DIRS"
     GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-static"
-    HAVE_ST_EGL="yes"
 fi
+AM_CONDITIONAL(HAVE_GALLIUM_EGL, test "x$enable_gallium_egl" = xyes)
 
 dnl
 dnl gbm Gallium configuration
 dnl
 if test "x$enable_gallium_gbm" = xauto; then
-    case "$enable_gbm$HAVE_ST_EGL$enable_dri$with_egl_platforms" in
+    case "$enable_gbm$enable_gallium_egl$enable_dri$with_egl_platforms" in
         yesyesyes*drm*)
             enable_gallium_gbm=yes ;;
          *)
@@ -1282,9 +1280,9 @@ if test "x$enable_gallium_gbm" = xyes; then
 
     GALLIUM_STATE_TRACKERS_DIRS="gbm $GALLIUM_STATE_TRACKERS_DIRS"
     GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS gbm"
-    HAVE_ST_GBM="yes"
     enable_gallium_loader=yes
 fi
+AM_CONDITIONAL(HAVE_GALLIUM_GBM, test "x$enable_gallium_gbm" = xyes)
 
 dnl
 dnl X.Org DDX configuration
@@ -1297,8 +1295,8 @@ if test "x$enable_xorg" = xyes; then
         HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71",
         HAVE_XEXTPROTO_71="no")
     GALLIUM_STATE_TRACKERS_DIRS="xorg $GALLIUM_STATE_TRACKERS_DIRS"
-    HAVE_ST_XORG=yes
 fi
+AM_CONDITIONAL(HAVE_ST_XORG, test "x$enable_xorg" = xyes)
 
 dnl
 dnl XA configuration
@@ -1314,11 +1312,11 @@ fi
 fi
 if test "x$enable_xa" = xyes; then
     GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
-    HAVE_ST_XA=yes
     AC_SUBST(AWK)
     AC_SUBST(GREP)
     AC_SUBST(NM)
 fi
+AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
 
 dnl
 dnl OpenVG configuration
@@ -1339,7 +1337,6 @@ if test "x$enable_openvg" = xyes; then
     EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
     VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS $PTHREAD_LIBS"
     GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS"
-    HAVE_ST_VEGA=yes
     VG_PC_LIB_PRIV="-lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
     AC_SUBST([VG_PC_LIB_PRIV])
 fi
@@ -1355,7 +1352,6 @@ if test "x$enable_d3d1x" = xyes; then
     fi
 
     GALLIUM_STATE_TRACKERS_DIRS="d3d1x $GALLIUM_STATE_TRACKERS_DIRS"
-    HAVE_ST_D3D1X=yes
 fi
 
 dnl
@@ -1383,14 +1379,14 @@ fi
 if test "x$enable_xvmc" = xyes; then
     PKG_CHECK_MODULES([XVMC], [xvmc >= 1.0.6 x11-xcb xcb-dri2 >= 1.8])
     GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xvmc"
-    HAVE_ST_XVMC="yes"
 fi
+AM_CONDITIONAL(HAVE_ST_XVMC, test "x$enable_xvmc" = xyes)
 
 if test "x$enable_vdpau" = xyes; then
     PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.4.1 x11-xcb xcb-dri2 >= 1.8])
     GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vdpau"
-    HAVE_ST_VDPAU="yes"
 fi
+AM_CONDITIONAL(HAVE_ST_VDPAU, test "x$enable_vdpau" = xyes)
 
 dnl
 dnl OpenCL configuration
@@ -1437,6 +1433,7 @@ if test "x$enable_opencl" = xyes; then
     GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS opencl"
     enable_gallium_loader=yes
 fi
+AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
 
 if test "x$enable_gallium_gbm" = xyes || test "x$enable_opencl" = xyes; then
     GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS pipe-loader"
@@ -1716,27 +1713,27 @@ dnl
 dnl Gallium helper functions
 dnl
 gallium_check_st() {
-    if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes ||
-	 test "x$HAVE_ST_XA" = xyes || test "x$HAVE_ST_XVMC" = xyes ||
-	 test "x$HAVE_ST_VDPAU" = xyes; then
+    if test "x$enable_dri" = xyes -o "x$enable_xorg" = xyes -o \
+            "x$enable_xa" = xyes -o "x$enable_xvmc" = xyes -o \
+            "x$enable_vdpau" = xyes; then
          if test "x$have_libdrm" != xyes; then
             AC_MSG_ERROR([DRI or Xorg DDX requires libdrm >= $LIBDRM_REQUIRED])
          fi
          GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS $1"
     fi
-    if test "x$HAVE_ST_DRI" = xyes && test "x$2" != x; then
+    if test "x$enable_dri" = xyes && test "x$2" != x; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $2"
     fi
-    if test "x$HAVE_ST_XORG" = xyes && test "x$3" != x; then
+    if test "x$enable_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
+    if test "x$enable_xa" = xyes && test "x$4" != x; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $4"
     fi
-    if test "x$HAVE_ST_XVMC" = xyes && test "x$5" != x; then
+    if test "x$enable_xvmc" = xyes && test "x$5" != x; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $5"
     fi
-    if test "x$HAVE_ST_VDPAU" = xyes && test "x$6" != x; then
+    if test "x$enable_vdpau" = xyes && test "x$6" != x; then
          GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6"
     fi
 }
@@ -1849,17 +1846,16 @@ if test "x$with_gallium_drivers" != x; then
                 GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
             fi
 
-            if test "x$HAVE_ST_DRI" = xyes; then
+            if test "x$enable_dri" = xyes; then
                 GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast"
             fi
-            if test "x$HAVE_ST_VDPAU" = xyes; then
+            if test "x$enable_vdpau" = xyes; then
                 GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS vdpau-softpipe"
             fi
-            if test "x$HAVE_ST_XVMC" = xyes; then
+            if test "x$enable_xvmc" = xyes; then
                 GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xvmc-softpipe"
             fi
-            if test "x$HAVE_ST_VDPAU" = xyes ||
-               test "x$HAVE_ST_XVMC" = xyes; then
+            if test "x$enable_vdpau" = xyes -o "x$enable_xvmc" = xyes; then
                if test "x$HAVE_WINSYS_XLIB" != xyes; then
                   GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
                fi
@@ -2041,7 +2037,6 @@ AC_CONFIG_FILES([Makefile
 		src/gallium/drivers/softpipe/Makefile
 		src/gallium/drivers/svga/Makefile
 		src/gallium/drivers/trace/Makefile
-		src/gallium/state_trackers/Makefile
 		src/gallium/state_trackers/clover/Makefile
 		src/gallium/state_trackers/dri/Makefile
 		src/gallium/state_trackers/dri/drm/Makefile
@@ -2205,7 +2200,7 @@ if test "$enable_egl" = yes; then
         egl_drivers="$egl_drivers builtin:egl_dri2"
     fi
 
-    if test "x$HAVE_ST_EGL" = xyes; then
+    if test "x$enable_gallium_egl" = xyes; then
         echo "        EGL drivers:    ${egl_drivers} egl_gallium"
         echo "        EGL Gallium STs:$EGL_CLIENT_APIS"
     else
diff --git a/src/gallium/state_trackers/Makefile.am b/src/gallium/state_trackers/Makefile.am
deleted file mode 100644
index ef339d4..0000000
--- a/src/gallium/state_trackers/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright © 2012 Intel Corporation
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-SUBDIRS = $(GALLIUM_STATE_TRACKERS_DIRS)
-- 
1.7.8.6



More information about the mesa-dev mailing list