source: trunk/config.tests/mac/defaultarch.test@ 497

Last change on this file since 497 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

  • Property svn:executable set to *
File size: 944 bytes
Line 
1#!/bin/sh
2
3COMPILER=$1
4VERBOSE=$2
5WORKDIR=$3
6QT_MAC_DEFUALT_ARCH=
7
8touch defaultarch.c
9
10# compile something and run 'file' on it.
11if "$COMPILER" -c defaultarch.c 2>/dev/null 1>&2; then
12 FIlE_OUTPUT=`file defaultarch.o`
13 [ "$VERBOSE" = "yes" ] && echo "'file' reports compiler ($COMPILER) default architechture as: $FIlE_OUTPUT"
14
15fi
16rm -f defaultarch.c defaultarch.o
17
18# detect our known archs.
19if echo "$FIlE_OUTPUT" | grep '\<i386\>' > /dev/null 2>&1; then
20 QT_MAC_DEFUALT_ARCH=x86 # configure knows it as "x86" not "i386"
21fi
22if echo "$FIlE_OUTPUT" | grep '\<x86_64\>' > /dev/null 2>&1; then
23 QT_MAC_DEFUALT_ARCH=x86_64
24fi
25if echo "$FIlE_OUTPUT" | grep '\<ppc\>' > /dev/null 2>&1; then
26 QT_MAC_DEFUALT_ARCH=ppc
27fi
28if echo "$FIlE_OUTPUT" | grep '\<ppc64\>' > /dev/null 2>&1; then
29 QT_MAC_DEFUALT_ARCH=ppc64
30fi
31
32[ "$VERBOSE" = "yes" ] && echo "setting QT_MAC_DEFUALT_ARCH to \"$QT_MAC_DEFUALT_ARCH\""
33export QT_MAC_DEFUALT_ARCH
Note: See TracBrowser for help on using the repository browser.