main/slang: fix detection of terminfo

ncurses-dev depends recursively on ncurses-terminfo-base, which has terminfo files in /etc/terminfo.

But slang only looks for terminfo files in /usr/{lib,share}/terminfo.
When that's not found, it determins it must link against termcap (adds `-ltermcap` to linker flags), which cannot be found and breaks the build.

Patch configure to look for terminfo in /etc/terminfo  to fix the build.
7 jobs for !7355 with slang-termcap in 5 minutes and 46 seconds
merge request