aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/config/lxdialog/check-lxdialog.sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-01-08 14:33:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-01-08 14:33:53 +0000
commita9f6941436e83d2f91caf06c13bee86cad309064 (patch)
tree8f3b14ce3f98718cc2513344b82ceb703638ba9b /scripts/config/lxdialog/check-lxdialog.sh
parent3f26960a5c8db5b7cbdf120ddcd7feaadca51c8f (diff)
downloadupstream-a9f6941436e83d2f91caf06c13bee86cad309064.tar.gz
upstream-a9f6941436e83d2f91caf06c13bee86cad309064.tar.bz2
upstream-a9f6941436e83d2f91caf06c13bee86cad309064.zip
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.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/config/lxdialog/check-lxdialog.sh b/scripts/config/lxdialog/check-lxdialog.sh
index 80788137c6..5075ebf2d3 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