~ubuntu-branches/ubuntu/wily/qtbase-opensource-src/wily

« back to all changes in this revision

Viewing changes to config.tests/x11/notype.test

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 12:46:17 UTC
  • Revision ID: package-import@ubuntu.com-20130205124617-c8jouts182j002fx
Tags: upstream-5.0.1+dfsg
ImportĀ upstreamĀ versionĀ 5.0.1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
QMKSPEC=$1
 
4
XPLATFORM=`basename $1`
 
5
VERBOSE=$2
 
6
SRCDIR=$3
 
7
OUTDIR=$4
 
8
 
 
9
# debuggery
 
10
[ "$VERBOSE" = "yes" ] && echo "Detecting broken X11 headers... ($*)"
 
11
 
 
12
# Detect broken X11 headers when using GCC 2.95 or later
 
13
#   Xsun on Solaris 2.5.1:
 
14
#       Patches are available for Solaris 2.6, 7, and 8 but
 
15
#       not for Solaris 2.5.1.
 
16
#   HP-UX:
 
17
#       Patches are available for HP-UX 10.20, 11.00, and 11.11.
 
18
#   AIX 4.3.3 and AIX 5.1:
 
19
#       Headers are clearly broken on all AIX versions, and we
 
20
#       don't know of any patches. The strange thing is that we
 
21
#       did not get any reports about this issue until very
 
22
#       recently, long after gcc 3.0.x was released. It seems to
 
23
#       work for us with gcc 2.95.2.
 
24
NOTYPE=no
 
25
 
 
26
if [ $XPLATFORM = "solaris-g++" -o $XPLATFORM = "hpux-g++" -o $XPLATFORM = "aix-g++" -o $XPLATFORM = "aix-g++-64" ]; then
 
27
    NOTYPE=yes
 
28
 
 
29
    test -d "$OUTDIR/config.tests/x11/notype" || mkdir -p "$OUTDIR/config.tests/x11/notype"
 
30
    "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/x11/notype/notypetest.pro" -o "$OUTDIR/config.tests/x11/notype/Makefile" >/dev/null 2>&1
 
31
    cd "$OUTDIR/config.tests/x11/notype"
 
32
 
 
33
    if [ "$VERBOSE" = "yes" ]; then
 
34
        $MAKE
 
35
    else
 
36
        $MAKE >/dev/null 2>&1
 
37
    fi
 
38
 
 
39
    [ -x notypetest ] && NOTYPE=no
 
40
fi
 
41
 
 
42
# done
 
43
if [ "$NOTYPE" = "yes" ]; then
 
44
    [ "$VERBOSE" = "yes" ] && echo "Broken X11 headers detected."
 
45
    exit 0
 
46
else
 
47
    [ "$VERBOSE" = "yes" ] && echo "X11 headers look good."
 
48
    exit 1
 
49
fi