mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-10 23:22:33 +02:00
define LIBS for QtDBus only if configure detected it; using HAVE_QTDBUS variable
This commit is contained in:
@@ -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
@@ -270,34 +270,31 @@ AC_SUBST(HAVE_EXTERNAL_ANTLR)
|
|||||||
AC_SUBST(ANTLR_LIBS)
|
AC_SUBST(ANTLR_LIBS)
|
||||||
AC_SUBST(ANTLR_INCLUDEPATH)
|
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)
|
AC_MSG_CHECKING(QT DBus framework)
|
||||||
( cd config_tests
|
( 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=""
|
C=""
|
||||||
test -n "$QMAKESPEC" && C="$C -spec $QMAKESPEC "
|
test -n "$QMAKESPEC" && C="$C -spec $QMAKESPEC "
|
||||||
$QMAKE $C test.pro
|
$QMAKE $C qtdbus_test.pro || exit 1
|
||||||
test -f Makefile || 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_MSG_RESULT(ok)
|
||||||
AC_DEFINE_UNQUOTED(HAVE_QTDBUS, 1, [qtdbus])
|
AC_DEFINE_UNQUOTED(HAVE_QTDBUS, 1, [qtdbus])
|
||||||
AC_SUBST(HAVE_QTDBUS)
|
else
|
||||||
} || {
|
HAVE_QTDBUS="0"
|
||||||
AC_MSG_RESULT(not available)
|
AC_MSG_RESULT(not available)
|
||||||
}
|
AC_DEFINE_UNQUOTED(HAVE_QTDBUS, 0, [qtdbus])
|
||||||
|
fi
|
||||||
|
AC_SUBST(HAVE_QTDBUS)
|
||||||
|
|
||||||
dnl ********************************************************************
|
dnl ********************************************************************
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ DOCDIR = @DOCDIR@
|
|||||||
|
|
||||||
HAVE_ANTLR_RUNTIME = @HAVE_ANTLR_RUNTIME@
|
HAVE_ANTLR_RUNTIME = @HAVE_ANTLR_RUNTIME@
|
||||||
HAVE_EXTERNAL_ANTLR = @HAVE_EXTERNAL_ANTLR@
|
HAVE_EXTERNAL_ANTLR = @HAVE_EXTERNAL_ANTLR@
|
||||||
|
HAVE_QTDBUS = @HAVE_QTDBUS@
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
PREFIX = @PREFIX@
|
PREFIX = @PREFIX@
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ using namespace libfwbuilder;
|
|||||||
#ifdef HAVE_QTDBUS
|
#ifdef HAVE_QTDBUS
|
||||||
|
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QtDBus>
|
||||||
|
#include <QtDBus/QDBusConnection>
|
||||||
|
|
||||||
QVariant getProperty(QDBusInterface &interface, QString prop)
|
QVariant getProperty(QDBusInterface &interface, QString prop)
|
||||||
throw(FWException)
|
throw(FWException)
|
||||||
|
|||||||
+8
-3
@@ -13,10 +13,15 @@ include(../../qmake.inc)
|
|||||||
|
|
||||||
exists(qmake.inc):include( qmake.inc)
|
exists(qmake.inc):include( qmake.inc)
|
||||||
|
|
||||||
unix {
|
contains( HAVE_QTDBUS, 1 ) {
|
||||||
!macx {
|
unix {
|
||||||
# workaround for QT += dbus not working atm
|
macx {
|
||||||
|
LIBS += -framework QtDBus
|
||||||
|
}
|
||||||
|
!macx {
|
||||||
|
# workaround for QT += dbus not working atm
|
||||||
LIBS += -lQtDBus
|
LIBS += -lQtDBus
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,15 @@ SOURCES = transfer_secuwall.cpp
|
|||||||
|
|
||||||
HEADERS = ../../../config.h
|
HEADERS = ../../../config.h
|
||||||
|
|
||||||
unix {
|
contains( HAVE_QTDBUS, 1 ) {
|
||||||
!macx {
|
unix {
|
||||||
# workaround for QT += dbus not working atm
|
macx {
|
||||||
|
LIBS += -framework QtDBus
|
||||||
|
}
|
||||||
|
!macx {
|
||||||
|
# workaround for QT += dbus not working atm
|
||||||
LIBS += -lQtDBus
|
LIBS += -lQtDBus
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user