clients: Make poppler-glib optional

Just don't compile the view client.
This commit is contained in:
Kristian Høgsberg 2011-01-11 13:48:03 -05:00
parent 1d3e93922d
commit 08c40c3550
2 changed files with 22 additions and 4 deletions

View file

@ -1,10 +1,20 @@
noinst_PROGRAMS = gears flower screenshot terminal image view dnd smoke resizor
noinst_PROGRAMS = \
gears \
flower \
screenshot \
terminal \
image \
$(poppler_programs) \
dnd \
smoke \
resizor
noinst_LTLIBRARIES = libtoytoolkit.la
INCLUDES = \
-I$(top_srcdir)/wayland \
-I$(top_builddir)/wayland \
$(CLIENT_CFLAGS) $(POPPLER_CFLAGS)
$(CLIENT_CFLAGS)
LDADD = libtoytoolkit.la \
$(top_builddir)/wayland/libwayland-client.la \
@ -27,7 +37,6 @@ gears_SOURCES = gears.c
screenshot_SOURCES = screenshot.c screenshooter-protocol.c
terminal_SOURCES = terminal.c
image_SOURCES = image.c
view_SOURCES = view.c
dnd_SOURCES = dnd.c
resizor_SOURCES = resizor.c
@ -40,4 +49,10 @@ CLEANFILES = $(BUILT_SOURCES)
include $(top_srcdir)/wayland/scanner.mk
terminal_LDADD = $(LDADD) -lutil
if HAVE_POPPLER
poppler_programs = view
view_SOURCES = view.c
view_LDADD = $(LDADD) $(POPPLER_LIBS)
view_CPPFLAGS = $(POPPLER_CFLAGS)
endif

View file

@ -25,7 +25,10 @@ PKG_CHECK_MODULES(FFI, [libffi])
PKG_CHECK_MODULES(COMPOSITOR,
[egl glesv2 gdk-pixbuf-2.0 libudev >= 136 libdrm >= 2.4.17] xcb-dri2 xcb-xfixes)
PKG_CHECK_MODULES(CLIENT, [egl gl cairo gdk-pixbuf-2.0 glib-2.0 gobject-2.0 xkbcommon libdrm])
PKG_CHECK_MODULES(POPPLER, [poppler-glib gdk-2.0])
PKG_CHECK_MODULES(POPPLER, [poppler-glib gdk-2.0],
[have_poppler=yes], [have_poppler=no])
AM_CONDITIONAL(HAVE_POPPLER, test "x$have_poppler" = "xyes")
PKG_CHECK_MODULES(CAIRO_GL, [cairo-gl],
[have_cairo_gl=yes], [have_cairo_gl=no])
AS_IF([test "x$have_cairo_gl" = "xyes"],