test/py: add TPMv2.x test suite
[oweals/u-boot.git] / scripts / kconfig / lxdialog / check-lxdialog.sh
old mode 100644 (file)
new mode 100755 (executable)
index 9d2a4c5..5075ebf
@@ -21,7 +21,11 @@ ldflags()
 # Where is ncurses.h?
 ccflags()
 {
-       if [ -f /usr/include/ncursesw/curses.h ]; then
+       if pkg-config --cflags ncursesw 2>/dev/null; then
+               echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
+       elif pkg-config --cflags ncurses 2>/dev/null; then
+               echo '-DCURSES_LOC="<ncurses.h>"'
+       elif [ -f /usr/include/ncursesw/curses.h ]; then
                echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
                echo ' -DNCURSES_WIDECHAR=1'
        elif [ -f /usr/include/ncurses/ncurses.h ]; then