diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-08-20 06:43:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-08-20 06:43:20 -0700 |
commit | e263e2ed5cf155936d16a3cd2d91096c02a5e0f1 (patch) | |
tree | 45f2a68fe8246af60e477ec5bdda4ff764407e57 /configure | |
parent | cabd313483e2f2d23aebb9710458b67f0933f98b (diff) | |
download | txr-e263e2ed5cf155936d16a3cd2d91096c02a5e0f1.tar.gz txr-e263e2ed5cf155936d16a3cd2d91096c02a5e0f1.tar.bz2 txr-e263e2ed5cf155936d16a3cd2d91096c02a5e0f1.zip |
configure: implement full-repl option.
This patch unbundles the building of the full-featured REPL
from HAVE_TERMIOS. We make it subject to its own configuration
option CONFIG_FULL_REPL, which is 1 by default. This way, the
downstream users or package maintainers can build TXR without
the full-featured REPL even if HAVE_TERMIOS is 1, and the
other termios material is built-in.
* configure (full_repl): New variable.
(help): Include full-repl in the help text.
In the termios test, if we don't detect termios, then
negate the full_repl variable.
In the final config variable generation section, generate
the CONFIG_FULL_REPL 1 define in config.h, if full_repl
is true, ensuring it is subject to HAVE_TERMIOS, too.
* linenoise/linenoise.c: Replace HAVE_TERMIOS with
CONFIG_FULL_REPL.
* linenoise/linenoise.h: Likewise.
* parser.c: Likewise.
* txr.c: Likewise and ...
(if_termios): Macro renamed to if_full_repl.
(if_full_repl): New macro.
(opt_noninteractive): Use if_full_repl macro for
initializing.
(banner): Use if_ful_repl macro instead of if_termios.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -186,6 +186,7 @@ extra_debugging= debug_support=y gen_gc=y small_mem= +full_repl=y have_dbl_decimal_dig= have_unistd= have_sys_stat= @@ -546,6 +547,12 @@ small-mem [$small_mem] and certain global book-keeping arrays in the generational garbage collector are smaller, resulting in more frequent collections. +full-repl [$full_repl] + + Support the full listener with editing features. If this is disabled, + only the plain-mode listener is available. Failure to detect the + presence of termios at build configuration time time also disables it. + build-id [$build_id] This option specifies the value of the build_id make variable. @@ -3231,6 +3238,7 @@ if conftest ; then have_termios=y else printf "no\n" + full_repl= fi printf "Checking for struct winsize ... " @@ -3816,6 +3824,12 @@ $make conftest.clean [ -n "$gen_gc" ] && printf "#define CONFIG_GEN_GC 1\n" >> config.h [ "$small_mem" ] && printf "#define CONFIG_SMALL_MEM 1\n" >> config.h +[ "$full_repl" ] && cat >> config.h <<! +#if HAVE_TERMIOS +#define CONFIG_FULL_REPL 1 +#endif +! + # # Regenerate config.make # |