There's a few places where I'm only concerned with building the libftdi
library (for integrating it into a JTAG program), so the examples are just
noise to me. As such, add an --without-examples configure flag so people
can easily disable the subdir. The default is unchanged -- examples are
still compiled & installed.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
])
AC_SUBST(ENABLE_ASYNC_MODE)
+AC_ARG_WITH(examples,
+ AS_HELP_STRING([--without-examples], [disable example programs]))
+AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$with_examples" != "xno"])
+
LIBFTDI_MODULES=
LIBFTDI_MODULES_PKGCONFIG=
endif
-bin_PROGRAMS = simple \
+if BUILD_EXAMPLES
+all_examples = simple \
bitbang \
bitbang2 \
bitbang_ft2232 \
serial_read \
baud_test \
$(examples_libftdipp)
+else
+all_examples =
+endif
+bin_PROGRAMS = $(all_examples)
# Don't install the example files
AM_LDFLAGS = -no-install