<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8628">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BuildSystem: With external editline, do not require libs for internal editline.<br><br>ASTERISK-27761<br><br>Change-Id: Ib17a7415297a210cfcdbf149e4df9b6edadbfab6<br>---<br>M configure<br>M configure.ac<br>M include/asterisk/autoconfig.h.in<br>M main/Makefile<br>M makeopts.in<br>5 files changed, 297 insertions(+), 763 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/28/8628/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index 4e07f0e..2e01094 100755<br>--- a/configure<br>+++ b/configure<br>@@ -672,16 +672,11 @@<br> CONFIG_MYSQLCLIENT<br> PBX_MISDN_FAC_ERROR<br> PBX_MISDN_FAC_RESULT<br>-LIBEDIT_LIBS<br>-LIBEDIT_CFLAGS<br> ILBC_LIBS<br> ILBC_CFLAGS<br> ILBC_INTERNAL<br> GSM_INTERNAL<br> PBX_DAHDI_HALF_FULL<br>-PKG_CONFIG_LIBDIR<br>-PKG_CONFIG_PATH<br>-PKG_CONFIG<br> PBX_DLADDR<br> PBX_IP_MTU_DISCOVER<br> PBX_RTLD_NOLOAD<br>@@ -712,7 +707,11 @@<br> CONFIG_LIBXML2<br> UUID_LIB<br> UUID_INCLUDE<br>-EDITLINE_LIB<br>+LIBEDIT_LIBS<br>+LIBEDIT_CFLAGS<br>+PKG_CONFIG_LIBDIR<br>+PKG_CONFIG_PATH<br>+PKG_CONFIG<br> ALLOCA<br> PBX_ZLIB<br> ZLIB_DIR<br>@@ -742,18 +741,10 @@<br> TONEZONE_DIR<br> TONEZONE_INCLUDE<br> TONEZONE_LIB<br>-PBX_TINFO<br>-TINFO_DIR<br>-TINFO_INCLUDE<br>-TINFO_LIB<br> PBX_TIMERFD<br> TIMERFD_DIR<br> TIMERFD_INCLUDE<br> TIMERFD_LIB<br>-PBX_TERMCAP<br>-TERMCAP_DIR<br>-TERMCAP_INCLUDE<br>-TERMCAP_LIB<br> PBX_FREETDS<br> FREETDS_DIR<br> FREETDS_INCLUDE<br>@@ -1026,10 +1017,6 @@<br> NEON_DIR<br> NEON_INCLUDE<br> NEON_LIB<br>-PBX_NCURSES<br>-NCURSES_DIR<br>-NCURSES_INCLUDE<br>-NCURSES_LIB<br> PBX_NBS<br> NBS_DIR<br> NBS_INCLUDE<br>@@ -1162,10 +1149,6 @@<br> CRYPT_DIR<br> CRYPT_INCLUDE<br> CRYPT_LIB<br>-PBX_CURSES<br>-CURSES_DIR<br>-CURSES_INCLUDE<br>-CURSES_LIB<br> PBX_COROSYNC_CFG_STATE_TRACK<br> COROSYNC_CFG_STATE_TRACK_DIR<br> COROSYNC_CFG_STATE_TRACK_INCLUDE<br>@@ -1378,7 +1361,6 @@<br> with_cap<br> with_codec2<br> with_cpg<br>-with_curses<br> with_crypt<br> with_crypto<br> with_dahdi<br>@@ -1408,7 +1390,6 @@<br> with_misdn<br> with_mysqlclient<br> with_nbs<br>-with_ncurses<br> with_neon<br> with_neon29<br> with_netsnmp<br>@@ -1441,9 +1422,7 @@<br> with_ssl<br> with_suppserv<br> with_tds<br>-with_termcap<br> with_timerfd<br>-with_tinfo<br> with_tonezone<br> with_unbound<br> with_unixodbc<br>@@ -1474,10 +1453,10 @@<br> PKG_CONFIG<br> PKG_CONFIG_PATH<br> PKG_CONFIG_LIBDIR<br>-ILBC_CFLAGS<br>-ILBC_LIBS<br> LIBEDIT_CFLAGS<br> LIBEDIT_LIBS<br>+ILBC_CFLAGS<br>+ILBC_LIBS<br> PJPROJECT_CFLAGS<br> PJPROJECT_LIBS<br> PYTHONDEV_CFLAGS<br>@@ -2131,7 +2110,6 @@<br>   --with-cap=PATH         use POSIX 1.e capabilities files in PATH<br>   --with-codec2=PATH      use Codec 2 Audio Decoder/Encoder files in PATH<br>   --with-cpg=PATH         use Corosync files in PATH<br>-  --with-curses=PATH      use curses files in PATH<br>   --with-crypt=PATH       use password and data encryption files in PATH<br>   --with-crypto=PATH      use OpenSSL Cryptography files in PATH<br>   --with-dahdi=PATH       use DAHDI files in PATH<br>@@ -2164,7 +2142,6 @@<br>   --with-misdn=PATH       use mISDN user files in PATH<br>   --with-mysqlclient=PATH use MySQL client files in PATH<br>   --with-nbs=PATH         use Network Broadcast Sound files in PATH<br>-  --with-ncurses=PATH     use ncurses files in PATH<br>   --with-neon=PATH        use neon files in PATH<br>   --with-neon29=PATH      use neon29 files in PATH<br>   --with-netsnmp=PATH     use Net-SNMP files in PATH<br>@@ -2198,9 +2175,7 @@<br>   --with-ssl=PATH         use OpenSSL Secure Sockets Layer files in PATH<br>   --with-suppserv=PATH    use mISDN Supplemental Services files in PATH<br>   --with-tds=PATH         use FreeTDS files in PATH<br>-  --with-termcap=PATH     use Termcap files in PATH<br>   --with-timerfd=PATH     use timerfd files in PATH<br>-  --with-tinfo=PATH       use Term Info files in PATH<br>   --with-tonezone=PATH    use tonezone files in PATH<br>   --with-unbound=PATH     use unbound files in PATH<br>   --with-unixodbc=PATH    use unixODBC files in PATH<br>@@ -2228,12 +2203,12 @@<br>               directories to add to pkg-config's search path<br>   PKG_CONFIG_LIBDIR<br>               path overriding pkg-config's built-in search path<br>-  ILBC_CFLAGS C compiler flags for ILBC, overriding pkg-config<br>-  ILBC_LIBS   linker flags for ILBC, overriding pkg-config<br>   LIBEDIT_CFLAGS<br>               C compiler flags for LIBEDIT, overriding pkg-config<br>   LIBEDIT_LIBS<br>               linker flags for LIBEDIT, overriding pkg-config<br>+  ILBC_CFLAGS C compiler flags for ILBC, overriding pkg-config<br>+  ILBC_LIBS   linker flags for ILBC, overriding pkg-config<br>   PJPROJECT_CFLAGS<br>               C compiler flags for PJPROJECT, overriding pkg-config<br>   PJPROJECT_LIBS<br>@@ -9570,38 +9545,6 @@<br> <br> <br> <br>-    CURSES_DESCRIP="curses"<br>-    CURSES_OPTION="curses"<br>-    PBX_CURSES=0<br>-<br>-# Check whether --with-curses was given.<br>-if test "${with_curses+set}" = set; then :<br>-  withval=$with_curses;<br>-     case ${withval} in<br>-   n|no)<br>-        USE_CURSES=no<br>-        # -1 is a magic value used by menuselect to know that the package<br>-    # was disabled, other than 'not found'<br>-       PBX_CURSES=-1<br>-        ;;<br>-   y|ye|yes)<br>-    ac_mandatory_list="${ac_mandatory_list} CURSES"<br>-    ;;<br>-   *)<br>-   CURSES_DIR="${withval}"<br>-    ac_mandatory_list="${ac_mandatory_list} CURSES"<br>-    ;;<br>-   esac<br>-<br>-fi<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>     CRYPT_DESCRIP="password and data encryption"<br>     CRYPT_OPTION="crypt"<br>     PBX_CRYPT=0<br>@@ -10921,38 +10864,6 @@<br>    *)<br>    NBS_DIR="${withval}"<br>        ac_mandatory_list="${ac_mandatory_list} NBS"<br>-       ;;<br>-   esac<br>-<br>-fi<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>-    NCURSES_DESCRIP="ncurses"<br>-    NCURSES_OPTION="ncurses"<br>-    PBX_NCURSES=0<br>-<br>-# Check whether --with-ncurses was given.<br>-if test "${with_ncurses+set}" = set; then :<br>-  withval=$with_ncurses;<br>-        case ${withval} in<br>-   n|no)<br>-        USE_NCURSES=no<br>-       # -1 is a magic value used by menuselect to know that the package<br>-    # was disabled, other than 'not found'<br>-       PBX_NCURSES=-1<br>-       ;;<br>-   y|ye|yes)<br>-    ac_mandatory_list="${ac_mandatory_list} NCURSES"<br>-   ;;<br>-   *)<br>-   NCURSES_DIR="${withval}"<br>-   ac_mandatory_list="${ac_mandatory_list} NCURSES"<br>    ;;<br>    esac<br> <br>@@ -12472,38 +12383,6 @@<br> <br> <br> <br>-    TERMCAP_DESCRIP="Termcap"<br>-    TERMCAP_OPTION="termcap"<br>-    PBX_TERMCAP=0<br>-<br>-# Check whether --with-termcap was given.<br>-if test "${with_termcap+set}" = set; then :<br>-  withval=$with_termcap;<br>-  case ${withval} in<br>-   n|no)<br>-        USE_TERMCAP=no<br>-       # -1 is a magic value used by menuselect to know that the package<br>-    # was disabled, other than 'not found'<br>-       PBX_TERMCAP=-1<br>-       ;;<br>-   y|ye|yes)<br>-    ac_mandatory_list="${ac_mandatory_list} TERMCAP"<br>-   ;;<br>-   *)<br>-   TERMCAP_DIR="${withval}"<br>-   ac_mandatory_list="${ac_mandatory_list} TERMCAP"<br>-   ;;<br>-   esac<br>-<br>-fi<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>     TIMERFD_DESCRIP="timerfd"<br>     TIMERFD_OPTION="timerfd"<br>     PBX_TIMERFD=0<br>@@ -12524,38 +12403,6 @@<br>         *)<br>    TIMERFD_DIR="${withval}"<br>    ac_mandatory_list="${ac_mandatory_list} TIMERFD"<br>-   ;;<br>-   esac<br>-<br>-fi<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>-<br>-    TINFO_DESCRIP="Term Info"<br>-    TINFO_OPTION="tinfo"<br>-    PBX_TINFO=0<br>-<br>-# Check whether --with-tinfo was given.<br>-if test "${with_tinfo+set}" = set; then :<br>-  withval=$with_tinfo;<br>-    case ${withval} in<br>-   n|no)<br>-        USE_TINFO=no<br>- # -1 is a magic value used by menuselect to know that the package<br>-    # was disabled, other than 'not found'<br>-       PBX_TINFO=-1<br>- ;;<br>-   y|ye|yes)<br>-    ac_mandatory_list="${ac_mandatory_list} TINFO"<br>-     ;;<br>-   *)<br>-   TINFO_DIR="${withval}"<br>-     ac_mandatory_list="${ac_mandatory_list} TINFO"<br>      ;;<br>    esac<br> <br>@@ -13386,28 +13233,237 @@<br> done<br> <br> <br>-# Any one of these packages support a mandatory requirement, so we want to check on them as early as possible.<br>+# Find required NetBSD Editline library (libedit).<br> <br>-if test "x${PBX_TERMCAP}" != "x1" -a "${USE_TERMCAP}" != "no"; then<br>+<br>+<br>+<br>+<br>+<br>+<br>+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then<br>+ if test -n "$ac_tool_prefix"; then<br>+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.<br>+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5<br>+$as_echo_n "checking for $ac_word... " >&6; }<br>+if ${ac_cv_path_PKG_CONFIG+:} false; then :<br>+  $as_echo_n "(cached) " >&6<br>+else<br>+  case $PKG_CONFIG in<br>+  [\\/]* | ?:[\\/]*)<br>+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.<br>+  ;;<br>+  *)<br>+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR<br>+for as_dir in $PATH<br>+do<br>+  IFS=$as_save_IFS<br>+  test -z "$as_dir" && as_dir=.<br>+    for ac_exec_ext in '' $ac_executable_extensions; do<br>+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then<br>+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"<br>+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5<br>+    break 2<br>+  fi<br>+done<br>+  done<br>+IFS=$as_save_IFS<br>+<br>+  ;;<br>+esac<br>+fi<br>+PKG_CONFIG=$ac_cv_path_PKG_CONFIG<br>+if test -n "$PKG_CONFIG"; then<br>+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5<br>+$as_echo "$PKG_CONFIG" >&6; }<br>+else<br>+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+fi<br>+<br>+<br>+fi<br>+if test -z "$ac_cv_path_PKG_CONFIG"; then<br>+  ac_pt_PKG_CONFIG=$PKG_CONFIG<br>+  # Extract the first word of "pkg-config", so it can be a program name with args.<br>+set dummy pkg-config; ac_word=$2<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5<br>+$as_echo_n "checking for $ac_word... " >&6; }<br>+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :<br>+  $as_echo_n "(cached) " >&6<br>+else<br>+  case $ac_pt_PKG_CONFIG in<br>+  [\\/]* | ?:[\\/]*)<br>+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.<br>+  ;;<br>+  *)<br>+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR<br>+for as_dir in $PATH<br>+do<br>+  IFS=$as_save_IFS<br>+  test -z "$as_dir" && as_dir=.<br>+    for ac_exec_ext in '' $ac_executable_extensions; do<br>+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then<br>+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"<br>+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5<br>+    break 2<br>+  fi<br>+done<br>+  done<br>+IFS=$as_save_IFS<br>+<br>+  ;;<br>+esac<br>+fi<br>+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG<br>+if test -n "$ac_pt_PKG_CONFIG"; then<br>+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5<br>+$as_echo "$ac_pt_PKG_CONFIG" >&6; }<br>+else<br>+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+fi<br>+<br>+  if test "x$ac_pt_PKG_CONFIG" = x; then<br>+    PKG_CONFIG=""<br>+  else<br>+    case $cross_compiling:$ac_tool_warned in<br>+yes:)<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5<br>+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}<br>+ac_tool_warned=yes ;;<br>+esac<br>+    PKG_CONFIG=$ac_pt_PKG_CONFIG<br>+  fi<br>+else<br>+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"<br>+fi<br>+<br>+fi<br>+if test -n "$PKG_CONFIG"; then<br>+  _pkg_min_version=0.9.0<br>+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5<br>+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }<br>+        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then<br>+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5<br>+$as_echo "yes" >&6; }<br>+  else<br>+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+            PKG_CONFIG=""<br>+      fi<br>+fi<br>+<br>+   if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then<br>+<br>+pkg_failed=no<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEDIT" >&5<br>+$as_echo_n "checking for LIBEDIT... " >&6; }<br>+<br>+if test -n "$LIBEDIT_CFLAGS"; then<br>+    pkg_cv_LIBEDIT_CFLAGS="$LIBEDIT_CFLAGS"<br>+ elif test -n "$PKG_CONFIG"; then<br>+    if test -n "$PKG_CONFIG" && \<br>+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5<br>+  ($PKG_CONFIG --exists --print-errors "libedit") 2>&5<br>+  ac_status=$?<br>+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5<br>+  test $ac_status = 0; }; then<br>+  pkg_cv_LIBEDIT_CFLAGS=`$PKG_CONFIG --cflags "libedit" 2>/dev/null`<br>+                  test "x$?" != "x0" && pkg_failed=yes<br>+else<br>+  pkg_failed=yes<br>+fi<br>+ else<br>+    pkg_failed=untried<br>+fi<br>+if test -n "$LIBEDIT_LIBS"; then<br>+    pkg_cv_LIBEDIT_LIBS="$LIBEDIT_LIBS"<br>+ elif test -n "$PKG_CONFIG"; then<br>+    if test -n "$PKG_CONFIG" && \<br>+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5<br>+  ($PKG_CONFIG --exists --print-errors "libedit") 2>&5<br>+  ac_status=$?<br>+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5<br>+  test $ac_status = 0; }; then<br>+  pkg_cv_LIBEDIT_LIBS=`$PKG_CONFIG --libs "libedit" 2>/dev/null`<br>+                test "x$?" != "x0" && pkg_failed=yes<br>+else<br>+  pkg_failed=yes<br>+fi<br>+ else<br>+    pkg_failed=untried<br>+fi<br>+<br>+<br>+<br>+if test $pkg_failed = yes; then<br>+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+<br>+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then<br>+        _pkg_short_errors_supported=yes<br>+else<br>+        _pkg_short_errors_supported=no<br>+fi<br>+        if test $_pkg_short_errors_supported = yes; then<br>+               LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libedit" 2>&1`<br>+        else<br>+                LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libedit" 2>&1`<br>+        fi<br>+ # Put the nasty error message in config.log where it belongs<br>+ echo "$LIBEDIT_PKG_ERRORS" >&5<br>+<br>+<br>+            PBX_LIBEDIT=0<br>+<br>+<br>+elif test $pkg_failed = untried; then<br>+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+<br>+            PBX_LIBEDIT=0<br>+<br>+<br>+else<br>+        LIBEDIT_CFLAGS=$pkg_cv_LIBEDIT_CFLAGS<br>+        LIBEDIT_LIBS=$pkg_cv_LIBEDIT_LIBS<br>+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5<br>+$as_echo "yes" >&6; }<br>+<br>+            PBX_LIBEDIT=1<br>+            LIBEDIT_INCLUDE="$LIBEDIT_CFLAGS"<br>+            LIBEDIT_LIB="$LIBEDIT_LIBS"<br>+<br>+$as_echo "#define HAVE_LIBEDIT 1" >>confdefs.h<br>+<br>+<br>+fi<br>+   fi<br>+<br>+# some platforms do not list libedit via pkg-config, for example OpenBSD 6.2<br>+<br>+if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then<br>    pbxlibdir=""<br>-   # if --with-TERMCAP=DIR has been specified, use it.<br>-   if test "x${TERMCAP_DIR}" != "x"; then<br>-      if test -d ${TERMCAP_DIR}/lib; then<br>-         pbxlibdir="-L${TERMCAP_DIR}/lib"<br>+   # if --with-LIBEDIT=DIR has been specified, use it.<br>+   if test "x${LIBEDIT_DIR}" != "x"; then<br>+      if test -d ${LIBEDIT_DIR}/lib; then<br>+         pbxlibdir="-L${LIBEDIT_DIR}/lib"<br>       else<br>-         pbxlibdir="-L${TERMCAP_DIR}"<br>+         pbxlibdir="-L${LIBEDIT_DIR}"<br>       fi<br>    fi<br> <br>       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br>       CFLAGS="${CFLAGS} "<br>-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5<br>-$as_echo_n "checking for tgetent in -ltermcap... " >&6; }<br>-if ${ac_cv_lib_termcap_tgetent+:} false; then :<br>+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_init in -ledit" >&5<br>+$as_echo_n "checking for history_init in -ledit... " >&6; }<br>+if ${ac_cv_lib_edit_history_init+:} false; then :<br>   $as_echo_n "(cached) " >&6<br> else<br>   ac_check_lib_save_LIBS=$LIBS<br>-LIBS="-ltermcap ${pbxlibdir}  $LIBS"<br>+LIBS="-ledit ${pbxlibdir} -ltermcap $LIBS"<br> cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br> /* end confdefs.h.  */<br> <br>@@ -13417,237 +13473,65 @@<br> #ifdef __cplusplus<br> extern "C"<br> #endif<br>-char tgetent ();<br>+char history_init ();<br> int<br> main ()<br> {<br>-return tgetent ();<br>+return history_init ();<br>   ;<br>   return 0;<br> }<br> _ACEOF<br> if ac_fn_c_try_link "$LINENO"; then :<br>-  ac_cv_lib_termcap_tgetent=yes<br>+  ac_cv_lib_edit_history_init=yes<br> else<br>-  ac_cv_lib_termcap_tgetent=no<br>+  ac_cv_lib_edit_history_init=no<br> fi<br> rm -f core conftest.err conftest.$ac_objext \<br>     conftest$ac_exeext conftest.$ac_ext<br> LIBS=$ac_check_lib_save_LIBS<br> fi<br>-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5<br>-$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }<br>-if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :<br>-  AST_TERMCAP_FOUND=yes<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_history_init" >&5<br>+$as_echo "$ac_cv_lib_edit_history_init" >&6; }<br>+if test "x$ac_cv_lib_edit_history_init" = xyes; then :<br>+  AST_LIBEDIT_FOUND=yes<br> else<br>-  AST_TERMCAP_FOUND=no<br>+  AST_LIBEDIT_FOUND=no<br> fi<br> <br>       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"<br> <br> <br>    # now check for the header.<br>-   if test "${AST_TERMCAP_FOUND}" = "yes"; then<br>-      TERMCAP_LIB="${pbxlibdir} -ltermcap "<br>-      # if --with-TERMCAP=DIR has been specified, use it.<br>-      if test "x${TERMCAP_DIR}" != "x"; then<br>-         TERMCAP_INCLUDE="-I${TERMCAP_DIR}/include"<br>+   if test "${AST_LIBEDIT_FOUND}" = "yes"; then<br>+      LIBEDIT_LIB="${pbxlibdir} -ledit -ltermcap"<br>+      # if --with-LIBEDIT=DIR has been specified, use it.<br>+      if test "x${LIBEDIT_DIR}" != "x"; then<br>+         LIBEDIT_INCLUDE="-I${LIBEDIT_DIR}/include"<br>       fi<br>-      TERMCAP_INCLUDE="${TERMCAP_INCLUDE} "<br>-<br>-         # no header, assume found<br>-         TERMCAP_HEADER_FOUND="1"<br>-<br>-      if test "x${TERMCAP_HEADER_FOUND}" = "x0" ; then<br>-         TERMCAP_LIB=""<br>-         TERMCAP_INCLUDE=""<br>-      else<br>-<br>-         PBX_TERMCAP=1<br>-         cat >>confdefs.h <<_ACEOF<br>-#define HAVE_TERMCAP 1<br>-_ACEOF<br>-<br>-      fi<br>-   fi<br>-fi<br>-<br>-<br>-<br>-if test "x${PBX_TINFO}" != "x1" -a "${USE_TINFO}" != "no"; then<br>-   pbxlibdir=""<br>-   # if --with-TINFO=DIR has been specified, use it.<br>-   if test "x${TINFO_DIR}" != "x"; then<br>-      if test -d ${TINFO_DIR}/lib; then<br>-         pbxlibdir="-L${TINFO_DIR}/lib"<br>-      else<br>-         pbxlibdir="-L${TINFO_DIR}"<br>-      fi<br>-   fi<br>-<br>-      ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br>-      CFLAGS="${CFLAGS} "<br>-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5<br>-$as_echo_n "checking for tgetent in -ltinfo... " >&6; }<br>-if ${ac_cv_lib_tinfo_tgetent+:} false; then :<br>-  $as_echo_n "(cached) " >&6<br>-else<br>-  ac_check_lib_save_LIBS=$LIBS<br>-LIBS="-ltinfo ${pbxlibdir}  $LIBS"<br>-cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>-/* end confdefs.h.  */<br>-<br>-/* Override any GCC internal prototype to avoid an error.<br>-   Use char because int might match the return type of a GCC<br>-   builtin and then its argument prototype would still apply.  */<br>-#ifdef __cplusplus<br>-extern "C"<br>-#endif<br>-char tgetent ();<br>-int<br>-main ()<br>-{<br>-return tgetent ();<br>-  ;<br>-  return 0;<br>-}<br>-_ACEOF<br>-if ac_fn_c_try_link "$LINENO"; then :<br>-  ac_cv_lib_tinfo_tgetent=yes<br>-else<br>-  ac_cv_lib_tinfo_tgetent=no<br>-fi<br>-rm -f core conftest.err conftest.$ac_objext \<br>-    conftest$ac_exeext conftest.$ac_ext<br>-LIBS=$ac_check_lib_save_LIBS<br>-fi<br>-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5<br>-$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }<br>-if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :<br>-  AST_TINFO_FOUND=yes<br>-else<br>-  AST_TINFO_FOUND=no<br>-fi<br>-<br>-      CFLAGS="${ast_ext_lib_check_save_CFLAGS}"<br>-<br>-<br>-   # now check for the header.<br>-   if test "${AST_TINFO_FOUND}" = "yes"; then<br>-      TINFO_LIB="${pbxlibdir} -ltinfo "<br>-      # if --with-TINFO=DIR has been specified, use it.<br>-      if test "x${TINFO_DIR}" != "x"; then<br>-         TINFO_INCLUDE="-I${TINFO_DIR}/include"<br>-      fi<br>-      TINFO_INCLUDE="${TINFO_INCLUDE} "<br>-<br>-         # no header, assume found<br>-         TINFO_HEADER_FOUND="1"<br>-<br>-      if test "x${TINFO_HEADER_FOUND}" = "x0" ; then<br>-         TINFO_LIB=""<br>-         TINFO_INCLUDE=""<br>-      else<br>-<br>-         PBX_TINFO=1<br>-         cat >>confdefs.h <<_ACEOF<br>-#define HAVE_TINFO 1<br>-_ACEOF<br>-<br>-      fi<br>-   fi<br>-fi<br>-<br>-<br>-<br>-if test "x${PBX_CURSES}" != "x1" -a "${USE_CURSES}" != "no"; then<br>-   pbxlibdir=""<br>-   # if --with-CURSES=DIR has been specified, use it.<br>-   if test "x${CURSES_DIR}" != "x"; then<br>-      if test -d ${CURSES_DIR}/lib; then<br>-         pbxlibdir="-L${CURSES_DIR}/lib"<br>-      else<br>-         pbxlibdir="-L${CURSES_DIR}"<br>-      fi<br>-   fi<br>-<br>-      ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br>-      CFLAGS="${CFLAGS} "<br>-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcurses" >&5<br>-$as_echo_n "checking for initscr in -lcurses... " >&6; }<br>-if ${ac_cv_lib_curses_initscr+:} false; then :<br>-  $as_echo_n "(cached) " >&6<br>-else<br>-  ac_check_lib_save_LIBS=$LIBS<br>-LIBS="-lcurses ${pbxlibdir}  $LIBS"<br>-cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>-/* end confdefs.h.  */<br>-<br>-/* Override any GCC internal prototype to avoid an error.<br>-   Use char because int might match the return type of a GCC<br>-   builtin and then its argument prototype would still apply.  */<br>-#ifdef __cplusplus<br>-extern "C"<br>-#endif<br>-char initscr ();<br>-int<br>-main ()<br>-{<br>-return initscr ();<br>-  ;<br>-  return 0;<br>-}<br>-_ACEOF<br>-if ac_fn_c_try_link "$LINENO"; then :<br>-  ac_cv_lib_curses_initscr=yes<br>-else<br>-  ac_cv_lib_curses_initscr=no<br>-fi<br>-rm -f core conftest.err conftest.$ac_objext \<br>-    conftest$ac_exeext conftest.$ac_ext<br>-LIBS=$ac_check_lib_save_LIBS<br>-fi<br>-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_initscr" >&5<br>-$as_echo "$ac_cv_lib_curses_initscr" >&6; }<br>-if test "x$ac_cv_lib_curses_initscr" = xyes; then :<br>-  AST_CURSES_FOUND=yes<br>-else<br>-  AST_CURSES_FOUND=no<br>-fi<br>-<br>-      CFLAGS="${ast_ext_lib_check_save_CFLAGS}"<br>-<br>-<br>-   # now check for the header.<br>-   if test "${AST_CURSES_FOUND}" = "yes"; then<br>-      CURSES_LIB="${pbxlibdir} -lcurses "<br>-      # if --with-CURSES=DIR has been specified, use it.<br>-      if test "x${CURSES_DIR}" != "x"; then<br>-         CURSES_INCLUDE="-I${CURSES_DIR}/include"<br>-      fi<br>-      CURSES_INCLUDE="${CURSES_INCLUDE} "<br>+      LIBEDIT_INCLUDE="${LIBEDIT_INCLUDE} "<br> <br>          # check for the header<br>          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"<br>-         CPPFLAGS="${CPPFLAGS} ${CURSES_INCLUDE}"<br>-         ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"<br>-if test "x$ac_cv_header_curses_h" = xyes; then :<br>-  CURSES_HEADER_FOUND=1<br>+         CPPFLAGS="${CPPFLAGS} ${LIBEDIT_INCLUDE}"<br>+         ac_fn_c_check_header_mongrel "$LINENO" "histedit.h" "ac_cv_header_histedit_h" "$ac_includes_default"<br>+if test "x$ac_cv_header_histedit_h" = xyes; then :<br>+  LIBEDIT_HEADER_FOUND=1<br> else<br>-  CURSES_HEADER_FOUND=0<br>+  LIBEDIT_HEADER_FOUND=0<br> fi<br> <br> <br>          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"<br> <br>-      if test "x${CURSES_HEADER_FOUND}" = "x0" ; then<br>-         CURSES_LIB=""<br>-         CURSES_INCLUDE=""<br>+      if test "x${LIBEDIT_HEADER_FOUND}" = "x0" ; then<br>+         LIBEDIT_LIB=""<br>+         LIBEDIT_INCLUDE=""<br>       else<br> <br>-         PBX_CURSES=1<br>+         PBX_LIBEDIT=1<br>          cat >>confdefs.h <<_ACEOF<br>-#define HAVE_CURSES 1<br>+#define HAVE_LIBEDIT 1<br> _ACEOF<br> <br>       fi<br>@@ -13655,115 +13539,49 @@<br> fi<br> <br> <br>+if test "${PBX_LIBEDIT}" != 1; then<br>+      as_fn_error $? "*** Please install the 'libedit' development package." "$LINENO" 5<br>+       exit 1<br>+fi<br> <br>-if test "x${PBX_NCURSES}" != "x1" -a "${USE_NCURSES}" != "no"; then<br>-   pbxlibdir=""<br>-   # if --with-NCURSES=DIR has been specified, use it.<br>-   if test "x${NCURSES_DIR}" != "x"; then<br>-      if test -d ${NCURSES_DIR}/lib; then<br>-         pbxlibdir="-L${NCURSES_DIR}/lib"<br>-      else<br>-         pbxlibdir="-L${NCURSES_DIR}"<br>-      fi<br>-   fi<br>+    if test "x${PBX_LIBEDIT_IS_UNICODE}" != "x1" -a "${USE_LIBEDIT_IS_UNICODE}" != "no"; then<br>+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Testing for libedit unicode support" >&5<br>+$as_echo_n "checking for Testing for libedit unicode support... " >&6; }<br>+  saved_cppflags="${CPPFLAGS}"<br>+       if test "x${LIBEDIT_IS_UNICODE_DIR}" != "x"; then<br>+            LIBEDIT_IS_UNICODE_INCLUDE="-I${LIBEDIT_IS_UNICODE_DIR}/include"<br>+       fi<br>+   CPPFLAGS="${CPPFLAGS} ${LIBEDIT_IS_UNICODE_INCLUDE}"<br> <br>-      ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br>-      CFLAGS="${CFLAGS} "<br>-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5<br>-$as_echo_n "checking for initscr in -lncurses... " >&6; }<br>-if ${ac_cv_lib_ncurses_initscr+:} false; then :<br>-  $as_echo_n "(cached) " >&6<br>-else<br>-  ac_check_lib_save_LIBS=$LIBS<br>-LIBS="-lncurses ${pbxlibdir}  $LIBS"<br>-cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br> /* end confdefs.h.  */<br>-<br>-/* Override any GCC internal prototype to avoid an error.<br>-   Use char because int might match the return type of a GCC<br>-   builtin and then its argument prototype would still apply.  */<br>-#ifdef __cplusplus<br>-extern "C"<br>-#endif<br>-char initscr ();<br>+ #include <histedit.h><br> int<br> main ()<br> {<br>-return initscr ();<br>+ el_rfunc_t *callback;;<br>+<br>   ;<br>   return 0;<br> }<br> _ACEOF<br>-if ac_fn_c_try_link "$LINENO"; then :<br>-  ac_cv_lib_ncurses_initscr=yes<br>+if ac_fn_c_try_compile "$LINENO"; then :<br>+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5<br>+$as_echo "yes" >&6; }<br>+            PBX_LIBEDIT_IS_UNICODE=1<br>+<br>+$as_echo "#define HAVE_LIBEDIT_IS_UNICODE 1" >>confdefs.h<br>+<br>+<br>+<br> else<br>-  ac_cv_lib_ncurses_initscr=no<br>+         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+<br> fi<br>-rm -f core conftest.err conftest.$ac_objext \<br>-    conftest$ac_exeext conftest.$ac_ext<br>-LIBS=$ac_check_lib_save_LIBS<br>-fi<br>-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5<br>-$as_echo "$ac_cv_lib_ncurses_initscr" >&6; }<br>-if test "x$ac_cv_lib_ncurses_initscr" = xyes; then :<br>-  AST_NCURSES_FOUND=yes<br>-else<br>-  AST_NCURSES_FOUND=no<br>-fi<br>-<br>-      CFLAGS="${ast_ext_lib_check_save_CFLAGS}"<br>-<br>-<br>-   # now check for the header.<br>-   if test "${AST_NCURSES_FOUND}" = "yes"; then<br>-      NCURSES_LIB="${pbxlibdir} -lncurses "<br>-      # if --with-NCURSES=DIR has been specified, use it.<br>-      if test "x${NCURSES_DIR}" != "x"; then<br>-         NCURSES_INCLUDE="-I${NCURSES_DIR}/include"<br>-      fi<br>-      NCURSES_INCLUDE="${NCURSES_INCLUDE} "<br>-<br>-         # check for the header<br>-         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"<br>-         CPPFLAGS="${CPPFLAGS} ${NCURSES_INCLUDE}"<br>-         ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"<br>-if test "x$ac_cv_header_curses_h" = xyes; then :<br>-  NCURSES_HEADER_FOUND=1<br>-else<br>-  NCURSES_HEADER_FOUND=0<br>-fi<br>-<br>-<br>-         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"<br>-<br>-      if test "x${NCURSES_HEADER_FOUND}" = "x0" ; then<br>-         NCURSES_LIB=""<br>-         NCURSES_INCLUDE=""<br>-      else<br>-<br>-         PBX_NCURSES=1<br>-         cat >>confdefs.h <<_ACEOF<br>-#define HAVE_NCURSES 1<br>-_ACEOF<br>-<br>-      fi<br>-   fi<br>-fi<br>-<br>-<br>-<br>-EDITLINE_LIB=""<br>-if test "x$TERMCAP_LIB" != "x" ; then<br>-  EDITLINE_LIB="$TERMCAP_LIB"<br>-elif test "x$TINFO_LIB" != "x" ; then<br>-  EDITLINE_LIB="$TINFO_LIB"<br>-elif test "x$CURSES_LIB" != "x" ; then<br>-  EDITLINE_LIB="$CURSES_LIB"<br>-elif test "x$NCURSES_LIB" != "x" ; then<br>-  EDITLINE_LIB="$NCURSES_LIB"<br>-else<br>-  as_fn_error $? "*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)" "$LINENO" 5<br>-fi<br>+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext<br>+        CPPFLAGS="${saved_cppflags}"<br>+    fi<br> <br> <br> # Find required UUID support.<br>@@ -20698,236 +20516,6 @@<br>       PBX_ILBC=1<br>    fi<br> fi<br>-<br>-<br>-   if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then<br>-<br>-pkg_failed=no<br>-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBEDIT" >&5<br>-$as_echo_n "checking for LIBEDIT... " >&6; }<br>-<br>-if test -n "$LIBEDIT_CFLAGS"; then<br>-    pkg_cv_LIBEDIT_CFLAGS="$LIBEDIT_CFLAGS"<br>- elif test -n "$PKG_CONFIG"; then<br>-    if test -n "$PKG_CONFIG" && \<br>-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5<br>-  ($PKG_CONFIG --exists --print-errors "libedit") 2>&5<br>-  ac_status=$?<br>-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5<br>-  test $ac_status = 0; }; then<br>-  pkg_cv_LIBEDIT_CFLAGS=`$PKG_CONFIG --cflags "libedit" 2>/dev/null`<br>-                      test "x$?" != "x0" && pkg_failed=yes<br>-else<br>-  pkg_failed=yes<br>-fi<br>- else<br>-    pkg_failed=untried<br>-fi<br>-if test -n "$LIBEDIT_LIBS"; then<br>-    pkg_cv_LIBEDIT_LIBS="$LIBEDIT_LIBS"<br>- elif test -n "$PKG_CONFIG"; then<br>-    if test -n "$PKG_CONFIG" && \<br>-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libedit\""; } >&5<br>-  ($PKG_CONFIG --exists --print-errors "libedit") 2>&5<br>-  ac_status=$?<br>-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5<br>-  test $ac_status = 0; }; then<br>-  pkg_cv_LIBEDIT_LIBS=`$PKG_CONFIG --libs "libedit" 2>/dev/null`<br>-                test "x$?" != "x0" && pkg_failed=yes<br>-else<br>-  pkg_failed=yes<br>-fi<br>- else<br>-    pkg_failed=untried<br>-fi<br>-<br>-<br>-<br>-if test $pkg_failed = yes; then<br>-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>-$as_echo "no" >&6; }<br>-<br>-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then<br>-        _pkg_short_errors_supported=yes<br>-else<br>-        _pkg_short_errors_supported=no<br>-fi<br>-        if test $_pkg_short_errors_supported = yes; then<br>-               LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libedit" 2>&1`<br>-        else<br>-                LIBEDIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libedit" 2>&1`<br>-        fi<br>- # Put the nasty error message in config.log where it belongs<br>- echo "$LIBEDIT_PKG_ERRORS" >&5<br>-<br>-<br>-            PBX_LIBEDIT=0<br>-<br>-<br>-elif test $pkg_failed = untried; then<br>-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>-$as_echo "no" >&6; }<br>-<br>-            PBX_LIBEDIT=0<br>-<br>-<br>-else<br>-        LIBEDIT_CFLAGS=$pkg_cv_LIBEDIT_CFLAGS<br>-        LIBEDIT_LIBS=$pkg_cv_LIBEDIT_LIBS<br>-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5<br>-$as_echo "yes" >&6; }<br>-<br>-            PBX_LIBEDIT=1<br>-            LIBEDIT_INCLUDE="$LIBEDIT_CFLAGS"<br>-            LIBEDIT_LIB="$LIBEDIT_LIBS"<br>-<br>-$as_echo "#define HAVE_LIBEDIT 1" >>confdefs.h<br>-<br>-<br>-fi<br>-   fi<br>-<br>-# some platforms do not list libedit via pkg-config, for example OpenBSD 6.2<br>-<br>-if test "x${PBX_LIBEDIT}" != "x1" -a "${USE_LIBEDIT}" != "no"; then<br>-   pbxlibdir=""<br>-   # if --with-LIBEDIT=DIR has been specified, use it.<br>-   if test "x${LIBEDIT_DIR}" != "x"; then<br>-      if test -d ${LIBEDIT_DIR}/lib; then<br>-         pbxlibdir="-L${LIBEDIT_DIR}/lib"<br>-      else<br>-         pbxlibdir="-L${LIBEDIT_DIR}"<br>-      fi<br>-   fi<br>-<br>-      ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br>-      CFLAGS="${CFLAGS} "<br>-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for history_init in -ledit" >&5<br>-$as_echo_n "checking for history_init in -ledit... " >&6; }<br>-if ${ac_cv_lib_edit_history_init+:} false; then :<br>-  $as_echo_n "(cached) " >&6<br>-else<br>-  ac_check_lib_save_LIBS=$LIBS<br>-LIBS="-ledit ${pbxlibdir} -ltermcap $LIBS"<br>-cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>-/* end confdefs.h.  */<br>-<br>-/* Override any GCC internal prototype to avoid an error.<br>-   Use char because int might match the return type of a GCC<br>-   builtin and then its argument prototype would still apply.  */<br>-#ifdef __cplusplus<br>-extern "C"<br>-#endif<br>-char history_init ();<br>-int<br>-main ()<br>-{<br>-return history_init ();<br>-  ;<br>-  return 0;<br>-}<br>-_ACEOF<br>-if ac_fn_c_try_link "$LINENO"; then :<br>-  ac_cv_lib_edit_history_init=yes<br>-else<br>-  ac_cv_lib_edit_history_init=no<br>-fi<br>-rm -f core conftest.err conftest.$ac_objext \<br>-    conftest$ac_exeext conftest.$ac_ext<br>-LIBS=$ac_check_lib_save_LIBS<br>-fi<br>-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_history_init" >&5<br>-$as_echo "$ac_cv_lib_edit_history_init" >&6; }<br>-if test "x$ac_cv_lib_edit_history_init" = xyes; then :<br>-  AST_LIBEDIT_FOUND=yes<br>-else<br>-  AST_LIBEDIT_FOUND=no<br>-fi<br>-<br>-      CFLAGS="${ast_ext_lib_check_save_CFLAGS}"<br>-<br>-<br>-   # now check for the header.<br>-   if test "${AST_LIBEDIT_FOUND}" = "yes"; then<br>-      LIBEDIT_LIB="${pbxlibdir} -ledit -ltermcap"<br>-      # if --with-LIBEDIT=DIR has been specified, use it.<br>-      if test "x${LIBEDIT_DIR}" != "x"; then<br>-         LIBEDIT_INCLUDE="-I${LIBEDIT_DIR}/include"<br>-      fi<br>-      LIBEDIT_INCLUDE="${LIBEDIT_INCLUDE} "<br>-<br>-         # check for the header<br>-         ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"<br>-         CPPFLAGS="${CPPFLAGS} ${LIBEDIT_INCLUDE}"<br>-         ac_fn_c_check_header_mongrel "$LINENO" "histedit.h" "ac_cv_header_histedit_h" "$ac_includes_default"<br>-if test "x$ac_cv_header_histedit_h" = xyes; then :<br>-  LIBEDIT_HEADER_FOUND=1<br>-else<br>-  LIBEDIT_HEADER_FOUND=0<br>-fi<br>-<br>-<br>-         CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"<br>-<br>-      if test "x${LIBEDIT_HEADER_FOUND}" = "x0" ; then<br>-         LIBEDIT_LIB=""<br>-         LIBEDIT_INCLUDE=""<br>-      else<br>-<br>-         PBX_LIBEDIT=1<br>-         cat >>confdefs.h <<_ACEOF<br>-#define HAVE_LIBEDIT 1<br>-_ACEOF<br>-<br>-      fi<br>-   fi<br>-fi<br>-<br>-<br>-if test "${PBX_LIBEDIT}" != 1; then<br>- as_fn_error $? "*** Please install the 'libedit' development package." "$LINENO" 5<br>-       exit 1<br>-fi<br>-<br>-    if test "x${PBX_LIBEDIT_IS_UNICODE}" != "x1" -a "${USE_LIBEDIT_IS_UNICODE}" != "no"; then<br>-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Testing for libedit unicode support" >&5<br>-$as_echo_n "checking for Testing for libedit unicode support... " >&6; }<br>-  saved_cppflags="${CPPFLAGS}"<br>-       if test "x${LIBEDIT_IS_UNICODE_DIR}" != "x"; then<br>-            LIBEDIT_IS_UNICODE_INCLUDE="-I${LIBEDIT_IS_UNICODE_DIR}/include"<br>-       fi<br>-   CPPFLAGS="${CPPFLAGS} ${LIBEDIT_IS_UNICODE_INCLUDE}"<br>-<br>-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>-/* end confdefs.h.  */<br>- #include <histedit.h><br>-int<br>-main ()<br>-{<br>- el_rfunc_t *callback;;<br>-<br>-  ;<br>-  return 0;<br>-}<br>-_ACEOF<br>-if ac_fn_c_try_compile "$LINENO"; then :<br>-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5<br>-$as_echo "yes" >&6; }<br>-               PBX_LIBEDIT_IS_UNICODE=1<br>-<br>-$as_echo "#define HAVE_LIBEDIT_IS_UNICODE 1" >>confdefs.h<br>-<br>-<br>-<br>-else<br>-         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>-$as_echo "no" >&6; }<br>-<br>-fi<br>-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext<br>-  CPPFLAGS="${saved_cppflags}"<br>-    fi<br>-<br> <br> <br> if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then<br>diff --git a/configure.ac b/configure.ac<br>index de34c42..9064b4a 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -458,7 +458,6 @@<br> AST_EXT_LIB_SETUP([CODEC2], [Codec 2 Audio Decoder/Encoder], [codec2])<br> AST_EXT_LIB_SETUP([COROSYNC], [Corosync], [cpg])<br> AST_EXT_LIB_SETUP_OPTIONAL([COROSYNC_CFG_STATE_TRACK], [A callback only in corosync 1.x], [COROSYNC], [cfg])<br>-AST_EXT_LIB_SETUP([CURSES], [curses], [curses])<br> AST_EXT_LIB_SETUP([CRYPT], [password and data encryption], [crypt])<br> AST_EXT_LIB_SETUP([CRYPTO], [OpenSSL Cryptography], [crypto])<br> AST_EXT_LIB_SETUP_OPTIONAL([OPENSSL_SRTP], [OpenSSL SRTP Extension Support], [CRYPTO], [crypto])<br>@@ -492,7 +491,6 @@<br> AST_EXT_LIB_SETUP([MISDN], [mISDN user], [misdn])<br> AST_EXT_LIB_SETUP([MYSQLCLIENT], [MySQL client], [mysqlclient])<br> AST_EXT_LIB_SETUP([NBS], [Network Broadcast Sound], [nbs])<br>-AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])<br> AST_EXT_LIB_SETUP([NEON], [neon], [neon])<br> AST_EXT_LIB_SETUP([NEON29], [neon29], [neon29])<br> AST_EXT_LIB_SETUP([NETSNMP], [Net-SNMP], [netsnmp])<br>@@ -571,9 +569,7 @@<br> AST_EXT_LIB_SETUP_OPTIONAL([RT], [Realtime functions], [rt])<br> AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv])<br> AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds])<br>-AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap])<br> AST_EXT_LIB_SETUP([TIMERFD], [timerfd], [timerfd])<br>-AST_EXT_LIB_SETUP([TINFO], [Term Info], [tinfo])<br> AST_EXT_LIB_SETUP([TONEZONE], [tonezone], [tonezone])<br> AST_EXT_LIB_SETUP([UNBOUND], [unbound], [unbound])<br> AST_EXT_LIB_SETUP([UNIXODBC], [unixODBC], [unixodbc])<br>@@ -621,25 +617,15 @@<br> <br> AC_CHECK_HEADERS([arpa/inet.h libintl.h malloc.h netdb.h stddef.h strings.h sys/event.h utime.h])<br> <br>-# Any one of these packages support a mandatory requirement, so we want to check on them as early as possible.<br>-AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], [])<br>-AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])<br>-AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])<br>-AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])<br>-<br>-EDITLINE_LIB=""<br>-if test "x$TERMCAP_LIB" != "x" ; then<br>-  EDITLINE_LIB="$TERMCAP_LIB"<br>-elif test "x$TINFO_LIB" != "x" ; then<br>-  EDITLINE_LIB="$TINFO_LIB"<br>-elif test "x$CURSES_LIB" != "x" ; then<br>-  EDITLINE_LIB="$CURSES_LIB"<br>-elif test "x$NCURSES_LIB" != "x" ; then<br>-  EDITLINE_LIB="$NCURSES_LIB"<br>-else<br>-  AC_MSG_ERROR([*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)])<br>+# Find required NetBSD Editline library (libedit).<br>+AST_PKG_CONFIG_CHECK(LIBEDIT, libedit)<br>+# some platforms do not list libedit via pkg-config, for example OpenBSD 6.2<br>+AST_EXT_LIB_CHECK([LIBEDIT], [edit], [history_init], [histedit.h], [-ltermcap])<br>+if test "${PBX_LIBEDIT}" != 1; then<br>+        AC_MSG_ERROR(*** Please install the 'libedit' development package.)<br>+  exit 1<br> fi<br>-AC_SUBST(EDITLINE_LIB)<br>+AST_C_COMPILE_CHECK([LIBEDIT_IS_UNICODE], [el_rfunc_t *callback;], [histedit.h], [], [Testing for libedit unicode support])<br> <br> # Find required UUID support.<br> #  * -luuid on Linux<br>@@ -1598,15 +1584,6 @@<br>       PBX_ILBC=1<br>    fi<br> fi<br>-<br>-AST_PKG_CONFIG_CHECK(LIBEDIT, libedit)<br>-# some platforms do not list libedit via pkg-config, for example OpenBSD 6.2<br>-AST_EXT_LIB_CHECK([LIBEDIT], [edit], [history_init], [histedit.h], [-ltermcap])<br>-if test "${PBX_LIBEDIT}" != 1; then<br>-    AC_MSG_ERROR(*** Please install the 'libedit' development package.)<br>-  exit 1<br>-fi<br>-AST_C_COMPILE_CHECK([LIBEDIT_IS_UNICODE], [el_rfunc_t *callback;], [histedit.h], [], [Testing for libedit unicode support])<br> <br> AST_EXT_LIB_CHECK([ICONV], [iconv], [iconv_open], [iconv.h])<br> # GNU libiconv #define's iconv_open to libiconv_open, so we need to search for that symbol<br>diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in<br>index 5e9ba60..4d1624e 100644<br>--- a/include/asterisk/autoconfig.h.in<br>+++ b/include/asterisk/autoconfig.h.in<br>@@ -185,9 +185,6 @@<br> /* Define to 1 if you have a functional curl library. */<br> #undef HAVE_CURL<br> <br>-/* Define to 1 if you have the curses library. */<br>-#undef HAVE_CURSES<br>-<br> /* Define to 1 if your C compiler provides __atomic operations. */<br> #undef HAVE_C_ATOMICS<br> <br>@@ -533,9 +530,6 @@<br> <br> /* Define to 1 if you have the Network Broadcast Sound library. */<br> #undef HAVE_NBS<br>-<br>-/* Define to 1 if you have the ncurses library. */<br>-#undef HAVE_NCURSES<br> <br> /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */<br> #undef HAVE_NDIR_H<br>@@ -1155,9 +1149,6 @@<br> /* Define to 1 if you have the `tanl' function. */<br> #undef HAVE_TANL<br> <br>-/* Define to 1 if you have the Termcap library. */<br>-#undef HAVE_TERMCAP<br>-<br> /* Define to 1 if you have the <termios.h> header file. */<br> #undef HAVE_TERMIOS_H<br> <br>@@ -1169,9 +1160,6 @@<br> <br> /* Define to 1 if you have the <time.h> header file. */<br> #undef HAVE_TIME_H<br>-<br>-/* Define to 1 if you have the Term Info library. */<br>-#undef HAVE_TINFO<br> <br> /* Define to 1 if you have the tonezone library. */<br> #undef HAVE_TONEZONE<br>diff --git a/main/Makefile b/main/Makefile<br>index fb985b9..bef70e9 100644<br>--- a/main/Makefile<br>+++ b/main/Makefile<br>@@ -57,9 +57,9 @@<br>   ifneq (x$(CAP_LIB),x)<br>     AST_LIBS+=$(CAP_LIB)<br>   endif<br>-  AST_LIBS+=-lpthread $(EDITLINE_LIB) -lm -lresolv<br>+  AST_LIBS+=-lpthread -lm -lresolv<br> else<br>-  AST_LIBS+=$(EDITLINE_LIB) -lm<br>+  AST_LIBS+=-lm<br> endif<br> <br> ifneq ($(findstring BETTER_BACKTRACES,$(MENUSELECT_CFLAGS)),)<br>@@ -90,11 +90,11 @@<br>   ASTLINK+=-shared -Wl,--out-implib,libasterisk.a<br> endif<br> ifeq ($(OSARCH),NetBSD)<br>-  AST_LIBS+=-lpthread -lcrypto -lm -L/usr/pkg/lib $(EDITLINE_LIB)<br>+  AST_LIBS+=-lpthread -lcrypto -lm -L/usr/pkg/lib<br> endif<br> <br> ifeq ($(OSARCH),OpenBSD)<br>-  AST_LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB)<br>+  AST_LIBS+=-lcrypto -lpthread -lm<br> endif<br> <br> ifeq ($(OSARCH),SunOS)<br>@@ -354,7 +354,6 @@<br>      rm -f .libasteriskpj*<br> <br>      rm -f asterisk.exports libasteriskssl.exports libasteriskpj.exports<br>-  @if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi<br>         @$(MAKE) -C stdtime clean<br>     rm -f libresample/src/*.o<br>     rm -f *.tmp<br>diff --git a/makeopts.in b/makeopts.in<br>index 4d3cc5d..1063316 100644<br>--- a/makeopts.in<br>+++ b/makeopts.in<br>@@ -143,12 +143,6 @@<br> CURL_INCLUDE=@CURL_INCLUDE@<br> CURL_LIB=@CURL_LIB@<br> <br>-CURSES_INCLUDE=@CURSES_INCLUDE@<br>-CURSES_LIB=@CURSES_LIB@<br>-CURSES_DIR=@CURSES_DIR@<br>-<br>-EDITLINE_LIB=@EDITLINE_LIB@<br>-<br> FREETDS_INCLUDE=@FREETDS_INCLUDE@<br> FREETDS_LIB=@FREETDS_LIB@<br> <br>@@ -209,10 +203,6 @@<br> <br> NBS_INCLUDE=@NBS_INCLUDE@<br> NBS_LIB=@NBS_LIB@<br>-<br>-NCURSES_INCLUDE=@NCURSES_INCLUDE@<br>-NCURSES_LIB=@NCURSES_LIB@<br>-NCURSES_DIR=@NCURSES_DIR@<br> <br> NEON_INCLUDE=@NEON_INCLUDE@<br> NEON_LIB=@NEON_LIB@<br>@@ -364,19 +354,11 @@<br> BKTR_INCLUDE=@BKTR_INCLUDE@<br> BKTR_LIB=@BKTR_LIB@<br> <br>-TERMCAP_INCLUDE=@TERMCAP_INCLUDE@<br>-TERMCAP_LIB=@TERMCAP_LIB@<br>-TERMCAP_DIR=@TERMCAP_DIR@<br>-<br> LIBXML2_INCLUDE=@LIBXML2_INCLUDE@<br> LIBXML2_LIB=@LIBXML2_LIB@<br> <br> LIBXSLT_INCLUDE=@LIBXSLT_INCLUDE@<br> LIBXSLT_LIB=@LIBXSLT_LIB@<br>-<br>-TINFO_INCLUDE=@TINFO_INCLUDE@<br>-TINFO_LIB=@TINFO_LIB@<br>-TINFO_DIR=@TINFO_DIR@<br> <br> # if poll is not present, let the makefile know.<br> POLL_AVAILABLE=@HAS_POLL@<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8628">change 8628</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8628"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib17a7415297a210cfcdbf149e4df9b6edadbfab6 </div>
<div style="display:none"> Gerrit-Change-Number: 8628 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>