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