File: notype.test

package info (click to toggle)
qtbase-opensource-src 5.3.2%2Bdfsg-4%2Bdeb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 272,196 kB
  • ctags: 229,359
  • sloc: cpp: 1,623,111; ansic: 386,069; xml: 101,194; sh: 16,504; python: 9,156; java: 4,681; asm: 4,531; perl: 2,392; yacc: 1,926; lex: 970; makefile: 498; awk: 142; objc: 70; sed: 3
file content (49 lines) | stat: -rwxr-xr-x 1,488 bytes parent folder | download | duplicates (9)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh

QMKSPEC=$1
XPLATFORM=`basename $1`
VERBOSE=$2
SRCDIR=$3
OUTDIR=$4

# debuggery
[ "$VERBOSE" = "yes" ] && echo "Detecting broken X11 headers... ($*)"

# Detect broken X11 headers when using GCC 2.95 or later
#   Xsun on Solaris 2.5.1:
#   	Patches are available for Solaris 2.6, 7, and 8 but
#   	not for Solaris 2.5.1.
#   HP-UX:
#   	Patches are available for HP-UX 10.20, 11.00, and 11.11.
#   AIX 4.3.3 and AIX 5.1:
#   	Headers are clearly broken on all AIX versions, and we
#   	don't know of any patches. The strange thing is that we
#   	did not get any reports about this issue until very
#   	recently, long after gcc 3.0.x was released. It seems to
#   	work for us with gcc 2.95.2.
NOTYPE=no

if [ $XPLATFORM = "solaris-g++" -o $XPLATFORM = "hpux-g++" -o $XPLATFORM = "aix-g++" -o $XPLATFORM = "aix-g++-64" ]; then
    NOTYPE=yes

    test -d "$OUTDIR/config.tests/x11/notype" || mkdir -p "$OUTDIR/config.tests/x11/notype"
    "$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
    cd "$OUTDIR/config.tests/x11/notype"

    if [ "$VERBOSE" = "yes" ]; then
	$MAKE
    else
	$MAKE >/dev/null 2>&1
    fi

    [ -x notypetest ] && NOTYPE=no
fi

# done
if [ "$NOTYPE" = "yes" ]; then
    [ "$VERBOSE" = "yes" ] && echo "Broken X11 headers detected."
    exit 0
else
    [ "$VERBOSE" = "yes" ] && echo "X11 headers look good."
    exit 1
fi