diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2014-04-11 20:24:06 +0200 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2014-05-07 19:39:28 +0200 |
commit | d520840d4ca7d8fbd9c64946ee5f2d7ea44b8557 (patch) | |
tree | 0d51d363fe7ea38242199dc70edd48833d360657 /util/kconfig/lxdialog/check-lxdialog.sh | |
parent | 99d8818af332f4db8ded058c7e5e59e2f56f7bc9 (diff) | |
download | coreboot-d520840d4ca7d8fbd9c64946ee5f2d7ea44b8557.tar.xz |
kconfig: update to follow upstream more closely
This might break a bunch of stuff (eg. win32 support),
but otherwise introduces nconfig (ncurses based configuration
frontend), partial configuration headers for improved dependency
tracking (which requires some more build system support) and
various bug fixes.
Change-Id: I5d8a280810c6a26fc3fd056d5d94cb9e591a0ff5
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/5487
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'util/kconfig/lxdialog/check-lxdialog.sh')
-rw-r--r-- | util/kconfig/lxdialog/check-lxdialog.sh | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/util/kconfig/lxdialog/check-lxdialog.sh b/util/kconfig/lxdialog/check-lxdialog.sh index 4184418183..2b845e6dd8 100644 --- a/util/kconfig/lxdialog/check-lxdialog.sh +++ b/util/kconfig/lxdialog/check-lxdialog.sh @@ -4,9 +4,11 @@ # 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 pdcursesw pdcurses; do - $cc -print-file-name=lib${lib}.${ext} | grep / >/dev/null + $cc -print-file-name=lib${lib}.${ext} | grep -q / if [ $? -eq 0 ]; then echo "-l${lib}" exit @@ -19,10 +21,13 @@ ldflags() # Where is ncurses.h? ccflags() { - if [ -f /usr/include/ncurses/ncurses.h ]; then + 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 @@ -36,8 +41,10 @@ trap "rm -f $tmp" 0 1 2 3 15 # Check if we can link to ncurses check() { - echo -e " #include CURSES_LOC \n main() {}" | - $cc -xc - -o $tmp 2> /dev/null + $cc -x c - -o $tmp 2>/dev/null <<'EOF' +#include CURSES_LOC +main() {} +EOF if [ $? != 0 ]; then echo " *** Unable to find the ncurses libraries or the" 1>&2 echo " *** required header files." 1>&2 @@ -50,7 +57,7 @@ check() { } usage() { - printf "Usage: $0 [-check compiler options|-header|-library]\n" + printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n" } if [ $# -eq 0 ]; then |