$NetBSD: patch-an,v 1.2 2007/12/16 13:42:10 tron Exp $ --- config.tests/x11/xrandr.test.orig 2006-07-26 12:20:40.000000000 +0000 +++ config.tests/x11/xrandr.test @@ -51,16 +51,24 @@ if [ "$XRANDR" = "yes" ]; then XDIRS=`sed -n -e '/^QMAKE_INCDIR_X11[ ]*=/ { s/[^=]*=[ ]*//; s/-I/ /g; p; }' $XCONFIG` INCDIRS="$IN_INCDIRS $XDIRS /usr/include /include" F= + F2= for INCDIR in $INCDIRS; do - if [ -f $INCDIR/$INC -a -f $INCDIR/$INC2 ]; then + if [ -f $INCDIR/$INC ]; then F=yes XRANDR_H=$INCDIR/$INC - RANDR_H=$INCDIR/$INC2 [ "$VERBOSE" = "yes" ] && echo " Found $INC in $INCDIR" break fi done - if [ -z "$F" ] + for INCDIR in $INCDIRS; do + if [ -f $INCDIR/$INC2 ]; then + F2=yes + RANDR_H=$INCDIR/$INC2 + [ "$VERBOSE" = "yes" ] && echo " Found $INC2 in $INCDIR" + break + fi + done + if [ -z "$F" -o -z "$F2" ] then XRANDR=no [ "$VERBOSE" = "yes" ] && echo " Could not find $INC anywhere in $INCDIRS"