[Mesa-dev] [PATCH 12/12] build: Get rid of GALLIUM_WINSYS_DIRS

Matt Turner mattst88 at gmail.com
Thu Apr 11 16:30:00 PDT 2013


configure still uses it to print the enabled winsys.

Tested-by: Emil Velikov <emil.l.velikov at gmail.com>
Reviewed-and-Tested-by: Andreas Boll <andreas.boll.dev at gmail.com>
---
Since last time:
   - Rebase and add freedreno.

 configure.ac                      | 38 +++++++++++++---------
 src/gallium/winsys/Makefile.am    | 66 ++++++++++++++++++++++++++++++++++++++-
 src/gallium/winsys/sw/Makefile.am | 37 ----------------------
 3 files changed, 88 insertions(+), 53 deletions(-)
 delete mode 100644 src/gallium/winsys/sw/Makefile.am

diff --git a/configure.ac b/configure.ac
index c17d191..518edbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -762,7 +762,7 @@ xyesyes)
     GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
     GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS libgl-xlib"
     GALLIUM_STATE_TRACKERS_DIRS="glx $GALLIUM_STATE_TRACKERS_DIRS"
-    HAVE_WINSYS_XLIB="yes"
+    NEED_WINSYS_XLIB="yes"
     ;;
 esac
 
@@ -776,7 +776,6 @@ if test "x$enable_osmesa" = xyes; then
     GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS osmesa"
 fi
 
-AC_SUBST([GALLIUM_WINSYS_DIRS])
 AC_SUBST([MESA_LLVM])
 
 # Check for libdrm
@@ -1445,10 +1444,6 @@ fi
 egl_platforms=`IFS=', '; echo $with_egl_platforms`
 for plat in $egl_platforms; do
 	case "$plat" in
-	fbdev|null)
-		GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/$plat"
-		;;
-
 	wayland)
 		PKG_CHECK_MODULES([WAYLAND], [wayland-client >= 1.0.2 wayland-server >= 1.0.2])
 		GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
@@ -1471,7 +1466,7 @@ for plat in $egl_platforms; do
 			AC_MSG_ERROR([EGL platform drm needs gbm])
 		;;
 
-	android|gdi)
+	android|fbdev|gdi|null)
 		;;
 
 	*)
@@ -1496,6 +1491,9 @@ fi
 
 EGL_PLATFORMS="$egl_platforms"
 
+if echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1; then
+    NEED_WINSYS_XLIB=yes
+fi
 AM_CONDITIONAL(HAVE_EGL_PLATFORM_X11, echo "$egl_platforms" | grep 'x11' >/dev/null 2>&1)
 AM_CONDITIONAL(HAVE_EGL_PLATFORM_WAYLAND, echo "$egl_platforms" | grep 'wayland' >/dev/null 2>&1)
 AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep 'drm' >/dev/null 2>&1)
@@ -1686,9 +1684,7 @@ dnl
 dnl Gallium helper functions
 dnl
 gallium_check_st() {
-    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$NEED_NONNULL_WINSYS" = xyes; then
          if test "x$have_libdrm" != xyes; then
             AC_MSG_ERROR([DRI or Xorg DDX requires libdrm >= $LIBDRM_REQUIRED])
          fi
@@ -1747,6 +1743,13 @@ radeon_llvm_check() {
 }
 
 dnl Gallium drivers
+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
+    NEED_NONNULL_WINSYS=yes
+fi
+AM_CONDITIONAL(NEED_NONNULL_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes)
+
 dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this block
 if test "x$with_gallium_drivers" != x; then
     gallium_drivers=`IFS=', '; echo $with_gallium_drivers`
@@ -1832,9 +1835,8 @@ if test "x$with_gallium_drivers" != x; then
                 GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xvmc-softpipe"
             fi
             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
+                NEED_WINSYS_XLIB=yes
+                GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib"
             fi
             ;;
         *)
@@ -1910,7 +1912,7 @@ if test "x$enable_gallium_loader" = xyes; then
     GALLIUM_PIPE_LOADER_LIBS="\$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader.la"
     GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(top_builddir)/src/gallium/winsys/sw/null/libws_null.la"
 
-    if test "x$HAVE_WINSYS_XLIB" = xyes; then
+    if test "x$NEED_WINSYS_XLIB" = xyes; then
         GALLIUM_PIPE_LOADER_DEFINES="$GALLIUM_PIPE_LOADER_DEFINES -DHAVE_PIPE_LOADER_XLIB"
         GALLIUM_PIPE_LOADER_LIBS="$GALLIUM_PIPE_LOADER_LIBS \$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la"
     fi
@@ -1937,6 +1939,13 @@ AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes)
 AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes)
 AM_CONDITIONAL(HAVE_COMMON_DRI, test x$HAVE_COMMON_DRI = xyes)
 
+AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$NEED_NONNULL_WINSYS" = xyes -a \
+                                            "x$HAVE_GALLIUM_R300" = xyes -o \
+                                            "x$HAVE_GALLIUM_R600" = xyes -o \
+                                            "x$HAVE_GALLIUM_RADEONSI" = xyes)
+AM_CONDITIONAL(NEED_WINSYS_WRAPPER, test "x$HAVE_GALLIUM_I915" = xyes -o \
+                                         "x$HAVE_GALLIUM_SVGA" = xyes)
+AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$NEED_WINSYS_XLIB" = xyes)
 AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
 AM_CONDITIONAL(R600_NEED_RADEON_GALLIUM, test x$R600_NEED_RADEON_GALLIUM = xyes)
 AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
@@ -2061,7 +2070,6 @@ AC_CONFIG_FILES([Makefile
 		src/gallium/winsys/nouveau/drm/Makefile
 		src/gallium/winsys/radeon/drm/Makefile
 		src/gallium/winsys/svga/drm/Makefile
-		src/gallium/winsys/sw/Makefile
 		src/gallium/winsys/sw/dri/Makefile
 		src/gallium/winsys/sw/fbdev/Makefile
 		src/gallium/winsys/sw/null/Makefile
diff --git a/src/gallium/winsys/Makefile.am b/src/gallium/winsys/Makefile.am
index f2c96b3..70387f8 100644
--- a/src/gallium/winsys/Makefile.am
+++ b/src/gallium/winsys/Makefile.am
@@ -1 +1,65 @@
-SUBDIRS = $(GALLIUM_WINSYS_DIRS)
+# Copyright © 2013 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 = sw/null
+
+if NEED_WINSYS_XLIB
+SUBDIRS += sw/xlib
+endif
+
+if HAVE_DRI
+SUBDIRS += sw/dri
+endif
+
+if HAVE_EGL_PLATFORM_FBDEV
+SUBDIRS += sw/fbdev
+endif
+
+if HAVE_EGL_PLATFORM_WAYLAND
+SUBDIRS += sw/wayland
+endif
+
+if NEED_WINSYS_WRAPPER
+SUBDIRS += sw/wrapper
+endif
+
+if NEED_NONNULL_WINSYS
+if HAVE_GALLIUM_FREEDRENO
+SUBDIRS += freedreno/drm
+endif
+
+if HAVE_GALLIUM_I915
+SUBDIRS += i915/sw i915/drm
+endif
+
+if HAVE_GALLIUM_NOUVEAU
+SUBDIRS += nouveau/drm
+endif
+
+if NEED_RADEON_DRM_WINSYS
+SUBDIRS += radeon/drm
+endif
+
+if HAVE_GALLIUM_SVGA
+SUBDIRS += svga/drm
+endif
+endif
diff --git a/src/gallium/winsys/sw/Makefile.am b/src/gallium/winsys/sw/Makefile.am
deleted file mode 100644
index ae8984c..0000000
--- a/src/gallium/winsys/sw/Makefile.am
+++ /dev/null
@@ -1,37 +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 = null wrapper
-
-# TODO: this should go through a further indirection level
-# (i.e. EGL should set a variable that is checked here)
-if HAVE_EGL_PLATFORM_X11
-SUBDIRS += xlib
-endif
-
-if HAVE_EGL_PLATFORM_FBDEV
-SUBDIRS += fbdev
-endif
-
-if HAVE_EGL_PLATFORM_WAYLAND
-SUBDIRS += wayland
-endif
-- 
1.8.1.5



More information about the mesa-dev mailing list