mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-11 07:31:25 +02:00
define LIBS for QtDBus only if configure detected it; using HAVE_QTDBUS variable
This commit is contained in:
+17
-20
@@ -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 ********************************************************************
|
||||
|
||||
|
||||
Reference in New Issue
Block a user