Skip to content

fix ncurses linking issues#6327

Merged
matz merged 1 commit into
mruby:masterfrom
juchem:master
Aug 23, 2024
Merged

fix ncurses linking issues#6327
matz merged 1 commit into
mruby:masterfrom
juchem:master

Conversation

@juchem

@juchem juchem commented Aug 22, 2024

Copy link
Copy Markdown
Contributor

The build configuration for mruby assumes only the ncurses library needs to be linked because tinfo is implicitly pulled in.

In environments where ncurses is available only as a static library, tinfo needs to be linked explicitly (needed for functions like tputs.

This patch fixes that by linking tinfo if available.

It also fixes the build for environments where only the ncursesw version of the library (including wide character support) is present, while still giving preference to the ncurses version (without wide character support).

The build configuration for `mruby` assumes only the `ncurses` library
needs to be linked because `tinfo` is implicitly pulled in.

In environments where ncurses is available only as a static library,
`tinfo` needs to be linked explicitly (needed for functions like
`tputs`.

This patch fixes that by linking `tinfo` if available.

It also fixes the build for environments where only the `ncursesw`
version of the library (including wide character support) is present,
while still giving preference to the `ncurses` version (without wide
character support).
@juchem juchem requested a review from matz as a code owner August 22, 2024 19:17
@matz matz merged commit 7ba95e2 into mruby:master Aug 23, 2024
matz added a commit that referenced this pull request Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants