[Git][ghc/ghc][wip/T23162-spj] 36 commits: hadrian: enable terminfo if --with-curses-* flags are given