]> git.ozlabs.org Git - petitboot/commit
Better recognition of ncurses header files
authorCyril Bur <cyrilbur@gmail.com>
Thu, 16 Nov 2017 03:49:13 +0000 (14:49 +1100)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 21 Nov 2017 03:23:05 +0000 (14:23 +1100)
commit117a75f95ec31c2f9ea5e560c0355a2125b09b71
tree285cf8c3d6ff1adf913c4100f3ac070670ccdf3a
parent817e6698bcbbc20e186185a1d64f3a3087a65862
Better recognition of ncurses header files

This patch was lifted directly from:
https://github.com/Tlf/tlf/commit/a21513254ce8bf66d0b019f6075eea918958741a

The commit message reads:
  If ax_with_ncurses finds a ncursesw instance the former code checks
  only for <ncursesw/panelh>. If not there the search fails.
  That let to problems at least in Arch Linux which has only <panel.h>
  installed.
  The patched version here checks first for <ncursesw/panel.h> and if
  not found also for <panel.h>.

  Tested for the following distributions:

  Gentoo, Debian 7..9, Linux Mint 17 and 18.1, Arch Linux, Ubuntu

ARCH Linux builds ncurses with wide character support but does not add
any ncurses specific headers. nurses its self (by default) adds almost
no ncurses specific headers. No {prefix}/include/ncurses directory. In
fact the only ncurses specific file is the ncurses.h symlink to
curses.h, other than that there are no ncurses headers.

The ax_with_curses.m4 script detects if the installed ncurses has wide
character support. It checks using code snippets against all possible
ncurses header files.

If the ax_with_curses.m4 script detects wide character support the
ax_with_curses_extra.m4 will only look for extra curses features (in
the case of petitboot, form.h and menu.h) inside the
{prefix}/include/ncurses directory, when they could simply be in
{prefix}/include.

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
m4/ax_with_curses_extra.m4