http://bugs.winehq.org/show_bug.cgi?id=11214
--- Comment #3 from Austin English austinenglish@gmail.com 2008-01-28 20:16:32 --- (In reply to comment #2)
0.9.52 could find our ncurses 5.6 built with UTF8 support fine, but 0.9.53 and 0.9.54 say they cannot find "-lncurses". I tried fiddling to have it find "-lcurses", "-lncursesw", and "-lcursesw", all of which exist and work on the command line, but all of them give "result: not found" in config.log after checking for mousemask. Perhaps UTF8 ncurses is missing this mousemask?
At a guess, commit c1099bb759ef3b18e4405833976e656488735b5e (http://source.winehq.org/git/wine.git/?a=commit;h=d0783774e722c8b5f35ca9736f...) may have caused it, but reversing the patch on 0.9.54 does not apply cleanly (have not tried 0.9.53).
Try compiling at that commit and right before it to be sure.