A typo in the condition that verifies --with-curses means the check
always passes, defeating the point of this option. Fix that up.
[], [with_curses=auto])
AS_IF([test x"$with_curses" != x"no"],
[DX_LIB_CURSES([have_curses=yes], [have_curses=no])])
-AS_IF([test x"$with_curses" = x"yes" && x"$have_curses" != x"yes"],
+AS_IF([test x"$with_curses" = x"yes" && test x"$have_curses" != x"yes"],
[AC_MSG_FAILURE([--with-curses requested but curses was not found])])
AM_CONDITIONAL([HAVE_CURSES], [test x"$have_curses" = x"yes"])