From: Mike Frysinger Date: Tue, 22 Jun 2010 22:46:09 +0000 (-0400) Subject: libftdi: add a --without-examples configure flag X-Git-Tag: v0.18~6 X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=010b6490502a478fcb3e87c29aeb76acf236321b libftdi: add a --without-examples configure flag 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 --- diff --git a/configure.in b/configure.in index addf696..f3dad4d 100644 --- a/configure.in +++ b/configure.in @@ -47,6 +47,10 @@ AC_ARG_WITH(async-mode, ]) 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= diff --git a/examples/Makefile.am b/examples/Makefile.am index 820599a..f45c7e5 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -10,7 +10,8 @@ examples_libftdipp = endif -bin_PROGRAMS = simple \ +if BUILD_EXAMPLES +all_examples = simple \ bitbang \ bitbang2 \ bitbang_ft2232 \ @@ -19,6 +20,10 @@ bin_PROGRAMS = simple \ serial_read \ baud_test \ $(examples_libftdipp) +else +all_examples = +endif +bin_PROGRAMS = $(all_examples) # Don't install the example files AM_LDFLAGS = -no-install