diff options
Diffstat (limited to 'config.tests/unix/arch.test')
-rwxr-xr-x | config.tests/unix/arch.test | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/config.tests/unix/arch.test b/config.tests/unix/arch.test index 2a6e12de56..939b49cea0 100755 --- a/config.tests/unix/arch.test +++ b/config.tests/unix/arch.test @@ -5,6 +5,7 @@ VERBOSE=$2 SRCDIR=$3 OUTDIR=$4 RESULTFILE=$5 +VARPREFIX=$6 # debuggery [ "$VERBOSE" = "yes" ] && echo "Determining architecture... ($*)" @@ -28,14 +29,15 @@ else exit 2 fi -ARCH=`strings - $binary 2>/dev/null | awk -F: '/==Qt=magic=Qt==/ { print $2 }'` || -{ +if strings - $binary 2>/dev/null | \ + awk -F: '/==Qt=magic=Qt== Architecture/ { print "'$VARPREFIX'_ARCH=\"" $2 "\"" } + /==Qt=magic=Qt== Sub-architecture/ { print "'$VARPREFIX'_CPUFEATURES=\"" $2 "\"" }' > "$RESULTFILE" +then + [ "$VERBOSE" = "yes" ] && echo " Found architecture in binary" && \ + cat "$RESULTFILE" +else [ "$VERBOSE" = "yes" ] && echo "Unable to determine architecture!" exit 2 -} +fi $MAKE distclean >/dev/null 2>&1 - -[ "$VERBOSE" = "yes" ] && echo " Found '$ARCH' in binary" - -echo "$ARCH" > $5 |