[Libreoffice-commits] .: config_host.mk.in configure.ac sd/Library_sd.mk sd/Library_sdui.mk sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Oct 21 14:03:04 PDT 2012
config_host.mk.in | 1
configure.ac | 45 ++++++++++++++++++++++------------
sd/Library_sd.mk | 11 +++++++-
sd/Library_sdui.mk | 7 +++++
sd/source/ui/dlg/RemoteDialog.cxx | 8 ++++--
sd/source/ui/remotecontrol/Server.cxx | 8 ++++++
6 files changed, 62 insertions(+), 18 deletions(-)
New commits:
commit 7c8c73dd5cf84050a8a2c51b04d7f5278b409fd7
Author: Rene Engelhard <rene at debian.org>
Date: Sun Oct 21 14:54:53 2012 +0200
fix sdremote related configure switches
sdremote itself apparently works also over IP (WLAN), so we don't need to
disable it when we just don't want/have bluetooth. And also dbus is also
needed in the bluez case
Change-Id: I55ba07cd715d1e9bd641ef28e2391e4fe85b85e0
diff --git a/config_host.mk.in b/config_host.mk.in
index 503d4ae..8e328d2 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -160,6 +160,7 @@ export ENABLE_QUICKSTART_LIBPNG=@ENABLE_QUICKSTART_LIBPNG@
export ENABLE_RANDR=@ENABLE_RANDR@
export ENABLE_RELEASE_BUILD=@ENABLE_RELEASE_BUILD@
export ENABLE_SDREMOTE=@ENABLE_SDREMOTE@
+export ENABLE_BLUETOOTH=@ENABLE_BLUETOOTH@
export ENABLE_REPORTBUILDER=@ENABLE_REPORTBUILDER@
export ENABLE_SCRIPTING_BEANSHELL=@ENABLE_SCRIPTING_BEANSHELL@
export ENABLE_SCRIPTING_JAVASCRIPT=@ENABLE_SCRIPTING_JAVASCRIPT@
diff --git a/configure.ac b/configure.ac
index 6d9817e..90bc25e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -879,10 +879,15 @@ AC_ARG_ENABLE(packagekit,
AC_ARG_ENABLE(sdremote,
AS_HELP_STRING([--disable-sdremote],
- [Determines whether to enable Impress remote control.
- Uses dbus and bluetooth (bluez).]),
+ [Determines whether to enable Impress remote control.]),
,enable_sdremote=yes)
+AC_ARG_ENABLE(bluetooth,
+ AS_HELP_STRING([--disable-bluetooth],
+ [Determines whether to build sdremote sith bluetooth support
+ (via dbus)]),
+,enable_bluetooth=yes)
+
AC_ARG_ENABLE(gconf,
AS_HELP_STRING([--disable-gconf],
[Determines whether to use the GConf support.]),
@@ -9597,32 +9602,42 @@ fi
AC_SUBST(ENABLE_PACKAGEKIT)
AC_MSG_CHECKING([whether to enable sd remotecontrol])
-if test "$ENABLE_DBUS" = "TRUE"; then
- if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
- AC_MSG_RESULT([yes])
- ENABLE_SDREMOTE=YES
+if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
+ AC_MSG_RESULT([yes])
+ ENABLE_SDREMOTE=YES
+ AC_MSG_CHECKING([whether to enable bluetooth support])
+ if test -n "$enable_bluetooth" -a "$enable_bluetooth" != "no"; then
+ AC_MSG_RESULT([yes])
+ ENABLE_BLUETOOTH=YES
if test "$OS" = "LINUX"; then
- dnl ===================================================================
- dnl Check for system bluez
- dnl ===================================================================
- AC_MSG_CHECKING([which bluetooth header to use])
- if test "$with_system_bluez" = "yes"; then
+ if test "$ENABLE_DBUS" = "TRUE"; then
+ dnl ===================================================================
+ dnl Check for system bluez
+ dnl ===================================================================
+ AC_MSG_CHECKING([which bluetooth header to use])
+ if test "$with_system_bluez" = "yes"; then
AC_MSG_RESULT([external])
AC_CHECK_HEADER(bluetooth/bluetooth.h, [],
[AC_MSG_ERROR(bluetooth.h not found. install bluez)], [])
- else
+ else
AC_MSG_RESULT([internal])
BUILD_TYPE="$BUILD_TYPE BLUEZ"
+ fi
fi
+ else
+ AC_MSG_RESULT([no, dbus disabled])
+ ENABLE_BLUETOOTH=NO
fi
else
- ENABLE_SDREMOTE=NO
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([no])
+ ENABLE_BLUETOOTH=NO
fi
else
- AC_MSG_RESULT([no, dbus disabled.])
+ ENABLE_SDREMOTE=NO
+ AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_SDREMOTE)
+AC_SUBST(ENABLE_BLUETOOTH)
dnl ===================================================================
dnl Check whether the gtk 2.0 libraries are available.
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index ba2fe9e..ae4b8a5 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -513,7 +513,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
ifeq ($(ENABLE_SDREMOTE),YES)
$(eval $(call gb_Library_add_exception_objects,sd,\
- sd/source/ui/remotecontrol/BluetoothServer \
sd/source/ui/remotecontrol/BufferedStreamSocket \
sd/source/ui/remotecontrol/Communicator \
sd/source/ui/remotecontrol/DiscoveryService \
@@ -528,6 +527,16 @@ $(eval $(call gb_Library_add_defs,sd,\
-DENABLE_SDREMOTE \
))
+ifeq ($(ENABLE_BLUETOOTH),YES)
+$(eval $(call gb_Library_add_exception_objects,sd,\
+ sd/source/ui/remotecontrol/BluetoothServer \
+))
+
+$(eval $(call gb_Library_add_defs,sd,\
+ -DENABLE_BLUETOOTH \
+))
+endif
+
endif
ifeq ($(strip $(GUI)),WNT)
diff --git a/sd/Library_sdui.mk b/sd/Library_sdui.mk
index 98c1fe9..9d4ec75 100644
--- a/sd/Library_sdui.mk
+++ b/sd/Library_sdui.mk
@@ -41,6 +41,13 @@ ifeq ($(ENABLE_SDREMOTE),YES)
$(eval $(call gb_Library_add_defs,sdui,\
-DENABLE_SDREMOTE \
))
+
+ifeq ($(ENABLE_BLUETOOTH),YES)
+$(eval $(call gb_Library_add_defs,sdui,\
+ -DENABLE_BLUETOOTH \
+))
+endif
+
endif
$(eval $(call gb_Library_use_sdk_api,sdui))
diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
index c04e77b..1d52dc5 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -28,9 +28,13 @@ RemoteDialog::RemoteDialog( Window *pWindow ) :
#ifdef ENABLE_SDREMOTE
FreeResource();
+#ifdef ENABLE_BLUETOOTH
mPreviouslyDiscoverable = RemoteServer::isBluetoothDiscoverable();
if ( !mPreviouslyDiscoverable )
RemoteServer::setBluetoothDiscoverable( true );
+#else
+ RemoteServer::setBluetoothDiscoverable( false );
+#endif
vector<ClientInfo*> aClients( RemoteServer::getClients() );
@@ -57,7 +61,7 @@ IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton)
{
// setBusy( true );
// Fixme: Try and connect
-#ifdef ENABLE_SDREMOTE
+#if defined(ENABLE_SDREMOTE) && defined(ENABLE_BLUETOOTH)
long aSelected = mClientBox.GetActiveEntryIndex();
if ( aSelected < 0 )
return 1;
@@ -75,7 +79,7 @@ IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton)
IMPL_LINK_NOARG( RemoteDialog, CloseHdl )
{
-#ifdef ENABLE_SDREMOTE
+#if defined(ENABLE_SDREMOTE) && defined(ENABLE_BLUETOOTH)
if ( !mPreviouslyDiscoverable )
{
RemoteServer::setBluetoothDiscoverable( false );
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index deb8814..220a3b2 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -175,7 +175,9 @@ void RemoteServer::setup()
spServer = new RemoteServer();
spServer->launch();
+#ifdef ENABLE_BLUETOOTH
sd::BluetoothServer::setup( &(spServer->mCommunicators) );
+#endif
}
@@ -307,11 +309,17 @@ void SdDLL::RegisterRemotes()
bool RemoteServer::isBluetoothDiscoverable()
{
+#ifdef ENABLE_BLUETOOTH
return BluetoothServer::isDiscoverable();
+#else
+ return false;
+#endif
}
void RemoteServer::setBluetoothDiscoverable( bool aDiscoverable )
{
+#ifdef ENABLE_BLUETOOTH
BluetoothServer::setDiscoverable( aDiscoverable );
+#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list