summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorBernd Weimer <bweimer@blackberry.com>2014-07-09 11:58:44 +0200
committerBernd Weimer <bweimer@blackberry.com>2014-07-28 14:08:22 +0200
commitec703836b314c419a1c463dc105234f733031535 (patch)
tree7009d63882089f0c1f6fd612563a4cb421e8c5a3 /configure
parent553325abfd988b062195caae280bbf75b8474ca4 (diff)
Improve dbus cross compilation
Building QtDBus on Linux host for QNX target had two issues: * Configure check failed, because dbus-1 library was not linked in, if target platform doesn't support pkg-config. * Host tools were not built, because pkg-config was not used to locate dbus headers on the host. Task-number: QTBUG-37324 Change-Id: I71d8309599fd40ef2dd8c9e3b44b93a7482019f1 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure b/configure
index d5c2b0801f..cb8d78fd3c 100755
--- a/configure
+++ b/configure
@@ -4584,11 +4584,19 @@ if [ "$CFG_DBUS" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
+ else
+ QT_LIBS_DBUS="-ldbus-1"
fi
if compileTest unix/dbus "D-Bus" $QT_CFLAGS_DBUS $QT_LIBS_DBUS; then
[ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes
- QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
+ QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
+ # Try find correct host configuration for dbus tools when cross-compiling
+ if [ "$QT_CROSS_COMPILE" = "yes" ] && env -i PATH="$PATH" \
+ pkg-config --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
+ QT_CFLAGS_DBUS=`env -i PATH="$PATH" pkg-config --cflags dbus-1 2>/dev/null`
+ fi
+ QMakeVar set QT_HOST_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
else
if [ "$CFG_DBUS" = "auto" ]; then
CFG_DBUS=no