Although working with bash, 'echo -n' is really non-portable.
Get rid of this by using printf(1) with no trailing new-line (\n).
Again, thanks to Martin GUY, who pointed this issue.
/trunk/kconfig/kconfig.mk | 2 1 1 0
/trunk/scripts/build/libc_uClibc.sh | 4 3 1 0 ++
/trunk/scripts/showSamples.sh | 78 39 39 0 +++++++++++++++++++++---------------------
3 files changed, 43 insertions(+), 41 deletions(-)
2 # Check ncurses compatibility
7 $cc -print-file-name=libncursesw.so | grep -q /
12 $cc -print-file-name=libncurses.so | grep -q /
17 $cc -print-file-name=libcurses.so | grep -q /
28 if [ -f /usr/include/ncurses/ncurses.h ]; then
29 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
30 elif [ -f /usr/include/ncurses/curses.h ]; then
31 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
32 elif [ -f /usr/include/ncurses.h ]; then
33 echo '-DCURSES_LOC="<ncurses.h>"'
35 echo '-DCURSES_LOC="<curses.h>"'
39 # Temp file, try to clean up after us
41 trap "rm -f $tmp" 0 1 2 3 15
43 # Check if we can link to ncurses
45 echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
47 echo " *** Unable to find the ncurses libraries." 1>&2
48 echo " *** make menuconfig require the ncurses libraries" 1>&2
50 echo " *** Install ncurses (ncurses-devel) and try again" 1>&2
57 printf "Usage: $0 [-check compiler options|-header|-library]\n"