configure
changeset 2526 e5fb003a354c
parent 2525 00054087dab2
child 2527 a65f56df62de
     1.1 --- a/configure	Tue Jun 28 17:25:02 2011 +0200
     1.2 +++ b/configure	Mon Jun 27 21:03:40 2011 +0200
     1.3 @@ -449,6 +449,30 @@
     1.4          ;;
     1.5  esac
     1.6  
     1.7 +printf "Checking if static linking is possible... "
     1.8 +static_link_ok=""
     1.9 +case "${host}" in
    1.10 +    Darwin) ;;
    1.11 +    *)  tmp=.static.tmp
    1.12 +        if gcc -xc - -static -o "${tmp}" >/dev/null 2>&1<<-_EOF_
    1.13 +				int main() { return 0; }
    1.14 +			_EOF_
    1.15 +        then
    1.16 +            static_link_ok="y"
    1.17 +        fi
    1.18 +        rm -f "${tmp}"
    1.19 +        ;;
    1.20 +esac
    1.21 +if [ "${static_link_ok}" = "y" ]; then
    1.22 +    printf "yes\n"
    1.23 +else
    1.24 +    printf "no\n"
    1.25 +    printf " * An optional host feature is missing, some features will be disabled:\n"
    1.26 +    printf " * - It will not be possible to statically link toolchain's binaries\n"
    1.27 +fi
    1.28 +add_to_kconfig_list static_link_ok
    1.29 +
    1.30 +# Library checks
    1.31  ncurses_hdrs="ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h"
    1.32  ncurses_libs="$( for l in ncursesw ncurses curses; do   \
    1.33                       for x in so a dylib; do            \