From ec2507695f92168590704ba234af23436a8720a7 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 17 Apr 2012 16:49:12 +0300 Subject: [PATCH] fix build for --disable-clients --enable-simple-clients Simple clients were relying on AM_CFLAGS and AM_CPPFLAGS set for toytoolkit clients. With toytoolkit clients disabled, the build fails with missing wayland-client.h. Move AM_CFLAGS and AM_CPPFLAGS outside of conditional sections, since they are meant to be global settings. Let simple clients override AM_CPPFLAGS with their own SIMPLE_CLIENT_CFLAGS, which the configure script already sets up for us, but was unused until now. Signed-off-by: Pekka Paalanen --- clients/Makefile.am | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/clients/Makefile.am b/clients/Makefile.am index dd11382b..23771898 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -11,6 +11,12 @@ libexec_PROGRAMS = \ $(tablet_shell) \ $(screenshooter) +AM_CFLAGS = $(GCC_CFLAGS) +AM_CPPFLAGS = \ + -DDATADIR='"$(datadir)"' \ + -DBINDIR='"$(bindir)"' \ + $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS) + if BUILD_SIMPLE_CLIENTS simple_clients_programs = \ simple-egl \ @@ -18,12 +24,15 @@ simple_clients_programs = \ 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 +simple_shm_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS) simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) simple_touch_SOURCES = simple-touch.c +simple_touch_CPPFLAGS = $(SIMPLE_CLIENT_CFLAGS) simple_touch_LDADD = $(SIMPLE_CLIENT_LIBS) endif @@ -46,12 +55,6 @@ screenshooter = weston-screenshooter noinst_LIBRARIES = libtoytoolkit.a -AM_CFLAGS = $(GCC_CFLAGS) -AM_CPPFLAGS = \ - -DDATADIR='"$(datadir)"' \ - -DBINDIR='"$(bindir)"' \ - $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS) - libtoytoolkit_a_SOURCES = \ window.c \ window.h \