| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 | #!/bin/sh## output_env.sh## This file is part of mbed TLS (https://tls.mbed.org)## Copyright (c) 2016, ARM Limited, All Rights Reserved## Purpose## To print out all the relevant information about the development environment.## This includes:#   - architecture of the system#   - type and version of the operating system#   - version of armcc, clang, gcc-arm and gcc compilers#   - version of libc, clang, asan and valgrind if installed#   - version of gnuTLS and OpenSSLechoecho "* Operating system and architecture:"uname -aechoif `hash armcc > /dev/null 2>&1`; then    echo "* armcc:"    armcc --vsn | head -n 2else    echo "* armcc not found!"fiechoif `hash arm-none-eabi-gcc > /dev/null 2>&1`; then    echo "* gcc-arm:"    arm-none-eabi-gcc --version | head -n 1else    echo "* gcc-arm not found!"fiechoif `hash gcc > /dev/null 2>&1`; then    echo "* gcc:"    gcc --version | head -n 1else    echo "* gcc not found!"fiechoif `hash clang > /dev/null 2>&1`; then    echo "* clang:"    clang --version | head -n 2    clang -v 2>&1 | grep Selectedelse    echo "* clang not found!"fiechoif `hash ldd > /dev/null 2>&1`; then    echo "* libc:"    ldd --version | head -n 1else    echo "* No ldd present: can't determine libc version!"fiechoif `hash valgrind > /dev/null 2>&1`; then    echo "* valgrind:"    valgrind --versionelse    echo "* valgrind not found!"fiechoif `hash openssl > /dev/null 2>&1`; then    echo "* openssl:"    openssl versionelse    echo "* openssl not found!"fiif [ -n "${OPENSSL+set}" ]; then    echo    if `hash "$OPENSSL" > /dev/null 2>&1`; then        echo "* $OPENSSL at environment variable 'OPENSSL':"        $OPENSSL version    else        echo "* $OPENSSL at environment variable 'OPENSSL' not found!"    fifiif [ -n "${OPENSSL_LEGACY+set}" ]; then    echo    if `hash "$OPENSSL_LEGACY" > /dev/null 2>&1`; then        echo "* $OPENSSL_LEGACY at environment variable 'OPENSSL_LEGACY':"        $OPENSSL_LEGACY version    else        echo "* $OPENSSL_LEGACY at environment variable 'OPENSSL_LEGACY' not found!"    fifiechoif `hash gnutls-cli > /dev/null 2>&1`; then    echo "* gnuTLS client:"    gnutls-cli --version | head -n 1else    echo "* gnuTLS client not found!"fiechoif `hash gnutls-serv > /dev/null 2>&1`; then    echo "* gnuTLS server:"    gnutls-serv --version | head -n 1else    echo "* gnuTLS server not found!"fiif [ -n "${GNUTLS_CLI+set}" ]; then    echo    if `hash "$GNUTLS_CLI" > /dev/null 2>&1`; then        echo "* $GNUTLS_CLI at environment variable 'GNUTLS_CLI':"        $GNUTLS_CLI --version | head -n 1    else        echo "* $GNUTLS_CLI at environment variable 'GNUTLS_CLI' not found!"    fifiif [ -n "${GNUTLS_SERV+set}" ]; then    echo    if `hash "$GNUTLS_SERV" > /dev/null 2>&1`; then        echo "* $GNUTLS_SERV at environment variable 'GNUTLS_SERV':"        $GNUTLS_SERV --version | head -n 1    else        echo "* $GNUTLS_SERV at environment variable 'GNUTLS_SERV' not found!"    fifiif [ -n "${GNUTLS_LEGACY_CLI+set}" ]; then    echo    if `hash "$GNUTLS_LEGACY_CLI" > /dev/null 2>&1`; then        echo "* $GNUTLS_LEGACY_CLI at environment variable 'GNUTLS_LEGACY_CLI':"        $GNUTLS_LEGACY_CLI --version | head -n 1    else        echo "* $GNUTLS_LEGACY_CLI at environment variable 'GNUTLS_LEGACY_CLI' not found!"    fifiif [ -n "${GNUTLS_LEGACY_SERV+set}" ]; then    echo    if `hash "$GNUTLS_LEGACY_SERV" > /dev/null 2>&1`; then        echo "* $GNUTLS_LEGACY_SERV at environment variable 'GNUTLS_LEGACY_SERV':"        $GNUTLS_LEGACY_SERV --version | head -n 1    else        echo "* $GNUTLS_LEGACY_SERV at environment variable 'GNUTLS_LEGACY_SERV' not found!"    fifiechoif `hash dpkg > /dev/null 2>&1`; then    echo "* asan:"    dpkg -s libasan2 2> /dev/null | grep -i version    dpkg -s libasan1 2> /dev/null | grep -i version    dpkg -s libasan0 2> /dev/null | grep -i versionelse    echo "* No dpkg present: can't determine asan version!"fiecho
 |