config.tests/mac/xarch.test
author Eckhart Koeppen <eckhart.koppen@nokia.com>
Wed, 28 Apr 2010 13:15:16 +0300
branchRCL_3
changeset 16 b25b6dc3ff8b
parent 0 1918ee327afb
permissions -rwxr-xr-x
2010-17 8b4fb6db9a24f58dafbd4734d9c4a87a72f9ad8f

#!/bin/sh

XARCH_SUPPORT=no
COMPILER=$1
VERBOSE=$2
WORKDIR=$3

touch xarch.c

if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx 2>/dev/null 1>&2; then
    if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx  2>&1 | grep "unrecognized" >/dev/null ; then
        true
    else
        XARCH_SUPPORT=yes
    fi
fi
rm -f xarch.c xarch.o

# done
if [ "$XARCH_SUPPORT" != "yes" ]; then
    [ "$VERBOSE" = "yes" ] && echo "Xarch is not supported"
    exit 0
else
    [ "$VERBOSE" = "yes" ] && echo "Xarch support detected"
    exit 1
fi