diff --git a/Makefile.am b/Makefile.am index a54ccbe..fb99319 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,8 @@ -SUBDIRS = include src examples +SUBDIRS = include src + +if ENABLE_EXAMPLES +SUBDIRS += examples +endif ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index b9b20ea..047b3f0 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,13 @@ AS_IF([test "x$enable_pty" = "xyes"], [ AC_DEFINE(ENABLE_PTY, [1], [Enable pseudo terminal support.]) ]) +# Example applications. +AC_ARG_ENABLE([examples], + [AS_HELP_STRING([--enable-examples=@<:@yes/no@:>@], + [Build example applications @<:@default=yes@:>@])], + [], [enable_examples=yes]) +AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"]) + # Checks for programs. AC_PROG_CC AC_PROG_CC_C99