define LIBS for QtDBus only if configure detected it; using HAVE_QTDBUS variable

This commit is contained in:
Vadim Kurland
2009-10-12 22:03:08 +00:00
parent 53544861d2
commit ea2602910c
7 changed files with 49 additions and 27 deletions
+1 -1
View File
@@ -1 +1 @@
#define BUILD_NUM 1579
#define BUILD_NUM 1580
+13
View File
@@ -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
+17 -20
View File
@@ -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 <<EOF > 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 ********************************************************************
+1
View File
@@ -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@
+1
View File
@@ -32,6 +32,7 @@ using namespace libfwbuilder;
#ifdef HAVE_QTDBUS
#include <QtDBus/QtDBus>
#include <QtDBus/QDBusConnection>
QVariant getProperty(QDBusInterface &interface, QString prop)
throw(FWException)
+8 -3
View File
@@ -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
}
}
}
+8 -3
View File
@@ -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
}
}
}