[Mesa-dev] [PATCH 21/28] configure: move platform code further up

Emil Velikov emil.l.velikov at gmail.com
Thu Dec 8 20:00:10 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

We'll need this to sanity check that the implementations (Vulkan, EGL,
VL targets) have at least one [supported] platform enabled in order to
build them.

No functionality change intended.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 configure.ac | 140 +++++++++++++++++++++++++++++------------------------------
 1 file changed, 70 insertions(+), 70 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6bb81a2..b2eb47f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1848,6 +1848,76 @@ if test -n "$with_dri_drivers"; then
     DRI_DIRS=`echo $DRI_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
 fi
 
+dnl
+dnl EGL/Vulkan/VL Platforms configuration
+dnl
+AC_ARG_WITH([platforms],
+    [AS_HELP_STRING([--with-platforms@<:@=DIRS...@:>@],
+        [comma delimited native platforms libEGL/Vulkan/other supports, e.g.
+        "x11,drm,wayland,surfaceless..." @<:@default=auto@:>@])],
+    [with_platforms="$withval"],
+    [with_platforms="x11"])
+
+if test "x$enable_gbm" = xyes; then
+   with_platforms="$with_platforms,drm"
+fi
+
+PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
+        WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
+        WAYLAND_SCANNER='')
+if test "x$WAYLAND_SCANNER" = x; then
+    AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+fi
+
+# Do per platform setups and checks
+platforms=`IFS=', '; echo $with_platforms`
+for plat in $platforms; do
+	case "$plat" in
+	wayland)
+		# May not be required in some cases (VL targets), but that's
+		# due to incomplete code.
+		PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
+
+		if test "x$WAYLAND_SCANNER" = x; then
+			AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
+		fi
+		DEFINES="$DEFINES -DHAVE_PLATFORM_WAYLAND"
+		;;
+
+	x11)
+		# XXX: split and correctly honour DRI2 vs DRI3
+		PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes])
+		DEFINES="$DEFINES -DHAVE_PLATFORM_X11"
+		;;
+
+	drm)
+		# May not be required for the VL targets.
+		test "x$enable_gbm" = "xno" &&
+			AC_MSG_ERROR([EGL platform drm needs gbm])
+		DEFINES="$DEFINES -DHAVE_PLATFORM_DRM"
+		;;
+
+	surfaceless)
+		DEFINES="$DEFINES -DHAVE_PLATFORM_SURFACELESS"
+		;;
+
+	android)
+		PKG_CHECK_MODULES([ANDROID], [cutils hardware sync])
+		DEFINES="$DEFINES -DHAVE_PLATFORM_ANDROID"
+		;;
+
+	*)
+		AC_MSG_ERROR([EGL platform '$plat' does not exist])
+		;;
+	esac
+
+	case "$plat" in
+	wayland|drm|surfaceless)
+		require_libdrm "Platform $plat"
+		;;
+	esac
+done
+
 
 #
 # Vulkan driver configuration
@@ -2192,76 +2262,6 @@ esac
 AC_SUBST([VG_LIB_DEPS])
 AC_SUBST([EGL_CLIENT_APIS])
 
-dnl
-dnl EGL/Vulkan/VL Platforms configuration
-dnl
-AC_ARG_WITH([platforms],
-    [AS_HELP_STRING([--with-platforms@<:@=DIRS...@:>@],
-        [comma delimited native platforms libEGL/Vulkan/other supports, e.g.
-        "x11,drm,wayland,surfaceless..." @<:@default=auto@:>@])],
-    [with_platforms="$withval"],
-    [with_platforms="x11"])
-
-if test "x$enable_gbm" = xyes; then
-   with_platforms="$with_platforms,drm"
-fi
-
-PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
-        WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
-        WAYLAND_SCANNER='')
-if test "x$WAYLAND_SCANNER" = x; then
-    AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
-fi
-
-# Do per platform setups and checks
-platforms=`IFS=', '; echo $with_platforms`
-for plat in $platforms; do
-	case "$plat" in
-	wayland)
-		# May not be required in some cases (VL targets), but that's
-		# due to incomplete code.
-		PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
-
-		if test "x$WAYLAND_SCANNER" = x; then
-			AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
-		fi
-		DEFINES="$DEFINES -DHAVE_PLATFORM_WAYLAND"
-		;;
-
-	x11)
-		# XXX: split and correctly honour DRI2 vs DRI3
-		PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes])
-		DEFINES="$DEFINES -DHAVE_PLATFORM_X11"
-		;;
-
-	drm)
-		# May not be required for the VL targets.
-		test "x$enable_gbm" = "xno" &&
-			AC_MSG_ERROR([EGL platform drm needs gbm])
-		DEFINES="$DEFINES -DHAVE_PLATFORM_DRM"
-		;;
-
-	surfaceless)
-		DEFINES="$DEFINES -DHAVE_PLATFORM_SURFACELESS"
-		;;
-
-	android)
-		PKG_CHECK_MODULES([ANDROID], [cutils hardware sync])
-		DEFINES="$DEFINES -DHAVE_PLATFORM_ANDROID"
-		;;
-
-	*)
-		AC_MSG_ERROR([EGL platform '$plat' does not exist])
-		;;
-	esac
-
-	case "$plat" in
-	wayland|drm|surfaceless)
-		require_libdrm "Platform $plat"
-		;;
-	esac
-done
-
 # libEGL wants to default to the first platform specified in
 # ./configure.  parse that here.
 if test "x$platforms" != "x"; then
-- 
2.10.2



More information about the mesa-dev mailing list