Skip to content

Commit

Permalink
configure: Add --enable-examples option to build examples/
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
  • Loading branch information
troglobit committed Jun 8, 2020
1 parent 2ebe905 commit 63b94d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile.am
Expand Up @@ -2,7 +2,11 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libeditline.pc
doc_DATA = README.md LICENSE
EXTRA_DIST = README.md LICENSE ChangeLog.md INSTALL.md
SUBDIRS = src include man examples
SUBDIRS = src include man

if ENABLE_EXAMPLES
SUBDIRS += examples
endif

## Generate MD5 checksum file
MD5 = md5sum
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Expand Up @@ -61,6 +61,10 @@ AC_ARG_ENABLE(terminal-bell,
AC_ARG_ENABLE(termcap,
AS_HELP_STRING([--enable-termcap], [Use termcap library to query terminal size.]))

AC_ARG_ENABLE([examples],
[AC_HELP_STRING([--enable-examples], [Build examples/ directory])],
[], [enable_examples=no])

#
# Check what features have been enabled
#
Expand All @@ -82,6 +86,8 @@ AS_IF([test "x$enable_sigstop" = "xyes"],
AS_IF([test "x$enable_terminal_bell" = "xyes"],
AC_DEFINE(CONFIG_TERMINAL_BELL, 1, [Define to enable terminal bell on completion.]))

AM_CONDITIONAL([ENABLE_EXAMPLES], [test "$enable_examples" = yes])

# Check for a termcap compatible library if enabled
AS_IF([test "x$enable_termcap" = "xyes"],
AC_DEFINE(CONFIG_USE_TERMCAP, 1, [Define to use the termcap library for terminal size.])
Expand Down

0 comments on commit 63b94d2

Please sign in to comment.