Browse Source

lxdialog: fix ncursesw include detection

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 14 years ago
parent
commit
0c5262ec8d
2 changed files with 6 additions and 2 deletions
  1. 1 1
      extra/config/Makefile
  2. 5 1
      extra/config/lxdialog/check-lxdialog.sh

+ 1 - 1
extra/config/Makefile

@@ -20,7 +20,7 @@ generated := $(addprefix $(obj)/,$(generated:.c=.o))
 include $(top_srcdir)extra/config/Makefile.kconfig
 PHONY += $(always)
 chk-lxdialog := $(top_srcdir)$(src)/lxdialog/check-lxdialog.sh
-check-lxdialog := cd $(obj) && $(chk-lxdialog)
+check-lxdialog := cd $(obj) && $(CONFIG_SHELL) $(chk-lxdialog)
 HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) -c '$(check-lxdialog) -ccflags')
 HOST_LOADLIBES   = $(shell $(CONFIG_SHELL) -c '$(check-lxdialog) -ldflags $(HOSTCC)')
 HOST_EXTRACFLAGS += -DLOCALE

+ 5 - 1
extra/config/lxdialog/check-lxdialog.sh

@@ -19,7 +19,11 @@ ldflags()
 # Where is ncurses.h?
 ccflags()
 {
-	if [ -f /usr/include/ncurses/ncurses.h ]; then
+	if [ -f /usr/include/ncursesw/ncurses.h ]; then
+		echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
+	elif [ -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>"'