hush/scripts/kconfig/lxdialog
Yann E. MORIN d35ba8b5ed kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.h
The current code does this:

    if [ -f /usr/include/ncursesw/curses.h ]; then
        echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"'
    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
        echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
    [...]

This is merely inconsistent:
  - adding the full path to the directory in the -I directive,
  - especially since that path is already a sub-path of the system
    include path,
  - and then repeating the sub-path in the #include directive.

Rationalise each include directive:
  - only use the filename in the #include directive,
  - keep the -I directives: they are always searched for before the
    system include path; this ensures the correct header is used.

Using the -I directives and the filename-only in #include is more in
line with how pkg-config behaves, eg.:
    $ pkg-config --cflags ncursesw
    -I/usr/include/ncursesw

This paves the way for using pkg-config for CFLAGS, too, now we use it
to find the libraries.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-04-03 23:59:15 -04:00
..
.gitignore add .gitignore files 2009-05-05 09:05:30 -04:00
BIG.FAT.WARNING Remove 'busybox' word from configuration programs 2008-05-28 11:59:32 +00:00
check-lxdialog.sh kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.h 2016-04-03 23:59:15 -04:00
checklist.c build system overhaul 2006-10-05 10:17:08 +00:00
colors.h build system overhaul 2006-10-05 10:17:08 +00:00
dialog.h build system overhaul 2006-10-05 10:17:08 +00:00
inputbox.c build system overhaul 2006-10-05 10:17:08 +00:00
lxdialog.c build system overhaul 2006-10-05 10:17:08 +00:00
Makefile - forgot to pass in the HOST_EXTRACFLAGS 2008-08-28 14:29:54 +00:00
menubox.c whitespace fixes (leading spaces to tab) 2007-01-13 21:06:21 +00:00
msgbox.c build system overhaul 2006-10-05 10:17:08 +00:00
textbox.c get rid of several "variable 'x' set but not used" warnings 2011-05-01 14:43:53 +02:00
util.c dont use obsolete function index() as pointed out by src.obsolete.funcs 2007-03-17 06:29:05 +00:00
yesno.c build system overhaul 2006-10-05 10:17:08 +00:00