config.tests/mac/xarch.test
changeset 0 1918ee327afb
equal deleted inserted replaced
-1:000000000000 0:1918ee327afb
       
     1 #!/bin/sh
       
     2 
       
     3 XARCH_SUPPORT=no
       
     4 COMPILER=$1
       
     5 VERBOSE=$2
       
     6 WORKDIR=$3
       
     7 
       
     8 touch xarch.c
       
     9 
       
    10 if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx 2>/dev/null 1>&2; then
       
    11     if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx  2>&1 | grep "unrecognized" >/dev/null ; then
       
    12         true
       
    13     else
       
    14         XARCH_SUPPORT=yes
       
    15     fi
       
    16 fi
       
    17 rm -f xarch.c xarch.o
       
    18 
       
    19 # done
       
    20 if [ "$XARCH_SUPPORT" != "yes" ]; then
       
    21     [ "$VERBOSE" = "yes" ] && echo "Xarch is not supported"
       
    22     exit 0
       
    23 else
       
    24     [ "$VERBOSE" = "yes" ] && echo "Xarch support detected"
       
    25     exit 1
       
    26 fi