From: Yann E. MORIN" Date: Mon, 4 Mar 2013 23:29:51 +0000 (+0100) Subject: configure: fixup extended colors in wide-char-enabled ncurses X-Git-Tag: v3.9.0.0~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8939bb3cffad2321df6c1361f93de7f195980187;p=kconfig-frontends configure: fixup extended colors in wide-char-enabled ncurses As Krzysztof puts it in its commit log in the Linux kernel: The ncurses library allows for extended colors. The support for extended colors support depends on wide-character support. ncurses headers enable extended colors (NCURSES_EXT_COLORS) only when wide-character support is enabled (NCURSES_WIDECHAR). The "make menuconfig" uses wide-character ncursesw library, which can be compiled with wide-character support, but does not define NCURSES_WIDECHAR and it's using headers without wide-character (and extended colors) support. This fixes problems with colors on systems with enabled extended colors (like PLD Linux). Without this patch "make menuconfig" is hard to use. In kconfig-frontends, we fix this by adding the appropriate CPPFLAGS to the mconf-specific ncurses CPPFLAGS. Reported-by: Krzysztof Mazur Signed-off-by: "Yann E. MORIN" --- diff --git a/configure.ac b/configure.ac index 4e02c50..8b5bc5d 100644 --- a/configure.ac +++ b/configure.ac @@ -270,6 +270,9 @@ AS_IF( [test "$need_curses" = "yes"], [AC_MSG_ERROR([could not find curses headers (frontends: mconf/nconf)])], [has_curses=no])]) + AS_CASE( + [$CURSES_LOC], + [ncursesw/*],[ncurses_mconf_CPPFLAGS="$ncurses_mconf_CPPFLAGS -DNCURSES_WIDECHAR=1"]) AC_SEARCH_LIBS( [initscr], [ncursesw ncurses curses],