summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2016-11-14 11:16:03 -0700
committerGeorge Joseph <gjoseph@digium.com>2016-11-14 13:20:38 -0500
commit72da2ef9ffb49a1fc550ec91caa1468e285f87e0 (patch)
treef07f0c93bf93ea450a52d266c2e151e46ed9054e /configure.ac
parent7540036427f87bfe3c87357ac33c08561f191e98 (diff)
cli: Fix ast_el_read_char to work with libedit >= 3.1
Libedit 3.1 is not build with unicode on as a default and so the prototype for the el_gets callback changed from expecting a char buffer to accepting a wchar buffer. If ast_el_read_char isn't changed, the cli reads garbage from teh terminal. Added a configure test for (*el_rfunc_t)(EditLine *, wchar_t *) and updated ast_el_read_char to use the HAVE_ define to detemrine whether to use char or wchar. ASTERISK-26592 #close Change-Id: I9099b46f68e06d0202ff80e53022a2b68b08871a
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index ea55df416..7261e535c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -479,6 +479,7 @@ AST_EXT_LIB_SETUP([KQUEUE], [kqueue support], [kqueue])
AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap])
AST_LIBCURL_CHECK_CONFIG([], [7.10.1])
AST_EXT_LIB_SETUP([LIBEDIT], [NetBSD Editline library], [libedit], [, use 'internal' Editline otherwise])
+AST_EXT_LIB_SETUP_OPTIONAL([LIBEDIT_IS_UNICODE], [Libedit compiled for unicode], [LIBEDIT], [libedit])
AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2])
AST_EXT_LIB_SETUP([LIBXSLT], [LibXSLT], [libxslt])
AST_EXT_LIB_SETUP_OPTIONAL([LIBXSLT_CLEANUP], [LibXSLT Library Cleanup Function], [LIBXSLT], [libxslt])
@@ -1530,11 +1531,14 @@ if test "${USE_LIBEDIT}" != "no"; then
if test "${LIBEDIT_SYSTEM}" = "yes"; then
AST_PKG_CONFIG_CHECK(LIBEDIT, libedit)
if test "$PBX_LIBEDIT" = "1"; then
- LIBEDIT_INTERNAL="no"
+ LIBEDIT_INTERNAL="no"
fi
fi
if test "${LIBEDIT_INTERNAL}" = "yes"; then
PBX_LIBEDIT=1
+ LIBEDIT_IS_UNICODE=no
+ else
+ AST_C_COMPILE_CHECK([LIBEDIT_IS_UNICODE], [el_rfunc_t *callback;], [histedit.h], [], [Testing for libedit unicode support])
fi
fi