[PATCH weston 5/7] configure: separate simple EGL clients from others

Pekka Paalanen ppaalanen at gmail.com
Tue Oct 16 07:27:20 PDT 2012


Separate simple EGL clients from other simple clients. This allows to
build either simple-shm or simple-egl, whichever you want. We avoid
linking libEGL and GLESv2 into simple-shm, and we can build simple-shm
even if nothing provides EGL, GLESv2, or wayland-egl APIs.

Change the options in configure --help from --enable to --disable, since
these are enabled by default, and you would normally only ever give the
--disable flavor. Add descriptions.

Remove the #define BUILD_SIMPLE_CLIENTS since it is not used.

Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
---
 clients/Makefile.am |   17 +++++++++++------
 configure.ac        |   19 +++++++++++++++----
 2 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/clients/Makefile.am b/clients/Makefile.am
index 85fc95c..7bc0d25 100644
--- a/clients/Makefile.am
+++ b/clients/Makefile.am
@@ -5,7 +5,8 @@ bin_PROGRAMS =					\
 noinst_PROGRAMS =				\
 	$(clients_programs)			\
 	$(poppler_programs)			\
-	$(simple_clients_programs)
+	$(simple_clients_programs)		\
+	$(simple_egl_clients_programs)
 
 libexec_PROGRAMS =				\
 	$(desktop_shell)			\
@@ -21,14 +22,9 @@ AM_CPPFLAGS =					\
 
 if BUILD_SIMPLE_CLIENTS
 simple_clients_programs =			\
-	simple-egl				\
 	simple-shm				\
 	simple-touch
 
-simple_egl_SOURCES = simple-egl.c
-simple_egl_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
-simple_egl_LDADD = $(SIMPLE_CLIENT_LIBS) -lm
-
 simple_shm_SOURCES = simple-shm.c 		\
 	../shared/os-compatibility.c		\
 	../shared/os-compatibility.h
@@ -42,6 +38,15 @@ simple_touch_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS)
 simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS)
 endif
 
+if BUILD_SIMPLE_EGL_CLIENTS
+simple_egl_clients_programs =			\
+	simple-egl
+
+simple_egl_SOURCES = simple-egl.c
+simple_egl_CPPFLAGS = $(SIMPLE_EGL_CLIENT_CFLAGS)
+simple_egl_LDADD = $(SIMPLE_EGL_CLIENT_LIBS) -lm
+endif
+
 if BUILD_CLIENTS
 terminal = weston-terminal
 
diff --git a/configure.ac b/configure.ac
index 8b8e9a2..5df7c83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,11 +151,22 @@ AC_SUBST(SHARED_CFLAGS)
 COMPOSITOR_LIBS="$COMPOSITOR_LIBS $IMAGE_LIBS"
 COMPOSITOR_CFLAGS="$COMPOSITOR_CFLAGS $IMAGE_CFLAGS"
 
-AC_ARG_ENABLE(simple-clients, [  --enable-simple-clients],, enable_simple_clients=yes)
-AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test x$enable_simple_clients = xyes)
+AC_ARG_ENABLE(simple-clients,
+              AS_HELP_STRING([--disable-simple-clients],
+                             [do not build the simple wl_shm clients]),,
+              enable_simple_clients=yes)
+AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes")
 if test x$enable_simple_clients = xyes; then
-  AC_DEFINE([BUILD_SIMPLE_CLIENTS], [1], [Build the Wayland simple clients])
-  PKG_CHECK_MODULES(SIMPLE_CLIENT,
+  PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client])
+fi
+
+AC_ARG_ENABLE(simple-egl-clients,
+              AS_HELP_STRING([--disable-simple-egl-clients],
+                             [do not build the simple EGL clients]),,
+              enable_simple_egl_clients=yes)
+AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes")
+if test x$enable_simple_egl_clients = xyes; then
+  PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT,
                     [egl >= 7.10 glesv2 wayland-client wayland-egl])
 fi
 
-- 
1.7.8.6



More information about the wayland-devel mailing list