diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-10-01 13:12:18 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-11-17 07:57:38 +1000 |
commit | 675919b47c3284c12ccc51f09859bde4789df824 (patch) | |
tree | 05e7746878a430ab112200b4f7cd3ac006f4a823 /configure.ac | |
parent | b45e63f2b5ca11d102690b19d8c5f7685754e75c (diff) |
Add command line editing with linenoise
Enabled by default, but can be disabled with --disable-lineedit
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index 5c3a27a..599c035 100755 --- a/configure.ac +++ b/configure.ac @@ -75,15 +75,29 @@ AC_ARG_ENABLE(ipv6, ] ) AC_ARG_ENABLE(utf8, - [ --enable-utf8 include support for utf8-encoded strings], - [ - if test "x$enableval" = "xyes" ; then - dnl Note that utf-8 support requires the built-in regexp - EXTRA_CFLAGS="$EXTRA_CFLAGS -DJIM_UTF8 -DJIM_REGEXP" - fi - ] + [ --enable-utf8 include support for utf8-encoded strings], + [ + if test "x$enableval" = "xyes" ; then + dnl Note that utf-8 support requires the built-in regexp + EXTRA_CFLAGS="$EXTRA_CFLAGS -DJIM_UTF8 -DJIM_REGEXP" + fi + ] ) +lineedit=1 +AC_ARG_ENABLE(lineedit, + [ --disable-lineedit disable line editing], + [ + if test "x$enableval" = "xno" ; then + lineedit=0 + fi + ] +) +if test $lineedit -eq 1; then + EXTRA_CFLAGS="$EXTRA_CFLAGS -DUSE_LINENOISE" + EXTRA_OBJS="$EXTRA_OBJS linenoise.o" +fi + # Is $1 in list $2? in_list() { @@ -192,12 +206,12 @@ AC_ARG_ENABLE(static, AC_SUBST(JIM_LIBTYPE,$JIM_LIBTYPE) AC_ARG_WITH(jim-regexp, - [ --with-jim-regexp use the built-in (Tcl-compatible) regexp, even if POSIX regex is available], - [ - if test "x$withval" = "xyes" ; then - EXTRA_CFLAGS="$EXTRA_CFLAGS -DJIM_REGEXP" - fi - ] + [ --with-jim-regexp use the built-in (Tcl-compatible) regexp, even if POSIX regex is available], + [ + if test "x$withval" = "xyes" ; then + EXTRA_CFLAGS="$EXTRA_CFLAGS -DJIM_REGEXP" + fi + ] ) AC_CHECK_HEADERS([sys/un.h dlfcn.h]) |