diff options
-rw-r--r-- | clients/Makefile.am | 21 | ||||
-rw-r--r-- | configure.ac | 5 |
2 files changed, 22 insertions, 4 deletions
diff --git a/clients/Makefile.am b/clients/Makefile.am index c2e423c..37135f2 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index 5568218..31654a6 100644 --- a/configure.ac +++ b/configure.ac @@ -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"], |