Asterisk "configure" on Ubuntu requires TERMCAP

The asterisk packages available on Ubuntu are too black-boxy and I wanted to start from real scratch a’ la the O’Reilly Asterisk book (2nd Edition.)

So I download the source and then in the asterisk source tree I issue “configure” and it DIES after it says " can’t find termcap support". On a lark I try “configure --help” to see that maybe I can try “configure --without-termcap” but that fails in the very same way.

So let’s try to make Asterisk happy and give it termcap support. But there is NOTHING TO INSTALL to provide termcap support on Ubuntu - nothing from Ubuntu and nothing from GNU - because TERMCAP IS OBSOLETE.

So this appears to be a BUG and the directions in the 2nd edition of the Asterisk book will FAIL FOR EVERYONE NOT USING CentOS (apparently.)
The configure script SHOULD NOT REQUIRE something that CANNOT BE PROVIDED - obviously.

Since this is reproducible, it can be fixed and it should be fixed. IS THERE A FIX FOR THIS? Thanks in advance for an answer.

To get past the termcap problem, try to hack the “configure” file to force it to bypass termcap.

Find that logic in the configure file wants to find TINFO, TERMCAP, CURSES or NCURSES. ncurses5 is installed on Ubuntu but it seems the autoconf test for the existence of the routine “initscr()” fails so configure thinks it isn’t available. Further hacking to add the line

NCURSES_LIB="-L/usr/lib -lncurses "

following the test for it, allows the configure script to run to completion and then I can issue “make”. However, that also fails:

checking for ar… /usr/bin/ar
checking for tgetent in -ltermcap… no
checking for tgetent in -ltinfo… no
checking for tgetent in -lcurses… no
checking for tgetent in -lncurses… no
configure: error: termcap support not found
make[1]: *** [editline/libedit.a] Error 1
make: *** [main] Error 2

Whatever the diffrerences between CentOS and the other flavors of Linux, it seems the AUTOCONF system Asterisk uses will not properly recognize the existence of curses libraries it needs on systems other than CentOS, and that makes the O’Reilly book useless, as I said.

Ubuntu and Debian being very related I find it surprising that Asterisk cannot figure out properly whether it has access to needed support code. My great hope is the autoconf system will be fixed to correctly find the existing needed routines on Ubuntu - or if this is an Ubuntu problem that the Ubuntu people will stop unsupporting developers.

ldconfig -p | grep urse

    libncursesw.so.5 (libc6) => /lib/libncursesw.so.5
    libncurses.so.5 (libc6) => /lib/libncurses.so.5

“nm” returns no symbols from these libraries so no visual quick way to check for “initscr” or “tgetent”.