From: Yann E. MORIN Date: Fri, 22 Mar 2013 22:12:16 +0000 (+0100) Subject: kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.h X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~17^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdf0c2cfd75c6c2f2a6eee5e21ff0e8271bd0660;p=pandora-kernel.git 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=""' elif [ -f /usr/include/ncurses/ncurses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC=""' elif [ -f /usr/include/ncurses/curses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC=""' [...] 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" --- Reading git-diff-tree failed