[PATCH 3/3] configure: set up simple clients independently from the others

Tiago Vignatti tiago.vignatti at intel.com
Thu Jul 21 06:35:40 PDT 2011


Namely, simple-client and simple-shm.

Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
 Makefile.am         |    2 --
 clients/Makefile.am |   27 ++++++++++++++++-----------
 configure.ac        |    9 +++++++--
 3 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 9ab266b..2d3f277 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,3 @@
-if BUILD_CLIENTS
 clients = clients
-endif
 
 SUBDIRS = compositor $(clients) data
diff --git a/clients/Makefile.am b/clients/Makefile.am
index fa99be6..f3999bf 100644
--- a/clients/Makefile.am
+++ b/clients/Makefile.am
@@ -1,15 +1,25 @@
-noinst_PROGRAMS =				\
-	gears					\
+noinst_PROGRAMS = $(clients_programs) 		\
+	$(poppler_programs) 			\
+	$(simple_clients_programs)
+
+if BUILD_SIMPLE_CLIENTS
+simple_clients_programs = simple-client simple-shm
+simple_client_SOURCES = simple-client.c
+simple_client_LDADD = $(SIMPLE_CLIENT_LIBS) -lm
+
+simple_shm_SOURCES = simple-shm.c
+simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS)
+endif
+
+if BUILD_CLIENTS
+clients_programs = gears			\
 	flower					\
 	screenshot				\
 	terminal				\
 	image					\
-	$(poppler_programs)			\
 	dnd					\
 	smoke					\
 	resizor					\
-	simple-client				\
-	simple-shm				\
 	eventdemo
 
 noinst_LIBRARIES = libtoytoolkit.a
@@ -55,12 +65,6 @@ smoke_LDADD = $(toolkit_libs)
 resizor_SOURCES = resizor.c
 resizor_LDADD = $(toolkit_libs)
 
-simple_client_SOURCES = simple-client.c
-simple_client_LDADD = $(SIMPLE_CLIENT_LIBS) -lm
-
-simple_shm_SOURCES = simple-shm.c
-simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS)
-
 eventdemo_SOURCES = eventdemo.c
 eventdemo_LDADD = $(toolkit_libs)
 
@@ -69,6 +73,7 @@ BUILT_SOURCES =					\
 	screenshooter-protocol.c
 
 CLEANFILES = $(BUILT_SOURCES)
+endif
 
 @wayland_scanner_rules@
 
diff --git a/configure.ac b/configure.ac
index 756b125..228b527 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,14 +86,19 @@ if test x$enable_wayland_compositor == xyes; then
   PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client wayland-egl])
 fi
 
+AC_ARG_ENABLE(simple-clients, [  --enable-simple-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,
+                    [egl >= 7.10 glesv2 wayland-client wayland-egl])
+fi
 
 AC_ARG_ENABLE(clients, [  --enable-clients],, enable_clients=yes)
 AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients == xyes)
 if test x$enable_clients == xyes; then
   AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
 
-  PKG_CHECK_MODULES(SIMPLE_CLIENT,
-                    [egl >= 7.10 glesv2 wayland-client wayland-egl])
   PKG_CHECK_MODULES(CLIENT, [wayland-client wayland-egl egl >= 7.10 gl cairo >= 1.10.0 gdk-pixbuf-2.0 glib-2.0 gobject-2.0 xkbcommon])
 
   PKG_CHECK_MODULES(POPPLER, [poppler-glib gdk-2.0 gio-2.0],
-- 
1.7.2.2



More information about the wayland-devel mailing list