diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-01-08 14:33:53 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-01-08 14:33:53 +0000 |
commit | a9f6941436e83d2f91caf06c13bee86cad309064 (patch) | |
tree | 8f3b14ce3f98718cc2513344b82ceb703638ba9b /scripts/config/lxdialog/check-lxdialog.sh | |
parent | 3f26960a5c8db5b7cbdf120ddcd7feaadca51c8f (diff) | |
download | mtk-20170518-a9f6941436e83d2f91caf06c13bee86cad309064.zip mtk-20170518-a9f6941436e83d2f91caf06c13bee86cad309064.tar.gz mtk-20170518-a9f6941436e83d2f91caf06c13bee86cad309064.tar.bz2 |
scripts/config: sync with linux upstream
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43873
Diffstat (limited to 'scripts/config/lxdialog/check-lxdialog.sh')
-rw-r--r-- | scripts/config/lxdialog/check-lxdialog.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/config/lxdialog/check-lxdialog.sh b/scripts/config/lxdialog/check-lxdialog.sh index 8078813..5075ebf 100644 --- a/scripts/config/lxdialog/check-lxdialog.sh +++ b/scripts/config/lxdialog/check-lxdialog.sh @@ -4,6 +4,8 @@ # What library to link ldflags() { + pkg-config --libs ncursesw 2>/dev/null && exit + pkg-config --libs ncurses 2>/dev/null && exit for ext in so a dll.a dylib ; do for lib in ncursesw ncurses curses ; do $cc -print-file-name=lib${lib}.${ext} | grep -q / @@ -19,13 +21,17 @@ ldflags() # Where is ncurses.h? ccflags() { - if [ -f /usr/include/ncursesw/curses.h ]; then - echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"' + 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 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>"' + echo '-I/usr/include/ncurses -DCURSES_LOC="<curses.h>"' elif [ -f /usr/include/ncurses.h ]; then echo '-DCURSES_LOC="<ncurses.h>"' else |