Hi riwa,
From the log you attached, this is where the error happens:
configure: checking location of ncurses.h file...
checking for use_default_colors... no
checking for resizeterm... no
checking for resize_term... no
checking for wadd_wch... no
configure: error: You don't seem to have the curses headers installed
I think it is due to your application uses functions of ncurses and so include ncurses.h file in source file,
but during the progress of autoconf, you haven't specify the location of ncurses header file to look for.
I suggest you have a check on Makefile.am.
Thanks.