--- configure.ac (Asterisk GIT) +++ configure.ac (working copy) @@ -461 +460,0 @@ -AST_EXT_LIB_SETUP([CURSES], [curses], [curses]) @@ -495 +493,0 @@ -AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses]) @@ -574 +571,0 @@ -AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap]) @@ -576 +572,0 @@ -AST_EXT_LIB_SETUP([TINFO], [Term Info], [tinfo]) @@ -624,17 +620,7 @@ -# 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 @@ -642 +628 @@ -AC_SUBST(EDITLINE_LIB) +AST_C_COMPILE_CHECK([LIBEDIT_IS_UNICODE], [el_rfunc_t *callback;], [histedit.h], [], [Testing for libedit unicode support]) @@ -1602,9 +1587,0 @@ -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]) - --- main/Makefile (Asterisk GIT) +++ main/Makefile (working copy) @@ -60 +60 @@ - AST_LIBS+=-lpthread $(EDITLINE_LIB) -lm -lresolv + AST_LIBS+=-lpthread -lm -lresolv @@ -62 +62 @@ - AST_LIBS+=$(EDITLINE_LIB) -lm + AST_LIBS+=-lm @@ -93 +93 @@ - AST_LIBS+=-lpthread -lcrypto -lm -L/usr/pkg/lib $(EDITLINE_LIB) + AST_LIBS+=-lpthread -lcrypto -lm -L/usr/pkg/lib @@ -97 +97 @@ - AST_LIBS+=-lcrypto -lpthread -lm $(EDITLINE_LIB) + AST_LIBS+=-lcrypto -lpthread -lm @@ -357 +356,0 @@ - @if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi --- makeopts.in (Asterisk GIT) +++ makeopts.in (working copy) @@ -150,2 +149,0 @@ -EDITLINE_LIB=@EDITLINE_LIB@ -