Skip to content

Commit

Permalink
Merge pull request #119 from grapherd/lxdialog_fixed
Browse files Browse the repository at this point in the history
kconfig/lxdialog: get ncurses CFLAGS with pkg-config and fixed btn color
  • Loading branch information
jserv authored Oct 1, 2016
2 parents 3f73349 + c1fb2f6 commit a97d160
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ before_install:
- sudo apt-get install build-essential
- sudo add-apt-repository --yes ppa:terry.guo/gcc-arm-embedded
- sudo apt-get update
- sudo apt-get install gcc-arm-none-eabi
- sudo apt-get install gcc-arm-none-eabi -y --force-yes

script:
- cp -f board/$BOARD/defconfig .config
Expand Down
15 changes: 11 additions & 4 deletions external/kconfig/lxdialog/check-lxdialog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 dylib ; do
for lib in ncursesw ncurses curses ; do
$cc -print-file-name=lib${lib}.${ext} | grep -q /
Expand All @@ -19,12 +21,17 @@ ldflags()
# Where is ncurses.h?
ccflags()
{
if [ -f /usr/include/ncurses/ncurses.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
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>"'
elif [ -f /usr/include/ncursesw/curses.h ]; then
echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"'
echo '-I/usr/include/ncurses -DCURSES_LOC="<curses.h>"'
elif [ -f /usr/include/ncurses.h ]; then
echo '-DCURSES_LOC="<ncurses.h>"'
else
Expand Down

0 comments on commit a97d160

Please sign in to comment.