From 12d32b017d9ff31332933eae28a3f7b46b9d3e49 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 9 Dec 2014 15:03:04 -0800 Subject: [PATCH] Complete the work for the runtime libdbus-1 support Commit a2da88712f1e057747f68a28361b300faac5e605 was incomplete. Though it did enable building of QtDBus without the libdbus-1 headers, but it still kept looking for it. We don't need to do it anymore if CFG_DBUS is the default (runtime), so skip the actual check. This commit does not change behavior. All it does is skip the D-Bus tests if we're about to use dlopen'ed libdbus-1. Change-Id: I3947443c9ef6cc409cb6b154564f8af6fb5de84e Reviewed-by: Simon Hausmann --- configure | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/configure b/configure index a461541e36..31a59fc802 100755 --- a/configure +++ b/configure @@ -658,7 +658,7 @@ CFG_TSLIB=no CFG_NIS=auto CFG_CUPS=auto CFG_ICONV=auto -CFG_DBUS=auto +CFG_DBUS=runtime CFG_GLIB=auto CFG_QGTKSTYLE=auto CFG_LARGEFILE=auto @@ -1871,8 +1871,10 @@ while [ "$#" -gt 0 ]; do fi ;; dbus) - if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "linked" ] || [ "$VAL" = "runtime" ]; then + if [ "$VAL" = "no" ] || [ "$VAL" = "linked" ] || [ "$VAL" = "runtime" ]; then CFG_DBUS="$VAL" + elif [ "$VAL" = "yes" ]; then + CFG_DBUS="runtime" else UNKNOWN_OPT=yes fi @@ -4630,7 +4632,7 @@ if [ "$CFG_ICONV" != "no" ]; then fi # auto-detect libdbus-1 support -if [ "$CFG_DBUS" != "no" ]; then +if [ "$CFG_DBUS" = "linked" ]; 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` @@ -4638,7 +4640,6 @@ if [ "$CFG_DBUS" != "no" ]; then 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_LIBS_DBUS "$QT_LIBS_DBUS" QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS" # Try find correct host configuration for dbus tools when cross-compiling @@ -4648,11 +4649,7 @@ if [ "$CFG_DBUS" != "no" ]; then fi QMakeVar set QT_HOST_CFLAGS_DBUS "$QT_CFLAGS_DBUS" else - if [ "$CFG_DBUS" != "linked" ]; then - CFG_DBUS=runtime - elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then - # CFG_DBUS is "yes" or "linked" here - + if [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then echo "The Qt D-Bus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found." echo " Turn on verbose messaging (-v) to $0 to see the final report." echo " If you believe this message is in error you may use the continue"