aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2013-03-22 23:12:16 +0100
committerMike Frysinger <vapier@gentoo.org>2016-04-03 23:59:15 -0400
commitd35ba8b5eddedd50349adf9358574cdbbc3c47ef (patch)
tree718f9cfbc5cc1f1b17e86d3b1b93e9b241ec5251
parente62c715b3ebd6fc1d832229ded946d053bd45b94 (diff)
downloadbusybox-w32-d35ba8b5eddedd50349adf9358574cdbbc3c47ef.tar.gz
busybox-w32-d35ba8b5eddedd50349adf9358574cdbbc3c47ef.tar.bz2
busybox-w32-d35ba8b5eddedd50349adf9358574cdbbc3c47ef.zip
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>
-rw-r--r--scripts/kconfig/lxdialog/check-lxdialog.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index 782d20085..9d2a4c585 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -22,12 +22,12 @@ ldflags()
22ccflags() 22ccflags()
23{ 23{
24 if [ -f /usr/include/ncursesw/curses.h ]; then 24 if [ -f /usr/include/ncursesw/curses.h ]; then
25 echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"' 25 echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
26 echo ' -DNCURSES_WIDECHAR=1' 26 echo ' -DNCURSES_WIDECHAR=1'
27 elif [ -f /usr/include/ncurses/ncurses.h ]; then 27 elif [ -f /usr/include/ncurses/ncurses.h ]; then
28 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' 28 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
29 elif [ -f /usr/include/ncurses/curses.h ]; then 29 elif [ -f /usr/include/ncurses/curses.h ]; then
30 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"' 30 echo '-I/usr/include/ncurses -DCURSES_LOC="<curses.h>"'
31 elif [ -f /usr/include/ncurses.h ]; then 31 elif [ -f /usr/include/ncurses.h ]; then
32 echo '-DCURSES_LOC="<ncurses.h>"' 32 echo '-DCURSES_LOC="<ncurses.h>"'
33 else 33 else