diff options
author | OBATA Akio <[email protected]> | 2020-07-19 17:49:47 +0900 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2021-02-02 01:39:39 +0100 |
commit | 9f643e09538a6d0f5e260fe7d58bd5d4dc542613 (patch) | |
tree | cbb83e5b0e0beb5b284b44b49971d2867cbb6acd /config.tests/x11 | |
parent | 3dc547aa1ac80e6fc37df9cee48d8b95e012a2fd (diff) | |
download | qt3-9f643e09538a6d0f5e260fe7d58bd5d4dc542613.tar.gz qt3-9f643e09538a6d0f5e260fe7d58bd5d4dc542613.zip |
Fix to detect XRandR on multi-prefix package platforms
Change to find two XrandR header files from invidual directory.
"Xrandr.h" is in `libXrandr`, and "randr.h" is in `xorgproto` (used to be
`randrproto`) package, so they may be installed into different prefix.
Signed-off-by: OBATA Akio <[email protected]>
(cherry picked from commit bade711c82e43dc7553603bc08907fe9762da88c)
Diffstat (limited to 'config.tests/x11')
-rwxr-xr-x | config.tests/x11/xrandr.test | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/config.tests/x11/xrandr.test b/config.tests/x11/xrandr.test index 66a05c5..59145a1 100755 --- a/config.tests/x11/xrandr.test +++ b/config.tests/x11/xrandr.test @@ -43,28 +43,28 @@ if [ -z "$F" ]; then fi # check for Xrandr.h and randr.h -XRANDR_H= RANDR_H= if [ "$XRANDR" = "yes" ]; then - INC="X11/extensions/Xrandr.h" - INC2="X11/extensions/randr.h" + INCS="X11/extensions/Xrandr.h X11/extensions/randr.h" XDIRS=`sed -n -e '/^QMAKE_INCDIR_X11[ ]*=/ { s/[^=]*=[ ]*//; s/-I/ /g; p; }' $XCONFIG` INCDIRS="$IN_INCDIRS $XDIRS /usr/include /include" - F= - for INCDIR in $INCDIRS; do - if [ -f $INCDIR/$INC -a -f $INCDIR/$INC2 ]; then - F=yes - XRANDR_H=$INCDIR/$INC - RANDR_H=$INCDIR/$INC2 - [ "$VERBOSE" = "yes" ] && echo " Found $INC in $INCDIR" - break + for INC in $INCS; do + F= + for INCDIR in $INCDIRS; do + if [ -f $INCDIR/$INC ]; then + F=yes + [ "$INC" = "X11/extensions/randr.h" ] && RANDR_H=$INCDIR/$INC + [ "$VERBOSE" = "yes" ] && echo " Found $INC in $INCDIR" + break + fi + done + if [ -z "$F" ] + then + XRANDR=no + [ "$VERBOSE" = "yes" ] && echo " Could not find $INC anywhere in $INCDIRS" + break; fi done - if [ -z "$F" ] - then - XRANDR=no - [ "$VERBOSE" = "yes" ] && echo " Could not find $INC anywhere in $INCDIRS" - fi fi # verify that we are using XRandR 1.x >= 1.1 |