diff --git a/apps/Makefile.am b/apps/Makefile.am index b26e1d4..99ec51c 100644 --- a/apps/Makefile.am +++ b/apps/Makefile.am @@ -1,17 +1,23 @@ AM_CFLAGS = $(WARN_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/include -bin_PROGRAMS = planes render grab +bin_PROGRAMS = planes + +if ENABLE_EXAMPLES +bin_PROGRAMS += render grab if HAVE_DIRECTFB bin_PROGRAMS += dfblayers endif +endif planes_SOURCES = planes.c planes_CFLAGS = $(AM_CFLAGS) $(LIBDRM_CFLAGS) $(CAIRO_CFLAGS) planes_LDADD = $(top_builddir)/src/libplanes.la $(LIBDRM_LIBS) $(CAIRO_LIBS) planesdir = $(prefix)/share/planes +if ENABLE_EXAMPLES planes_DATA = $(wildcard $(top_srcdir)/configs/*.png) \ $(wildcard $(top_srcdir)/configs/*.config) +endif planes_LDFLAGS = $(AM_LDFLAGS) render_SOURCES = render.c diff --git a/configure.ac b/configure.ac index 83b09f5..938940f 100644 --- a/configure.ac +++ b/configure.ac @@ -137,6 +137,11 @@ if test "x$PYTHON" = xyes; then fi AM_CONDITIONAL(HAVE_PYTHON, [test "x$have_python" = xyes]) +AC_ARG_ENABLE([examples], + [AS_HELP_STRING([--enable-examples], [build examples [default=yes]])], + [enable_examples=$enableval], [enable_examples=yes]) +AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x${enable_examples}" = xyes]) + AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_FUNC_ALLOCA