diff --git a/build_num b/build_num index e173e85c7..92043abe8 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 1579 +#define BUILD_NUM 1580 diff --git a/config_tests/qtdbus_test.pro b/config_tests/qtdbus_test.pro new file mode 100644 index 000000000..3a6de137f --- /dev/null +++ b/config_tests/qtdbus_test.pro @@ -0,0 +1,13 @@ +# -*- mode: makefile; tab-width: 4; -*- +TEMPLATE = app +unix { + macx { + LIBS += -framework QtDBus + } + !macx { + # workaround for QT += dbus not working atm + LIBS += -lQtDBus + } +} +SOURCES = qtdbus_test.cpp +TARGET = qtdbus_test diff --git a/configure.in b/configure.in index 2acff9b68..327cef036 100644 --- a/configure.in +++ b/configure.in @@ -270,34 +270,31 @@ AC_SUBST(HAVE_EXTERNAL_ANTLR) AC_SUBST(ANTLR_LIBS) AC_SUBST(ANTLR_INCLUDEPATH) -# TODO: Probably need to repackage this as Autoconf macro +# TODO: Probably need to repackage this as Autoconf macro. +# +# QT DBus framework is not always available. It is not included in QT +# for Windows and is missing in QT 4.5.3 Commercial package for Mac OS +# X 10.6 SnowLeopard (but it is present in QT 4.4.1 Commercial for +# Mac OS X 10.5 Leopard. Go figure.) +# AC_MSG_CHECKING(QT DBus framework) ( cd config_tests - cat < test.pro - TEMPLATE = app - unix { - macx { - LIBS += -framework QtDBus - } - !macx { - # workaround for QT += dbus not working atm - LIBS += -lQtDBus - } - } - SOURCES = qtdbus_test.cpp - TARGET = qtdbus_test -EOF C="" test -n "$QMAKESPEC" && C="$C -spec $QMAKESPEC " - $QMAKE $C test.pro + $QMAKE $C qtdbus_test.pro || exit 1 test -f Makefile || exit 1 - make >config.log 2>&1 ) && { + make >config.log 2>&1 +) +if test $? -eq 0; then + HAVE_QTDBUS="1" AC_MSG_RESULT(ok) AC_DEFINE_UNQUOTED(HAVE_QTDBUS, 1, [qtdbus]) - AC_SUBST(HAVE_QTDBUS) -} || { +else + HAVE_QTDBUS="0" AC_MSG_RESULT(not available) -} + AC_DEFINE_UNQUOTED(HAVE_QTDBUS, 0, [qtdbus]) +fi +AC_SUBST(HAVE_QTDBUS) dnl ******************************************************************** diff --git a/qmake.inc.in b/qmake.inc.in index d43c04179..52a6cc429 100644 --- a/qmake.inc.in +++ b/qmake.inc.in @@ -13,6 +13,7 @@ DOCDIR = @DOCDIR@ HAVE_ANTLR_RUNTIME = @HAVE_ANTLR_RUNTIME@ HAVE_EXTERNAL_ANTLR = @HAVE_EXTERNAL_ANTLR@ +HAVE_QTDBUS = @HAVE_QTDBUS@ unix { PREFIX = @PREFIX@ diff --git a/src/fwtransfer/TransferDevice.cpp b/src/fwtransfer/TransferDevice.cpp index 0cbcd3a28..4050ba11c 100644 --- a/src/fwtransfer/TransferDevice.cpp +++ b/src/fwtransfer/TransferDevice.cpp @@ -32,6 +32,7 @@ using namespace libfwbuilder; #ifdef HAVE_QTDBUS #include +#include QVariant getProperty(QDBusInterface &interface, QString prop) throw(FWException) diff --git a/src/gui/gui.pro b/src/gui/gui.pro index c5be0f25a..aea2bd42a 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -13,10 +13,15 @@ include(../../qmake.inc) exists(qmake.inc):include( qmake.inc) -unix { - !macx { -# workaround for QT += dbus not working atm +contains( HAVE_QTDBUS, 1 ) { + unix { + macx { + LIBS += -framework QtDBus + } + !macx { + # workaround for QT += dbus not working atm LIBS += -lQtDBus + } } } diff --git a/src/transfer_agents/secuwall/secuwall.pro b/src/transfer_agents/secuwall/secuwall.pro index 7e8d01bad..0b2338504 100644 --- a/src/transfer_agents/secuwall/secuwall.pro +++ b/src/transfer_agents/secuwall/secuwall.pro @@ -7,10 +7,15 @@ SOURCES = transfer_secuwall.cpp HEADERS = ../../../config.h -unix { - !macx { -# workaround for QT += dbus not working atm +contains( HAVE_QTDBUS, 1 ) { + unix { + macx { + LIBS += -framework QtDBus + } + !macx { + # workaround for QT += dbus not working atm LIBS += -lQtDBus + } } }