[PATCH weston 10/11] configure.ac: Reorder common stuff

Quentin Glidic sardemff7+wayland at sardemff7.net
Sun Dec 8 10:45:42 PST 2013


From: Quentin Glidic <sardemff7+git at sardemff7.net>

Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
 configure.ac | 56 ++++++++++++++++++++++++++++++++------------------------
 1 file changed, 32 insertions(+), 24 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4e76a2c..8238824 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,34 @@ AC_ARG_VAR([WESTON_SHELL_CLIENT],
 
 PKG_PROG_PKG_CONFIG()
 
+#
+# Common stuff
+#
+
+# Wayland protocol file scanner
+PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
+AC_ARG_VAR([wayland_scanner],[The wayland-scanner executable])
+AC_PATH_PROG([wayland_scanner], [wayland-scanner])
+if test "x$wayland_scanner" = "x"; then
+	AC_MSG_ERROR([wayland-scanner is needed to compile weston])
+fi
+
+AC_ARG_VAR([XMLLINT],[The xmllint executable])
+AC_PATH_PROG([XMLLINT], [xmllint])
+AC_ARG_WITH(dtddir,
+	    AS_HELP_STRING([--with-dtddir],
+			   [Directory containing the Wayland
+			    protocol DTD @<:@default=from pkgconfig@:>@]),,
+	    with_dtddir=yes)
+case "$with_dtddir" in
+	no) ;;
+	yes) dtddir=`$PKG_CONFIG --variable=pkgdatadir wayland-scanner` ;;
+	*) dtddir="$with_dtddir" ;;
+esac
+AC_SUBST([dtddir])
+AM_CONDITIONAL([HAVE_XMLLINT], [test "x$XMLLINT" != "x" -a "x$dtddir" != "x"])
+
+# System functions and features
 AC_SEARCH_LIBS([dlopen], [dl])
 case "$ac_cv_search_dlopen" in
 	no) AC_MSG_ERROR([dlopen support required for Weston]) ;;
@@ -62,18 +90,19 @@ AC_CHECK_HEADERS([execinfo.h])
 
 AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
 
-COMPOSITOR_MODULES="wayland-server >= 1.3.90 pixman-1"
-
 AC_ARG_ENABLE(egl,
 	      AS_HELP_STRING([--disable-egl],
 			     [Disable EGL support]),,
 	      enable_egl=yes)
 AM_CONDITIONAL(ENABLE_EGL, [test "x$enable_egl" = "xyes"])
 if test "x$enable_egl" = "xyes"; then
-	AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support])
 	PKG_CHECK_MODULES(EGL, [egl >= 7.10 glesv2])
+	AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support])
 fi
 
+
+COMPOSITOR_MODULES="wayland-server >= 1.3.90 pixman-1"
+
 AC_ARG_ENABLE(xkbcommon,
 	      AS_HELP_STRING([--disable-xkbcommon],
 			     [Disable libxkbcommon support: This is only useful
@@ -516,27 +545,6 @@ if test "x$have_lcms" = "xyes"; then
 fi
 AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = "xyes"])
 
-PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
-AC_ARG_VAR([wayland_scanner],[The wayland-scanner executable])
-AC_PATH_PROG([wayland_scanner], [wayland-scanner])
-if test "x$wayland_scanner" = "x"; then
-	AC_MSG_ERROR([wayland-scanner is needed to compile weston])
-fi
-
-AC_ARG_VAR([XMLLINT],[The xmllint executable])
-AC_PATH_PROG([XMLLINT], [xmllint])
-AC_ARG_WITH(dtddir,
-	    AS_HELP_STRING([--with-dtddir],
-			   [Directory containing the Wayland
-			    protocol DTD @<:@default=from pkgconfig@:>@]),,
-	    with_dtddir=yes)
-case "$with_dtddir" in
-	no) ;;
-	yes) dtddir=`$PKG_CONFIG --variable=pkgdatadir wayland-scanner` ;;
-	*) dtddir="$with_dtddir" ;;
-esac
-AC_SUBST([dtddir])
-AM_CONDITIONAL([HAVE_XMLLINT], [test "x$XMLLINT" != "x" -a "x$dtddir" != "x"])
 
 AC_CONFIG_FILES([Makefile
 		 shared/Makefile
-- 
1.8.4.3



More information about the wayland-devel mailing list