Since libedit originates from NetBSD, this and other BSDs use the
official version while Linux distributions tend to use the
autotoolized fork. The official version does not install a .pc file so
we cannot rely exclusively on pkg-config for detection.
FS-6408
Signed-off-by: Travis Cross <tc@traviscross.com>
Previously we enabled libedit support opportunistically if it was
neither enabled nor disabled explicitly. But this can result in
people being confused by libedit features not being available when
they really just need to install dependencies. With this change,
we'll break on configure if libedit-dev isn't there. If the user
really wants to build without libedit they just need to explicitly
disable it.
Cc: Ken Rice <krice@freeswitch.org>
Now that all output should end in a newline, we don't need to play
tricks with getting certain escape codes out ahead of buffered output.
This updates what we tried to do in commit
991b83d23c.
This partially reverts commit
8056125077.
The issue is that sofia siptrace output doesn't end each line with a
newline. Instead it sends a separate newline afterward, which comes
in as a separate event body. With the new EL_REFRESH code in effect
the line is being cleared after the siptrace output has been written
but before that next newline comes in.
With our own refresh code this doesn't happen because of slight
differences in where the stdio buffers get flushed compared to where
the output of clear_line() ends up.
This is a bit of a clumsy workaround. But we'll fix it first, then
refactor.
Using the system libedit means that libedit will again make absolute
movements on certain kinds of terminals. Older versions of libedit
without EL_PROMPT_ESC miscalculate the length of the prompt.
Combined, this results in the cursor ending up in the wrong place.
We knew this was a possibility when we moved to system libedit, and
we're OK with it. We certainly lived without this fancy prompt
feature for a long time.
This change puts back in place detection of the terminal type when
EL_PROMPT_ESC isn't available. On these older versions of libedit,
we'll only enable the fancy features when we know that libedit will
only make relative movements and not tickle the bug.
This partially reverts commit:
b9b77bd615
Newer versions of libedit provide an EL_REFRESH mechanism for
redrawing the prompt. We had previously written our own code to
handle this. In theory handing this over to libedit should be better.
Unfortunately when using EL_REFRESH the output of sofia siptrace isn't
showing up. We're working on that, but for now we're just force own
our redrawing code to be used instead.
We consider mod_spidermonkey to be completely replaced by mod_v8 (and
more generally by mod_lua) at this point. We've barely supported
mod_spidermonkey for years. Everyone should stop using it.
We're keeping this around for awhile in case people are relying on C
extensions to mod_spidermonkey and need time to migrate. This module
may or may not be part of a v1.4 release depending on whether we find
anyone cares. It definitely will not be part of the next release
after v1.4.