summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-03-02 15:15:47 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-03-02 15:51:37 (GMT)
commit4ec935b3e738f79d76b708773c49471cffc46f65 (patch)
tree554e92e8b051527a366353ad3fdd727758717701 /configure
parent571946141df5428c08221381b2f18302e004825f (diff)
downloadQt-4ec935b3e738f79d76b708773c49471cffc46f65.zip
Qt-4ec935b3e738f79d76b708773c49471cffc46f65.tar.gz
Qt-4ec935b3e738f79d76b708773c49471cffc46f65.tar.bz2
Lighthouse: Make wayland configure check use pkg-config
Reviewed-by: paul
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 16 insertions, 3 deletions
diff --git a/configure b/configure
index b95baab..664af92 100755
--- a/configure
+++ b/configure
@@ -6171,10 +6171,23 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
CFG_LIBFREETYPE=system
fi
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/wayland "Wayland" $L_FLAGS $I_FLAGS $l_FLAGS; then
- QT_CONFIG="$QT_CONFIG wayland"
- fi
+ fi
+
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists wayland-client 2>/dev/null; then
+ QMAKE_CFLAGS_WAYLAND=`$PKG_CONFIG --cflags wayland-client 2>/dev/null`
+ QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
+ QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
+ fi
+
+ # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
+ if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
+ QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
+ QMakeVar set QMAKE_INCDIR_WAYLAND "$QMAKE_INCDIR_WAYLAND"
+ QMakeVar set QMAKE_LIBS_WAYLAND "$QMAKE_LIBS_WAYLAND"
+ fi
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/wayland "Wayland" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_WAYLAND -I$QMAKE_INCDIR_WAYLAND $QMAKE_LIBS_WAYLAND; then
+ QT_CONFIG="$QT_CONFIG wayland"
fi
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/coreservices "CoreServices" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then