cli: on POSIX systems, use terminfo (and curses)

When building hledger on a non-windows system, and the new "curses"
cabal flag is true (as it is by default), include the terminfo package.
This will be useful for detecting terminal width and perhaps other
things.

Installation on posix is slightly harder now, since it will need the C
curses dev libraries. The curses flag lets posix users skip that
requirement by adding -f-curses (or cabal might even do that
automatically).
This commit is contained in:
Simon Michael 2015-01-19 13:29:41 -08:00
parent 3d5b269b3d
commit 8278c13268

View File

@ -41,6 +41,10 @@ flag threaded
Description: Build with support for multithreaded execution
Default: True
flag curses
Description: On POSIX systems, enable curses support for auto-detecting terminal width.
Default: True
library
cpp-options: -DVERSION="0.24.98"
@ -102,7 +106,8 @@ library
,wizards == 1.0.*
if impl(ghc >= 7.4)
build-depends: pretty-show >= 1.6.4
if !os(windows) && flag(curses)
build-depends: terminfo
executable hledger
main-is: hledger-cli.hs