~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to config.tests/unix/fvisibility.test

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
FVISIBILITY_SUPPORT=no
 
4
XPLATFORM=`basename $1`
 
5
XCONFIG=$1/qmake.conf
 
6
VERBOSE=$2
 
7
 
 
8
cat >>fvisibility.c << EOF
 
9
__attribute__((visibility("default"))) void blah();
 
10
#if defined(__GNUC__) && __GNUC__ < 4
 
11
#error GCC3 with backported visibility patch is known to miscompile Qt
 
12
#endif
 
13
EOF
 
14
 
 
15
COMPILER=`grep QMAKE_CC $XCONFIG | sed "s,.*= *,,"`
 
16
$COMPILER -c -fvisibility=hidden fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
 
17
rm -f fvisibility.c fvisibility.o
 
18
 
 
19
# done
 
20
if [ "$FVISIBILITY_SUPPORT" != "yes" ]; then
 
21
    [ "$VERBOSE" = "yes" ] && echo "-fvisibility support disabled."
 
22
    exit 0
 
23
else
 
24
    [ "$VERBOSE" = "yes" ] && echo "-fvisibility support enabled."
 
25
    exit 1
 
26
fi