The includes are incorrect, they should read, for example:
#include <ncursesw/ncursesw.h>
#include <ncursesw/curses.h>
And what would be the remedy? I tried with
1- ./configure --includedir=/usr/local/include/ncursesw/ , same error
2- modified the configure script line #include <$curseslib.h> to #include <ncursesw/$curseslib.h> , same error
3- hard coded the include line to #include <ncursesw/curses.h> , which passed the configure.
checking for a curses library containing mvchgat... -lncursesw
But then make failed with:
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT edline.o -MD -MP -MF .deps/edline.Tpo -c -o edline.o edline.c
edline.c:10:10: fatal error: curses.h: No such file or directory
10 | #include <curses.h>
[EDIT]: Added code tags. Rich