m4: Add ncurses autoconf macros