config.tests/x11/notype.test
changeset 0 1918ee327afb
equal deleted inserted replaced
-1:000000000000 0:1918ee327afb
       
     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" "$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