blob: 08322a96cfa2b5230871ee6c435fe621f36bfa2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/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
|