menuconfig: fix extended colors ncurses support
authorKrzysztof Mazur <krzysiek@podlesie.net>
Mon, 8 Oct 2012 16:18:22 +0000 (18:18 +0200)
committerMike Frysinger <vapier@gentoo.org>
Mon, 4 Apr 2016 03:59:15 +0000 (23:59 -0400)
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.

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
scripts/kconfig/lxdialog/check-lxdialog.sh

index c8e8a7154753b858e9f51e9c3d6816962d8f549b..80788137c670b2b7e7740c99803f03edd9803a3f 100644 (file)
@@ -21,6 +21,7 @@ ccflags()
 {
        if [ -f /usr/include/ncursesw/curses.h ]; then
                echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"'
+               echo ' -DNCURSES_WIDECHAR=1'
        elif [ -f /usr/include/ncurses/ncurses.h ]; then
                echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
        elif [ -f /usr/include/ncurses/curses.h ]; then