From ab26124aa4c9611a6b8faa25bf7e6bc28344a1e6 Mon Sep 17 00:00:00 2001 From: Tobias Boege Date: Wed, 8 Apr 2020 17:58:55 +0200 Subject: [PATCH] Search for wide-character ncurses when configuring [CONFIGURATION] * BUG: gb.ncurses now compiles on systems which only provide wide-character versions of ncurses pkg-config files. --- gb.ncurses/configure.ac | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gb.ncurses/configure.ac b/gb.ncurses/configure.ac index f09e5e487..c13305671 100644 --- a/gb.ncurses/configure.ac +++ b/gb.ncurses/configure.ac @@ -7,9 +7,21 @@ AC_CONFIG_MACRO_DIR([m4]) GB_INIT(gb.ncurses) AC_PROG_LIBTOOL +# Most distributions I have seen apparently provide the ncurses and panel +# pkg-config files (which may be synonymous with ncursesw and panelw for +# wide-character support). Solus only provides the *w versions. +# +# We should prefer linking with the wide-character version but still +# allow to compile on systems that don't have ncursesw pkg-config files. +pkg-config --silence-errors --exists ncursesw panelw +if test $? -eq "0" + then gb_ncurses_pkgconfig_names="ncursesw panelw" + else gb_ncurses_pkgconfig_names="ncurses panel" +fi + GB_COMPONENT_PKG_CONFIG( ncurses, NCURSES, gb.ncurses, [src], - ncurses panel) + $gb_ncurses_pkgconfig_names) AC_OUTPUT( \ Makefile \