diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2013-11-03 23:27:46 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2013-11-06 22:21:59 +0100 |
commit | e286a674419d31cb0757dd2f8307d8b4756cf1f9 (patch) | |
tree | 6f79c58793acb4df16ac974b64ae6307cd28a0e2 /extra/config/lxdialog/check-lxdialog.sh | |
parent | acfc107a50344b100b9ea492678928acc047c6ae (diff) |
pull kconfig from linux-3.11
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'extra/config/lxdialog/check-lxdialog.sh')
-rw-r--r-- | extra/config/lxdialog/check-lxdialog.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/extra/config/lxdialog/check-lxdialog.sh b/extra/config/lxdialog/check-lxdialog.sh index d34dfd46d..9d2a4c585 100644 --- a/extra/config/lxdialog/check-lxdialog.sh +++ b/extra/config/lxdialog/check-lxdialog.sh @@ -4,7 +4,9 @@ # What library to link ldflags() { - for ext in so a dylib ; do + 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 / if [ $? -eq 0 ]; then @@ -19,14 +21,13 @@ ldflags() # Where is ncurses.h? ccflags() { - 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>"' + if [ -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 @@ -40,7 +41,7 @@ trap "rm -f $tmp" 0 1 2 3 15 # Check if we can link to ncurses check() { - $cc -xc - -o $tmp 2>/dev/null <<'EOF' + $cc -x c - -o $tmp 2>/dev/null <<'EOF' #include CURSES_LOC main() {} EOF |